Repository: Ttl/fmcw2 Branch: master Commit: 7f5f835ee7cf Files: 728 Total size: 5.3 MB Directory structure: gitextract_b54prupg/ ├── .gitignore ├── README.md ├── firmware/ │ ├── CMakeLists.txt │ ├── COPYING │ ├── blinky/ │ │ ├── CMakeLists.txt │ │ └── blinky.c │ ├── cmake_install.cmake │ ├── common/ │ │ ├── LPC4320_M4_memory.ld │ │ ├── LPC4330_M4_memory.ld │ │ ├── LPC43xx_M0_memory.ld │ │ ├── LPC43xx_M4_M0_image_from_text.ld │ │ ├── LPC43xx_M4_memory.ld │ │ ├── bitband.c │ │ ├── bitband.h │ │ ├── fault_handler.c │ │ ├── fault_handler.h │ │ ├── gpdma.c │ │ ├── gpdma.h │ │ ├── hackrf_core.c │ │ ├── hackrf_core.h │ │ ├── m0_bin.s.cmake │ │ ├── m0_sleep.c │ │ ├── mcp4022.c │ │ ├── mcp4022.h │ │ ├── rf_path.c │ │ ├── rf_path.h │ │ ├── rom_iap.c │ │ ├── rom_iap.h │ │ ├── sgpio.c │ │ ├── sgpio.h │ │ ├── streaming.c │ │ ├── streaming.h │ │ ├── usb.c │ │ ├── usb.h │ │ ├── usb_queue.c │ │ ├── usb_queue.h │ │ ├── usb_request.c │ │ ├── usb_request.h │ │ ├── usb_standard_request.c │ │ ├── usb_standard_request.h │ │ ├── usb_type.h │ │ ├── w25q80bv.c │ │ └── w25q80bv.h │ ├── hackrf-common.cmake │ ├── hackrf_usb/ │ │ ├── CMakeLists.txt │ │ ├── hackrf_usb.c │ │ ├── sgpio_isr.c │ │ ├── sgpio_isr.h │ │ ├── usb_api_board_info.c │ │ ├── usb_api_board_info.h │ │ ├── usb_api_cpld.c │ │ ├── usb_api_cpld.h │ │ ├── usb_api_register.c │ │ ├── usb_api_register.h │ │ ├── usb_api_spiflash.c │ │ ├── usb_api_spiflash.h │ │ ├── usb_api_transceiver.c │ │ ├── usb_api_transceiver.h │ │ ├── usb_bulk_buffer.c │ │ ├── usb_bulk_buffer.h │ │ ├── usb_descriptor.c │ │ ├── usb_descriptor.h │ │ ├── usb_device.c │ │ ├── usb_device.h │ │ ├── usb_endpoint.c │ │ └── usb_endpoint.h │ ├── libopencm3/ │ │ ├── .gitignore │ │ ├── COPYING.GPL3 │ │ ├── COPYING.LGPL3 │ │ ├── HACKING │ │ ├── HACKING_COMMON_DOC │ │ ├── Makefile │ │ ├── README │ │ ├── doc/ │ │ │ ├── Doxyfile │ │ │ ├── Doxyfile_common │ │ │ ├── DoxygenLayout.xml │ │ │ ├── HACKING │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── cm3/ │ │ │ │ ├── Doxyfile │ │ │ │ └── DoxygenLayout_cm3.xml │ │ │ ├── efm32g/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_efm32g.xml │ │ │ │ └── header_efm32g.tex │ │ │ ├── efm32gg/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_efm32gg.xml │ │ │ │ └── header_efm32gg.tex │ │ │ ├── efm32lg/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_efm32lg.xml │ │ │ │ └── header_efm32lg.tex │ │ │ ├── efm32tg/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_efm32tg.xml │ │ │ │ └── header_efm32tg.tex │ │ │ ├── index.html │ │ │ ├── lm3s/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_lm3s.xml │ │ │ │ └── header_lm3s.tex │ │ │ ├── lm4f/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_lm4f.xml │ │ │ │ └── header_lm4f.tex │ │ │ ├── lpc13xx/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_lpc13xx.xml │ │ │ │ └── header_lpc13xx.tex │ │ │ ├── lpc17xx/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_lpc17xx.xml │ │ │ │ └── header_lpc17xx.tex │ │ │ ├── lpc43xx/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_lpc43xx.xml │ │ │ │ └── header_lpc43xx.tex │ │ │ ├── stm32f0/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32f0.xml │ │ │ │ ├── header_stm32f0.tex │ │ │ │ └── index.html │ │ │ ├── stm32f1/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32f1.xml │ │ │ │ ├── header_stm32f1.tex │ │ │ │ └── index.html │ │ │ ├── stm32f2/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32f2.xml │ │ │ │ ├── header_stm32f2.tex │ │ │ │ └── index.html │ │ │ ├── stm32f3/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32f3.xml │ │ │ │ ├── header_stm32f3.tex │ │ │ │ └── index.html │ │ │ ├── stm32f4/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32f4.xml │ │ │ │ ├── header_stm32f4.tex │ │ │ │ └── index.html │ │ │ ├── stm32l1/ │ │ │ │ ├── Doxyfile │ │ │ │ ├── Doxyfile_latex │ │ │ │ ├── DoxygenLayout_stm32l1.xml │ │ │ │ ├── header_stm32l1.tex │ │ │ │ └── index.html │ │ │ └── usb/ │ │ │ ├── Doxyfile │ │ │ ├── Doxyfile_latex │ │ │ ├── DoxygenLayout_usb.xml │ │ │ └── header_usb.tex │ │ ├── include/ │ │ │ ├── libopencm3/ │ │ │ │ ├── cm3/ │ │ │ │ │ ├── assert.h │ │ │ │ │ ├── common.h │ │ │ │ │ ├── cortex.h │ │ │ │ │ ├── doc-cm3.h │ │ │ │ │ ├── fpb.h │ │ │ │ │ ├── itm.h │ │ │ │ │ ├── memorymap.h │ │ │ │ │ ├── mpu.h │ │ │ │ │ ├── scb.h │ │ │ │ │ ├── scs.h │ │ │ │ │ ├── sync.h │ │ │ │ │ ├── systick.h │ │ │ │ │ ├── tpiu.h │ │ │ │ │ └── vector.h │ │ │ │ ├── docmain.dox │ │ │ │ ├── efm32/ │ │ │ │ │ ├── efm32g/ │ │ │ │ │ │ ├── doc-efm32g.h │ │ │ │ │ │ └── irq.yaml │ │ │ │ │ ├── efm32gg/ │ │ │ │ │ │ ├── doc-efm32gg.h │ │ │ │ │ │ └── irq.yaml │ │ │ │ │ ├── efm32lg/ │ │ │ │ │ │ ├── doc-efm32lg.h │ │ │ │ │ │ └── irq.yaml │ │ │ │ │ ├── efm32tg/ │ │ │ │ │ │ ├── doc-efm32tg.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ └── memorymap.h │ │ │ │ │ └── memorymap.h │ │ │ │ ├── license.dox │ │ │ │ ├── lm3s/ │ │ │ │ │ ├── doc-lm3s.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── irq.yaml │ │ │ │ │ ├── memorymap.h │ │ │ │ │ └── systemcontrol.h │ │ │ │ ├── lm4f/ │ │ │ │ │ ├── doc-lm4f.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── memorymap.h │ │ │ │ │ ├── rcc.h │ │ │ │ │ ├── systemcontrol.h │ │ │ │ │ ├── uart.h │ │ │ │ │ └── usb.h │ │ │ │ ├── lpc13xx/ │ │ │ │ │ ├── doc-lpc13xx.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── irq.yaml │ │ │ │ │ └── memorymap.h │ │ │ │ ├── lpc17xx/ │ │ │ │ │ ├── doc-lpc17xx.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── irq.yaml │ │ │ │ │ └── memorymap.h │ │ │ │ ├── lpc43xx/ │ │ │ │ │ ├── adc.h │ │ │ │ │ ├── atimer.h │ │ │ │ │ ├── ccu.h │ │ │ │ │ ├── cgu.h │ │ │ │ │ ├── creg.h │ │ │ │ │ ├── doc-lpc43xx.h │ │ │ │ │ ├── eventrouter.h │ │ │ │ │ ├── gima.h │ │ │ │ │ ├── gpdma.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── i2c.h │ │ │ │ │ ├── i2s.h │ │ │ │ │ ├── ipc.h │ │ │ │ │ ├── m0/ │ │ │ │ │ │ └── irq.yaml │ │ │ │ │ ├── m4/ │ │ │ │ │ │ └── irq.yaml │ │ │ │ │ ├── memorymap.h │ │ │ │ │ ├── rgu.h │ │ │ │ │ ├── ritimer.h │ │ │ │ │ ├── rtc.h │ │ │ │ │ ├── scu.h │ │ │ │ │ ├── sdio.h │ │ │ │ │ ├── sgpio.h │ │ │ │ │ ├── spi.h │ │ │ │ │ ├── spifi.h │ │ │ │ │ ├── ssp.h │ │ │ │ │ ├── timer.h │ │ │ │ │ ├── uart.h │ │ │ │ │ ├── usb.h │ │ │ │ │ └── wwdt.h │ │ │ │ ├── sam/ │ │ │ │ │ ├── 3n/ │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ └── memorymap.h │ │ │ │ │ ├── 3x/ │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ └── memorymap.h │ │ │ │ │ ├── eefc.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── memorymap.h │ │ │ │ │ ├── pio.h │ │ │ │ │ ├── pmc.h │ │ │ │ │ ├── pwm.h │ │ │ │ │ ├── tc.h │ │ │ │ │ ├── uart.h │ │ │ │ │ ├── usart.h │ │ │ │ │ └── wdt.h │ │ │ │ ├── stm32/ │ │ │ │ │ ├── adc.h │ │ │ │ │ ├── can.h │ │ │ │ │ ├── cec.h │ │ │ │ │ ├── common/ │ │ │ │ │ │ ├── crc_common_all.h │ │ │ │ │ │ ├── crypto_common_f24.h │ │ │ │ │ │ ├── dac_common_all.h │ │ │ │ │ │ ├── dma_common_f24.h │ │ │ │ │ │ ├── dma_common_l1f013.h │ │ │ │ │ │ ├── exti_common_all.h │ │ │ │ │ │ ├── exti_common_l1f24.h │ │ │ │ │ │ ├── flash_common_f234.h │ │ │ │ │ │ ├── flash_common_f24.h │ │ │ │ │ │ ├── gpio_common_all.h │ │ │ │ │ │ ├── gpio_common_f234.h │ │ │ │ │ │ ├── gpio_common_f24.h │ │ │ │ │ │ ├── hash_common_f24.h │ │ │ │ │ │ ├── i2c_common_all.h │ │ │ │ │ │ ├── i2c_common_f24.h │ │ │ │ │ │ ├── iwdg_common_all.h │ │ │ │ │ │ ├── pwr_common_all.h │ │ │ │ │ │ ├── rng_common_f24.h │ │ │ │ │ │ ├── rtc_common_l1f024.h │ │ │ │ │ │ ├── spi_common_all.h │ │ │ │ │ │ ├── spi_common_f124.h │ │ │ │ │ │ ├── spi_common_f24.h │ │ │ │ │ │ ├── syscfg_common_l1f234.h │ │ │ │ │ │ ├── timer_common_all.h │ │ │ │ │ │ ├── timer_common_f24.h │ │ │ │ │ │ ├── usart_common_all.h │ │ │ │ │ │ ├── usart_common_f124.h │ │ │ │ │ │ └── usart_common_f24.h │ │ │ │ │ ├── comparator.h │ │ │ │ │ ├── crc.h │ │ │ │ │ ├── crypto.h │ │ │ │ │ ├── dac.h │ │ │ │ │ ├── dbgmcu.h │ │ │ │ │ ├── desig.h │ │ │ │ │ ├── dma.h │ │ │ │ │ ├── exti.h │ │ │ │ │ ├── f0/ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── cec.h │ │ │ │ │ │ ├── comparator.h │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32f0.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── syscfg.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ ├── tsc.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── f1/ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── bkp.h │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32f1.h │ │ │ │ │ │ ├── ethernet.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── f2/ │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── crypto.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32f2.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── hash.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── rng.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── syscfg.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── f3/ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32f3.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── syscfg.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── f4/ │ │ │ │ │ │ ├── adc.h │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── crypto.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32f4.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── hash.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── rng.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── syscfg.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── flash.h │ │ │ │ │ ├── fsmc.h │ │ │ │ │ ├── gpio.h │ │ │ │ │ ├── hash.h │ │ │ │ │ ├── i2c.h │ │ │ │ │ ├── iwdg.h │ │ │ │ │ ├── l1/ │ │ │ │ │ │ ├── crc.h │ │ │ │ │ │ ├── dac.h │ │ │ │ │ │ ├── dma.h │ │ │ │ │ │ ├── doc-stm32l1.h │ │ │ │ │ │ ├── exti.h │ │ │ │ │ │ ├── flash.h │ │ │ │ │ │ ├── gpio.h │ │ │ │ │ │ ├── i2c.h │ │ │ │ │ │ ├── irq.yaml │ │ │ │ │ │ ├── iwdg.h │ │ │ │ │ │ ├── memorymap.h │ │ │ │ │ │ ├── pwr.h │ │ │ │ │ │ ├── rcc.h │ │ │ │ │ │ ├── rtc.h │ │ │ │ │ │ ├── spi.h │ │ │ │ │ │ ├── syscfg.h │ │ │ │ │ │ ├── timer.h │ │ │ │ │ │ └── usart.h │ │ │ │ │ ├── memorymap.h │ │ │ │ │ ├── otg_fs.h │ │ │ │ │ ├── otg_hs.h │ │ │ │ │ ├── pwr.h │ │ │ │ │ ├── rcc.h │ │ │ │ │ ├── rtc.h │ │ │ │ │ ├── sdio.h │ │ │ │ │ ├── spi.h │ │ │ │ │ ├── syscfg.h │ │ │ │ │ ├── timer.h │ │ │ │ │ ├── tools.h │ │ │ │ │ ├── tsc.h │ │ │ │ │ ├── usart.h │ │ │ │ │ ├── usb.h │ │ │ │ │ ├── usb_desc.h │ │ │ │ │ └── wwdg.h │ │ │ │ └── usb/ │ │ │ │ ├── cdc.h │ │ │ │ ├── dfu.h │ │ │ │ ├── doc-usb.h │ │ │ │ ├── hid.h │ │ │ │ ├── usbd.h │ │ │ │ └── usbstd.h │ │ │ └── libopencmsis/ │ │ │ ├── core_cm3.h │ │ │ └── dispatch/ │ │ │ └── irqhandlers.h │ │ ├── ld/ │ │ │ └── devices.data │ │ ├── lib/ │ │ │ ├── Makefile.include │ │ │ ├── cm3/ │ │ │ │ ├── assert.c │ │ │ │ ├── nvic.c │ │ │ │ ├── scb.c │ │ │ │ ├── sync.c │ │ │ │ ├── systick.c │ │ │ │ └── vector.c │ │ │ ├── dispatch/ │ │ │ │ └── vector_chipset.c │ │ │ ├── efm32/ │ │ │ │ ├── efm32g/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── libopencm3_efm32g.ld │ │ │ │ │ └── libopencm3_efm32g880f128.ld │ │ │ │ ├── efm32gg/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── libopencm3_efm32gg.ld │ │ │ │ │ └── libopencm3_efm32gg990f1024.ld │ │ │ │ ├── efm32lg/ │ │ │ │ │ ├── Makefile │ │ │ │ │ └── libopencm3_efm32lg.ld │ │ │ │ └── efm32tg/ │ │ │ │ ├── Makefile │ │ │ │ ├── libopencm3_efm32tg.ld │ │ │ │ └── libopencm3_efm32tg840f32.ld │ │ │ ├── linker.ld.S │ │ │ ├── lm3s/ │ │ │ │ ├── Makefile │ │ │ │ ├── gpio.c │ │ │ │ └── libopencm3_lm3s.ld │ │ │ ├── lm4f/ │ │ │ │ ├── Makefile │ │ │ │ ├── gpio.c │ │ │ │ ├── libopencm3_lm4f.ld │ │ │ │ ├── rcc.c │ │ │ │ ├── systemcontrol.c │ │ │ │ ├── uart.c │ │ │ │ └── usb_lm4f.c │ │ │ ├── lpc13xx/ │ │ │ │ ├── Makefile │ │ │ │ ├── gpio.c │ │ │ │ └── libopencm3_lpc13xx.ld │ │ │ ├── lpc17xx/ │ │ │ │ ├── Makefile │ │ │ │ ├── gpio.c │ │ │ │ └── libopencm3_lpc17xx.ld │ │ │ ├── lpc43xx/ │ │ │ │ ├── gpio.c │ │ │ │ ├── i2c.c │ │ │ │ ├── ipc.c │ │ │ │ ├── m0/ │ │ │ │ │ ├── Makefile │ │ │ │ │ └── libopencm3_lpc43xx_m0.ld │ │ │ │ ├── m4/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── libopencm3_lpc43xx.ld │ │ │ │ │ ├── libopencm3_lpc43xx_ram_only.ld │ │ │ │ │ ├── libopencm3_lpc43xx_rom_to_ram.ld │ │ │ │ │ └── vector_chipset.c │ │ │ │ ├── scu.c │ │ │ │ ├── ssp.c │ │ │ │ ├── timer.c │ │ │ │ └── uart.c │ │ │ ├── lpc43xx_m0/ │ │ │ │ ├── Makefile │ │ │ │ └── vector.c │ │ │ ├── sam/ │ │ │ │ ├── 3n/ │ │ │ │ │ ├── Makefile │ │ │ │ │ └── libopencm3_sam3n.ld │ │ │ │ ├── 3x/ │ │ │ │ │ ├── Makefile │ │ │ │ │ └── libopencm3_sam3x.ld │ │ │ │ └── common/ │ │ │ │ ├── gpio.c │ │ │ │ ├── pmc.c │ │ │ │ └── usart.c │ │ │ ├── stm32/ │ │ │ │ ├── can.c │ │ │ │ ├── common/ │ │ │ │ │ ├── crc_common_all.c │ │ │ │ │ ├── crypto_common_f24.c │ │ │ │ │ ├── dac_common_all.c │ │ │ │ │ ├── dma_common_f24.c │ │ │ │ │ ├── dma_common_l1f013.c │ │ │ │ │ ├── exti_common_all.c │ │ │ │ │ ├── flash_common_f234.c │ │ │ │ │ ├── flash_common_f24.c │ │ │ │ │ ├── gpio_common_all.c │ │ │ │ │ ├── gpio_common_f0234.c │ │ │ │ │ ├── hash_common_f24.c │ │ │ │ │ ├── i2c_common_all.c │ │ │ │ │ ├── iwdg_common_all.c │ │ │ │ │ ├── pwr_common_all.c │ │ │ │ │ ├── rtc_common_l1f024.c │ │ │ │ │ ├── spi_common_all.c │ │ │ │ │ ├── spi_common_f124.c │ │ │ │ │ ├── timer_common_all.c │ │ │ │ │ ├── timer_common_f234.c │ │ │ │ │ ├── timer_common_f24.c │ │ │ │ │ ├── usart_common_all.c │ │ │ │ │ └── usart_common_f124.c │ │ │ │ ├── desig.c │ │ │ │ ├── f0/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── adc.c │ │ │ │ │ ├── comparator.c │ │ │ │ │ ├── crc.c │ │ │ │ │ ├── dac.c │ │ │ │ │ ├── dma.c │ │ │ │ │ ├── flash.c │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── iwdg.c │ │ │ │ │ ├── libopencm3_stm32f0.ld │ │ │ │ │ ├── pwr.c │ │ │ │ │ ├── rcc.c │ │ │ │ │ ├── rtc.c │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── syscfg.c │ │ │ │ │ ├── timer.c │ │ │ │ │ └── usart.c │ │ │ │ ├── f1/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── adc.c │ │ │ │ │ ├── crc.c │ │ │ │ │ ├── dac.c │ │ │ │ │ ├── dma.c │ │ │ │ │ ├── ethernet.c │ │ │ │ │ ├── flash.c │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── iwdg.c │ │ │ │ │ ├── libopencm3_stm32f1.ld │ │ │ │ │ ├── pwr.c │ │ │ │ │ ├── rcc.c │ │ │ │ │ ├── rtc.c │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── stm32f100x4.ld │ │ │ │ │ ├── stm32f100x6.ld │ │ │ │ │ ├── stm32f100x8.ld │ │ │ │ │ ├── stm32f100xb.ld │ │ │ │ │ ├── stm32f100xc.ld │ │ │ │ │ ├── stm32f100xd.ld │ │ │ │ │ ├── stm32f100xe.ld │ │ │ │ │ ├── timer.c │ │ │ │ │ └── usart.c │ │ │ │ ├── f2/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── crc.c │ │ │ │ │ ├── dac.c │ │ │ │ │ ├── dma.c │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── iwdg.c │ │ │ │ │ ├── libopencm3_stm32f2.ld │ │ │ │ │ ├── rcc.c │ │ │ │ │ ├── rtc.c │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── timer.c │ │ │ │ │ └── usart.c │ │ │ │ ├── f3/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── adc.c │ │ │ │ │ ├── crc.c │ │ │ │ │ ├── dac.c │ │ │ │ │ ├── dma.c │ │ │ │ │ ├── flash.c │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── iwdg.c │ │ │ │ │ ├── libopencm3_stm32f3.ld │ │ │ │ │ ├── pwr.c │ │ │ │ │ ├── rcc.c │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── timer.c │ │ │ │ │ ├── usart.c │ │ │ │ │ └── vector_chipset.c │ │ │ │ ├── f4/ │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── adc.c │ │ │ │ │ ├── crc.c │ │ │ │ │ ├── crypto.c │ │ │ │ │ ├── dac.c │ │ │ │ │ ├── dma.c │ │ │ │ │ ├── gpio.c │ │ │ │ │ ├── i2c.c │ │ │ │ │ ├── iwdg.c │ │ │ │ │ ├── libopencm3_stm32f4.ld │ │ │ │ │ ├── pwr.c │ │ │ │ │ ├── rcc.c │ │ │ │ │ ├── rtc.c │ │ │ │ │ ├── spi.c │ │ │ │ │ ├── stm32f405x6.ld │ │ │ │ │ ├── timer.c │ │ │ │ │ ├── usart.c │ │ │ │ │ └── vector_chipset.c │ │ │ │ └── l1/ │ │ │ │ ├── Makefile │ │ │ │ ├── crc.c │ │ │ │ ├── dac.c │ │ │ │ ├── dma.c │ │ │ │ ├── flash.c │ │ │ │ ├── gpio.c │ │ │ │ ├── i2c.c │ │ │ │ ├── iwdg.c │ │ │ │ ├── libopencm3_stm32l1.ld │ │ │ │ ├── pwr.c │ │ │ │ ├── rcc.c │ │ │ │ ├── rtc.c │ │ │ │ ├── spi.c │ │ │ │ ├── stm32l15xx6.ld │ │ │ │ ├── stm32l15xx8.ld │ │ │ │ ├── stm32l15xxb.ld │ │ │ │ ├── stm32l15xxc.ld │ │ │ │ ├── stm32l15xxd.ld │ │ │ │ ├── timer.c │ │ │ │ └── usart.c │ │ │ └── usb/ │ │ │ ├── usb.c │ │ │ ├── usb_control.c │ │ │ ├── usb_f103.c │ │ │ ├── usb_f107.c │ │ │ ├── usb_f207.c │ │ │ ├── usb_fx07_common.c │ │ │ ├── usb_fx07_common.h │ │ │ ├── usb_private.h │ │ │ └── usb_standard.c │ │ ├── locm3.sublime-project │ │ └── scripts/ │ │ ├── black_magic_probe_debug.scr │ │ ├── black_magic_probe_flash.scr │ │ ├── checkpatch.pl │ │ ├── data/ │ │ │ └── lpc43xx/ │ │ │ ├── README │ │ │ ├── adc.csv │ │ │ ├── adc.yaml │ │ │ ├── atimer.csv │ │ │ ├── atimer.yaml │ │ │ ├── ccu.csv │ │ │ ├── ccu.yaml │ │ │ ├── cgu.csv │ │ │ ├── cgu.yaml │ │ │ ├── creg.csv │ │ │ ├── creg.yaml │ │ │ ├── csv2yaml.py │ │ │ ├── eventrouter.csv │ │ │ ├── eventrouter.yaml │ │ │ ├── gen.py │ │ │ ├── gima.csv │ │ │ ├── gima.yaml │ │ │ ├── gpdma.csv │ │ │ ├── gpdma.yaml │ │ │ ├── gpio.csv │ │ │ ├── gpio.yaml │ │ │ ├── i2c.csv │ │ │ ├── i2c.yaml │ │ │ ├── i2s.csv │ │ │ ├── i2s.yaml │ │ │ ├── rgu.csv │ │ │ ├── rgu.yaml │ │ │ ├── ritimer.csv │ │ │ ├── ritimer.yaml │ │ │ ├── rtc.csv │ │ │ ├── rtc.yaml │ │ │ ├── scu.csv │ │ │ ├── scu.yaml │ │ │ ├── sgpio.csv │ │ │ ├── sgpio.yaml │ │ │ ├── spi.csv │ │ │ ├── spi.yaml │ │ │ ├── spifi.csv │ │ │ ├── spifi.yaml │ │ │ ├── ssp.csv │ │ │ ├── ssp.yaml │ │ │ ├── usb.csv │ │ │ ├── usb.yaml │ │ │ └── yaml_odict.py │ │ ├── genlink.awk │ │ ├── irq2nvic_h │ │ └── lpcvtcksum │ ├── m0_bin.s │ └── toolchain-arm-cortex-m.cmake ├── hardware/ │ ├── README.md │ ├── fmcw2/ │ │ ├── fmcw2-cache.lib │ │ ├── fmcw2-rescue.lib │ │ ├── fmcw2.kicad_pcb │ │ ├── fmcw2.pro │ │ ├── fmcw2.sch │ │ └── libs/ │ │ └── fmcw2.lib │ └── fmcw2_mcu/ │ ├── fmcw2_mcu-cache.lib │ ├── fmcw2_mcu-rescue.lib │ ├── fmcw2_mcu.kicad_pcb │ ├── fmcw2_mcu.pro │ └── fmcw2_mcu.sch ├── host/ │ ├── CMakeLists.txt │ ├── COPYING │ ├── cmake/ │ │ ├── cmake_uninstall.cmake.in │ │ └── modules/ │ │ ├── FindLIBHACKRF.cmake │ │ ├── FindThreads.cmake │ │ └── FindUSB1.cmake │ ├── hackrf-tools/ │ │ ├── CMakeLists.txt │ │ ├── Readme.md │ │ ├── getopt/ │ │ │ ├── getopt.c │ │ │ └── getopt.h │ │ └── src/ │ │ ├── CMakeLists.txt │ │ ├── hackrf_info.c │ │ ├── hackrf_spiflash.c │ │ └── hackrf_transfer.c │ └── libhackrf/ │ ├── 53-hackrf.rules │ ├── 53-hackrf.rules.in │ ├── CMakeLists.txt │ ├── libhackrf.pc.in │ └── src/ │ ├── CMakeLists.txt │ ├── hackrf.c │ └── hackrf.h └── processing/ ├── analysis.py ├── bicycle_sar.py ├── filter.py ├── fir/ │ ├── Makefile │ ├── fir.c │ └── taps.h ├── sar_autofocus.py ├── sar_process.py └── sync_analysis.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.swp *.pyc ================================================ FILE: README.md ================================================ FMCW radar hardware, firmware and processing software. Folders: hardware: KiCad hardware design files. - fmcw2: RF board. - fmcw2_mcu: Digital board. firmware: - Firmware for LPC4320 microcontroller. Based on [HackRF](https://github.com/mossmann/hackrf) firmware. host: - Host programs for recording data, programming firmware. Also from HackRF with small modifications. processing: - fir: Resamples, filters and repackages samples for other programs. - filter.py: Output FIR filter coefficients for fir C program. - analysis.py: Various analyses about the recorded data. - sar_bicycle.py: Pre-processing of raw data. - sar_process.py: Focus raw data to SAR image. - sar_autofocus.py: Simple minimum entropy autofocusing of SAR image. SAR focusing program is loosely based on Matlab program by Gregory L. Charvat and it also includes some functions from [RITSAR](https://github.com/dm6718/RITSAR). ================================================ FILE: firmware/CMakeLists.txt ================================================ # Copyright 2012 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # # Top directory CMake project for HackRF firmware cmake_minimum_required(VERSION 2.8.9) set(CMAKE_TOOLCHAIN_FILE toolchain-arm-cortex-m.cmake) project (hackrf_firmware_all) add_subdirectory(blinky) add_subdirectory(sgpio) add_subdirectory(startup) add_subdirectory(hackrf_usb) ================================================ FILE: firmware/COPYING ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ================================================ FILE: firmware/blinky/CMakeLists.txt ================================================ # Copyright 2012 Michael Ossmann # Copyright 2012 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # cmake_minimum_required(VERSION 2.8.9) set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake) project(blinky) include(../hackrf-common.cmake) set(SRC_M4 blinky.c ) DeclareTargets() ================================================ FILE: firmware/blinky/blinky.c ================================================ /* * Copyright 2010 - 2012 Michael Ossmann * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include "hackrf_core.h" uint32_t boot0, boot1, boot2, boot3; int main(void) { int i; pin_setup(); gpio_clear(PORT_ADC_NOE, PIN_ADC_NOE); /* Enable ADC */ /* Blink LED1/2/3 on the board and Read BOOT0/1/2/3 pins. */ while (1) { boot0 = BOOT0_STATE; boot1 = BOOT1_STATE; boot2 = BOOT2_STATE; boot3 = BOOT3_STATE; gpio_set(PORT_LED1_3, PIN_LED1); /* LEDs on */ for (i = 0; i < 2000000; i++) /* Wait a bit. */ __asm__("nop"); gpio_clear(PORT_LED1_3, PIN_LED1); /* LED off */ for (i = 0; i < 2000000; i++) /* Wait a bit. */ __asm__("nop"); } return 0; } ================================================ FILE: firmware/cmake_install.cmake ================================================ # Install script for directory: /home/henrik/koodi/fmcw2/firmware/blinky # Set the install prefix if(NOT DEFINED CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "/media/sda2/media/home/Lataukset/gcc-arm-none-eabi-4_9-2015q2/arm-none-eabi") endif() string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) if(BUILD_TYPE) string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") else() set(CMAKE_INSTALL_CONFIG_NAME "") endif() message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") endif() # Set the component getting installed. if(NOT CMAKE_INSTALL_COMPONENT) if(COMPONENT) message(STATUS "Install component: \"${COMPONENT}\"") set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") else() set(CMAKE_INSTALL_COMPONENT) endif() endif() if(CMAKE_INSTALL_COMPONENT) set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") else() set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") endif() file(WRITE "/home/henrik/koodi/fmcw2/firmware/${CMAKE_INSTALL_MANIFEST}" "") foreach(file ${CMAKE_INSTALL_MANIFEST_FILES}) file(APPEND "/home/henrik/koodi/fmcw2/firmware/${CMAKE_INSTALL_MANIFEST}" "${file}\n") endforeach() ================================================ FILE: firmware/common/LPC4320_M4_memory.ld ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * * This file is part of HackRF * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ /* Linker script for HackRF One (LPC4320, 1M SPI flash, 200K SRAM). */ MEMORY { /* rom is really the shadow region that points to SPI flash or elsewhere */ rom (rx) : ORIGIN = 0x00000000, LENGTH = 96K ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 96K ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 32K ram_sleep (rwx) : ORIGIN = 0x10088000, LENGTH = 8K } INCLUDE LPC43xx_M4_memory.ld ================================================ FILE: firmware/common/LPC4330_M4_memory.ld ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * * This file is part of HackRF * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ /* Linker script for HackRF Jellybean/Jawbreaker (LPC4330, 1M SPI flash, 264K SRAM). */ MEMORY { /* rom is really the shadow region that points to SPI flash or elsewhere */ rom (rx) : ORIGIN = 0x00000000, LENGTH = 128K ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 128K ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 64K ram_sleep (rwx) : ORIGIN = 0x10090000, LENGTH = 8K } INCLUDE LPC43xx_M4_memory.ld ================================================ FILE: firmware/common/LPC43xx_M0_memory.ld ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * * This file is part of HackRF * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ MEMORY { ram (rwx) : ORIGIN = 0x00000000, LENGTH = 28K } ================================================ FILE: firmware/common/LPC43xx_M4_M0_image_from_text.ld ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * * This file is part of HackRF * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ SECTIONS { .text : { PROVIDE(__m0_start__ = .); KEEP(*(.m0_bin*)); . = ALIGN(4); PROVIDE(__m0_end__ = .); } >rom } ================================================ FILE: firmware/common/LPC43xx_M4_memory.ld ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * * This file is part of HackRF * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ MEMORY { /* Physical address in Flash used to copy Code from Flash to RAM */ rom_flash (rx) : ORIGIN = 0x80000000, LENGTH = 1M ram_m0 (rwx) : ORIGIN = 0x20000000, LENGTH = 28K ram_shared (rwx) : ORIGIN = 0x20007000, LENGTH = 4K ram_usb (rwx) : ORIGIN = 0x20008000, LENGTH = 32K /* ram_usb: USB buffer. Straddles two blocks of RAM * to get performance benefit of having two USB buffers addressable * simultaneously (on two different buses of the AHB multilayer matrix) */ } usb_bulk_buffer = ORIGIN(ram_usb); ================================================ FILE: firmware/common/bitband.c ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "bitband.h" volatile uint32_t* peripheral_bitband_address(volatile void* const address, const uint_fast8_t bit_number) { const uint32_t bit_band_base = 0x42000000; const uint32_t byte_offset = (uint32_t)address - 0x40000000; const uint32_t bit_word_offset = (byte_offset * 32) + (bit_number * 4); const uint32_t bit_word_address = bit_band_base + bit_word_offset; return (volatile uint32_t*)bit_word_address; } void peripheral_bitband_set(volatile void* const peripheral_address, const uint_fast8_t bit_number) { volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number); *bitband_address = 1; } void peripheral_bitband_clear(volatile void* const peripheral_address, const uint_fast8_t bit_number) { volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number); *bitband_address = 0; } uint32_t peripheral_bitband_get(volatile void* const peripheral_address, const uint_fast8_t bit_number) { volatile uint32_t* const bitband_address = peripheral_bitband_address(peripheral_address, bit_number); return *bitband_address; } ================================================ FILE: firmware/common/bitband.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __BITBAND_H__ #define __BITBAND_H__ #include volatile uint32_t* peripheral_bitband_address(volatile void* const address, const uint_fast8_t bit_number); void peripheral_bitband_set(volatile void* const peripheral_address, const uint_fast8_t bit_number); void peripheral_bitband_clear(volatile void* const peripheral_address, const uint_fast8_t bit_number); uint32_t peripheral_bitband_get(volatile void* const peripheral_address, const uint_fast8_t bit_number); #endif//__BITBAND_H__ ================================================ FILE: firmware/common/fault_handler.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include "fault_handler.h" typedef struct { uint32_t r0; uint32_t r1; uint32_t r2; uint32_t r3; uint32_t r12; uint32_t lr; /* Link Register. */ uint32_t pc; /* Program Counter. */ uint32_t psr;/* Program Status Register. */ } hard_fault_stack_t; __attribute__((naked)) void hard_fault_handler(void) { __asm__("TST LR, #4"); __asm__("ITE EQ"); __asm__("MRSEQ R0, MSP"); __asm__("MRSNE R0, PSP"); __asm__("B hard_fault_handler_c"); } volatile hard_fault_stack_t* hard_fault_stack_pt; __attribute__((used)) void hard_fault_handler_c(uint32_t* args) { /* hard_fault_stack_pt contains registers saved before the hard fault */ hard_fault_stack_pt = (hard_fault_stack_t*)args; // args[0-7]: r0, r1, r2, r3, r12, lr, pc, psr // Other interesting registers to examine: // CFSR: Configurable Fault Status Register // HFSR: Hard Fault Status Register // DFSR: Debug Fault Status Register // AFSR: Auxiliary Fault Status Register // MMAR: MemManage Fault Address Register // BFAR: Bus Fault Address Register /* if( SCB->HFSR & SCB_HFSR_FORCED ) { if( SCB->CFSR & SCB_CFSR_BFSR_BFARVALID ) { SCB->BFAR; if( SCB->CFSR & CSCB_CFSR_BFSR_PRECISERR ) { } } } */ while(1); } void mem_manage_handler() { while(1); } void bus_fault_handler() { while(1); } void usage_fault_handler() { while(1); } ================================================ FILE: firmware/common/fault_handler.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __FAULT_HANDLER__ #define __FAULT_HANDLER__ #include #include // TODO: Move all this to a Cortex-M(?) include file, since these // structures are supposedly the same between processors (to an // undetermined extent). typedef struct armv7m_scb_t armv7m_scb_t; struct armv7m_scb_t { volatile const uint32_t CPUID; volatile uint32_t ICSR; volatile uint32_t VTOR; volatile uint32_t AIRCR; volatile uint32_t SCR; volatile uint32_t CCR; volatile uint32_t SHPR1; volatile uint32_t SHPR2; volatile uint32_t SHPR3; volatile uint32_t SHCSR; volatile uint32_t CFSR; volatile uint32_t HFSR; volatile uint32_t DFSR; volatile uint32_t MMFAR; volatile uint32_t BFAR; volatile uint32_t AFSR; volatile const uint32_t ID_PFR0; volatile const uint32_t ID_PFR1; volatile const uint32_t ID_DFR0; volatile const uint32_t ID_AFR0; volatile const uint32_t ID_MMFR0; volatile const uint32_t ID_MMFR1; volatile const uint32_t ID_MMFR2; volatile const uint32_t ID_MMFR3; volatile const uint32_t ID_ISAR0; volatile const uint32_t ID_ISAR1; volatile const uint32_t ID_ISAR2; volatile const uint32_t ID_ISAR3; volatile const uint32_t ID_ISAR4; volatile const uint32_t __reserved_0x74_0x87[5]; volatile uint32_t CPACR; } __attribute__((packed)); static armv7m_scb_t* const SCB = (armv7m_scb_t*)SCB_BASE; #define SCB_HFSR_DEBUGEVT (1 << 31) #define SCB_HFSR_FORCED (1 << 30) #define SCB_HFSR_VECTTBL (1 << 1) #endif//__FAULT_HANDLER__ ================================================ FILE: firmware/common/gpdma.c ================================================ /* * Copyright 2013 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include void gpdma_controller_enable() { GPDMA_CONFIG |= GPDMA_CONFIG_E(1); while( (GPDMA_CONFIG & GPDMA_CONFIG_E_MASK) == 0 ); } void gpdma_channel_enable(const uint_fast8_t channel) { GPDMA_CCONFIG(channel) |= GPDMA_CCONFIG_E(1); } void gpdma_channel_disable(const uint_fast8_t channel) { GPDMA_CCONFIG(channel) &= ~GPDMA_CCONFIG_E_MASK; while( (GPDMA_ENBLDCHNS & GPDMA_ENBLDCHNS_ENABLEDCHANNELS(1 << channel)) ); } void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel) { GPDMA_INTTCCLEAR = GPDMA_INTTCCLEAR_INTTCCLEAR(1 << channel); } void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel) { GPDMA_INTERRCLR = GPDMA_INTERRCLR_INTERRCLR(1 << channel); } void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli) { lli->ccontrol |= GPDMA_CCONTROL_I(1); } void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count) { for(size_t i=0; i> 2); } } void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_count) { gpdma_lli_create_loop(lli, lli_count); lli[lli_count - 1].clli &= ~GPDMA_CLLI_LLI_MASK; } ================================================ FILE: firmware/common/gpdma.h ================================================ /* * Copyright 2013 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __GPDMA_H__ #define __GPDMA_H__ #include #include #include void gpdma_controller_enable(); void gpdma_channel_enable(const uint_fast8_t channel); void gpdma_channel_disable(const uint_fast8_t channel); void gpdma_channel_interrupt_tc_clear(const uint_fast8_t channel); void gpdma_channel_interrupt_error_clear(const uint_fast8_t channel); void gpdma_lli_enable_interrupt(gpdma_lli_t* const lli); void gpdma_lli_create_loop(gpdma_lli_t* const lli, const size_t lli_count); void gpdma_lli_create_oneshot(gpdma_lli_t* const lli, const size_t lli_count); #endif/*__GPDMA_H__*/ ================================================ FILE: firmware/common/hackrf_core.c ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "hackrf_core.h" #include "rf_path.h" #include "sgpio.h" #include #include #include #include #include #define WAIT_CPU_CLOCK_INIT_DELAY (10000) void delay(uint32_t duration) { uint32_t i; for (i = 0; i < duration; i++) __asm__("nop"); } /* clock startup for Jellybean with Lemondrop attached Configure PLL1 to max speed (204MHz). Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1. */ void cpu_clock_init(void) { /* use IRC as clock source for APB1 (including I2C0) */ CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_IRC); /* use IRC as clock source for APB3 */ CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_IRC); //FIXME disable I2C /* Kick I2C0 down to 400kHz when we switch over to APB1 clock = 204MHz */ //i2c0_init(255); /* * 12MHz clock is entering LPC XTAL1/OSC input now. On * Jellybean/Lemondrop, this is a signal from the clock generator. On * Jawbreaker, there is a 12 MHz crystal at the LPC. * Set up PLL1 to run from XTAL1 input. */ //FIXME a lot of the details here should be in a CGU driver /* set xtal oscillator to low frequency mode */ CGU_XTAL_OSC_CTRL &= ~CGU_XTAL_OSC_CTRL_HF_MASK; /* power on the oscillator and wait until stable */ CGU_XTAL_OSC_CTRL &= ~CGU_XTAL_OSC_CTRL_ENABLE_MASK; /* Wait about 100us after Crystal Power ON */ delay(WAIT_CPU_CLOCK_INIT_DELAY); /* use XTAL_OSC as clock source for BASE_M4_CLK (CPU) */ CGU_BASE_M4_CLK = (CGU_BASE_M4_CLK_CLK_SEL(CGU_SRC_XTAL) | CGU_BASE_M4_CLK_AUTOBLOCK(1)); /* use XTAL_OSC as clock source for APB1 */ CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_AUTOBLOCK(1) | CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_XTAL); /* use XTAL_OSC as clock source for APB3 */ CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_AUTOBLOCK(1) | CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_XTAL); cpu_clock_pll1_low_speed(); /* use PLL1 as clock source for BASE_M4_CLK (CPU) */ CGU_BASE_M4_CLK = (CGU_BASE_M4_CLK_CLK_SEL(CGU_SRC_PLL1) | CGU_BASE_M4_CLK_AUTOBLOCK(1)); /* use XTAL_OSC as clock source for PLL0USB */ CGU_PLL0USB_CTRL = CGU_PLL0USB_CTRL_PD(1) | CGU_PLL0USB_CTRL_AUTOBLOCK(1) | CGU_PLL0USB_CTRL_CLK_SEL(CGU_SRC_XTAL); while (CGU_PLL0USB_STAT & CGU_PLL0USB_STAT_LOCK_MASK); /* configure PLL0USB to produce 480 MHz clock from 12 MHz XTAL_OSC */ /* Values from User Manual v1.4 Table 94, for 12MHz oscillator. */ CGU_PLL0USB_MDIV = 0x06167FFA; CGU_PLL0USB_NP_DIV = 0x00302062; CGU_PLL0USB_CTRL |= (CGU_PLL0USB_CTRL_PD(1) | CGU_PLL0USB_CTRL_DIRECTI(1) | CGU_PLL0USB_CTRL_DIRECTO(1) | CGU_PLL0USB_CTRL_CLKEN(1)); /* power on PLL0USB and wait until stable */ CGU_PLL0USB_CTRL &= ~CGU_PLL0USB_CTRL_PD_MASK; while (!(CGU_PLL0USB_STAT & CGU_PLL0USB_STAT_LOCK_MASK)); /* use PLL0USB as clock source for USB0 */ CGU_BASE_USB0_CLK = CGU_BASE_USB0_CLK_AUTOBLOCK(1) | CGU_BASE_USB0_CLK_CLK_SEL(CGU_SRC_PLL0USB); /* Switch peripheral clock over to use PLL1 (204MHz) */ CGU_BASE_PERIPH_CLK = CGU_BASE_PERIPH_CLK_AUTOBLOCK(1) | CGU_BASE_PERIPH_CLK_CLK_SEL(CGU_SRC_PLL1); /* Switch APB1 clock over to use PLL1 (204MHz) */ CGU_BASE_APB1_CLK = CGU_BASE_APB1_CLK_AUTOBLOCK(1) | CGU_BASE_APB1_CLK_CLK_SEL(CGU_SRC_PLL1); /* Switch APB3 clock over to use PLL1 (204MHz) */ CGU_BASE_APB3_CLK = CGU_BASE_APB3_CLK_AUTOBLOCK(1) | CGU_BASE_APB3_CLK_CLK_SEL(CGU_SRC_PLL1); } /* Configure PLL1 to low speed (48MHz). Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1. This function shall be called after cpu_clock_init(). This function is mainly used to lower power consumption. */ void cpu_clock_pll1_low_speed(void) { uint32_t pll_reg; /* Configure PLL1 Clock (48MHz) */ /* Integer mode: FCLKOUT = M*(FCLKIN/N) FCCO = 2*P*FCLKOUT = 2*P*M*(FCLKIN/N) */ pll_reg = CGU_PLL1_CTRL; /* Clear PLL1 bits */ pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */ CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */ CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */ CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */ /* Set PLL1 up to 12MHz * 4 = 48MHz. */ pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL) | CGU_PLL1_CTRL_PSEL(0) | CGU_PLL1_CTRL_NSEL(0) | CGU_PLL1_CTRL_MSEL(3) | CGU_PLL1_CTRL_FBSEL(1) | CGU_PLL1_CTRL_DIRECT(1); CGU_PLL1_CTRL = pll_reg; /* wait until stable */ while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK)); /* Wait a delay after switch to new frequency with Direct mode */ delay(WAIT_CPU_CLOCK_INIT_DELAY); } /* Configure PLL1 (Main MCU Clock) to max speed (204MHz). Note: PLL1 clock is used by M4/M0 core, Peripheral, APB1. This function shall be called after cpu_clock_init(). */ void cpu_clock_pll1_max_speed(void) { uint32_t pll_reg; /* Configure PLL1 to Intermediate Clock (between 90 MHz and 110 MHz) */ /* Integer mode: FCLKOUT = M*(FCLKIN/N) FCCO = 2*P*FCLKOUT = 2*P*M*(FCLKIN/N) */ pll_reg = CGU_PLL1_CTRL; /* Clear PLL1 bits */ pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */ CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */ CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */ CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */ /* Set PLL1 up to 12MHz * 8 = 96MHz. */ pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL) | CGU_PLL1_CTRL_PSEL(0) | CGU_PLL1_CTRL_NSEL(0) | CGU_PLL1_CTRL_MSEL(7) | CGU_PLL1_CTRL_FBSEL(1); CGU_PLL1_CTRL = pll_reg; /* wait until stable */ while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK)); /* Wait before to switch to max speed */ delay(WAIT_CPU_CLOCK_INIT_DELAY); /* Configure PLL1 Max Speed */ /* Direct mode: FCLKOUT = FCCO = M*(FCLKIN/N) */ pll_reg = CGU_PLL1_CTRL; /* Clear PLL1 bits */ pll_reg &= ~( CGU_PLL1_CTRL_CLK_SEL_MASK | CGU_PLL1_CTRL_PD_MASK | CGU_PLL1_CTRL_FBSEL_MASK | /* CLK SEL, PowerDown , FBSEL */ CGU_PLL1_CTRL_BYPASS_MASK | /* BYPASS */ CGU_PLL1_CTRL_DIRECT_MASK | /* DIRECT */ CGU_PLL1_CTRL_PSEL_MASK | CGU_PLL1_CTRL_MSEL_MASK | CGU_PLL1_CTRL_NSEL_MASK ); /* PSEL, MSEL, NSEL- divider ratios */ /* Set PLL1 up to 12MHz * 17 = 204MHz. */ pll_reg |= CGU_PLL1_CTRL_CLK_SEL(CGU_SRC_XTAL) | CGU_PLL1_CTRL_PSEL(0) | CGU_PLL1_CTRL_NSEL(0) | CGU_PLL1_CTRL_MSEL(16) | CGU_PLL1_CTRL_FBSEL(1) | CGU_PLL1_CTRL_DIRECT(1); CGU_PLL1_CTRL = pll_reg; /* wait until stable */ while (!(CGU_PLL1_STAT & CGU_PLL1_STAT_LOCK_MASK)); } void ssp1_init(void) { /* * Raise ADF4158 CE pin to de-select the device */ gpio_clear(PORT_ADF_CE, PIN_ADF_CE); gpio_clear(PORT_ADF_LE, PIN_ADF_LE); /* Configure SSP1 Peripheral (to be moved later in SSP driver) */ scu_pinmux(SCU_SSP1_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP1_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP1_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION1)); ssp1_set_mode_16bit(); } void ssp1_set_mode_16bit(void) { /* FIXME speed up once everything is working reliably */ /* // Freq About 0.0498MHz / 49.8KHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz const uint8_t serial_clock_rate = 32; const uint8_t clock_prescale_rate = 128; */ // Freq About 4.857MHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz const uint8_t serial_clock_rate = 21; const uint8_t clock_prescale_rate = 2; ssp_init(SSP1_NUM, SSP_DATA_16BITS, SSP_FRAME_SPI, SSP_CPOL_0_CPHA_0, serial_clock_rate, clock_prescale_rate, SSP_MODE_NORMAL, SSP_MASTER, SSP_SLAVE_OUT_ENABLE); } void ssp1_set_mode_8bit(void) { /* FIXME speed up once everything is working reliably */ /* // Freq About 0.0498MHz / 49.8KHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz const uint8_t serial_clock_rate = 32; const uint8_t clock_prescale_rate = 128; */ // Freq About 4.857MHz => Freq = PCLK / (CPSDVSR * [SCR+1]) with PCLK=PLL1=204MHz const uint8_t serial_clock_rate = 21; const uint8_t clock_prescale_rate = 2; ssp_init(SSP1_NUM, SSP_DATA_8BITS, SSP_FRAME_SPI, SSP_CPOL_0_CPHA_0, serial_clock_rate, clock_prescale_rate, SSP_MODE_NORMAL, SSP_MASTER, SSP_SLAVE_OUT_ENABLE); } void pin_setup(void) { /* GPIO pinmuxes */ scu_pinmux(SCU_PINMUX_LED1, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4); scu_pinmux(SCU_ADC_NOE, SCU_GPIO_NOPULL); scu_pinmux(SCU_PA_OFF, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4); scu_pinmux(SCU_MIX_ENBL, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4); scu_pinmux(SCU_ADF_TXDATA, SCU_GPIO_NOPULL); scu_pinmux(SCU_ADF_CE, SCU_GPIO_FAST); scu_pinmux(SCU_ADF_LE, SCU_GPIO_FAST); /* Configure P2_3 as USB0_PPWR */ //scu_pinmux(SCU_OTG_USBV, SCU_CONF_FUNCTION7); /* Configure all GPIO as Input (safe state) */ GPIO0_DIR = 0; GPIO1_DIR = 0; GPIO2_DIR = 0; GPIO3_DIR = 0; GPIO4_DIR = 0; GPIO5_DIR = 0; GPIO6_DIR = 0; GPIO7_DIR = 0; rf_disable(); GPIO5_DIR |= (PIN_LED1); GPIO0_DIR |= (PIN_ADC_NOE); GPIO5_DIR |= (PIN_PA_OFF | PIN_MIX_ENBL); GPIO1_DIR |= (PIN_ADF_LE | PIN_ADF_CE | PIN_ADF_TXDATA); /* Configure SSP1 Peripheral (to be moved later in SSP driver) */ //scu_pinmux(SCU_SSP1_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP1_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP1_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION1)); //scu_pinmux(SCU_SSP1_SSEL, (SCU_SSP_IO | SCU_CONF_FUNCTION1)); sgpio_configure_pin_functions(); } ================================================ FILE: firmware/common/hackrf_core.h ================================================ /* * Copyright 2012 Michael Ossmann * Copyright 2012 Benjamin Vernoux * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __HACKRF_CORE_H #define __HACKRF_CORE_H #ifdef __cplusplus extern "C" { #endif #include #include /* hardware identification number */ #define BOARD_ID_JELLYBEAN 0 #define BOARD_ID_JAWBREAKER 1 #define BOARD_ID_HACKRF_ONE 2 #ifdef JELLYBEAN #define BOARD_ID BOARD_ID_JELLYBEAN #endif #ifdef JAWBREAKER #define BOARD_ID BOARD_ID_JAWBREAKER #endif #ifdef HACKRF_ONE #define BOARD_ID BOARD_ID_HACKRF_ONE #endif /* * SCU PinMux */ /* GPIO Output PinMux */ #define SCU_PINMUX_LED1 (P2_5) /* GPIO5[5] on P2_5 */ /* GPIO Input PinMux */ #define SCU_PINMUX_BOOT0 (P1_1) /* GPIO0[8] on P1_1 */ #define SCU_PINMUX_BOOT1 (P1_2) /* GPIO0[9] on P1_2 */ #define SCU_PINMUX_BOOT2 (P2_8) /* GPIO5[7] on P2_8 */ #define SCU_PINMUX_BOOT3 (P2_9) /* GPIO1[10] on P2_9 */ /* SSP1 Peripheral PinMux */ #define SCU_SSP1_MISO (P1_3) /* P1_3 */ #define SCU_SSP1_MOSI (P1_4) /* P1_4 */ #define SCU_SSP1_SCK (P1_19) /* P1_19 */ //#define SCU_SSP1_SSEL (P1_20) /* P1_20 */ /* SGPIO interface */ #define SCU_PINMUX_SGPIO0 (P0_0) /* D2 */ #define SCU_PINMUX_SGPIO1 (P0_1) /* D3 */ #define SCU_PINMUX_SGPIO2 (P1_15) /* D4 */ #define SCU_PINMUX_SGPIO3 (P1_16) /* D5 */ #define SCU_PINMUX_SGPIO4 (P2_0) /* D6 */ #define SCU_PINMUX_SGPIO5 (P2_1) /* D7 */ #define SCU_PINMUX_SGPIO6 (P2_2) /* D8 */ #define SCU_PINMUX_SGPIO7 (P1_0) /* D8 */ #define SCU_PINMUX_SGPIO8 (P1_12) /* CLK */ #define SCU_PINMUX_SGPIO9 (P1_13) /* CLK */ #define SCU_PINMUX_SGPIO10 (P1_14) /* D0 */ #define SCU_PINMUX_SGPIO11 (P1_17) /* D1 */ #define SCU_PINMUX_SGPIO12 (P1_18) /* NC */ #define SCU_PINMUX_SGPIO13 (P4_8) /* NC */ #define SCU_PINMUX_SGPIO14 (P1_6) /* NC */ #define SCU_PINMUX_SGPIO15 (P1_5) /* NC */ #define SCU_PINMUX_GPIO0 (P2_11) /* ADF4158 */ #define SCU_ADF_TXDATA (P1_7) /* GPIO1[0] */ #define SCU_ADF_LE (P1_8) /* GPIO1[1] */ #define SCU_ADF_CE (P1_9) /* GPIO1[2] */ /* Interfaces */ #define SCU_GPIO0 (P2_11) /* GPIO1[11] */ #define SCU_GPIO1 (P2_7) /* GPIO0[7] */ #define SCU_MCP_CS (P6_5) /* GPIO3[4] */ #define SCU_MCP_UD (P6_9) /* GPIO3[5] */ /* Control lines */ #define SCU_PA_OFF (P3_1) /* GPIO5[8] */ #define SCU_MIX_ENBL (P3_2) /* GPIO5[9] */ /* ADC */ #define SCU_ADC_NOE (P1_20) /* SPI flash */ #define SCU_SSP0_MISO (P3_6) #define SCU_SSP0_MOSI (P3_7) #define SCU_SSP0_SCK (P3_3) #define SCU_SSP0_SSEL (P3_8) /* GPIO5[11] on P3_8 */ #define SCU_FLASH_HOLD (P3_4) /* GPIO1[14] on P3_4 */ #define SCU_FLASH_WP (P3_5) /* GPIO1[15] on P3_5 */ #define SCU_OTG_USBV (P2_3) #define SCU_MCP_CS (P6_5) #define SCU_MCP_UD (P6_9) /* * GPIO Pins */ /* GPIO Output */ #define PIN_LED1 (BIT5) #define PORT_LED1_3 (GPIO5) #define PORT_PA_OFF (GPIO5) #define PIN_PA_OFF (BIT8) #define PORT_MIX_ENBL (GPIO5) #define PIN_MIX_ENBL (BIT9) #define PIN_ADF_CE (BIT2) #define PORT_ADF_CE (GPIO1) #define PIN_ADF_LE (BIT1) #define PORT_ADF_LE (GPIO1) #define PIN_ADF_TXDATA (BIT0) #define PORT_ADF_TXDATA (GPIO1) #define PORT_ADC_NOE (GPIO0) #define PIN_ADC_NOE (BIT15) #define PIN_FLASH_HOLD (BIT14) /* GPIO1[14] on P3_4 */ #define PIN_FLASH_WP (BIT15) /* GPIO1[15] on P3_5 */ #define PORT_FLASH (GPIO1) #define PIN_SSP0_SSEL (BIT11) /* GPIO5[11] on P3_8 */ #define PORT_SSP0_SSEL (GPIO5) /* GPIO Input */ #define PIN_BOOT0 (BIT8) /* GPIO0[8] on P1_1 */ #define PIN_BOOT1 (BIT9) /* GPIO0[9] on P1_2 */ #define PIN_BOOT2 (BIT7) /* GPIO5[7] on P2_8 */ #define PIN_BOOT3 (BIT10) /* GPIO1[10] on P2_9 */ /* Read GPIO Pin */ #define GPIO_STATE(port, pin) ((GPIO_PIN(port) & (pin)) == (pin)) #define BOOT0_STATE GPIO_STATE(GPIO0, PIN_BOOT0) #define BOOT1_STATE GPIO_STATE(GPIO0, PIN_BOOT1) #define BOOT2_STATE GPIO_STATE(GPIO5, PIN_BOOT2) #define BOOT3_STATE GPIO_STATE(GPIO1, PIN_BOOT3) #define MIXER_SDATA_STATE GPIO_STATE(PORT_MIXER_SDATA, PIN_MIXER_SDATA) #define CPLD_TDO_STATE GPIO_STATE(PORT_CPLD_TDO, PIN_CPLD_TDO) typedef enum { TRANSCEIVER_MODE_OFF = 0, TRANSCEIVER_MODE_RX = 1, TRANSCEIVER_MODE_TX = 2 } transceiver_mode_t; void delay(uint32_t duration); void cpu_clock_init(void); void cpu_clock_pll1_low_speed(void); void cpu_clock_pll1_max_speed(void); void ssp1_init(void); void ssp1_set_mode_16bit(void); void ssp1_set_mode_8bit(void); void pin_setup(void); #ifdef HACKRF_ONE void enable_rf_power(void); void disable_rf_power(void); #endif #ifdef __cplusplus } #endif #endif /* __HACKRF_CORE_H */ ================================================ FILE: firmware/common/m0_bin.s.cmake ================================================ # Copyright 2013 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. .data .section .m0_bin, "ax" .incbin "${PROJECT_NAME}_m0.bin" ================================================ FILE: firmware/common/m0_sleep.c ================================================ /* * Copyright 2013 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ int main() { while(1) { } } ================================================ FILE: firmware/common/mcp4022.c ================================================ #include #include #include "hackrf_core.h" #include "mcp4022.h" static uint8_t mcp_val; #define MCP_PORT GPIO3 #define PIN_CS BIT4 #define PIN_UD BIT5 /* Signals are inverted in hardware */ #define CS_LOW() gpio_set(MCP_PORT, PIN_CS) #define CS_HIGH() gpio_clear(MCP_PORT, PIN_CS) #define UD_LOW() gpio_set(MCP_PORT, PIN_UD) #define UD_HIGH() gpio_clear(MCP_PORT, PIN_UD) static void wait_us(uint32_t wait); static void mcp_inc(uint8_t val); static void mcp_dec(uint8_t val); /* CS low time: 5us * UD toggle frequency: 1 MHz * UD low/high time: 500ns */ void mcp_init(void) { /* P6_5(GPIO3[4]) = MCP_CS * P6_9(GPIO3[5]) = MCP_UD */ /* Configure the pinmux */ scu_pinmux(SCU_MCP_CS, SCU_GPIO_NOPULL); scu_pinmux(SCU_MCP_UD, SCU_GPIO_NOPULL); CS_HIGH(); UD_HIGH(); /* Configures the pins as outputs */ GPIO3_DIR |= (BIT4 | BIT5); mcp_val = 32; } static void wait_us(uint32_t wait) { /* Assumes clock frequency of 204 MHz */ uint32_t i, j; for (i = 0; i < wait; i++) { for (j = 0; j < 1020; j++) { __asm__("nop"); } } } static void mcp_inc(uint8_t val) { int i; UD_HIGH(); /* Set increment mode */ CS_LOW(); /* Enable serial */ wait_us(5); /* Wait for device */ for (i=0;i MCP_MAX_VALUE) { val = MCP_MAX_VALUE; } int8_t diff = val-mcp_val; if (diff > 0) { mcp_inc(diff); } else if (diff < 0) { mcp_dec(diff); } mcp_val = val; } ================================================ FILE: firmware/common/mcp4022.h ================================================ #ifndef _MCP4022_H #define _MCP4022_H #define MCP_MAX_VALUE 63 void mcp_init(void); void mcp_set(uint8_t val); #endif ================================================ FILE: firmware/common/rf_path.c ================================================ #include #include #include #include "hackrf_core.h" void enable_pa(void) { gpio_set(PORT_PA_OFF, PIN_PA_OFF); } void disable_pa(void) { gpio_clear(PORT_PA_OFF, PIN_PA_OFF); } void enable_mixer(void) { gpio_set(PORT_MIX_ENBL, PIN_MIX_ENBL); } void disable_mixer(void) { gpio_clear(PORT_MIX_ENBL, PIN_MIX_ENBL); } void disable_adc(void) { gpio_set(PORT_ADC_NOE, PIN_ADC_NOE); } void enable_adc(void) { gpio_clear(PORT_ADC_NOE, PIN_ADC_NOE); } void enable_adf4158(void) { gpio_set(PORT_ADF_CE, PIN_ADF_CE); } void disable_adf4158(void) { gpio_clear(PORT_ADF_CE, PIN_ADF_CE); } void rf_disable(void) { gpio_clear(PORT_ADF_TXDATA, PIN_ADF_TXDATA); disable_pa(); disable_mixer(); disable_adc(); disable_adf4158(); } void rf_enable(void) { enable_adf4158(); enable_adc(); enable_pa(); enable_mixer(); } void adf4158_write_register(uint32_t data) { uint16_t transfer[2] = {data >> 16, data & 0x0000FFFF}; gpio_clear(PORT_ADF_LE, PIN_ADF_LE); ssp_transfer(SSP1_NUM, transfer[0]); ssp_transfer(SSP1_NUM, transfer[1]); gpio_set(PORT_ADF_LE, PIN_ADF_LE); } uint32_t adf4158_read_register(void) { uint32_t read = 0; gpio_set(PORT_ADF_LE, PIN_ADF_LE); read = (uint32_t)((uint16_t)ssp_transfer(SSP1_NUM, 0xFFFF) << 16); read |= (uint16_t)ssp_transfer(SSP1_NUM, 0xFFFF); gpio_set(PORT_ADF_LE, PIN_ADF_LE); return read; } ================================================ FILE: firmware/common/rf_path.h ================================================ #ifndef _RF_PATH_H #define _RF_PATH_H void enable_adc(void); void disable_adc(void); void enable_pa(void); void disable_pa(void); void enable_mixer(void); void disable_mixer(void); void enable_adf4158(void); void disable_adf4158(void); void rf_disable(void); void rf_enable(void); void adf4158_write_register(uint32_t data); uint32_t adf4158_read_register(void); #endif ================================================ FILE: firmware/common/rom_iap.c ================================================ /* * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "hackrf_core.h" #include #include "rom_iap.h" #include "w25q80bv.h" #define ROM_IAP_ADDR (0x10400100) #define ROM_IAP_UNDEF_ADDR (0x12345678) #define ROM_OTP_PART_ID_ADDR (0x40045000) typedef void (* IAP_t)(uint32_t [],uint32_t[]); typedef struct { const IAP_t IAP; /* If equal to 0x12345678 IAP not implemented */ /* Other TBD */ } *pENTRY_ROM_API_t; #define pROM_API ((pENTRY_ROM_API_t)ROM_IAP_ADDR) /* See Errata sheet ES_LPC43X0_A.pdf (LPC4350/30/20/10 Rev A) 3.5 IAP.1: In-Application Programming API not present on flashless parts Introduction: The LPC43x0 microcontrollers contain an APIfor In-Application Programming of flash memory. This API also allows identification of the part. Problem: On the LPC43x0 microcontrollers, the IAP API is not present. The ISP interface is present which allows the part to be identified externally (via the UART) but part identification is not possible internally using the IAP call because it is not implemented. The first word of the Part ID can be read directly from OTP at 0x40045000. The second word of the Part ID is always '0' on flashless parts. */ bool iap_is_implemented(void) { bool res; if( *((uint32_t*)ROM_IAP_ADDR) != ROM_IAP_UNDEF_ADDR ) { res = true; }else { res = false; } return res; } isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res) { uint32_t* p_u32_data; if( iap_is_implemented() ) { pROM_API->IAP( (uint32_t*)&iap_cmd_res->cmd_param, (uint32_t*)&iap_cmd_res->status_res); }else { /* Alternative way to retrieve Part Id on MCU with no IAP Read Serial No => Read Unique ID in SPIFI (only compatible with W25Q80BV */ w25q80bv_setup(); switch(iap_cmd_res->cmd_param.command_code) { case IAP_CMD_READ_PART_ID_NO: p_u32_data = (uint32_t*)ROM_OTP_PART_ID_ADDR; iap_cmd_res->status_res.iap_result[0] = p_u32_data[0]; iap_cmd_res->status_res.iap_result[1] = p_u32_data[1]; iap_cmd_res->status_res.status_ret = CMD_SUCCESS; break; case IAP_CMD_READ_SERIAL_NO: /* Only 64bits used */ iap_cmd_res->status_res.iap_result[0] = 0; iap_cmd_res->status_res.iap_result[1] = 0; w25q80bv_get_unique_id( (w25q80bv_unique_id_t*)&iap_cmd_res->status_res.iap_result[2] ); iap_cmd_res->status_res.status_ret = CMD_SUCCESS; break; default: iap_cmd_res->status_res.status_ret = ERROR_IAP_NOT_IMPLEMENTED; break; } } return iap_cmd_res->status_res.status_ret; } ================================================ FILE: firmware/common/rom_iap.h ================================================ /* * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __ROM_IAP__ #define __ROM_IAP__ #include typedef enum { /* TODO define other commands */ IAP_CMD_INIT_IAP = 49, /* Command Init IAP Input Command code: 49 (decimal) Return Code CMD_SUCCESS Result None Description Initializes and prepares the flash for erase and write operations. Stack usage 88 B */ IAP_CMD_READ_PART_ID_NO = 54, /* Read part identification number Command Read part identification number Input Command code: 54 (decimal) Parameters:None Return Code CMD_SUCCESS | Result Result0:Part Identification Number. Result1:Part Identification Number. Description This command is used to read the part identification number. See Table 1082 LPC43xx part identification numbers. The command returns two words: word0 followed by word1. Word 0 corresponds to the part id and word1 indicates the flash configuration or contains 0x0 for flashless parts. Stack usage 8 B */ IAP_CMD_READ_SERIAL_NO = 58 /* Read device serial number Input Command code: 58 (decimal) Parameters: None Return Code CMD_SUCCESS Result Result0:First 32-bit word of Device Identification Number (at the lowest address) Result1:Second 32-bit word of Device Identification Number Result2:Third 32-bit word of Device Identification Number Result3:Fourth 32-bit word of Device Identification Number Description This command is used to read the device identification number. The serial number may be used to uniquely identify a single unit among all LPC43xx devices. Stack usage 8 B */ } iap_cmd_code_t; /* ISP/IAP Return Code */ typedef enum { CMD_SUCCESS = 0x00000000, /* CMD_SUCCESS Command is executed successfully. Sent by ISP handler only when command given by the host has been completely and successfully executed. */ INVALID_COMMAND = 0x00000001, /* Invalid command. */ SRC_ADDR_ERROR = 0x00000002, /* Source address is not on word boundary. */ DST_ADDR_ERROR = 0x00000003, /* Destination address not on word or 256 byte boundary. */ SRC_ADDR_NOT_MAPPED = 0x00000004, /* Source address is not mapped in the memory map. Count value is taken into consideration where applicable. */ DST_ADDR_NOT_MAPPED = 0x00000005, /* Destination address is not mapped in the memory map. Count value is taken into consideration where applicable.*/ COUNT_ERROR = 0x00000006, /* Byte count is not multiple of 4 or is not a permitted value. */ INVALID_SECTOR = 0x00000007, /* Sector number is invalid or end sector number is greater than start sector number. */ SECTOR_NOT_BLANK = 0x00000008, /* Sector is not blank. */ SECTOR_NOT_PREP_WRITE_OP = 0x00000009, /* Command to prepare sector for write operation was not executed. */ COMPARE_ERROR = 0x0000000A, /* Source and destination data not equal. */ BUSY = 0x0000000B, /* Flash programming hardware interface is busy. */ PARAM_ERROR = 0x0000000C, /* Insufficient number of parameters or invalid parameter. */ ADDR_ERROR = 0x0000000D, /* Address is not on word boundary. */ ADDR_NOT_MAPPED = 0x0000000E, /* Address is not mapped in the memory map. Count value is taken in to consideration where applicable. */ CMD_LOCKED = 0x0000000F, /* Command is locked. */ INVALID_CODE = 0x00000010, /* Unlock code is invalid. */ INVALID_BAUD_RATE = 0x00000011, /* Invalid baud rate setting. */ INVALID_STOP_BIT = 0x00000012, /* Invalid stop bit setting. */ CODE_READ_PROTECTION_ENABLED = 0x00000013, /* Code read protection enabled. */ INVALID_FLASH_UNIT = 0x00000014, /* Invalid flash unit. */ USER_CODE_CHECKSUM = 0x00000015, ERROR_SETTING_ACTIVE_PARTITION = 0x00000016, /* Special Error */ ERROR_IAP_NOT_IMPLEMENTED = 0x00000100 /* IAP is not implemented in this part */ } isp_iap_ret_code_t; typedef struct { /* Input Command/Param */ struct { iap_cmd_code_t command_code; uint32_t iap_param[5]; } cmd_param; /* Output Status/Result */ struct { isp_iap_ret_code_t status_ret; uint32_t iap_result[4]; } status_res; } iap_cmd_res_t; /* Check if IAP is implemented */ bool iap_is_implemented(void); isp_iap_ret_code_t iap_cmd_call(iap_cmd_res_t* iap_cmd_res); #endif//__ROM_IAP__ ================================================ FILE: firmware/common/sgpio.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include static bool sgpio_slice_mode_multislice = true; void sgpio_configure_pin_functions() { scu_pinmux(SCU_PINMUX_SGPIO0, SCU_GPIO_FAST | SCU_CONF_FUNCTION3); scu_pinmux(SCU_PINMUX_SGPIO1, SCU_GPIO_FAST | SCU_CONF_FUNCTION3); scu_pinmux(SCU_PINMUX_SGPIO2, SCU_GPIO_FAST | SCU_CONF_FUNCTION2); scu_pinmux(SCU_PINMUX_SGPIO3, SCU_GPIO_FAST | SCU_CONF_FUNCTION2); scu_pinmux(SCU_PINMUX_SGPIO4, SCU_GPIO_FAST | SCU_CONF_FUNCTION0); scu_pinmux(SCU_PINMUX_SGPIO5, SCU_GPIO_FAST | SCU_CONF_FUNCTION0); scu_pinmux(SCU_PINMUX_SGPIO6, SCU_GPIO_FAST | SCU_CONF_FUNCTION0); scu_pinmux(SCU_PINMUX_SGPIO7, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); scu_pinmux(SCU_PINMUX_SGPIO8, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); scu_pinmux(SCU_PINMUX_SGPIO9, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); scu_pinmux(SCU_PINMUX_SGPIO10, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); scu_pinmux(SCU_PINMUX_SGPIO11, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); /* scu_pinmux(SCU_PINMUX_SGPIO12, SCU_GPIO_FAST | SCU_CONF_FUNCTION0); scu_pinmux(SCU_PINMUX_SGPIO13, SCU_GPIO_FAST | SCU_CONF_FUNCTION4); */ // Same as SCU_GPIO_FAST, but pullup is enabled scu_pinmux(SCU_PINMUX_SGPIO14, (SCU_CONF_EHS_FAST | SCU_CONF_EZI_EN_IN_BUFFER | SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) | SCU_CONF_FUNCTION6); /* scu_pinmux(SCU_PINMUX_SGPIO15, SCU_GPIO_FAST | SCU_CONF_FUNCTION6); */ //GPIO_DIR(GPIO0) |= GPIOPIN13; //GPIO_DIR(GPIO5) |= GPIOPIN14 | GPIOPIN13 | GPIOPIN12; } void sgpio_test_interface() { const uint_fast8_t out_pin = 9; // Output SGPIO_GPIO_OENREG = 0; // All inputs for the moment. // Disable all counters during configuration SGPIO_CTRL_ENABLE = 0; // Make all SGPIO controlled by SGPIO's "GPIO" registers for (uint_fast8_t i = 0; i < 16; i++) { SGPIO_OUT_MUX_CFG(i) = SGPIO_OUT_MUX_CFG_P_OE_CFG(0) | SGPIO_OUT_MUX_CFG_P_OUT_CFG(4); } // Set SGPIO output values. SGPIO_GPIO_OUTREG = (1L << out_pin); // Enable SGPIO pin outputs. SGPIO_GPIO_OENREG = (1L << out_pin); while (1) { SGPIO_GPIO_OUTREG ^= (1L << out_pin); } } void sgpio_set_slice_mode( const bool multi_slice ) { sgpio_slice_mode_multislice = multi_slice; } /* SGPIO0 to 7 = DAC/ADC data bits 0 to 7 (Nota: DAC is 10bits but only bit9 to bit2 are used bit1 & 0 are forced to 0 by CPLD) ADC=> CLK x 2=CLKx2 with CLKx2(0)rising=D0Q, CLKx2(1)rising=D1I (corresponds to CLK(0)falling+tD0Q=>D0Q, CLK(1)rising+tDOI=>D1I, CLK(1)falling+tD0Q=>D1Q, CLK(1)rising+tDOI=>D2I ...) tDOI(CLK Rise to I-ADC Channel-I Output Data Valid)=7.4 to 9ns, tD0Q(CLK Fall to Q-ADC Channel-Q Output Data Valid)=6.9 to 9ns DAC=> CLK x 2=CLKx2 with CLKx2(0)rising=Q:N-2, CLKx2(1)rising=I:N-1(corresponds to CLK(0)rising=>Q:N-2, CLK(0)falling I:N-1, CLK(1)rising=>Q:N-1, CLK(1)falling I:N ...) tDSI(I-DAC Data to CLK Fall Setup Time)=min 10ns, tDSQ(Q-DAC Data to CLK Rise Setup Time)=min 10ns SGPIO8 Clock Input (External Clock) */ void sgpio_configure(void) { // Disable all counters during configuration SGPIO_CTRL_ENABLE = 0; // Set SGPIO output values. const sgpio_direction_t direction = SGPIO_DIRECTION_RX; SGPIO_GPIO_OUTREG = (1L << 9) // SGPIO9 clock out ; // Enable SGPIO pin outputs. const uint_fast16_t sgpio_gpio_data_direction = (0x00 << 0); SGPIO_GPIO_OENREG = (0L << 14) // GPDMA burst request SGPIO14 active | (0L << 11) // direction output SGPIO11 active | (0L << 10) // disable output SGPIO10 active | (1L << 9) // Clock output SGPIO9 | (0L << 8) // clock input SGPIO8 (output i is tri-stated) | sgpio_gpio_data_direction // 0xFF=Output all SGPIO High(TX mode), 0x00=Output all SPGIO Low(RX mode) ; SGPIO_OUT_MUX_CFG( 8) = // SGPIO8: Input: clock SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */ | SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */ ; SGPIO_OUT_MUX_CFG( 9) = // SGPIO9: Clock output SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */ | SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */ ; SGPIO_OUT_MUX_CFG( 14) = // SGPIO14: ADF4158 MUXOUT input SGPIO_OUT_MUX_CFG_P_OE_CFG(0) /* 0x0 gpio_oe (state set by GPIO_OEREG) */ | SGPIO_OUT_MUX_CFG_P_OUT_CFG(0) /* 0x0 dout_doutm1 (1-bit mode) */ ; const uint_fast8_t output_multiplexing_mode = sgpio_slice_mode_multislice ? 11 : 9; /* SGPIO0 to SGPIO7 */ for(uint_fast8_t i=0; i<8; i++) { // SGPIO pin 0 outputs slice A bit "i". SGPIO_OUT_MUX_CFG(i) = SGPIO_OUT_MUX_CFG_P_OE_CFG(0) | SGPIO_OUT_MUX_CFG_P_OUT_CFG(output_multiplexing_mode) /* 11/0xB=dout_doutm8c (8-bit mode 8c)(multislice L0/7, N0/7), 9=dout_doutm8a (8-bit mode 8a)(A0/7,B0/7) */ ; } const uint_fast8_t slice_indices[] = { SGPIO_SLICE_A, SGPIO_SLICE_I, SGPIO_SLICE_E, SGPIO_SLICE_J, SGPIO_SLICE_C, SGPIO_SLICE_K, SGPIO_SLICE_F, SGPIO_SLICE_L, }; const uint_fast8_t slice_gpdma = SGPIO_SLICE_H; const uint_fast8_t pos = sgpio_slice_mode_multislice ? 0x1f : 0x03; const bool single_slice = !sgpio_slice_mode_multislice; const uint_fast8_t slice_count = sgpio_slice_mode_multislice ? 8 : 1; const uint_fast8_t clk_capture_mode = (direction == SGPIO_DIRECTION_TX) ? 0 : 1; uint32_t slice_enable_mask = 0; /* Configure Slice A, I, E, J, C, K, F, L (sgpio_slice_mode_multislice mode) */ for(uint_fast8_t i=0; i out SGPIO_REG_SS(slice_gpdma) = 0x11111111; // Shadow output data register, LSB -> out1 slice_enable_mask |= (1 << slice_gpdma); } // 10.2 MHz sgpio_configure_clock(0x09, 0x5555); // SGPIO14 SGPIO_MUX_CFG(SGPIO_SLICE_H) = SGPIO_MUX_CFG_CONCAT_ORDER(0) | SGPIO_MUX_CFG_CONCAT_ENABLE(0) | SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */ | SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */ | SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */ | SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */ | SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */ | SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */ ; SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_H) = SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */ | SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */ | SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */ | SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */ | SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */ | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */ | SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */ ; SGPIO_PRESET(SGPIO_SLICE_H) = 0x00; SGPIO_COUNT(SGPIO_SLICE_H) = 0x00; SGPIO_POS(SGPIO_SLICE_H) = SGPIO_POS_POS_RESET(0x1f) | SGPIO_POS_POS(0x1f) ; SGPIO_REG(SGPIO_SLICE_H) = 0; // Primary output data register, LSB -> out SGPIO_REG_SS(SGPIO_SLICE_H) = 0; // Shadow output data register, LSB -> out1 slice_enable_mask |= (1 << SGPIO_SLICE_H); // SGPIO10/SLICE G/D0 SGPIO_MUX_CFG(SGPIO_SLICE_G) = SGPIO_MUX_CFG_CONCAT_ORDER(0) | SGPIO_MUX_CFG_CONCAT_ENABLE(0) | SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */ | SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */ | SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */ | SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */ | SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */ | SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */ ; SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_G) = SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */ | SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */ | SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */ | SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */ | SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */ | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */ | SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */ ; SGPIO_PRESET(SGPIO_SLICE_G) = 0x00; SGPIO_COUNT(SGPIO_SLICE_G) = 0x00; SGPIO_POS(SGPIO_SLICE_G) = SGPIO_POS_POS_RESET(0x1f) | SGPIO_POS_POS(0x1f) ; SGPIO_REG(SGPIO_SLICE_G) = 0; // Primary output data register, LSB -> out SGPIO_REG_SS(SGPIO_SLICE_G) = 0; // Shadow output data register, LSB -> out1 slice_enable_mask |= (1 << SGPIO_SLICE_G); // SGPIO11/SLICE N/D1 SGPIO_MUX_CFG(SGPIO_SLICE_N) = SGPIO_MUX_CFG_CONCAT_ORDER(0) | SGPIO_MUX_CFG_CONCAT_ENABLE(0) | SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */ | SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(1) /* Select qualifier pin SGPIO9(0x1) */ | SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */ | SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */ | SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */ | SGPIO_MUX_CFG_EXT_CLK_ENABLE(1) /* External clock signal(pin) selected */ ; SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_N) = SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */ | SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */ | SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */ | SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */ | SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(1) /* 0x1=Use external clock from a pin or other slice */ | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */ | SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */ ; SGPIO_PRESET(SGPIO_SLICE_N) = 0x00; SGPIO_COUNT(SGPIO_SLICE_N) = 0x00; SGPIO_POS(SGPIO_SLICE_N) = SGPIO_POS_POS_RESET(0x1f) | SGPIO_POS_POS(0x1f) ; SGPIO_REG(SGPIO_SLICE_N) = 0; // Primary output data register, LSB -> out SGPIO_REG_SS(SGPIO_SLICE_N) = 0; // Shadow output data register, LSB -> out1 slice_enable_mask |= (1 << SGPIO_SLICE_N); // Start SGPIO operation by enabling slice clocks. SGPIO_CTRL_ENABLE = slice_enable_mask; } void sgpio_configure_clock(uint16_t preset, uint16_t reg) { // reg = Output data register, 0xAAAA or 0x5555 recommended // preset = clock divider value // Output clock = 204 MHz /((Preset+1)*2) // Set SGPIO9(M) as output clock SGPIO_MUX_CFG(SGPIO_SLICE_M) = SGPIO_MUX_CFG_CONCAT_ORDER(0) | SGPIO_MUX_CFG_CONCAT_ENABLE(1) | SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(0) /* Select qualifier slice A(0x0) */ | SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(0) /* Select qualifier pin SGPIO8(0x0) */ | SGPIO_MUX_CFG_QUALIFIER_MODE(0) /* Enable */ | SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(0) /* Select clock source slice D(0x0) */ | SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(0) /* Source Clock Pin 0x0 = SGPIO8 */ | SGPIO_MUX_CFG_EXT_CLK_ENABLE(0) /* External clock signal(pin) selected */ ; SGPIO_SLICE_MUX_CFG(SGPIO_SLICE_M) = SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(0) /* 0x0=Use normal qualifier. */ | SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(0) /* 0x0=Shift 1 bit per clock. */ | SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(0) /* 0x0=Detect rising edge. (Condition for input bit match interrupt) */ | SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(0) /* 0x0=Normal clock. */ | SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(0) /* 0x0=Use counter clock */ | SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(0) /* 0x0=Use rising clock edge, 0x1=Use falling clock edge */ | SGPIO_SLICE_MUX_CFG_MATCH_MODE(0) /* 0x0=Do not match data */ ; SGPIO_PRESET(SGPIO_SLICE_M) = preset; SGPIO_COUNT(SGPIO_SLICE_M) = 0x00; SGPIO_POS(SGPIO_SLICE_M) = SGPIO_POS_POS_RESET(0x1f) | SGPIO_POS_POS(0x1f) ; uint32_t reg32 = (reg<<16)|reg; SGPIO_REG(SGPIO_SLICE_M) = reg32; // Primary output data register, LSB -> out SGPIO_REG_SS(SGPIO_SLICE_M) = reg32; // Shadow output data register, LSB -> out1 } ================================================ FILE: firmware/common/sgpio.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __SGPIO_H__ #define __SGPIO_H__ #include typedef enum { SGPIO_DIRECTION_RX, SGPIO_DIRECTION_TX, } sgpio_direction_t; void sgpio_configure_pin_functions(); void sgpio_test_interface(); void sgpio_set_slice_mode( const bool multi_slice ); void sgpio_configure(void); void sgpio_configure_clock(uint16_t preset, uint16_t reg); #endif//__SGPIO_H__ ================================================ FILE: firmware/common/streaming.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include void baseband_streaming_enable() { nvic_set_priority(NVIC_SGPIO_IRQ, 0); nvic_enable_irq(NVIC_SGPIO_IRQ); SGPIO_SET_EN_1 = (1 << SGPIO_SLICE_A); SGPIO_CTRL_ENABLE |= (1 << SGPIO_SLICE_M); } void baseband_streaming_disable() { SGPIO_CTRL_ENABLE &= ~(1 << SGPIO_SLICE_M); nvic_disable_irq(NVIC_SGPIO_IRQ); } ================================================ FILE: firmware/common/streaming.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __STREAMING_H__ #define __STREAMING_H__ void baseband_streaming_enable(); void baseband_streaming_disable(); #endif/*__STREAMING_H__*/ ================================================ FILE: firmware/common/usb.c ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include "usb.h" #include "usb_type.h" #include "usb_queue.h" #include "usb_standard_request.h" #include #include #include #include usb_device_t* usb_device_usb0 = 0; usb_queue_head_t usb_qh[12] ATTR_ALIGNED(2048); #define USB_QH_INDEX(endpoint_address) (((endpoint_address & 0xF) * 2) + ((endpoint_address >> 7) & 1)) usb_queue_head_t* usb_queue_head( const uint_fast8_t endpoint_address ) { return &usb_qh[USB_QH_INDEX(endpoint_address)]; } static usb_endpoint_t* usb_endpoint_from_address( const uint_fast8_t endpoint_address ) { return (usb_endpoint_t*)usb_queue_head(endpoint_address)->_reserved_0; } static uint_fast8_t usb_endpoint_address( const usb_transfer_direction_t direction, const uint_fast8_t number ) { return ((direction == USB_TRANSFER_DIRECTION_IN) ? 0x80 : 0x00) + number; } static bool usb_endpoint_is_in(const uint_fast8_t endpoint_address) { return (endpoint_address & 0x80) ? true : false; } static uint_fast8_t usb_endpoint_number(const uint_fast8_t endpoint_address) { return (endpoint_address & 0xF); } void usb_peripheral_reset() { RESET_CTRL0 = RESET_CTRL0_USB0_RST; RESET_CTRL0 = 0; while( (RESET_ACTIVE_STATUS0 & RESET_CTRL0_USB0_RST) == 0 ); } static void usb_phy_enable() { CREG_CREG0 &= ~CREG_CREG0_USB0PHY; } static void usb_clear_pending_interrupts(const uint32_t mask) { USB0_ENDPTNAK = mask; USB0_ENDPTNAKEN = mask; USB0_USBSTS_D = mask; USB0_ENDPTSETUPSTAT = USB0_ENDPTSETUPSTAT & mask; USB0_ENDPTCOMPLETE = USB0_ENDPTCOMPLETE & mask; } static void usb_clear_all_pending_interrupts() { usb_clear_pending_interrupts(0xFFFFFFFF); } static void usb_wait_for_endpoint_priming_to_finish(const uint32_t mask) { // Wait until controller has parsed new transfer descriptors and prepared // receive buffers. while( USB0_ENDPTPRIME & mask ); } static void usb_flush_endpoints(const uint32_t mask) { // Clear any primed buffers. If a packet is in progress, that transfer // will continue until completion. USB0_ENDPTFLUSH = mask; } static void usb_wait_for_endpoint_flushing_to_finish(const uint32_t mask) { // Wait until controller has flushed all endpoints / cleared any primed // buffers. while( USB0_ENDPTFLUSH & mask ); } static void usb_flush_primed_endpoints(const uint32_t mask) { usb_wait_for_endpoint_priming_to_finish(mask); usb_flush_endpoints(mask); usb_wait_for_endpoint_flushing_to_finish(mask); } static void usb_flush_all_primed_endpoints() { usb_flush_primed_endpoints(0xFFFFFFFF); } static void usb_endpoint_set_type( const usb_endpoint_t* const endpoint, const usb_transfer_type_t transfer_type ) { // NOTE: UM10503 section 23.6.24 "Endpoint 1 to 5 control registers" says // that the disabled side of an endpoint must be set to a non-control type // (e.g. bulk, interrupt, or iso). const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); USB0_ENDPTCTRL(endpoint_number) = ( USB0_ENDPTCTRL(endpoint_number) & ~(USB0_ENDPTCTRL_TXT1_0_MASK | USB0_ENDPTCTRL_RXT_MASK) ) | ( USB0_ENDPTCTRL_TXT1_0(transfer_type) | USB0_ENDPTCTRL_RXT(transfer_type) ); } static void usb_endpoint_enable( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_TXE | USB0_ENDPTCTRL_TXR); } else { USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_RXE | USB0_ENDPTCTRL_RXR); } } static void usb_endpoint_clear_pending_interrupts( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { usb_clear_pending_interrupts(USB0_ENDPTCOMPLETE_ETCE(1 << endpoint_number)); } else { usb_clear_pending_interrupts(USB0_ENDPTCOMPLETE_ERCE(1 << endpoint_number)); } } void usb_endpoint_disable( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { USB0_ENDPTCTRL(endpoint_number) &= ~(USB0_ENDPTCTRL_TXE); } else { USB0_ENDPTCTRL(endpoint_number) &= ~(USB0_ENDPTCTRL_RXE); } usb_queue_flush_endpoint(endpoint); usb_endpoint_clear_pending_interrupts(endpoint); usb_endpoint_flush(endpoint); } void usb_endpoint_prime( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const first_td ) { usb_queue_head_t* const qh = usb_queue_head(endpoint->address); qh->next_dtd_pointer = first_td; qh->total_bytes &= ~( USB_TD_DTD_TOKEN_STATUS_ACTIVE | USB_TD_DTD_TOKEN_STATUS_HALTED ) ; const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { USB0_ENDPTPRIME = USB0_ENDPTPRIME_PETB(1 << endpoint_number); } else { USB0_ENDPTPRIME = USB0_ENDPTPRIME_PERB(1 << endpoint_number); } } static bool usb_endpoint_is_priming( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { return USB0_ENDPTPRIME & USB0_ENDPTPRIME_PETB(1 << endpoint_number); } else { return USB0_ENDPTPRIME & USB0_ENDPTPRIME_PERB(1 << endpoint_number); } } // Schedule an already filled-in transfer descriptor for execution on // the given endpoint, waiting until the endpoint has finished. void usb_endpoint_schedule_wait( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const td ) { // Ensure that endpoint is ready to be primed. // It may have been flushed due to an aborted transaction. // TODO: This should be preceded by a flush? while( usb_endpoint_is_ready(endpoint) ); td->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE; usb_endpoint_prime(endpoint, td); } // Schedule an already filled-in transfer descriptor for execution on // the given endpoint, appending to the end of the endpoint's queue if // there are pending TDs. Note that this requires that one knows the // tail of the endpoint's TD queue. Moreover, the user is responsible // for setting the TERMINATE bit of next_dtd_pointer if needed. void usb_endpoint_schedule_append( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const tail_td, usb_transfer_descriptor_t* const new_td ) { bool done; tail_td->next_dtd_pointer = new_td; if (usb_endpoint_is_priming(endpoint)) { return; } do { USB0_USBCMD_D |= USB0_USBCMD_D_ATDTW; done = usb_endpoint_is_ready(endpoint); } while (!(USB0_USBCMD_D & USB0_USBCMD_D_ATDTW)); USB0_USBCMD_D &= ~USB0_USBCMD_D_ATDTW; if(!done) { usb_endpoint_prime(endpoint, new_td); } } void usb_endpoint_flush( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); usb_queue_flush_endpoint(endpoint); if( usb_endpoint_is_in(endpoint->address) ) { usb_flush_primed_endpoints(USB0_ENDPTFLUSH_FETB(1 << endpoint_number)); } else { usb_flush_primed_endpoints(USB0_ENDPTFLUSH_FERB(1 << endpoint_number)); } } /* static bool usb_endpoint_is_flushing( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { return USB0_ENDPTFLUSH & USB0_ENDPTFLUSH_FETB(1 << endpoint_number); } else { return USB0_ENDPTFLUSH & USB0_ENDPTFLUSH_FERB(1 << endpoint_number); } } */ bool usb_endpoint_is_ready( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { return USB0_ENDPTSTAT & USB0_ENDPTSTAT_ETBR(1 << endpoint_number); } else { return USB0_ENDPTSTAT & USB0_ENDPTSTAT_ERBR(1 << endpoint_number); } } bool usb_endpoint_is_complete( const usb_endpoint_t* const endpoint ) { const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); if( usb_endpoint_is_in(endpoint->address) ) { return USB0_ENDPTCOMPLETE & USB0_ENDPTCOMPLETE_ETCE(1 << endpoint_number); } else { return USB0_ENDPTCOMPLETE & USB0_ENDPTCOMPLETE_ERCE(1 << endpoint_number); } } void usb_endpoint_stall( const usb_endpoint_t* const endpoint ) { // Endpoint is to be stalled as a pair -- both OUT and IN. // See UM10503 section 23.10.5.2 "Stalling" const uint_fast8_t endpoint_number = usb_endpoint_number(endpoint->address); USB0_ENDPTCTRL(endpoint_number) |= (USB0_ENDPTCTRL_RXS | USB0_ENDPTCTRL_TXS); // TODO: Also need to reset data toggle in both directions? } static void usb_controller_run() { USB0_USBCMD_D |= USB0_USBCMD_D_RS; } static void usb_controller_stop() { USB0_USBCMD_D &= ~USB0_USBCMD_D_RS; } static uint_fast8_t usb_controller_is_resetting() { return (USB0_USBCMD_D & USB0_USBCMD_D_RST) != 0; } static void usb_controller_set_device_mode() { // Set USB0 peripheral mode USB0_USBMODE_D = USB0_USBMODE_D_CM1_0(2); // Set device-related OTG flags // OTG termination: controls pull-down on USB_DM // VBUS_Discharge: VBUS discharges through resistor USB0_OTGSC = USB0_OTGSC_OT | USB0_OTGSC_VD | USB0_OTGSC_VC; } usb_speed_t usb_speed( const usb_device_t* const device ) { if( device == usb_device_usb0 ) { switch( USB0_PORTSC1_D & USB0_PORTSC1_D_PSPD_MASK ) { case USB0_PORTSC1_D_PSPD(0): return USB_SPEED_FULL; case USB0_PORTSC1_D_PSPD(2): return USB_SPEED_HIGH; default: // TODO: What to do/return here? Is this even possible? return USB_SPEED_FULL; } } else { // TODO: This should not be possible with a more class-like // implementation. return USB_SPEED_FULL; } } static void usb_clear_status(const uint32_t status) { USB0_USBSTS_D = status; } static uint32_t usb_get_status() { // Mask status flags with enabled flag interrupts. const uint32_t status = USB0_USBSTS_D & USB0_USBINTR_D; // Clear flags that were just read, leaving alone any flags that // were just set (after the read). It's important to read and // reset flags atomically! :-) usb_clear_status(status); return status; } static void usb_clear_endpoint_setup_status(const uint32_t endpoint_setup_status) { USB0_ENDPTSETUPSTAT = endpoint_setup_status; } static uint32_t usb_get_endpoint_setup_status() { return USB0_ENDPTSETUPSTAT; } static void usb_clear_endpoint_complete(const uint32_t endpoint_complete) { USB0_ENDPTCOMPLETE = endpoint_complete; } static uint32_t usb_get_endpoint_complete() { return USB0_ENDPTCOMPLETE; } static void usb_disable_all_endpoints() { // Endpoint 0 is always enabled. TODO: So why set ENDPTCTRL0? USB0_ENDPTCTRL0 &= ~(USB0_ENDPTCTRL0_RXE | USB0_ENDPTCTRL0_TXE); USB0_ENDPTCTRL1 &= ~(USB0_ENDPTCTRL1_RXE | USB0_ENDPTCTRL1_TXE); USB0_ENDPTCTRL2 &= ~(USB0_ENDPTCTRL2_RXE | USB0_ENDPTCTRL2_TXE); USB0_ENDPTCTRL3 &= ~(USB0_ENDPTCTRL3_RXE | USB0_ENDPTCTRL3_TXE); USB0_ENDPTCTRL4 &= ~(USB0_ENDPTCTRL4_RXE | USB0_ENDPTCTRL4_TXE); USB0_ENDPTCTRL5 &= ~(USB0_ENDPTCTRL5_RXE | USB0_ENDPTCTRL5_TXE); } void usb_set_address_immediate( const usb_device_t* const device, const uint_fast8_t address ) { if( device == usb_device_usb0 ) { USB0_DEVICEADDR = USB0_DEVICEADDR_USBADR(address); } } void usb_set_address_deferred( const usb_device_t* const device, const uint_fast8_t address ) { if( device == usb_device_usb0 ) { USB0_DEVICEADDR = USB0_DEVICEADDR_USBADR(address) | USB0_DEVICEADDR_USBADRA ; } } static void usb_reset_all_endpoints() { usb_disable_all_endpoints(); usb_clear_all_pending_interrupts(); usb_flush_all_primed_endpoints(); } static void usb_controller_reset() { // TODO: Good to disable some USB interrupts to avoid priming new // new endpoints before the controller is reset? usb_reset_all_endpoints(); usb_controller_stop(); // Reset controller. Resets internal pipelines, timers, counters, state // machines to initial values. Not recommended when device is in attached // state -- effect on attached host is undefined. Detach first by flushing // all primed endpoints and stopping controller. USB0_USBCMD_D = USB0_USBCMD_D_RST; while( usb_controller_is_resetting() ); } static void usb_bus_reset(usb_device_t* const device) { // According to UM10503 v1.4 section 23.10.3 "Bus reset": usb_reset_all_endpoints(); usb_set_address_immediate(device, 0); usb_set_configuration(device, 0); // TODO: Enable endpoint 0, which might not actually be necessary, // as the datasheet claims it can't be disabled. //wait_ms(3); // //if( USB0_PORTSC1 & USB0_PORTSC1_PR ) { // // Port still is in the reset state. //} else { // usb_hardware_reset(); //} } static void usb_interrupt_enable( usb_device_t* const device ) { if( device == usb_device_usb0 ) { nvic_enable_irq(NVIC_USB0_IRQ); } } void usb_device_init( const uint_fast8_t device_ordinal, usb_device_t* const device ) { if( device_ordinal == 0 ) { usb_device_usb0 = device; usb_phy_enable(); usb_controller_reset(); usb_controller_set_device_mode(); // Set interrupt threshold interval to 0 USB0_USBCMD_D &= ~USB0_USBCMD_D_ITC_MASK; // Configure endpoint list address USB0_ENDPOINTLISTADDR = (uint32_t)usb_qh; // Enable interrupts USB0_USBINTR_D = USB0_USBINTR_D_UE | USB0_USBINTR_D_UEE | USB0_USBINTR_D_PCE | USB0_USBINTR_D_URE //| USB0_USBINTR_D_SRE | USB0_USBINTR_D_SLE //| USB0_USBINTR_D_NAKE ; } } void usb_run( usb_device_t* const device ) { usb_interrupt_enable(device); usb_controller_run(device); } static void copy_setup(usb_setup_t* const dst, const volatile uint8_t* const src) { dst->request_type = src[0]; dst->request = src[1]; dst->value_l = src[2]; dst->value_h = src[3]; dst->index_l = src[4]; dst->index_h = src[5]; dst->length_l = src[6]; dst->length_h = src[7]; } void usb_endpoint_init( const usb_endpoint_t* const endpoint ) { usb_endpoint_flush(endpoint); uint_fast16_t max_packet_size = endpoint->device->descriptor[7]; usb_transfer_type_t transfer_type = USB_TRANSFER_TYPE_CONTROL; const uint8_t* const endpoint_descriptor = usb_endpoint_descriptor(endpoint); if( endpoint_descriptor ) { max_packet_size = usb_endpoint_descriptor_max_packet_size(endpoint_descriptor); transfer_type = usb_endpoint_descriptor_transfer_type(endpoint_descriptor); } // TODO: There are more capabilities to adjust based on the endpoint // descriptor. usb_queue_head_t* const qh = usb_queue_head(endpoint->address); qh->capabilities = USB_QH_CAPABILITIES_MULT(0) | USB_QH_CAPABILITIES_ZLT | USB_QH_CAPABILITIES_MPL(max_packet_size) | ((transfer_type == USB_TRANSFER_TYPE_CONTROL) ? USB_QH_CAPABILITIES_IOS : 0) ; qh->current_dtd_pointer = 0; qh->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE; qh->total_bytes = USB_TD_DTD_TOKEN_TOTAL_BYTES(0) | USB_TD_DTD_TOKEN_MULTO(0) ; qh->buffer_pointer_page[0] = 0; qh->buffer_pointer_page[1] = 0; qh->buffer_pointer_page[2] = 0; qh->buffer_pointer_page[3] = 0; qh->buffer_pointer_page[4] = 0; // This is how we look up an endpoint structure from an endpoint address: qh->_reserved_0 = (uint32_t)endpoint; // TODO: Should NAK be enabled? I'm kinda squishy on this... //USB0_ENDPTNAKEN |= // USB0_ENDPTNAKEN_EPRNE(1 << endpoint_out->number); usb_endpoint_set_type(endpoint, transfer_type); usb_endpoint_enable(endpoint); } static void usb_check_for_setup_events() { const uint32_t endptsetupstat = usb_get_endpoint_setup_status(); if( endptsetupstat ) { for( uint_fast8_t i=0; i<6; i++ ) { const uint32_t endptsetupstat_bit = USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT(1 << i); if( endptsetupstat & endptsetupstat_bit ) { usb_endpoint_t* const endpoint = usb_endpoint_from_address( usb_endpoint_address(USB_TRANSFER_DIRECTION_OUT, i) ); if( endpoint && endpoint->setup_complete ) { copy_setup(&endpoint->setup, usb_queue_head(endpoint->address)->setup); // TODO: Clean up this duplicated effort by providing // a cleaner way to get the SETUP data. copy_setup(&endpoint->in->setup, usb_queue_head(endpoint->address)->setup); usb_clear_endpoint_setup_status(endptsetupstat_bit); endpoint->setup_complete(endpoint); } else { usb_clear_endpoint_setup_status(endptsetupstat_bit); } } } } } static void usb_check_for_transfer_events() { const uint32_t endptcomplete = usb_get_endpoint_complete(); if( endptcomplete ) { for( uint_fast8_t i=0; i<6; i++ ) { const uint32_t endptcomplete_out_bit = USB0_ENDPTCOMPLETE_ERCE(1 << i); if( endptcomplete & endptcomplete_out_bit ) { usb_clear_endpoint_complete(endptcomplete_out_bit); usb_endpoint_t* const endpoint = usb_endpoint_from_address( usb_endpoint_address(USB_TRANSFER_DIRECTION_OUT, i) ); if( endpoint && endpoint->transfer_complete ) { endpoint->transfer_complete(endpoint); } } const uint32_t endptcomplete_in_bit = USB0_ENDPTCOMPLETE_ETCE(1 << i); if( endptcomplete & endptcomplete_in_bit ) { usb_clear_endpoint_complete(endptcomplete_in_bit); usb_endpoint_t* const endpoint = usb_endpoint_from_address( usb_endpoint_address(USB_TRANSFER_DIRECTION_IN, i) ); if( endpoint && endpoint->transfer_complete ) { endpoint->transfer_complete(endpoint); } } } } } void usb0_isr() { const uint32_t status = usb_get_status(); if( status == 0 ) { // Nothing to do. return; } if( status & USB0_USBSTS_D_UI ) { // USB: // - Completed transaction transfer descriptor has IOC set. // - Short packet detected. // - SETUP packet received. usb_check_for_setup_events(); usb_check_for_transfer_events(); // TODO: Reset ignored ENDPTSETUPSTAT and ENDPTCOMPLETE flags? } if( status & USB0_USBSTS_D_SRI ) { // Start Of Frame received. } if( status & USB0_USBSTS_D_PCI ) { // Port change detect: // Port controller entered full- or high-speed operational state. } if( status & USB0_USBSTS_D_SLI ) { // Device controller suspend. } if( status & USB0_USBSTS_D_URI ) { // USB reset received. usb_bus_reset(usb_device_usb0); } if( status & USB0_USBSTS_D_UEI ) { // USB error: // Completion of a USB transaction resulted in an error condition. // Set along with USBINT if the TD on which the error interrupt // occurred also had its interrupt on complete (IOC) bit set. // The device controller detects resume signalling only. } if( status & USB0_USBSTS_D_NAKI ) { // Both the TX/RX endpoint NAK bit and corresponding TX/RX endpoint // NAK enable bit are set. } } ================================================ FILE: firmware/common/usb.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_H__ #define __USB_H__ // TODO: Refactor to support high performance operations without having to // expose usb_transfer_descriptor_t. Or usb_endpoint_prime(). Or, or, or... #include #include "usb_type.h" void usb_peripheral_reset(); void usb_device_init( const uint_fast8_t device_ordinal, usb_device_t* const device ); void usb_run( usb_device_t* const device ); void usb_run_tasks( const usb_device_t* const device ); usb_speed_t usb_speed( const usb_device_t* const device ); void usb_set_address_immediate( const usb_device_t* const device, const uint_fast8_t address ); void usb_set_address_deferred( const usb_device_t* const device, const uint_fast8_t address ); void usb_endpoint_init( const usb_endpoint_t* const endpoint ); void usb_endpoint_stall( const usb_endpoint_t* const endpoint ); void usb_endpoint_disable( const usb_endpoint_t* const endpoint ); void usb_endpoint_flush( const usb_endpoint_t* const endpoint ); bool usb_endpoint_is_ready( const usb_endpoint_t* const endpoint ); void usb_endpoint_prime( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const first_td ); void usb_endpoint_schedule_wait( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const td ); void usb_endpoint_schedule_append( const usb_endpoint_t* const endpoint, usb_transfer_descriptor_t* const tail_td, usb_transfer_descriptor_t* const new_td ); #endif//__USB_H__ ================================================ FILE: firmware/common/usb_queue.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Ben Gamari * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include "usb.h" #include "usb_queue.h" usb_queue_t* endpoint_queues[12] = {}; #define USB_ENDPOINT_INDEX(endpoint_address) (((endpoint_address & 0xF) * 2) + ((endpoint_address >> 7) & 1)) static usb_queue_t* endpoint_queue( const usb_endpoint_t* const endpoint ) { uint32_t index = USB_ENDPOINT_INDEX(endpoint->address); if (endpoint_queues[index] == NULL) while (1); return endpoint_queues[index]; } void usb_queue_init( usb_queue_t* const queue ) { uint32_t index = USB_ENDPOINT_INDEX(queue->endpoint->address); if (endpoint_queues[index] != NULL) while (1); endpoint_queues[index] = queue; usb_transfer_t* t = queue->free_transfers; for (unsigned int i=0; i < queue->pool_size - 1; i++, t++) { t->next = t+1; t->queue = queue; } t->next = NULL; t->queue = queue; } /* Allocate a transfer */ static usb_transfer_t* allocate_transfer( usb_queue_t* const queue ) { bool aborted; usb_transfer_t* transfer; if (queue->free_transfers == NULL) return NULL; do { transfer = (void *) __ldrex((uint32_t *) &queue->free_transfers); aborted = __strex((uint32_t) transfer->next, (uint32_t *) &queue->free_transfers); } while (aborted); transfer->next = NULL; return transfer; } /* Place a transfer in the free list */ static void free_transfer(usb_transfer_t* const transfer) { usb_queue_t* const queue = transfer->queue; bool aborted; do { transfer->next = (void *) __ldrex((uint32_t *) &queue->free_transfers); aborted = __strex((uint32_t) transfer, (uint32_t *) &queue->free_transfers); } while (aborted); } /* Add a transfer to the end of an endpoint's queue. Returns the old * tail or NULL is the queue was empty */ static usb_transfer_t* endpoint_queue_transfer( usb_transfer_t* const transfer ) { usb_queue_t* const queue = transfer->queue; transfer->next = NULL; if (queue->active != NULL) { usb_transfer_t* t = queue->active; while (t->next != NULL) t = t->next; t->next = transfer; return t; } else { queue->active = transfer; return NULL; } } static void usb_queue_flush_queue(usb_queue_t* const queue) { cm_disable_interrupts(); while (queue->active) { usb_transfer_t* transfer = queue->active; queue->active = transfer->next; free_transfer(transfer); } cm_enable_interrupts(); } void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint) { usb_queue_flush_queue(endpoint_queue(endpoint)); } int usb_transfer_schedule( const usb_endpoint_t* const endpoint, void* const data, const uint32_t maximum_length, const transfer_completion_cb completion_cb, void* const user_data ) { usb_queue_t* const queue = endpoint_queue(endpoint); usb_transfer_t* const transfer = allocate_transfer(queue); if (transfer == NULL) return -1; usb_transfer_descriptor_t* const td = &transfer->td; // Configure the transfer descriptor td->next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE; td->total_bytes = USB_TD_DTD_TOKEN_TOTAL_BYTES(maximum_length) | USB_TD_DTD_TOKEN_IOC | USB_TD_DTD_TOKEN_MULTO(0) | USB_TD_DTD_TOKEN_STATUS_ACTIVE ; td->buffer_pointer_page[0] = (uint32_t)data; td->buffer_pointer_page[1] = ((uint32_t)data + 0x1000) & 0xfffff000; td->buffer_pointer_page[2] = ((uint32_t)data + 0x2000) & 0xfffff000; td->buffer_pointer_page[3] = ((uint32_t)data + 0x3000) & 0xfffff000; td->buffer_pointer_page[4] = ((uint32_t)data + 0x4000) & 0xfffff000; // Fill in transfer fields transfer->maximum_length = maximum_length; transfer->completion_cb = completion_cb; transfer->user_data = user_data; cm_disable_interrupts(); usb_transfer_t* tail = endpoint_queue_transfer(transfer); if (tail == NULL) { // The queue is currently empty, we need to re-prime usb_endpoint_schedule_wait(queue->endpoint, &transfer->td); } else { // The queue is currently running, try to append usb_endpoint_schedule_append(queue->endpoint, &tail->td, &transfer->td); } cm_enable_interrupts(); return 0; } int usb_transfer_schedule_block( const usb_endpoint_t* const endpoint, void* const data, const uint32_t maximum_length, const transfer_completion_cb completion_cb, void* const user_data ) { int ret; do { ret = usb_transfer_schedule(endpoint, data, maximum_length, completion_cb, user_data); } while (ret == -1); return 0; } int usb_transfer_schedule_ack( const usb_endpoint_t* const endpoint ) { return usb_transfer_schedule_block(endpoint, 0, 0, NULL, NULL); } /* Called when an endpoint might have completed a transfer */ void usb_queue_transfer_complete(usb_endpoint_t* const endpoint) { usb_queue_t* const queue = endpoint_queue(endpoint); if (queue == NULL) while(1); // Uh oh usb_transfer_t* transfer = queue->active; while (transfer != NULL) { uint8_t status = transfer->td.total_bytes; // Check for failures if ( status & USB_TD_DTD_TOKEN_STATUS_HALTED || status & USB_TD_DTD_TOKEN_STATUS_BUFFER_ERROR || status & USB_TD_DTD_TOKEN_STATUS_TRANSACTION_ERROR) { // TODO: Uh oh, do something useful here while (1); } // Still not finished if (status & USB_TD_DTD_TOKEN_STATUS_ACTIVE) break; // Advance the head. We need to do this before invoking the completion // callback as it might attempt to schedule a new transfer queue->active = transfer->next; usb_transfer_t* next = transfer->next; // Invoke completion callback unsigned int total_bytes = (transfer->td.total_bytes & USB_TD_DTD_TOKEN_TOTAL_BYTES_MASK) >> USB_TD_DTD_TOKEN_TOTAL_BYTES_SHIFT; unsigned int transferred = transfer->maximum_length - total_bytes; if (transfer->completion_cb) transfer->completion_cb(transfer->user_data, transferred); // Advance head and free transfer free_transfer(transfer); transfer = next; } } ================================================ FILE: firmware/common/usb_queue.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Ben Gamari * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_QUEUE_H__ #define __USB_QUEUE_H__ #include #include "usb_type.h" typedef struct _usb_transfer_t usb_transfer_t; typedef struct _usb_queue_t usb_queue_t; typedef void (*transfer_completion_cb)(void*, unsigned int); // This is an opaque datatype. Thou shall not touch these members. struct _usb_transfer_t { struct _usb_transfer_t* next; usb_transfer_descriptor_t td ATTR_ALIGNED(64); unsigned int maximum_length; struct _usb_queue_t* queue; transfer_completion_cb completion_cb; void* user_data; }; // This is an opaque datatype. Thou shall not touch these members. struct _usb_queue_t { struct usb_endpoint_t* endpoint; const unsigned int pool_size; usb_transfer_t* volatile free_transfers; usb_transfer_t* volatile active; }; #define USB_DECLARE_QUEUE(endpoint_name) \ struct _usb_queue_t endpoint_name##_queue; #define USB_DEFINE_QUEUE(endpoint_name, _pool_size) \ struct _usb_transfer_t endpoint_name##_transfers[_pool_size]; \ struct _usb_queue_t endpoint_name##_queue = { \ .endpoint = &endpoint_name, \ .free_transfers = endpoint_name##_transfers, \ .pool_size = _pool_size \ }; void usb_queue_flush_endpoint(const usb_endpoint_t* const endpoint); int usb_transfer_schedule( const usb_endpoint_t* const endpoint, void* const data, const uint32_t maximum_length, const transfer_completion_cb completion_cb, void* const user_data ); int usb_transfer_schedule_block( const usb_endpoint_t* const endpoint, void* const data, const uint32_t maximum_length, const transfer_completion_cb completion_cb, void* const user_data ); int usb_transfer_schedule_ack( const usb_endpoint_t* const endpoint ); void usb_queue_init( usb_queue_t* const queue ); void usb_queue_transfer_complete( usb_endpoint_t* const endpoint ); #endif//__USB_QUEUE_H__ ================================================ FILE: firmware/common/usb_request.c ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb.h" #include "usb_request.h" #include "usb_queue.h" #include static void usb_request( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { usb_request_status_t status = USB_REQUEST_STATUS_STALL; usb_request_handler_fn handler = 0; switch( endpoint->setup.request_type & USB_SETUP_REQUEST_TYPE_mask ) { case USB_SETUP_REQUEST_TYPE_STANDARD: handler = usb_request_handlers.standard; break; case USB_SETUP_REQUEST_TYPE_CLASS: handler = usb_request_handlers.class; break; case USB_SETUP_REQUEST_TYPE_VENDOR: handler = usb_request_handlers.vendor; break; case USB_SETUP_REQUEST_TYPE_RESERVED: handler = usb_request_handlers.reserved; break; } if( handler ) { status = handler(endpoint, stage); } if( status != USB_REQUEST_STATUS_OK ) { // USB 2.0 section 9.2.7 "Request Error" usb_endpoint_stall(endpoint); } } void usb_setup_complete( usb_endpoint_t* const endpoint ) { usb_request(endpoint, USB_TRANSFER_STAGE_SETUP); } void usb_control_out_complete( usb_endpoint_t* const endpoint ) { const bool device_to_host = endpoint->setup.request_type >> USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift; if( device_to_host ) { usb_request(endpoint, USB_TRANSFER_STAGE_STATUS); } else { usb_request(endpoint, USB_TRANSFER_STAGE_DATA); } usb_queue_transfer_complete(endpoint); } void usb_control_in_complete( usb_endpoint_t* const endpoint ) { const bool device_to_host = endpoint->setup.request_type >> USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift; if( device_to_host ) { usb_request(endpoint, USB_TRANSFER_STAGE_DATA); } else { usb_request(endpoint, USB_TRANSFER_STAGE_STATUS); } usb_queue_transfer_complete(endpoint); } ================================================ FILE: firmware/common/usb_request.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_REQUEST_H__ #define __USB_REQUEST_H__ #include "usb_type.h" typedef enum { USB_RESPONSE_NONE, USB_RESPONSE_IN, USB_RESPONSE_OUT, USB_RESPONSE_STALL, } usb_endpoint_type_t; typedef enum { USB_TRANSFER_STAGE_SETUP, USB_TRANSFER_STAGE_DATA, USB_TRANSFER_STAGE_STATUS, } usb_transfer_stage_t; typedef enum { USB_REQUEST_STATUS_OK = 0, USB_REQUEST_STATUS_STALL = 1, } usb_request_status_t; typedef usb_request_status_t (*usb_request_handler_fn)( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); typedef struct { usb_request_handler_fn standard; usb_request_handler_fn class; usb_request_handler_fn vendor; usb_request_handler_fn reserved; } usb_request_handlers_t; extern const usb_request_handlers_t usb_request_handlers; void usb_setup_complete( usb_endpoint_t* const endpoint ); void usb_control_in_complete( usb_endpoint_t* const endpoint ); void usb_control_out_complete( usb_endpoint_t* const endpoint ); #endif//__USB_REQUEST_H__ ================================================ FILE: firmware/common/usb_standard_request.c ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include "usb_standard_request.h" #include "usb.h" #include "usb_type.h" #include "usb_queue.h" const uint8_t* usb_endpoint_descriptor( const usb_endpoint_t* const endpoint ) { const usb_configuration_t* const configuration = endpoint->device->configuration; if( configuration ) { const uint8_t* descriptor = configuration->descriptor; while( descriptor[0] != 0 ) { if( descriptor[1] == USB_DESCRIPTOR_TYPE_ENDPOINT ) { if( descriptor[2] == endpoint->address ) { return descriptor; } } descriptor += descriptor[0]; } } return 0; } uint_fast16_t usb_endpoint_descriptor_max_packet_size( const uint8_t* const endpoint_descriptor ) { return (endpoint_descriptor[5] << 8) | endpoint_descriptor[4]; } usb_transfer_type_t usb_endpoint_descriptor_transfer_type( const uint8_t* const endpoint_descriptor ) { return (endpoint_descriptor[3] & 0x3); } void (*usb_configuration_changed_cb)(usb_device_t* const) = NULL; void usb_set_configuration_changed_cb( void (*callback)(usb_device_t* const) ) { usb_configuration_changed_cb = callback; } bool usb_set_configuration( usb_device_t* const device, const uint_fast8_t configuration_number ) { const usb_configuration_t* new_configuration = 0; if( configuration_number != 0 ) { // Locate requested configuration. if( device->configurations ) { usb_configuration_t** configurations = *(device->configurations); uint32_t i = 0; const usb_speed_t usb_speed_current = usb_speed(device); while( configurations[i] ) { if( (configurations[i]->speed == usb_speed_current) && (configurations[i]->number == configuration_number) ) { new_configuration = configurations[i]; break; } i++; } } // Requested configuration not found: request error. if( new_configuration == 0 ) { return false; } } if( new_configuration != device->configuration ) { // Configuration changed. device->configuration = new_configuration; } if (usb_configuration_changed_cb) usb_configuration_changed_cb(device); return true; } static usb_request_status_t usb_send_descriptor( usb_endpoint_t* const endpoint, const uint8_t* const descriptor_data ) { const uint32_t setup_length = endpoint->setup.length; uint32_t descriptor_length = descriptor_data[0]; if( descriptor_data[1] == USB_DESCRIPTOR_TYPE_CONFIGURATION ) { descriptor_length = (descriptor_data[3] << 8) | descriptor_data[2]; } // We cast the const away but this shouldn't be a problem as this is a write transfer usb_transfer_schedule_block( endpoint->in, (uint8_t* const) descriptor_data, (setup_length > descriptor_length) ? descriptor_length : setup_length, NULL, NULL ); usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } static usb_request_status_t usb_send_descriptor_string( usb_endpoint_t* const endpoint ) { uint_fast8_t index = endpoint->setup.value_l; for( uint_fast8_t i=0; endpoint->device->descriptor_strings[i] != 0; i++ ) { if( i == index ) { return usb_send_descriptor(endpoint, endpoint->device->descriptor_strings[i]); } } return USB_REQUEST_STATUS_STALL; } static usb_request_status_t usb_send_descriptor_config( usb_endpoint_t* const endpoint, usb_speed_t speed, const uint8_t config_num ) { usb_configuration_t** config = *(endpoint->device->configurations); unsigned int i = 0; for( ; *config != NULL; config++ ) { if( (*config)->speed == speed) { if (i == config_num) { return usb_send_descriptor(endpoint, (*config)->descriptor); } else { i++; } } } return USB_REQUEST_STATUS_STALL; } static usb_request_status_t usb_standard_request_get_descriptor_setup( usb_endpoint_t* const endpoint ) { switch( endpoint->setup.value_h ) { case USB_DESCRIPTOR_TYPE_DEVICE: return usb_send_descriptor(endpoint, endpoint->device->descriptor); case USB_DESCRIPTOR_TYPE_CONFIGURATION: // TODO: Duplicated code. Refactor. if( usb_speed(endpoint->device) == USB_SPEED_HIGH ) { return usb_send_descriptor_config(endpoint, USB_SPEED_HIGH, endpoint->setup.value_l); } else { return usb_send_descriptor_config(endpoint, USB_SPEED_FULL, endpoint->setup.value_l); } case USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER: return usb_send_descriptor(endpoint, endpoint->device->qualifier_descriptor); case USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION: // TODO: Duplicated code. Refactor. if( usb_speed(endpoint->device) == USB_SPEED_HIGH ) { return usb_send_descriptor_config(endpoint, USB_SPEED_FULL, endpoint->setup.value_l); } else { return usb_send_descriptor_config(endpoint, USB_SPEED_HIGH, endpoint->setup.value_l); } case USB_DESCRIPTOR_TYPE_STRING: return usb_send_descriptor_string(endpoint); case USB_DESCRIPTOR_TYPE_INTERFACE: case USB_DESCRIPTOR_TYPE_ENDPOINT: default: return USB_REQUEST_STATUS_STALL; } } static usb_request_status_t usb_standard_request_get_descriptor( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { switch( stage ) { case USB_TRANSFER_STAGE_SETUP: return usb_standard_request_get_descriptor_setup(endpoint); case USB_TRANSFER_STAGE_DATA: case USB_TRANSFER_STAGE_STATUS: return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } /*********************************************************************/ static usb_request_status_t usb_standard_request_set_address_setup( usb_endpoint_t* const endpoint ) { usb_set_address_deferred(endpoint->device, endpoint->setup.value_l); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } static usb_request_status_t usb_standard_request_set_address( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { switch( stage ) { case USB_TRANSFER_STAGE_SETUP: return usb_standard_request_set_address_setup(endpoint); case USB_TRANSFER_STAGE_DATA: case USB_TRANSFER_STAGE_STATUS: /* NOTE: Not necessary to set address here, as DEVICEADR.USBADRA bit * will cause controller to automatically perform set address * operation on IN ACK. */ return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } /*********************************************************************/ static usb_request_status_t usb_standard_request_set_configuration_setup( usb_endpoint_t* const endpoint ) { const uint8_t usb_configuration = endpoint->setup.value_l; if( usb_set_configuration(endpoint->device, usb_configuration) ) { if( usb_configuration == 0 ) { // TODO: Should this be done immediately? usb_set_address_immediate(endpoint->device, 0); } usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } else { return USB_REQUEST_STATUS_STALL; } } static usb_request_status_t usb_standard_request_set_configuration( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { switch( stage ) { case USB_TRANSFER_STAGE_SETUP: return usb_standard_request_set_configuration_setup(endpoint); case USB_TRANSFER_STAGE_DATA: case USB_TRANSFER_STAGE_STATUS: return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } /*********************************************************************/ static usb_request_status_t usb_standard_request_get_configuration_setup( usb_endpoint_t* const endpoint ) { if( endpoint->setup.length == 1 ) { endpoint->buffer[0] = 0; if( endpoint->device->configuration ) { endpoint->buffer[0] = endpoint->device->configuration->number; } usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } else { return USB_REQUEST_STATUS_STALL; } } static usb_request_status_t usb_standard_request_get_configuration( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { switch( stage ) { case USB_TRANSFER_STAGE_SETUP: return usb_standard_request_get_configuration_setup(endpoint); case USB_TRANSFER_STAGE_DATA: case USB_TRANSFER_STAGE_STATUS: return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } /*********************************************************************/ usb_request_status_t usb_standard_request( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { switch( endpoint->setup.request ) { case USB_STANDARD_REQUEST_GET_DESCRIPTOR: return usb_standard_request_get_descriptor(endpoint, stage); case USB_STANDARD_REQUEST_SET_ADDRESS: return usb_standard_request_set_address(endpoint, stage); case USB_STANDARD_REQUEST_SET_CONFIGURATION: return usb_standard_request_set_configuration(endpoint, stage); case USB_STANDARD_REQUEST_GET_CONFIGURATION: return usb_standard_request_get_configuration(endpoint, stage); default: return USB_REQUEST_STATUS_STALL; } } ================================================ FILE: firmware/common/usb_standard_request.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_STANDARD_REQUEST_H__ #define __USB_STANDARD_REQUEST_H__ #include "usb_type.h" #include "usb_request.h" void usb_set_configuration_changed_cb( void (*callback)(usb_device_t* const) ); usb_request_status_t usb_standard_request( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); const uint8_t* usb_endpoint_descriptor( const usb_endpoint_t* const endpoint ); uint_fast16_t usb_endpoint_descriptor_max_packet_size( const uint8_t* const endpoint_descriptor ); usb_transfer_type_t usb_endpoint_descriptor_transfer_type( const uint8_t* const endpoint_descriptor ); bool usb_set_configuration( usb_device_t* const device, const uint_fast8_t configuration_number ); #endif//__USB_STANDARD_REQUEST_H__ ================================================ FILE: firmware/common/usb_type.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_TYPE_H__ #define __USB_TYPE_H__ #include #include // TODO: Move this to some common compiler-tricks location. #define ATTR_PACKED __attribute__((packed)) #define ATTR_ALIGNED(x) __attribute__ ((aligned(x))) #define ATTR_SECTION(x) __attribute__ ((section(x))) typedef struct ATTR_PACKED { uint8_t request_type; uint8_t request; union { struct { uint8_t value_l; uint8_t value_h; }; uint16_t value; }; union { struct { uint8_t index_l; uint8_t index_h; }; uint16_t index; }; union { struct { uint8_t length_l; uint8_t length_h; }; uint16_t length; }; } usb_setup_t; typedef enum { USB_STANDARD_REQUEST_GET_STATUS = 0, USB_STANDARD_REQUEST_CLEAR_FEATURE = 1, USB_STANDARD_REQUEST_SET_FEATURE = 3, USB_STANDARD_REQUEST_SET_ADDRESS = 5, USB_STANDARD_REQUEST_GET_DESCRIPTOR = 6, USB_STANDARD_REQUEST_SET_DESCRIPTOR = 7, USB_STANDARD_REQUEST_GET_CONFIGURATION = 8, USB_STANDARD_REQUEST_SET_CONFIGURATION = 9, USB_STANDARD_REQUEST_GET_INTERFACE = 10, USB_STANDARD_REQUEST_SET_INTERFACE = 11, USB_STANDARD_REQUEST_SYNCH_FRAME = 12, } usb_standard_request_t; typedef enum { USB_SETUP_REQUEST_TYPE_shift = 5, USB_SETUP_REQUEST_TYPE_mask = 3 << USB_SETUP_REQUEST_TYPE_shift, USB_SETUP_REQUEST_TYPE_STANDARD = 0 << USB_SETUP_REQUEST_TYPE_shift, USB_SETUP_REQUEST_TYPE_CLASS = 1 << USB_SETUP_REQUEST_TYPE_shift, USB_SETUP_REQUEST_TYPE_VENDOR = 2 << USB_SETUP_REQUEST_TYPE_shift, USB_SETUP_REQUEST_TYPE_RESERVED = 3 << USB_SETUP_REQUEST_TYPE_shift, USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift = 7, USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_mask = 1 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift, USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_HOST_TO_DEVICE = 0 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift, USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_DEVICE_TO_HOST = 1 << USB_SETUP_REQUEST_TYPE_DATA_TRANSFER_DIRECTION_shift, } usb_setup_request_type_t; typedef enum { USB_TRANSFER_DIRECTION_OUT = 0, USB_TRANSFER_DIRECTION_IN = 1, } usb_transfer_direction_t; typedef enum { USB_DESCRIPTOR_TYPE_DEVICE = 1, USB_DESCRIPTOR_TYPE_CONFIGURATION = 2, USB_DESCRIPTOR_TYPE_STRING = 3, USB_DESCRIPTOR_TYPE_INTERFACE = 4, USB_DESCRIPTOR_TYPE_ENDPOINT = 5, USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER = 6, USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION = 7, USB_DESCRIPTOR_TYPE_INTERFACE_POWER = 8, } usb_descriptor_type_t; typedef enum { USB_TRANSFER_TYPE_CONTROL = 0, USB_TRANSFER_TYPE_ISOCHRONOUS = 1, USB_TRANSFER_TYPE_BULK = 2, USB_TRANSFER_TYPE_INTERRUPT = 3, } usb_transfer_type_t; typedef enum { USB_SPEED_LOW = 0, USB_SPEED_FULL = 1, USB_SPEED_HIGH = 2, USB_SPEED_SUPER = 3, } usb_speed_t; typedef struct { const uint8_t* const descriptor; const uint32_t number; const usb_speed_t speed; } usb_configuration_t; typedef struct { const uint8_t* const descriptor; uint8_t** descriptor_strings; const uint8_t* const qualifier_descriptor; usb_configuration_t* (*configurations)[]; const usb_configuration_t* configuration; } usb_device_t; typedef struct usb_endpoint_t usb_endpoint_t; struct usb_endpoint_t { usb_setup_t setup; uint8_t buffer[8]; // Buffer for use during IN stage. const uint_fast8_t address; usb_device_t* const device; usb_endpoint_t* const in; usb_endpoint_t* const out; void (*setup_complete)(usb_endpoint_t* const endpoint); void (*transfer_complete)(usb_endpoint_t* const endpoint); }; #endif//__USB_TYPE_H__ ================================================ FILE: firmware/common/w25q80bv.c ================================================ /* * Copyright 2013 Michael Ossmann * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ /* * This is a rudimentary driver for the W25Q80BV SPI Flash IC using the * LPC43xx's SSP0 peripheral (not quad SPIFI). The only goal here is to allow * programming the flash. */ #include #include "w25q80bv.h" #include "hackrf_core.h" #include #include #include #include /* * Set up pins for GPIO and SPI control, configure SSP0 peripheral for SPI. * SSP0_SSEL is controlled by GPIO in order to handle various transfer lengths. */ void w25q80bv_setup(void) { uint8_t device_id; const uint8_t serial_clock_rate = 2; const uint8_t clock_prescale_rate = 2; /* Reset SPIFI peripheral before to Erase/Write SPIFI memory through SPI */ RESET_CTRL1 = RESET_CTRL1_SPIFI_RST; /* Init SPIFI GPIO to Normal GPIO */ scu_pinmux(P3_3, (SCU_SSP_IO | SCU_CONF_FUNCTION2)); // P3_3 SPIFI_SCK => SSP0_SCK scu_pinmux(P3_4, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_4 SPIFI SPIFI_SIO3 IO3 => GPIO1[14] scu_pinmux(P3_5, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_5 SPIFI SPIFI_SIO2 IO2 => GPIO1[15] scu_pinmux(P3_6, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_6 SPIFI SPIFI_MISO IO1 => GPIO0[6] scu_pinmux(P3_7, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_7 SPIFI SPIFI_MOSI IO0 => GPIO5[10] scu_pinmux(P3_8, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_8 SPIFI SPIFI_CS => GPIO5[11] /* configure SSP pins */ scu_pinmux(SCU_SSP0_MISO, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP0_MOSI, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP0_SCK, (SCU_SSP_IO | SCU_CONF_FUNCTION2)); /* configure GPIO pins */ scu_pinmux(SCU_FLASH_HOLD, SCU_GPIO_FAST); scu_pinmux(SCU_FLASH_WP, SCU_GPIO_FAST); scu_pinmux(SCU_SSP0_SSEL, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); /* drive SSEL, HOLD, and WP pins high */ gpio_set(PORT_FLASH, (PIN_FLASH_HOLD | PIN_FLASH_WP)); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); /* Set GPIO pins as outputs. */ GPIO1_DIR |= (PIN_FLASH_HOLD | PIN_FLASH_WP); GPIO5_DIR |= PIN_SSP0_SSEL; /* initialize SSP0 */ ssp_init(SSP0_NUM, SSP_DATA_8BITS, SSP_FRAME_SPI, SSP_CPOL_0_CPHA_0, serial_clock_rate, clock_prescale_rate, SSP_MODE_NORMAL, SSP_MASTER, SSP_SLAVE_OUT_ENABLE); device_id = 0; while(device_id != W25Q80BV_DEVICE_ID_RES) { device_id = w25q80bv_get_device_id(); } } uint8_t w25q80bv_get_status(void) { uint8_t value; gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_READ_STATUS1); value = ssp_transfer(SSP0_NUM, 0xFF); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); return value; } /* Release power down / Device ID */ uint8_t w25q80bv_get_device_id(void) { uint8_t value; gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_DEVICE_ID); /* Read 3 dummy bytes */ value = ssp_transfer(SSP0_NUM, 0xFF); value = ssp_transfer(SSP0_NUM, 0xFF); value = ssp_transfer(SSP0_NUM, 0xFF); /* Read Device ID shall return 0x13 for W25Q80BV */ value = ssp_transfer(SSP0_NUM, 0xFF); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); return value; } void w25q80bv_get_unique_id(w25q80bv_unique_id_t* unique_id) { int i; uint8_t value; gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_UNIQUE_ID); /* Read 4 dummy bytes */ for(i=0; i<4; i++) value = ssp_transfer(SSP0_NUM, 0xFF); /* Read Unique ID 64bits (8*8) */ for(i=0; i<8; i++) { value = ssp_transfer(SSP0_NUM, 0xFF); unique_id->id_8b[i] = value; } gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); } void w25q80bv_wait_while_busy(void) { while (w25q80bv_get_status() & W25Q80BV_STATUS_BUSY); } void w25q80bv_write_enable(void) { w25q80bv_wait_while_busy(); gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_WRITE_ENABLE); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); } void w25q80bv_chip_erase(void) { uint8_t device_id; device_id = 0; while(device_id != W25Q80BV_DEVICE_ID_RES) { device_id = w25q80bv_get_device_id(); } w25q80bv_write_enable(); w25q80bv_wait_while_busy(); gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_CHIP_ERASE); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); } /* write up a 256 byte page or partial page */ void w25q80bv_page_program(const uint32_t addr, const uint16_t len, const uint8_t* data) { int i; /* do nothing if asked to write beyond a page boundary */ if (((addr & 0xFF) + len) > W25Q80BV_PAGE_LEN) return; /* do nothing if we would overflow the flash */ if (addr > (W25Q80BV_NUM_BYTES - len)) return; w25q80bv_write_enable(); w25q80bv_wait_while_busy(); gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_PAGE_PROGRAM); ssp_transfer(SSP0_NUM, (addr & 0xFF0000) >> 16); ssp_transfer(SSP0_NUM, (addr & 0xFF00) >> 8); ssp_transfer(SSP0_NUM, addr & 0xFF); for (i = 0; i < len; i++) ssp_transfer(SSP0_NUM, data[i]); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); } void w25q80bv_read_page(const uint32_t addr, const uint16_t len, uint8_t* data) { int i; w25q80bv_write_enable(); w25q80bv_wait_while_busy(); gpio_clear(PORT_SSP0_SSEL, PIN_SSP0_SSEL); ssp_transfer(SSP0_NUM, W25Q80BV_READ_DATA); ssp_transfer(SSP0_NUM, (addr & 0xFF0000) >> 16); ssp_transfer(SSP0_NUM, (addr & 0xFF00) >> 8); ssp_transfer(SSP0_NUM, addr & 0xFF); for (i = 0; i < len; i++) data[i] = ssp_transfer(SSP0_NUM, 0xFF); gpio_set(PORT_SSP0_SSEL, PIN_SSP0_SSEL); } /* write an arbitrary number of bytes */ void w25q80bv_program(uint32_t addr, uint32_t len, const uint8_t* data) { uint16_t first_block_len; uint8_t device_id; device_id = 0; while(device_id != W25Q80BV_DEVICE_ID_RES) { device_id = w25q80bv_get_device_id(); } /* do nothing if we would overflow the flash */ if ((len > W25Q80BV_NUM_BYTES) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) return; /* handle start not at page boundary */ first_block_len = W25Q80BV_PAGE_LEN - (addr % W25Q80BV_PAGE_LEN); if (len < first_block_len) first_block_len = len; if (first_block_len) { w25q80bv_page_program(addr, first_block_len, data); addr += first_block_len; data += first_block_len; len -= first_block_len; } /* one page at a time on boundaries */ while (len >= W25Q80BV_PAGE_LEN) { w25q80bv_page_program(addr, W25Q80BV_PAGE_LEN, data); addr += W25Q80BV_PAGE_LEN; data += W25Q80BV_PAGE_LEN; len -= W25Q80BV_PAGE_LEN; } /* handle end not at page boundary */ if (len) { w25q80bv_page_program(addr, len, data); } } ================================================ FILE: firmware/common/w25q80bv.h ================================================ /* * Copyright 2013 Michael Ossmann * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __W25Q80BV_H__ #define __W25Q80BV_H__ #define W25Q80BV_PAGE_LEN 256U #define W25Q80BV_NUM_PAGES 16384U #define W25Q80BV_NUM_BYTES 4194304U #define W25Q80BV_WRITE_ENABLE 0x06 #define W25Q80BV_CHIP_ERASE 0xC7 #define W25Q80BV_READ_STATUS1 0x05 #define W25Q80BV_PAGE_PROGRAM 0x02 #define W25Q80BV_DEVICE_ID 0xAB #define W25Q80BV_UNIQUE_ID 0x4B #define W25Q80BV_READ_DATA 0x03 #define W25Q80BV_STATUS_BUSY 0x01 #define W25Q80BV_DEVICE_ID_RES 0x15 /* Expected device_id for W25Q80BV */ typedef union { uint64_t id_64b; uint32_t id_32b[2]; /* 2*32bits 64bits Unique ID */ uint8_t id_8b[8]; /* 8*8bits 64bits Unique ID */ } w25q80bv_unique_id_t; void w25q80bv_setup(void); void w25q80bv_chip_erase(void); void w25q80bv_program(uint32_t addr, uint32_t len, const uint8_t* data); uint8_t w25q80bv_get_device_id(void); void w25q80bv_get_unique_id(w25q80bv_unique_id_t* unique_id); void w25q80bv_read_page(const uint32_t addr, const uint16_t len, uint8_t* data); #endif//__W25Q80BV_H__ ================================================ FILE: firmware/hackrf-common.cmake ================================================ # Copyright 2009 Uwe Hermann # Copyright 2010 Piotr Esden-Tempski # Copyright 2012 Michael Ossmann # Copyright 2012 Benjamin Vernoux # Copyright 2012 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # # derived primarily from Makefiles in libopencm3 enable_language(C CXX ASM) SET(PATH_HACKRF ../..) SET(PATH_HACKRF_FIRMWARE ${PATH_HACKRF}/firmware) SET(PATH_HACKRF_FIRMWARE_COMMON ${PATH_HACKRF_FIRMWARE}/common) SET(LIBOPENCM3 ${PATH_HACKRF_FIRMWARE}/libopencm3) execute_process( COMMAND git log -n 1 --format=%h WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE GIT_VERSION_FOUND ERROR_QUIET OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) if (GIT_VERSION_FOUND) set(VERSION "unknown") else (GIT_VERSION_FOUND) set(VERSION ${GIT_VERSION}) endif (GIT_VERSION_FOUND) if(NOT DEFINED BOARD) set(BOARD HACKRF_ONE) endif() if(NOT DEFINED RUN_FROM) set(RUN_FROM SPIFI) endif() set(MCU_PARTNO LPC4320) if(NOT DEFINED SRC_M0) set(SRC_M0 "${PATH_HACKRF_FIRMWARE_COMMON}/m0_sleep.c") endif() SET(HACKRF_OPTS "-D${BOARD} -DLPC43XX -D${MCU_PARTNO} -DTX_ENABLE -D'VERSION_STRING=\"git-${VERSION}\"' -DRUN_FROM=${RUN_FROM}") SET(LDSCRIPT_M4 "-T${PATH_HACKRF_FIRMWARE_COMMON}/${MCU_PARTNO}_M4_memory.ld") if( RUN_FROM STREQUAL "RAM") SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx.ld") else() SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -Tlibopencm3_lpc43xx_rom_to_ram.ld") endif() SET(LDSCRIPT_M4 "${LDSCRIPT_M4} -T${PATH_HACKRF_FIRMWARE_COMMON}/LPC43xx_M4_M0_image_from_text.ld") SET(LDSCRIPT_M0 "-T${PATH_HACKRF_FIRMWARE_COMMON}/LPC43xx_M0_memory.ld -Tlibopencm3_lpc43xx_m0.ld") SET(CFLAGS_COMMON "-Os -g3 -Wall -Wextra ${HACKRF_OPTS} ${COMMON_FLAGS} -fno-common -MD") SET(LDFLAGS_COMMON "-nostartfiles -Wl,--gc-sections") if(V STREQUAL "1") SET(LDFLAGS_COMMON "${LDFLAGS_COMMON} -Wl,--print-gc-sections") endif() SET(CPUFLAGS_M0 "-mthumb -mcpu=cortex-m0 -mfloat-abi=soft") SET(CFLAGS_M0 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0") SET(CXXFLAGS_M0 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M0} -DLPC43XX_M0") SET(LDFLAGS_M0 "${LDFLAGS_COMMON} ${CPUFLAGS_M0} ${LDSCRIPT_M0} -Xlinker -Map=m0.map --specs=nano.specs") SET(CPUFLAGS_M4 "-mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16") SET(CFLAGS_M4 "-std=gnu99 ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4") SET(CXXFLAGS_M4 "-std=gnu++0x ${CFLAGS_COMMON} ${CPUFLAGS_M4} -DLPC43XX_M4") SET(LDFLAGS_M4 "${LDFLAGS_COMMON} ${CPUFLAGS_M4} ${LDSCRIPT_M4} -Xlinker -Map=m4.map") set(BUILD_SHARED_LIBS OFF) include_directories("${LIBOPENCM3}/include/") include_directories("${PATH_HACKRF_FIRMWARE_COMMON}") macro(DeclareTargets) configure_file( ${PATH_HACKRF_FIRMWARE_COMMON}/m0_bin.s.cmake m0_bin.s ) link_directories( "${PATH_HACKRF_FIRMWARE_COMMON}" "${LIBOPENCM3}/lib" "${LIBOPENCM3}/lib/lpc43xx" "${CMAKE_INSTALL_PREFIX}/lib/armv7e-m/fpu" ) add_executable(${PROJECT_NAME}_m0.elf ${SRC_M0}) target_link_libraries( ${PROJECT_NAME}_m0.elf c nosys opencm3_lpc43xx_m0 ) set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M0}") set_target_properties(${PROJECT_NAME}_m0.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M0}") add_custom_target( ${PROJECT_NAME}_m0.bin DEPENDS ${PROJECT_NAME}_m0.elf COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}_m0.elf ${PROJECT_NAME}_m0.bin ) add_executable(${PROJECT_NAME}.elf ${SRC_M4} ${PATH_HACKRF_FIRMWARE_COMMON}/hackrf_core.c ${PATH_HACKRF_FIRMWARE_COMMON}/sgpio.c ${PATH_HACKRF_FIRMWARE_COMMON}/mcp4022.c ${PATH_HACKRF_FIRMWARE_COMMON}/rf_path.c m0_bin.s ) add_dependencies(${PROJECT_NAME}.elf ${PROJECT_NAME}_m0.bin) target_link_libraries( ${PROJECT_NAME}.elf c nosys opencm3_lpc43xx m ) set_target_properties(${PROJECT_NAME}.elf PROPERTIES COMPILE_FLAGS "${CFLAGS_M4}") set_target_properties(${PROJECT_NAME}.elf PROPERTIES LINK_FLAGS "${LDFLAGS_M4}") add_custom_target( ${PROJECT_NAME}.bin DEPENDS ${PROJECT_NAME}.elf COMMAND ${CMAKE_OBJCOPY} -Obinary ${PROJECT_NAME}.elf ${PROJECT_NAME}.bin ) add_custom_target( ${PROJECT_NAME}.dfu ALL DEPENDS ${PROJECT_NAME}.bin COMMAND rm -f _tmp.dfu _header.bin COMMAND cp ${PROJECT_NAME}.bin _tmp.dfu COMMAND dfu-suffix --vid=0x1fc9 --pid=0x000c --did=0x0 -s 0 -a _tmp.dfu COMMAND python -c \"import os.path\; import struct\; print\('0000000: da ff ' + ' '.join\(map\(lambda s: '%02x' % ord\(s\), struct.pack\(' _header.bin COMMAND cat _header.bin _tmp.dfu >${PROJECT_NAME}.dfu COMMAND rm -f _tmp.dfu _header.bin ) add_custom_target( ${PROJECT_NAME}-program DEPENDS ${PROJECT_NAME}.dfu COMMAND dfu-util --device 1fc9:000c --alt 0 --download ${PROJECT_NAME}.dfu ) endmacro() ================================================ FILE: firmware/hackrf_usb/CMakeLists.txt ================================================ # Copyright 2012 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # cmake_minimum_required(VERSION 2.8.9) set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake) project(hackrf_usb) include(../hackrf-common.cmake) set(SRC_M4 hackrf_usb.c "${PATH_HACKRF_FIRMWARE_COMMON}/streaming.c" sgpio_isr.c usb_bulk_buffer.c "${PATH_HACKRF_FIRMWARE_COMMON}/usb.c" "${PATH_HACKRF_FIRMWARE_COMMON}/usb_request.c" "${PATH_HACKRF_FIRMWARE_COMMON}/usb_standard_request.c" usb_descriptor.c usb_device.c usb_endpoint.c usb_api_board_info.c usb_api_register.c usb_api_spiflash.c "${PATH_HACKRF_FIRMWARE_COMMON}/usb_queue.c" "${PATH_HACKRF_FIRMWARE_COMMON}/fault_handler.c" "${PATH_HACKRF_FIRMWARE_COMMON}/w25q80bv.c" "${PATH_HACKRF_FIRMWARE_COMMON}/rom_iap.c" "${PATH_HACKRF_FIRMWARE_COMMON}/streaming.c" ) DeclareTargets() ================================================ FILE: firmware/hackrf_usb/hackrf_usb.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include "usb.h" #include "usb_standard_request.h" #include #include "usb_descriptor.h" #include "usb_device.h" #include "usb_endpoint.h" #include "usb_api_board_info.h" #include "usb_api_cpld.h" #include "usb_api_register.h" #include "usb_api_spiflash.h" #include "usb_api_transceiver.h" #include "rf_path.h" #include "sgpio_isr.h" #include "usb_bulk_buffer.h" #include "sgpio.h" #include "mcp4022.h" static volatile transceiver_mode_t _transceiver_mode = TRANSCEIVER_MODE_OFF; static unsigned int phase = 1; void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) { baseband_streaming_disable(); usb_endpoint_disable(&usb_endpoint_bulk_in); usb_endpoint_disable(&usb_endpoint_bulk_out); _transceiver_mode = new_transceiver_mode; if( _transceiver_mode == TRANSCEIVER_MODE_RX ) { usb_endpoint_init(&usb_endpoint_bulk_in); usb_bulk_buffer_offset = 0; phase = 1; } else if (_transceiver_mode == TRANSCEIVER_MODE_TX) { //usb_endpoint_init(&usb_endpoint_bulk_out); } if( _transceiver_mode != TRANSCEIVER_MODE_OFF ) { baseband_streaming_enable(); } } transceiver_mode_t transceiver_mode(void) { return _transceiver_mode; } usb_request_status_t usb_vendor_request_set_transceiver_mode( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { if( stage == USB_TRANSFER_STAGE_SETUP ) { switch( endpoint->setup.value ) { case TRANSCEIVER_MODE_OFF: case TRANSCEIVER_MODE_RX: case TRANSCEIVER_MODE_TX: set_transceiver_mode(endpoint->setup.value); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } else { return USB_REQUEST_STATUS_OK; } } static const usb_request_handler_fn vendor_request_handler[] = { NULL, usb_vendor_request_set_transceiver_mode, usb_vendor_request_write_adf4158, usb_vendor_request_read_adf4158, usb_vendor_request_set_gpio, usb_vendor_request_clear_gpio, usb_vendor_request_set_mcp, usb_vendor_request_set_clock, NULL, NULL, usb_vendor_request_erase_spiflash, usb_vendor_request_write_spiflash, usb_vendor_request_read_spiflash, NULL, usb_vendor_request_read_board_id, usb_vendor_request_read_version_string, NULL, NULL, usb_vendor_request_read_partid_serialno, NULL, NULL, NULL, NULL, NULL, NULL, }; static const uint32_t vendor_request_handler_count = sizeof(vendor_request_handler) / sizeof(vendor_request_handler[0]); usb_request_status_t usb_vendor_request( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { usb_request_status_t status = USB_REQUEST_STATUS_STALL; if( endpoint->setup.request < vendor_request_handler_count ) { usb_request_handler_fn handler = vendor_request_handler[endpoint->setup.request]; if( handler ) { status = handler(endpoint, stage); } } return status; } const usb_request_handlers_t usb_request_handlers = { .standard = usb_standard_request, .class = 0, .vendor = usb_vendor_request, .reserved = 0, }; void usb_configuration_changed( usb_device_t* const device ) { /* Reset transceiver to idle state until other commands are received */ set_transceiver_mode(TRANSCEIVER_MODE_OFF); if( device->configuration->number == 1 ) { // transceiver configuration cpu_clock_pll1_max_speed(); //gpio_set(PORT_LED1_3, PIN_LED1); } else if( device->configuration->number == 2 ) { // CPLD update configuration cpu_clock_pll1_max_speed(); usb_endpoint_init(&usb_endpoint_bulk_out); //start_cpld_update = true; } else { /* Configuration number equal 0 means usb bus reset. */ cpu_clock_pll1_low_speed(); //gpio_clear(PORT_LED1_3, PIN_LED1); } } void usb_set_descriptor_by_serial_number(void) { iap_cmd_res_t iap_cmd_res; /* Read IAP Serial Number Identification */ iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_SERIAL_NO; iap_cmd_call(&iap_cmd_res); if (iap_cmd_res.status_res.status_ret == CMD_SUCCESS) { usb_descriptor_string_serial_number[0] = USB_DESCRIPTOR_STRING_SERIAL_BUF_LEN; usb_descriptor_string_serial_number[1] = USB_DESCRIPTOR_TYPE_STRING; /* 32 characters of serial number, convert to UTF-16LE */ for (size_t i=0; i> 3] >> (28 - (i & 7) * 4)) & 0xf; const char c = (nibble > 9) ? ('a' + nibble - 10) : ('0' + nibble); usb_descriptor_string_serial_number[2 + i * 2] = c; usb_descriptor_string_serial_number[3 + i * 2] = 0x00; } } else { usb_descriptor_string_serial_number[0] = 2; usb_descriptor_string_serial_number[1] = USB_DESCRIPTOR_TYPE_STRING; } } int main(void) { pin_setup(); cpu_clock_init(); usb_set_descriptor_by_serial_number(); gpio_clear(PORT_LED1_3, PIN_LED1); usb_set_configuration_changed_cb(usb_configuration_changed); usb_peripheral_reset(); usb_device_init(0, &usb_device); usb_queue_init(&usb_endpoint_control_out_queue); usb_queue_init(&usb_endpoint_control_in_queue); usb_queue_init(&usb_endpoint_bulk_out_queue); usb_queue_init(&usb_endpoint_bulk_in_queue); usb_endpoint_init(&usb_endpoint_control_out); usb_endpoint_init(&usb_endpoint_control_in); nvic_set_priority(NVIC_USB0_IRQ, 255); vector_table.irq[NVIC_SGPIO_IRQ] = sgpio_isr_rx; usb_run(&usb_device); ssp1_init(); sgpio_configure(); mcp_init(); while(true) { //gpio_set(PORT_LED1_3, PIN_LED1); // Set up IN transfer of buffer 0. if ( usb_bulk_buffer_offset >= 16384 && phase == 1 && transceiver_mode() != TRANSCEIVER_MODE_OFF) { usb_transfer_schedule_block( (transceiver_mode() == TRANSCEIVER_MODE_RX) ? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out, &usb_bulk_buffer[0x0000], 0x4000, NULL, NULL ); phase = 0; } //gpio_clear(PORT_LED1_3, PIN_LED1); // Set up IN transfer of buffer 1. if ( usb_bulk_buffer_offset < 16384 && phase == 0 && transceiver_mode() != TRANSCEIVER_MODE_OFF) { usb_transfer_schedule_block( (transceiver_mode() == TRANSCEIVER_MODE_RX) ? &usb_endpoint_bulk_in : &usb_endpoint_bulk_out, &usb_bulk_buffer[0x4000], 0x4000-32, // Last 32 bytes are unused NULL, NULL ); phase = 1; } } return 0; } ================================================ FILE: firmware/hackrf_usb/sgpio_isr.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include "sgpio_isr.h" #include #include "hackrf_core.h" #include "usb_bulk_buffer.h" void sgpio_isr_rx() { SGPIO_CLR_STATUS_1 = (1 << SGPIO_SLICE_A); uint32_t* const p = (uint32_t*)&usb_bulk_buffer[usb_bulk_buffer_offset]; __asm__( "ldr r0, [%[SGPIO_REG_SS], #44]\n\t" "str r0, [%[p], #0]\n\t" "ldr r0, [%[SGPIO_REG_SS], #20]\n\t" "str r0, [%[p], #4]\n\t" "ldr r0, [%[SGPIO_REG_SS], #40]\n\t" "str r0, [%[p], #8]\n\t" "ldr r0, [%[SGPIO_REG_SS], #8]\n\t" "str r0, [%[p], #12]\n\t" "ldr r0, [%[SGPIO_REG_SS], #36]\n\t" "str r0, [%[p], #16]\n\t" "ldr r0, [%[SGPIO_REG_SS], #16]\n\t" "str r0, [%[p], #20]\n\t" "ldr r0, [%[SGPIO_REG_SS], #32]\n\t" "str r0, [%[p], #24]\n\t" "ldr r0, [%[SGPIO_REG_SS], #0]\n\t" "str r0, [%[p], #28]\n\t" "ldr r0, [%[SGPIO_REG_SS], #24]\n\t" "str r0, [%[p], #32]\n\t" "ldr r0, [%[SGPIO_REG_SS], #52]\n\t" "str r0, [%[p], #36]\n\t" "ldr r0, [%[SGPIO_REG_SS], #28]\n\t" "str r0, [%[p], #40]\n\t" : : [SGPIO_REG_SS] "l" (SGPIO_PORT_BASE + 0x100), [p] "l" (p) : "r0" ); /* // D9 - D2 p[0] = SGPIO_REG_SS(SGPIO_SLICE_L); p[1] = SGPIO_REG_SS(SGPIO_SLICE_F); p[2] = SGPIO_REG_SS(SGPIO_SLICE_K); p[3] = SGPIO_REG_SS(SGPIO_SLICE_C); p[4] = SGPIO_REG_SS(SGPIO_SLICE_J); p[5] = SGPIO_REG_SS(SGPIO_SLICE_E); p[6] = SGPIO_REG_SS(SGPIO_SLICE_I); p[7] = SGPIO_REG_SS(SGPIO_SLICE_A); // D1 p[8] = SGPIO_REG_SS(SGPIO_SLICE_G); // D0 p[9] = SGPIO_REG_SS(SGPIO_SLICE_N); // Sync p[10] = SGPIO_REG_SS(SGPIO_SLICE_H); */ usb_bulk_buffer_offset += 11*4; if (usb_bulk_buffer_offset > usb_bulk_buffer_size-11*4) { usb_bulk_buffer_offset = 0; } } ================================================ FILE: firmware/hackrf_usb/sgpio_isr.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __SGPIO_ISR_H__ #define __SGPIO_ISR_H__ void sgpio_isr_rx(); #endif/*__SGPIO_ISR_H__*/ ================================================ FILE: firmware/hackrf_usb/usb_api_board_info.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_api_board_info.h" #include #include #include #include #include char version_string[] = VERSION_STRING; usb_request_status_t usb_vendor_request_read_board_id( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { endpoint->buffer[0] = BOARD_ID; usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_read_version_string( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { uint8_t length; if (stage == USB_TRANSFER_STAGE_SETUP) { length = (uint8_t)strlen(version_string); usb_transfer_schedule_block(endpoint->in, version_string, length, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_read_partid_serialno( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { uint8_t length; read_partid_serialno_t read_partid_serialno; iap_cmd_res_t iap_cmd_res; if (stage == USB_TRANSFER_STAGE_SETUP) { /* Read IAP Part Number Identification */ iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_PART_ID_NO; iap_cmd_call(&iap_cmd_res); if(iap_cmd_res.status_res.status_ret != CMD_SUCCESS) return USB_REQUEST_STATUS_STALL; read_partid_serialno.part_id[0] = iap_cmd_res.status_res.iap_result[0]; read_partid_serialno.part_id[1] = iap_cmd_res.status_res.iap_result[1]; /* Read IAP Serial Number Identification */ iap_cmd_res.cmd_param.command_code = IAP_CMD_READ_SERIAL_NO; iap_cmd_call(&iap_cmd_res); if(iap_cmd_res.status_res.status_ret != CMD_SUCCESS) return USB_REQUEST_STATUS_STALL; read_partid_serialno.serial_no[0] = iap_cmd_res.status_res.iap_result[0]; read_partid_serialno.serial_no[1] = iap_cmd_res.status_res.iap_result[1]; read_partid_serialno.serial_no[2] = iap_cmd_res.status_res.iap_result[2]; read_partid_serialno.serial_no[3] = iap_cmd_res.status_res.iap_result[3]; length = (uint8_t)sizeof(read_partid_serialno_t); usb_transfer_schedule_block(endpoint->in, &read_partid_serialno, length, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); } return USB_REQUEST_STATUS_OK; } ================================================ FILE: firmware/hackrf_usb/usb_api_board_info.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_API_BOARD_INFO_H__ #define __USB_API_BOARD_INFO_H__ #include #include #include typedef struct { uint32_t part_id[2]; uint32_t serial_no[4]; } read_partid_serialno_t; usb_request_status_t usb_vendor_request_read_board_id( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_read_version_string( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_read_partid_serialno( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); #endif /* end of include guard: __USB_API_BOARD_INFO_H__ */ ================================================ FILE: firmware/hackrf_usb/usb_api_cpld.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_api_cpld.h" #include #include #include #include #include "usb_endpoint.h" #include #include #include volatile bool start_cpld_update = false; uint8_t cpld_xsvf_buffer[512]; volatile bool cpld_wait = false; static void cpld_buffer_refilled(void* user_data, unsigned int length) { (void)user_data; (void)length; cpld_wait = false; } static void refill_cpld_buffer(void) { cpld_wait = true; usb_transfer_schedule( &usb_endpoint_bulk_out, cpld_xsvf_buffer, sizeof(cpld_xsvf_buffer), cpld_buffer_refilled, NULL ); // Wait until transfer finishes while (cpld_wait); } void cpld_update(void) { #define WAIT_LOOP_DELAY (6000000) #define ALL_LEDS (PIN_LED1|PIN_LED2|PIN_LED3) int i; int error; usb_queue_flush_endpoint(&usb_endpoint_bulk_in); usb_queue_flush_endpoint(&usb_endpoint_bulk_out); refill_cpld_buffer(); error = cpld_jtag_program(sizeof(cpld_xsvf_buffer), cpld_xsvf_buffer, refill_cpld_buffer); if(error == 0) { /* blink LED1, LED2, and LED3 on success */ while (1) { gpio_set(PORT_LED1_3, ALL_LEDS); /* LEDs on */ for (i = 0; i < WAIT_LOOP_DELAY; i++) /* Wait a bit. */ __asm__("nop"); gpio_clear(PORT_LED1_3, ALL_LEDS); /* LEDs off */ for (i = 0; i < WAIT_LOOP_DELAY; i++) /* Wait a bit. */ __asm__("nop"); } }else { /* LED3 (Red) steady on error */ gpio_set(PORT_LED1_3, PIN_LED3); /* LEDs on */ while (1); } } ================================================ FILE: firmware/hackrf_usb/usb_api_cpld.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_API_CPLD_H__ #define __USB_API_CPLD_H__ #include extern volatile bool start_cpld_update; void cpld_update(void); #endif /* end of include guard: __USB_API_CPLD_H__ */ ================================================ FILE: firmware/hackrf_usb/usb_api_register.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_api_register.h" #include #include "hackrf_core.h" #include #include "rf_path.h" #include #include #include "sgpio.h" #include "sgpio_isr.h" #include "mcp4022.h" /* usb_request_status_t usb_vendor_request_write_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { uint32_t addr = 0; uint16_t len = 0; //FIXME This should refuse to run if executing from SPI flash. if (stage == USB_TRANSFER_STAGE_SETUP) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { usb_transfer_schedule_block(endpoint->out, &spiflash_buffer[0], len, NULL, NULL); w25q80bv_setup(); return USB_REQUEST_STATUS_OK; } } else if (stage == USB_TRANSFER_STAGE_DATA) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { w25q80bv_program(addr, len, &spiflash_buffer[0]); usb_transfer_schedule_ack(endpoint->in); //FIXME probably should undo w25q80bv_setup() return USB_REQUEST_STATUS_OK; } } else { return USB_REQUEST_STATUS_OK; } } */ usb_request_status_t usb_vendor_request_write_adf4158( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index); if( stage == USB_TRANSFER_STAGE_SETUP ) { adf4158_write_register(data); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_read_adf4158( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { if( stage == USB_TRANSFER_STAGE_SETUP ) { const uint32_t value = adf4158_read_register(); endpoint->buffer[0] = (value >> 8*3) & 0xFF; endpoint->buffer[1] = (value >> 8*2) & 0xFF; endpoint->buffer[2] = (value >> 8*1) & 0xFF; endpoint->buffer[3] = (value >> 8*0) & 0xFF; usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 4, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_mcp( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { uint32_t data = endpoint->setup.index; if( stage == USB_TRANSFER_STAGE_SETUP ) { if (data > MCP_MAX_VALUE) { return USB_REQUEST_STATUS_STALL; } else { mcp_set(data); usb_transfer_schedule_ack(endpoint->in); } } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_gpio( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index); if( stage == USB_TRANSFER_STAGE_SETUP ) { if (data & BIT0) { enable_adf4158(); } if (data & BIT1) { enable_adc(); } if (data & BIT2) { enable_pa(); } if (data & BIT3) { enable_mixer(); } if (data & BIT4) { gpio_set(PORT_LED1_3, PIN_LED1); } if (data & BIT5) { sgpio_test_interface(); } usb_transfer_schedule_ack(endpoint->in); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_clear_gpio( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { uint32_t data = (endpoint->setup.value<<16)|(endpoint->setup.index); if( stage == USB_TRANSFER_STAGE_SETUP ) { if (data & BIT0) { disable_adf4158(); } if (data & BIT1) { disable_adc(); } if (data & BIT2) { disable_pa(); } if (data & BIT3) { disable_mixer(); } if (data & BIT4) { gpio_clear(PORT_LED1_3, PIN_LED1); } usb_transfer_schedule_ack(endpoint->in); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_clock( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { // Configures ADC clock if( stage == USB_TRANSFER_STAGE_SETUP ) { if (endpoint->setup.value > 4095) { return USB_REQUEST_STATUS_STALL; } sgpio_configure_clock(endpoint->setup.value, endpoint->setup.index); usb_transfer_schedule_ack(endpoint->in); } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_trigger( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { if( stage == USB_TRANSFER_STAGE_SETUP ) { //set_trigger(endpoint->setup.value, endpoint->setup.index); usb_transfer_schedule_ack(endpoint->in); } return USB_REQUEST_STATUS_OK; } ================================================ FILE: firmware/hackrf_usb/usb_api_register.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_API_REGISTER_H__ #define __USB_API_REGISTER_H__ #include #include usb_request_status_t usb_vendor_request_write_adf4158( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); usb_request_status_t usb_vendor_request_read_adf4158( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); usb_request_status_t usb_vendor_request_set_gpio( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); usb_request_status_t usb_vendor_request_clear_gpio( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); usb_request_status_t usb_vendor_request_set_mcp( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); usb_request_status_t usb_vendor_request_set_clock( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ); #endif /* end of include guard: __USB_API_REGISTER_H__ */ ================================================ FILE: firmware/hackrf_usb/usb_api_spiflash.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_api_spiflash.h" #include "usb_queue.h" #include #include uint8_t spiflash_buffer[W25Q80BV_PAGE_LEN]; usb_request_status_t usb_vendor_request_erase_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { //FIXME This should refuse to run if executing from SPI flash. if (stage == USB_TRANSFER_STAGE_SETUP) { w25q80bv_setup(); /* only chip erase is implemented */ w25q80bv_chip_erase(); usb_transfer_schedule_ack(endpoint->in); //FIXME probably should undo w25q80bv_setup() } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_write_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { uint32_t addr = 0; uint16_t len = 0; //FIXME This should refuse to run if executing from SPI flash. if (stage == USB_TRANSFER_STAGE_SETUP) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { usb_transfer_schedule_block(endpoint->out, &spiflash_buffer[0], len, NULL, NULL); w25q80bv_setup(); return USB_REQUEST_STATUS_OK; } } else if (stage == USB_TRANSFER_STAGE_DATA) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; /* This check is redundant but makes me feel better. */ if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { w25q80bv_program(addr, len, &spiflash_buffer[0]); usb_transfer_schedule_ack(endpoint->in); //FIXME probably should undo w25q80bv_setup() return USB_REQUEST_STATUS_OK; } } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_read_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { uint32_t i; uint32_t addr; uint16_t len; //uint8_t* u8_addr_pt; if (stage == USB_TRANSFER_STAGE_SETUP) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { /* TODO flush SPIFI "cache" before to read the SPIFI memory */ for(i=0;iin, &spiflash_buffer[0], len, NULL, NULL); return USB_REQUEST_STATUS_OK; } } else if (stage == USB_TRANSFER_STAGE_DATA) { addr = (endpoint->setup.value << 16) | endpoint->setup.index; len = endpoint->setup.length; /* This check is redundant but makes me feel better. */ if ((len > W25Q80BV_PAGE_LEN) || (addr > W25Q80BV_NUM_BYTES) || ((addr + len) > W25Q80BV_NUM_BYTES)) { return USB_REQUEST_STATUS_STALL; } else { usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } } else { return USB_REQUEST_STATUS_OK; } } ================================================ FILE: firmware/hackrf_usb/usb_api_spiflash.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_API_SPIFLASH_H__ #define __USB_API_SPIFLASH_H__ #include #include usb_request_status_t usb_vendor_request_erase_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_write_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_read_spiflash( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); #endif /* end of include guard: __USB_API_SPIFLASH_H__ */ ================================================ FILE: firmware/hackrf_usb/usb_api_transceiver.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_api_transceiver.h" #include #include #include #include #include #include #include #include "usb_endpoint.h" typedef struct { uint32_t freq_mhz; uint32_t freq_hz; } set_freq_params_t; set_freq_params_t set_freq_params; struct set_freq_explicit_params { uint64_t if_freq_hz; /* intermediate frequency */ uint64_t lo_freq_hz; /* front-end local oscillator frequency */ uint8_t path; /* image rejection filter path */ }; struct set_freq_explicit_params explicit_params; typedef struct { uint32_t freq_hz; uint32_t divider; } set_sample_r_params_t; set_sample_r_params_t set_sample_r_params; usb_request_status_t usb_vendor_request_set_baseband_filter_bandwidth( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage ) { if( stage == USB_TRANSFER_STAGE_SETUP ) { const uint32_t bandwidth = (endpoint->setup.index << 16) | endpoint->setup.value; if( baseband_filter_bandwidth_set(bandwidth) ) { usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_STALL; } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_set_freq( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { usb_transfer_schedule_block(endpoint->out, &set_freq_params, sizeof(set_freq_params_t), NULL, NULL); return USB_REQUEST_STATUS_OK; } else if (stage == USB_TRANSFER_STAGE_DATA) { const uint64_t freq = set_freq_params.freq_mhz * 1000000ULL + set_freq_params.freq_hz; if( set_freq(freq) ) { usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_STALL; } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_set_sample_rate_frac( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { usb_transfer_schedule_block(endpoint->out, &set_sample_r_params, sizeof(set_sample_r_params_t), NULL, NULL); return USB_REQUEST_STATUS_OK; } else if (stage == USB_TRANSFER_STAGE_DATA) { if( sample_rate_frac_set(set_sample_r_params.freq_hz * 2, set_sample_r_params.divider ) ) { usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_STALL; } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_set_amp_enable( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { switch (endpoint->setup.value) { case 0: rf_path_set_lna(0); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; case 1: rf_path_set_lna(1); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_set_lna_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if( stage == USB_TRANSFER_STAGE_SETUP ) { const uint8_t value = max2837_set_lna_gain(endpoint->setup.index); endpoint->buffer[0] = value; usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_vga_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if( stage == USB_TRANSFER_STAGE_SETUP ) { const uint8_t value = max2837_set_vga_gain(endpoint->setup.index); endpoint->buffer[0] = value; usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_txvga_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if( stage == USB_TRANSFER_STAGE_SETUP ) { const uint8_t value = max2837_set_txvga_gain(endpoint->setup.index); endpoint->buffer[0] = value; usb_transfer_schedule_block(endpoint->in, &endpoint->buffer, 1, NULL, NULL); usb_transfer_schedule_ack(endpoint->out); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_OK; } usb_request_status_t usb_vendor_request_set_antenna_enable( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { switch (endpoint->setup.value) { case 0: rf_path_set_antenna(0); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; case 1: rf_path_set_antenna(1); usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; default: return USB_REQUEST_STATUS_STALL; } } else { return USB_REQUEST_STATUS_OK; } } usb_request_status_t usb_vendor_request_set_freq_explicit( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage) { if (stage == USB_TRANSFER_STAGE_SETUP) { usb_transfer_schedule_block(endpoint->out, &explicit_params, sizeof(struct set_freq_explicit_params), NULL, NULL); return USB_REQUEST_STATUS_OK; } else if (stage == USB_TRANSFER_STAGE_DATA) { if (set_freq_explicit(explicit_params.if_freq_hz, explicit_params.lo_freq_hz, explicit_params.path)) { usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } return USB_REQUEST_STATUS_STALL; } else { return USB_REQUEST_STATUS_OK; } } ================================================ FILE: firmware/hackrf_usb/usb_api_transceiver.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_API_TRANSCEIVER_H__ #define __USB_API_TRANSCEIVER_H__ #include #include #include usb_request_status_t usb_vendor_request_set_transceiver_mode( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_baseband_filter_bandwidth( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_freq( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_sample_rate_frac( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_amp_enable( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_lna_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_vga_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_txvga_gain( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_antenna_enable( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); usb_request_status_t usb_vendor_request_set_freq_explicit( usb_endpoint_t* const endpoint, const usb_transfer_stage_t stage); #endif/*__USB_API_TRANSCEIVER_H__*/ ================================================ FILE: firmware/hackrf_usb/usb_bulk_buffer.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_bulk_buffer.h" const uint32_t usb_bulk_buffer_size = 32768; volatile uint32_t usb_bulk_buffer_offset = 0; ================================================ FILE: firmware/hackrf_usb/usb_bulk_buffer.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_BULK_BUFFER_H__ #define __USB_BULK_BUFFER_H__ #include /* Address of usb_bulk_buffer is set in ldscripts. If you change the name of this * variable, it won't be where it needs to be in the processor's address space, * unless you also adjust the ldscripts. */ extern uint8_t usb_bulk_buffer[32768]; extern const uint32_t usb_bulk_buffer_size; extern volatile uint32_t usb_bulk_buffer_offset; #endif/*__USB_BULK_BUFFER_H__*/ ================================================ FILE: firmware/hackrf_usb/usb_descriptor.c ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include "usb_type.h" #include "usb_descriptor.h" #define USB_VENDOR_ID (0x1D50) #define USB_PRODUCT_ID (0x6099) #define USB_WORD(x) (x & 0xFF), ((x >> 8) & 0xFF) #define USB_MAX_PACKET0 (64) #define USB_MAX_PACKET_BULK_FS (64) #define USB_MAX_PACKET_BULK_HS (512) #define USB_BULK_IN_EP_ADDR (0x81) #define USB_BULK_OUT_EP_ADDR (0x02) #define USB_STRING_LANGID (0x0409) uint8_t usb_descriptor_device[] = { 18, // bLength USB_DESCRIPTOR_TYPE_DEVICE, // bDescriptorType USB_WORD(0x0200), // bcdUSB 0x00, // bDeviceClass 0x00, // bDeviceSubClass 0x00, // bDeviceProtocol USB_MAX_PACKET0, // bMaxPacketSize0 USB_WORD(USB_VENDOR_ID), // idVendor USB_WORD(USB_PRODUCT_ID), // idProduct USB_WORD(0x0100), // bcdDevice 0x01, // iManufacturer 0x02, // iProduct 0x05, // iSerialNumber 0x02 // bNumConfigurations }; uint8_t usb_descriptor_device_qualifier[] = { 10, // bLength USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER, // bDescriptorType USB_WORD(0x0200), // bcdUSB 0x00, // bDeviceClass 0x00, // bDeviceSubClass 0x00, // bDeviceProtocol 64, // bMaxPacketSize0 0x02, // bNumOtherSpeedConfigurations 0x00 // bReserved }; uint8_t usb_descriptor_configuration_full_speed[] = { 9, // bLength USB_DESCRIPTOR_TYPE_CONFIGURATION, // bDescriptorType USB_WORD(32), // wTotalLength 0x01, // bNumInterfaces 0x01, // bConfigurationValue 0x03, // iConfiguration 0x80, // bmAttributes: USB-powered 250, // bMaxPower: 500mA 9, // bLength USB_DESCRIPTOR_TYPE_INTERFACE, // bDescriptorType 0x00, // bInterfaceNumber 0x00, // bAlternateSetting 0x02, // bNumEndpoints 0xFF, // bInterfaceClass: vendor-specific 0xFF, // bInterfaceSubClass 0xFF, // bInterfaceProtocol: vendor-specific 0x00, // iInterface 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_IN_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_FS), // wMaxPacketSize 0x00, // bInterval: no NAK 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_OUT_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_FS), // wMaxPacketSize 0x00, // bInterval: no NAK 0, // TERMINATOR }; uint8_t usb_descriptor_configuration_high_speed[] = { 9, // bLength USB_DESCRIPTOR_TYPE_CONFIGURATION, // bDescriptorType USB_WORD(32), // wTotalLength 0x01, // bNumInterfaces 0x01, // bConfigurationValue 0x03, // iConfiguration 0x80, // bmAttributes: USB-powered 250, // bMaxPower: 500mA 9, // bLength USB_DESCRIPTOR_TYPE_INTERFACE, // bDescriptorType 0x00, // bInterfaceNumber 0x00, // bAlternateSetting 0x02, // bNumEndpoints 0xFF, // bInterfaceClass: vendor-specific 0xFF, // bInterfaceSubClass 0xFF, // bInterfaceProtocol: vendor-specific 0x00, // iInterface 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_IN_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_HS), // wMaxPacketSize 0x00, // bInterval: no NAK 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_OUT_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_HS), // wMaxPacketSize 0x00, // bInterval: no NAK 0, // TERMINATOR }; uint8_t usb_descriptor_configuration_cpld_update_full_speed[] = { 9, // bLength USB_DESCRIPTOR_TYPE_CONFIGURATION, // bDescriptorType USB_WORD(32), // wTotalLength 0x01, // bNumInterfaces 0x02, // bConfigurationValue 0x04, // iConfiguration 0x80, // bmAttributes: USB-powered 250, // bMaxPower: 500mA 9, // bLength USB_DESCRIPTOR_TYPE_INTERFACE, // bDescriptorType 0x00, // bInterfaceNumber 0x00, // bAlternateSetting 0x02, // bNumEndpoints 0xFF, // bInterfaceClass: vendor-specific 0xFF, // bInterfaceSubClass 0xFF, // bInterfaceProtocol: vendor-specific 0x00, // iInterface 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_IN_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_FS), // wMaxPacketSize 0x00, // bInterval: no NAK 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_OUT_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_FS), // wMaxPacketSize 0x00, // bInterval: no NAK 0, // TERMINATOR }; uint8_t usb_descriptor_configuration_cpld_update_high_speed[] = { 9, // bLength USB_DESCRIPTOR_TYPE_CONFIGURATION, // bDescriptorType USB_WORD(32), // wTotalLength 0x01, // bNumInterfaces 0x02, // bConfigurationValue 0x04, // iConfiguration 0x80, // bmAttributes: USB-powered 250, // bMaxPower: 500mA 9, // bLength USB_DESCRIPTOR_TYPE_INTERFACE, // bDescriptorType 0x00, // bInterfaceNumber 0x00, // bAlternateSetting 0x02, // bNumEndpoints 0xFF, // bInterfaceClass: vendor-specific 0xFF, // bInterfaceSubClass 0xFF, // bInterfaceProtocol: vendor-specific 0x00, // iInterface 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_IN_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_HS), // wMaxPacketSize 0x00, // bInterval: no NAK 7, // bLength USB_DESCRIPTOR_TYPE_ENDPOINT, // bDescriptorType USB_BULK_OUT_EP_ADDR, // bEndpointAddress 0x02, // bmAttributes: BULK USB_WORD(USB_MAX_PACKET_BULK_HS), // wMaxPacketSize 0x00, // bInterval: no NAK 0, // TERMINATOR }; uint8_t usb_descriptor_string_languages[] = { 0x04, // bLength USB_DESCRIPTOR_TYPE_STRING, // bDescriptorType USB_WORD(USB_STRING_LANGID), // wLANGID }; uint8_t usb_descriptor_string_manufacturer[] = { 40, // bLength USB_DESCRIPTOR_TYPE_STRING, // bDescriptorType 'G', 0x00, 'r', 0x00, 'e', 0x00, 'a', 0x00, 't', 0x00, ' ', 0x00, 'S', 0x00, 'c', 0x00, 'o', 0x00, 't', 0x00, 't', 0x00, ' ', 0x00, 'G', 0x00, 'a', 0x00, 'd', 0x00, 'g', 0x00, 'e', 0x00, 't', 0x00, 's', 0x00, }; uint8_t usb_descriptor_string_product[] = { 22, // bLength USB_DESCRIPTOR_TYPE_STRING, // bDescriptorType 'H', 0x00, 'a', 0x00, 'c', 0x00, 'k', 0x00, 'R', 0x00, 'F', 0x00, ' ', 0x00, 'O', 0x00, 'n', 0x00, 'e', 0x00, }; uint8_t usb_descriptor_string_config1_description[] = { 24, // bLength USB_DESCRIPTOR_TYPE_STRING, // bDescriptorType 'T', 0x00, 'r', 0x00, 'a', 0x00, 'n', 0x00, 's', 0x00, 'c', 0x00, 'e', 0x00, 'i', 0x00, 'v', 0x00, 'e', 0x00, 'r', 0x00, }; uint8_t usb_descriptor_string_config2_description[] = { 24, // bLength USB_DESCRIPTOR_TYPE_STRING, // bDescriptorType 'C', 0x00, 'P', 0x00, 'L', 0x00, 'D', 0x00, ' ', 0x00, 'u', 0x00, 'p', 0x00, 'd', 0x00, 'a', 0x00, 't', 0x00, 'e', 0x00, }; uint8_t usb_descriptor_string_serial_number[USB_DESCRIPTOR_STRING_SERIAL_BUF_LEN]; uint8_t* usb_descriptor_strings[] = { usb_descriptor_string_languages, usb_descriptor_string_manufacturer, usb_descriptor_string_product, usb_descriptor_string_config1_description, usb_descriptor_string_config2_description, usb_descriptor_string_serial_number, 0, // TERMINATOR }; ================================================ FILE: firmware/hackrf_usb/usb_descriptor.h ================================================ /* * Copyright 2012 Jared Boone * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include extern uint8_t usb_descriptor_device[]; extern uint8_t usb_descriptor_device_qualifier[]; extern uint8_t usb_descriptor_configuration_full_speed[]; extern uint8_t usb_descriptor_configuration_high_speed[]; extern uint8_t usb_descriptor_configuration_cpld_update_full_speed[]; extern uint8_t usb_descriptor_configuration_cpld_update_high_speed[]; extern uint8_t usb_descriptor_string_languages[]; extern uint8_t usb_descriptor_string_manufacturer[]; extern uint8_t usb_descriptor_string_product[]; #define USB_DESCRIPTOR_STRING_SERIAL_LEN 32 #define USB_DESCRIPTOR_STRING_SERIAL_BUF_LEN (USB_DESCRIPTOR_STRING_SERIAL_LEN*2 + 2) /* UTF-16LE */ extern uint8_t usb_descriptor_string_serial_number[]; extern uint8_t* usb_descriptor_strings[]; ================================================ FILE: firmware/hackrf_usb/usb_device.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_device.h" #include #include "usb_descriptor.h" usb_configuration_t usb_configuration_high_speed = { .number = 1, .speed = USB_SPEED_HIGH, .descriptor = usb_descriptor_configuration_high_speed, }; usb_configuration_t usb_configuration_full_speed = { .number = 1, .speed = USB_SPEED_FULL, .descriptor = usb_descriptor_configuration_full_speed, }; usb_configuration_t usb_configuration_cpld_update_full_speed = { .number = 2, .speed = USB_SPEED_FULL, .descriptor = usb_descriptor_configuration_cpld_update_full_speed, }; usb_configuration_t usb_configuration_cpld_update_high_speed = { .number = 2, .speed = USB_SPEED_HIGH, .descriptor = usb_descriptor_configuration_cpld_update_high_speed, }; usb_configuration_t* usb_configurations[] = { &usb_configuration_high_speed, &usb_configuration_full_speed, &usb_configuration_cpld_update_full_speed, &usb_configuration_cpld_update_high_speed, 0, }; usb_device_t usb_device = { .descriptor = usb_descriptor_device, .descriptor_strings = usb_descriptor_strings, .qualifier_descriptor = usb_descriptor_device_qualifier, .configurations = &usb_configurations, .configuration = 0, }; ================================================ FILE: firmware/hackrf_usb/usb_device.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_DEVICE_H__ #define __USB_DEVICE_H__ #include extern usb_device_t usb_device; #endif /* end of include guard: __USB_DEVICE_H__ */ ================================================ FILE: firmware/hackrf_usb/usb_endpoint.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include "usb_endpoint.h" #include #include "usb_device.h" usb_endpoint_t usb_endpoint_control_out = { .address = 0x00, .device = &usb_device, .in = &usb_endpoint_control_in, .out = &usb_endpoint_control_out, .setup_complete = usb_setup_complete, .transfer_complete = usb_control_out_complete, }; USB_DEFINE_QUEUE(usb_endpoint_control_out, 4); usb_endpoint_t usb_endpoint_control_in = { .address = 0x80, .device = &usb_device, .in = &usb_endpoint_control_in, .out = &usb_endpoint_control_out, .setup_complete = 0, .transfer_complete = usb_control_in_complete, }; static USB_DEFINE_QUEUE(usb_endpoint_control_in, 4); // NOTE: Endpoint number for IN and OUT are different. I wish I had some // evidence that having BULK IN and OUT on separate endpoint numbers was // actually a good idea. Seems like everybody does it that way, but why? usb_endpoint_t usb_endpoint_bulk_in = { .address = 0x81, .device = &usb_device, .in = &usb_endpoint_bulk_in, .out = 0, .setup_complete = 0, .transfer_complete = usb_queue_transfer_complete }; static USB_DEFINE_QUEUE(usb_endpoint_bulk_in, 1); usb_endpoint_t usb_endpoint_bulk_out = { .address = 0x02, .device = &usb_device, .in = 0, .out = &usb_endpoint_bulk_out, .setup_complete = 0, .transfer_complete = usb_queue_transfer_complete }; static USB_DEFINE_QUEUE(usb_endpoint_bulk_out, 1); ================================================ FILE: firmware/hackrf_usb/usb_endpoint.h ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifndef __USB_ENDPOINT_H__ #define __USB_ENDPOINT_H__ #include #include extern usb_endpoint_t usb_endpoint_control_out; extern USB_DECLARE_QUEUE(usb_endpoint_control_out); extern usb_endpoint_t usb_endpoint_control_in; extern USB_DECLARE_QUEUE(usb_endpoint_control_in); extern usb_endpoint_t usb_endpoint_bulk_in; extern USB_DECLARE_QUEUE(usb_endpoint_bulk_in); extern usb_endpoint_t usb_endpoint_bulk_out; extern USB_DECLARE_QUEUE(usb_endpoint_bulk_out); #endif /* end of include guard: __USB_ENDPOINT_H__ */ ================================================ FILE: firmware/libopencm3/.gitignore ================================================ *.d *.o *.bin *.hex *.list *.srec *.a *.elf lib/*.ld *.swp \#* .\#* *~ *.map *.log html/ latex/ *.pdf *.tag .DS_Store # These are generated include/libopencm3/**/nvic.h include/libopencm3/**/**/nvic.h lib/**/vector_nvic.c lib/**/**/vector_nvic.c include/libopencmsis/efm32/ include/libopencmsis/lm3s/ include/libopencmsis/lpc13xx/ include/libopencmsis/lpc17xx/ include/libopencmsis/lpc43xx/ include/libopencmsis/stm32/ include/libopencmsis/sam3x/ include/libopencmsis/sam/ ================================================ FILE: firmware/libopencm3/COPYING.GPL3 ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: firmware/libopencm3/COPYING.LGPL3 ================================================ GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ================================================ FILE: firmware/libopencm3/HACKING ================================================ ------------------------------------------------------------------------------ HACKING ------------------------------------------------------------------------------ Coding style ------------ The whole library is programmed using the Linux kernel coding style, see http://lxr.linux.no/linux/Documentation/CodingStyle for details. Please use the same style for any code contributions, thanks! Amendments to the Linux kernel coding style ------------------------------------------- 1) We use the stdint types. The linux kernel accepts the abbreviated types (u8, s8, u16 and so on) for legacy reasons. We should in general not introduce things like types ourselves as long as they are not necessary to make our job possible of refining the hardware and make it easier to be used. stdint is a standard and it is not in the scope of our project to introduce a new type standard. 2) Based on the same logic as in (1) we do not use __packed and __aligned definitions, it is not our job to add compiler extensions. If we need to deal with compiler incompatibility we will do that the same way we are dealing with the depricated attribute by introducing a normal macro that is not in the compiler reserved keyword space. 3) We accept to write an empty body busy waiting while loop like this: while (1); there is no need to put the colon on the next line as per linux kernel style. 4) We always add brackets around bodies of if, while and for statements, even if the body contains only one expression. It is dangerous to not have them as it easily happens that one adds a second expression and is hunting for hours why the code is not working just because of a missing bracket pair. Development guidelines ---------------------- - Every new file added must have the usual license header, see the existing files for examples. - In general, please try to keep the register and bit naming as close as possible to the official vendor datasheets. Among other reasons, this makes it easier for users to find what they're looking for in the datasheets, programming manuals, and application notes. - All register definitions should follow the following naming conventions: - The #define names should be all-caps, parts are separated by an underscore. - The name should be of the form SUBSYSTEM_REGISTER_BIT, e.g. ADC_CR2_DMA, where ADC is the subsystem name, CR2 is the register NAME, and DMA is the name of the bit in the register that is defined. - All subsystem-specific function names should be prefixed with the subsystem name. For example, gpio_set_mode() or rcc_osc_on(). - Please consistently use the short form types from , e.g. u8, u16, u32, and so on. - Variables that are used to store register values read from registers or to be stored in a register should be named reg8, reg16, reg32 etc. - In the examples directory, the following structure should be used: - One (or more) subdirectories for the type of microcontroller, e.g. lm3s, lpc13xx, stm32/f1, stm32/f2, stm32/f4. - One subdirectory in there for each eval board or piece of hardware, e.g. stm32-h103, lisa-m, stm32vl-discovery, stm32f4-discovery, etc. - One subdirectory in there for each example, e.g. miniblink, button, usart, usb_dfu, etc. Tips and tricks --------------- SublimeText users: - The project contains a sublime project description file with some basic settings provided to make hacking on libopencm3 easier. - Recommended SublimeText plugins when hacking on libopencm3: - TrailingSpaces: Show and trim trailing line spaces. - SublimeLinter: Run checkpatch.pl in the background while you write your code and indicate possible coding style issues on the fly. ================================================ FILE: firmware/libopencm3/HACKING_COMMON_DOC ================================================ Files for each peripheral (examples given for STM32 GPIO) --------------------------------------------------------- In include/libopencm3/stm32. A "dispatch" header to point to the subfamily header (gpio.h) In include/libopencm3/stm32/f* A file with defines that are specific to the subfamily, and an include of needed common header files (gpio.h). In include/libopencm3/stm32/common A file with defines common to all subfamilies. Includes the cm3 common header (gpio_common_all.h). In include/libopencm3/stm32/common May be one other file with defines common to a subgroup of devices. This includes the file common to all (gpio_common_f24.h). In lib/stm32/f* A file with functions specific to the subfamily. Includes the "dispatch" header and any common headers needed (gpio.c). In lib/stm32/common Has functions common to all subfamilies. Includes the "dispatch" header (gpio_common_all.c). In lib/stm32/common May be one other file with functions common to a group of subfamilies. Includes the "dispatch" header and the file common to all (gpio_common_f24.h). Makefiles in lib/stm32/f? have the common object files added and the common directory added to VPATH. NOTE: The common source files MUST have the "dispatch" header so that compilation will use the specific defines for the subfamily being compiled. These can differ between subfamilies. NOTE: The common source files must have a line of the form #ifdef LIBOPENCM3_xxx_H where xxx is the associated peripheral name. This prevents the common files from being included accidentally into a user's application. This however causes doxygen to skip processing of the remainder of the file. Thus a @cond ... @endcond directive must be placed around the statement to prevent doxygen from processing it. This works only for doxygen 1.8.4 or later. At the present time most distros have an earlier buggy version. Documentation ------------- In include/libopencm3/stm32/f* A file doc-stm32f*.h contains a definition of the particular family grouping. This grouping will appear in the main index of the resulting document with all documentation under it. All header files for a peripheral (common or otherwise) will subgroup under a name which is the same in all families (such as gpio_defines). The peripheral header file in include/libopencm3/stm32/f* will then include this group as a subgroup under the specific family group. Doxygen is run separately for each family so there is no danger of accidentally including the wrong stuff. Similarly for the source files for a peripheral which will subgroup under a same name (such as gpio_files). The peripheral source file in lib/stm32/f* will include this as a subgroup under the specific family group. DOXYFILE for a particular family will list the family specific and common files (headers and source) that are to be included. The result (in the long run) will be that all peripherals will appear under the same family grouping in the documentation, even if they are identical over a number of families. That is probably most useful to end users who only need to see the documentation for one family. ================================================ FILE: firmware/libopencm3/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf STYLECHECK := scripts/checkpatch.pl STYLECHECKFLAGS := --no-tree -f --terse --mailback ifeq ($(DETECT_TOOLCHAIN),) DESTDIR ?= /usr/local else DESTDIR ?= $(shell dirname $(shell readlink -f $(shell which $(PREFIX)-gcc)))/.. endif INCDIR := $(DESTDIR)/$(PREFIX)/include LIBDIR := $(DESTDIR)/$(PREFIX)/lib SHAREDIR := $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts INSTALL := install SRCLIBDIR:= $(realpath lib) TARGETS:= stm32/f0 stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/l1 lpc13xx lpc17xx \ lpc43xx/m4 lpc43xx/m0 lm3s lm4f \ efm32/efm32tg efm32/efm32g efm32/efm32lg efm32/efm32gg sam/3x sam/3n # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) Q := @ # Do not print "Entering directory ...". MAKEFLAGS += --no-print-directory endif YAMLFILES := $(shell find . -name 'irq.yaml') STYLECHECKFILES := $(shell find . -name '*.[ch]') all: build build: lib %.genhdr: @printf " GENHDR $*\n"; @./scripts/irq2nvic_h ./$*; %.cleanhdr: @printf " CLNHDR $*\n"; @./scripts/irq2nvic_h --remove ./$* LIB_DIRS:=$(wildcard $(addprefix lib/,$(TARGETS))) $(LIB_DIRS): $(YAMLFILES:=.genhdr) @printf " BUILD $@\n"; $(Q)$(MAKE) --directory=$@ SRCLIBDIR=$(SRCLIBDIR) lib: $(LIB_DIRS) $(Q)true install: lib @printf " INSTALL headers\n" $(Q)$(INSTALL) -d $(INCDIR)/libopencm3 $(Q)$(INSTALL) -d $(INCDIR)/libopencmsis $(Q)$(INSTALL) -d $(LIBDIR) $(Q)$(INSTALL) -d $(SHAREDIR) $(Q)cp -r include/libopencm3/* $(INCDIR)/libopencm3 $(Q)cp -r include/libopencmsis/* $(INCDIR)/libopencmsis @printf " INSTALL libs\n" $(Q)$(INSTALL) -m 0644 lib/*.a $(LIBDIR) @printf " INSTALL ldscripts\n" $(Q)$(INSTALL) -m 0644 lib/*.ld $(LIBDIR) $(Q)$(INSTALL) -m 0644 lib/efm32/*/*.ld $(LIBDIR) @printf " INSTALL scripts\n" $(Q)$(INSTALL) -m 0644 scripts/*.scr $(SHAREDIR) doc: $(Q)$(MAKE) -C doc html clean: $(YAMLFILES:=.cleanhdr) $(LIB_DIRS:=.clean) $(EXAMPLE_DIRS:=.clean) doc.clean styleclean %.clean: $(Q)if [ -d $* ]; then \ printf " CLEAN $*\n"; \ $(MAKE) -C $* clean SRCLIBDIR=$(SRCLIBDIR) || exit $?; \ fi; stylecheck: $(STYLECHECKFILES:=.stylecheck) styleclean: $(STYLECHECKFILES:=.styleclean) # the cat is due to multithreaded nature - we like to have consistent chunks of text on the output %.stylecheck: $(Q)if ! grep -q "* It was generated by the irq2nvic_h script." $* ; then \ $(STYLECHECK) $(STYLECHECKFLAGS) $* > $*.stylecheck; \ if [ -s $*.stylecheck ]; then \ cat $*.stylecheck; \ else \ rm -f $*.stylecheck; \ fi; \ fi; %.styleclean: $(Q)rm -f $*.stylecheck; .PHONY: build lib $(LIB_DIRS) install doc clean stylecheck styleclean ================================================ FILE: firmware/libopencm3/README ================================================ ------------------------------------------------------------------------------ README ------------------------------------------------------------------------------ The libopencm3 project aims to create an open-source firmware library for various ARM Cortex-M3 microcontrollers. Currently (at least partly) supported microcontrollers: - ST STM32F1 series - ST STM32F2 series - ST STM32F4 series - NXP LPC1311/13/42/43 The library is written completely from scratch based on the vendor datasheets, programming manuals, and application notes. The code is meant to be used with a GCC toolchain for ARM (arm-elf or arm-none-eabi), flashing of the code to a microcontroller can be done using the OpenOCD ARM JTAG software. Status and API -------------- The libopencm3 project is currently work in progress. Not all subsystems of the microcontrollers are supported, yet. IMPORTANT: The API of the library is NOT yet considered stable! Please do not rely on it, yet! Changes to function names, macro names etc. can happen at any time without prior notice! TIP: Include this repository as a GIT submodule in your project. To make sure your users get the right version of the library to compile your project. For how that can be done refer to the libopencm3-examples repository. Prerequisites ------------- Building requires python, and a python YAML module. (Some code is generated) For Ubuntu $ [sudo] apt-get install python-yaml For Fedora $ [sudo] yum install PyYAML For Windows Download and install: msys - sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe Python - http://www.python.org/ftp/python/2.7/python-2.7.msi (use installer to get the right registry keys for PyYAML) PyYAML - http://pyyaml.org/download/pyyaml/PyYAML-3.10.win32-py2.7.exe arm-none-eabi toolchain - for example this one https://launchpad.net/gcc-arm-embedded Run msys shell and set the path without standard Windows paths, so Windows programs such as 'find' won't interfere: export PATH="/c//Python27:/c/ARMToolchain/bin:/usr/local/bin:/usr/bin:/bin" After that you can navigate to the folder where you've extracted libopencm3 and build it. Building -------- $ make You may want to override the toolchain (e.g., arm-elf or arm-none-eabi): $ PREFIX=arm-none-eabi make For a more verbose build you can use $ make V=1 Fine-tuning the build --------------------- The build may be fine-tuned with a limited number of parameters, by specifying them as environment variables, for example: $ VARIABLE=value make * FP_FLAGS - Control the floating-point ABI If the Cortex-M core supports a hard float ABI, it will be compiled with floating-point support by default. In cases where this is not desired, the behavior can be specified by setting FP_FLAGS. Currently, M4F cores default to "-mfloat-abi=hard -mfpu=fpv4-sp-d16" and others to no FP flags Examples: $ FP_FLAGS="-mfloat-abi=soft" make # No hardfloat $ FP_FLAGS="-mfloat-abi=hard -mfpu=magic" make # New FPU we don't know of Example projects ---------------- The libopencm3 community has written and is maintaining a huge collection of examples, displaying the capabilities and uses of the library. You can find all of them in the libopencm3-examples repository: https://github.com/libopencm3/libopencm3-examples Installation ------------ $ make install This will install the library into /usr/local. (permissions permitting) If you want to install it elsewhere, use the following syntax: $ make DESTDIR=/opt/libopencm3 install If you want to attempt to install into your toolchain, use this: $ make DETECT_TOOLCHAIN=1 install Note: If you install this into your toolchain, you don't need to pass any extra -L or -I flags into your projects. However, this also means you must NOT pass any -L or -I flags that point into the toolchain. This _will_ confuse the linker. (ie, for summon-arm-toolchain, do NOT pass -L/home/user/sat/lib) Common symptoms of confusing the linker are hard faults caused by branches into arm code. You can use objdump to check for this in your final elf. Coding style and development guidelines --------------------------------------- See HACKING. License ------- The libopencm3 code is released under the terms of the GNU Lesser General Public License (LGPL), version 3 or later. See COPYING.GPL3 and COPYING.LGPL3 for details. IRC --- * You can reach us in #libopencm3 on the freenode IRC network. Mailing lists ------------- * Developer mailing list (for patches and discussions): https://lists.sourceforge.net/lists/listinfo/libopencm3-devel * Commits mailing list (receives one mail per 'git push'): https://lists.sourceforge.net/lists/listinfo/libopencm3-commits Website ------- http://libopencm3.org http://sourceforge.net/projects/libopencm3/ ================================================ FILE: firmware/libopencm3/doc/Doxyfile ================================================ # Doxygen include file to generate top level entry document # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ./Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- INPUT = ../include/libopencm3/docmain.dox LAYOUT_FILE = DoxygenLayout.xml GENERATE_LATEX = NO TAGFILES = ./cm3/cm3.tag=../cm3/html \ ./stm32/stm32.tag=../stm32/html \ ./stm32f1/stm32f1.tag=../stm32f1/html \ ./stm32f4/stm32f4.tag=../stm32f4/html \ ./lm3s/lm3s.tag=../lm3s/html \ ./lm4f/lm4f.tag=../lm4f/html \ ./lpc13xx/lpc13xx.tag=../lpc13xx/html \ ./lpc17xx/lpc17xx.tag=../lpc17xx/html \ ./lpc43xx/lpc43xx.tag=../lpc43xx/html ================================================ FILE: firmware/libopencm3/doc/Doxyfile_common ================================================ # Doxyfile 1.8.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = libopencm3 # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = "A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. Note that you specify absolute paths here, but also # relative paths, which will be relative from the directory where doxygen is # started. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, # and language is one of the parsers supported by doxygen: IDL, Java, # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, # C++. For instance to make doxygen treat .inc files as Fortran files (default # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note # that for custom extensions you also need to set FILE_PATTERNS otherwise the # files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented classes, # or namespaces to their corresponding documentation. Such a link can be # prevented in individual cases by by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter and setter methods for a property. Setting this option to YES (the default) will make doxygen replace the get and set methods by a property in the documentation. This will only work if the methods are indeed getting or setting a simple type. If this is not the case, or you want to show the methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penalty. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will roughly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. SYMBOL_CACHE_SIZE = 0 # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= NO # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = DoxygenLayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = doxygen.log #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = */*.d # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C, C++ and Fortran comments will always remain visible. STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If left blank doxygen will # generate a default style sheet. Note that it is recommended to use # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # tag will in the future become obsolete. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET # since it does not replace the standard style sheet and is therefor more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of # entries shown in the various tree structured indices initially; the user # can expand and collapse entries dynamically later on. Doxygen will expand # the tree to such a level that at most the specified number of entries are # visible (unless a fully collapsed tree already exceeds this amount). # So setting the number of entries 1 will produce a full collapsed tree by # default. 0 is a special value representing an infinite number of entries # and will result in a full expanded tree by default. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely # identify the documentation publisher. This should be a reverse domain-name # style string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://www.mathjax.org/mathjax # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client # using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows # full text search. The disadvantages are that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = __attribute__(x)= BEGIN_DECLS END_DECLS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = NO # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # managable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES ================================================ FILE: firmware/libopencm3/doc/DoxygenLayout.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/HACKING ================================================ libopencm3 Documentation 12 October 2012 (C) K Sarkies ----------------------------- Each family and subfamily of devices has a separate directory and configuration files. Doxygen is run independently on each of these and the result is integrated under a single HTML page. LaTeX and pdf files are produced separately. Due to relative referencing used in the files, the directory structure is important and should be maintained. Each of the subdirectories has a configuration file, a layout file and subdirectories for the documentation. Doxygen is intended to be run inside these subdirectories. The Makefile will handle this in the appropriate order. Tag files are generated and used by other doxygen runs to resolve links. Tagfiles -------- Tagfiles contain all information about the document, and are used to resolve references in other documents. The groups defined in these external documents are not shown when EXTERNAL_GROUPS = NO. The high level tagfiles must be generated before any others so order is important. As well as the processor families, a "cm3" subdirectory is used to generate a tagfile to integrate the CM3 common core defines. Markup ------ Each family has been given a group name that will allow subgrouping of API functions and defines in the documentation. The header and source files for each peripheral in each family must have a heading section in which an @defgroup defines the group name for the particular peripheral. This group name will be the same across all families as each one is documented separately. Thus for a peripheral xxx the header will have a group name xxx_defines and the source file will have xxx_file. This will allow the group to appear separately. An @ingroup must be provided to place the group as a subgroup of the appropriate family grouping. Note that @file is not used. The heading section must include the version number and date and authors names plus a license reference. Any documentation specific to the family can be included here. If there are common files included then their documentation will appear in a separate section. Common header and source files that are included into a number of families must have an @addgroup to include its documentation into the appropriate peripheral group. These headings may include authors and any specific descriptions but the date and version number must be omitted as it will be included from the family files. There must not be any reference to family groupings as these common files will be incorporated into multiple family groups. Each helper function must have a header with an @brief, and where appropriate additional description, @parameter and @return elements. These latter must describe the allowable parameter ranges preferably with reference to a suitable define in the corresponding header file. The Doxyfile for a family must include input files from the header and source subdirectories, as well as all needed common files. The common files can be added separately or as an entire directory with exclusions of inappropriate files. Doxyfiles --------- Doxyfile_common holds global settings. OUTPUT_DIRECTORY blank so that the output is placed in the current directory. RECURSIVE = NO EXTERNAL_GROUPS = NO Each Doxyfile_include for a processor family has: @INCLUDE = ../Doxyfile_common INPUT = specific directories needed, including /include/libopencm3/cm3 in top directory to set the top level page and GNU license. LAYOUT_FILE = DoxygenLayout_$processor.xml WARN_LOGFILE = doxygen_$processor.log TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = $processor.tag PREDEFINED = list of macro definitions For the top level Doxyfile INPUT = ../include/libopencm3/docmain.dox to add in the main page text LAYOUT_FILE = DoxygenLayout.xml WARN_LOGFILE = doxygen.log TAGFILES = cm3/cm3.tag=../cm3/html plus all families to be included. Generation of PDF ----------------- The needs for pdf documents differ from HTML so separate Doxyfile_latex files are provided. @INCLUDE = ../Doxyfile_common GENERATE_LATEX = YES GENERATE_HTML = NO ================================================ FILE: firmware/libopencm3/doc/Makefile ================================================ # Makefile to build libopencm3 documentation # 14 September 2012 # (C) Ken Sarkies doc: html latex html: cm3 usb stm32l1 stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 efm32g efm32gg efm32lg efm32tg lm3s lm4f lpc13 lpc17 lpc43 top cm3: cd cm3/; doxygen usb: cd usb/; doxygen lm3s: cd lm3s/; doxygen lm4f: cd lm4f/; doxygen efm32g: cd efm32g/; doxygen efm32gg: cd efm32gg/; doxygen efm32lg: cd efm32lg/; doxygen efm32tg: cd efm32tg/; doxygen lpc13: cd lpc13xx/; doxygen lpc17: cd lpc17xx/; doxygen lpc43: cd lpc43xx/; doxygen stm32f0: cd stm32f0/; doxygen stm32f1: cd stm32f1/; doxygen stm32f2: cd stm32f2/; doxygen stm32f3: cd stm32f3/; doxygen stm32f4: cd stm32f4/; doxygen stm32l1: cd stm32l1/; doxygen top: doxygen latex: stm32l1.pdf stm32f0.pdf stm32f1.pdf stm32f2.pdf stm32f3.pdf stm32f4.pdf lm3s.pdf lm4f.pdf lpc13.pdf lpc17.pdf lpc43.pdf efm32g.pdf efm32gg.pdf efm32lg.pdf efm32tg.pdf stm32l1.pdf: cd stm32l1/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32l1.pdf stm32f0.pdf: cd stm32f0/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32f0.pdf stm32f1.pdf: cd stm32f1/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32f1.pdf stm32f2.pdf: cd stm32f2/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32f2.pdf stm32f3.pdf: cd stm32f3/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32f3.pdf stm32f4.pdf: cd stm32f4/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../stm32f4.pdf lm3s.pdf: cd lm3s/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../lm3s.pdf lm4f.pdf: cd lm4f/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../lm4f.pdf lpc13.pdf: cd lpc13xx/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../lpc13.pdf lpc17.pdf: cd lpc17xx/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../lpc17.pdf lpc43.pdf: cd lpc43xx/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../lpc43.pdf efm32g.pdf: cd efm32g/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../efm32g.pdf efm32gg.pdf: cd efm32gg/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../efm32gg.pdf efm32lg.pdf: cd efm32lg/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../efm32lg.pdf efm32tg.pdf: cd efm32tg/; doxygen Doxyfile_latex; cd latex/; $(MAKE); cp refman.pdf ../../efm32tg.pdf clean: @rm -rf html/ */html/ */latex/ *.pdf */*.tag .PHONY: doc html cm3 usb lm3s lm4f lpc13 lpc17 lpc43 stm32l1 stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 efm32g efm32gg efm32lg efm32tg top latex ================================================ FILE: firmware/libopencm3/doc/README ================================================ libopencm3 Documentation 14 September 2012 (C) K Sarkies ------------------------------- To generate all documentation run 'make doc' in the doc directory, or for html documentation only run 'make html' (much faster). This runs doxygen for each of the processor families then integrates the whole. Alternatively run 'make doc' in the top directory to make html documentation. LaTeX and pdf documentation is currently very large in size. This requires doxygen v 1.8.2 or later. HTML, LaTeX, and pdf output can be produced. Generation of HTML ------------------ To view HTML, point a browser to libopencm3/doc/html/index.html. Generation of PDF ----------------- The pdf is generated via LaTeX. The pdf files are placed in the doc directory. Each file contains all documentation for the core and common features. The resulting files are huge. ================================================ FILE: firmware/libopencm3/doc/cm3/Doxyfile ================================================ # HTML Documentation for CM3 Core features. # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_cm3.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/cm3/ LAYOUT_FILE = DoxygenLayout_cm3.xml GENERATE_TAGFILE = cm3.tag ================================================ FILE: firmware/libopencm3/doc/cm3/DoxygenLayout_cm3.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/efm32g/Doxyfile ================================================ # HTML Documentation for efm32 code level # 11 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32g.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32g \ ../../lib/efm32/efm32g EXCLUDE = LAYOUT_FILE = DoxygenLayout_efm32g.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html \ GENERATE_TAGFILE = efm32g.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/efm32g/Doxyfile_latex ================================================ # LaTeX Documentation for efm32 code level # 12 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32g_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32g \ ../../lib/efm32/efm32g EXCLUDE = ../../include/libopencm3/efm32/doc-efm32g.h LAYOUT_FILE = DoxygenLayout_efm32g.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_efm32g.tex ================================================ FILE: firmware/libopencm3/doc/efm32g/DoxygenLayout_efm32g.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/efm32g/header_efm32g.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ EFM32 Gecko ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/efm32gg/Doxyfile ================================================ # HTML Documentation for efm32 code level # 11 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32gg.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32gg \ ../../lib/efm32/efm32gg EXCLUDE = LAYOUT_FILE = DoxygenLayout_efm32gg.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html \ GENERATE_TAGFILE = efm32gg.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/efm32gg/Doxyfile_latex ================================================ # LaTeX Documentation for efm32 code level # 12 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32gg_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32gg \ ../../lib/efm32/efm32gg EXCLUDE = ../../include/libopencm3/efm32/doc-efm32gg.h LAYOUT_FILE = DoxygenLayout_efm32gg.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_efm32gg.tex ================================================ FILE: firmware/libopencm3/doc/efm32gg/DoxygenLayout_efm32gg.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/efm32gg/header_efm32gg.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ EFM32 Giant Gecko ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/efm32lg/Doxyfile ================================================ # HTML Documentation for efm32 code level # 11 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32lg.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32lg \ ../../lib/efm32/efm32lg EXCLUDE = LAYOUT_FILE = DoxygenLayout_efm32lg.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html \ GENERATE_TAGFILE = efm32lg.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/efm32lg/Doxyfile_latex ================================================ # LaTeX Documentation for efm32 code level # 12 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32lg_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32lg \ ../../lib/efm32/efm32lg EXCLUDE = ../../include/libopencm3/efm32/doc-efm32lg.h LAYOUT_FILE = DoxygenLayout_efm32lg.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_efm32lg.tex ================================================ FILE: firmware/libopencm3/doc/efm32lg/DoxygenLayout_efm32lg.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/efm32lg/header_efm32lg.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ EFM32 Leopard Gecko ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/efm32tg/Doxyfile ================================================ # HTML Documentation for efm32 code level # 11 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32tg.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32tg \ ../../lib/efm32/efm32tg EXCLUDE = LAYOUT_FILE = DoxygenLayout_efm32tg.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html \ GENERATE_TAGFILE = efm32tg.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/efm32tg/Doxyfile_latex ================================================ # LaTeX Documentation for efm32 code level # 12 November 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_efm32tg_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/efm32/efm32tg \ ../../lib/efm32/efm32tg EXCLUDE = ../../include/libopencm3/efm32/doc-efm32tg.h LAYOUT_FILE = DoxygenLayout_efm32tg.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_efm32tg.tex ================================================ FILE: firmware/libopencm3/doc/efm32tg/DoxygenLayout_efm32tg.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/efm32tg/header_efm32tg.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ EFM32 Tiny Gecko ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/lm3s/Doxyfile ================================================ # HTML Documentation for LM3S code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lm3s.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/lm3s \ ../../lib/lm3s LAYOUT_FILE = DoxygenLayout_lm3s.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = lm3s.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/lm3s/Doxyfile_latex ================================================ # LaTeX Documentation for LM3S code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lm3s_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/lm3s \ ../../lib/lm3s EXCLUDE = ../../include/libopencm3/lm3s/doc-lm3s.h LAYOUT_FILE = DoxygenLayout_lm3s.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_lm3s.tex ================================================ FILE: firmware/libopencm3/doc/lm3s/DoxygenLayout_lm3s.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/lm3s/header_lm3s.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ TI LM3S ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/lm4f/Doxyfile ================================================ # HTML Documentation for LM3S code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lm4f.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/lm4f \ ../../lib/lm4f LAYOUT_FILE = DoxygenLayout_lm4f.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = lm4f.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/lm4f/Doxyfile_latex ================================================ # LaTeX Documentation for LM3S code level # 14 September 2012 # Copyright (C) Ken Sarkies # Copyright (C) 2012 Alexandru Gagniuc #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lm4f_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/lm4f \ ../../lib/lm4f EXCLUDE = ../../include/libopencm3/lm4f/doc-lm4f.h LAYOUT_FILE = DoxygenLayout_lm4f.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_lm4f.tex ================================================ FILE: firmware/libopencm3/doc/lm4f/DoxygenLayout_lm4f.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/lm4f/header_lm4f.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ TI LM4f ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/lpc13xx/Doxyfile ================================================ # HTML Documentation for LPC13xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc13xx.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc13xx \ ../../lib/lpc13xx LAYOUT_FILE = DoxygenLayout_lpc13xx.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = lpc13xx.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/lpc13xx/Doxyfile_latex ================================================ # LaTeX Documentation for LPC13xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc13xx_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc13xx/ \ ../../lib/lpc13xx EXCLUDE = ../../include/libopencm3/lpc13xx/doc-lpc13xx.h LAYOUT_FILE = DoxygenLayout_lpc13xx.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_lpc13xx.tex ================================================ FILE: firmware/libopencm3/doc/lpc13xx/DoxygenLayout_lpc13xx.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/lpc13xx/header_lpc13xx.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ NXP LPC13xx ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/lpc17xx/Doxyfile ================================================ # HTML Documentation for LPC17xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc17xx.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc17xx \ ../../lib/lpc17xx LAYOUT_FILE = DoxygenLayout_lpc17xx.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = lpc17xx.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/lpc17xx/Doxyfile_latex ================================================ # LaTeX Documentation for LPC17xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc17xx_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc17xx/ \ ../../lib/lpc17xx EXCLUDE = ../../include/libopencm3/lpc17xx/doc-lpc17xx.h LAYOUT_FILE = DoxygenLayout_lpc17xx.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_lpc17xx.tex ================================================ FILE: firmware/libopencm3/doc/lpc17xx/DoxygenLayout_lpc17xx.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/lpc17xx/header_lpc17xx.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ NXP LPC17xx ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/lpc43xx/Doxyfile ================================================ # HTML Documentation for LPC43xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc43xx.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc43xx \ ../../lib/lpc43xx LAYOUT_FILE = DoxygenLayout_lpc43xx.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = lpc43xx.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/lpc43xx/Doxyfile_latex ================================================ # LaTeX Documentation for LPC43xx code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_lpc43xx_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/lpc43xx/ \ ../../lib/lpc43xx EXCLUDE = ../../include/libopencm3/lpc43xx/doc-lpc43xx.h LAYOUT_FILE = DoxygenLayout_lpc43xx.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_lpc43xx.tex ================================================ FILE: firmware/libopencm3/doc/lpc43xx/DoxygenLayout_lpc43xx.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/lpc43xx/header_lpc43xx.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ NXP LPC43xx ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f0/Doxyfile ================================================ # HTML Documentation for STM32F1 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f0.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f0 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f0 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f0/usb.h \ ../../include/libopencm3/stm32/f0/usb_desc.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c LAYOUT_FILE = DoxygenLayout_stm32f0.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32f0.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32f0/Doxyfile_latex ================================================ # LaTeX Documentation for STM32F1 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f0_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f0 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f0 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f0/doc-stm32f0.h \ ../../include/libopencm3/stm32/f0/usb.h \ ../../include/libopencm3/stm32/f0/usb_desc.h \ ../../include/libopencm3/stm32/f0/nvic_f0.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c LAYOUT_FILE = DoxygenLayout_stm32f0.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32f0.tex ================================================ FILE: firmware/libopencm3/doc/stm32f0/DoxygenLayout_stm32f0.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32f0/header_stm32f0.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32F0 ARM Cortex M0 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f0/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/stm32f1/Doxyfile ================================================ # HTML Documentation for STM32F1 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f1.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f1 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f1 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f1/usb.h \ ../../include/libopencm3/stm32/f1/usb_desc.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c LAYOUT_FILE = DoxygenLayout_stm32f1.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32f1.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32f1/Doxyfile_latex ================================================ # LaTeX Documentation for STM32F1 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f1_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f1 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f1 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f1/doc-stm32f1.h \ ../../include/libopencm3/stm32/f1/usb.h \ ../../include/libopencm3/stm32/f1/usb_desc.h \ ../../include/libopencm3/stm32/f1/nvic_f1.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c LAYOUT_FILE = DoxygenLayout_stm32f1.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32f1.tex ================================================ FILE: firmware/libopencm3/doc/stm32f1/DoxygenLayout_stm32f1.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32f1/header_stm32f1.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32F1 ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f1/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/stm32f2/Doxyfile ================================================ # HTML Documentation for STM32F2 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f2.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f2 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f2 \ ../../lib/stm32/common EXCLUDE = EXCLUDE_PATTERNS = *_common_f13.h *_common_f13.c LAYOUT_FILE = DoxygenLayout_stm32f2.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32f2.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32f2/Doxyfile_latex ================================================ # LaTeX Documentation for STM32F2 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f2_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f2 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f2 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f2/doc-stm32f2.h EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_stm32f2.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32f2.tex ================================================ FILE: firmware/libopencm3/doc/stm32f2/DoxygenLayout_stm32f2.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32f2/header_stm32f2.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32F2 ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f2/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/stm32f3/Doxyfile ================================================ # HTML Documentation for STM32F3 code level #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f3.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f3 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f3 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f3/usb.h \ ../../include/libopencm3/stm32/f3/usb_desc.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c EXCLUDE_PATTERNS += *_common_f124.h *_common_f124.c EXCLUDE_PATTERNS += *_common_l1f24.h *_common_l1f24.c EXCLUDE_PATTERNS += *_common_bcd.h *_common_bcd.c LAYOUT_FILE = DoxygenLayout_stm32f3.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32f3.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32f3/Doxyfile_latex ================================================ # LaTeX Documentation for STM32F3 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f3_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f3 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f3 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f3/doc-stm32f3.h \ ../../include/libopencm3/stm32/f3/usb.h \ ../../include/libopencm3/stm32/f3/usb_desc.h \ ../../include/libopencm3/stm32/f3/nvic_f3.h EXCLUDE_PATTERNS = *_common_f24.h *_common_f24.c LAYOUT_FILE = DoxygenLayout_stm32f1.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32f3.tex ================================================ FILE: firmware/libopencm3/doc/stm32f3/DoxygenLayout_stm32f3.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32f3/header_stm32f3.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32F3 ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f3/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/stm32f4/Doxyfile ================================================ # HTML Documentation for STM32F4 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f4.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f4 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f4 \ ../../lib/stm32/common EXCLUDE = EXCLUDE_PATTERNS = *_common_f13.h *_common_f13.c LAYOUT_FILE = DoxygenLayout_stm32f4.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32f4.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32f4/Doxyfile_latex ================================================ # LaTeX Documentation for STM32F4 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32f4_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/f4 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/f4 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/f4/doc-stm32f4.h EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_stm32f4.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32f4.tex ================================================ FILE: firmware/libopencm3/doc/stm32f4/DoxygenLayout_stm32f4.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32f4/header_stm32f4.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32F4 ARM Cortex M4 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32f4/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/stm32l1/Doxyfile ================================================ # HTML Documentation for STM32L1 code level # 15 December 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32l1.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/l1 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/l1 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/common/gpio_common_f24.h \ ../../include/libopencm3/stm32/common/timer_common_f24.h EXCLUDE += ../../lib/stm32/common/gpio_common_f24.c \ ../../lib/stm32/common/timer_common_f24.c EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_stm32l1.xml TAGFILES = ../cm3/cm3.tag=../../cm3/html GENERATE_TAGFILE = stm32l1.tag ENABLE_PREPROCESSING = YES ================================================ FILE: firmware/libopencm3/doc/stm32l1/Doxyfile_latex ================================================ # LaTeX Documentation for STM32L1 code level # 14 September 2012 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_stm32l1_latex.log INPUT = ../../include/libopencm3/docmain.dox \ ../../include/libopencm3/license.dox \ ../../include/libopencm3/stm32/l1 \ ../../include/libopencm3/stm32/common INPUT += ../../lib/stm32/l1 \ ../../lib/stm32/common EXCLUDE = ../../include/libopencm3/stm32/l1/doc-stm32l1.h \ ../../include/libopencm3/stm32/common/gpio_common_f24.h EXCLUDE += ../../lib/stm32/common/gpio_common_f24.c EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_stm32l1.xml GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_stm32l1.tex ================================================ FILE: firmware/libopencm3/doc/stm32l1/DoxygenLayout_stm32l1.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/stm32l1/header_stm32l1.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ STM STM32L1 ARM Cortex M3 Series}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu Sep 13 2012 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/doc/stm32l1/index.html ================================================ Documentation index

================================================ FILE: firmware/libopencm3/doc/usb/Doxyfile ================================================ # HTML Documentation for USB code level # 10 March 2013 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_usb.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/usb INPUT += ../../lib/usb EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_usb.xml TAGFILES = GENERATE_TAGFILE = usb.tag ENABLE_PREPROCESSING = NO ================================================ FILE: firmware/libopencm3/doc/usb/Doxyfile_latex ================================================ # LaTeX Documentation for USB code level # 10 March 2013 # (C) Ken Sarkies #--------------------------------------------------------------------------- # Common Include File #--------------------------------------------------------------------------- @INCLUDE = ../Doxyfile_common #--------------------------------------------------------------------------- # Local settings #--------------------------------------------------------------------------- WARN_LOGFILE = doxygen_usb_latex.log WARN_LOGFILE = doxygen_usb.log INPUT = ../../include/libopencm3/license.dox \ ../../include/libopencm3/usb INPUT += ../../lib/usb EXCLUDE_PATTERNS = LAYOUT_FILE = DoxygenLayout_usb.xml TAGFILES = GENERATE_TAGFILE = usb.tag ENABLE_PREPROCESSING = NO GENERATE_HTML = NO GENERATE_LATEX = YES LATEX_HEADER = header_usb.tex ================================================ FILE: firmware/libopencm3/doc/usb/DoxygenLayout_usb.xml ================================================ ================================================ FILE: firmware/libopencm3/doc/usb/header_usb.tex ================================================ \documentclass{book} \usepackage[a4paper,top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \usepackage{makeidx} \usepackage{natbib} \usepackage{graphicx} \usepackage{multicol} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{ifthen} \usepackage[table]{xcolor} \usepackage{textcomp} \usepackage{alltt} \usepackage{ifpdf} \ifpdf \usepackage[pdftex, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \else \usepackage[ps2pdf, pagebackref=true, colorlinks=true, linkcolor=blue, unicode ]{hyperref} \usepackage{pspicture} \fi \usepackage[utf8]{inputenc} \usepackage{mathptmx} \usepackage[scaled=.90]{helvet} \usepackage{courier} \usepackage{sectsty} \usepackage{amssymb} \usepackage[titles]{tocloft} \usepackage{doxygen} \lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=4,numbers=left } \makeindex \setcounter{tocdepth}{3} \renewcommand{\footrulewidth}{0.4pt} \renewcommand{\familydefault}{\sfdefault} \hfuzz=15pt \setlength{\emergencystretch}{15pt} \hbadness=750 \tolerance=750 \begin{document} \hypersetup{pageanchor=false,citecolor=blue} \begin{titlepage} \vspace*{7cm} \begin{center} {\Huge libopencm3: API Reference\\ Cortex M3 Generic USB}\\ \vspace*{1cm} {\large Generated by Doxygen 1.8.2}\\ \vspace*{0.5cm} {\small Thu 10 March 2013 23:26:45}\\ \end{center} \end{titlepage} \pagenumbering{arabic} \hypersetup{pageanchor=true,citecolor=blue} ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/assert.h ================================================ /** @defgroup debugging Debugging @brief Macros and functions to aid in debugging @version 1.0.0 @date 25 September 2012 Two preprocessor defines control the behavior of assertion check macros in this module. They allow the choice between generated code size and ease of debugging. If NDEBUG is defined, all assertion checks are disabled and macros do not generate any code. If CM3_ASSERT_VERBOSE is defined, information regarding the position of assertion checks will be stored in the binary, allowing for more informative error messages, but also significantly increased code size. As default assertion checks do not use this information it is only useful if the application linked with libopencm3 defines its own cm3_assert_failed_verbose() implementation. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Tomaz Solc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_CM3_ASSERT_H #define LIBOPENCM3_CM3_ASSERT_H #include #define CM3_LIKELY(expr) (__builtin_expect(!!(expr), 1)) #ifdef NDEBUG # define cm3_assert(expr) (void)0 # define cm3_assert_not_reached() do { } while (1) #else # ifdef CM3_ASSERT_VERBOSE # define cm3_assert(expr) do { \ if (CM3_LIKELY(expr)) { \ (void)0; \ } else { \ cm3_assert_failed_verbose( \ __FILE__, __LINE__, \ __func__, #expr); \ } \ } while (0) # define cm3_assert_not_reached() \ cm3_assert_failed_verbose( \ __FILE__, __LINE__, \ __func__, 0) # else /** @brief Check if assertion is true. * * If NDEBUG macro is defined, this macro generates no code. Otherwise * cm3_assert_failed() or cm3_assert_failed_verbose() is called if assertion * is false. * * The purpose of this macro is to aid in debugging libopencm3 and * applications using it. It can be used for example to check if function * arguments are within expected ranges and stop execution in case an * unexpected state is reached. * * @param expr expression to check */ # define cm3_assert(expr) do { \ if (CM3_LIKELY(expr)) { \ (void)0; \ } else { \ cm3_assert_failed(); \ } \ } while (0) /** @brief Check if unreachable code is reached. * * If NDEBUG macro is defined, this macro generates code for an infinite loop. * Otherwise cm3_assert_failed() or cm3_assert_failed_verbose() is called if * the macro is ever reached. * * The purpose of this macro is to aid in debugging libopencm3 and * applications using it. It can be used for example to stop execution if an * unreachable portion of code is reached. */ # define cm3_assert_not_reached() cm3_assert_failed() # endif #endif BEGIN_DECLS /** @brief Called on a failed assertion. * * Halts execution in an infinite loop. This function never returns. * * Defined as a weak symbol, so applications can define their own * implementation. Usually, a custom implementation of this function should * report an error in some way (print a message to a debug console, display, * LED, ...) and halt execution or reboot the device. */ void cm3_assert_failed(void) __attribute__((__noreturn__)); /** @brief Called on a failed assertion with verbose messages enabled. * * Halts execution in an infinite loop. This function never returns. * * Defined as a weak symbol, so applications can define their own * implementation. Usually, a custom implementation of this function should * report an error in some way (print a message to a debug console, display, * LED, ...) and halt execution or reboot the device. * * @param file File name where the failed assertion occurred * @param line Line number where the failed assertion occurred * @param func Name of the function where the failed assertion occurred * @param assert_expr Expression that evaluated to false (can be NULL) */ void cm3_assert_failed_verbose(const char *file, int line, const char *func, const char *assert_expr) __attribute__((__noreturn__)); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/common.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_COMMON_H #define LIBOPENCM3_CM3_COMMON_H #include #include /* This must be placed around external function declaration for C++ * support. */ #ifdef __cplusplus # define BEGIN_DECLS extern "C" { # define END_DECLS } #else # define BEGIN_DECLS # define END_DECLS #endif /* Full-featured deprecation attribute with fallback for older compilers. */ #ifdef __GNUC__ # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) # define LIBOPENCM3_DEPRECATED(x) __attribute__((deprecated(x))) # else # define LIBOPENCM3_DEPRECATED(x) __attribute__((deprecated)) # endif #else # define LIBOPENCM3_DEPRECATED(x) #endif /* Generic memory-mapped I/O accessor functions */ #define MMIO8(addr) (*(volatile uint8_t *)(addr)) #define MMIO16(addr) (*(volatile uint16_t *)(addr)) #define MMIO32(addr) (*(volatile uint32_t *)(addr)) #define MMIO64(addr) (*(volatile uint64_t *)(addr)) /* Generic bit-band I/O accessor functions */ #define BBIO_SRAM(addr, bit) \ MMIO8(((addr) & 0x0FFFFF) * 32 + 0x22000000 + (bit) * 4) #define BBIO_PERIPH(addr, bit) \ MMIO8(((addr) & 0x0FFFFF) * 32 + 0x42000000 + (bit) * 4) /* Generic bit definition */ #define BIT0 (1<<0) #define BIT1 (1<<1) #define BIT2 (1<<2) #define BIT3 (1<<3) #define BIT4 (1<<4) #define BIT5 (1<<5) #define BIT6 (1<<6) #define BIT7 (1<<7) #define BIT8 (1<<8) #define BIT9 (1<<9) #define BIT10 (1<<10) #define BIT11 (1<<11) #define BIT12 (1<<12) #define BIT13 (1<<13) #define BIT14 (1<<14) #define BIT15 (1<<15) #define BIT16 (1<<16) #define BIT17 (1<<17) #define BIT18 (1<<18) #define BIT19 (1<<19) #define BIT20 (1<<20) #define BIT21 (1<<21) #define BIT22 (1<<22) #define BIT23 (1<<23) #define BIT24 (1<<24) #define BIT25 (1<<25) #define BIT26 (1<<26) #define BIT27 (1<<27) #define BIT28 (1<<28) #define BIT29 (1<<29) #define BIT30 (1<<30) #define BIT31 (1<<31) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/cortex.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Ben Gamari * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CORTEX_H #define LIBOPENCM3_CORTEX_H static inline void cm_enable_interrupts(void) { __asm__("CPSIE I\n"); } static inline void cm_disable_interrupts(void) { __asm__("CPSID I\n"); } #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/doc-cm3.h ================================================ /** @mainpage libopencm3 Core CM3 @version 1.0.0 @date 14 September 2012 API documentation for Cortex M3 core features. LGPL License Terms @ref lgpl_license */ /** @defgroup CM3_defines CM3 Defines @brief Defined Constants and Types for Cortex M3 core features @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/fpb.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_FPB_H #define LIBOPENCM3_CM3_FPB_H /* Cortex-M3 Flash Patch and Breakpoint (FPB) unit */ /* Those defined only on ARMv7 and above */ #if !defined(__ARM_ARCH_7M__) || !defined(__ARM_ARCH_7EM__) #error "Flash Patch and Breakpoint not available in CM0" #endif /* Note: We always use "FPB" as abbreviation, docs sometimes use only "FP". */ /* --- FPB registers ------------------------------------------------------- */ /* Flash Patch Control (FPB_CTRL) */ #define FPB_CTRL MMIO32(FPB_BASE + 0) /* Flash Patch Remap (FPB_REMAP) */ #define FPB_REMAP MMIO32(FPB_BASE + 4) /* Flash Patch Comparator (FPB_COMPx) */ #define FPB_COMP (&MMIO32(FPB_BASE + 8)) /* TODO: PID, CID */ /* --- FPB_CTRL values ----------------------------------------------------- */ /* Bits [31:15]: Reserved, read as zero, writes ignored */ #define FPB_CTRL_NUM_CODE2_MASK (0x7 << 12) #define FPB_CTRL_NUM_LIT_MASK (0xf << 8) #define FPB_CTRL_NUM_CODE1_MASK (0xf << 4) /* Bits [3:2]: Reserved */ #define FPB_CTRL_KEY (1 << 1) #define FPB_CTRL_ENABLE (1 << 0) /* --- FPB_REMAP values ---------------------------------------------------- */ /* TODO */ /* --- FPB_COMPx values ---------------------------------------------------- */ #define FPB_COMP_REPLACE_REMAP (0x0 << 30) #define FPB_COMP_REPLACE_BREAK_LOWER (0x1 << 30) #define FPB_COMP_REPLACE_BREAK_UPPER (0x2 << 30) #define FPB_COMP_REPLACE_BREAK_BOTH (0x3 << 30) #define FPB_COMP_REPLACE_MASK (0x3 << 30) /* Bit 29: Reserved */ /* TODO */ /* Bit 1: Reserved */ #define FPB_COMP_ENABLE (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/itm.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_ITM_H #define LIBOPENCM3_CM3_ITM_H /* Cortex-M3 Instrumentation Trace Macrocell (ITM) */ /* Those defined only on ARMv7 and above */ #if !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) #error "Instrumentation Trace Macrocell not available in CM0" #endif /* --- ITM registers ------------------------------------------------------- */ /* Stimulus Port x (ITM_STIM[x]) */ #define ITM_STIM (&MMIO32(ITM_BASE)) /* Trace Enable ports (ITM_TER[x]) */ #define ITM_TER (&MMIO32(ITM_BASE + 0xE00)) /* Trace Privilege (ITM_TPR) */ #define ITM_TPR MMIO32(ITM_BASE + 0xE40) /* Trace Control (ITM_TCR) */ #define ITM_TCR MMIO32(ITM_BASE + 0xE80) /* TODO: PID, CID */ /* --- ITM_STIM values ----------------------------------------------------- */ /* Bits 31:0 - Write to port FIFO for forwarding as software event packet */ /* Bits 31:1 - RAZ */ #define ITM_STIM_FIFOREADY (1 << 0) /* --- ITM_TER values ------------------------------------------------------ */ /* Bits 31:0 - Stimulus port #N is enabled with STIMENA[N] is set */ /* --- ITM_TPR values ------------------------------------------------------ */ /* * Bits 31:0 - Bit [N] of PRIVMASK controls stimulus ports 8N to 8N+7 * 0: User access allowed to stimulus ports * 1: Privileged access only to stimulus ports */ /* --- ITM_TCR values ------------------------------------------------------ */ /* Bits 31:24 - Reserved */ #define ITM_TCR_BUSY (1 << 23) #define ITM_TCR_TRACE_BUS_ID_MASK (0x3f << 16) /* Bits 15:10 - Reserved */ #define ITM_TCR_TSPRESCALE_NONE (0 << 8) #define ITM_TCR_TSPRESCALE_DIV4 (1 << 8) #define ITM_TCR_TSPRESCALE_DIV16 (2 << 8) #define ITM_TCR_TSPRESCALE_DIV64 (3 << 8) #define ITM_TCR_TSPRESCALE_MASK (3 << 8) /* Bits 7:5 - Reserved */ #define ITM_TCR_SWOENA (1 << 4) #define ITM_TCR_TXENA (1 << 3) #define ITM_TCR_SYNCENA (1 << 2) #define ITM_TCR_TSENA (1 << 1) #define ITM_TCR_ITMENA (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_MEMORYMAP_H #define LIBOPENCM3_CM3_MEMORYMAP_H /* --- ARM Cortex-M0, M3 and M4 specific definitions ----------------------- */ /* Private peripheral bus - Internal */ #define PPBI_BASE 0xE0000000 /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* ITM: Instrumentation Trace Macrocell */ #define ITM_BASE (PPBI_BASE + 0x0000) /* DWT: Data Watchpoint and Trace unit */ #define DWT_BASE (PPBI_BASE + 0x1000) /* FPB: Flash Patch and Breakpoint unit */ #define FPB_BASE (PPBI_BASE + 0x2000) #endif /* PPBI_BASE + 0x3000 (0xE000 3000 - 0xE000 DFFF): Reserved */ #define SCS_BASE (PPBI_BASE + 0xE000) /* PPBI_BASE + 0xF000 (0xE000 F000 - 0xE003 FFFF): Reserved */ /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) #define TPIU_BASE (PPBI_BASE + 0x40000) #endif /* --- ITM: Instrumentation Trace Macrocell --- */ /* TODO */ /* --- DWT: Data Watchpoint and Trace unit --- */ /* TODO */ /* --- FPB: Flash Patch and Breakpoint unit --- */ /* TODO */ /* --- SCS: System Control Space --- */ /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* ITR: Interrupt Type Register */ #define ITR_BASE (SCS_BASE + 0x0000) #endif /* SYS_TICK: System Timer */ #define SYS_TICK_BASE (SCS_BASE + 0x0010) /* NVIC: Nested Vector Interrupt Controller */ #define NVIC_BASE (SCS_BASE + 0x0100) /* SCB: System Control Block */ #define SCB_BASE (SCS_BASE + 0x0D00) #ifdef CM0_PLUS /* MPU: Memory protection unit */ #define MPU_BASE (SCS_BASE + 0x0D90) #endif /* Those defined only on CM0*/ #if defined(__ARM_ARCH_6M__) /* DEBUG: Debug control and configuration */ #define DEBUG_BASE (SCS_BASE + 0x0DF0) #endif /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* STE: Software Trigger Interrupt Register */ #define STIR_BASE (SCS_BASE + 0x0F00) /* ID: ID space */ #define ID_BASE (SCS_BASE + 0x0FD0) #endif #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/mpu.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM0_MPU_H #define LIBOPENCM3_CM0_MPU_H #ifndef CM0_PLUS #error "mpu is supported only on CM0+ architecture" #else #include #include /* --- SCB: Registers ------------------------------------------------------ */ #define MPU_TYPE MMIO32(MPU_BASE + 0x00) #define MPU_CTRL MMIO32(MPU_BASE + 0x04) #define MPU_RNR MMIO32(MPU_BASE + 0x08) #define MPU_RBAR MMIO32(MPU_BASE + 0x0C) #define MPU_RASR MMIO32(MPU_BASE + 0x10) /* --- MPU values ---------------------------------------------------------- */ /* --- MPU_TYPE values ----------------------------------------------------- */ #define MPU_TYPE_IREGION_LSB 16 #define MPU_TYPE_IREGION (0xFF << MPU_TYPE_IREGION_LSB) #define MPU_TYPE_DREGION_LSB 8 #define MPU_TYPE_DREGION (0xFF << MPU_TYPE_DREGION_LSB) #define MPU_TYPE_SEPARATE (1<<0) /* --- MPU_CTRL values ----------------------------------------------------- */ #define MPU_CTRL_PRIVDEFENA (1<<2) #define MPU_CTRL_HFNMIENA (1<<1) #define MPU_CTRL_ENABLE (1<<0) /* --- MPU_RNR values ------------------------------------------------------ */ #define MPU_RNR_REGION_LSB 0 #define MPU_RNR_REGION (0xFF << MPU_RNR_REGION_LSB) /* --- MPU_RBAR values ----------------------------------------------------- */ #define MPU_RBAR_ADDR_LSB 8 #define MPU_RBAR_ADDR (0x00FFFFFF << MPU_RBAR_REGION_LSB) #define MPU_RBAR_VALID (1<<4) #define MPU_RBAR_REGION_LSB 0 #define MPU_RBAR_REGION (0xF << MPU_RBAR_REGION_LSB) /* --- MPU_RASR values ----------------------------------------------------- */ #define MPU_RASR_ATTRS_LSB 16 #define MPU_RASR_ATTRS (0xFFFF << MPU_RASR_ATTRS_LSB) #define MPU_RASR_SRD_LSB 8 #define MPU_RASR_SRD (0xFF << MPU_RASR_SRD_LSB) #define MPU_RASR_SIZE_LSB 1 #define MPU_RASR_SIZE (0x1F << MPU_RASR_SIZE_LSB) #define MPU_RASR_ENABLE (1 << 0) #define MPU_RASR_ATTR_XN (1 << 28) #define MPU_RASR_ATTR_AP (7 << 24) #define MPU_RASR_ATTR_AP_PNO_UNO (0 << 24) #define MPU_RASR_ATTR_AP_PRW_UNO (1 << 24) #define MPU_RASR_ATTR_AP_PRW_URO (2 << 24) #define MPU_RASR_ATTR_AP_PRW_URW (3 << 24) #define MPU_RASR_ATTR_AP_PRO_UNO (5 << 24) #define MPU_RASR_ATTR_AP_PRO_URO (6 << 24) #define MPU_RASR_ATTR_AP_PRO_URO (7 << 24) #define MPU_RASR_ATTR_TEX (7 << 19) #define MPU_RASR_ATTR_S (1 << 18) #define MPU_RASR_ATTR_C (1 << 17) #define MPU_RASR_ATTR_B (1 << 16) #define MPU_RASR_ATTR_SCB (7 << 16) #define MPU_RASR_ATTR_SCB_SH_STRONG (0 << 16) #define MPU_RASR_ATTR_SCB_SH_DEVICE (1 << 16) #define MPU_RASR_ATTR_SCB_NSH_WT (2 << 16) #define MPU_RASR_ATTR_SCB_NSH_WB (3 << 16) #define MPU_RASR_ATTR_SCB_SH_STRONG (4 << 16) #define MPU_RASR_ATTR_SCB_SH_DEVICE (5 << 16) #define MPU_RASR_ATTR_SCB_SH_WT (6 << 16) #define MPU_RASR_ATTR_SCB_SH_WB (7 << 16) /* --- MPU functions ------------------------------------------------------- */ BEGIN_DECLS END_DECLS #endif /* CM0_PLUS */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/scb.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SCB_H #define LIBOPENCM3_SCB_H #include #include /* --- SCB: Registers ------------------------------------------------------ */ /* CPUID: CPUID base register */ #define SCB_CPUID MMIO32(SCB_BASE + 0x00) /* ICSR: Interrupt Control State Register */ #define SCB_ICSR MMIO32(SCB_BASE + 0x04) /* VTOR: Vector Table Offset Register */ #define SCB_VTOR MMIO32(SCB_BASE + 0x08) /* AIRCR: Application Interrupt and Reset Control Register */ #define SCB_AIRCR MMIO32(SCB_BASE + 0x0C) /* SCR: System Control Register */ #define SCB_SCR MMIO32(SCB_BASE + 0x10) /* CCR: Configuration Control Register */ #define SCB_CCR MMIO32(SCB_BASE + 0x14) /* SHP: System Handler Priority Registers */ /* Note: 12 8bit registers */ #define SCB_SHPR(shpr_id) MMIO8(SCB_BASE + 0x18 + shpr_id) #define SCB_SHPR1 MMIO32(SCB_BASE + 0x18) #define SCB_SHPR2 MMIO32(SCB_BASE + 0x1C) #define SCB_SHPR3 MMIO32(SCB_BASE + 0x20) /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* SHCSR: System Handler Control and State Register */ #define SCB_SHCSR MMIO32(SCB_BASE + 0x24) /* CFSR: Configurable Fault Status Registers */ #define SCB_CFSR MMIO32(SCB_BASE + 0x28) /* HFSR: Hard Fault Status Register */ #define SCB_HFSR MMIO32(SCB_BASE + 0x2C) /* DFSR: Debug Fault Status Register */ #define SCB_DFSR MMIO32(SCB_BASE + 0x30) /* MMFAR: Memory Manage Fault Address Register */ #define SCB_MMFAR MMIO32(SCB_BASE + 0x34) /* BFAR: Bus Fault Address Register */ #define SCB_BFAR MMIO32(SCB_BASE + 0x38) /* AFSR: Auxiliary Fault Status Register */ #define SCB_AFSR MMIO32(SCB_BASE + 0x3C) /* ID_PFR0: Processor Feature Register 0 */ #define SCB_ID_PFR0 MMIO32(SCB_BASE + 0x40) /* ID_PFR1: Processor Feature Register 1 */ #define SCB_ID_PFR1 MMIO32(SCB_BASE + 0x44) /* ID_DFR0: Debug Features Register 0 */ #define SCB_ID_DFR0 MMIO32(SCB_BASE + 0x48) /* ID_AFR0: Auxiliary Features Register 0 */ #define SCB_ID_AFR0 MMIO32(SCB_BASE + 0x4C) /* ID_MMFR0: Memory Model Feature Register 0 */ #define SCB_ID_MMFR0 MMIO32(SCB_BASE + 0x50) /* ID_MMFR1: Memory Model Feature Register 1 */ #define SCB_ID_MMFR1 MMIO32(SCB_BASE + 0x54) /* ID_MMFR2: Memory Model Feature Register 2 */ #define SCB_ID_MMFR2 MMIO32(SCB_BASE + 0x58) /* ID_MMFR3: Memory Model Feature Register 3 */ #define SCB_ID_MMFR3 MMIO32(SCB_BASE + 0x5C) /* ID_ISAR0: Instruction Set Attributes Register 0 */ #define SCB_ID_ISAR0 MMIO32(SCB_BASE + 0x60) /* ID_ISAR1: Instruction Set Attributes Register 1 */ #define SCB_ID_ISAR1 MMIO32(SCB_BASE + 0x64) /* ID_ISAR2: Instruction Set Attributes Register 2 */ #define SCB_ID_ISAR2 MMIO32(SCB_BASE + 0x68) /* ID_ISAR3: Instruction Set Attributes Register 3 */ #define SCB_ID_ISAR3 MMIO32(SCB_BASE + 0x6C) /* ID_ISAR4: Instruction Set Attributes Register 4 */ #define SCB_ID_ISAR4 MMIO32(SCB_BASE + 0x70) /* CPACR: Coprocessor Access Control Register */ #define SCB_CPACR MMIO32(SCB_BASE + 0x88) /* FPCCR: Floating-Point Context Control Register */ #define SCB_FPCCR MMIO32(SCB_BASE + 0x234) /* FPCAR: Floating-Point Context Address Register */ #define SCB_FPCAR MMIO32(SCB_BASE + 0x238) /* FPDSCR: Floating-Point Default Status Control Register */ #define SCB_FPDSCR MMIO32(SCB_BASE + 0x23C) /* MVFR0: Media and Floating-Point Feature Register 0 */ #define SCB_MVFR0 MMIO32(SCB_BASE + 0x240) /* MVFR1: Media and Floating-Point Feature Register 1 */ #define SCB_MVFR1 MMIO32(SCB_BASE + 0x244) #endif /* --- SCB values ---------------------------------------------------------- */ /* --- SCB_CPUID values ---------------------------------------------------- */ /* Implementer[31:24]: Implementer code */ #define SCB_CPUID_IMPLEMENTER_LSB 24 #define SCB_CPUID_IMPLEMENTER (0xFF << SCB_CPUID_IMPLEMENTER_LSB) /* Variant[23:20]: Variant number */ #define SCB_CPUID_VARIANT_LSB 20 #define SCB_CPUID_VARIANT (0xF << SCB_CPUID_VARIANT_LSB) /* Constant[19:16]: Reads as 0xF (ARMv7-M) M3, M4 */ /* Constant[19:16]: Reads as 0xC (ARMv6-M) M0, M0+ */ #define SCB_CPUID_CONSTANT_LSB 16 #define SCB_CPUID_CONSTANT (0xF << SCB_CPUID_CONSTANT_LSB) #define SCB_CPUID_CONSTANT_ARMV6 (0xC << SCB_CPUID_CONSTANT_LSB) #define SCB_CPUID_CONSTANT_ARMV7 (0xF << SCB_CPUID_CONSTANT_LSB) /* PartNo[15:4]: Part number of the processor */ #define SCB_CPUID_PARTNO_LSB 4 #define SCB_CPUID_PARTNO (0xFFF << SCB_CPUID_PARTNO_LSB) /* Revision[3:0]: Revision number */ #define SCB_CPUID_REVISION_LSB 0 #define SCB_CPUID_REVISION (0xF << SCB_CPUID_REVISION_LSB) /* --- SCB_ICSR values ----------------------------------------------------- */ /* NMIPENDSET: NMI set-pending bit */ #define SCB_ICSR_NMIPENDSET (1 << 31) /* Bits [30:29]: reserved - must be kept cleared */ /* PENDSVSET: PendSV set-pending bit */ #define SCB_ICSR_PENDSVSET (1 << 28) /* PENDSVCLR: PendSV clear-pending bit */ #define SCB_ICSR_PENDSVCLR (1 << 27) /* PENDSTSET: SysTick exception set-pending bit */ #define SCB_ICSR_PENDSTSET (1 << 26) /* PENDSTCLR: SysTick exception clear-pending bit */ #define SCB_ICSR_PENDSTCLR (1 << 25) /* Bit 24: reserved - must be kept cleared */ /* Bit 23: reserved for debug - reads as 0 when not in debug mode */ #define SCB_ICSR_ISRPREEMPT (1 << 23) /* ISRPENDING: Interrupt pending flag, excluding NMI and Faults */ #define SCB_ICSR_ISRPENDING (1 << 22) /* VECTPENDING[21:12] Pending vector */ #define SCB_ICSR_VECTPENDING_LSB 12 #define SCB_ICSR_VECTPENDING (0x1FF << SCB_ICSR_VECTPENDING_LSB) /* RETOBASE: Return to base level */ #define SCB_ICSR_RETOBASE (1 << 11) /* Bits [10:9]: reserved - must be kept cleared */ /* VECTACTIVE[8:0] Active vector */ #define SCB_ICSR_VECTACTIVE_LSB 0 #define SCB_ICSR_VECTACTIVE (0x1FF << SCB_ICSR_VECTACTIVE_LSB) /* --- SCB_VTOR values ----------------------------------------------------- */ /* IMPLEMENTATION DEFINED */ #if defined(__ARM_ARCH_6M__) #define SCB_VTOR_TBLOFF_LSB 7 #define SCB_VTOR_TBLOFF (0x1FFFFFF << SCB_VTOR_TBLOFF_LSB) #elif defined(CM1) /* VTOR not defined there */ #elif defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* Bits [31:30]: reserved - must be kept cleared */ /* TBLOFF[29:9]: Vector table base offset field */ /* inconsistent datasheet - LSB could be 11 */ /* BUG: TBLOFF is in the ARMv6 Architecture reference manual defined from b7 */ #define SCB_VTOR_TBLOFF_LSB 9 #define SCB_VTOR_TBLOFF (0x7FFFFF << SCB_VTOR_TBLOFF_LSB) #endif /* --- SCB_AIRCR values ---------------------------------------------------- */ /* VECTKEYSTAT[31:16]/ VECTKEY[31:16] Register key */ #define SCB_AIRCR_VECTKEYSTAT_LSB 16 #define SCB_AIRCR_VECTKEYSTAT (0xFFFF << SCB_AIRCR_VECTKEYSTAT_LSB) #define SCB_AIRCR_VECTKEY (0x05FA << SCB_AIRCR_VECTKEYSTAT_LSB) /* ENDIANESS Data endianness bit */ #define SCB_AIRCR_ENDIANESS (1 << 15) /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* Bits [14:11]: reserved - must be kept cleared */ /* PRIGROUP[10:8]: Interrupt priority grouping field */ #define SCB_AIRCR_PRIGROUP_GROUP16_NOSUB (0x3 << 8) #define SCB_AIRCR_PRIGROUP_GROUP8_SUB2 (0x4 << 8) #define SCB_AIRCR_PRIGROUP_GROUP4_SUB4 (0x5 << 8) #define SCB_AIRCR_PRIGROUP_GROUP2_SUB8 (0x6 << 8) #define SCB_AIRCR_PRIGROUP_NOGROUP_SUB16 (0x7 << 8) #define SCB_AIRCR_PRIGROUP_MASK (0x7 << 8) #define SCB_AIRCR_PRIGROUP_SHIFT 8 /* Bits [7:3]: reserved - must be kept cleared */ #endif /* SYSRESETREQ System reset request */ #define SCB_AIRCR_SYSRESETREQ (1 << 2) /* VECTCLRACTIVE */ #define SCB_AIRCR_VECTCLRACTIVE (1 << 1) /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* VECTRESET */ #define SCB_AIRCR_VECTRESET (1 << 0) #endif /* --- SCB_SCR values ------------------------------------------------------ */ /* Bits [31:5]: reserved - must be kept cleared */ /* SEVEONPEND Send Event on Pending bit */ #define SCB_SCR_SEVEONPEND (1 << 4) /* Bit 3: reserved - must be kept cleared */ /* SLEEPDEEP */ #define SCB_SCR_SLEEPDEEP (1 << 2) /* SLEEPONEXIT */ #define SCB_SCR_SLEEPONEXIT (1 << 1) /* Bit 0: reserved - must be kept cleared */ /* --- SCB_CCR values ------------------------------------------------------ */ /* Bits [31:10]: reserved - must be kept cleared */ /* STKALIGN */ #define SCB_CCR_STKALIGN (1 << 9) /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* BFHFNMIGN */ #define SCB_CCR_BFHFNMIGN (1 << 8) /* Bits [7:5]: reserved - must be kept cleared */ /* DIV_0_TRP */ #define SCB_CCR_DIV_0_TRP (1 << 4) #endif /* UNALIGN_TRP */ #define SCB_CCR_UNALIGN_TRP (1 << 3) /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* Bit 2: reserved - must be kept cleared */ /* USERSETMPEND */ #define SCB_CCR_USERSETMPEND (1 << 1) /* NONBASETHRDENA */ #define SCB_CCR_NONBASETHRDENA (1 << 0) #endif /* These numbers are designed to be used with the SCB_SHPR() macro */ /* SCB_SHPR1 */ #define SCB_SHPR_PRI_4_MEMMANAGE 0 #define SCB_SHPR_PRI_5_BUSFAULT 1 #define SCB_SHPR_PRI_6_USAGEFAULT 2 #define SCB_SHPR_PRI_7_RESERVED 3 /* SCB_SHPR2 */ #define SCB_SHPR_PRI_8_RESERVED 4 #define SCB_SHPR_PRI_9_RESERVED 5 #define SCB_SHPR_PRI_10_RESERVED 6 #define SCB_SHPR_PRI_11_SVCALL 7 /* SCB_SHPR3 */ #define SCB_SHPR_PRI_12_RESERVED 8 #define SCB_SHPR_PRI_13_RESERVED 9 #define SCB_SHPR_PRI_14_PENDSV 10 #define SCB_SHPR_PRI_15_SYSTICK 11 /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) /* --- SCB_SHCSR values ---------------------------------------------------- */ /* Bits [31:19]: reserved - must be kept cleared */ /* USGFAULTENA: Usage fault enable */ #define SCB_SHCSR_USGFAULTENA (1 << 18) /* BUSFAULTENA: Bus fault enable */ #define SCB_SHCSR_BUSFAULTENA (1 << 17) /* MEMFAULTENA: Memory management fault enable */ #define SCB_SHCSR_MEMFAULTENA (1 << 16) /* SVCALLPENDED: SVC call pending */ #define SCB_SHCSR_SVCALLPENDED (1 << 15) /* BUSFAULTPENDED: Bus fault exception pending */ #define SCB_SHCSR_BUSFAULTPENDED (1 << 14) /* MEMFAULTPENDED: Memory management fault exception pending */ #define SCB_SHCSR_MEMFAULTPENDED (1 << 13) /* USGFAULTPENDED: Usage fault exception pending */ #define SCB_SHCSR_USGFAULTPENDED (1 << 12) /* SYSTICKACT: SysTick exception active */ #define SCB_SHCSR_SYSTICKACT (1 << 11) /* PENDSVACT: PendSV exception active */ #define SCB_SHCSR_PENDSVACT (1 << 10) /* Bit 9: reserved - must be kept cleared */ /* MONITORACT: Debug monitor active */ #define SCB_SHCSR_MONITORACT (1 << 8) /* SVCALLACT: SVC call active */ #define SCB_SHCSR_SVCALLACT (1 << 7) /* Bits [6:4]: reserved - must be kept cleared */ /* USGFAULTACT: Usage fault exception active */ #define SCB_SHCSR_USGFAULTACT (1 << 3) /* Bit 2: reserved - must be kept cleared */ /* BUSFAULTACT: Bus fault exception active */ #define SCB_SHCSR_BUSFAULTACT (1 << 1) /* MEMFAULTACT: Memory management fault exception active */ #define SCB_SHCSR_MEMFAULTACT (1 << 0) /* --- SCB_CFSR values ----------------------------------------------------- */ /* Bits [31:26]: reserved - must be kept cleared */ /* DIVBYZERO: Divide by zero usage fault */ #define SCB_CFSR_DIVBYZERO (1 << 25) /* UNALIGNED: Unaligned access usage fault */ #define SCB_CFSR_UNALIGNED (1 << 24) /* Bits [23:20]: reserved - must be kept cleared */ /* NOCP: No coprocessor usage fault */ #define SCB_CFSR_NOCP (1 << 19) /* INVPC: Invalid PC load usage fault */ #define SCB_CFSR_INVPC (1 << 18) /* INVSTATE: Invalid state usage fault */ #define SCB_CFSR_INVSTATE (1 << 17) /* UNDEFINSTR: Undefined instruction usage fault */ #define SCB_CFSR_UNDEFINSTR (1 << 16) /* BFARVALID: Bus Fault Address Register (BFAR) valid flag */ #define SCB_CFSR_BFARVALID (1 << 15) /* Bits [14:13]: reserved - must be kept cleared */ /* STKERR: Bus fault on stacking for exception entry */ #define SCB_CFSR_STKERR (1 << 12) /* UNSTKERR: Bus fault on unstacking for a return from exception */ #define SCB_CFSR_UNSTKERR (1 << 11) /* IMPRECISERR: Imprecise data bus error */ #define SCB_CFSR_IMPRECISERR (1 << 10) /* PRECISERR: Precise data bus error */ #define SCB_CFSR_PRECISERR (1 << 9) /* IBUSERR: Instruction bus error */ #define SCB_CFSR_IBUSERR (1 << 8) /* MMARVALID: Memory Management Fault Address Register (MMAR) valid flag */ #define SCB_CFSR_MMARVALID (1 << 7) /* Bits [6:5]: reserved - must be kept cleared */ /* MSTKERR: Memory manager fault on stacking for exception entry */ #define SCB_CFSR_MSTKERR (1 << 4) /* MUNSTKERR: Memory manager fault on unstacking for a return from exception */ #define SCB_CFSR_MUNSTKERR (1 << 3) /* Bit 2: reserved - must be kept cleared */ /* DACCVIOL: Data access violation flag */ #define SCB_CFSR_DACCVIOL (1 << 1) /* IACCVIOL: Instruction access violation flag */ #define SCB_CFSR_IACCVIOL (1 << 0) /* --- SCB_HFSR values ----------------------------------------------------- */ /* DEBUG_VT: reserved for debug use */ #define SCB_HFSR_DEBUG_VT (1 << 31) /* FORCED: Forced hard fault */ #define SCB_HFSR_FORCED (1 << 30) /* Bits [29:2]: reserved - must be kept cleared */ /* VECTTBL: Vector table hard fault */ #define SCB_HFSR_VECTTBL (1 << 1) /* Bit 0: reserved - must be kept cleared */ /* --- SCB_MMFAR values ---------------------------------------------------- */ /* MMFAR [31:0]: Memory management fault address */ /* --- SCB_BFAR values ----------------------------------------------------- */ /* BFAR [31:0]: Bus fault address */ /* --- SCB_CPACR values ---------------------------------------------------- */ /* CPACR CPn: Access privileges values */ #define SCB_CPACR_NONE 0 /* Access denied */ #define SCB_CPACR_PRIV 1 /* Privileged access only */ #define SCB_CPACR_FULL 3 /* Full access */ /* CPACR [20:21]: Access privileges for coprocessor 10 */ #define SCB_CPACR_CP10 (1 << 20) /* CPACR [22:23]: Access privileges for coprocessor 11 */ #define SCB_CPACR_CP11 (1 << 22) #endif /* --- SCB functions ------------------------------------------------------- */ BEGIN_DECLS struct scb_exception_stack_frame { uint32_t r0; uint32_t r1; uint32_t r2; uint32_t r3; uint32_t r12; uint32_t lr; uint32_t pc; uint32_t xpsr; } __attribute__((packed)); #define SCB_GET_EXCEPTION_STACK_FRAME(f) \ do { \ asm volatile ("mov %[frameptr], sp" \ : [frameptr]"=r" (f)); \ } while (0) void scb_reset_system(void) __attribute__((noreturn, naked)); /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) void scb_reset_core(void) __attribute__((noreturn, naked)); void scb_set_priority_grouping(uint32_t prigroup); #endif END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/scs.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_SCS_H #define LIBOPENCM3_CM3_SCS_H /* * All the definition hereafter are generic for CortexMx ARMv7-M * See ARM document "ARMv7-M Architecture Reference Manual" for more details. * See also ARM document "ARM Compiler toolchain Developing Software for ARM * Processors" for details on System Timer/SysTick. */ /* * The System Control Space (SCS) is a memory-mapped 4KB address space that * provides 32-bit registers for configuration, status reporting and control. * The SCS registers divide into the following groups: * - system control and identification * - the CPUID processor identification space * - system configuration and status * - fault reporting * - a system timer, SysTick * - a Nested Vectored Interrupt Controller (NVIC) * - a Protected Memory System Architecture (PMSA) * - system debug. */ /* System Handler Priority 8 bits Registers, SHPR1/2/3 */ /* Note: 12 8bit Registers */ #define SCS_SHPR(ipr_id) MMIO8(SCS_BASE + 0xD18 + ipr_id) /* * Debug Halting Control and Status Register (DHCSR). * * Purpose Controls halting debug. * Usage constraints: The effect of modifying the C_STEP or C_MASKINTS bit when * the system is running with halting debug enabled is UNPREDICTABLE. * Halting debug is enabled when C_DEBUGEN is set to 1. The system is running * when S_HALT is set to 0. * - When C_DEBUGEN is set to 0, the processor ignores the values of all other * bits in this register. * - For more information about the use of DHCSR see Debug stepping on page * C1-824. * Configurations Always implemented. */ /* SCS_DHCSR register */ #define SCS_DHCSR MMIO32(SCS_BASE + 0xDF0) /* * Debug Core Register Selector Register (DCRSR). * * Purpose With the DCRDR, the DCRSR provides debug access to the ARM core * registers, special-purpose registers, and Floating-point extension * registers. A write to DCRSR specifies the register to transfer, whether the * transfer is a read or a write, and starts the transfer. * Usage constraints: Only accessible in Debug state. * Configurations Always implemented. * */ /* SCS_DCRS register */ #define SCS_DCRSR MMIO32(SCS_BASE + 0xDF4) /* * Debug Core Register Data Register (DCRDR) * * Purpose With the DCRSR, see Debug Core Register Selector Register, the DCRDR * provides debug access to the ARM core registers, special-purpose registers, * and Floating-point extension registers. The DCRDR is the data register for * these accesses. * - Used on its own, the DCRDR provides a message passing resource between an * external debugger and a debug agent running on the processor. * Note: * The architecture does not define any handshaking mechanism for this use of * DCRDR. * Usage constraints: See Use of DCRSR and DCRDR for constraints that apply to * particular transfers using the DCRSR and DCRDR. * Configurations Always implemented. * */ /* SCS_DCRDR register */ #define SCS_DCRDR MMIO32(SCS_BASE + 0xDF8) /* * Debug Exception and Monitor Control Register (DEMCR). * * Purpose Manages vector catch behavior and DebugMonitor handling when * debugging. * Usage constraints: * - Bits [23:16] provide DebugMonitor exception control. * - Bits [15:0] provide Debug state, halting debug, control. * Configurations Always implemented. * */ /* SCS_DEMCR register */ #define SCS_DEMCR MMIO32(SCS_BASE + 0xDFC) /* Debug Halting Control and Status Register (DHCSR) */ #define SCS_DHCSR_DBGKEY 0xA05F0000 #define SCS_DHCSR_C_DEBUGEN 0x00000001 #define SCS_DHCSR_C_HALT 0x00000002 #define SCS_DHCSR_C_STEP 0x00000004 #define SCS_DHCSR_C_MASKINTS 0x00000008 #define SCS_DHCSR_C_SNAPSTALL 0x00000020 #define SCS_DHCSR_S_REGRDY 0x00010000 #define SCS_DHCSR_S_HALT 0x00020000 #define SCS_DHCSR_S_SLEEP 0x00040000 #define SCS_DHCSR_S_LOCKUP 0x00080000 #define SCS_DHCSR_S_RETIRE_ST 0x01000000 #define SCS_DHCSR_S_RESET_ST 0x02000000 /* Debug Core Register Selector Register (DCRSR) */ #define SCS_DCRSR_REGSEL_MASK 0x0000001F #define SCS_DCRSR_REGSEL_XPSR 0x00000010 #define SCS_DCRSR_REGSEL_MSP 0x00000011 #define SCS_DCRSR_REGSEL_PSP 0x00000012 /* Debug Exception and Monitor Control Register (DEMCR) */ /* Bits 31:25 - Reserved */ #define SCS_DEMCR_TRCENA (1 << 24) /* Bits 23:20 - Reserved */ #define SCS_DEMCR_MON_REQ (1 << 19) #define SCS_DEMCR_MON_STEP (1 << 18) #define SCS_DEMCR_VC_MON_PEND (1 << 17) #define SCS_DEMCR_VC_MON_EN (1 << 16) /* Bits 15:11 - Reserved */ #define SCS_DEMCR_VC_HARDERR (1 << 10) #define SCS_DEMCR_VC_INTERR (1 << 9) #define SCS_DEMCR_VC_BUSERR (1 << 8) #define SCS_DEMCR_VC_STATERR (1 << 7) #define SCS_DEMCR_VC_CHKERR (1 << 6) #define SCS_DEMCR_VC_NOCPERR (1 << 5) #define SCS_DEMCR_VC_MMERR (1 << 4) /* Bits 3:1 - Reserved */ #define SCS_DEMCR_VC_CORERESET (1 << 0) /* * System Control Space (SCS) => System timer register support in the SCS. * To configure SysTick, load the interval required between SysTick events to * the SysTick Reload Value register. The timer interrupt, or COUNTFLAG bit in * the SysTick Control and Status register, is activated on the transition from * 1 to 0, therefore it activates every n+1 clock ticks. If you require a * period of 100, write 99 to the SysTick Reload Value register. The SysTick * Reload Value register supports values between 0x1 and 0x00FFFFFF. * * If you want to use SysTick to generate an event at a timed interval, for * example 1ms, you can use the SysTick Calibration Value Register to scale * your value for the Reload register. The SysTick Calibration Value Register * is a read-only register that contains the number of pulses for a period of * 10ms, in the TENMS field, bits[23:0]. * * This register also has a SKEW bit. Bit[30] == 1 indicates that the * calibration for 10ms in the TENMS section is not exactly 10ms due to clock * frequency. Bit[31] == 1 indicates that the reference clock is not provided. */ /* * SysTick Control and Status Register (CSR). * Purpose Controls the system timer and provides status data. * Usage constraints: There are no usage constraints. * Configurations Always implemented. */ #define SCS_SYST_CSR MMIO32(SCS_BASE + 0x10) /* SysTick Reload Value Register (CVR). * Purpose Reads or clears the current counter value. * Usage constraints: * - Any write to the register clears the register to zero. * - The counter does not provide read-modify-write protection. * - Unsupported bits are read as zero * Configurations Always implemented. */ #define CM_SCS_SYST_RVR MMIO32(SCS_BASE + 0x14) /* SysTick Current Value Register (RVR). * Purpose Holds the reload value of the SYST_CVR. * Usage constraints There are no usage constraints. * Configurations Always implemented. */ #define CM_SCS_SYST_CVR MMIO32(SCS_BASE + 0x18) /* * SysTick Calibration value Register(Read Only) (CALIB) * Purpose Reads the calibration value and parameters for SysTick. * Usage constraints: There are no usage constraints. * Configurations Always implemented. */ #define CM_SCS_SYST_CALIB MMIO32(SCS_BASE + 0x1C) /* --- SCS_SYST_CSR values ----------------------------------------------- */ /* Counter is operating. */ #define SCS_SYST_CSR_ENABLE (BIT0) /* Count to 0 changes the SysTick exception status to pending. */ #define SCS_SYST_CSR_TICKINT (BIT1) /* SysTick uses the processor clock. */ #define SCS_SYST_CSR_CLKSOURCE (BIT2) /* * Indicates whether the counter has counted to 0 since the last read of this * register: * 0 = Timer has not counted to 0 * 1 = Timer has counted to 0. */ #define SCS_SYST_CSR_COUNTFLAG (BIT16) /* --- CM_SCS_SYST_RVR values ---------------------------------------------- */ /* Bit 0 to 23 => RELOAD The value to load into the SYST_CVR when the counter * reaches 0. */ /* Bit 24 to 31 are Reserved */ /* --- CM_SCS_SYST_CVR values ---------------------------------------------- */ /* Bit0 to 31 => Reads or clears the current counter value. */ /* --- CM_SCS_SYST_CALIB values -------------------------------------------- */ /* * Bit0 to 23 => TENMS Optionally, holds a reload value to be used for 10ms * (100Hz) timing, subject to system clock skew errors. If this field is zero, * the calibration value is not known. */ #define SCS_SYST_SYST_CALIB_TENMS_MASK (BIT24-1) /* * Bit30 => SKEW Indicates whether the 10ms calibration value is exact: * 0 = 10ms calibration value is exact. * 1 = 10ms calibration value is inexact, because of the clock frequency */ #define SCS_SYST_SYST_CALIB_VALUE_INEXACT (BIT30) /* * Bit31 => NOREF Indicates whether the IMPLEMENTATION DEFINED reference clock * is implemented: * 0 = The reference clock is implemented. * 1 = The reference clock is not implemented. * When this bit is 1, the CLKSOURCE bit of the SYST_CSR register is forced to * 1 and cannot be cleared to 0. */ #define SCS_SYST_SYST_CALIB_REF_NOT_IMPLEMENTED (BIT31) /* * System Control Space (SCS) => Data Watchpoint and Trace (DWT). * See "ARMv7-M Architecture Reference Manual" * (https://github.com/libopencm3/libopencm3-archive/blob/master/arm/ * ARMv7-M_ARM.pdf) * The DWT is an optional debug unit that provides watchpoints, data tracing, * and system profiling for the processor. */ /* * DWT Control register * Purpose Provides configuration and status information for the DWT block, and * used to control features of the block * Usage constraints: There are no usage constraints. * Configurations Always implemented. */ #define SCS_DWT_CTRL MMIO32(DWT_BASE + 0x00) /* * DWT_CYCCNT register * Cycle Count Register (Shows or sets the value of the processor cycle * counter, CYCCNT) * When enabled, CYCCNT increments on each processor clock cycle. On overflow, * CYCCNT wraps to zero. * * Purpose Shows or sets the value of the processor cycle counter, CYCCNT. * Usage constraints: The DWT unit suspends CYCCNT counting when the processor * is in Debug state. * Configurations Implemented: only when DWT_CTRL.NOCYCCNT is RAZ, see Control * register, DWT_CTRL. * When DWT_CTRL.NOCYCCNT is RAO no cycle counter is implemented and this * register is UNK/SBZP. */ #define SCS_DWT_CYCCNT MMIO32(DWT_BASE + 0x04) /* DWT_CPICNT register * Purpose Counts additional cycles required to execute multi-cycle * instructions and instruction fetch stalls. * Usage constraints: The counter initializes to 0 when software enables its * counter overflow event by * setting the DWT_CTRL.CPIEVTENA bit to 1. * Configurations Implemented: only when DWT_CTRL.NOPRFCNT is RAZ, see Control * register, DWT_CTRL. * If DWT_CTRL.NOPRFCNT is RAO, indicating that the implementation does not * include the profiling counters, this register is UNK/SBZP. */ #define SCS_DWT_CPICNT MMIO32(DWT_BASE + 0x08) /* DWT_EXCCNT register */ #define SCS_DWT_EXCCNT MMIO32(DWT_BASE + 0x0C) /* DWT_EXCCNT register */ #define SCS_DWT_SLEEPCNT MMIO32(DWT_BASE + 0x10) /* DWT_EXCCNT register */ #define SCS_DWT_LSUCNT MMIO32(DWT_BASE + 0x14) /* DWT_EXCCNT register */ #define SCS_DWT_FOLDCNT MMIO32(DWT_BASE + 0x18) /* DWT_PCSR register */ #define SCS_DWT_PCSR MMIO32(DWT_BASE + 0x18) /* --- SCS_DWT_CTRL values ------------------------------------------------- */ /* * Enables CYCCNT: * 0 = Disabled, 1 = Enabled * This bit is UNK/SBZP if the NOCYCCNT bit is RAO. */ #define SCS_DWT_CTRL_CYCCNTENA (BIT0) /* TODO bit definition values for other DWT_XXX register */ /* Macro to be called at startup to enable SCS & Cycle Counter */ #define SCS_DWT_CYCLE_COUNTER_ENABLED() ((SCS_DEMCR |= SCS_DEMCR_TRCENA)\ (SCS_DWT_CTRL |= SCS_DWT_CTRL_CYCCNTENA)) #define SCS_SYSTICK_DISABLED() (SCS_SYST_CSR = 0) /* Macro to be called at startup to Enable CortexMx SysTick (but IRQ not * enabled) */ #define SCS_SYSTICK_ENABLED() (SCS_SYST_CSR = (SCS_SYST_CSR_ENABLE | \ SCS_SYST_CSR_CLKSOURCE)) /* Macro to be called at startup to Enable CortexMx SysTick and IRQ */ #define SCS_SYSTICK_AND_IRQ_ENABLED() (SCS_SYST_CSR = (SCS_SYST_CSR_ENABLE | \ SCS_SYST_CSR_CLKSOURCE | \ SCS_SYST_CSR_TICKINT)) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/sync.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_SYNC_H #define LIBOPENCM3_CM3_SYNC_H #include "common.h" void __dmb(void); /* Implements synchronisation primitives as discussed in the ARM document * DHT0008A (ID081709) "ARM Synchronization Primitives" and the ARM v7-M * Architecture Reference Manual. */ /* --- Exclusive load and store instructions ------------------------------- */ /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) uint32_t __ldrex(volatile uint32_t *addr); uint32_t __strex(uint32_t val, volatile uint32_t *addr); /* --- Convenience functions ----------------------------------------------- */ /* Here we implement some simple synchronisation primitives. */ typedef uint32_t mutex_t; #define MUTEX_UNLOCKED 0 #define MUTEX_LOCKED 1 void mutex_lock(mutex_t *m); void mutex_unlock(mutex_t *m); #endif #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/systick.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @defgroup CM3_systick_defines SysTick Defines * * @brief libopencm3 Defined Constants and Types for the Cortex SysTick * * @ingroup CM3_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2010 Thomas Otto * * @date 19 August 2012 * * LGPL License Terms @ref lgpl_license */ /** * @note this file has been not following the register naming scheme, the * correct names defined, and the old ones stay there for compatibility with * old software (will be deprecated in the future) */ /**@{*/ #ifndef LIBOPENCM3_SYSTICK_H #define LIBOPENCM3_SYSTICK_H #include #include /* --- SYSTICK registers --------------------------------------------------- */ /* Control and status register (STK_CTRL) */ #define STK_CTRL MMIO32(SYS_TICK_BASE + 0x00) #define STK_CSR MMIO32(SYS_TICK_BASE + 0x00) /* reload value register (STK_LOAD) */ #define STK_LOAD MMIO32(SYS_TICK_BASE + 0x04) #define STK_RVR MMIO32(SYS_TICK_BASE + 0x04) /* current value register (STK_VAL) */ #define STK_VAL MMIO32(SYS_TICK_BASE + 0x08) #define STK_CVR MMIO32(SYS_TICK_BASE + 0x08) /* calibration value register (STK_CALIB) */ #define STK_CALIB MMIO32(SYS_TICK_BASE + 0x0C) /* --- STK_CSR values ------------------------------------------------------ */ /* Bits [31:17] Reserved, must be kept cleared. */ /* COUNTFLAG: */ #define STK_CTRL_COUNTFLAG (1 << 16) #define STK_CSR_COUNTFLAG (1 << 16) /* Bits [15:3] Reserved, must be kept cleared. */ /* CLKSOURCE: Clock source selection */ #define STK_CTRL_CLKSOURCE_LSB 2 #define STK_CTRL_CLKSOURCE (1 << STK_CTRL_CLKSOURCE_LSB) #define STK_CSR_CLKSOURCE_LSB 2 #define STK_CSR_CLKSOURCE (1 << STK_CSR_CLKSOURCE_LSB) /** @defgroup systick_clksource Clock source selection @ingroup CM3_systick_defines @{*/ #if defined(__ARM_ARCH_6M__) #define STK_CSR_CLKSOURCE_EXT (0 << STK_CSR_CLKSOURCE_LSB) #define STK_CSR_CLKSOURCE_AHB (1 << STK_CSR_CLKSOURCE_LSB) #else #define STK_CTRL_CLKSOURCE_AHB_DIV8 (0 << STK_CTRL_CLKSOURCE_LSB) #define STK_CTRL_CLKSOURCE_AHB (1 << STK_CTRL_CLKSOURCE_LSB) #endif /**@}*/ /* TICKINT: SysTick exception request enable */ #define STK_CTRL_TICKINT (1 << 1) #define STK_CSR_TICKINT (1 << 1) /* ENABLE: Counter enable */ #define STK_CTRL_ENABLE (1 << 0) #define STK_CSR_ENABLE (1 << 0) /* --- STK_RVR values ------------------------------------------------------ */ /* Bits [31:24] Reserved, must be kept cleared. */ /* RELOAD[23:0]: RELOAD value */ #define STK_RVR_RELOAD 0x00FFFFFF /* --- STK_CVR values ------------------------------------------------------ */ /* Bits [31:24] Reserved, must be kept cleared. */ /* CURRENT[23:0]: Current counter value */ #define STK_CVR_CURRENT 0x00FFFFFF /* --- STK_CALIB values ---------------------------------------------------- */ /* NOREF: NOREF flag */ #define STK_CALIB_NOREF (1 << 31) /* SKEW: SKEW flag */ #define STK_CALIB_SKEW (1 << 30) /* Bits [29:24] Reserved, must be kept cleared. */ /* TENMS[23:0]: Calibration value */ #define STK_CALIB_TENMS 0x00FFFFFF /* --- Function Prototypes ------------------------------------------------- */ BEGIN_DECLS void systick_set_reload(uint32_t value); uint32_t systick_get_reload(void); uint32_t systick_get_value(void); void systick_set_clocksource(uint8_t clocksource); void systick_interrupt_enable(void); void systick_interrupt_disable(void); void systick_counter_enable(void); void systick_counter_disable(void); uint8_t systick_get_countflag(void); uint32_t systick_get_calib(void); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/tpiu.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CM3_TPIU_H #define LIBOPENCM3_CM3_TPIU_H /* Cortex-M3 Trace Port Interface Unit (TPIU) */ /* Those defined only on ARMv7 and above */ #if !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) #error "Trace Port Interface Unit not available in CM0" #endif /* --- TPIU registers ------------------------------------------------------ */ /* Supported Synchronous Port Size (TPIU_SSPSR) */ #define TPIU_SSPSR MMIO32(TPIU_BASE + 0x000) /* Current Synchronous Port Size (TPIU_CSPSR) */ #define TPIU_CSPSR MMIO32(TPIU_BASE + 0x004) /* Asynchronous Clock Prescaler (TPIU_ACPR) */ #define TPIU_ACPR MMIO32(TPIU_BASE + 0x010) /* Selected Pin Protocol (TPIU_SPPR) */ #define TPIU_SPPR MMIO32(TPIU_BASE + 0x0F0) /* Formatter and Flush Status Register (TPIU_FFSR) */ #define TPIU_FFSR MMIO32(TPIU_BASE + 0x300) /* Formatter and Flush Control Register (TPIU_FFCR) */ #define TPIU_FFCR MMIO32(TPIU_BASE + 0x304) /* (TPIU_DEVID) */ #define TPIU_DEVID MMIO32(TPIU_BASE + 0xFC8) /* TODO: PID, CID */ /* --- TPIU_SSPSR values --------------------------------------------------- */ /* * bit[N] == 0, trace port width of (N+1) not supported * bit[N] == 1, trace port width of (N+1) supported */ #define TPIU_SSPSR_BYTE (1 << 0) #define TPIU_SSPSR_HALFWORD (1 << 1) #define TPIU_SSPSR_WORD (1 << 3) /* --- TPIU_SSPSR values --------------------------------------------------- */ /* Same format as TPIU_SSPSR, except only one is set */ #define TPIU_CSPSR_BYTE (1 << 0) #define TPIU_CSPSR_HALFWORD (1 << 1) #define TPIU_CSPSR_WORD (1 << 3) /* --- TPIU_ACPR values ---------------------------------------------------- */ /* Bits 31:16 - Reserved */ /* Bits 15:0 - SWO output clock = Asynchronous_Reference_Clock/(value +1) */ /* --- TPIU_SPPR values ---------------------------------------------------- */ /* Bits 31:2 - Reserved */ #define TPIU_SPPR_SYNC (0x0) #define TPIU_SPPR_ASYNC_MANCHESTER (0x1) #define TPIU_SPPR_ASYNC_NRZ (0x2) /* --- TPIU_FFSR values ---------------------------------------------------- */ /* Bits 31:4 - Reserved */ #define TPIU_FFSR_FTNONSTOP (1 << 3) #define TPIU_FFSR_TCPRESENT (1 << 2) #define TPIU_FFSR_FTSTOPPED (1 << 1) #define TPIU_FFSR_FLINPROG (1 << 0) /* --- TPIU_FFCR values ---------------------------------------------------- */ /* Bits 31:9 - Reserved */ #define TPIU_FFCR_TRIGIN (1 << 8) /* Bits 7:2 - Reserved */ #define TPIU_FFCR_ENFCONT (1 << 1) /* Bit 0 - Reserved */ /* --- TPIU_DEVID values ---------------------------------------------------- */ /* Bits 31:16 - Reserved */ /* Bits 15:12 - Implementation defined */ #define TPUI_DEVID_NRZ_SUPPORTED (1 << 11) #define TPUI_DEVID_MANCHESTER_SUPPORTED (1 << 10) /* Bit 9 - RAZ, indicated that trace data and clock are supported */ #define TPUI_DEVID_FIFO_SIZE_MASK (7 << 6) /* Bits 5:0 - Implementation defined */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/cm3/vector.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 chrysn * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @file * * Definitions for handling vector tables. * * This implements d0002_efm32_cortex-m3_reference_manual.pdf's figure 2.2 * (from the EFM32 documentation at * http://www.energymicro.com/downloads/datasheets), and was seen analogously * in other ARM implementations' libopencm3 files. * * The structure of the vector table is implemented independently of the system * vector table starting at memory position 0x0, as it can be relocated to * other memory locations too. * * The exact size of a vector interrupt table depends on the number of * interrupts IRQ_COUNT, which is defined per family. */ #ifndef LIBOPENCM3_VECTOR_H #define LIBOPENCM3_VECTOR_H #include #include /** Type of an interrupt function. Only used to avoid hard-to-read function * pointers in the efm32_vector_table_t struct. */ typedef void (*vector_table_entry_t)(void); typedef struct { unsigned int *initial_sp_value; /**< Initial stack pointer value. */ vector_table_entry_t reset; vector_table_entry_t nmi; vector_table_entry_t hard_fault; vector_table_entry_t memory_manage_fault; /* not in CM0 */ vector_table_entry_t bus_fault; /* not in CM0 */ vector_table_entry_t usage_fault; /* not in CM0 */ vector_table_entry_t reserved_x001c[4]; vector_table_entry_t sv_call; vector_table_entry_t debug_monitor; /* not in CM0 */ vector_table_entry_t reserved_x0034; vector_table_entry_t pend_sv; vector_table_entry_t systick; vector_table_entry_t irq[NVIC_IRQ_COUNT]; } vector_table_t; extern vector_table_t vector_table; #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/docmain.dox ================================================ /** @mainpage libopencm3 Developer Documentation @version 1.0.0 @date 7 September 2012 * The libopencm3 project (previously known as libopenstm32) aims to create * a free/libre/open-source (GPL v3, or later) firmware library for various * ARM Cortex-M3 microcontrollers, including ST STM32, Toshiba TX03, * Atmel SAM3U, NXP LPC1000 and others. * * @par "" * * See the libopencm3 wiki for * more information. LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32g/doc-efm32g.h ================================================ /** @mainpage libopencm3 EFM32 Gecko @version 1.0.0 @date 11 November 2012 API documentation for Energy Micro EFM32 Gecko Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32G EFM32 Gecko Libraries for Energy Micro EFM32 Gecko series. @version 1.0.0 @date 11 November 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32G_defines EFM32 Gecko Defines @brief Defined Constants and Types for the Energy Micro EFM32 Gecko series @version 1.0.0 @date 11 November 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32g/irq.yaml ================================================ includeguard: LIBOPENCM3_EFM32G_NVIC_H partname_humanreadable: EFM32 Gecko series partname_doxygen: EFM32G # The names and sequence are taken from d0001_efm32g_reference_manual.pdf table 4.1. irqs: - dma - gpio_even - timer0 - usart0_rx - usart0_tx - acmp01 - adc0 - dac0 - i2c0 - gpio_odd - timer1 - timer2 - usart1_rx - usart1_tx - usart2_rx - usart2_tx - uart0_rx - uart0_tx - leuart0 - leuart1 - letimer0 - pcnt0 - pcnt1 - pcnt2 - rtc - cmu - vcmp - lcd - msc - aes ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32gg/doc-efm32gg.h ================================================ /** @mainpage libopencm3 EFM32 Giant Gecko @version 1.0.0 @date 11 November 2012 API documentation for Energy Micro EFM32 Giant Gecko Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32GG EFM32 Giant Gecko Libraries for Energy Micro EFM32 Giant Gecko series. @version 1.0.0 @date 11 November 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32GG_defines EFM32 Giant Gecko Defines @brief Defined Constants and Types for the Energy Micro EFM32 Giant Gecko series @version 1.0.0 @date 11 November 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32gg/irq.yaml ================================================ includeguard: LIBOPENCM3_EFM32GG_NVIC_H partname_humanreadable: EFM32 Giant Gecko series partname_doxygen: EFM32GG # The names and sequence are taken from d0053_efm32gg_refreence_manual.pdf table 4.1. irqs: - dma - gpio_even - timer0 - usart0_rx - usart0_tx - usb - acmp01 - adc0 - dac0 - i2c0 - i2c1 - gpio_odd - timer1 - timer2 - timer3 - usart1_rx - usart1_tx - lesense - usart2_rx - usart2_tx - uart0_rx - uart0_tx - uart1_rx - uart1_tx - leuart0 - leuart1 - letimer0 - pcnt0 - pcnt1 - pcnt2 - rtc - burtc - cmu - vcmp - lcd - msc - aes - ebi ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32lg/doc-efm32lg.h ================================================ /** @mainpage libopencm3 EFM32 Leopard Gecko @version 1.0.0 @date 4 March 2013 API documentation for Energy Micro EFM32 Leopard Gecko Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32LG EFM32 LeopardGecko Libraries for Energy Micro EFM32 Leopard Gecko series. @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32LG_defines EFM32 Leopard Gecko Defines @brief Defined Constants and Types for the Energy Micro EFM32 Leopard Gecko series @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32lg/irq.yaml ================================================ includeguard: LIBOPENCM3_EFM32LG_NVIC_H partname_humanreadable: EFM32 Leopard Gecko series partname_doxygen: EFM32LG # The names and sequence are taken from d0183_efm32lg_reference_manual.pdf table 4.1. irqs: - dma - gpio_even - timer0 - usart0_rx - usart0_tx - usb - acmp01 - adc0 - dac0 - i2c0 - i2c1 - gpio_odd - timer1 - timer2 - timer3 - usart1_rx - usart1_tx - lesense - usart2_rx - usart2_tx - uart0_rx - uart0_tx - uart1_rx - uart1_tx - leuart0 - leuart1 - letimer0 - pcnt0 - pcnt1 - pcnt2 - rtc - burtc - cmu - vcmp - lcd - msc - aes - ebi ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32tg/doc-efm32tg.h ================================================ /** @mainpage libopencm3 EFM32 Tiny Gecko @version 1.0.0 @date 4 March 2013 API documentation for Energy Micro EFM32 Tiny Gecko Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32TG EFM32 TinyGecko Libraries for Energy Micro EFM32 Tiny Gecko series. @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /** @defgroup EFM32TG_defines EFM32 Tiny Gecko Defines @brief Defined Constants and Types for the Energy Micro EFM32 Tiny Gecko series @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32tg/irq.yaml ================================================ includeguard: LIBOPENCM3_EFM32TG_NVIC_H partname_humanreadable: EFM32 Tiny Gecko series partname_doxygen: EFM32TG # The names and sequence are taken from d0034_efm32tg_reference_manual.pdf table 4.1. irqs: - dma - gpio_even - timer0 - usart0_rx - usart0_tx - acmp01 - adc0 - dac0 - i2c0 - gpio_odd - timer1 - usart1_rx - usart1_tx - lesense - leuart0 - letimer0 - pcnt0 - rtc - cmu - vcmp - lcd - msc - aes ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/efm32tg/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 chrysn * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @file * * Layout of the system address space of Tiny Gecko devices. * * This reflects d0034_efm32tg_reference_manual.pdf figure 5.2. */ /* The common cortex-m3 definitions were verified from * d0034_efm32tg_reference_manual.pdf figure 5.2. The CM3 ROM Table seems to be * missing there. The details (everything based on SCS_BASE) was verified from * d0002_efm32_cortex-m3_reference_manual.pdf table 4.1, and seems to fit, but * there are discrepancies. */ #include #define CODE_BASE 0x00000000 #define SRAM_BASE 0x20000000 #define SRAM_BASE_BITBAND 0x22000000 #define PERIPH_BASE 0x40000000 #define PERIPH_BASE_BITBAND 0x42000000 /* Details of the "Code" section */ #define FLASH_BASE (CODE_BASE + 0x00000000) #define USERDATA_BASE (CODE_BASE + 0x0fe00000) #define LOCKBITS_BASE (CODE_BASE + 0x0fe04000) #define CHIPCONFIG_BASE (CODE_BASE + 0x0fe08000) #define CODESPACESRAM_BASE (CODE_BASE + 0x10000000) /* Tiny Gecko peripherial definitions */ #define VCMP_BASE (PERIPH_BASE + 0x00000000) #define ACMP0_BASE (PERIPH_BASE + 0x00001000) #define ACMP1_BASE (PERIPH_BASE + 0x00001400) #define ADC_BASE (PERIPH_BASE + 0x00002000) #define DAC0_BASE (PERIPH_BASE + 0x00004000) #define GPIO_BASE (PERIPH_BASE + 0x00006000) /**< @see gpio.h */ #define I2C0_BASE (PERIPH_BASE + 0x0000a000) #define USART0_BASE (PERIPH_BASE + 0x0000c000) #define USART1_BASE (PERIPH_BASE + 0x0000c400) #define TIMER0_BASE (PERIPH_BASE + 0x00010000) #define TIMER1_BASE (PERIPH_BASE + 0x00010400) #define RTC_BASE (PERIPH_BASE + 0x00080000) #define LETIMER0_BASE (PERIPH_BASE + 0x00082000) #define LEUART0_BASE (PERIPH_BASE + 0x00084000) #define PCNT0_BASE (PERIPH_BASE + 0x00086000) #define WDOG_BASE (PERIPH_BASE + 0x00088000) #define LCD_BASE (PERIPH_BASE + 0x0008a000) #define LESENSE_BASE (PERIPH_BASE + 0x0008c000) #define MSC_BASE (PERIPH_BASE + 0x000c0000) #define DMA_BASE (PERIPH_BASE + 0x000c2000) #define EMU_BASE (PERIPH_BASE + 0x000c6000) #define CMU_BASE (PERIPH_BASE + 0x000c8000) /**< @see cmu.h */ #define RMU_BASE (PERIPH_BASE + 0x000ca000) #define PRS_BASE (PERIPH_BASE + 0x000cc000) #define AES_BASE (PERIPH_BASE + 0x000e0000) ================================================ FILE: firmware/libopencm3/include/libopencm3/efm32/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 chrysn * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @file * * Dispatcher for the base address definitions, depending on the particular * Gecko family. * * @see tinygecko/memorymap.h */ #ifndef LIBOPENCM3_EFM32_MEMORYMAP_H #define LIBOPENCM3_EFM32_MEMORYMAP_H #ifdef TINYGECKO # include #else # error "efm32 family not defined." #endif #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/license.dox ================================================ /** @page lgpl_license libopencm3 License libopencm3 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. libopencm3 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm3s/doc-lm3s.h ================================================ /** @mainpage libopencm3 LM3S @version 1.0.0 @date 14 September 2012 API documentation for TI Stellaris LM3S Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup LM3Sxx LM3S Libraries for TI Stellaris LM3S series. @version 1.0.0 @date 7 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup LM3Sxx_defines LM3S Defines @brief Defined Constants and Types for the LM3S series @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm3s/gpio.h ================================================ /** @defgroup gpio_defines General Purpose I/O Defines @brief Defined Constants and Types for the LM3S General Purpose I/O @ingroup LM3Sxx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM3S_GPIO_H #define LM3S_GPIO_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ #define GPIOA GPIOA_APB_BASE #define GPIOB GPIOB_APB_BASE #define GPIOC GPIOC_APB_BASE #define GPIOD GPIOD_APB_BASE #define GPIOE GPIOE_APB_BASE #define GPIOF GPIOF_APB_BASE #define GPIOG GPIOG_APB_BASE #define GPIOH GPIOH_APB_BASE /* GPIO number definitions (for convenience) */ #define GPIO0 (1 << 0) #define GPIO1 (1 << 1) #define GPIO2 (1 << 2) #define GPIO3 (1 << 3) #define GPIO4 (1 << 4) #define GPIO5 (1 << 5) #define GPIO6 (1 << 6) #define GPIO7 (1 << 7) /* --- GPIO registers ------------------------------------------------------ */ #define GPIO_DATA(port) (&MMIO32(port + 0x000)) #define GPIO_DIR(port) MMIO32(port + 0x400) #define GPIO_IS(port) MMIO32(port + 0x404) #define GPIO_IBE(port) MMIO32(port + 0x408) #define GPIO_IEV(port) MMIO32(port + 0x40c) #define GPIO_IM(port) MMIO32(port + 0x410) #define GPIO_RIS(port) MMIO32(port + 0x414) #define GPIO_MIS(port) MMIO32(port + 0x418) #define GPIO_ICR(port) MMIO32(port + 0x41c) #define GPIO_AFSEL(port) MMIO32(port + 0x420) #define GPIO_DR2R(port) MMIO32(port + 0x500) #define GPIO_DR4R(port) MMIO32(port + 0x504) #define GPIO_DR8R(port) MMIO32(port + 0x508) #define GPIO_ODR(port) MMIO32(port + 0x50c) #define GPIO_PUR(port) MMIO32(port + 0x510) #define GPIO_PDR(port) MMIO32(port + 0x514) #define GPIO_SLR(port) MMIO32(port + 0x518) #define GPIO_DEN(port) MMIO32(port + 0x51c) #define GPIO_LOCK(port) MMIO32(port + 0x520) #define GPIO_CR(port) MMIO32(port + 0x524) #define GPIO_AMSEL(port) MMIO32(port + 0x528) BEGIN_DECLS void gpio_set(uint32_t gpioport, uint8_t gpios); void gpio_clear(uint32_t gpioport, uint8_t gpios); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lm3s/irq.yaml ================================================ # Although this says LM3S, the interrupt table applies to the LM4F as well # Some interrupt vectores marked as reserved in LM3S are used in LM4F, and some # vectors in LM3S are marked reserved for LM4F. However, the common vectors are # identical, and we can safely use the same interrupt table. Reserved vectors # will never be triggered, so having them is perfectly safe. includeguard: LIBOPENCM3_LM3S_NVIC_H partname_humanreadable: LM3S series partname_doxygen: LM3S irqs: 0: GPIOA 1: GPIOB 2: GPIOC 3: GPIOD 4: GPIOE 5: UART0 6: UART1 7: SSI0 8: I2C0 9: PWM0_FAULT 10: PWM0_0 11: PWM0_1 12: PWM0_2 13: QEI0 14: ADC0SS0 15: ADC0SS1 16: ADC0SS2 17: ADC0SS3 18: WATCHDOG 19: TIMER0A 20: TIMER0B 21: TIMER1A 22: TIMER1B 23: TIMER2A 24: TIMER2B 25: COMP0 26: COMP1 27: COMP2 28: SYSCTL 29: FLASH 30: GPIOF 31: GPIOG 32: GPIOH 33: UART2 34: SSI1 35: TIMER3A 36: TIMER3B 37: I2C1 38: QEI1 39: CAN0 40: CAN1 41: CAN2 42: ETH 43: HIBERNATE 44: USB0 45: PWM0_3 46: UDMA 47: UDMAERR 48: ADC1SS0 49: ADC1SS1 50: ADC1SS2 51: ADC1SS3 52: I2S0 53: EPI0 54: GPIOJ 55: GPIOK 56: GPIOL 57: SSI2 58: SSI3 59: UART3 60: UART4 61: UART5 62: UART6 63: UART7 # undefined: slot 64 - 67 68: I2C2 69: I2C3 70: TIMER4A 71: TIMER4B # undefined: slot 72 - 91 92: TIMER5A 93: TIMER5B 94: WTIMER0A 95: WTIMER0B 96: WTIMER1A 97: WTIMER1B 98: WTIMER2A 99: WTIMER2B 100: WTIMER3A 101: WTIMER3B 102: WTIMER4A 103: WTIMER4B 104: WTIMER5A 105: WTIMER5B 106: SYSEXC 107: PECI0 108: LPC0 109: I2C4 110: I2C5 111: GPIOM 112: GPION # undefined: slot 113 114: FAN0 # undefined: slot 115 116: GPIOP0 117: GPIOP1 118: GPIOP2 119: GPIOP3 120: GPIOP4 121: GPIOP5 122: GPIOP6 123: GPIOP7 124: GPIOQ0 125: GPIOQ1 126: GPIOQ2 127: GPIOQ3 128: GPIOQ4 129: GPIOQ5 130: GPIOQ6 131: GPIOQ7 # undefined: slot 132 - 133 134: PWM1_0 135: PWM1_1 136: PWM1_2 137: PWM1_3 138: PWM1_FAULT ================================================ FILE: firmware/libopencm3/include/libopencm3/lm3s/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM3S_MEMORYMAP_H #define LM3S_MEMORYMAP_H #include /* --- LM3S specific peripheral definitions ----------------------------- */ #define GPIOA_APB_BASE (0x40004000) #define GPIOB_APB_BASE (0x40005000) #define GPIOC_APB_BASE (0x40006000) #define GPIOD_APB_BASE (0x40007000) #define GPIOE_APB_BASE (0x40024000) #define GPIOF_APB_BASE (0x40025000) #define GPIOG_APB_BASE (0x40026000) #define GPIOH_APB_BASE (0x40027000) #define GPIOA_BASE (0x40058000) #define GPIOB_BASE (0x40059000) #define GPIOC_BASE (0x4005A000) #define GPIOD_BASE (0x4005B000) #define GPIOE_BASE (0x4005C000) #define GPIOF_BASE (0x4005D000) #define GPIOG_BASE (0x4005E000) #define GPIOH_BASE (0x4005F000) #define SYSTEMCONTROL_BASE (0x400FE000) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lm3s/systemcontrol.h ================================================ /** @defgroup systemcontrol_defines System Control @brief Defined Constants and Types for the LM3S System Control @ingroup LM3Sxx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM3S_SYSTEMCONTROL_H #define LM3S_SYSTEMCONTROL_H /**@{*/ #include #define SYSTEMCONTROL_DID0 MMIO32(SYSTEMCONTROL_BASE + 0x000) #define SYSTEMCONTROL_DID1 MMIO32(SYSTEMCONTROL_BASE + 0x004) #define SYSTEMCONTROL_DC0 MMIO32(SYSTEMCONTROL_BASE + 0x008) #define SYSTEMCONTROL_DC1 MMIO32(SYSTEMCONTROL_BASE + 0x010) #define SYSTEMCONTROL_DC2 MMIO32(SYSTEMCONTROL_BASE + 0x014) #define SYSTEMCONTROL_DC3 MMIO32(SYSTEMCONTROL_BASE + 0x018) #define SYSTEMCONTROL_DC4 MMIO32(SYSTEMCONTROL_BASE + 0x01C) #define SYSTEMCONTROL_DC5 MMIO32(SYSTEMCONTROL_BASE + 0x020) #define SYSTEMCONTROL_DC6 MMIO32(SYSTEMCONTROL_BASE + 0x024) #define SYSTEMCONTROL_DC7 MMIO32(SYSTEMCONTROL_BASE + 0x028) #define SYSTEMCONTROL_PBORCTL MMIO32(SYSTEMCONTROL_BASE + 0x030) #define SYSTEMCONTROL_LDORCTL MMIO32(SYSTEMCONTROL_BASE + 0x034) #define SYSTEMCONTROL_SRCR0 MMIO32(SYSTEMCONTROL_BASE + 0x040) #define SYSTEMCONTROL_SRCR1 MMIO32(SYSTEMCONTROL_BASE + 0x044) #define SYSTEMCONTROL_SRCR2 MMIO32(SYSTEMCONTROL_BASE + 0x048) #define SYSTEMCONTROL_RIS MMIO32(SYSTEMCONTROL_BASE + 0x050) #define SYSTEMCONTROL_IMC MMIO32(SYSTEMCONTROL_BASE + 0x054) #define SYSTEMCONTROL_MISC MMIO32(SYSTEMCONTROL_BASE + 0x058) #define SYSTEMCONTROL_RESC MMIO32(SYSTEMCONTROL_BASE + 0x05C) #define SYSTEMCONTROL_RCC MMIO32(SYSTEMCONTROL_BASE + 0x060) #define SYSTEMCONTROL_PLLCFG MMIO32(SYSTEMCONTROL_BASE + 0x064) #define SYSTEMCONTROL_GPIOHBCTL MMIO32(SYSTEMCONTROL_BASE + 0x06C) #define SYSTEMCONTROL_RCC2 MMIO32(SYSTEMCONTROL_BASE + 0x070) #define SYSTEMCONTROL_MOSCCTL MMIO32(SYSTEMCONTROL_BASE + 0x07C) #define SYSTEMCONTROL_RCGC0 MMIO32(SYSTEMCONTROL_BASE + 0x100) #define SYSTEMCONTROL_RCGC1 MMIO32(SYSTEMCONTROL_BASE + 0x104) #define SYSTEMCONTROL_RCGC2 MMIO32(SYSTEMCONTROL_BASE + 0x108) #define SYSTEMCONTROL_SCGC0 MMIO32(SYSTEMCONTROL_BASE + 0x110) #define SYSTEMCONTROL_SCGC1 MMIO32(SYSTEMCONTROL_BASE + 0x114) #define SYSTEMCONTROL_SCGC2 MMIO32(SYSTEMCONTROL_BASE + 0x118) #define SYSTEMCONTROL_DCGC0 MMIO32(SYSTEMCONTROL_BASE + 0x120) #define SYSTEMCONTROL_DCGC1 MMIO32(SYSTEMCONTROL_BASE + 0x124) #define SYSTEMCONTROL_DCGC2 MMIO32(SYSTEMCONTROL_BASE + 0x128) #define SYSTEMCONTROL_DSLPCLKCFG MMIO32(SYSTEMCONTROL_BASE + 0x144) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/doc-lm4f.h ================================================ /** @mainpage libopencm3 LM4F @version 1.0.0 @date 22 November 2012 API documentation for TI Stellaris LM4F Cortex M4F series. LGPL License Terms @ref lgpl_license */ /** @defgroup LM4Fxx LM4F Libraries for TI Stellaris LM4F series. @version 1.0.0 @date 22 November 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup LM4Fxx_defines LM4F Defines @brief Defined Constants and Types for the LM4F series @version 1.0.0 @date 22 November 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/gpio.h ================================================ /** @defgroup gpio_defines General Purpose I/O Defines * * @brief Defined Constants and Types for the LM4F General Purpose I/O * * @ingroup LM4Fxx_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2011 * Gareth McMullin * @author @htmlonly © @endhtmlonly 2013 * Alexandru Gagniuc * * @date 16 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * Copyright (C) 2013 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM4F_GPIO_H #define LM4F_GPIO_H /**@{*/ #include #include /* ============================================================================= * Convenience macros * ---------------------------------------------------------------------------*/ /** @defgroup gpio_reg_base GPIO register base addresses * @{*/ #define GPIOA GPIOA_BASE #define GPIOB GPIOB_BASE #define GPIOC GPIOC_BASE #define GPIOD GPIOD_BASE #define GPIOE GPIOE_BASE #define GPIOF GPIOF_BASE #define GPIOG GPIOG_BASE #define GPIOH GPIOH_BASE #define GPIOJ GPIOJ_BASE #define GPIOK GPIOK_BASE #define GPIOL GPIOL_BASE #define GPIOM GPIOM_BASE #define GPION GPION_BASE #define GPIOP GPIOP_BASE #define GPIOQ GPIOQ_BASE /** @} */ /* ============================================================================= * GPIO number definitions (for convenience) * * These are usable across all GPIO registers, * except GPIO_LOCK and GPIO_PCTL * ---------------------------------------------------------------------------*/ /** @defgroup gpio_pin_id GPIO pin identifiers * @{*/ #define GPIO0 (1 << 0) #define GPIO1 (1 << 1) #define GPIO2 (1 << 2) #define GPIO3 (1 << 3) #define GPIO4 (1 << 4) #define GPIO5 (1 << 5) #define GPIO6 (1 << 6) #define GPIO7 (1 << 7) #define GPIO_ALL 0xff /** @} */ /* ============================================================================= * GPIO registers * ---------------------------------------------------------------------------*/ /* GPIO Data */ #define GPIO_DATA(port) (&MMIO32(port + 0x000)) /* GPIO Direction */ #define GPIO_DIR(port) MMIO32(port + 0x400) /* GPIO Interrupt Sense */ #define GPIO_IS(port) MMIO32(port + 0x404) /* GPIO Interrupt Both Edges */ #define GPIO_IBE(port) MMIO32(port + 0x408) /* GPIO Interrupt Event */ #define GPIO_IEV(port) MMIO32(port + 0x40c) /* GPIO Interrupt Mask */ #define GPIO_IM(port) MMIO32(port + 0x410) /* GPIO Raw Interrupt Status */ #define GPIO_RIS(port) MMIO32(port + 0x414) /* GPIO Masked Interrupt Status */ #define GPIO_MIS(port) MMIO32(port + 0x418) /* GPIO Interrupt Clear */ #define GPIO_ICR(port) MMIO32(port + 0x41c) /* GPIO Alternate Function Select */ #define GPIO_AFSEL(port) MMIO32(port + 0x420) /* GPIO 2-mA Drive Select */ #define GPIO_DR2R(port) MMIO32(port + 0x500) /* GPIO 4-mA Drive Select */ #define GPIO_DR4R(port) MMIO32(port + 0x504) /* GPIO 8-mA Drive Select */ #define GPIO_DR8R(port) MMIO32(port + 0x508) /* GPIO Open Drain Select */ #define GPIO_ODR(port) MMIO32(port + 0x50c) /* GPIO Pull-Up Select */ #define GPIO_PUR(port) MMIO32(port + 0x510) /* GPIO Pull-Down Select */ #define GPIO_PDR(port) MMIO32(port + 0x514) /* GPIO Slew Rate Control Select */ #define GPIO_SLR(port) MMIO32(port + 0x518) /* GPIO Digital Enable */ #define GPIO_DEN(port) MMIO32(port + 0x51c) /* GPIO Lock */ #define GPIO_LOCK(port) MMIO32(port + 0x520) /* GPIO Commit */ #define GPIO_CR(port) MMIO32(port + 0x524) /* GPIO Analog Mode Select */ #define GPIO_AMSEL(port) MMIO32(port + 0x528) /* GPIO Port Control */ #define GPIO_PCTL(port) MMIO32(port + 0x52C) /* GPIO ADC Control */ #define GPIO_ADCCTL(port) MMIO32(port + 0x530) /* GPIO DMA Control */ #define GPIO_DMACTL(port) MMIO32(port + 0x534) /* GPIO Peripheral Identification */ #define GPIO_PERIPH_ID4(port) MMIO32(port + 0xFD0) #define GPIO_PERIPH_ID5(port) MMIO32(port + 0xFD4) #define GPIO_PERIPH_ID6(port) MMIO32(port + 0xFD8) #define GPIO_PERIPH_ID7(port) MMIO32(port + 0xFDC) #define GPIO_PERIPH_ID0(port) MMIO32(port + 0xFE0) #define GPIO_PERIPH_ID1(port) MMIO32(port + 0xFE4) #define GPIO_PERIPH_ID2(port) MMIO32(port + 0xFE8) #define GPIO_PERIPH_ID3(port) MMIO32(port + 0xFEC) /* GPIO PrimeCell Identification */ #define GPIO_PCELL_ID0(port) MMIO32(port + 0xFF0) #define GPIO_PCELL_ID1(port) MMIO32(port + 0xFF4) #define GPIO_PCELL_ID2(port) MMIO32(port + 0xFF8) #define GPIO_PCELL_ID3(port) MMIO32(port + 0xFFC) /* ============================================================================= * Convenience enums * ---------------------------------------------------------------------------*/ enum gpio_mode { GPIO_MODE_OUTPUT, /**< Configure pin as output */ GPIO_MODE_INPUT, /**< Configure pin as input */ GPIO_MODE_ANALOG, /**< Configure pin as analog function */ }; enum gpio_pullup { GPIO_PUPD_NONE, /**< Do not pull the pin high or low */ GPIO_PUPD_PULLUP, /**< Pull the pin high */ GPIO_PUPD_PULLDOWN, /**< Pull the pin low */ }; enum gpio_output_type { GPIO_OTYPE_PP, /**< Push-pull configuration */ GPIO_OTYPE_OD, /**< Open drain configuration */ }; enum gpio_drive_strength { GPIO_DRIVE_2MA, /**< 2mA drive */ GPIO_DRIVE_4MA, /**< 4mA drive */ GPIO_DRIVE_8MA, /**< 8mA drive */ GPIO_DRIVE_8MA_SLEW_CTL,/**< 8mA drive with slew rate control */ }; enum gpio_trigger { GPIO_TRIG_LVL_LOW, /**< Level trigger, signal low */ GPIO_TRIG_LVL_HIGH, /**< Level trigger, signal high */ GPIO_TRIG_EDGE_FALL, /**< Falling edge trigger */ GPIO_TRIG_EDGE_RISE, /**< Rising edge trigger*/ GPIO_TRIG_EDGE_BOTH, /**< Falling and Rising edges trigger*/ }; /* ============================================================================= * Function prototypes * ---------------------------------------------------------------------------*/ BEGIN_DECLS void gpio_enable_ahb_aperture(void); void gpio_mode_setup(uint32_t gpioport, enum gpio_mode mode, enum gpio_pullup pullup, uint8_t gpios); void gpio_set_output_config(uint32_t gpioport, enum gpio_output_type otype, enum gpio_drive_strength drive, uint8_t gpios); void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint8_t gpios); void gpio_toggle(uint32_t gpioport, uint8_t gpios); void gpio_unlock_commit(uint32_t gpioport, uint8_t gpios); /* Let's keep these ones inlined. GPIO control should be fast */ /** @ingroup gpio_control * @{ */ /** * \brief Get status of a Group of Pins (atomic) * * Reads the level of the given pins. Bit 0 of the returned data corresponds to * GPIO0 level, bit 1 to GPIO1 level. and so on. Bits corresponding to masked * pins (corresponding bit of gpios parameter set to zero) are returned as 0. * * This is an atomic operation. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. * * @return The level of the GPIO port. The pins not specified in gpios are * masked to zero. */ static inline uint8_t gpio_read(uint32_t gpioport, uint8_t gpios) { return GPIO_DATA(gpioport)[gpios]; } /** * \brief Set level of a Group of Pins (atomic) * * Sets the level of the given pins. Bit 0 of the data parameter corresponds to * GPIO0, bit 1 to GPIO1. and so on. Maskedpins (corresponding bit of gpios * parameter set to zero) are returned not affected. * * This is an atomic operation. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. * @param[in] data Level to set pin to. Bit 0 of data corresponds to GPIO0, bit * 1 to GPIO1. and so on. */ static inline void gpio_write(uint32_t gpioport, uint8_t gpios, uint8_t data) { /* ipaddr[9:2] mask the bits to be set, hence the array index */ GPIO_DATA(gpioport)[gpios] = data; } /** * \brief Set a Group of Pins (atomic) * * Set one or more pins of the given GPIO port. This is an atomic operation. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. */ static inline void gpio_set(uint32_t gpioport, uint8_t gpios) { gpio_write(gpioport, gpios, 0xff); } /** * \brief Clear a Group of Pins (atomic) * * Clear one or more pins of the given GPIO port. This is an atomic operation. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. */ static inline void gpio_clear(uint32_t gpioport, uint8_t gpios) { gpio_write(gpioport, gpios, 0); } /** * \brief Read level of all pins from a port (atomic) * * Read the current value of the given GPIO port. This is an atomic operation. * * This is functionally identical to @ref gpio_read (gpioport, GPIO_ALL). * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * * @return The level of all the pins on the GPIO port. */ static inline uint8_t gpio_port_read(uint32_t gpioport) { return gpio_read(gpioport, GPIO_ALL); } /** * \brief Set level of of all pins from a port (atomic) * * Set the level of all pins on the given GPIO port. This is an atomic * operation. * * This is functionally identical to @ref gpio_write (gpioport, GPIO_ALL, data). * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. * @param[in] data Level to set pin to. Bit 0 of data corresponds to GPIO0, bit * 1 to GPIO1. and so on. */ static inline void gpio_port_write(uint32_t gpioport, uint8_t data) { gpio_write(gpioport, GPIO_ALL, data); } /** @} */ void gpio_configure_trigger(uint32_t gpioport, enum gpio_trigger trigger, uint8_t gpios); void gpio_enable_interrupts(uint32_t gpioport, uint8_t gpios); void gpio_disable_interrupts(uint32_t gpioport, uint8_t gpios); /* Let's keep these ones inlined. GPIO. They are designed to be used in ISRs */ /** @ingroup gpio_irq * @{ */ /** \brief Determine if interrupt is generated by the given pin * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] srcpins source pin or group of pins to check. */ static inline bool gpio_is_interrupt_source(uint32_t gpioport, uint8_t srcpins) { return GPIO_MIS(gpioport) & srcpins; } /** * \brief Mark interrupt as serviced * * After an interrupt is services, its flag must be cleared. If the flag is not * cleared, then execution will jump back to the start of the ISR after the ISR * returns. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. */ static inline void gpio_clear_interrupt_flag(uint32_t gpioport, uint8_t gpios) { GPIO_ICR(gpioport) |= gpios; } /** @} */ END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM4F_MEMORYMAP_H #define LM4F_MEMORYMAP_H #include /* --- LM4F specific peripheral definitions ----------------------------- */ #define GPIOA_APB_BASE (0x40004000) #define GPIOB_APB_BASE (0x40005000) #define GPIOC_APB_BASE (0x40006000) #define GPIOD_APB_BASE (0x40007000) #define GPIOE_APB_BASE (0x40024000) #define GPIOF_APB_BASE (0x40025000) #define GPIOG_APB_BASE (0x40026000) #define GPIOH_APB_BASE (0x40027000) #define GPIOJ_APB_BASE (0x4003D000) #define GPIOA_BASE (0x40058000) #define GPIOB_BASE (0x40059000) #define GPIOC_BASE (0x4005A000) #define GPIOD_BASE (0x4005B000) #define GPIOE_BASE (0x4005C000) #define GPIOF_BASE (0x4005D000) #define GPIOG_BASE (0x4005E000) #define GPIOH_BASE (0x4005F000) #define GPIOJ_BASE (0x40060000) #define GPIOK_BASE (0x40061000) #define GPIOL_BASE (0x40062000) #define GPIOM_BASE (0x40063000) #define GPION_BASE (0x40064000) #define GPIOP_BASE (0x40065000) #define GPIOQ_BASE (0x40066000) #define UART0_BASE (0x4000C000) #define UART1_BASE (0x4000D000) #define UART2_BASE (0x4000E000) #define UART3_BASE (0x4000F000) #define UART4_BASE (0x40010000) #define UART5_BASE (0x40011000) #define UART6_BASE (0x40012000) #define UART7_BASE (0x40013000) #define USB_BASE (0x40050000) #define SYSCTL_BASE (0x400FE000) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/rcc.h ================================================ /** @defgroup rcc_defines Reset and Clock Control @brief Defined Constants and Types for the LM4F Reset and Clock Control @ingroup LM4Fxx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Alexandru Gagniuc @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM4F_RCC_H #define LM4F_RCC_H /**@{*/ #include /** * \brief Oscillator source values * * Possible values of the oscillator source. */ enum osc_src { OSCSRC_MOSC = SYSCTL_RCC2_OSCSRC2_MOSC, OSCSRC_PIOSC = SYSCTL_RCC2_OSCSRC2_PIOSC, OSCSRC_PIOSC_D4 = SYSCTL_RCC2_OSCSRC2_PIOSC_D4, OSCSRC_30K_INT = SYSCTL_RCC2_OSCSRC2_30K, OSCSRC_32K_EXT = SYSCTL_RCC2_OSCSRC2_32K768, }; /** * \brief PWM clock divisor values * * Possible values of the binary divisor used to predivide the system clock down * for use as the timing reference for the PWM module. */ enum pwm_clkdiv { PWMDIV_2 = SYSCTL_RCC_PWMDIV_2, PWMDIV_4 = SYSCTL_RCC_PWMDIV_4, PWMDIV_8 = SYSCTL_RCC_PWMDIV_8, PWMDIV_16 = SYSCTL_RCC_PWMDIV_16, PWMDIV_32 = SYSCTL_RCC_PWMDIV_32, PWMDIV_64 = SYSCTL_RCC_PWMDIV_64, }; /** * \brief Predefined crystal values * * Predefined crystal values for the XTAL field in SYSCTL_RCC. * Using these predefined values in the XTAL field, the SYSCTL_PLLFREQ0 and * SYSCTL_PLLFREQ1 are automatically adjusted in hardware to provide a PLL clock * of 400MHz. */ enum xtal_t { XTAL_4M = SYSCTL_RCC_XTAL_4M, XTAL_4M_096 = SYSCTL_RCC_XTAL_4M_096, XTAL_4M_9152 = SYSCTL_RCC_XTAL_4M_9152, XTAL_5M = SYSCTL_RCC_XTAL_5M, XTAL_5M_12 = SYSCTL_RCC_XTAL_5M_12, XTAL_6M = SYSCTL_RCC_XTAL_6M, XTAL_6M_144 = SYSCTL_RCC_XTAL_6M_144, XTAL_7M_3728 = SYSCTL_RCC_XTAL_7M_3728, XTAL_8M = SYSCTL_RCC_XTAL_8M, XTAL_8M_192 = SYSCTL_RCC_XTAL_8M_192, XTAL_10M = SYSCTL_RCC_XTAL_10M, XTAL_12M = SYSCTL_RCC_XTAL_12M, XTAL_12M_288 = SYSCTL_RCC_XTAL_12M_288, XTAL_13M_56 = SYSCTL_RCC_XTAL_13M_56, XTAL_14M_31818 = SYSCTL_RCC_XTAL_14M_31818, XTAL_16M = SYSCTL_RCC_XTAL_16M, XTAL_16M_384 = SYSCTL_RCC_XTAL_16M_384, XTAL_18M = SYSCTL_RCC_XTAL_18M, XTAL_20M = SYSCTL_RCC_XTAL_20M, XTAL_24M = SYSCTL_RCC_XTAL_24M, XTAL_25M = SYSCTL_RCC_XTAL_25M, }; /* ============================================================================= * Function prototypes * ---------------------------------------------------------------------------*/ BEGIN_DECLS /* Low-level clock API */ void rcc_configure_xtal(enum xtal_t xtal); void rcc_disable_main_osc(void); void rcc_disable_interal_osc(void); void rcc_enable_main_osc(void); void rcc_enable_interal_osc(void); void rcc_enable_rcc2(void); void rcc_pll_off(void); void rcc_pll_on(void); void rcc_set_osc_source(enum osc_src src); void rcc_pll_bypass_disable(void); void rcc_pll_bypass_enable(void); void rcc_set_pll_divisor(uint8_t div400); void rcc_set_pwm_divisor(enum pwm_clkdiv div); void rcc_usb_pll_off(void); void rcc_usb_pll_on(void); void rcc_wait_for_pll_ready(void); /* High-level clock API */ void rcc_change_pll_divisor(uint8_t plldiv400); uint32_t rcc_get_system_clock_frequency(void); void rcc_sysclk_config(enum osc_src src, enum xtal_t xtal, uint8_t pll_div400); END_DECLS /**@}*/ #endif /* LM4F_RCC_H */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/systemcontrol.h ================================================ /** @defgroup systemcontrol_defines System Control @brief Defined Constants and Types for the LM4F System Control @ingroup LM4Fxx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Alexandru Gagniuc @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LM4F_SYSTEMCONTROL_H #define LM4F_SYSTEMCONTROL_H /**@{*/ #include #include #define SYSCTL_DID0 MMIO32(SYSCTL_BASE + 0x000) #define SYSCTL_DID1 MMIO32(SYSCTL_BASE + 0x004) #define SYSCTL_PBORCTL MMIO32(SYSCTL_BASE + 0x030) #define SYSCTL_LDORCTL MMIO32(SYSCTL_BASE + 0x034) #define SYSCTL_RIS MMIO32(SYSCTL_BASE + 0x050) #define SYSCTL_IMC MMIO32(SYSCTL_BASE + 0x054) #define SYSCTL_MISC MMIO32(SYSCTL_BASE + 0x058) #define SYSCTL_RESC MMIO32(SYSCTL_BASE + 0x05C) #define SYSCTL_RCC MMIO32(SYSCTL_BASE + 0x060) #define SYSCTL_PLLCFG MMIO32(SYSCTL_BASE + 0x064) #define SYSCTL_GPIOHBCTL MMIO32(SYSCTL_BASE + 0x06C) #define SYSCTL_RCC2 MMIO32(SYSCTL_BASE + 0x070) #define SYSCTL_MOSCCTL MMIO32(SYSCTL_BASE + 0x07C) #define SYSCTL_DSLPCLKCFG MMIO32(SYSCTL_BASE + 0x144) #define SYSCTL_SYSPROP MMIO32(SYSCTL_BASE + 0x14C) #define SYSCTL_PIOSCCAL MMIO32(SYSCTL_BASE + 0x150) #define SYSCTL_PIOSCSTAT MMIO32(SYSCTL_BASE + 0x154) #define SYSCTL_PLLFREQ0 MMIO32(SYSCTL_BASE + 0x160) #define SYSCTL_PLLFREQ1 MMIO32(SYSCTL_BASE + 0x164) #define SYSCTL_PLLSTAT MMIO32(SYSCTL_BASE + 0x168) /* Peripheral present */ #define SYSCTL_PPWD MMIO32(SYSCTL_BASE + 0x300) #define SYSCTL_PPTIMER MMIO32(SYSCTL_BASE + 0x304) #define SYSCTL_PPGPIO MMIO32(SYSCTL_BASE + 0x308) #define SYSCTL_PPDMA MMIO32(SYSCTL_BASE + 0x30C) #define SYSCTL_PPHIB MMIO32(SYSCTL_BASE + 0x314) #define SYSCTL_PPUART MMIO32(SYSCTL_BASE + 0x318) #define SYSCTL_PPSSI MMIO32(SYSCTL_BASE + 0x31C) #define SYSCTL_PPI2C MMIO32(SYSCTL_BASE + 0x320) #define SYSCTL_PPUSB MMIO32(SYSCTL_BASE + 0x328) #define SYSCTL_PPCAN MMIO32(SYSCTL_BASE + 0x334) #define SYSCTL_PPADC MMIO32(SYSCTL_BASE + 0x338) #define SYSCTL_PPACMP MMIO32(SYSCTL_BASE + 0x33C) #define SYSCTL_PPPWM MMIO32(SYSCTL_BASE + 0x340) #define SYSCTL_PPQEI MMIO32(SYSCTL_BASE + 0x344) #define SYSCTL_PPEEPROM MMIO32(SYSCTL_BASE + 0x358) #define SYSCTL_PPWTIMER MMIO32(SYSCTL_BASE + 0x35C) /* Peripheral software reset */ #define SYSCTL_SRWD MMIO32(SYSCTL_BASE + 0x500) #define SYSCTL_SRTIMER MMIO32(SYSCTL_BASE + 0x504) #define SYSCTL_SRGPIO MMIO32(SYSCTL_BASE + 0x508) #define SYSCTL_SRDMA MMIO32(SYSCTL_BASE + 0x50C) #define SYSCTL_SRHIB MMIO32(SYSCTL_BASE + 0x514) #define SYSCTL_SRUART MMIO32(SYSCTL_BASE + 0x518) #define SYSCTL_SRSSI MMIO32(SYSCTL_BASE + 0x51C) #define SYSCTL_SRI2C MMIO32(SYSCTL_BASE + 0x520) #define SYSCTL_SRUSB MMIO32(SYSCTL_BASE + 0x528) #define SYSCTL_SRCAN MMIO32(SYSCTL_BASE + 0x534) #define SYSCTL_SRADC MMIO32(SYSCTL_BASE + 0x538) #define SYSCTL_SRACMP MMIO32(SYSCTL_BASE + 0x53C) #define SYSCTL_SRPWM MMIO32(SYSCTL_BASE + 0x540) #define SYSCTL_SRQEI MMIO32(SYSCTL_BASE + 0x544) #define SYSCTL_SREEPROM MMIO32(SYSCTL_BASE + 0x558) #define SYSCTL_SRWTIMER MMIO32(SYSCTL_BASE + 0x55C) /* Peripheral run mode clock gating control */ #define SYSCTL_RCGCWD MMIO32(SYSCTL_BASE + 0x600) #define SYSCTL_RCGCTIMER MMIO32(SYSCTL_BASE + 0x604) #define SYSCTL_RCGCGPIO MMIO32(SYSCTL_BASE + 0x608) #define SYSCTL_RCGCDMA MMIO32(SYSCTL_BASE + 0x60C) #define SYSCTL_RCGCHIB MMIO32(SYSCTL_BASE + 0x614) #define SYSCTL_RCGCUART MMIO32(SYSCTL_BASE + 0x618) #define SYSCTL_RCGCSSI MMIO32(SYSCTL_BASE + 0x61C) #define SYSCTL_RCGCI2C MMIO32(SYSCTL_BASE + 0x620) #define SYSCTL_RCGCUSB MMIO32(SYSCTL_BASE + 0x628) #define SYSCTL_RCGCCAN MMIO32(SYSCTL_BASE + 0x634) #define SYSCTL_RCGCADC MMIO32(SYSCTL_BASE + 0x638) #define SYSCTL_RCGCACMP MMIO32(SYSCTL_BASE + 0x63C) #define SYSCTL_RCGCPWM MMIO32(SYSCTL_BASE + 0x640) #define SYSCTL_RCGCQEI MMIO32(SYSCTL_BASE + 0x644) #define SYSCTL_RCGCEEPROM MMIO32(SYSCTL_BASE + 0x658) #define SYSCTL_RCGCWTIMER MMIO32(SYSCTL_BASE + 0x65C) /* Peripheral sleep mode clock gating control */ #define SYSCTL_SCGCWD MMIO32(SYSCTL_BASE + 0x700) #define SYSCTL_SCGCTIMER MMIO32(SYSCTL_BASE + 0x704) #define SYSCTL_SCGCGPIO MMIO32(SYSCTL_BASE + 0x708) #define SYSCTL_SCGCDMA MMIO32(SYSCTL_BASE + 0x70C) #define SYSCTL_SCGCHIB MMIO32(SYSCTL_BASE + 0x714) #define SYSCTL_SCGCUART MMIO32(SYSCTL_BASE + 0x718) #define SYSCTL_SCGCSSI MMIO32(SYSCTL_BASE + 0x71C) #define SYSCTL_SCGCI2C MMIO32(SYSCTL_BASE + 0x720) #define SYSCTL_SCGCUSB MMIO32(SYSCTL_BASE + 0x728) #define SYSCTL_SCGCCAN MMIO32(SYSCTL_BASE + 0x734) #define SYSCTL_SCGCADC MMIO32(SYSCTL_BASE + 0x738) #define SYSCTL_SCGCACMP MMIO32(SYSCTL_BASE + 0x73C) #define SYSCTL_SCGCPWM MMIO32(SYSCTL_BASE + 0x740) #define SYSCTL_SCGCQEI MMIO32(SYSCTL_BASE + 0x744) #define SYSCTL_SCGCEEPROM MMIO32(SYSCTL_BASE + 0x758) #define SYSCTL_SCGCWTIMER MMIO32(SYSCTL_BASE + 0x75C) /* Peripheral deep-sleep mode clock gating control */ #define SYSCTL_DCGCWD MMIO32(SYSCTL_BASE + 0x800) #define SYSCTL_DCGCTIMER MMIO32(SYSCTL_BASE + 0x804) #define SYSCTL_DCGCGPIO MMIO32(SYSCTL_BASE + 0x808) #define SYSCTL_DCGCDMA MMIO32(SYSCTL_BASE + 0x80C) #define SYSCTL_DCGCHIB MMIO32(SYSCTL_BASE + 0x814) #define SYSCTL_DCGCUART MMIO32(SYSCTL_BASE + 0x818) #define SYSCTL_DCGCSSI MMIO32(SYSCTL_BASE + 0x81C) #define SYSCTL_DCGCI2C MMIO32(SYSCTL_BASE + 0x820) #define SYSCTL_DCGCUSB MMIO32(SYSCTL_BASE + 0x828) #define SYSCTL_DCGCCAN MMIO32(SYSCTL_BASE + 0x834) #define SYSCTL_DCGCADC MMIO32(SYSCTL_BASE + 0x838) #define SYSCTL_DCGCACMP MMIO32(SYSCTL_BASE + 0x83C) #define SYSCTL_DCGCPWM MMIO32(SYSCTL_BASE + 0x840) #define SYSCTL_DCGCQEI MMIO32(SYSCTL_BASE + 0x844) #define SYSCTL_DCGCEEPROM MMIO32(SYSCTL_BASE + 0x858) #define SYSCTL_DCGCWTIMER MMIO32(SYSCTL_BASE + 0x85C) /* Peripheral ready */ #define SYSCTL_PRWD MMIO32(SYSCTL_BASE + 0xA00) #define SYSCTL_PRTIMER MMIO32(SYSCTL_BASE + 0xA04) #define SYSCTL_PRGPIO MMIO32(SYSCTL_BASE + 0xA08) #define SYSCTL_PRDMA MMIO32(SYSCTL_BASE + 0xA0C) #define SYSCTL_PRHIB MMIO32(SYSCTL_BASE + 0xA14) #define SYSCTL_PRUART MMIO32(SYSCTL_BASE + 0xA18) #define SYSCTL_PRSSI MMIO32(SYSCTL_BASE + 0xA1C) #define SYSCTL_PRI2C MMIO32(SYSCTL_BASE + 0xA20) #define SYSCTL_PRUSB MMIO32(SYSCTL_BASE + 0xA28) #define SYSCTL_PRCAN MMIO32(SYSCTL_BASE + 0xA34) #define SYSCTL_PRADC MMIO32(SYSCTL_BASE + 0xA38) #define SYSCTL_PRACMP MMIO32(SYSCTL_BASE + 0xA3C) #define SYSCTL_PRPWM MMIO32(SYSCTL_BASE + 0xA40) #define SYSCTL_PRQEI MMIO32(SYSCTL_BASE + 0xA44) #define SYSCTL_PREEPROM MMIO32(SYSCTL_BASE + 0xA58) #define SYSCTL_PRWTIMER MMIO32(SYSCTL_BASE + 0xA5C) /* ============================================================================= * System Control Legacy Registers * ---------------------------------------------------------------------------*/ #ifdef LM4F_LEGACY_SYSCTL #define SYSCTL_DC0 MMIO32(SYSCTL_BASE + 0x008) #define SYSCTL_DC1 MMIO32(SYSCTL_BASE + 0x010) #define SYSCTL_DC2 MMIO32(SYSCTL_BASE + 0x014) #define SYSCTL_DC3 MMIO32(SYSCTL_BASE + 0x018) #define SYSCTL_DC4 MMIO32(SYSCTL_BASE + 0x01C) #define SYSCTL_DC5 MMIO32(SYSCTL_BASE + 0x020) #define SYSCTL_DC6 MMIO32(SYSCTL_BASE + 0x024) #define SYSCTL_DC7 MMIO32(SYSCTL_BASE + 0x028) #define SYSCTL_DC8 MMIO32(SYSCTL_BASE + 0x02C) #define SYSCTL_SRCR0 MMIO32(SYSCTL_BASE + 0x040) #define SYSCTL_SRCR1 MMIO32(SYSCTL_BASE + 0x044) #define SYSCTL_SRCR2 MMIO32(SYSCTL_BASE + 0x048) #define SYSCTL_RCGC0 MMIO32(SYSCTL_BASE + 0x100) #define SYSCTL_RCGC1 MMIO32(SYSCTL_BASE + 0x104) #define SYSCTL_RCGC2 MMIO32(SYSCTL_BASE + 0x108) #define SYSCTL_SCGC0 MMIO32(SYSCTL_BASE + 0x110) #define SYSCTL_SCGC1 MMIO32(SYSCTL_BASE + 0x114) #define SYSCTL_SCGC2 MMIO32(SYSCTL_BASE + 0x118) #define SYSCTL_DCGC0 MMIO32(SYSCTL_BASE + 0x120) #define SYSCTL_DCGC1 MMIO32(SYSCTL_BASE + 0x124) #define SYSCTL_DCGC2 MMIO32(SYSCTL_BASE + 0x128) #define SYSCTL_DC9 MMIO32(SYSCTL_BASE + 0x190) #define SYSCTL_NVMSTAT MMIO32(SYSCTL_BASE + 0x1A0) #endif /* LM4F_LEGACY_SYSCTL */ /* ============================================================================= * SYSCTL_DID0 values * ---------------------------------------------------------------------------*/ /** DID0 version */ #define SYSCTL_DID0_VER_MASK (7 << 28) /** Device class */ #define SYSCTL_DID0_CLASS_MASK (0xFF << 16) /** Major revision */ #define SYSCTL_DID0_MAJOR_MASK (0xFF << 8) /** Minor revision */ #define SYSCTL_DID0_MAJOR_MASK (0xFF << 8) /* ============================================================================= * SYSCTL_DID1 values * ---------------------------------------------------------------------------*/ /** DID1 version */ #define SYSCTL_DID1_VER_MASK (0xF << 28) /** Family */ #define SYSCTL_DID1_FAM_MASK (0xF << 24) /** Part number */ #define SYSCTL_DID1_PARTNO_MASK (0xFF << 16) /** Pin count */ #define SYSCTL_DID1_PINCOUNT_MASK (0x7 << 13) #define SYSCTL_DID1_PINCOUNT_28P (0x0 << 13) #define SYSCTL_DID1_PINCOUNT_48P (0x1 << 13) #define SYSCTL_DID1_PINCOUNT_100P (0x2 << 13) #define SYSCTL_DID1_PINCOUNT_64P (0x3 << 13) #define SYSCTL_DID1_PINCOUNT_144P (0x4 << 13) #define SYSCTL_DID1_PINCOUNT_157P (0x5 << 13) /** Temperature range */ #define SYSCTL_DID1_TEMP_MASK (0x7 << 5) #define SYSCTL_DID1_TEMP_0_70 (0x0 << 5) #define SYSCTL_DID1_TEMP_M40_85 (0x1 << 5) #define SYSCTL_DID1_TEMP_M40_105 (0x2 << 5) /** Package */ #define SYSCTL_DID1_PKG_MASK (0x3 << 5) #define SYSCTL_DID1_PKG_SOIC (0x0 << 5) #define SYSCTL_DID1_PKG_LQFP (0x1 << 5) #define SYSCTL_DID1_PKG_BGA (0x2 << 5) /** ROHS compliance */ #define SYSCTL_DID1_ROHS (1 << 2) /** Qualification status */ #define SYSCTL_DID1_QUAL_MASK (3 << 0) /* ============================================================================= * SYSCTL_PBORCTL values * ---------------------------------------------------------------------------*/ /** BOR interrupt or reset */ #define SYSCTL_PBORCTL_BORIOR (1 << 1) /* ============================================================================= * SYSCTL_RIS values * ---------------------------------------------------------------------------*/ /** MOSC Power Up Raw Interrupt Status */ #define SYSCTL_RIS_MOSCPUPRIS (1 << 8) /** USB PLL Lock Raw Interrupt Status */ #define SYSCTL_RIS_USBPLLLRIS (1 << 7) /** PLL Lock Raw Interrupt Status */ #define SYSCTL_RIS_PLLLRIS (1 << 6) /** Main Oscillator Failure Raw Interrupt Status */ #define SYSCTL_RIS_MOFRIS (1 << 3) /** Brown-Out Reset Raw Interrupt Status */ #define SYSCTL_RIS_BORRIS (1 << 1) /* ============================================================================= * SYSCTL_IMC values * ---------------------------------------------------------------------------*/ /** MOSC Power Up Raw Interrupt Status */ #define SYSCTL_IMC_MOSCPUPIM (1 << 8) /** USB PLL Lock Raw Interrupt Status */ #define SYSCTL_IMC_USBPLLLIM (1 << 7) /** PLL Lock Raw Interrupt Status */ #define SYSCTL_IMC_PLLLIM (1 << 6) /** Main Oscillator Failure Raw Interrupt Status */ #define SYSCTL_IMC_MOFIM (1 << 3) /** Brown-Out Reset Raw Interrupt Status */ #define SYSCTL_IMC_BORIM (1 << 1) /* ============================================================================= * SYSCTL_MISC values * ---------------------------------------------------------------------------*/ /** MOSC Power Up Raw Interrupt Status */ #define SYSCTL_MISC_MOSCPUPMIS (1 << 8) /** USB PLL Lock Raw Interrupt Status */ #define SYSCTL_MISC_USBPLLLMIS (1 << 7) /** PLL Lock Raw Interrupt Status */ #define SYSCTL_MISC_PLLLMIS (1 << 6) /** Main Oscillator Failure Raw Interrupt Status */ #define SYSCTL_MISC_MOFMIS (1 << 3) /** Brown-Out Reset Raw Interrupt Status */ #define SYSCTL_MISC_BORMIS (1 << 1) /* ============================================================================= * SYSCTL_RESC values * ---------------------------------------------------------------------------*/ /** MOSC Failure Reset */ #define SYSCTL_RESC_MOSCFAIL (1 << 18) /** Watchdog Timer 1 Reset */ #define SYSCTL_RESC_WDT1 (1 << 5) /** Software Reset */ #define SYSCTL_RESC_SW (1 << 4) /** Watchdog Timer 0 Reset */ #define SYSCTL_RESC_WDT0 (1 << 3) /** Brown-Out Reset */ #define SYSCTL_RESC_BOR (1 << 2) /** Power-On Reset */ #define SYSCTL_RESC_POR (1 << 1) /** External Reset */ #define SYSCTL_RESC_EXT (1 << 0) /* ============================================================================= * SYSCTL_RCC values * ---------------------------------------------------------------------------*/ /** Auto Clock Gating */ #define SYSCTL_RCC_ACG (1 << 27) /** System Clock Divisor */ #define SYSCTL_RCC_SYSDIV_MASK (0xF << 23) /** Enable System Clock Divider */ #define SYSCTL_RCC_USESYSDIV (1 << 22) /** Enable PWM Clock Divisor */ #define SYSCTL_RCC_USEPWMDIV (1 << 20) /** PWM Unit Clock Divisor */ #define SYSCTL_RCC_PWMDIV_MASK (0xF << 17) #define SYSCTL_RCC_PWMDIV_2 (0x0 << 17) #define SYSCTL_RCC_PWMDIV_4 (0x1 << 17) #define SYSCTL_RCC_PWMDIV_8 (0x2 << 17) #define SYSCTL_RCC_PWMDIV_16 (0x3 << 17) #define SYSCTL_RCC_PWMDIV_32 (0x4 << 17) #define SYSCTL_RCC_PWMDIV_64 (0x5 << 17) /** PLL Power Down */ #define SYSCTL_RCC_PWRDN (1 << 13) /** PLL Bypass */ #define SYSCTL_RCC_BYPASS (1 << 11) /** Crystal Value */ #define SYSCTL_RCC_XTAL_MASK (0x1F << 6) #define SYSCTL_RCC_XTAL_4M (0x06 << 6) #define SYSCTL_RCC_XTAL_4M_096 (0x07 << 6) #define SYSCTL_RCC_XTAL_4M_9152 (0x08 << 6) #define SYSCTL_RCC_XTAL_5M (0x09 << 6) #define SYSCTL_RCC_XTAL_5M_12 (0x0A << 6) #define SYSCTL_RCC_XTAL_6M (0x0B << 6) #define SYSCTL_RCC_XTAL_6M_144 (0x0C << 6) #define SYSCTL_RCC_XTAL_7M_3728 (0x0D << 6) #define SYSCTL_RCC_XTAL_8M (0x0E << 6) #define SYSCTL_RCC_XTAL_8M_192 (0x0F << 6) #define SYSCTL_RCC_XTAL_10M (0x10 << 6) #define SYSCTL_RCC_XTAL_12M (0x11 << 6) #define SYSCTL_RCC_XTAL_12M_288 (0x12 << 6) #define SYSCTL_RCC_XTAL_13M_56 (0x13 << 6) #define SYSCTL_RCC_XTAL_14M_31818 (0x14 << 6) #define SYSCTL_RCC_XTAL_16M (0x15 << 6) #define SYSCTL_RCC_XTAL_16M_384 (0x16 << 6) #define SYSCTL_RCC_XTAL_18M (0x17 << 6) #define SYSCTL_RCC_XTAL_20M (0x18 << 6) #define SYSCTL_RCC_XTAL_24M (0x19 << 6) #define SYSCTL_RCC_XTAL_25M (0x1A << 6) /** Oscillator Source */ #define SYSCTL_RCC_OSCSRC_MASK (0x3 << 4) #define SYSCTL_RCC_OSCSRC_MOSC (0x0 << 4) #define SYSCTL_RCC_OSCSRC_PIOSC (0x1 << 4) #define SYSCTL_RCC_OSCSRC_PIOSC_D4 (0x2 << 4) #define SYSCTL_RCC_OSCSRC_30K (0x3 << 4) /** Precision Internal Oscillator Disable */ #define SYSCTL_RCC_IOSCDIS (1 << 1) /** Main Oscillator Disable */ #define SYSCTL_RCC_MOSCDIS (1 << 0) /* ============================================================================= * SYSCTL_GPIOHBCTL values * ---------------------------------------------------------------------------*/ #define SYSCTL_GPIOHBCTL_PORTQ (1 << 14) #define SYSCTL_GPIOHBCTL_PORTP (1 << 13) #define SYSCTL_GPIOHBCTL_PORTN (1 << 12) #define SYSCTL_GPIOHBCTL_PORTM (1 << 11) #define SYSCTL_GPIOHBCTL_PORTL (1 << 10) #define SYSCTL_GPIOHBCTL_PORTK (1 << 9) #define SYSCTL_GPIOHBCTL_PORTJ (1 << 8) #define SYSCTL_GPIOHBCTL_PORTH (1 << 7) #define SYSCTL_GPIOHBCTL_PORTG (1 << 6) #define SYSCTL_GPIOHBCTL_PORTF (1 << 5) #define SYSCTL_GPIOHBCTL_PORTE (1 << 4) #define SYSCTL_GPIOHBCTL_PORTD (1 << 3) #define SYSCTL_GPIOHBCTL_PORTC (1 << 2) #define SYSCTL_GPIOHBCTL_PORTB (1 << 1) #define SYSCTL_GPIOHBCTL_PORTA (1 << 0) /* ============================================================================= * SYSCTL_RCC2 values * ---------------------------------------------------------------------------*/ /** RCC2 overides RCC */ #define SYSCTL_RCC2_USERCC2 (1 << 31) /** Divide PLL as 400 MHz vs. 200 MHz */ #define SYSCTL_RCC2_DIV400 (1 << 30) /** Auto Clock Gating */ #define SYSCTL_RCC2_ACG (1 << 27) /** System Clock Divisor 2 */ #define SYSCTL_RCC2_SYSDIV2_MASK (0x3F << 23) /** Additional LSB for SYSDIV2 */ #define SYSCTL_RCC2_SYSDIV2LSB (1 << 22) /** System clock divisor mask when RCC2_DIV400 is set */ #define SYSCTL_RCC2_SYSDIV400_MASK (0x7F << 22) /** Power-Down USB PLL */ #define SYSCTL_RCC2_USBPWRDN (1 << 14) /** PLL Power Down 2 */ #define SYSCTL_RCC2_PWRDN2 (1 << 13) /** PLL Bypass 2 */ #define SYSCTL_RCC2_BYPASS2 (1 << 11) /** Oscillator Source 2 */ #define SYSCTL_RCC2_OSCSRC2_MASK (0x7 << 4) #define SYSCTL_RCC2_OSCSRC2_MOSC (0x0 << 4) #define SYSCTL_RCC2_OSCSRC2_PIOSC (0x1 << 4) #define SYSCTL_RCC2_OSCSRC2_PIOSC_D4 (0x2 << 4) #define SYSCTL_RCC2_OSCSRC2_30K (0x3 << 4) #define SYSCTL_RCC2_OSCSRC2_32K768 (0x7 << 4) /* ============================================================================= * SYSCTL_MOSCCTL values * ---------------------------------------------------------------------------*/ /** No Crystal Connected */ #define SYSCTL_MOSCCTL_NOXTAL (1 << 2) /** MOSC Failure Action */ #define SYSCTL_MOSCCTL_MOSCIM (1 << 1) /** Clock Validation for MOSC */ #define SYSCTL_MOSCCTL_CVAL (1 << 0) /* ============================================================================= * SYSCTL_DSLPCLKCFG values * ---------------------------------------------------------------------------*/ /*TODO*/ /* ============================================================================= * SYSCTL_SYSPROP values * ---------------------------------------------------------------------------*/ /** FPU present */ #define SYSCTL_SYSPROP_FPU (1 << 0) /* ============================================================================= * SYSCTL_PIOSCCAL values * ---------------------------------------------------------------------------*/ /** Use User Trim Value */ #define SYSCTL_PIOSCCAL_UTEN (1 << 31) /** Start calibration */ #define SYSCTL_PIOSCCAL_CAL (1 << 9) /** Update trim */ #define SYSCTL_PIOSCCAL_UPDATE (1 << 8) /** User Trim Value */ #define SYSCTL_PIOSCCAL_UT_MASK (0x7F << 0) /* ============================================================================= * SYSCTL_PIOSCSTAT values * ---------------------------------------------------------------------------*/ /** Default Trim Value */ #define SYSCTL_PIOSCSTAT_DT_MASK (0x7F << 16) /** Calibration result */ #define SYSCTL_PIOSCSTAT_RESULT_MASK (0x3 << 8) /** Calibration Trim Value */ #define SYSCTL_PIOSCSTAT_CT_MASK (0x7F << 0) /* ============================================================================= * SYSCTL_PLLFREQ0 values * ---------------------------------------------------------------------------*/ /** PLL M fractional value */ #define SYSCTL_PLLFREQ0_MFRAC_MASK (0x3FF << 10) /** PLL M integer value */ #define SYSCTL_PLLFREQ0_MINT_MASK (0x3FF << 0) /* ============================================================================= * SYSCTL_PLLFREQ1 values * ---------------------------------------------------------------------------*/ /** PLL Q value */ #define SYSCTL_PLLFREQ1_Q_MASK (0x1F << 8) /** PLL N value */ #define SYSCTL_PLLFREQ1_N_MASK (0x1F << 0) /* ============================================================================= * SYSCTL_PLLSTAT values * ---------------------------------------------------------------------------*/ /** PLL lock */ #define SYSCTL_PLLSTAT_LOCK (1 << 0) /* ============================================================================= * Convenience definitions for a readable API * ---------------------------------------------------------------------------*/ /** * \brief Clock enable definitions * * The definitions are specified in the form * 31:5 register offset from SYSCTL_BASE for the clock register * 4:0 bit offset for the given peripheral * * The names have the form [clock_type]_[periph_type]_[periph_number] * Where clock_type is * RCC for run clock * SCC for sleep clock * DCC for deep-sleep clock */ enum lm4f_clken { /* * Run clock control */ RCC_WD0 = ((uint32_t)&SYSCTL_RCGCWD - SYSCTL_BASE) << 5, RCC_WD1, RCC_TIMER0 = ((uint32_t)&SYSCTL_RCGCTIMER - SYSCTL_BASE) << 5, RCC_TIMER1, RCC_TIMER2, RCC_TIMER3, RCC_TIMER4, RCC_TIMER5, RCC_GPIOA = ((uint32_t)&SYSCTL_RCGCGPIO - SYSCTL_BASE) << 5, RCC_GPIOB, RCC_GPIOC, RCC_GPIOD, RCC_GPIOE, RCC_GPIOF, RCC_GPIOG, RCC_GPIOH, RCC_GPIOJ, RCC_GPIOK, RCC_GPIOL, RCC_GPIOM, RCC_GPION, RCC_GPIOP, RCC_GPIOQ, RCC_DMA = ((uint32_t)&SYSCTL_RCGCDMA - SYSCTL_BASE) << 5, RCC_HIB = ((uint32_t)&SYSCTL_RCGCGPIO - SYSCTL_BASE) << 5, RCC_UART0 = ((uint32_t)&SYSCTL_RCGCUART - SYSCTL_BASE) << 5, RCC_UART1, RCC_UART2, RCC_UART3, RCC_UART4, RCC_UART5, RCC_UART6, RCC_UART7, RCC_SSI0 = ((uint32_t)&SYSCTL_RCGCSSI - SYSCTL_BASE) << 5, RCC_SSI1, RCC_SSI2, RCC_SSI3, RCC_I2C0 = ((uint32_t)&SYSCTL_RCGCI2C - SYSCTL_BASE) << 5, RCC_I2C1, RCC_I2C2, RCC_I2C3, RCC_I2C4, RCC_I2C5, RCC_USB0 = ((uint32_t)&SYSCTL_RCGCUSB - SYSCTL_BASE) << 5, RCC_CAN0 = ((uint32_t)&SYSCTL_RCGCCAN - SYSCTL_BASE) << 5, RCC_CAN1, RCC_ADC0 = ((uint32_t)&SYSCTL_RCGCADC - SYSCTL_BASE) << 5, RCC_ADC1, RCC_ACMP0 = ((uint32_t)&SYSCTL_RCGCACMP - SYSCTL_BASE) << 5, RCC_PWM0 = ((uint32_t)&SYSCTL_RCGCPWM - SYSCTL_BASE) << 5, RCC_PWM1, RCC_QEI0 = ((uint32_t)&SYSCTL_RCGCQEI - SYSCTL_BASE) << 5, RCC_QEI1, RCC_EEPROM0 = ((uint32_t)&SYSCTL_RCGCEEPROM - SYSCTL_BASE) << 5, RCC_WTIMER0 = ((uint32_t)&SYSCTL_RCGCWTIMER - SYSCTL_BASE) << 5, RCC_WTIMER1, RCC_WTIMER2, RCC_WTIMER3, RCC_WTIMER4, RCC_WTIMER5, /* * Sleep clock control */ SCC_WD0 = ((uint32_t)&SYSCTL_SCGCWD - SYSCTL_BASE) << 5, SCC_WD1, SCC_TIMER0 = ((uint32_t)&SYSCTL_SCGCTIMER - SYSCTL_BASE) << 5, SCC_TIMER1, SCC_TIMER2, SCC_TIMER3, SCC_TIMER4, SCC_TIMER5, SCC_GPIOA = ((uint32_t)&SYSCTL_SCGCGPIO - SYSCTL_BASE) << 5, SCC_GPIOB, SCC_GPIOC, SCC_GPIOD, SCC_GPIOE, SCC_GPIOF, SCC_GPIOG, SCC_GPIOH, SCC_GPIOJ, SCC_GPIOK, SCC_GPIOL, SCC_GPIOM, SCC_GPION, SCC_GPIOP, SCC_GPIOQ, SCC_DMA = ((uint32_t)&SYSCTL_SCGCDMA - SYSCTL_BASE) << 5, SCC_HIB = ((uint32_t)&SYSCTL_SCGCGPIO - SYSCTL_BASE) << 5, SCC_UART0 = ((uint32_t)&SYSCTL_SCGCUART - SYSCTL_BASE) << 5, SCC_UART1, SCC_UART2, SCC_UART3, SCC_UART4, SCC_UART5, SCC_UART6, SCC_UART7, SCC_SSI0 = ((uint32_t)&SYSCTL_SCGCSSI - SYSCTL_BASE) << 5, SCC_SSI1, SCC_SSI2, SCC_SSI3, SCC_I2C0 = ((uint32_t)&SYSCTL_SCGCI2C - SYSCTL_BASE) << 5, SCC_I2C1, SCC_I2C2, SCC_I2C3, SCC_I2C4, SCC_I2C5, SCC_USB0 = ((uint32_t)&SYSCTL_SCGCUSB - SYSCTL_BASE) << 5, SCC_CAN0 = ((uint32_t)&SYSCTL_SCGCCAN - SYSCTL_BASE) << 5, SCC_CAN1, SCC_ADC0 = ((uint32_t)&SYSCTL_SCGCADC - SYSCTL_BASE) << 5, SCC_ADC1, SCC_ACMP0 = ((uint32_t)&SYSCTL_SCGCACMP - SYSCTL_BASE) << 5, SCC_PWM0 = ((uint32_t)&SYSCTL_SCGCPWM - SYSCTL_BASE) << 5, SCC_PWM1, SCC_QEI0 = ((uint32_t)&SYSCTL_SCGCQEI - SYSCTL_BASE) << 5, SCC_QEI1, SCC_EEPROM0 = ((uint32_t)&SYSCTL_SCGCEEPROM - SYSCTL_BASE) << 5, SCC_WTIMER0 = ((uint32_t)&SYSCTL_SCGCWTIMER - SYSCTL_BASE) << 5, SCC_WTIMER1, SCC_WTIMER2, SCC_WTIMER3, SCC_WTIMER4, SCC_WTIMER5, /* * Deep-sleep clock control */ DCC_WD0 = ((uint32_t)&SYSCTL_DCGCWD - SYSCTL_BASE) << 5, DCC_WD1, DCC_TIMER0 = ((uint32_t)&SYSCTL_DCGCTIMER - SYSCTL_BASE) << 5, DCC_TIMER1, DCC_TIMER2, DCC_TIMER3, DCC_TIMER4, DCC_TIMER5, DCC_GPIOA = ((uint32_t)&SYSCTL_DCGCGPIO - SYSCTL_BASE) << 5, DCC_GPIOB, DCC_GPIOC, DCC_GPIOD, DCC_GPIOE, DCC_GPIOF, DCC_GPIOG, DCC_GPIOH, DCC_GPIOJ, DCC_GPIOK, DCC_GPIOL, DCC_GPIOM, DCC_GPION, DCC_GPIOP, DCC_GPIOQ, DCC_DMA = ((uint32_t)&SYSCTL_DCGCDMA - SYSCTL_BASE) << 5, DCC_HIB = ((uint32_t)&SYSCTL_DCGCGPIO - SYSCTL_BASE) << 5, DCC_UART0 = ((uint32_t)&SYSCTL_DCGCUART - SYSCTL_BASE) << 5, DCC_UART1, DCC_UART2, DCC_UART3, DCC_UART4, DCC_UART5, DCC_UART6, DCC_UART7, DCC_SSI0 = ((uint32_t)&SYSCTL_DCGCSSI - SYSCTL_BASE) << 5, DCC_SSI1, DCC_SSI2, DCC_SSI3, DCC_I2C0 = ((uint32_t)&SYSCTL_DCGCI2C - SYSCTL_BASE) << 5, DCC_I2C1, DCC_I2C2, DCC_I2C3, DCC_I2C4, DCC_I2C5, DCC_USB0 = ((uint32_t)&SYSCTL_DCGCUSB - SYSCTL_BASE) << 5, DCC_CAN0 = ((uint32_t)&SYSCTL_DCGCCAN - SYSCTL_BASE) << 5, DCC_CAN1, DCC_ADC0 = ((uint32_t)&SYSCTL_DCGCADC - SYSCTL_BASE) << 5, DCC_ADC1, DCC_ACMP0 = ((uint32_t)&SYSCTL_DCGCACMP - SYSCTL_BASE) << 5, DCC_PWM0 = ((uint32_t)&SYSCTL_DCGCPWM - SYSCTL_BASE) << 5, DCC_PWM1, DCC_QEI0 = ((uint32_t)&SYSCTL_DCGCQEI - SYSCTL_BASE) << 5, DCC_QEI1, DCC_EEPROM0 = ((uint32_t)&SYSCTL_DCGCEEPROM - SYSCTL_BASE) << 5, DCC_WTIMER0 = ((uint32_t)&SYSCTL_DCGCWTIMER - SYSCTL_BASE) << 5, DCC_WTIMER1, DCC_WTIMER2, DCC_WTIMER3, DCC_WTIMER4, DCC_WTIMER5, }; /* ============================================================================ * Function prototypes * --------------------------------------------------------------------------*/ BEGIN_DECLS void periph_clock_enable(enum lm4f_clken periph); void periph_clock_disable(enum lm4f_clken periph); END_DECLS /**@}*/ #endif /* LM4F_SYSTEMCONTROL_H */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/uart.h ================================================ /** @defgroup uart_defines UART Control * * @brief Defined Constants and Types for the LM4F UART Control * * @ingroup LM4Fxx_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2013 * Alexandru Gagniuc * * @date 07 May 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_LM4F_UART_H #define LIBOPENCM3_LM4F_UART_H /**@{*/ #include #include /* ============================================================================= * Convenience macros * ---------------------------------------------------------------------------*/ /** @defgroup uart_reg_base UART register base addresses * @{*/ #define UART0 UART0_BASE #define UART1 UART1_BASE #define UART2 UART2_BASE #define UART3 UART3_BASE #define UART4 UART4_BASE #define UART5 UART5_BASE #define UART6 UART6_BASE #define UART7 UART7_BASE /** @} */ /* ============================================================================= * UART registers * ---------------------------------------------------------------------------*/ /* UART data register */ #define UART_DR(uart_base) MMIO32(uart_base + 0x00) /* UART Receive Status/Error Clear register */ #define UART_RSR(uart_base) MMIO32(uart_base + 0x04) #define UART_ECR(uart_base) MMIO32(uart_base + 0x04) /* UART Flag register */ #define UART_FR(uart_base) MMIO32(uart_base + 0x18) /* UART IrDA Low-Power register */ #define UART_ILPR(uart_base) MMIO32(uart_base + 0x20) /* UART Integer baudrate divisor */ #define UART_IBRD(uart_base) MMIO32(uart_base + 0x24) /* UART Fractional baudrate divisor */ #define UART_FBRD(uart_base) MMIO32(uart_base + 0x28) /* UART Line control */ #define UART_LCRH(uart_base) MMIO32(uart_base + 0x2C) /* UART Control */ #define UART_CTL(uart_base) MMIO32(uart_base + 0x30) /* UART Interrupt FIFO level select */ #define UART_IFLS(uart_base) MMIO32(uart_base + 0x34) /* UART Interrupt mask */ #define UART_IM(uart_base) MMIO32(uart_base + 0x38) /* UART Raw interrupt status */ #define UART_RIS(uart_base) MMIO32(uart_base + 0x3C) /* UART Masked Interrupt status */ #define UART_MIS(uart_base) MMIO32(uart_base + 0x40) /* UART Interrupt Clear */ #define UART_ICR(uart_base) MMIO32(uart_base + 0x44) /* UART DMA control */ #define UART_DMACTL(uart_base) MMIO32(uart_base + 0x48) /* UART LIN control */ #define UART_LCTL(uart_base) MMIO32(uart_base + 0x90) /* UART LIN snap shot */ #define UART_LSS(uart_base) MMIO32(uart_base + 0x94) /* UART LIN timer */ #define UART_LTIM(uart_base) MMIO32(uart_base + 0x98) /* UART 9-Bit self address */ #define UART_9BITADDR(uart_base) MMIO32(uart_base + 0xA4) /* UART 9-Bit self address mask */ #define UART_9BITAMASK(uart_base) MMIO32(uart_base + 0xA8) /* UART Peripheral properties */ #define UART_PP(uart_base) MMIO32(uart_base + 0xFC0) /* UART Clock configuration */ #define UART_CC(uart_base) MMIO32(uart_base + 0xFC8) /* UART Peripheral Identification 4 */ #define UART_PERIPH_ID4(uart_base) MMIO32(uart_base + 0xFD0) /* UART Peripheral Identification 5 */ #define UART_PERIPH_ID5(uart_base) MMIO32(uart_base + 0xFD4) /* UART Peripheral Identification 6 */ #define UART_PERIPH_ID6(uart_base) MMIO32(uart_base + 0xFD8) /* UART Peripheral Identification 7 */ #define UART_PERIPH_ID7(uart_base) MMIO32(uart_base + 0xFDC) /* UART Peripheral Identification 0 */ #define UART_PERIPH_ID0(uart_base) MMIO32(uart_base + 0xFE0) /* UART Peripheral Identification 1 */ #define UART_PERIPH_ID1(uart_base) MMIO32(uart_base + 0xFE4) /* UART Peripheral Identification 2 */ #define UART_PERIPH_ID2(uart_base) MMIO32(uart_base + 0xFE8) /* UART Peripheral Identification 3 */ #define UART_PERIPH_ID3(uart_base) MMIO32(uart_base + 0xFEC) /* UART PrimeCell Identification 0 */ #define UART_PCELL_ID0(uart_base) MMIO32(uart_base + 0xFF0) /* UART PrimeCell Identification 1 */ #define UART_PCELL_ID1(uart_base) MMIO32(uart_base + 0xFF4) /* UART PrimeCell Identification 2 */ #define UART_PCELL_ID2(uart_base) MMIO32(uart_base + 0xFF8) /* UART PrimeCell Identification 3 */ #define UART_PCELL_ID3(uart_base) MMIO32(uart_base + 0xFFC) /* ============================================================================= * UART_DR values * ---------------------------------------------------------------------------*/ /** Overrun Error */ #define UART_DR_OE (1 << 11) /** Break Error */ #define UART_DR_BE (1 << 10) /** Parity Error */ #define UART_DR_PE (1 << 9) /** Framing Error */ #define UART_DR_FE (1 << 8) /** Data transmitted or received */ #define UART_DR_DATA_MASK (0xFF << 0) /* ============================================================================= * Readonly UART_RSR values * ---------------------------------------------------------------------------*/ /** Overrun Error */ #define UART_RSR_OE (1 << 3) /** Break Error */ #define UART_RSR_BE (1 << 2) /** Parity Error */ #define UART_RSR_PE (1 << 1) /** Framing Error */ #define UART_RSR_FE (1 << 0) /* ============================================================================= * UART_FR values * ---------------------------------------------------------------------------*/ /** Tx FIFO empty */ #define UART_FR_TXFE (1 << 7) /** Rx FIFO full */ #define UART_FR_RXFF (1 << 6) /** Tx FIFO full */ #define UART_FR_TXFF (1 << 5) /** Rx FIFO empty */ #define UART_FR_RXFE (1 << 4) /** UART Busy */ #define UART_FR_BUSY (1 << 3) /** Clear To Send */ #define UART_FR_CTS (1 << 0) /* ============================================================================= * UART_LCRH values * ---------------------------------------------------------------------------*/ /** Stick parity select */ #define UART_LCRH_SPS (1 << 7) /** Word length */ #define UART_LCRH_WLEN_MASK (3 << 5) #define UART_LCRH_WLEN_5 (0 << 5) #define UART_LCRH_WLEN_6 (1 << 5) #define UART_LCRH_WLEN_7 (2 << 5) #define UART_LCRH_WLEN_8 (3 << 5) /** Enable FIFOs */ #define UART_LCRH_FEN (1 << 4) /** Two stop bits select */ #define UART_LCRH_STP2 (1 << 3) /** Even parity select */ #define UART_LCRH_EPS (1 << 2) /** Parity enable */ #define UART_LCRH_PEN (1 << 1) /** Send break */ #define UART_LCRH_BRK (1 << 0) /* ============================================================================= * UART_CTL values * ---------------------------------------------------------------------------*/ /** Enable Clear To Send */ #define UART_CTL_CTSEN (1 << 15) /** Enable Request To Send */ #define UART_CTL_RTSEN (1 << 14) /** Request To Send */ #define UART_CTL_RTS (1 << 11) /** Data terminal ready */ #define UART_CTL_DTR (1 << 10) /** Rx Enable */ #define UART_CTL_RXE (1 << 9) /** Tx Enable */ #define UART_CTL_TXE (1 << 8) /** Loop back enable */ #define UART_CTL_LBE (1 << 7) /** LIN mode enable */ #define UART_CTL_LIN (1 << 6) /** High speed Enable */ #define UART_CTL_HSE (1 << 5) /** End of transmission */ #define UART_CTL_EOT (1 << 4) /** ISO 7816 Smart Card support */ #define UART_CTL_SMART (1 << 3) /** SIR low-power mode */ #define UART_CTL_SIRLIP (1 << 2) /** SIR enable */ #define UART_CTL_SIREN (1 << 1) /** UART enable */ #define UART_CTL_UARTEN (1 << 0) /* ============================================================================= * UART_IFLS values * ---------------------------------------------------------------------------*/ /** UART Rx interrupt FIFO level select */ #define UART_IFLS_RXIFLSEL_MASK (7 << 3) #define UART_IFLS_RXIFLSEL_1_8 (0 << 3) #define UART_IFLS_RXIFLSEL_1_4 (1 << 3) #define UART_IFLS_RXIFLSEL_1_2 (2 << 3) #define UART_IFLS_RXIFLSEL_3_4 (3 << 3) #define UART_IFLS_RXIFLSEL_7_8 (4 << 3) /** UART Tx interrupt FIFO level select */ #define UART_IFLS_TXIFLSEL_MASK (7 << 0) #define UART_IFLS_TXIFLSEL_7_8 (0 << 0) #define UART_IFLS_TXIFLSEL_3_4 (1 << 0) #define UART_IFLS_TXIFLSEL_1_2 (2 << 0) #define UART_IFLS_TXIFLSEL_1_4 (3 << 0) #define UART_IFLS_TXIFLSEL_1_8 (4 << 0) /* ============================================================================= * UART interrupt mask values * * These are interchangeable across UART_IM, UART_RIS, UART_MIS, and UART_ICR * registers. * ---------------------------------------------------------------------------*/ /** LIN mode edge 5 interrupt mask */ #define UART_IM_LME5IM (1 << 15) /** LIN mode edge 1 interrupt mask */ #define UART_IM_LME1IM (1 << 14) /** LIN mode sync break interrupt mask */ #define UART_IM_LMSBIM (1 << 13) /** 9-bit mode interrupt mask */ #define UART_IM_9BITIM (1 << 12) /** Overrun error interrupt mask */ #define UART_IM_OEIM (1 << 10) /** Break error interrupt mask */ #define UART_IM_BEIM (1 << 9) /** Parity error interrupt mask */ #define UART_IM_PEIM (1 << 8) /** Framing error interrupt mask */ #define UART_IM_FEIM (1 << 7) /** Receive time-out interrupt mask */ #define UART_IM_RTIM (1 << 6) /** Transmit interrupt mask */ #define UART_IM_TXIM (1 << 5) /** Receive interrupt mask */ #define UART_IM_RXIM (1 << 4) /** Data Set Ready modem interrupt mask */ #define UART_IM_DSRIM (1 << 3) /** Data Carrier Detect modem interrupt mask */ #define UART_IM_DCDIM (1 << 2) /** Clear To Send modem interrupt mask */ #define UART_IM_CTSIM (1 << 1) /** Ring Indicator modem interrupt mask */ #define UART_IM_RIIM (1 << 0) /* ============================================================================= * UART_DMACTL values * ---------------------------------------------------------------------------*/ /** DMA on error */ #define UART_DMACTL_DMAERR (1 << 2) /** Transmit DMA enable */ #define UART_DMACTL_TXDMAE (1 << 1) /** Recieve DMA enable */ #define UART_DMACTL_RXDMAE (1 << 0) /* ============================================================================= * UART_LCTL values * ---------------------------------------------------------------------------*/ /** Sync break length */ #define UART_LCTL_BLEN_MASK (3 << 4) #define UART_LCTL_BLEN_16T (3 << 4) #define UART_LCTL_BLEN_15T (2 << 4) #define UART_LCTL_BLEN_14T (1 << 4) #define UART_LCTL_BLEN_13T (0 << 4) /** LIN master enable */ #define UART_LCTL_MASTER (1 << 0) /* ============================================================================= * UART_9BITADDR values * ---------------------------------------------------------------------------*/ /** Enable 9-bit mode */ #define UART_UART_9BITADDR_9BITEN (1 << 15) /** Self-address for 9-bit mode */ #define UART_UART_9BITADDR_ADDR_MASK (0xFF << 0) /* ============================================================================= * UART_PP values * ---------------------------------------------------------------------------*/ /** 9-bit support */ #define UART_UART_PP_NB (1 << 1) /** Smart Card support */ #define UART_UART_PP_SC (1 << 0) /* ============================================================================= * UART_CC values * ---------------------------------------------------------------------------*/ /** UART baud clock source */ #define UART_CC_CS_MASK (0xF << 0) #define UART_CC_CS_SYSCLK (0x0 << 0) #define UART_CC_CS_PIOSC (0x5 << 0) /* ============================================================================= * Convenience enums * ---------------------------------------------------------------------------*/ enum uart_parity { UART_PARITY_NONE, UART_PARITY_ODD, UART_PARITY_EVEN, UART_PARITY_STICK_0, UART_PARITY_STICK_1, }; enum uart_flowctl { UART_FLOWCTL_NONE, UART_FLOWCTL_RTS, UART_FLOWCTL_CTS, UART_FLOWCTL_RTS_CTS, }; /** * \brief UART interrupt masks * * These masks can be OR'ed together to specify more than one interrupt. For * example, (UART_INT_TXIM | UART_INT_TXIM) specifies both Rx and Tx Interrupt. */ enum uart_interrupt_flag { UART_INT_LME5 = UART_IM_LME5IM, UART_INT_LME1 = UART_IM_LME1IM, UART_INT_LMSB = UART_IM_LMSBIM, UART_INT_9BIT = UART_IM_9BITIM, UART_INT_OE = UART_IM_OEIM, UART_INT_BE = UART_IM_BEIM, UART_INT_PE = UART_IM_PEIM, UART_INT_FE = UART_IM_FEIM, UART_INT_RT = UART_IM_RTIM, UART_INT_TX = UART_IM_TXIM, UART_INT_RX = UART_IM_RXIM, UART_INT_DSR = UART_IM_DSRIM, UART_INT_DCD = UART_IM_DCDIM, UART_INT_CTS = UART_IM_CTSIM, UART_INT_RI = UART_IM_RIIM, }; /** * \brief UART RX FIFO interrupt trigger levels * * The levels indicate how full the FIFO should be before an interrupt is * generated. UART_FIFO_RX_TRIG_3_4 means that an interrupt is triggered when * the FIFO is 3/4 full. As the FIFO is 8 elements deep, 1/8 is equal to being * triggered by a single character. */ enum uart_fifo_rx_trigger_level { UART_FIFO_RX_TRIG_1_8 = UART_IFLS_RXIFLSEL_1_8, UART_FIFO_RX_TRIG_1_4 = UART_IFLS_RXIFLSEL_1_4, UART_FIFO_RX_TRIG_1_2 = UART_IFLS_RXIFLSEL_1_2, UART_FIFO_RX_TRIG_3_4 = UART_IFLS_RXIFLSEL_3_4, UART_FIFO_RX_TRIG_7_8 = UART_IFLS_RXIFLSEL_7_8 }; /** * \brief UART TX FIFO interrupt trigger levels * * The levels indicate how empty the FIFO should be before an interrupt is * generated. Note that this indicates the emptiness of the FIFO and not the * fullness. This is somewhat confusing, but it follows the wording of the * LM4F120H5QR datasheet. * * UART_FIFO_TX_TRIG_3_4 means that an interrupt is triggered when the FIFO is * 3/4 empty. As the FIFO is 8 elements deep, 7/8 is equal to being triggered * by a single character. */ enum uart_fifo_tx_trigger_level { UART_FIFO_TX_TRIG_7_8 = UART_IFLS_TXIFLSEL_7_8, UART_FIFO_TX_TRIG_3_4 = UART_IFLS_TXIFLSEL_3_4, UART_FIFO_TX_TRIG_1_2 = UART_IFLS_TXIFLSEL_1_2, UART_FIFO_TX_TRIG_1_4 = UART_IFLS_TXIFLSEL_1_4, UART_FIFO_TX_TRIG_1_8 = UART_IFLS_TXIFLSEL_1_8 }; /* ============================================================================= * Function prototypes * ---------------------------------------------------------------------------*/ BEGIN_DECLS void uart_set_baudrate(uint32_t uart, uint32_t baud); void uart_set_databits(uint32_t uart, uint8_t databits); void uart_set_stopbits(uint32_t uart, uint8_t stopbits); void uart_set_parity(uint32_t uart, enum uart_parity parity); void uart_set_mode(uint32_t uart, uint32_t mode); void uart_set_flow_control(uint32_t uart, enum uart_flowctl flow); void uart_enable(uint32_t uart); void uart_disable(uint32_t uart); void uart_clock_from_piosc(uint32_t uart); void uart_clock_from_sysclk(uint32_t uart); void uart_send(uint32_t uart, uint16_t data); uint16_t uart_recv(uint32_t uart); void uart_wait_send_ready(uint32_t uart); void uart_wait_recv_ready(uint32_t uart); void uart_send_blocking(uint32_t uart, uint16_t data); uint16_t uart_recv_blocking(uint32_t uart); void uart_enable_rx_dma(uint32_t uart); void uart_disable_rx_dma(uint32_t uart); void uart_enable_tx_dma(uint32_t uart); void uart_disable_tx_dma(uint32_t uart); void uart_enable_fifo(uint32_t uart); void uart_disable_fifo(uint32_t uart); void uart_set_fifo_trigger_levels(uint32_t uart, enum uart_fifo_rx_trigger_level rx_level, enum uart_fifo_tx_trigger_level tx_level); /* We inline FIFO full/empty checks as they are intended to be called from ISRs * */ /** @ingroup uart_fifo * @{ * \brief Determine if the TX fifo is full * * @param[in] uart UART block register address base @ref uart_reg_base */ static inline bool uart_is_tx_fifo_full(uint32_t uart) { return UART_FR(uart) & UART_FR_TXFF; } /** * \brief Determine if the TX fifo is empty * * @param[in] uart UART block register address base @ref uart_reg_base */ static inline bool uart_is_tx_fifo_empty(uint32_t uart) { return UART_FR(uart) & UART_FR_TXFE; } /** * \brief Determine if the RX fifo is full * * @param[in] uart UART block register address base @ref uart_reg_base */ static inline bool uart_is_rx_fifo_full(uint32_t uart) { return UART_FR(uart) & UART_FR_RXFF; } /** * \brief Determine if the RX fifo is empty * * @param[in] uart UART block register address base @ref uart_reg_base */ static inline bool uart_is_rx_fifo_empty(uint32_t uart) { return UART_FR(uart) & UART_FR_RXFE; } /**@}*/ void uart_enable_interrupts(uint32_t uart, enum uart_interrupt_flag ints); void uart_disable_interrupts(uint32_t uart, enum uart_interrupt_flag ints); void uart_enable_rx_interrupt(uint32_t uart); void uart_disable_rx_interrupt(uint32_t uart); void uart_enable_tx_interrupt(uint32_t uart); void uart_disable_tx_interrupt(uint32_t uart); void uart_clear_interrupt_flag(uint32_t uart, enum uart_interrupt_flag ints); /* Let's keep this one inlined. It's designed to be used in ISRs */ /** @ingroup uart_irq * @{ * \brief Determine if interrupt is generated by the given source * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] source source to check. */ static inline bool uart_is_interrupt_source(uint32_t uart, enum uart_interrupt_flag source) { return UART_MIS(uart) & source; } /**@}*/ END_DECLS /**@}*/ #endif /* LIBOPENCM3_LM4F_UART_H */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lm4f/usb.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @defgroup usb_defines USB Controller * * @brief Defined Constants and Types for the LM4F USB Controller * * @ingroup LM4Fxx_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2013 Alexandru Gagniuc * * @date 15 May 2013 * * LGPL License Terms @ref lgpl_license */ #ifndef LIBOPENCM3_LM4F_USB_H #define LIBOPENCM3_LM4F_USB_H /**@{*/ #include #include /* ============================================================================ * USB registers * --------------------------------------------------------------------------*/ /* USB Device Functional Address */ #define USB_FADDR MMIO8(USB_BASE + 0x00) /* USB Power */ #define USB_POWER MMIO8(USB_BASE + 0x01) /* USB Transmit Interrupt Status */ #define USB_TXIS MMIO16(USB_BASE + 0x02) /* USB Receive Interrupt Status */ #define USB_RXIS MMIO16(USB_BASE + 0x04) /* USB Transmit Interrupt Enable */ #define USB_TXIE MMIO16(USB_BASE + 0x06) /* USB Receive Interrupt Enable */ #define USB_RXIE MMIO16(USB_BASE + 0x08) /* USB General Interrupt Status */ #define USB_IS MMIO8(USB_BASE + 0x0A) /* USB Interrupt Enable */ #define USB_IE MMIO8(USB_BASE + 0x0B) /* USB Frame Value */ #define USB_FRAME MMIO16(USB_BASE + 0x0C) /* USB Endpoint Index */ #define USB_EPIDX MMIO8(USB_BASE + 0x0E) /* USB Test Mode */ #define USB_TEST MMIO8(USB_BASE + 0x0F) /* USB FIFO Endpoint [0-7] */ #define USB_FIFO8(n) MMIO8(USB_BASE + 0x20 + n*0x04) #define USB_FIFO16(n) MMIO16(USB_BASE + 0x20 + n*0x04) #define USB_FIFO32(n) MMIO32(USB_BASE + 0x20 + n*0x04) /* USB Transmit Dynamic FIFO Sizing */ #define USB_TXFIFOSZ MMIO8(USB_BASE + 0x62) /* USB Receive Dynamic FIFO Sizing */ #define USB_RXFIFOSZ MMIO8(USB_BASE + 0x63) /* USB Transmit FIFO Start Address */ #define USB_TXFIFOADD MMIO16(USB_BASE + 0x64) /* USB Receive FIFO Start Address */ #define USB_RXFIFOADD MMIO16(USB_BASE + 0x66) /* USB Connect Timing */ #define USB_CONTIM MMIO8(USB_BASE + 0x7A) /* USB Full-Speed Last Transaction to End of Frame Timing */ #define USB_FSEOF MMIO8(USB_BASE + 0x7D) /* USB Low-Speed Last Transaction to End of Frame Timing */ #define USB_LSEOF MMIO8(USB_BASE + 0x7E) /* USB Control and Status Endpoint 0 Low */ #define USB_CSRL0 MMIO8(USB_BASE + 0x102) /* USB Control and Status Endpoint 0 High */ #define USB_CSRH0 MMIO8(USB_BASE + 0x103) /* USB Receive Byte Count Endpoint 0 */ #define USB_COUNT0 MMIO8(USB_BASE + 0x108) /* USB Maximum Transmit Data Endpoint [1-7] */ #define USB_TXMAXP(n) MMIO16(USB_BASE + 0x100 + n*0x10) /* USB Transmit Control and Status Endpoint [1-7] Low */ #define USB_TXCSRL(n) MMIO8(USB_BASE + 0x102 + n*0x10) /* USB Transmit Control and Status Endpoint [1-7] High */ #define USB_TXCSRH(n) MMIO8(USB_BASE + 0x103 + n*0x10) /* USB Maximum Receive Data Endpoint [1-7] */ #define USB_RXMAXP(n) MMIO16(USB_BASE + 0x104 + n*0x10) /* USB Receive Control and Status Endpoint [1-7] Low */ #define USB_RXCSRL(n) MMIO8(USB_BASE + 0x106 + n*0x10) /* USB Receive Control and Status Endpoint [1-7] High */ #define USB_RXCSRH(n) MMIO8(USB_BASE + 0x107 + n*0x10) /* USB Receive Byte Count Endpoint [1-7] */ #define USB_RXCOUNT(n) MMIO16(USB_BASE + 0x108 + n*0x10) /* USB Receive Double Packet Buffer Disable */ #define USB_RXDPKTBUFDIS MMIO16(USB_BASE + 0x340) /* USB Transmit Double Packet Buffer Disable */ #define USB_TXDPKTBUFDIS MMIO16(USB_BASE + 0x342) /* USB Device RESUME Raw Interrupt Status */ #define USB_DRRIS MMIO32(USB_BASE + 0x410) /* USB Device RESUME Interrupt Mask */ #define USB_DRIM MMIO32(USB_BASE + 0x414) /* USB Device RESUME Interrupt Status and Clear */ #define USB_DRISC MMIO32(USB_BASE + 0x418) /* USB DMA Select */ #define USB_DMASEL MMIO32(USB_BASE + 0x450) /* USB Peripheral Properties */ #define USB_PP MMIO32(USB_BASE + 0xFC0) /* ============================================================================= * USB_FADDR values * ---------------------------------------------------------------------------*/ /** Function Address */ #define USB_FADDR_FUNCADDR_MASK (0x3f << 0) /* ============================================================================= * USB_POWER values * ---------------------------------------------------------------------------*/ /** Isochronous Update */ #define USB_POWER_ISOUP (1 << 7) /** Soft Connect/Disconnect */ #define USB_POWER_SOFTCONN (1 << 6) /** RESET signaling */ #define USB_POWER_RESET (1 << 3) /** RESUME signaling */ #define USB_POWER_RESUME (1 << 2) /** SUSPEND mode */ #define USB_POWER_SUSPEND (1 << 1) /** Power down PHY */ #define USB_POWER_PWRDNPHY (1 << 0) /* ============================================================================= * Endpoint bitmasks for interrupt status and control registers * Applies to USB_TXIS, USB_RXIS, USB_TXIE, USB_RXIE, USB_RXDPKTBUFDIS, * USB_TXDPKTBUFDIS * ---------------------------------------------------------------------------*/ #define USB_EP7 (1 << 7) #define USB_EP6 (1 << 6) #define USB_EP5 (1 << 5) #define USB_EP4 (1 << 4) #define USB_EP3 (1 << 3) #define USB_EP2 (1 << 2) #define USB_EP1 (1 << 1) #define USB_EP0 (1 << 0) /* ============================================================================= * USB interrupt mask values * * These are interchangeable across USB_IS, and USB_IE registers. * ---------------------------------------------------------------------------*/ /** USB disconnect interrupt */ #define USB_IM_DISCON (1 << 5) /** Start of frame */ #define USB_IM_SOF (1 << 3) /** RESET signaling detected */ #define USB_IM_RESET (1 << 2) /** RESUME signaling detected */ #define USB_IM_RESUME (1 << 1) /** SUSPEND signaling detected */ #define USB_IM_SUSPEND (1 << 0) /* ============================================================================= * USB_FRAME values * ---------------------------------------------------------------------------*/ /** Frame number */ #define USB_FRAME_MASK (0x03FF) /* ============================================================================= * USB_IDX values * ---------------------------------------------------------------------------*/ /** Endpoint Index */ #define USB_EPIDX_MASK (0x0F) /* ============================================================================= * USB_TEST values * ---------------------------------------------------------------------------*/ /** FIFO access */ #define USB_TEST_FIFOACC (1 << 6) /** Force full-speed mode */ #define USB_TEST_FORCEFS (1 << 5) /* ============================================================================= * USB_TXFIFOSZ and USB_RXFIFOSZ values * ---------------------------------------------------------------------------*/ /** Double packet buffer support */ #define USB_FIFOSZ_DPB (1 << 4) /* USB Transmit Dynamic FIFO Sizing */ #define USB_FIFOSZ_SIZE_MASK (0x0F << 0) #define USB_FIFOSZ_SIZE_8 (0x00 << 0) #define USB_FIFOSZ_SIZE_16 (0x01 << 0) #define USB_FIFOSZ_SIZE_32 (0x02 << 0) #define USB_FIFOSZ_SIZE_64 (0x03 << 0) #define USB_FIFOSZ_SIZE_128 (0x04 << 0) #define USB_FIFOSZ_SIZE_256 (0x05 << 0) #define USB_FIFOSZ_SIZE_512 (0x06 << 0) #define USB_FIFOSZ_SIZE_1024 (0x07 << 0) #define USB_FIFOSZ_SIZE_2048 (0x08 << 0) /* ============================================================================= * USB_CONTIM values * ---------------------------------------------------------------------------*/ /** Connect wait */ #define USB_CONTIM_WTCON_MASK (0x0F << 4) /** Wait ID */ #define USB_CONTIM_WTID_MASK (0x0F << 0) /* ============================================================================= * USB_CSRL0 values * ---------------------------------------------------------------------------*/ /** Setup End Clear */ #define USB_CSRL0_SETENDC (1 << 7) /** RXRDY Clear */ #define USB_CSRL0_RXRDYC (1 << 6) /** Send Stall */ #define USB_CSRL0_STALL (1 << 5) /** Setup End */ #define USB_CSRL0_SETEND (1 << 4) /** Data End */ #define USB_CSRL0_DATAEND (1 << 3) /** Endpoint Stalled */ #define USB_CSRL0_STALLED (1 << 2) /** Transmit Packet Ready */ #define USB_CSRL0_TXRDY (1 << 1) /** Receive Packet Ready */ #define USB_CSRL0_RXRDY (1 << 0) /* ============================================================================= * USB_CSRH0 values * ---------------------------------------------------------------------------*/ /** Flush FIFO */ #define USB_CSRH0_FLUSH (1 << 0) /* ============================================================================= * USB_TXCSRLx values * ---------------------------------------------------------------------------*/ /** Clear data toggle */ #define USB_TXCSRL_CLRDT (1 << 6) /** Endpoint Stalled */ #define USB_TXCSRL_STALLED (1 << 5) /** Send Stall */ #define USB_TXCSRL_STALL (1 << 4) /** Flush FIFO */ #define USB_TXCSRL_FLUSH (1 << 3) /** Underrun */ #define USB_TXCSRL_UNDRN (1 << 2) /** FIFO not empty */ #define USB_TXCSRL_FIFONE (1 << 1) /** Transmit Packet Ready */ #define USB_TXCSRL_TXRDY (1 << 0) /* ============================================================================= * USB_TXCSRHx values * ---------------------------------------------------------------------------*/ /** Auto set */ #define USB_TXCSRH_AUTOSET (1 << 7) /** Isochronous transfers */ #define USB_TXCSRH_ISO (1 << 6) /** Mode */ #define USB_TXCSRH_MODE (1 << 5) /** DMA request enable */ #define USB_TXCSRH_DMAEN (1 << 4) /** Force data toggle */ #define USB_TXCSRH_FDT (1 << 3) /** DMA request mode */ #define USB_TXCSRH_DMAMOD (1 << 2) /* ============================================================================= * USB_RXCSRLx values * ---------------------------------------------------------------------------*/ /** Clear data toggle */ #define USB_RXCSRL_CLRDT (1 << 7) /** Endpoint Stalled */ #define USB_RXCSRL_STALLED (1 << 6) /** Send Stall */ #define USB_RXCSRL_STALL (1 << 5) /** Flush FIFO */ #define USB_RXCSRL_FLUSH (1 << 4) /** Data error */ #define USB_RXCSRL_DATAERR (1 << 2) /** Overrun */ #define USB_RXCSRL_OVER (1 << 2) /** FIFO full */ #define USB_RXCSRL_FULL (1 << 1) /** Receive Packet Ready */ #define USB_RXCSRL_RXRDY (1 << 0) /* ============================================================================= * USB_RXCSRHx values * ---------------------------------------------------------------------------*/ /** Auto clear */ #define USB_RXCSRH_AUTOCL (1 << 7) /** Isochronous transfers */ #define USB_RXCSRH_ISO (1 << 6) /** DMA request enable */ #define USB_RXCSRH_DMAEN (1 << 5) /** Disable NYET / PID error */ #define USB_RXCSRH_PIDERR (1 << 4) /** DMA request mode */ #define USB_RXCSRH_DMAMOD (1 << 3) /* ============================================================================= * USB_DRRIS values * ---------------------------------------------------------------------------*/ /** RESUME interrupt status */ #define USB_DRRIS_RESUME (1 << 0) /* ============================================================================= * USB_DRIM values * ---------------------------------------------------------------------------*/ /** RESUME interrupt mask */ #define USB_DRIM_RESUME (1 << 0) /* ============================================================================= * USB_DRISC values * ---------------------------------------------------------------------------*/ /** RESUME interrupt status and clear */ #define USB_DRISC_RESUME (1 << 0) /* ============================================================================= * USB_PP values * ---------------------------------------------------------------------------*/ /** Endpoint count */ #define USB_PP_ECNT_MASK (0xFF << 8) /** USB capability */ #define USB_PP_USB_MASK (0x03 << 6) #define USB_PP_USB_NA (0x00 << 6) #define USB_PP_USB_DEVICE (0x01 << 6) #define USB_PP_USB_HOST (0x02 << 6) #define USB_PP_USB_OTG (0x03 << 6) /** PHY present */ #define USB_PP_PHY (1 << 4) /** Controller type */ #define USB_PP_TYPE_MASK (0x0F << 0) /* ============================================================================= * Convenience enums * ---------------------------------------------------------------------------*/ enum usb_interrupt { USB_INT_DISCON = USB_IM_DISCON, USB_INT_SOF = USB_IM_SOF, USB_INT_RESET = USB_IM_RESET, USB_INT_RESUME = USB_IM_RESUME, USB_INT_SUSPEND = USB_IM_SUSPEND, }; enum usb_ep_interrupt { USB_EP0_INT = USB_EP0, USB_EP1_INT = USB_EP1, USB_EP2_INT = USB_EP2, USB_EP3_INT = USB_EP3, USB_EP4_INT = USB_EP4, USB_EP5_INT = USB_EP5, USB_EP6_INT = USB_EP6, USB_EP7_INT = USB_EP7, }; /* ============================================================================= * Function prototypes * ---------------------------------------------------------------------------*/ BEGIN_DECLS void usb_enable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints); void usb_disable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints); END_DECLS /**@}*/ #endif /* LIBOPENCM3_LM4F_USB_H */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc13xx/doc-lpc13xx.h ================================================ /** @mainpage libopencm3 LPC13xx @version 1.0.0 @date 14 September 2012 API documentation for NXP Semiconductors LPC13xx Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup LPC13xx LPC13xx Libraries for NXP Semiconductors LPC13xx series. @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup LPC13xx_defines LPC13xx Defines @brief Defined Constants and Types for the LPC13xx series @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc13xx/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the LPC13xx General Purpose I/O @ingroup LPC13xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LPC13XX_GPIO_H #define LPC13XX_GPIO_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ #define GPIO0 GPIO_PIO0_BASE #define GPIO1 GPIO_PIO1_BASE #define GPIO2 GPIO_PIO2_BASE #define GPIO3 GPIO_PIO3_BASE /* --- GPIO registers ------------------------------------------------------ */ /* GPIO data register (GPIOn_DATA) */ #define GPIO_DATA(port) MMIO32(port + 0x3ffc) #define GPIO0_DATA GPIO_DATA(GPIO0) #define GPIO1_DATA GPIO_DATA(GPIO1) #define GPIO2_DATA GPIO_DATA(GPIO2) #define GPIO3_DATA GPIO_DATA(GPIO3) /* GPIO data direction register (GPIOn_DIR) */ #define GPIO_DIR(port) MMIO32(port + 0x00) #define GPIO0_DIR GPIO_DIR(GPIO0) #define GPIO1_DIR GPIO_DIR(GPIO1) #define GPIO2_DIR GPIO_DIR(GPIO2) #define GPIO3_DIR GPIO_DIR(GPIO3) /* GPIO interrupt sense register (GPIOn_IS) */ #define GPIO_IS(port) MMIO32(port + 0x04) #define GPIO0_IS GPIO_IS(GPIO0) #define GPIO1_IS GPIO_IS(GPIO1) #define GPIO2_IS GPIO_IS(GPIO2) #define GPIO3_IS GPIO_IS(GPIO3) /* GPIO interrupt both edges sense register (GPIOn_IBE) */ #define GPIO_IBE(port) MMIO32(port + 0x08) #define GPIO0_IBE GPIO_IBE(GPIO0) #define GPIO1_IBE GPIO_IBE(GPIO1) #define GPIO2_IBE GPIO_IBE(GPIO2) #define GPIO3_IBE GPIO_IBE(GPIO3) /* GPIO interrupt event register (GPIOn_IEV) */ #define GPIO_IEV(port) MMIO32(port + 0x0c) #define GPIO0_IEV GPIO_IEV(GPIO0) #define GPIO1_IEV GPIO_IEV(GPIO1) #define GPIO2_IEV GPIO_IEV(GPIO2) #define GPIO3_IEV GPIO_IEV(GPIO3) /* GPIO interrupt mask register (GPIOn_IE) */ #define GPIO_IE(port) MMIO16(port + 0x10) #define GPIO0_IE GPIO_IE(GPIO0) #define GPIO1_IE GPIO_IE(GPIO1) #define GPIO2_IE GPIO_IE(GPIO2) #define GPIO3_IE GPIO_IE(GPIO3) /* FIXME: IRS or RIS? Datasheet is not consistent here. */ /* GPIO raw interrupt status register (GPIOn_IRS) */ #define GPIO_IRS(port) MMIO16(port + 0x14) #define GPIO0_IRS GPIO_IRS(GPIO0) #define GPIO1_IRS GPIO_IRS(GPIO1) #define GPIO2_IRS GPIO_IRS(GPIO2) #define GPIO3_IRS GPIO_IRS(GPIO3) /* GPIO masked interrupt status register (GPIOn_MIS) */ #define GPIO_MIS(port) MMIO16(port + 0x18) #define GPIO0_MIS GPIO_MIS(GPIO0) #define GPIO1_MIS GPIO_MIS(GPIO1) #define GPIO2_MIS GPIO_MIS(GPIO2) #define GPIO3_MIS GPIO_MIS(GPIO3) /* GPIO interrupt clear register (GPIOn_IC) */ #define GPIO_IC(port) MMIO16(port + 0x1c) #define GPIO0_IC GPIO_IC(GPIO0) #define GPIO1_IC GPIO_IC(GPIO1) #define GPIO2_IC GPIO_IC(GPIO2) #define GPIO3_IC GPIO_IC(GPIO3) BEGIN_DECLS void gpio_set(uint32_t gpioport, uint16_t gpios); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc13xx/irq.yaml ================================================ includeguard: LIBOPENCM3_LPC13xx_NVIC_H partname_humanreadable: LPC 13xx series partname_doxygen: LPC13xx irqs: 0: pio0_0 1: pio0_1 2: pio0_2 3: pio0_3 4: pio0_4 5: pio0_5 6: pio0_6 7: pio0_7 8: pio0_8 9: pio0_9 10: pio0_10 11: pio0_11 12: pio1_0 13: pio1_1 14: pio1_2 15: pio1_3 16: pio1_4 17: pio1_5 18: pio1_6 19: pio1_7 20: pio1_8 21: pio1_9 22: pio1_10 23: pio1_11 24: pio2_0 25: pio2_1 26: pio2_2 27: pio2_3 28: pio2_4 29: pio2_5 30: pio2_6 31: pio2_7 32: pio2_8 33: pio2_9 34: pio2_10 35: pio2_11 36: pio3_0 37: pio3_1 38: pio3_2 39: pio3_3 40: i2c0 41: ct16b0 42: ct16b1 43: ct32b0 44: ct32b1 45: ssp0 46: uart 47: usb 48: usb_fiq 49: adc 50: wdt 51: bod # 52: reserved 53: pio3 54: pio2 55: pio1 56: pio0 56: ssp1 ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc13xx/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC13XX_MEMORYMAP_H #define LPC13XX_MEMORYMAP_H #include /* --- LPC13XX specific peripheral definitions ----------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE_APB 0x40000000 #define PERIPH_BASE_AHB 0x50000000 /* Register boundary addresses */ /* APB */ #define I2C_BASE (PERIPH_BASE_APB + 0x00000) #define WDT_BASE (PERIPH_BASE_APB + 0x04000) #define UART_BASE (PERIPH_BASE_APB + 0x08000) #define TIMER0_16BIT_BASE (PERIPH_BASE_APB + 0x0c000) #define TIMER1_16BIT_BASE (PERIPH_BASE_APB + 0x10000) #define TIMER0_32BIT_BASE (PERIPH_BASE_APB + 0x14000) #define TIMER1_32BIT_BASE (PERIPH_BASE_APB + 0x18000) #define ADC_BASE (PERIPH_BASE_APB + 0x1c000) #define USB_BASE (PERIPH_BASE_APB + 0x20000) /* PERIPH_BASE_APB + 0x28000 (0x4002 8000 - 0x4003 7FFF): Reserved */ #define PMU_BASE (PERIPH_BASE_APB + 0x38000) #define FLASH_BASE (PERIPH_BASE_APB + 0x3c000) #define SSP_BASE (PERIPH_BASE_APB + 0x40000) #define IOCONFIG_BASE (PERIPH_BASE_APB + 0x44000) #define SYSCTRL_BASE (PERIPH_BASE_APB + 0x48000) /* PERIPH_BASE_APB + 0x4c000 (0x4004 c000 - 0x4007 FFFF): Reserved */ /* AHB */ #define GPIO_PIO0_BASE (PERIPH_BASE_AHB + 0x00000) #define GPIO_PIO1_BASE (PERIPH_BASE_AHB + 0x10000) #define GPIO_PIO2_BASE (PERIPH_BASE_AHB + 0x20000) #define GPIO_PIO3_BASE (PERIPH_BASE_AHB + 0x30000) /* PERIPH_BASE_AHB + 0x40000 (0x5004 0000 - 0x501F FFFF): Reserved */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc17xx/doc-lpc17xx.h ================================================ /** @mainpage libopencm3 LPC17xx @version 1.0.0 @date 14 September 2012 API documentation for NXP Semiconductors LPC17xx Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup LPC17xx LPC17xx Libraries for NXP Semiconductors LPC17xx series. @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup LPC17xx_defines LPC17xx Defines @brief Defined Constants and Types for the LPC17xx series @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc17xx/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the LPC17xx General Purpose I/O @ingroup LPC17xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC17XX_GPIO_H #define LPC17XX_GPIO_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ #define GPIO0 GPIO_PIO0_BASE #define GPIO1 GPIO_PIO1_BASE #define GPIO2 GPIO_PIO2_BASE #define GPIO3 GPIO_PIO3_BASE #define GPIO4 GPIO_PIO4_BASE /* GPIO number definitions (for convenience) */ #define GPIOPIN0 (1 << 0) #define GPIOPIN1 (1 << 1) #define GPIOPIN2 (1 << 2) #define GPIOPIN3 (1 << 3) #define GPIOPIN4 (1 << 4) #define GPIOPIN5 (1 << 5) #define GPIOPIN6 (1 << 6) #define GPIOPIN7 (1 << 7) #define GPIOPIN8 (1 << 8) #define GPIOPIN9 (1 << 9) #define GPIOPIN10 (1 << 10) #define GPIOPIN11 (1 << 11) #define GPIOPIN12 (1 << 12) #define GPIOPIN13 (1 << 13) #define GPIOPIN14 (1 << 14) #define GPIOPIN15 (1 << 15) #define GPIOPIN16 (1 << 16) #define GPIOPIN17 (1 << 17) #define GPIOPIN18 (1 << 18) #define GPIOPIN19 (1 << 19) #define GPIOPIN20 (1 << 20) #define GPIOPIN21 (1 << 21) #define GPIOPIN22 (1 << 22) #define GPIOPIN23 (1 << 23) #define GPIOPIN24 (1 << 24) #define GPIOPIN25 (1 << 25) #define GPIOPIN26 (1 << 26) #define GPIOPIN27 (1 << 27) #define GPIOPIN28 (1 << 28) #define GPIOPIN29 (1 << 29) #define GPIOPIN30 (1 << 30) #define GPIOPIN31 (1 << 31) /* --- GPIO registers ------------------------------------------------------ */ /* GPIO data direction register (GPIOn_DIR) */ #define GPIO_DIR(port) MMIO32(port + 0x00) #define GPIO0_DIR GPIO_DIR(GPIO0) #define GPIO1_DIR GPIO_DIR(GPIO1) #define GPIO2_DIR GPIO_DIR(GPIO2) #define GPIO3_DIR GPIO_DIR(GPIO3) #define GPIO4_DIR GPIO_DIR(GPIO4) /* GPIO fast mask register (GPIOn_DIR) */ #define GPIO_MASK(port) MMIO32(port + 0x10) #define GPIO0_MASK GPIO_MASK(GPIO0) #define GPIO1_MASK GPIO_MASK(GPIO1) #define GPIO2_MASK GPIO_MASK(GPIO2) #define GPIO3_MASK GPIO_MASK(GPIO3) #define GPIO4_MASK GPIO_MASK(GPIO4) /* GPIO port pin value register (GPIOn_PIN) */ #define GPIO_PIN(port) MMIO32(port + 0x14) #define GPIO0_PIN GPIO_PIN(GPIO0) #define GPIO1_PIN GPIO_PIN(GPIO1) #define GPIO2_PIN GPIO_PIN(GPIO2) #define GPIO3_PIN GPIO_PIN(GPIO3) #define GPIO4_PIN GPIO_PIN(GPIO4) /* GPIO port output set register (GPIOn_SET) */ #define GPIO_SET(port) MMIO32(port + 0x18) #define GPIO0_SET GPIO_SET(GPIO0) #define GPIO1_SET GPIO_SET(GPIO1) #define GPIO2_SET GPIO_SET(GPIO2) #define GPIO3_SET GPIO_SET(GPIO3) #define GPIO4_SET GPIO_SET(GPIO4) /* GPIO port output clear register (GPIOn_CLR) */ #define GPIO_CLR(port) MMIO32(port + 0x1C) #define GPIO0_CLR GPIO_CLR(GPIO0) #define GPIO1_CLR GPIO_CLR(GPIO1) #define GPIO2_CLR GPIO_CLR(GPIO2) #define GPIO3_CLR GPIO_CLR(GPIO3) #define GPIO4_CLR GPIO_CLR(GPIO4) /* GPIO interrupt register map */ /* Interrupt enable rising edge */ #define GPIO0_IER MMIO32(GPIOINTERRUPT_BASE + 0x90) #define GPIO2_IER MMIO32(GPIOINTERRUPT_BASE + 0xB0) /* Interrupt enable falling edge */ #define GPIO0_IEF MMIO32(GPIOINTERRUPT_BASE + 0x94) #define GPIO2_IEF MMIO32(GPIOINTERRUPT_BASE + 0xB4) /* Interrupt status rising edge */ #define GPIO0_ISR MMIO32(GPIOINTERRUPT_BASE + 0x84) #define GPIO2_ISR MMIO32(GPIOINTERRUPT_BASE + 0xA4) /* Interrupt status falling edge */ #define GPIO0_ISF MMIO32(GPIOINTERRUPT_BASE + 0x88) #define GPIO2_ISF MMIO32(GPIOINTERRUPT_BASE + 0xA8) /* Interrupt clear */ #define GPIO0_IC MMIO32(GPIOINTERRUPT_BASE + 0x8C) #define GPIO1_IC MMIO32(GPIOINTERRUPT_BASE + 0xAC) /* Overall interrupt status */ #define GPIO_IS MMIO32(GPIOINTERRUPT_BASE + 0x80) BEGIN_DECLS void gpio_set(uint32_t gpioport, uint32_t gpios); void gpio_clear(uint32_t gpioport, uint32_t gpios); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc17xx/irq.yaml ================================================ includeguard: LIBOPENCM3_LPC17xx_NVIC_H partname_humanreadable: LPC 17xx series partname_doxygen: LPC17xx irqs: 0: wdt 1: timer0 2: timer1 3: timer2 4: timer3 5: uart0 6: uart1 7: uart2 8: uart3 9: pwm 10: i2c0 11: i2c1 12: i2c2 13: spi 14: ssp0 15: ssp1 16: pll0 17: rtc 18: eint0 19: eint1 20: eint2 21: eint3 22: adc 23: bod 24: usb 25: can 26: gpdma 27: i2s 28: ethernet 29: rit 30: motor_pwm 31: qei 32: pll1 33: usb_act 34: can_act ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc17xx/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC17XX_MEMORYMAP_H #define LPC17XX_MEMORYMAP_H #include /* --- LPC17XX specific peripheral definitions ----------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE_APB0 0x40000000 #define PERIPH_BASE_APB1 0x40080000 #define PERIPH_BASE_AHB 0x20000000 /* Register boundary addresses */ /* APB0 */ #define WDT_BASE (PERIPH_BASE_APB0 + 0x00000) #define TIMER0_BASE (PERIPH_BASE_APB0 + 0x04000) #define TIMER1_BASE (PERIPH_BASE_APB0 + 0x08000) #define UART0_BASE (PERIPH_BASE_APB0 + 0x0c000) #define UART1_BASE (PERIPH_BASE_APB0 + 0x10000) /* PERIPH_BASE_APB0 + 0X14000 (0x4001 4000 - 0x4001 7FFF): Reserved */ #define PWM1_BASE (PERIPH_BASE_APB0 + 0x18000) #define I2C0_BASE (PERIPH_BASE_APB0 + 0x1c000) #define SPI_BASE (PERIPH_BASE_APB0 + 0x20000) #define RTC_BASE (PERIPH_BASE_APB0 + 0x24000) #define GPIOINTERRUPT_BASE (PERIPH_BASE_APB0 + 0x28000) #define PINCONNECT_BASE (PERIPH_BASE_APB0 + 0x2c000) #define SSP1_BASE (PERIPH_BASE_APB0 + 0x30000) #define ADC_BASE (PERIPH_BASE_APB0 + 0x34000) #define CANAFRAM_BASE (PERIPH_BASE_APB0 + 0x38000) #define CANAFREG_BASE (PERIPH_BASE_APB0 + 0x3C000) #define CANCOMMONREG_BASE (PERIPH_BASE_APB0 + 0x40000) #define CAN1_BASE (PERIPH_BASE_APB0 + 0x44000) #define CAN2_BASE (PERIPH_BASE_APB0 + 0x48000) /* PERIPH_BASE_APB0 + 0X4C000 (0x4004 C000 - 0x4005 BFFF): Reserved */ #define I2C1_BASE (PERIPH_BASE_APB0 + 0x5C000) /* PERIPH_BASE_APB0 + 0X60000 (0x6000 0000 - 0x4007 BFFF): Reserved */ /* AHB */ #define GPIO_PIO0_BASE (PERIPH_BASE_AHB + 0x9c000) #define GPIO_PIO1_BASE (PERIPH_BASE_AHB + 0x9c020) #define GPIO_PIO2_BASE (PERIPH_BASE_AHB + 0x9c040) #define GPIO_PIO3_BASE (PERIPH_BASE_AHB + 0x9c060) #define GPIO_PIO4_BASE (PERIPH_BASE_AHB + 0x9c080) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/adc.h ================================================ /** @defgroup adc_defines ADC Defines @brief Defined Constants and Types for the LPC43xx A/D Converter @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_ADC_H #define LPC43XX_ADC_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* ADC port base addresses (for convenience) */ #define ADC0 ADC0_BASE #define ADC1 ADC1_BASE /* --- ADC registers ------------------------------------------------------- */ /* A/D Control Register */ #define ADC_CR(port) MMIO32(port + 0x000) #define ADC0_CR ADC_CR(ADC0) #define ADC1_CR ADC_CR(ADC1) /* A/D Global Data Register */ #define ADC_GDR(port) MMIO32(port + 0x004) #define ADC0_GDR ADC_GDR(ADC0) #define ADC1_GDR ADC_GDR(ADC1) /* A/D Interrupt Enable Register */ #define ADC_INTEN(port) MMIO32(port + 0x00C) #define ADC0_INTEN ADC_INTEN(ADC0) #define ADC1_INTEN ADC_INTEN(ADC1) /* A/D Channel 0 Data Register */ #define ADC_DR0(port) MMIO32(port + 0x010) #define ADC0_DR0 ADC_DR0(ADC0) #define ADC1_DR0 ADC_DR0(ADC1) /* A/D Channel 1 Data Register */ #define ADC_DR1(port) MMIO32(port + 0x014) #define ADC0_DR1 ADC_DR1(ADC0) #define ADC1_DR1 ADC_DR1(ADC1) /* A/D Channel 2 Data Register */ #define ADC_DR2(port) MMIO32(port + 0x018) #define ADC0_DR2 ADC_DR2(ADC0) #define ADC1_DR2 ADC_DR2(ADC1) /* A/D Channel 3 Data Register */ #define ADC_DR3(port) MMIO32(port + 0x01C) #define ADC0_DR3 ADC_DR3(ADC0) #define ADC1_DR3 ADC_DR3(ADC1) /* A/D Channel 4 Data Register */ #define ADC_DR4(port) MMIO32(port + 0x020) #define ADC0_DR4 ADC_DR4(ADC0) #define ADC1_DR4 ADC_DR4(ADC1) /* A/D Channel 5 Data Register */ #define ADC_DR5(port) MMIO32(port + 0x024) #define ADC0_DR5 ADC_DR5(ADC0) #define ADC1_DR5 ADC_DR5(ADC1) /* A/D Channel 6 Data Register */ #define ADC_DR6(port) MMIO32(port + 0x028) #define ADC0_DR6 ADC_DR6(ADC0) #define ADC1_DR6 ADC_DR6(ADC1) /* A/D Channel 7 Data Register */ #define ADC_DR7(port) MMIO32(port + 0x02C) #define ADC0_DR7 ADC_DR7(ADC0) #define ADC1_DR7 ADC_DR7(ADC1) /* A/D Status Register */ #define ADC_STAT(port) MMIO32(port + 0x030) #define ADC0_STAT ADC_STAT(ADC0) #define ADC1_STAT ADC_STAT(ADC1) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/atimer.h ================================================ /** @defgroup atimer_defines Alarm Timer Defines @brief Defined Constants and Types for the LPC43xx Alarm Timer @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_ATIMER_H #define LPC43XX_ATIMER_H /**@{*/ #include #include /* --- Alarm Timer registers ----------------------------------------------- */ /* Downcounter register */ #define ATIMER_DOWNCOUNTER MMIO32(ATIMER_BASE + 0x000) /* Preset value register */ #define ATIMER_PRESET MMIO32(ATIMER_BASE + 0x004) /* Interrupt clear enable register */ #define ATIMER_CLR_EN MMIO32(ATIMER_BASE + 0xFD8) /* Interrupt set enable register */ #define ATIMER_SET_EN MMIO32(ATIMER_BASE + 0xFDC) /* Status register */ #define ATIMER_STATUS MMIO32(ATIMER_BASE + 0xFE0) /* Enable register */ #define ATIMER_ENABLE MMIO32(ATIMER_BASE + 0xFE4) /* Clear register */ #define ATIMER_CLR_STAT MMIO32(ATIMER_BASE + 0xFE8) /* Set register */ #define ATIMER_SET_STAT MMIO32(ATIMER_BASE + 0xFEC) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/ccu.h ================================================ /** @defgroup ccu_defines Clock Control Unit Defines @brief Defined Constants and Types for the LPC43xx Clock Control Unit @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_CCU_H #define LPC43XX_CCU_H /**@{*/ #include #include /* --- CCU1 registers ------------------------------------------------------ */ /* CCU1 power mode register */ #define CCU1_PM MMIO32(CCU1_BASE + 0x000) /* CCU1 base clock status register */ #define CCU1_BASE_STAT MMIO32(CCU1_BASE + 0x004) /* CLK_APB3_BUS clock configuration register */ #define CCU1_CLK_APB3_BUS_CFG MMIO32(CCU1_BASE + 0x100) /* CLK_APB3_BUS clock status register */ #define CCU1_CLK_APB3_BUS_STAT MMIO32(CCU1_BASE + 0x104) /* CLK_APB3_I2C1 configuration register */ #define CCU1_CLK_APB3_I2C1_CFG MMIO32(CCU1_BASE + 0x108) /* CLK_APB3_I2C1 status register */ #define CCU1_CLK_APB3_I2C1_STAT MMIO32(CCU1_BASE + 0x10C) /* CLK_APB3_DAC configuration register */ #define CCU1_CLK_APB3_DAC_CFG MMIO32(CCU1_BASE + 0x110) /* CLK_APB3_DAC status register */ #define CCU1_CLK_APB3_DAC_STAT MMIO32(CCU1_BASE + 0x114) /* CLK_APB3_ADC0 configuration register */ #define CCU1_CLK_APB3_ADC0_CFG MMIO32(CCU1_BASE + 0x118) /* CLK_APB3_ADC0 status register */ #define CCU1_CLK_APB3_ADC0_STAT MMIO32(CCU1_BASE + 0x11C) /* CLK_APB3_ADC1 configuration register */ #define CCU1_CLK_APB3_ADC1_CFG MMIO32(CCU1_BASE + 0x120) /* CLK_APB3_ADC1 status register */ #define CCU1_CLK_APB3_ADC1_STAT MMIO32(CCU1_BASE + 0x124) /* CLK_APB3_CAN0 configuration register */ #define CCU1_CLK_APB3_CAN0_CFG MMIO32(CCU1_BASE + 0x128) /* CLK_APB3_CAN0 status register */ #define CCU1_CLK_APB3_CAN0_STAT MMIO32(CCU1_BASE + 0x12C) /* CLK_APB1_BUS configuration register */ #define CCU1_CLK_APB1_BUS_CFG MMIO32(CCU1_BASE + 0x200) /* CLK_APB1_BUS status register */ #define CCU1_CLK_APB1_BUS_STAT MMIO32(CCU1_BASE + 0x204) /* CLK_APB1_MOTOCON configuration register */ #define CCU1_CLK_APB1_MOTOCONPWM_CFG MMIO32(CCU1_BASE + 0x208) /* CLK_APB1_MOTOCON status register */ #define CCU1_CLK_APB1_MOTOCONPWM_STAT MMIO32(CCU1_BASE + 0x20C) /* CLK_APB1_I2C0 configuration register */ #define CCU1_CLK_APB1_I2C0_CFG MMIO32(CCU1_BASE + 0x210) /* CLK_APB1_I2C0 status register */ #define CCU1_CLK_APB1_I2C0_STAT MMIO32(CCU1_BASE + 0x214) /* CLK_APB1_I2S configuration register */ #define CCU1_CLK_APB1_I2S_CFG MMIO32(CCU1_BASE + 0x218) /* CLK_APB1_I2S status register */ #define CCU1_CLK_APB1_I2S_STAT MMIO32(CCU1_BASE + 0x21C) /* CLK_APB3_CAN1 configuration register */ #define CCU1_CLK_APB1_CAN1_CFG MMIO32(CCU1_BASE + 0x220) /* CLK_APB3_CAN1 status register */ #define CCU1_CLK_APB1_CAN1_STAT MMIO32(CCU1_BASE + 0x224) /* CLK_SPIFI configuration register */ #define CCU1_CLK_SPIFI_CFG MMIO32(CCU1_BASE + 0x300) /* CLK_SPIFI status register */ #define CCU1_CLK_SPIFI_STAT MMIO32(CCU1_BASE + 0x304) /* CLK_M4_BUS configuration register */ #define CCU1_CLK_M4_BUS_CFG MMIO32(CCU1_BASE + 0x400) /* CLK_M4_BUS status register */ #define CCU1_CLK_M4_BUS_STAT MMIO32(CCU1_BASE + 0x404) /* CLK_M4_SPIFI configuration register */ #define CCU1_CLK_M4_SPIFI_CFG MMIO32(CCU1_BASE + 0x408) /* CLK_M4_SPIFI status register */ #define CCU1_CLK_M4_SPIFI_STAT MMIO32(CCU1_BASE + 0x40C) /* CLK_M4_GPIO configuration register */ #define CCU1_CLK_M4_GPIO_CFG MMIO32(CCU1_BASE + 0x410) /* CLK_M4_GPIO status register */ #define CCU1_CLK_M4_GPIO_STAT MMIO32(CCU1_BASE + 0x414) /* CLK_M4_LCD configuration register */ #define CCU1_CLK_M4_LCD_CFG MMIO32(CCU1_BASE + 0x418) /* CLK_M4_LCD status register */ #define CCU1_CLK_M4_LCD_STAT MMIO32(CCU1_BASE + 0x41C) /* CLK_M4_ETHERNET configuration register */ #define CCU1_CLK_M4_ETHERNET_CFG MMIO32(CCU1_BASE + 0x420) /* CLK_M4_ETHERNET status register */ #define CCU1_CLK_M4_ETHERNET_STAT MMIO32(CCU1_BASE + 0x424) /* CLK_M4_USB0 configuration register */ #define CCU1_CLK_M4_USB0_CFG MMIO32(CCU1_BASE + 0x428) /* CLK_M4_USB0 status register */ #define CCU1_CLK_M4_USB0_STAT MMIO32(CCU1_BASE + 0x42C) /* CLK_M4_EMC configuration register */ #define CCU1_CLK_M4_EMC_CFG MMIO32(CCU1_BASE + 0x430) /* CLK_M4_EMC status register */ #define CCU1_CLK_M4_EMC_STAT MMIO32(CCU1_BASE + 0x434) /* CLK_M4_SDIO configuration register */ #define CCU1_CLK_M4_SDIO_CFG MMIO32(CCU1_BASE + 0x438) /* CLK_M4_SDIO status register */ #define CCU1_CLK_M4_SDIO_STAT MMIO32(CCU1_BASE + 0x43C) /* CLK_M4_DMA configuration register */ #define CCU1_CLK_M4_DMA_CFG MMIO32(CCU1_BASE + 0x440) /* CLK_M4_DMA status register */ #define CCU1_CLK_M4_DMA_STAT MMIO32(CCU1_BASE + 0x444) /* CLK_M4_M4CORE configuration register */ #define CCU1_CLK_M4_M4CORE_CFG MMIO32(CCU1_BASE + 0x448) /* CLK_M4_M4CORE status register */ #define CCU1_CLK_M4_M4CORE_STAT MMIO32(CCU1_BASE + 0x44C) /* CLK_M4_SCT configuration register */ #define CCU1_CLK_M4_SCT_CFG MMIO32(CCU1_BASE + 0x468) /* CLK_M4_SCT status register */ #define CCU1_CLK_M4_SCT_STAT MMIO32(CCU1_BASE + 0x46C) /* CLK_M4_USB1 configuration register */ #define CCU1_CLK_M4_USB1_CFG MMIO32(CCU1_BASE + 0x470) /* CLK_M4_USB1 status register */ #define CCU1_CLK_M4_USB1_STAT MMIO32(CCU1_BASE + 0x474) /* CLK_M4_EMCDIV configuration register */ #define CCU1_CLK_M4_EMCDIV_CFG MMIO32(CCU1_BASE + 0x478) /* CLK_M4_EMCDIV status register */ #define CCU1_CLK_M4_EMCDIV_STAT MMIO32(CCU1_BASE + 0x47C) /* CLK_M4_M0_CFG configuration register */ #define CCU1_CLK_M4_M0APP_CFG MMIO32(CCU1_BASE + 0x490) /* CLK_M4_M0_STAT status register */ #define CCU1_CLK_M4_M0APP_STAT MMIO32(CCU1_BASE + 0x494) /* CLK_M4_VADC_CFG configuration register */ #define CCU1_CLK_M4_VADC_CFG MMIO32(CCU1_BASE + 0x498) /* CLK_M4_VADC_STAT configuration register */ #define CCU1_CLK_M4_VADC_STAT MMIO32(CCU1_BASE + 0x49C) /* CLK_M4_WWDT configuration register */ #define CCU1_CLK_M4_WWDT_CFG MMIO32(CCU1_BASE + 0x500) /* CLK_M4_WWDT status register */ #define CCU1_CLK_M4_WWDT_STAT MMIO32(CCU1_BASE + 0x504) /* CLK_M4_UART0 configuration register */ #define CCU1_CLK_M4_USART0_CFG MMIO32(CCU1_BASE + 0x508) /* CLK_M4_UART0 status register */ #define CCU1_CLK_M4_USART0_STAT MMIO32(CCU1_BASE + 0x50C) /* CLK_M4_UART1 configuration register */ #define CCU1_CLK_M4_UART1_CFG MMIO32(CCU1_BASE + 0x510) /* CLK_M4_UART1 status register */ #define CCU1_CLK_M4_UART1_STAT MMIO32(CCU1_BASE + 0x514) /* CLK_M4_SSP0 configuration register */ #define CCU1_CLK_M4_SSP0_CFG MMIO32(CCU1_BASE + 0x518) /* CLK_M4_SSP0 status register */ #define CCU1_CLK_M4_SSP0_STAT MMIO32(CCU1_BASE + 0x51C) /* CLK_M4_TIMER0 configuration register */ #define CCU1_CLK_M4_TIMER0_CFG MMIO32(CCU1_BASE + 0x520) /* CLK_M4_TIMER0 status register */ #define CCU1_CLK_M4_TIMER0_STAT MMIO32(CCU1_BASE + 0x524) /* CLK_M4_TIMER1 configuration register */ #define CCU1_CLK_M4_TIMER1_CFG MMIO32(CCU1_BASE + 0x528) /* CLK_M4_TIMER1 status register */ #define CCU1_CLK_M4_TIMER1_STAT MMIO32(CCU1_BASE + 0x52C) /* CLK_M4_SCU configuration register */ #define CCU1_CLK_M4_SCU_CFG MMIO32(CCU1_BASE + 0x530) /* CLK_M4_SCU status register */ #define CCU1_CLK_M4_SCU_STAT MMIO32(CCU1_BASE + 0x534) /* CLK_M4_CREG configuration register */ #define CCU1_CLK_M4_CREG_CFG MMIO32(CCU1_BASE + 0x538) /* CLK_M4_CREG status register */ #define CCU1_CLK_M4_CREG_STAT MMIO32(CCU1_BASE + 0x53C) /* CLK_M4_RITIMER configuration register */ #define CCU1_CLK_M4_RITIMER_CFG MMIO32(CCU1_BASE + 0x600) /* CLK_M4_RITIMER status register */ #define CCU1_CLK_M4_RITIMER_STAT MMIO32(CCU1_BASE + 0x604) /* CLK_M4_UART2 configuration register */ #define CCU1_CLK_M4_USART2_CFG MMIO32(CCU1_BASE + 0x608) /* CLK_M4_UART2 status register */ #define CCU1_CLK_M4_USART2_STAT MMIO32(CCU1_BASE + 0x60C) /* CLK_M4_UART3 configuration register */ #define CCU1_CLK_M4_USART3_CFG MMIO32(CCU1_BASE + 0x610) /* CLK_M4_UART3 status register */ #define CCU1_CLK_M4_USART3_STAT MMIO32(CCU1_BASE + 0x614) /* CLK_M4_TIMER2 configuration register */ #define CCU1_CLK_M4_TIMER2_CFG MMIO32(CCU1_BASE + 0x618) /* CLK_M4_TIMER2 status register */ #define CCU1_CLK_M4_TIMER2_STAT MMIO32(CCU1_BASE + 0x61C) /* CLK_M4_TIMER3 configuration register */ #define CCU1_CLK_M4_TIMER3_CFG MMIO32(CCU1_BASE + 0x620) /* CLK_M4_TIMER3 status register */ #define CCU1_CLK_M4_TIMER3_STAT MMIO32(CCU1_BASE + 0x624) /* CLK_M4_SSP1 configuration register */ #define CCU1_CLK_M4_SSP1_CFG MMIO32(CCU1_BASE + 0x628) /* CLK_M4_SSP1 status register */ #define CCU1_CLK_M4_SSP1_STAT MMIO32(CCU1_BASE + 0x62C) /* CLK_M4_QEI configuration register */ #define CCU1_CLK_M4_QEI_CFG MMIO32(CCU1_BASE + 0x630) /* CLK_M4_QEI status register */ #define CCU1_CLK_M4_QEI_STAT MMIO32(CCU1_BASE + 0x634) /* CLK_PERIPH_BUS configuration register */ #define CCU1_CLK_PERIPH_BUS_CFG MMIO32(CCU1_BASE + 0x700) /* CLK_PERIPH_BUS status register */ #define CCU1_CLK_PERIPH_BUS_STAT MMIO32(CCU1_BASE + 0x704) /* CLK_PERIPH_CORE configuration register */ #define CCU1_CLK_PERIPH_CORE_CFG MMIO32(CCU1_BASE + 0x710) /* CLK_PERIPH_CORE status register */ #define CCU1_CLK_PERIPH_CORE_STAT MMIO32(CCU1_BASE + 0x714) /* CLK_PERIPH_SGPIO configuration register */ #define CCU1_CLK_PERIPH_SGPIO_CFG MMIO32(CCU1_BASE + 0x718) /* CLK_PERIPH_SGPIO status register */ #define CCU1_CLK_PERIPH_SGPIO_STAT MMIO32(CCU1_BASE + 0x71C) /* CLK_USB0 configuration register */ #define CCU1_CLK_USB0_CFG MMIO32(CCU1_BASE + 0x800) /* CLK_USB0 status register */ #define CCU1_CLK_USB0_STAT MMIO32(CCU1_BASE + 0x804) /* CLK_USB1 configuration register */ #define CCU1_CLK_USB1_CFG MMIO32(CCU1_BASE + 0x900) /* CLK_USB1 status register */ #define CCU1_CLK_USB1_STAT MMIO32(CCU1_BASE + 0x904) /* CLK_SPI configuration register */ #define CCU1_CLK_SPI_CFG MMIO32(CCU1_BASE + 0xA00) /* CLK_SPI status register */ #define CCU1_CLK_SPI_STAT MMIO32(CCU1_BASE + 0xA04) /* CLK_VADC configuration register */ #define CCU1_CLK_VADC_CFG MMIO32(CCU1_BASE + 0xB00) /* CLK_VADC status register */ #define CCU1_CLK_VADC_STAT MMIO32(CCU1_BASE + 0xB04) /* --- CCU2 registers ------------------------------------------------------ */ /* CCU2 power mode register */ #define CCU2_PM MMIO32(CCU2_BASE + 0x000) /* CCU2 base clocks status register */ #define CCU2_BASE_STAT MMIO32(CCU2_BASE + 0x004) /* CLK_APLL configuration register */ #define CCU2_CLK_APLL_CFG MMIO32(CCU2_BASE + 0x100) /* CLK_APLL status register */ #define CCU2_CLK_APLL_STAT MMIO32(CCU2_BASE + 0x104) /* CLK_APB2_UART3 configuration register */ #define CCU2_CLK_APB2_USART3_CFG MMIO32(CCU2_BASE + 0x200) /* CLK_APB2_UART3 status register */ #define CCU2_CLK_APB2_USART3_STAT MMIO32(CCU2_BASE + 0x204) /* CLK_APB2_UART2 configuration register */ #define CCU2_CLK_APB2_USART2_CFG MMIO32(CCU2_BASE + 0x300) /* CLK_APB2_UART2 status register */ #define CCU2_CLK_APB2_USART2_STAT MMIO32(CCU2_BASE + 0x304) /* CLK_APB0_UART1 configuration register */ #define CCU2_CLK_APB0_UART1_CFG MMIO32(CCU2_BASE + 0x400) /* CLK_APB0_UART1 status register */ #define CCU2_CLK_APB0_UART1_STAT MMIO32(CCU2_BASE + 0x404) /* CLK_APB0_UART0 configuration register */ #define CCU2_CLK_APB0_USART0_CFG MMIO32(CCU2_BASE + 0x500) /* CLK_APB0_UART0 status register */ #define CCU2_CLK_APB0_USART0_STAT MMIO32(CCU2_BASE + 0x504) /* CLK_APB2_SSP1 configuration register */ #define CCU2_CLK_APB2_SSP1_CFG MMIO32(CCU2_BASE + 0x600) /* CLK_APB2_SSP1 status register */ #define CCU2_CLK_APB2_SSP1_STAT MMIO32(CCU2_BASE + 0x604) /* CLK_APB0_SSP0 configuration register */ #define CCU2_CLK_APB0_SSP0_CFG MMIO32(CCU2_BASE + 0x700) /* CLK_APB0_SSP0 status register */ #define CCU2_CLK_APB0_SSP0_STAT MMIO32(CCU2_BASE + 0x704) /* CLK_SDIO configuration register (for SD/MMC) */ #define CCU2_CLK_SDIO_CFG MMIO32(CCU2_BASE + 0x800) /* CLK_SDIO status register (for SD/MMC) */ #define CCU2_CLK_SDIO_STAT MMIO32(CCU2_BASE + 0x804) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/cgu.h ================================================ /** @defgroup cgu_defines Clock Generation Unit Defines * * @brief Defined Constants and Types for the LPC43xx Clock Generation * Unit * * @ingroup LPC43xx_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2012 Michael Ossmann * * * @date 10 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_CGU_H #define CGU_LPC43XX_CGU_H /**@{*/ #include #include /* --- CGU registers ------------------------------------------------------- */ /* Frequency monitor register */ #define CGU_FREQ_MON MMIO32(CGU_BASE + 0x014) /* Crystal oscillator control register */ #define CGU_XTAL_OSC_CTRL MMIO32(CGU_BASE + 0x018) /* PLL0USB status register */ #define CGU_PLL0USB_STAT MMIO32(CGU_BASE + 0x01C) /* PLL0USB control register */ #define CGU_PLL0USB_CTRL MMIO32(CGU_BASE + 0x020) /* PLL0USB M-divider register */ #define CGU_PLL0USB_MDIV MMIO32(CGU_BASE + 0x024) /* PLL0USB N/P-divider register */ #define CGU_PLL0USB_NP_DIV MMIO32(CGU_BASE + 0x028) /* PLL0AUDIO status register */ #define CGU_PLL0AUDIO_STAT MMIO32(CGU_BASE + 0x02C) /* PLL0AUDIO control register */ #define CGU_PLL0AUDIO_CTRL MMIO32(CGU_BASE + 0x030) /* PLL0AUDIO M-divider register */ #define CGU_PLL0AUDIO_MDIV MMIO32(CGU_BASE + 0x034) /* PLL0AUDIO N/P-divider register */ #define CGU_PLL0AUDIO_NP_DIV MMIO32(CGU_BASE + 0x038) /* PLL0AUDIO fractional divider register */ #define CGU_PLL0AUDIO_FRAC MMIO32(CGU_BASE + 0x03C) /* PLL1 status register */ #define CGU_PLL1_STAT MMIO32(CGU_BASE + 0x040) /* PLL1 control register */ #define CGU_PLL1_CTRL MMIO32(CGU_BASE + 0x044) /* Integer divider A control register */ #define CGU_IDIVA_CTRL MMIO32(CGU_BASE + 0x048) /* Integer divider B control register */ #define CGU_IDIVB_CTRL MMIO32(CGU_BASE + 0x04C) /* Integer divider C control register */ #define CGU_IDIVC_CTRL MMIO32(CGU_BASE + 0x050) /* Integer divider D control register */ #define CGU_IDIVD_CTRL MMIO32(CGU_BASE + 0x054) /* Integer divider E control register */ #define CGU_IDIVE_CTRL MMIO32(CGU_BASE + 0x058) /* Output stage 0 control register */ #define CGU_BASE_SAFE_CLK MMIO32(CGU_BASE + 0x05C) /* Output stage 1 control register for base clock */ #define CGU_BASE_USB0_CLK MMIO32(CGU_BASE + 0x060) /* Output stage 2 control register for base clock */ #define CGU_BASE_PERIPH_CLK MMIO32(CGU_BASE + 0x064) /* Output stage 3 control register for base clock */ #define CGU_BASE_USB1_CLK MMIO32(CGU_BASE + 0x068) /* Output stage 4 control register for base clock */ #define CGU_BASE_M4_CLK MMIO32(CGU_BASE + 0x06C) /* Output stage 5 control register for base clock */ #define CGU_BASE_SPIFI_CLK MMIO32(CGU_BASE + 0x070) /* Output stage 6 control register for base clock */ #define CGU_BASE_SPI_CLK MMIO32(CGU_BASE + 0x074) /* Output stage 7 control register for base clock */ #define CGU_BASE_PHY_RX_CLK MMIO32(CGU_BASE + 0x078) /* Output stage 8 control register for base clock */ #define CGU_BASE_PHY_TX_CLK MMIO32(CGU_BASE + 0x07C) /* Output stage 9 control register for base clock */ #define CGU_BASE_APB1_CLK MMIO32(CGU_BASE + 0x080) /* Output stage 10 control register for base clock */ #define CGU_BASE_APB3_CLK MMIO32(CGU_BASE + 0x084) /* Output stage 11 control register for base clock */ #define CGU_BASE_LCD_CLK MMIO32(CGU_BASE + 0x088) /* Output stage 12 control register for base clock */ #define CGU_BASE_VADC_CLK MMIO32(CGU_BASE + 0x08C) /* Output stage 13 control register for base clock */ #define CGU_BASE_SDIO_CLK MMIO32(CGU_BASE + 0x090) /* Output stage 14 control register for base clock */ #define CGU_BASE_SSP0_CLK MMIO32(CGU_BASE + 0x094) /* Output stage 15 control register for base clock */ #define CGU_BASE_SSP1_CLK MMIO32(CGU_BASE + 0x098) /* Output stage 16 control register for base clock */ #define CGU_BASE_UART0_CLK MMIO32(CGU_BASE + 0x09C) /* Output stage 17 control register for base clock */ #define CGU_BASE_UART1_CLK MMIO32(CGU_BASE + 0x0A0) /* Output stage 18 control register for base clock */ #define CGU_BASE_UART2_CLK MMIO32(CGU_BASE + 0x0A4) /* Output stage 19 control register for base clock */ #define CGU_BASE_UART3_CLK MMIO32(CGU_BASE + 0x0A8) /* Output stage 20 control register for base clock */ #define CGU_BASE_OUT_CLK MMIO32(CGU_BASE + 0x0AC) /* Reserved output stage */ #define CGU_OUTCLK_21_CTRL MMIO32(CGU_BASE + 0x0B0) /* Reserved output stage */ #define CGU_OUTCLK_22_CTRL MMIO32(CGU_BASE + 0x0B4) /* Reserved output stage */ #define CGU_OUTCLK_23_CTRL MMIO32(CGU_BASE + 0x0B8) /* Reserved output stage */ #define CGU_OUTCLK_24_CTRL MMIO32(CGU_BASE + 0x0BC) /* Output stage 25 control register for base clock */ #define CGU_BASE_AUDIO_CLK MMIO32(CGU_BASE + 0x0C0) /* Output stage 26 control CLK register for base clock */ #define CGU_BASE_CGU_OUT0_CLK MMIO32(CGU_BASE + 0x0C4) /* Output stage 27 control CLK register for base clock */ #define CGU_BASE_CGU_OUT1_CLK MMIO32(CGU_BASE + 0x0C8) /* --- CGU_FREQ_MON values -------------------------------------- */ /* RCNT: 9-bit reference clock-counter value */ #define CGU_FREQ_MON_RCNT_SHIFT (0) #define CGU_FREQ_MON_RCNT_MASK (0x1ff << CGU_FREQ_MON_RCNT_SHIFT) #define CGU_FREQ_MON_RCNT(x) ((x) << CGU_FREQ_MON_RCNT_SHIFT) /* FCNT: 14-bit selected clock-counter value */ #define CGU_FREQ_MON_FCNT_SHIFT (9) #define CGU_FREQ_MON_FCNT_MASK (0x3fff << CGU_FREQ_MON_FCNT_SHIFT) #define CGU_FREQ_MON_FCNT(x) ((x) << CGU_FREQ_MON_FCNT_SHIFT) /* MEAS: Measure frequency */ #define CGU_FREQ_MON_MEAS_SHIFT (23) #define CGU_FREQ_MON_MEAS_MASK (0x1 << CGU_FREQ_MON_MEAS_SHIFT) #define CGU_FREQ_MON_MEAS(x) ((x) << CGU_FREQ_MON_MEAS_SHIFT) /* CLK_SEL: Clock-source selection for the clock to be measured */ #define CGU_FREQ_MON_CLK_SEL_SHIFT (24) #define CGU_FREQ_MON_CLK_SEL_MASK (0x1f << CGU_FREQ_MON_CLK_SEL_SHIFT) #define CGU_FREQ_MON_CLK_SEL(x) ((x) << CGU_FREQ_MON_CLK_SEL_SHIFT) /* --- CGU_XTAL_OSC_CTRL values --------------------------------- */ /* ENABLE: Oscillator-pad enable */ #define CGU_XTAL_OSC_CTRL_ENABLE_SHIFT (0) #define CGU_XTAL_OSC_CTRL_ENABLE_MASK (0x1 << CGU_XTAL_OSC_CTRL_ENABLE_SHIFT) #define CGU_XTAL_OSC_CTRL_ENABLE(x) ((x) << CGU_XTAL_OSC_CTRL_ENABLE_SHIFT) /* BYPASS: Configure crystal operation or external-clock input pin XTAL1 */ #define CGU_XTAL_OSC_CTRL_BYPASS_SHIFT (1) #define CGU_XTAL_OSC_CTRL_BYPASS_MASK (0x1 << CGU_XTAL_OSC_CTRL_BYPASS_SHIFT) #define CGU_XTAL_OSC_CTRL_BYPASS(x) ((x) << CGU_XTAL_OSC_CTRL_BYPASS_SHIFT) /* HF: Select frequency range */ #define CGU_XTAL_OSC_CTRL_HF_SHIFT (2) #define CGU_XTAL_OSC_CTRL_HF_MASK (0x1 << CGU_XTAL_OSC_CTRL_HF_SHIFT) #define CGU_XTAL_OSC_CTRL_HF(x) ((x) << CGU_XTAL_OSC_CTRL_HF_SHIFT) /* --- CGU_PLL0USB_STAT values ---------------------------------- */ /* LOCK: PLL0 lock indicator */ #define CGU_PLL0USB_STAT_LOCK_SHIFT (0) #define CGU_PLL0USB_STAT_LOCK_MASK (0x1 << CGU_PLL0USB_STAT_LOCK_SHIFT) #define CGU_PLL0USB_STAT_LOCK(x) ((x) << CGU_PLL0USB_STAT_LOCK_SHIFT) /* FR: PLL0 free running indicator */ #define CGU_PLL0USB_STAT_FR_SHIFT (1) #define CGU_PLL0USB_STAT_FR_MASK (0x1 << CGU_PLL0USB_STAT_FR_SHIFT) #define CGU_PLL0USB_STAT_FR(x) ((x) << CGU_PLL0USB_STAT_FR_SHIFT) /* --- CGU_PLL0USB_CTRL values ---------------------------------- */ /* PD: PLL0 power down */ #define CGU_PLL0USB_CTRL_PD_SHIFT (0) #define CGU_PLL0USB_CTRL_PD_MASK (0x1 << CGU_PLL0USB_CTRL_PD_SHIFT) #define CGU_PLL0USB_CTRL_PD(x) ((x) << CGU_PLL0USB_CTRL_PD_SHIFT) /* BYPASS: Input clock bypass control */ #define CGU_PLL0USB_CTRL_BYPASS_SHIFT (1) #define CGU_PLL0USB_CTRL_BYPASS_MASK (0x1 << CGU_PLL0USB_CTRL_BYPASS_SHIFT) #define CGU_PLL0USB_CTRL_BYPASS(x) ((x) << CGU_PLL0USB_CTRL_BYPASS_SHIFT) /* DIRECTI: PLL0 direct input */ #define CGU_PLL0USB_CTRL_DIRECTI_SHIFT (2) #define CGU_PLL0USB_CTRL_DIRECTI_MASK (0x1 << CGU_PLL0USB_CTRL_DIRECTI_SHIFT) #define CGU_PLL0USB_CTRL_DIRECTI(x) ((x) << CGU_PLL0USB_CTRL_DIRECTI_SHIFT) /* DIRECTO: PLL0 direct output */ #define CGU_PLL0USB_CTRL_DIRECTO_SHIFT (3) #define CGU_PLL0USB_CTRL_DIRECTO_MASK (0x1 << CGU_PLL0USB_CTRL_DIRECTO_SHIFT) #define CGU_PLL0USB_CTRL_DIRECTO(x) ((x) << CGU_PLL0USB_CTRL_DIRECTO_SHIFT) /* CLKEN: PLL0 clock enable */ #define CGU_PLL0USB_CTRL_CLKEN_SHIFT (4) #define CGU_PLL0USB_CTRL_CLKEN_MASK (0x1 << CGU_PLL0USB_CTRL_CLKEN_SHIFT) #define CGU_PLL0USB_CTRL_CLKEN(x) ((x) << CGU_PLL0USB_CTRL_CLKEN_SHIFT) /* FRM: Free running mode */ #define CGU_PLL0USB_CTRL_FRM_SHIFT (6) #define CGU_PLL0USB_CTRL_FRM_MASK (0x1 << CGU_PLL0USB_CTRL_FRM_SHIFT) #define CGU_PLL0USB_CTRL_FRM(x) ((x) << CGU_PLL0USB_CTRL_FRM_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_PLL0USB_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_PLL0USB_CTRL_AUTOBLOCK_MASK (0x1 << CGU_PLL0USB_CTRL_AUTOBLOCK_SHIFT) #define CGU_PLL0USB_CTRL_AUTOBLOCK(x) ((x) << CGU_PLL0USB_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_PLL0USB_CTRL_CLK_SEL_SHIFT (24) #define CGU_PLL0USB_CTRL_CLK_SEL_MASK (0x1f << CGU_PLL0USB_CTRL_CLK_SEL_SHIFT) #define CGU_PLL0USB_CTRL_CLK_SEL(x) ((x) << CGU_PLL0USB_CTRL_CLK_SEL_SHIFT) /* --- CGU_PLL0USB_MDIV values ---------------------------------- */ /* MDEC: Decoded M-divider coefficient value */ #define CGU_PLL0USB_MDIV_MDEC_SHIFT (0) #define CGU_PLL0USB_MDIV_MDEC_MASK (0x1ffff << CGU_PLL0USB_MDIV_MDEC_SHIFT) #define CGU_PLL0USB_MDIV_MDEC(x) ((x) << CGU_PLL0USB_MDIV_MDEC_SHIFT) /* SELP: Bandwidth select P value */ #define CGU_PLL0USB_MDIV_SELP_SHIFT (17) #define CGU_PLL0USB_MDIV_SELP_MASK (0x1f << CGU_PLL0USB_MDIV_SELP_SHIFT) #define CGU_PLL0USB_MDIV_SELP(x) ((x) << CGU_PLL0USB_MDIV_SELP_SHIFT) /* SELI: Bandwidth select I value */ #define CGU_PLL0USB_MDIV_SELI_SHIFT (22) #define CGU_PLL0USB_MDIV_SELI_MASK (0x3f << CGU_PLL0USB_MDIV_SELI_SHIFT) #define CGU_PLL0USB_MDIV_SELI(x) ((x) << CGU_PLL0USB_MDIV_SELI_SHIFT) /* SELR: Bandwidth select R value */ #define CGU_PLL0USB_MDIV_SELR_SHIFT (28) #define CGU_PLL0USB_MDIV_SELR_MASK (0xf << CGU_PLL0USB_MDIV_SELR_SHIFT) #define CGU_PLL0USB_MDIV_SELR(x) ((x) << CGU_PLL0USB_MDIV_SELR_SHIFT) /* --- CGU_PLL0USB_NP_DIV values -------------------------------- */ /* PDEC: Decoded P-divider coefficient value */ #define CGU_PLL0USB_NP_DIV_PDEC_SHIFT (0) #define CGU_PLL0USB_NP_DIV_PDEC_MASK (0x7f << CGU_PLL0USB_NP_DIV_PDEC_SHIFT) #define CGU_PLL0USB_NP_DIV_PDEC(x) ((x) << CGU_PLL0USB_NP_DIV_PDEC_SHIFT) /* NDEC: Decoded N-divider coefficient value */ #define CGU_PLL0USB_NP_DIV_NDEC_SHIFT (12) #define CGU_PLL0USB_NP_DIV_NDEC_MASK (0x3ff << CGU_PLL0USB_NP_DIV_NDEC_SHIFT) #define CGU_PLL0USB_NP_DIV_NDEC(x) ((x) << CGU_PLL0USB_NP_DIV_NDEC_SHIFT) /* --- CGU_PLL0AUDIO_STAT values -------------------------------- */ /* LOCK: PLL0 lock indicator */ #define CGU_PLL0AUDIO_STAT_LOCK_SHIFT (0) #define CGU_PLL0AUDIO_STAT_LOCK_MASK (0x1 << CGU_PLL0AUDIO_STAT_LOCK_SHIFT) #define CGU_PLL0AUDIO_STAT_LOCK(x) ((x) << CGU_PLL0AUDIO_STAT_LOCK_SHIFT) /* FR: PLL0 free running indicator */ #define CGU_PLL0AUDIO_STAT_FR_SHIFT (1) #define CGU_PLL0AUDIO_STAT_FR_MASK (0x1 << CGU_PLL0AUDIO_STAT_FR_SHIFT) #define CGU_PLL0AUDIO_STAT_FR(x) ((x) << CGU_PLL0AUDIO_STAT_FR_SHIFT) /* --- CGU_PLL0AUDIO_CTRL values -------------------------------- */ /* PD: PLL0 power down */ #define CGU_PLL0AUDIO_CTRL_PD_SHIFT (0) #define CGU_PLL0AUDIO_CTRL_PD_MASK (0x1 << CGU_PLL0AUDIO_CTRL_PD_SHIFT) #define CGU_PLL0AUDIO_CTRL_PD(x) ((x) << CGU_PLL0AUDIO_CTRL_PD_SHIFT) /* BYPASS: Input clock bypass control */ #define CGU_PLL0AUDIO_CTRL_BYPASS_SHIFT (1) #define CGU_PLL0AUDIO_CTRL_BYPASS_MASK (0x1 << CGU_PLL0AUDIO_CTRL_BYPASS_SHIFT) #define CGU_PLL0AUDIO_CTRL_BYPASS(x) ((x) << CGU_PLL0AUDIO_CTRL_BYPASS_SHIFT) /* DIRECTI: PLL0 direct input */ #define CGU_PLL0AUDIO_CTRL_DIRECTI_SHIFT (2) #define CGU_PLL0AUDIO_CTRL_DIRECTI_MASK (0x1 << CGU_PLL0AUDIO_CTRL_DIRECTI_SHIFT) #define CGU_PLL0AUDIO_CTRL_DIRECTI(x) ((x) << CGU_PLL0AUDIO_CTRL_DIRECTI_SHIFT) /* DIRECTO: PLL0 direct output */ #define CGU_PLL0AUDIO_CTRL_DIRECTO_SHIFT (3) #define CGU_PLL0AUDIO_CTRL_DIRECTO_MASK (0x1 << CGU_PLL0AUDIO_CTRL_DIRECTO_SHIFT) #define CGU_PLL0AUDIO_CTRL_DIRECTO(x) ((x) << CGU_PLL0AUDIO_CTRL_DIRECTO_SHIFT) /* CLKEN: PLL0 clock enable */ #define CGU_PLL0AUDIO_CTRL_CLKEN_SHIFT (4) #define CGU_PLL0AUDIO_CTRL_CLKEN_MASK (0x1 << CGU_PLL0AUDIO_CTRL_CLKEN_SHIFT) #define CGU_PLL0AUDIO_CTRL_CLKEN(x) ((x) << CGU_PLL0AUDIO_CTRL_CLKEN_SHIFT) /* FRM: Free running mode */ #define CGU_PLL0AUDIO_CTRL_FRM_SHIFT (6) #define CGU_PLL0AUDIO_CTRL_FRM_MASK (0x1 << CGU_PLL0AUDIO_CTRL_FRM_SHIFT) #define CGU_PLL0AUDIO_CTRL_FRM(x) ((x) << CGU_PLL0AUDIO_CTRL_FRM_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_PLL0AUDIO_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_PLL0AUDIO_CTRL_AUTOBLOCK_MASK (0x1 << CGU_PLL0AUDIO_CTRL_AUTOBLOCK_SHIFT) #define CGU_PLL0AUDIO_CTRL_AUTOBLOCK(x) ((x) << CGU_PLL0AUDIO_CTRL_AUTOBLOCK_SHIFT) /* PLLFRACT_REQ: Fractional PLL word write request */ #define CGU_PLL0AUDIO_CTRL_PLLFRACT_REQ_SHIFT (12) #define CGU_PLL0AUDIO_CTRL_PLLFRACT_REQ_MASK (0x1 << CGU_PLL0AUDIO_CTRL_PLLFRACT_REQ_SHIFT) #define CGU_PLL0AUDIO_CTRL_PLLFRACT_REQ(x) ((x) << CGU_PLL0AUDIO_CTRL_PLLFRACT_REQ_SHIFT) /* SEL_EXT: Select fractional divider */ #define CGU_PLL0AUDIO_CTRL_SEL_EXT_SHIFT (13) #define CGU_PLL0AUDIO_CTRL_SEL_EXT_MASK (0x1 << CGU_PLL0AUDIO_CTRL_SEL_EXT_SHIFT) #define CGU_PLL0AUDIO_CTRL_SEL_EXT(x) ((x) << CGU_PLL0AUDIO_CTRL_SEL_EXT_SHIFT) /* MOD_PD: Sigma-Delta modulator power-down */ #define CGU_PLL0AUDIO_CTRL_MOD_PD_SHIFT (14) #define CGU_PLL0AUDIO_CTRL_MOD_PD_MASK (0x1 << CGU_PLL0AUDIO_CTRL_MOD_PD_SHIFT) #define CGU_PLL0AUDIO_CTRL_MOD_PD(x) ((x) << CGU_PLL0AUDIO_CTRL_MOD_PD_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_PLL0AUDIO_CTRL_CLK_SEL_SHIFT (24) #define CGU_PLL0AUDIO_CTRL_CLK_SEL_MASK (0x1f << CGU_PLL0AUDIO_CTRL_CLK_SEL_SHIFT) #define CGU_PLL0AUDIO_CTRL_CLK_SEL(x) ((x) << CGU_PLL0AUDIO_CTRL_CLK_SEL_SHIFT) /* --- CGU_PLL0AUDIO_MDIV values -------------------------------- */ /* MDEC: Decoded M-divider coefficient value */ #define CGU_PLL0AUDIO_MDIV_MDEC_SHIFT (0) #define CGU_PLL0AUDIO_MDIV_MDEC_MASK (0x1ffff << CGU_PLL0AUDIO_MDIV_MDEC_SHIFT) #define CGU_PLL0AUDIO_MDIV_MDEC(x) ((x) << CGU_PLL0AUDIO_MDIV_MDEC_SHIFT) /* --- CGU_PLL0AUDIO_NP_DIV values ------------------------------ */ /* PDEC: Decoded P-divider coefficient value */ #define CGU_PLL0AUDIO_NP_DIV_PDEC_SHIFT (0) #define CGU_PLL0AUDIO_NP_DIV_PDEC_MASK (0x7f << CGU_PLL0AUDIO_NP_DIV_PDEC_SHIFT) #define CGU_PLL0AUDIO_NP_DIV_PDEC(x) ((x) << CGU_PLL0AUDIO_NP_DIV_PDEC_SHIFT) /* NDEC: Decoded N-divider coefficient value */ #define CGU_PLL0AUDIO_NP_DIV_NDEC_SHIFT (12) #define CGU_PLL0AUDIO_NP_DIV_NDEC_MASK (0x3ff << CGU_PLL0AUDIO_NP_DIV_NDEC_SHIFT) #define CGU_PLL0AUDIO_NP_DIV_NDEC(x) ((x) << CGU_PLL0AUDIO_NP_DIV_NDEC_SHIFT) /* --- CGU_PLL0AUDIO_FRAC values -------------------------------- */ /* PLLFRACT_CTRL: PLL fractional divider control word */ #define CGU_PLL0AUDIO_FRAC_PLLFRACT_CTRL_SHIFT (0) #define CGU_PLL0AUDIO_FRAC_PLLFRACT_CTRL_MASK (0x3fffff << CGU_PLL0AUDIO_FRAC_PLLFRACT_CTRL_SHIFT) #define CGU_PLL0AUDIO_FRAC_PLLFRACT_CTRL(x) ((x) << CGU_PLL0AUDIO_FRAC_PLLFRACT_CTRL_SHIFT) /* --- CGU_PLL1_STAT values ------------------------------------- */ /* LOCK: PLL1 lock indicator */ #define CGU_PLL1_STAT_LOCK_SHIFT (0) #define CGU_PLL1_STAT_LOCK_MASK (0x1 << CGU_PLL1_STAT_LOCK_SHIFT) #define CGU_PLL1_STAT_LOCK(x) ((x) << CGU_PLL1_STAT_LOCK_SHIFT) /* --- CGU_PLL1_CTRL values ------------------------------------- */ /* PD: PLL1 power down */ #define CGU_PLL1_CTRL_PD_SHIFT (0) #define CGU_PLL1_CTRL_PD_MASK (0x1 << CGU_PLL1_CTRL_PD_SHIFT) #define CGU_PLL1_CTRL_PD(x) ((x) << CGU_PLL1_CTRL_PD_SHIFT) /* BYPASS: Input clock bypass control */ #define CGU_PLL1_CTRL_BYPASS_SHIFT (1) #define CGU_PLL1_CTRL_BYPASS_MASK (0x1 << CGU_PLL1_CTRL_BYPASS_SHIFT) #define CGU_PLL1_CTRL_BYPASS(x) ((x) << CGU_PLL1_CTRL_BYPASS_SHIFT) /* FBSEL: PLL feedback select */ #define CGU_PLL1_CTRL_FBSEL_SHIFT (6) #define CGU_PLL1_CTRL_FBSEL_MASK (0x1 << CGU_PLL1_CTRL_FBSEL_SHIFT) #define CGU_PLL1_CTRL_FBSEL(x) ((x) << CGU_PLL1_CTRL_FBSEL_SHIFT) /* DIRECT: PLL direct CCO output */ #define CGU_PLL1_CTRL_DIRECT_SHIFT (7) #define CGU_PLL1_CTRL_DIRECT_MASK (0x1 << CGU_PLL1_CTRL_DIRECT_SHIFT) #define CGU_PLL1_CTRL_DIRECT(x) ((x) << CGU_PLL1_CTRL_DIRECT_SHIFT) /* PSEL: Post-divider division ratio P */ #define CGU_PLL1_CTRL_PSEL_SHIFT (8) #define CGU_PLL1_CTRL_PSEL_MASK (0x3 << CGU_PLL1_CTRL_PSEL_SHIFT) #define CGU_PLL1_CTRL_PSEL(x) ((x) << CGU_PLL1_CTRL_PSEL_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_PLL1_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_PLL1_CTRL_AUTOBLOCK_MASK (0x1 << CGU_PLL1_CTRL_AUTOBLOCK_SHIFT) #define CGU_PLL1_CTRL_AUTOBLOCK(x) ((x) << CGU_PLL1_CTRL_AUTOBLOCK_SHIFT) /* NSEL: Pre-divider division ratio N */ #define CGU_PLL1_CTRL_NSEL_SHIFT (12) #define CGU_PLL1_CTRL_NSEL_MASK (0x3 << CGU_PLL1_CTRL_NSEL_SHIFT) #define CGU_PLL1_CTRL_NSEL(x) ((x) << CGU_PLL1_CTRL_NSEL_SHIFT) /* MSEL: Feedback-divider division ratio (M) */ #define CGU_PLL1_CTRL_MSEL_SHIFT (16) #define CGU_PLL1_CTRL_MSEL_MASK (0xff << CGU_PLL1_CTRL_MSEL_SHIFT) #define CGU_PLL1_CTRL_MSEL(x) ((x) << CGU_PLL1_CTRL_MSEL_SHIFT) /* CLK_SEL: Clock-source selection */ #define CGU_PLL1_CTRL_CLK_SEL_SHIFT (24) #define CGU_PLL1_CTRL_CLK_SEL_MASK (0x1f << CGU_PLL1_CTRL_CLK_SEL_SHIFT) #define CGU_PLL1_CTRL_CLK_SEL(x) ((x) << CGU_PLL1_CTRL_CLK_SEL_SHIFT) /* --- CGU_IDIVA_CTRL values ------------------------------------ */ /* PD: Integer divider power down */ #define CGU_IDIVA_CTRL_PD_SHIFT (0) #define CGU_IDIVA_CTRL_PD_MASK (0x1 << CGU_IDIVA_CTRL_PD_SHIFT) #define CGU_IDIVA_CTRL_PD(x) ((x) << CGU_IDIVA_CTRL_PD_SHIFT) /* IDIV: Integer divider A divider value (1/(IDIV + 1)) */ #define CGU_IDIVA_CTRL_IDIV_SHIFT (2) #define CGU_IDIVA_CTRL_IDIV_MASK (0x3 << CGU_IDIVA_CTRL_IDIV_SHIFT) #define CGU_IDIVA_CTRL_IDIV(x) ((x) << CGU_IDIVA_CTRL_IDIV_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_IDIVA_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_IDIVA_CTRL_AUTOBLOCK_MASK (0x1 << CGU_IDIVA_CTRL_AUTOBLOCK_SHIFT) #define CGU_IDIVA_CTRL_AUTOBLOCK(x) ((x) << CGU_IDIVA_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_IDIVA_CTRL_CLK_SEL_SHIFT (24) #define CGU_IDIVA_CTRL_CLK_SEL_MASK (0x1f << CGU_IDIVA_CTRL_CLK_SEL_SHIFT) #define CGU_IDIVA_CTRL_CLK_SEL(x) ((x) << CGU_IDIVA_CTRL_CLK_SEL_SHIFT) /* --- CGU_IDIVB_CTRL values ------------------------------------ */ /* PD: Integer divider power down */ #define CGU_IDIVB_CTRL_PD_SHIFT (0) #define CGU_IDIVB_CTRL_PD_MASK (0x1 << CGU_IDIVB_CTRL_PD_SHIFT) #define CGU_IDIVB_CTRL_PD(x) ((x) << CGU_IDIVB_CTRL_PD_SHIFT) /* IDIV: Integer divider B divider value (1/(IDIV + 1)) */ #define CGU_IDIVB_CTRL_IDIV_SHIFT (2) #define CGU_IDIVB_CTRL_IDIV_MASK (0xf << CGU_IDIVB_CTRL_IDIV_SHIFT) #define CGU_IDIVB_CTRL_IDIV(x) ((x) << CGU_IDIVB_CTRL_IDIV_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_IDIVB_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_IDIVB_CTRL_AUTOBLOCK_MASK (0x1 << CGU_IDIVB_CTRL_AUTOBLOCK_SHIFT) #define CGU_IDIVB_CTRL_AUTOBLOCK(x) ((x) << CGU_IDIVB_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_IDIVB_CTRL_CLK_SEL_SHIFT (24) #define CGU_IDIVB_CTRL_CLK_SEL_MASK (0x1f << CGU_IDIVB_CTRL_CLK_SEL_SHIFT) #define CGU_IDIVB_CTRL_CLK_SEL(x) ((x) << CGU_IDIVB_CTRL_CLK_SEL_SHIFT) /* --- CGU_IDIVC_CTRL values ------------------------------------ */ /* PD: Integer divider power down */ #define CGU_IDIVC_CTRL_PD_SHIFT (0) #define CGU_IDIVC_CTRL_PD_MASK (0x1 << CGU_IDIVC_CTRL_PD_SHIFT) #define CGU_IDIVC_CTRL_PD(x) ((x) << CGU_IDIVC_CTRL_PD_SHIFT) /* IDIV: Integer divider C divider value (1/(IDIV + 1)) */ #define CGU_IDIVC_CTRL_IDIV_SHIFT (2) #define CGU_IDIVC_CTRL_IDIV_MASK (0xf << CGU_IDIVC_CTRL_IDIV_SHIFT) #define CGU_IDIVC_CTRL_IDIV(x) ((x) << CGU_IDIVC_CTRL_IDIV_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_IDIVC_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_IDIVC_CTRL_AUTOBLOCK_MASK (0x1 << CGU_IDIVC_CTRL_AUTOBLOCK_SHIFT) #define CGU_IDIVC_CTRL_AUTOBLOCK(x) ((x) << CGU_IDIVC_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_IDIVC_CTRL_CLK_SEL_SHIFT (24) #define CGU_IDIVC_CTRL_CLK_SEL_MASK (0x1f << CGU_IDIVC_CTRL_CLK_SEL_SHIFT) #define CGU_IDIVC_CTRL_CLK_SEL(x) ((x) << CGU_IDIVC_CTRL_CLK_SEL_SHIFT) /* --- CGU_IDIVD_CTRL values ------------------------------------ */ /* PD: Integer divider power down */ #define CGU_IDIVD_CTRL_PD_SHIFT (0) #define CGU_IDIVD_CTRL_PD_MASK (0x1 << CGU_IDIVD_CTRL_PD_SHIFT) #define CGU_IDIVD_CTRL_PD(x) ((x) << CGU_IDIVD_CTRL_PD_SHIFT) /* IDIV: Integer divider D divider value (1/(IDIV + 1)) */ #define CGU_IDIVD_CTRL_IDIV_SHIFT (2) #define CGU_IDIVD_CTRL_IDIV_MASK (0xf << CGU_IDIVD_CTRL_IDIV_SHIFT) #define CGU_IDIVD_CTRL_IDIV(x) ((x) << CGU_IDIVD_CTRL_IDIV_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_IDIVD_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_IDIVD_CTRL_AUTOBLOCK_MASK (0x1 << CGU_IDIVD_CTRL_AUTOBLOCK_SHIFT) #define CGU_IDIVD_CTRL_AUTOBLOCK(x) ((x) << CGU_IDIVD_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_IDIVD_CTRL_CLK_SEL_SHIFT (24) #define CGU_IDIVD_CTRL_CLK_SEL_MASK (0x1f << CGU_IDIVD_CTRL_CLK_SEL_SHIFT) #define CGU_IDIVD_CTRL_CLK_SEL(x) ((x) << CGU_IDIVD_CTRL_CLK_SEL_SHIFT) /* --- CGU_IDIVE_CTRL values ------------------------------------ */ /* PD: Integer divider power down */ #define CGU_IDIVE_CTRL_PD_SHIFT (0) #define CGU_IDIVE_CTRL_PD_MASK (0x1 << CGU_IDIVE_CTRL_PD_SHIFT) #define CGU_IDIVE_CTRL_PD(x) ((x) << CGU_IDIVE_CTRL_PD_SHIFT) /* IDIV: Integer divider E divider value (1/(IDIV + 1)) */ #define CGU_IDIVE_CTRL_IDIV_SHIFT (2) #define CGU_IDIVE_CTRL_IDIV_MASK (0xff << CGU_IDIVE_CTRL_IDIV_SHIFT) #define CGU_IDIVE_CTRL_IDIV(x) ((x) << CGU_IDIVE_CTRL_IDIV_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_IDIVE_CTRL_AUTOBLOCK_SHIFT (11) #define CGU_IDIVE_CTRL_AUTOBLOCK_MASK (0x1 << CGU_IDIVE_CTRL_AUTOBLOCK_SHIFT) #define CGU_IDIVE_CTRL_AUTOBLOCK(x) ((x) << CGU_IDIVE_CTRL_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_IDIVE_CTRL_CLK_SEL_SHIFT (24) #define CGU_IDIVE_CTRL_CLK_SEL_MASK (0x1f << CGU_IDIVE_CTRL_CLK_SEL_SHIFT) #define CGU_IDIVE_CTRL_CLK_SEL(x) ((x) << CGU_IDIVE_CTRL_CLK_SEL_SHIFT) /* --- CGU_BASE_SAFE_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SAFE_CLK_PD_SHIFT (0) #define CGU_BASE_SAFE_CLK_PD_MASK (0x1 << CGU_BASE_SAFE_CLK_PD_SHIFT) #define CGU_BASE_SAFE_CLK_PD(x) ((x) << CGU_BASE_SAFE_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SAFE_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SAFE_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SAFE_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SAFE_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SAFE_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SAFE_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SAFE_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SAFE_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SAFE_CLK_CLK_SEL(x) ((x) << CGU_BASE_SAFE_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_USB0_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_USB0_CLK_PD_SHIFT (0) #define CGU_BASE_USB0_CLK_PD_MASK (0x1 << CGU_BASE_USB0_CLK_PD_SHIFT) #define CGU_BASE_USB0_CLK_PD(x) ((x) << CGU_BASE_USB0_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_USB0_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_USB0_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_USB0_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_USB0_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_USB0_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_USB0_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_USB0_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_USB0_CLK_CLK_SEL_SHIFT) #define CGU_BASE_USB0_CLK_CLK_SEL(x) ((x) << CGU_BASE_USB0_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_PERIPH_CLK values ------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_PERIPH_CLK_PD_SHIFT (0) #define CGU_BASE_PERIPH_CLK_PD_MASK (0x1 << CGU_BASE_PERIPH_CLK_PD_SHIFT) #define CGU_BASE_PERIPH_CLK_PD(x) ((x) << CGU_BASE_PERIPH_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_PERIPH_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_PERIPH_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_PERIPH_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_PERIPH_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_PERIPH_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_PERIPH_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_PERIPH_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_PERIPH_CLK_CLK_SEL_SHIFT) #define CGU_BASE_PERIPH_CLK_CLK_SEL(x) ((x) << CGU_BASE_PERIPH_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_USB1_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_USB1_CLK_PD_SHIFT (0) #define CGU_BASE_USB1_CLK_PD_MASK (0x1 << CGU_BASE_USB1_CLK_PD_SHIFT) #define CGU_BASE_USB1_CLK_PD(x) ((x) << CGU_BASE_USB1_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_USB1_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_USB1_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_USB1_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_USB1_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_USB1_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_USB1_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_USB1_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_USB1_CLK_CLK_SEL_SHIFT) #define CGU_BASE_USB1_CLK_CLK_SEL(x) ((x) << CGU_BASE_USB1_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_M4_CLK values ----------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_M4_CLK_PD_SHIFT (0) #define CGU_BASE_M4_CLK_PD_MASK (0x1 << CGU_BASE_M4_CLK_PD_SHIFT) #define CGU_BASE_M4_CLK_PD(x) ((x) << CGU_BASE_M4_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_M4_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_M4_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_M4_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_M4_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_M4_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_M4_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_M4_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_M4_CLK_CLK_SEL_SHIFT) #define CGU_BASE_M4_CLK_CLK_SEL(x) ((x) << CGU_BASE_M4_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_SPIFI_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SPIFI_CLK_PD_SHIFT (0) #define CGU_BASE_SPIFI_CLK_PD_MASK (0x1 << CGU_BASE_SPIFI_CLK_PD_SHIFT) #define CGU_BASE_SPIFI_CLK_PD(x) ((x) << CGU_BASE_SPIFI_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SPIFI_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SPIFI_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SPIFI_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SPIFI_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SPIFI_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SPIFI_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SPIFI_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SPIFI_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SPIFI_CLK_CLK_SEL(x) ((x) << CGU_BASE_SPIFI_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_SPI_CLK values ---------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SPI_CLK_PD_SHIFT (0) #define CGU_BASE_SPI_CLK_PD_MASK (0x1 << CGU_BASE_SPI_CLK_PD_SHIFT) #define CGU_BASE_SPI_CLK_PD(x) ((x) << CGU_BASE_SPI_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SPI_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SPI_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SPI_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SPI_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SPI_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SPI_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SPI_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SPI_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SPI_CLK_CLK_SEL(x) ((x) << CGU_BASE_SPI_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_PHY_RX_CLK values ------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_PHY_RX_CLK_PD_SHIFT (0) #define CGU_BASE_PHY_RX_CLK_PD_MASK (0x1 << CGU_BASE_PHY_RX_CLK_PD_SHIFT) #define CGU_BASE_PHY_RX_CLK_PD(x) ((x) << CGU_BASE_PHY_RX_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_PHY_RX_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_PHY_RX_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_PHY_RX_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_PHY_RX_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_PHY_RX_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_PHY_RX_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_PHY_RX_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_PHY_RX_CLK_CLK_SEL_SHIFT) #define CGU_BASE_PHY_RX_CLK_CLK_SEL(x) ((x) << CGU_BASE_PHY_RX_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_PHY_TX_CLK values ------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_PHY_TX_CLK_PD_SHIFT (0) #define CGU_BASE_PHY_TX_CLK_PD_MASK (0x1 << CGU_BASE_PHY_TX_CLK_PD_SHIFT) #define CGU_BASE_PHY_TX_CLK_PD(x) ((x) << CGU_BASE_PHY_TX_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_PHY_TX_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_PHY_TX_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_PHY_TX_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_PHY_TX_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_PHY_TX_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_PHY_TX_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_PHY_TX_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_PHY_TX_CLK_CLK_SEL_SHIFT) #define CGU_BASE_PHY_TX_CLK_CLK_SEL(x) ((x) << CGU_BASE_PHY_TX_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_APB1_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_APB1_CLK_PD_SHIFT (0) #define CGU_BASE_APB1_CLK_PD_MASK (0x1 << CGU_BASE_APB1_CLK_PD_SHIFT) #define CGU_BASE_APB1_CLK_PD(x) ((x) << CGU_BASE_APB1_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_APB1_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_APB1_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_APB1_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_APB1_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_APB1_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_APB1_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_APB1_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_APB1_CLK_CLK_SEL_SHIFT) #define CGU_BASE_APB1_CLK_CLK_SEL(x) ((x) << CGU_BASE_APB1_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_APB3_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_APB3_CLK_PD_SHIFT (0) #define CGU_BASE_APB3_CLK_PD_MASK (0x1 << CGU_BASE_APB3_CLK_PD_SHIFT) #define CGU_BASE_APB3_CLK_PD(x) ((x) << CGU_BASE_APB3_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_APB3_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_APB3_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_APB3_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_APB3_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_APB3_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_APB3_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_APB3_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_APB3_CLK_CLK_SEL_SHIFT) #define CGU_BASE_APB3_CLK_CLK_SEL(x) ((x) << CGU_BASE_APB3_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_LCD_CLK values ---------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_LCD_CLK_PD_SHIFT (0) #define CGU_BASE_LCD_CLK_PD_MASK (0x1 << CGU_BASE_LCD_CLK_PD_SHIFT) #define CGU_BASE_LCD_CLK_PD(x) ((x) << CGU_BASE_LCD_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_LCD_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_LCD_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_LCD_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_LCD_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_LCD_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_LCD_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_LCD_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_LCD_CLK_CLK_SEL_SHIFT) #define CGU_BASE_LCD_CLK_CLK_SEL(x) ((x) << CGU_BASE_LCD_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_VADC_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_VADC_CLK_PD_SHIFT (0) #define CGU_BASE_VADC_CLK_PD_MASK (0x1 << CGU_BASE_VADC_CLK_PD_SHIFT) #define CGU_BASE_VADC_CLK_PD(x) ((x) << CGU_BASE_VADC_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_VADC_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_VADC_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_VADC_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_VADC_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_VADC_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_VADC_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_VADC_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_VADC_CLK_CLK_SEL_SHIFT) #define CGU_BASE_VADC_CLK_CLK_SEL(x) ((x) << CGU_BASE_VADC_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_SDIO_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SDIO_CLK_PD_SHIFT (0) #define CGU_BASE_SDIO_CLK_PD_MASK (0x1 << CGU_BASE_SDIO_CLK_PD_SHIFT) #define CGU_BASE_SDIO_CLK_PD(x) ((x) << CGU_BASE_SDIO_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SDIO_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SDIO_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SDIO_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SDIO_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SDIO_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SDIO_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SDIO_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SDIO_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SDIO_CLK_CLK_SEL(x) ((x) << CGU_BASE_SDIO_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_SSP0_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SSP0_CLK_PD_SHIFT (0) #define CGU_BASE_SSP0_CLK_PD_MASK (0x1 << CGU_BASE_SSP0_CLK_PD_SHIFT) #define CGU_BASE_SSP0_CLK_PD(x) ((x) << CGU_BASE_SSP0_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SSP0_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SSP0_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SSP0_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SSP0_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SSP0_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SSP0_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SSP0_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SSP0_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SSP0_CLK_CLK_SEL(x) ((x) << CGU_BASE_SSP0_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_SSP1_CLK values --------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_SSP1_CLK_PD_SHIFT (0) #define CGU_BASE_SSP1_CLK_PD_MASK (0x1 << CGU_BASE_SSP1_CLK_PD_SHIFT) #define CGU_BASE_SSP1_CLK_PD(x) ((x) << CGU_BASE_SSP1_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_SSP1_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_SSP1_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_SSP1_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_SSP1_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_SSP1_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_SSP1_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_SSP1_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_SSP1_CLK_CLK_SEL_SHIFT) #define CGU_BASE_SSP1_CLK_CLK_SEL(x) ((x) << CGU_BASE_SSP1_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_UART0_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_UART0_CLK_PD_SHIFT (0) #define CGU_BASE_UART0_CLK_PD_MASK (0x1 << CGU_BASE_UART0_CLK_PD_SHIFT) #define CGU_BASE_UART0_CLK_PD(x) ((x) << CGU_BASE_UART0_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_UART0_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_UART0_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_UART0_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_UART0_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_UART0_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_UART0_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_UART0_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_UART0_CLK_CLK_SEL_SHIFT) #define CGU_BASE_UART0_CLK_CLK_SEL(x) ((x) << CGU_BASE_UART0_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_UART1_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_UART1_CLK_PD_SHIFT (0) #define CGU_BASE_UART1_CLK_PD_MASK (0x1 << CGU_BASE_UART1_CLK_PD_SHIFT) #define CGU_BASE_UART1_CLK_PD(x) ((x) << CGU_BASE_UART1_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_UART1_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_UART1_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_UART1_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_UART1_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_UART1_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_UART1_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_UART1_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_UART1_CLK_CLK_SEL_SHIFT) #define CGU_BASE_UART1_CLK_CLK_SEL(x) ((x) << CGU_BASE_UART1_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_UART2_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_UART2_CLK_PD_SHIFT (0) #define CGU_BASE_UART2_CLK_PD_MASK (0x1 << CGU_BASE_UART2_CLK_PD_SHIFT) #define CGU_BASE_UART2_CLK_PD(x) ((x) << CGU_BASE_UART2_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_UART2_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_UART2_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_UART2_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_UART2_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_UART2_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_UART2_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_UART2_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_UART2_CLK_CLK_SEL_SHIFT) #define CGU_BASE_UART2_CLK_CLK_SEL(x) ((x) << CGU_BASE_UART2_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_UART3_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_UART3_CLK_PD_SHIFT (0) #define CGU_BASE_UART3_CLK_PD_MASK (0x1 << CGU_BASE_UART3_CLK_PD_SHIFT) #define CGU_BASE_UART3_CLK_PD(x) ((x) << CGU_BASE_UART3_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_UART3_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_UART3_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_UART3_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_UART3_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_UART3_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_UART3_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_UART3_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_UART3_CLK_CLK_SEL_SHIFT) #define CGU_BASE_UART3_CLK_CLK_SEL(x) ((x) << CGU_BASE_UART3_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_OUT_CLK values ---------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_OUT_CLK_PD_SHIFT (0) #define CGU_BASE_OUT_CLK_PD_MASK (0x1 << CGU_BASE_OUT_CLK_PD_SHIFT) #define CGU_BASE_OUT_CLK_PD(x) ((x) << CGU_BASE_OUT_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_OUT_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_OUT_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_OUT_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_OUT_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_OUT_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_OUT_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_OUT_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_OUT_CLK_CLK_SEL_SHIFT) #define CGU_BASE_OUT_CLK_CLK_SEL(x) ((x) << CGU_BASE_OUT_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_AUDIO_CLK values -------------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_AUDIO_CLK_PD_SHIFT (0) #define CGU_BASE_AUDIO_CLK_PD_MASK (0x1 << CGU_BASE_AUDIO_CLK_PD_SHIFT) #define CGU_BASE_AUDIO_CLK_PD(x) ((x) << CGU_BASE_AUDIO_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_AUDIO_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_AUDIO_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_AUDIO_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_AUDIO_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_AUDIO_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_AUDIO_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_AUDIO_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_AUDIO_CLK_CLK_SEL_SHIFT) #define CGU_BASE_AUDIO_CLK_CLK_SEL(x) ((x) << CGU_BASE_AUDIO_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_CGU_OUT0_CLK values ----------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_CGU_OUT0_CLK_PD_SHIFT (0) #define CGU_BASE_CGU_OUT0_CLK_PD_MASK (0x1 << CGU_BASE_CGU_OUT0_CLK_PD_SHIFT) #define CGU_BASE_CGU_OUT0_CLK_PD(x) ((x) << CGU_BASE_CGU_OUT0_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_CGU_OUT0_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_CGU_OUT0_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_CGU_OUT0_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_CGU_OUT0_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_CGU_OUT0_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_CGU_OUT0_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_CGU_OUT0_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_CGU_OUT0_CLK_CLK_SEL_SHIFT) #define CGU_BASE_CGU_OUT0_CLK_CLK_SEL(x) ((x) << CGU_BASE_CGU_OUT0_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_CGU_OUT1_CLK values ----------------------------- */ /* PD: Output stage power down */ #define CGU_BASE_CGU_OUT1_CLK_PD_SHIFT (0) #define CGU_BASE_CGU_OUT1_CLK_PD_MASK (0x1 << CGU_BASE_CGU_OUT1_CLK_PD_SHIFT) #define CGU_BASE_CGU_OUT1_CLK_PD(x) ((x) << CGU_BASE_CGU_OUT1_CLK_PD_SHIFT) /* AUTOBLOCK: Block clock automatically during frequency change */ #define CGU_BASE_CGU_OUT1_CLK_AUTOBLOCK_SHIFT (11) #define CGU_BASE_CGU_OUT1_CLK_AUTOBLOCK_MASK (0x1 << CGU_BASE_CGU_OUT1_CLK_AUTOBLOCK_SHIFT) #define CGU_BASE_CGU_OUT1_CLK_AUTOBLOCK(x) ((x) << CGU_BASE_CGU_OUT1_CLK_AUTOBLOCK_SHIFT) /* CLK_SEL: Clock source selection */ #define CGU_BASE_CGU_OUT1_CLK_CLK_SEL_SHIFT (24) #define CGU_BASE_CGU_OUT1_CLK_CLK_SEL_MASK (0x1f << CGU_BASE_CGU_OUT1_CLK_CLK_SEL_SHIFT) #define CGU_BASE_CGU_OUT1_CLK_CLK_SEL(x) ((x) << CGU_BASE_CGU_OUT1_CLK_CLK_SEL_SHIFT) /* --- CGU_BASE_x_CLK clock sources --------------------------------------- */ #define CGU_SRC_32K 0x00 #define CGU_SRC_IRC 0x01 #define CGU_SRC_ENET_RX 0x02 #define CGU_SRC_ENET_TX 0x03 #define CGU_SRC_GP_CLKIN 0x04 #define CGU_SRC_XTAL 0x06 #define CGU_SRC_PLL0USB 0x07 #define CGU_SRC_PLL0AUDIO 0x08 #define CGU_SRC_PLL1 0x09 #define CGU_SRC_IDIVA 0x0C #define CGU_SRC_IDIVB 0x0D #define CGU_SRC_IDIVC 0x0E #define CGU_SRC_IDIVD 0x0F #define CGU_SRC_IDIVE 0x10 /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/creg.h ================================================ /** @defgroup creg_defines Configuration Registers Defines @brief Defined Constants and Types for the LPC43xx Configuration Registers @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_CREG_H #define LPC43XX_CREG_H /**@{*/ #include #include /* --- CREG registers ----------------------------------------------------- */ /* * Chip configuration register 32 kHz oscillator output and BOD control * register */ #define CREG_CREG0 MMIO32(CREG_BASE + 0x004) /* ARM Cortex-M4 memory mapping */ #define CREG_M4MEMMAP MMIO32(CREG_BASE + 0x100) /* Chip configuration register 1 */ #define CREG_CREG1 MMIO32(CREG_BASE + 0x108) /* Chip configuration register 2 */ #define CREG_CREG2 MMIO32(CREG_BASE + 0x10C) /* Chip configuration register 3 */ #define CREG_CREG3 MMIO32(CREG_BASE + 0x110) /* Chip configuration register 4 */ #define CREG_CREG4 MMIO32(CREG_BASE + 0x114) /* Chip configuration register 5 */ #define CREG_CREG5 MMIO32(CREG_BASE + 0x118) /* DMA muxing control */ #define CREG_DMAMUX MMIO32(CREG_BASE + 0x11C) /* Flash accelerator configuration register for flash bank A */ #define CREG_FLASHCFGA MMIO32(CREG_BASE + 0x120) /* Flash accelerator configuration register for flash bank B */ #define CREG_FLASHCFGB MMIO32(CREG_BASE + 0x124) /* ETB RAM configuration */ #define CREG_ETBCFG MMIO32(CREG_BASE + 0x128) /* * Chip configuration register 6. Controls multiple functions: Ethernet * interface, SCT output, I2S0/1 inputs, EMC clock. */ #define CREG_CREG6 MMIO32(CREG_BASE + 0x12C) /* Cortex-M4 TXEV event clear */ #define CREG_M4TXEVENT MMIO32(CREG_BASE + 0x130) /* Part ID (Boundary scan ID code, read-only) */ #define CREG_CHIPID MMIO32(CREG_BASE + 0x200) /* Cortex-M0 TXEV event clear */ #define CREG_M0TXEVENT MMIO32(CREG_BASE + 0x400) /* ARM Cortex-M0 memory mapping */ #define CREG_M0APPMEMMAP MMIO32(CREG_BASE + 0x404) /* USB0 frame length adjust register */ #define CREG_USB0FLADJ MMIO32(CREG_BASE + 0x500) /* USB1 frame length adjust register */ #define CREG_USB1FLADJ MMIO32(CREG_BASE + 0x600) /* --- CREG_CREG0 values ---------------------------------------- */ /* EN1KHZ: Enable 1 kHz output */ #define CREG_CREG0_EN1KHZ_SHIFT (0) #define CREG_CREG0_EN1KHZ (1 << CREG_CREG0_EN1KHZ_SHIFT) /* EN32KHZ: Enable 32 kHz output */ #define CREG_CREG0_EN32KHZ_SHIFT (1) #define CREG_CREG0_EN32KHZ (1 << CREG_CREG0_EN32KHZ_SHIFT) /* RESET32KHZ: 32 kHz oscillator reset */ #define CREG_CREG0_RESET32KHZ_SHIFT (2) #define CREG_CREG0_RESET32KHZ (1 << CREG_CREG0_RESET32KHZ_SHIFT) /* PD32KHZ: 32 kHz power control */ #define CREG_CREG0_PD32KHZ_SHIFT (3) #define CREG_CREG0_PD32KHZ (1 << CREG_CREG0_PD32KHZ_SHIFT) /* USB0PHY: USB0 PHY power control */ #define CREG_CREG0_USB0PHY_SHIFT (5) #define CREG_CREG0_USB0PHY (1 << CREG_CREG0_USB0PHY_SHIFT) /* ALARMCTRL: RTC_ALARM pin output control */ #define CREG_CREG0_ALARMCTRL_SHIFT (6) #define CREG_CREG0_ALARMCTRL_MASK (0x3 << CREG_CREG0_ALARMCTRL_SHIFT) #define CREG_CREG0_ALARMCTRL(x) ((x) << CREG_CREG0_ALARMCTRL_SHIFT) /* BODLVL1: BOD trip level to generate an interrupt */ #define CREG_CREG0_BODLVL1_SHIFT (8) #define CREG_CREG0_BODLVL1_MASK (0x3 << CREG_CREG0_BODLVL1_SHIFT) #define CREG_CREG0_BODLVL1(x) ((x) << CREG_CREG0_BODLVL1_SHIFT) /* BODLVL2: BOD trip level to generate a reset */ #define CREG_CREG0_BODLVL2_SHIFT (10) #define CREG_CREG0_BODLVL2_MASK (0x3 << CREG_CREG0_BODLVL2_SHIFT) #define CREG_CREG0_BODLVL2(x) ((x) << CREG_CREG0_BODLVL2_SHIFT) /* SAMPLECTRL: SAMPLE pin input/output control */ #define CREG_CREG0_SAMPLECTRL_SHIFT (12) #define CREG_CREG0_SAMPLECTRL_MASK (0x3 << CREG_CREG0_SAMPLECTRL_SHIFT) #define CREG_CREG0_SAMPLECTRL(x) ((x) << CREG_CREG0_SAMPLECTRL_SHIFT) /* WAKEUP0CTRL: WAKEUP0 pin input/output control */ #define CREG_CREG0_WAKEUP0CTRL_SHIFT (14) #define CREG_CREG0_WAKEUP0CTRL_MASK (0x3 << CREG_CREG0_WAKEUP0CTRL_SHIFT) #define CREG_CREG0_WAKEUP0CTRL(x) ((x) << CREG_CREG0_WAKEUP0CTRL_SHIFT) /* WAKEUP1CTRL: WAKEUP1 pin input/output control */ #define CREG_CREG0_WAKEUP1CTRL_SHIFT (16) #define CREG_CREG0_WAKEUP1CTRL_MASK (0x3 << CREG_CREG0_WAKEUP1CTRL_SHIFT) #define CREG_CREG0_WAKEUP1CTRL(x) ((x) << CREG_CREG0_WAKEUP1CTRL_SHIFT) /* --- CREG_M4MEMMAP values ------------------------------------- */ /* M4MAP: Shadow address when accessing memory at address 0x00000000 */ #define CREG_M4MEMMAP_M4MAP_SHIFT (12) #define CREG_M4MEMMAP_M4MAP_MASK (0xfffff << CREG_M4MEMMAP_M4MAP_SHIFT) #define CREG_M4MEMMAP_M4MAP(x) ((x) << CREG_M4MEMMAP_M4MAP_SHIFT) /* --- CREG_CREG5 values ---------------------------------------- */ /* M4TAPSEL: JTAG debug select for M4 core */ #define CREG_CREG5_M4TAPSEL_SHIFT (6) #define CREG_CREG5_M4TAPSEL (1 << CREG_CREG5_M4TAPSEL_SHIFT) /* M0APPTAPSEL: JTAG debug select for M0 co-processor */ #define CREG_CREG5_M0APPTAPSEL_SHIFT (9) #define CREG_CREG5_M0APPTAPSEL (1 << CREG_CREG5_M0APPTAPSEL_SHIFT) /* --- CREG_DMAMUX values --------------------------------------- */ /* DMAMUXPER0: Select DMA to peripheral connection for DMA peripheral 0 */ #define CREG_DMAMUX_DMAMUXPER0_SHIFT (0) #define CREG_DMAMUX_DMAMUXPER0_MASK (0x3 << CREG_DMAMUX_DMAMUXPER0_SHIFT) #define CREG_DMAMUX_DMAMUXPER0(x) ((x) << CREG_DMAMUX_DMAMUXPER0_SHIFT) /* DMAMUXPER1: Select DMA to peripheral connection for DMA peripheral 1 */ #define CREG_DMAMUX_DMAMUXPER1_SHIFT (2) #define CREG_DMAMUX_DMAMUXPER1_MASK (0x3 << CREG_DMAMUX_DMAMUXPER1_SHIFT) #define CREG_DMAMUX_DMAMUXPER1(x) ((x) << CREG_DMAMUX_DMAMUXPER1_SHIFT) /* DMAMUXPER2: Select DMA to peripheral connection for DMA peripheral 2 */ #define CREG_DMAMUX_DMAMUXPER2_SHIFT (4) #define CREG_DMAMUX_DMAMUXPER2_MASK (0x3 << CREG_DMAMUX_DMAMUXPER2_SHIFT) #define CREG_DMAMUX_DMAMUXPER2(x) ((x) << CREG_DMAMUX_DMAMUXPER2_SHIFT) /* DMAMUXPER3: Select DMA to peripheral connection for DMA peripheral 3 */ #define CREG_DMAMUX_DMAMUXPER3_SHIFT (6) #define CREG_DMAMUX_DMAMUXPER3_MASK (0x3 << CREG_DMAMUX_DMAMUXPER3_SHIFT) #define CREG_DMAMUX_DMAMUXPER3(x) ((x) << CREG_DMAMUX_DMAMUXPER3_SHIFT) /* DMAMUXPER4: Select DMA to peripheral connection for DMA peripheral 4 */ #define CREG_DMAMUX_DMAMUXPER4_SHIFT (8) #define CREG_DMAMUX_DMAMUXPER4_MASK (0x3 << CREG_DMAMUX_DMAMUXPER4_SHIFT) #define CREG_DMAMUX_DMAMUXPER4(x) ((x) << CREG_DMAMUX_DMAMUXPER4_SHIFT) /* DMAMUXPER5: Select DMA to peripheral connection for DMA peripheral 5 */ #define CREG_DMAMUX_DMAMUXPER5_SHIFT (10) #define CREG_DMAMUX_DMAMUXPER5_MASK (0x3 << CREG_DMAMUX_DMAMUXPER5_SHIFT) #define CREG_DMAMUX_DMAMUXPER5(x) ((x) << CREG_DMAMUX_DMAMUXPER5_SHIFT) /* DMAMUXPER6: Select DMA to peripheral connection for DMA peripheral 6 */ #define CREG_DMAMUX_DMAMUXPER6_SHIFT (12) #define CREG_DMAMUX_DMAMUXPER6_MASK (0x3 << CREG_DMAMUX_DMAMUXPER6_SHIFT) #define CREG_DMAMUX_DMAMUXPER6(x) ((x) << CREG_DMAMUX_DMAMUXPER6_SHIFT) /* DMAMUXPER7: Select DMA to peripheral connection for DMA peripheral 7 */ #define CREG_DMAMUX_DMAMUXPER7_SHIFT (14) #define CREG_DMAMUX_DMAMUXPER7_MASK (0x3 << CREG_DMAMUX_DMAMUXPER7_SHIFT) #define CREG_DMAMUX_DMAMUXPER7(x) ((x) << CREG_DMAMUX_DMAMUXPER7_SHIFT) /* DMAMUXPER8: Select DMA to peripheral connection for DMA peripheral 8 */ #define CREG_DMAMUX_DMAMUXPER8_SHIFT (16) #define CREG_DMAMUX_DMAMUXPER8_MASK (0x3 << CREG_DMAMUX_DMAMUXPER8_SHIFT) #define CREG_DMAMUX_DMAMUXPER8(x) ((x) << CREG_DMAMUX_DMAMUXPER8_SHIFT) /* DMAMUXPER9: Select DMA to peripheral connection for DMA peripheral 9 */ #define CREG_DMAMUX_DMAMUXPER9_SHIFT (18) #define CREG_DMAMUX_DMAMUXPER9_MASK (0x3 << CREG_DMAMUX_DMAMUXPER9_SHIFT) #define CREG_DMAMUX_DMAMUXPER9(x) ((x) << CREG_DMAMUX_DMAMUXPER9_SHIFT) /* DMAMUXPER10: Select DMA to peripheral connection for DMA peripheral 10 */ #define CREG_DMAMUX_DMAMUXPER10_SHIFT (20) #define CREG_DMAMUX_DMAMUXPER10_MASK (0x3 << CREG_DMAMUX_DMAMUXPER10_SHIFT) #define CREG_DMAMUX_DMAMUXPER10(x) ((x) << CREG_DMAMUX_DMAMUXPER10_SHIFT) /* DMAMUXPER11: Select DMA to peripheral connection for DMA peripheral 11 */ #define CREG_DMAMUX_DMAMUXPER11_SHIFT (22) #define CREG_DMAMUX_DMAMUXPER11_MASK (0x3 << CREG_DMAMUX_DMAMUXPER11_SHIFT) #define CREG_DMAMUX_DMAMUXPER11(x) ((x) << CREG_DMAMUX_DMAMUXPER11_SHIFT) /* DMAMUXPER12: Select DMA to peripheral connection for DMA peripheral 12 */ #define CREG_DMAMUX_DMAMUXPER12_SHIFT (24) #define CREG_DMAMUX_DMAMUXPER12_MASK (0x3 << CREG_DMAMUX_DMAMUXPER12_SHIFT) #define CREG_DMAMUX_DMAMUXPER12(x) ((x) << CREG_DMAMUX_DMAMUXPER12_SHIFT) /* DMAMUXPER13: Select DMA to peripheral connection for DMA peripheral 13 */ #define CREG_DMAMUX_DMAMUXPER13_SHIFT (26) #define CREG_DMAMUX_DMAMUXPER13_MASK (0x3 << CREG_DMAMUX_DMAMUXPER13_SHIFT) #define CREG_DMAMUX_DMAMUXPER13(x) ((x) << CREG_DMAMUX_DMAMUXPER13_SHIFT) /* DMAMUXPER14: Select DMA to peripheral connection for DMA peripheral 14 */ #define CREG_DMAMUX_DMAMUXPER14_SHIFT (28) #define CREG_DMAMUX_DMAMUXPER14_MASK (0x3 << CREG_DMAMUX_DMAMUXPER14_SHIFT) #define CREG_DMAMUX_DMAMUXPER14(x) ((x) << CREG_DMAMUX_DMAMUXPER14_SHIFT) /* DMAMUXPER15: Select DMA to peripheral connection for DMA peripheral 15 */ #define CREG_DMAMUX_DMAMUXPER15_SHIFT (30) #define CREG_DMAMUX_DMAMUXPER15_MASK (0x3 << CREG_DMAMUX_DMAMUXPER15_SHIFT) #define CREG_DMAMUX_DMAMUXPER15(x) ((x) << CREG_DMAMUX_DMAMUXPER15_SHIFT) /* --- CREG_FLASHCFGA values ------------------------------------ */ /* FLASHTIM: Flash access time. The value of this field plus 1 gives the number * of BASE_M4_CLK clocks used for a flash access */ #define CREG_FLASHCFGA_FLASHTIM_SHIFT (12) #define CREG_FLASHCFGA_FLASHTIM_MASK (0xf << CREG_FLASHCFGA_FLASHTIM_SHIFT) #define CREG_FLASHCFGA_FLASHTIM(x) ((x) << CREG_FLASHCFGA_FLASHTIM_SHIFT) /* POW: Flash bank A power control */ #define CREG_FLASHCFGA_POW_SHIFT (31) #define CREG_FLASHCFGA_POW (1 << CREG_FLASHCFGA_POW_SHIFT) /* --- CREG_FLASHCFGB values ------------------------------------ */ /* FLASHTIM: Flash access time. The value of this field plus 1 gives the number * of BASE_M4_CLK clocks used for a flash access */ #define CREG_FLASHCFGB_FLASHTIM_SHIFT (12) #define CREG_FLASHCFGB_FLASHTIM_MASK (0xf << CREG_FLASHCFGB_FLASHTIM_SHIFT) #define CREG_FLASHCFGB_FLASHTIM(x) ((x) << CREG_FLASHCFGB_FLASHTIM_SHIFT) /* POW: Flash bank B power control */ #define CREG_FLASHCFGB_POW_SHIFT (31) #define CREG_FLASHCFGB_POW (1 << CREG_FLASHCFGB_POW_SHIFT) /* --- CREG_ETBCFG values --------------------------------------- */ /* ETB: Select SRAM interface */ #define CREG_ETBCFG_ETB_SHIFT (0) #define CREG_ETBCFG_ETB (1 << CREG_ETBCFG_ETB_SHIFT) /* --- CREG_CREG6 values ---------------------------------------- */ /* ETHMODE: Selects the Ethernet mode. Reset the ethernet after changing the * PHY interface */ #define CREG_CREG6_ETHMODE_SHIFT (0) #define CREG_CREG6_ETHMODE_MASK (0x7 << CREG_CREG6_ETHMODE_SHIFT) #define CREG_CREG6_ETHMODE(x) ((x) << CREG_CREG6_ETHMODE_SHIFT) /* CTOUTCTRL: Selects the functionality of the SCT outputs */ #define CREG_CREG6_CTOUTCTRL_SHIFT (4) #define CREG_CREG6_CTOUTCTRL (1 << CREG_CREG6_CTOUTCTRL_SHIFT) /* I2S0_TX_SCK_IN_SEL: I2S0_TX_SCK input select */ #define CREG_CREG6_I2S0_TX_SCK_IN_SEL_SHIFT (12) #define CREG_CREG6_I2S0_TX_SCK_IN_SEL (1 << CREG_CREG6_I2S0_TX_SCK_IN_SEL_SHIFT) /* I2S0_RX_SCK_IN_SEL: I2S0_RX_SCK input select */ #define CREG_CREG6_I2S0_RX_SCK_IN_SEL_SHIFT (13) #define CREG_CREG6_I2S0_RX_SCK_IN_SEL (1 << CREG_CREG6_I2S0_RX_SCK_IN_SEL_SHIFT) /* I2S1_TX_SCK_IN_SEL: I2S1_TX_SCK input select */ #define CREG_CREG6_I2S1_TX_SCK_IN_SEL_SHIFT (14) #define CREG_CREG6_I2S1_TX_SCK_IN_SEL (1 << CREG_CREG6_I2S1_TX_SCK_IN_SEL_SHIFT) /* I2S1_RX_SCK_IN_SEL: I2S1_RX_SCK input select */ #define CREG_CREG6_I2S1_RX_SCK_IN_SEL_SHIFT (15) #define CREG_CREG6_I2S1_RX_SCK_IN_SEL (1 << CREG_CREG6_I2S1_RX_SCK_IN_SEL_SHIFT) /* EMC_CLK_SEL: EMC_CLK divided clock select */ #define CREG_CREG6_EMC_CLK_SEL_SHIFT (16) #define CREG_CREG6_EMC_CLK_SEL (1 << CREG_CREG6_EMC_CLK_SEL_SHIFT) /* --- CREG_M4TXEVENT values ------------------------------------ */ /* TXEVCLR: Cortex-M4 TXEV event */ #define CREG_M4TXEVENT_TXEVCLR_SHIFT (0) #define CREG_M4TXEVENT_TXEVCLR (1 << CREG_M4TXEVENT_TXEVCLR_SHIFT) /* --- CREG_M0TXEVENT values ------------------------------------ */ /* TXEVCLR: Cortex-M0 TXEV event */ #define CREG_M0TXEVENT_TXEVCLR_SHIFT (0) #define CREG_M0TXEVENT_TXEVCLR (1 << CREG_M0TXEVENT_TXEVCLR_SHIFT) /* --- CREG_M0APPMEMMAP values ---------------------------------- */ /* M0APPMAP: Shadow address when accessing memory at address 0x00000000 */ #define CREG_M0APPMEMMAP_M0APPMAP_SHIFT (12) #define CREG_M0APPMEMMAP_M0APPMAP_MASK \ (0xfffff << CREG_M0APPMEMMAP_M0APPMAP_SHIFT) #define CREG_M0APPMEMMAP_M0APPMAP(x) ((x) << CREG_M0APPMEMMAP_M0APPMAP_SHIFT) /* --- CREG_USB0FLADJ values ------------------------------------ */ /* FLTV: Frame length timing value */ #define CREG_USB0FLADJ_FLTV_SHIFT (0) #define CREG_USB0FLADJ_FLTV_MASK (0x3f << CREG_USB0FLADJ_FLTV_SHIFT) #define CREG_USB0FLADJ_FLTV(x) ((x) << CREG_USB0FLADJ_FLTV_SHIFT) /* --- CREG_USB1FLADJ values ------------------------------------ */ /* FLTV: Frame length timing value */ #define CREG_USB1FLADJ_FLTV_SHIFT (0) #define CREG_USB1FLADJ_FLTV_MASK (0x3f << CREG_USB1FLADJ_FLTV_SHIFT) #define CREG_USB1FLADJ_FLTV(x) ((x) << CREG_USB1FLADJ_FLTV_SHIFT) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/doc-lpc43xx.h ================================================ /** @mainpage libopencm3 LPC43xx @version 1.0.0 @date 14 September 2012 API documentation for NXP Semiconductors LPC43xx Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup LPC43xx LPC43xx Libraries for NXP Semiconductors LPC43xx series. @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup LPC43xx_defines LPC43xx Defines @brief Defined Constants and Types for the LPC43xx series @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/eventrouter.h ================================================ /** @defgroup eventrouter_defines Event Router Defines @brief Defined Constants and Types for the LPC43xx Event Router @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_EVENTROUTER_H #define LPC43XX_EVENTROUTER_H /**@{*/ #include #include /* --- Event Router registers ---------------------------------------------- */ /* Level configuration register */ #define EVENTROUTER_HILO MMIO32(EVENTROUTER_BASE + 0x000) /* Edge configuration */ #define EVENTROUTER_EDGE MMIO32(EVENTROUTER_BASE + 0x004) /* Clear event enable register */ #define EVENTROUTER_CLR_EN MMIO32(EVENTROUTER_BASE + 0xFD8) /* Set event enable register */ #define EVENTROUTER_SET_EN MMIO32(EVENTROUTER_BASE + 0xFDC) /* Event Status register */ #define EVENTROUTER_STATUS MMIO32(EVENTROUTER_BASE + 0xFE0) /* Event Enable register */ #define EVENTROUTER_ENABLE MMIO32(EVENTROUTER_BASE + 0xFE4) /* Clear event status register */ #define EVENTROUTER_CLR_STAT MMIO32(EVENTROUTER_BASE + 0xFE8) /* Set event status register */ #define EVENTROUTER_SET_STAT MMIO32(EVENTROUTER_BASE + 0xFEC) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/gima.h ================================================ /** @defgroup gima_defines Global Input Multiplexer Array Defines @brief Defined Constants and Types for the LPC43xx Global Input Multiplexer Array @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_GIMA_H #define LPC43XX_GIMA_H /**@{*/ #include #include /* --- GIMA registers ----------------------------------------------------- */ /* Timer 0 CAP0_0 capture input multiplexer (GIMA output 0) */ #define GIMA_CAP0_0_IN MMIO32(GIMA_BASE + 0x000) /* Timer 0 CAP0_1 capture input multiplexer (GIMA output 1) */ #define GIMA_CAP0_1_IN MMIO32(GIMA_BASE + 0x004) /* Timer 0 CAP0_2 capture input multiplexer (GIMA output 2) */ #define GIMA_CAP0_2_IN MMIO32(GIMA_BASE + 0x008) /* Timer 0 CAP0_3 capture input multiplexer (GIMA output 3) */ #define GIMA_CAP0_3_IN MMIO32(GIMA_BASE + 0x00C) /* Timer 1 CAP1_0 capture input multiplexer (GIMA output 4) */ #define GIMA_CAP1_0_IN MMIO32(GIMA_BASE + 0x010) /* Timer 1 CAP1_1 capture input multiplexer (GIMA output 5) */ #define GIMA_CAP1_1_IN MMIO32(GIMA_BASE + 0x014) /* Timer 1 CAP1_2 capture input multiplexer (GIMA output 6) */ #define GIMA_CAP1_2_IN MMIO32(GIMA_BASE + 0x018) /* Timer 1 CAP1_3 capture input multiplexer (GIMA output 7) */ #define GIMA_CAP1_3_IN MMIO32(GIMA_BASE + 0x01C) /* Timer 2 CAP2_0 capture input multiplexer (GIMA output 8) */ #define GIMA_CAP2_0_IN MMIO32(GIMA_BASE + 0x020) /* Timer 2 CAP2_1 capture input multiplexer (GIMA output 9) */ #define GIMA_CAP2_1_IN MMIO32(GIMA_BASE + 0x024) /* Timer 2 CAP2_2 capture input multiplexer (GIMA output 10) */ #define GIMA_CAP2_2_IN MMIO32(GIMA_BASE + 0x028) /* Timer 2 CAP2_3 capture input multiplexer (GIMA output 11) */ #define GIMA_CAP2_3_IN MMIO32(GIMA_BASE + 0x02C) /* Timer 3 CAP3_0 capture input multiplexer (GIMA output 12) */ #define GIMA_CAP3_0_IN MMIO32(GIMA_BASE + 0x030) /* Timer 3 CAP3_1 capture input multiplexer (GIMA output 13) */ #define GIMA_CAP3_1_IN MMIO32(GIMA_BASE + 0x034) /* Timer 3 CAP3_2 capture input multiplexer (GIMA output 14) */ #define GIMA_CAP3_2_IN MMIO32(GIMA_BASE + 0x038) /* Timer 3 CAP3_3 capture input multiplexer (GIMA output 15) */ #define GIMA_CAP3_3_IN MMIO32(GIMA_BASE + 0x03C) /* SCT CTIN_0 capture input multiplexer (GIMA output 16) */ #define GIMA_CTIN_0_IN MMIO32(GIMA_BASE + 0x040) /* SCT CTIN_1 capture input multiplexer (GIMA output 17) */ #define GIMA_CTIN_1_IN MMIO32(GIMA_BASE + 0x044) /* SCT CTIN_2 capture input multiplexer (GIMA output 18) */ #define GIMA_CTIN_2_IN MMIO32(GIMA_BASE + 0x048) /* SCT CTIN_3 capture input multiplexer (GIMA output 19) */ #define GIMA_CTIN_3_IN MMIO32(GIMA_BASE + 0x04C) /* SCT CTIN_4 capture input multiplexer (GIMA output 20) */ #define GIMA_CTIN_4_IN MMIO32(GIMA_BASE + 0x050) /* SCT CTIN_5 capture input multiplexer (GIMA output 21) */ #define GIMA_CTIN_5_IN MMIO32(GIMA_BASE + 0x054) /* SCT CTIN_6 capture input multiplexer (GIMA output 22) */ #define GIMA_CTIN_6_IN MMIO32(GIMA_BASE + 0x058) /* SCT CTIN_7 capture input multiplexer (GIMA output 23) */ #define GIMA_CTIN_7_IN MMIO32(GIMA_BASE + 0x05C) /* VADC trigger input multiplexer (GIMA output 24) */ #define GIMA_VADC_TRIGGER_IN MMIO32(GIMA_BASE + 0x060) /* Event router input 13 multiplexer (GIMA output 25) */ #define GIMA_EVENTROUTER_13_IN MMIO32(GIMA_BASE + 0x064) /* Event router input 14 multiplexer (GIMA output 26) */ #define GIMA_EVENTROUTER_14_IN MMIO32(GIMA_BASE + 0x068) /* Event router input 16 multiplexer (GIMA output 27) */ #define GIMA_EVENTROUTER_16_IN MMIO32(GIMA_BASE + 0x06C) /* ADC start0 input multiplexer (GIMA output 28) */ #define GIMA_ADCSTART0_IN MMIO32(GIMA_BASE + 0x070) /* ADC start1 input multiplexer (GIMA output 29) */ #define GIMA_ADCSTART1_IN MMIO32(GIMA_BASE + 0x074) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/gpdma.h ================================================ /** @defgroup gpdma_defines General Purpose DMA Defines * * @brief Defined Constants and Types for the LPC43xx General Purpose DMA * * @ingroup LPC43xx_defines * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2012 Michael Ossmann * * @date 10 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_GPDMA_H #define LPC43XX_GPDMA_H /**@{*/ #include #include typedef struct gpdma_lli_t gpdma_lli_t; struct gpdma_lli_t { void* csrcaddr; void* cdestaddr; uint32_t clli; uint32_t ccontrol; }; /* --- GPDMA registers ----------------------------------------------------- */ /* General registers */ /* DMA Interrupt Status Register */ #define GPDMA_INTSTAT MMIO32(GPDMA_BASE + 0x000) /* DMA Interrupt Terminal Count Request Status Register */ #define GPDMA_INTTCSTAT MMIO32(GPDMA_BASE + 0x004) /* DMA Interrupt Terminal Count Request Clear Register */ #define GPDMA_INTTCCLEAR MMIO32(GPDMA_BASE + 0x008) /* DMA Interrupt Error Status Register */ #define GPDMA_INTERRSTAT MMIO32(GPDMA_BASE + 0x00C) /* DMA Interrupt Error Clear Register */ #define GPDMA_INTERRCLR MMIO32(GPDMA_BASE + 0x010) /* DMA Raw Interrupt Terminal Count Status Register */ #define GPDMA_RAWINTTCSTAT MMIO32(GPDMA_BASE + 0x014) /* DMA Raw Error Interrupt Status Register */ #define GPDMA_RAWINTERRSTAT MMIO32(GPDMA_BASE + 0x018) /* DMA Enabled Channel Register */ #define GPDMA_ENBLDCHNS MMIO32(GPDMA_BASE + 0x01C) /* DMA Software Burst Request Register */ #define GPDMA_SOFTBREQ MMIO32(GPDMA_BASE + 0x020) /* DMA Software Single Request Register */ #define GPDMA_SOFTSREQ MMIO32(GPDMA_BASE + 0x024) /* DMA Software Last Burst Request Register */ #define GPDMA_SOFTLBREQ MMIO32(GPDMA_BASE + 0x028) /* DMA Software Last Single Request Register */ #define GPDMA_SOFTLSREQ MMIO32(GPDMA_BASE + 0x02C) /* DMA Configuration Register */ #define GPDMA_CONFIG MMIO32(GPDMA_BASE + 0x030) /* DMA Synchronization Register */ #define GPDMA_SYNC MMIO32(GPDMA_BASE + 0x034) /* Channel registers */ /* Source Address Register */ #define GPDMA_CSRCADDR(channel) MMIO32(GPDMA_BASE + 0x100 + \ (channel * 0x20)) #define GPDMA_C0SRCADDR GPDMA_CSRCADDR(0) #define GPDMA_C1SRCADDR GPDMA_CSRCADDR(1) #define GPDMA_C2SRCADDR GPDMA_CSRCADDR(2) #define GPDMA_C3SRCADDR GPDMA_CSRCADDR(3) #define GPDMA_C4SRCADDR GPDMA_CSRCADDR(4) #define GPDMA_C5SRCADDR GPDMA_CSRCADDR(5) #define GPDMA_C6SRCADDR GPDMA_CSRCADDR(6) #define GPDMA_C7SRCADDR GPDMA_CSRCADDR(7) /* Destination Address Register */ #define GPDMA_CDESTADDR(channel) MMIO32(GPDMA_BASE + 0x104 + \ (channel * 0x20)) #define GPDMA_C0DESTADDR GPDMA_CDESTADDR(0) #define GPDMA_C1DESTADDR GPDMA_CDESTADDR(1) #define GPDMA_C2DESTADDR GPDMA_CDESTADDR(2) #define GPDMA_C3DESTADDR GPDMA_CDESTADDR(3) #define GPDMA_C4DESTADDR GPDMA_CDESTADDR(4) #define GPDMA_C5DESTADDR GPDMA_CDESTADDR(5) #define GPDMA_C6DESTADDR GPDMA_CDESTADDR(6) #define GPDMA_C7DESTADDR GPDMA_CDESTADDR(7) /* Linked List Item Register */ #define GPDMA_CLLI(channel) MMIO32(GPDMA_BASE + 0x108 + \ (channel * 0x20)) #define GPDMA_C0LLI GPDMA_CLLI(0) #define GPDMA_C1LLI GPDMA_CLLI(1) #define GPDMA_C2LLI GPDMA_CLLI(2) #define GPDMA_C3LLI GPDMA_CLLI(3) #define GPDMA_C4LLI GPDMA_CLLI(4) #define GPDMA_C5LLI GPDMA_CLLI(5) #define GPDMA_C6LLI GPDMA_CLLI(6) #define GPDMA_C7LLI GPDMA_CLLI(7) /* Control Register */ #define GPDMA_CCONTROL(channel) MMIO32(GPDMA_BASE + 0x10C + \ (channel * 0x20)) #define GPDMA_C0CONTROL GPDMA_CCONTROL(0) #define GPDMA_C1CONTROL GPDMA_CCONTROL(1) #define GPDMA_C2CONTROL GPDMA_CCONTROL(2) #define GPDMA_C3CONTROL GPDMA_CCONTROL(3) #define GPDMA_C4CONTROL GPDMA_CCONTROL(4) #define GPDMA_C5CONTROL GPDMA_CCONTROL(5) #define GPDMA_C6CONTROL GPDMA_CCONTROL(6) #define GPDMA_C7CONTROL GPDMA_CCONTROL(7) /* Configuration Register */ #define GPDMA_CCONFIG(channel) MMIO32(GPDMA_BASE + 0x110 + \ (channel * 0x20)) #define GPDMA_C0CONFIG GPDMA_CCONFIG(0) #define GPDMA_C1CONFIG GPDMA_CCONFIG(1) #define GPDMA_C2CONFIG GPDMA_CCONFIG(2) #define GPDMA_C3CONFIG GPDMA_CCONFIG(3) #define GPDMA_C4CONFIG GPDMA_CCONFIG(4) #define GPDMA_C5CONFIG GPDMA_CCONFIG(5) #define GPDMA_C6CONFIG GPDMA_CCONFIG(6) #define GPDMA_C7CONFIG GPDMA_CCONFIG(7) /* --- Common fields -------------------------------------------- */ #define GPDMA_CSRCADDR_SRCADDR_SHIFT (0) #define GPDMA_CSRCADDR_SRCADDR_MASK (0xffffffff << GPDMA_CSRCADDR_SRCADDR_SHIFT) #define GPDMA_CSRCADDR_SRCADDR(x) ((x) << GPDMA_CSRCADDR_SRCADDR_SHIFT) #define GPDMA_CDESTADDR_DESTADDR_SHIFT (0) #define GPDMA_CDESTADDR_DESTADDR_MASK \ (0xffffffff << GPDMA_CDESTADDR_DESTADDR_SHIFT) #define GPDMA_CDESTADDR_DESTADDR(x) ((x) << GPDMA_CDESTADDR_DESTADDR_SHIFT) #define GPDMA_CLLI_LM_SHIFT (0) #define GPDMA_CLLI_LM_MASK (0x1 << GPDMA_CLLI_LM_SHIFT) #define GPDMA_CLLI_LM(x) ((x) << GPDMA_CLLI_LM_SHIFT) #define GPDMA_CLLI_LLI_SHIFT (2) #define GPDMA_CLLI_LLI_MASK (0x3fffffff << GPDMA_CLLI_LLI_SHIFT) #define GPDMA_CLLI_LLI(x) ((x) << GPDMA_CLLI_LLI_SHIFT) #define GPDMA_CCONTROL_TRANSFERSIZE_SHIFT (0) #define GPDMA_CCONTROL_TRANSFERSIZE_MASK \ (0xfff << GPDMA_CCONTROL_TRANSFERSIZE_SHIFT) #define GPDMA_CCONTROL_TRANSFERSIZE(x) \ ((x) << GPDMA_CCONTROL_TRANSFERSIZE_SHIFT) #define GPDMA_CCONTROL_SBSIZE_SHIFT (12) #define GPDMA_CCONTROL_SBSIZE_MASK (0x7 << GPDMA_CCONTROL_SBSIZE_SHIFT) #define GPDMA_CCONTROL_SBSIZE(x) ((x) << GPDMA_CCONTROL_SBSIZE_SHIFT) #define GPDMA_CCONTROL_DBSIZE_SHIFT (15) #define GPDMA_CCONTROL_DBSIZE_MASK (0x7 << GPDMA_CCONTROL_DBSIZE_SHIFT) #define GPDMA_CCONTROL_DBSIZE(x) ((x) << GPDMA_CCONTROL_DBSIZE_SHIFT) #define GPDMA_CCONTROL_SWIDTH_SHIFT (18) #define GPDMA_CCONTROL_SWIDTH_MASK (0x7 << GPDMA_CCONTROL_SWIDTH_SHIFT) #define GPDMA_CCONTROL_SWIDTH(x) ((x) << GPDMA_CCONTROL_SWIDTH_SHIFT) #define GPDMA_CCONTROL_DWIDTH_SHIFT (21) #define GPDMA_CCONTROL_DWIDTH_MASK (0x7 << GPDMA_CCONTROL_DWIDTH_SHIFT) #define GPDMA_CCONTROL_DWIDTH(x) ((x) << GPDMA_CCONTROL_DWIDTH_SHIFT) #define GPDMA_CCONTROL_S_SHIFT (24) #define GPDMA_CCONTROL_S_MASK (0x1 << GPDMA_CCONTROL_S_SHIFT) #define GPDMA_CCONTROL_S(x) ((x) << GPDMA_CCONTROL_S_SHIFT) #define GPDMA_CCONTROL_D_SHIFT (25) #define GPDMA_CCONTROL_D_MASK (0x1 << GPDMA_CCONTROL_D_SHIFT) #define GPDMA_CCONTROL_D(x) ((x) << GPDMA_CCONTROL_D_SHIFT) #define GPDMA_CCONTROL_SI_SHIFT (26) #define GPDMA_CCONTROL_SI_MASK (0x1 << GPDMA_CCONTROL_SI_SHIFT) #define GPDMA_CCONTROL_SI(x) ((x) << GPDMA_CCONTROL_SI_SHIFT) #define GPDMA_CCONTROL_DI_SHIFT (27) #define GPDMA_CCONTROL_DI_MASK (0x1 << GPDMA_CCONTROL_DI_SHIFT) #define GPDMA_CCONTROL_DI(x) ((x) << GPDMA_CCONTROL_DI_SHIFT) #define GPDMA_CCONTROL_PROT1_SHIFT (28) #define GPDMA_CCONTROL_PROT1_MASK (0x1 << GPDMA_CCONTROL_PROT1_SHIFT) #define GPDMA_CCONTROL_PROT1(x) ((x) << GPDMA_CCONTROL_PROT1_SHIFT) #define GPDMA_CCONTROL_PROT2_SHIFT (29) #define GPDMA_CCONTROL_PROT2_MASK (0x1 << GPDMA_CCONTROL_PROT2_SHIFT) #define GPDMA_CCONTROL_PROT2(x) ((x) << GPDMA_CCONTROL_PROT2_SHIFT) #define GPDMA_CCONTROL_PROT3_SHIFT (30) #define GPDMA_CCONTROL_PROT3_MASK (0x1 << GPDMA_CCONTROL_PROT3_SHIFT) #define GPDMA_CCONTROL_PROT3(x) ((x) << GPDMA_CCONTROL_PROT3_SHIFT) #define GPDMA_CCONTROL_I_SHIFT (31) #define GPDMA_CCONTROL_I_MASK (0x1 << GPDMA_CCONTROL_I_SHIFT) #define GPDMA_CCONTROL_I(x) ((x) << GPDMA_CCONTROL_I_SHIFT) #define GPDMA_CCONFIG_E_SHIFT (0) #define GPDMA_CCONFIG_E_MASK (0x1 << GPDMA_CCONFIG_E_SHIFT) #define GPDMA_CCONFIG_E(x) ((x) << GPDMA_CCONFIG_E_SHIFT) #define GPDMA_CCONFIG_SRCPERIPHERAL_SHIFT (1) #define GPDMA_CCONFIG_SRCPERIPHERAL_MASK \ (0x1f << GPDMA_CCONFIG_SRCPERIPHERAL_SHIFT) #define GPDMA_CCONFIG_SRCPERIPHERAL(x) \ ((x) << GPDMA_CCONFIG_SRCPERIPHERAL_SHIFT) #define GPDMA_CCONFIG_DESTPERIPHERAL_SHIFT (6) #define GPDMA_CCONFIG_DESTPERIPHERAL_MASK \ (0x1f << GPDMA_CCONFIG_DESTPERIPHERAL_SHIFT) #define GPDMA_CCONFIG_DESTPERIPHERAL(x) \ ((x) << GPDMA_CCONFIG_DESTPERIPHERAL_SHIFT) #define GPDMA_CCONFIG_FLOWCNTRL_SHIFT (11) #define GPDMA_CCONFIG_FLOWCNTRL_MASK (0x7 << GPDMA_CCONFIG_FLOWCNTRL_SHIFT) #define GPDMA_CCONFIG_FLOWCNTRL(x) ((x) << GPDMA_CCONFIG_FLOWCNTRL_SHIFT) #define GPDMA_CCONFIG_IE_SHIFT (14) #define GPDMA_CCONFIG_IE_MASK (0x1 << GPDMA_CCONFIG_IE_SHIFT) #define GPDMA_CCONFIG_IE(x) ((x) << GPDMA_CCONFIG_IE_SHIFT) #define GPDMA_CCONFIG_ITC_SHIFT (15) #define GPDMA_CCONFIG_ITC_MASK (0x1 << GPDMA_CCONFIG_ITC_SHIFT) #define GPDMA_CCONFIG_ITC(x) ((x) << GPDMA_CCONFIG_ITC_SHIFT) #define GPDMA_CCONFIG_L_SHIFT (16) #define GPDMA_CCONFIG_L_MASK (0x1 << GPDMA_CCONFIG_L_SHIFT) #define GPDMA_CCONFIG_L(x) ((x) << GPDMA_CCONFIG_L_SHIFT) #define GPDMA_CCONFIG_A_SHIFT (17) #define GPDMA_CCONFIG_A_MASK (0x1 << GPDMA_CCONFIG_A_SHIFT) #define GPDMA_CCONFIG_A(x) ((x) << GPDMA_CCONFIG_A_SHIFT) #define GPDMA_CCONFIG_H_SHIFT (18) #define GPDMA_CCONFIG_H_MASK (0x1 << GPDMA_CCONFIG_H_SHIFT) #define GPDMA_CCONFIG_H(x) ((x) << GPDMA_CCONFIG_H_SHIFT) /* --- AUTO-GENERATED STUFF FOLLOWS ----------------------------- */ /* --- GPDMA_NTSTAT values -------------------------------------- */ /* INTSTAT: Status of DMA channel interrupts after masking */ #define GPDMA_NTSTAT_INTSTAT_SHIFT (0) #define GPDMA_NTSTAT_INTSTAT_MASK (0xff << GPDMA_NTSTAT_INTSTAT_SHIFT) #define GPDMA_NTSTAT_INTSTAT(x) ((x) << GPDMA_NTSTAT_INTSTAT_SHIFT) /* --- GPDMA_INTTCSTAT values ----------------------------------- */ /* INTTCSTAT: Terminal count interrupt request status for DMA channels */ #define GPDMA_INTTCSTAT_INTTCSTAT_SHIFT (0) #define GPDMA_INTTCSTAT_INTTCSTAT_MASK (0xff << GPDMA_INTTCSTAT_INTTCSTAT_SHIFT) #define GPDMA_INTTCSTAT_INTTCSTAT(x) ((x) << GPDMA_INTTCSTAT_INTTCSTAT_SHIFT) /* --- GPDMA_INTTCCLEAR values ---------------------------------- */ /* INTTCCLEAR: Allows clearing the Terminal count interrupt request (IntTCStat) for DMA channels */ #define GPDMA_INTTCCLEAR_INTTCCLEAR_SHIFT (0) #define GPDMA_INTTCCLEAR_INTTCCLEAR_MASK \ (0xff << GPDMA_INTTCCLEAR_INTTCCLEAR_SHIFT) #define GPDMA_INTTCCLEAR_INTTCCLEAR(x) \ ((x) << GPDMA_INTTCCLEAR_INTTCCLEAR_SHIFT) /* --- GPDMA_INTERRSTAT values ---------------------------------- */ /* INTERRSTAT: Interrupt error status for DMA channels */ #define GPDMA_INTERRSTAT_INTERRSTAT_SHIFT (0) #define GPDMA_INTERRSTAT_INTERRSTAT_MASK \ (0xff << GPDMA_INTERRSTAT_INTERRSTAT_SHIFT) #define GPDMA_INTERRSTAT_INTERRSTAT(x) \ ((x) << GPDMA_INTERRSTAT_INTERRSTAT_SHIFT) /* --- GPDMA_INTERRCLR values ----------------------------------- */ /* INTERRCLR: Writing a 1 clears the error interrupt request (IntErrStat) for DMA channels */ #define GPDMA_INTERRCLR_INTERRCLR_SHIFT (0) #define GPDMA_INTERRCLR_INTERRCLR_MASK \ (0xff << GPDMA_INTERRCLR_INTERRCLR_SHIFT) #define GPDMA_INTERRCLR_INTERRCLR(x) \ ((x) << GPDMA_INTERRCLR_INTERRCLR_SHIFT) /* --- GPDMA_RAWINTTCSTAT values -------------------------------- */ /* RAWINTTCSTAT: Status of the terminal count interrupt for DMA channels prior to masking */ #define GPDMA_RAWINTTCSTAT_RAWINTTCSTAT_SHIFT (0) #define GPDMA_RAWINTTCSTAT_RAWINTTCSTAT_MASK \ (0xff << GPDMA_RAWINTTCSTAT_RAWINTTCSTAT_SHIFT) #define GPDMA_RAWINTTCSTAT_RAWINTTCSTAT(x) \ ((x) << GPDMA_RAWINTTCSTAT_RAWINTTCSTAT_SHIFT) /* --- GPDMA_RAWINTERRSTAT values ------------------------------- */ /* RAWINTERRSTAT: Status of the error interrupt for DMA channels prior to masking */ #define GPDMA_RAWINTERRSTAT_RAWINTERRSTAT_SHIFT (0) #define GPDMA_RAWINTERRSTAT_RAWINTERRSTAT_MASK \ (0xff << GPDMA_RAWINTERRSTAT_RAWINTERRSTAT_SHIFT) #define GPDMA_RAWINTERRSTAT_RAWINTERRSTAT(x) \ ((x) << GPDMA_RAWINTERRSTAT_RAWINTERRSTAT_SHIFT) /* --- GPDMA_ENBLDCHNS values ----------------------------------- */ /* ENABLEDCHANNELS: Enable status for DMA channels */ #define GPDMA_ENBLDCHNS_ENABLEDCHANNELS_SHIFT (0) #define GPDMA_ENBLDCHNS_ENABLEDCHANNELS_MASK \ (0xff << GPDMA_ENBLDCHNS_ENABLEDCHANNELS_SHIFT) #define GPDMA_ENBLDCHNS_ENABLEDCHANNELS(x) \ ((x) << GPDMA_ENBLDCHNS_ENABLEDCHANNELS_SHIFT) /* --- GPDMA_SOFTBREQ values ------------------------------------ */ /* SOFTBREQ: Software burst request flags for each of 16 possible sources */ #define GPDMA_SOFTBREQ_SOFTBREQ_SHIFT (0) #define GPDMA_SOFTBREQ_SOFTBREQ_MASK (0xffff << GPDMA_SOFTBREQ_SOFTBREQ_SHIFT) #define GPDMA_SOFTBREQ_SOFTBREQ(x) ((x) << GPDMA_SOFTBREQ_SOFTBREQ_SHIFT) /* --- GPDMA_SOFTSREQ values ------------------------------------ */ /* SOFTSREQ: Software single transfer request flags for each of 16 possible sources */ #define GPDMA_SOFTSREQ_SOFTSREQ_SHIFT (0) #define GPDMA_SOFTSREQ_SOFTSREQ_MASK (0xffff << GPDMA_SOFTSREQ_SOFTSREQ_SHIFT) #define GPDMA_SOFTSREQ_SOFTSREQ(x) ((x) << GPDMA_SOFTSREQ_SOFTSREQ_SHIFT) /* --- GPDMA_SOFTLBREQ values ----------------------------------- */ /* SOFTLBREQ: Software last burst request flags for each of 16 possible sources */ #define GPDMA_SOFTLBREQ_SOFTLBREQ_SHIFT (0) #define GPDMA_SOFTLBREQ_SOFTLBREQ_MASK \ (0xffff << GPDMA_SOFTLBREQ_SOFTLBREQ_SHIFT) #define GPDMA_SOFTLBREQ_SOFTLBREQ(x) \ ((x) << GPDMA_SOFTLBREQ_SOFTLBREQ_SHIFT) /* --- GPDMA_SOFTLSREQ values ----------------------------------- */ /* SOFTLSREQ: Software last single transfer request flags for each of 16 possible sources */ #define GPDMA_SOFTLSREQ_SOFTLSREQ_SHIFT (0) #define GPDMA_SOFTLSREQ_SOFTLSREQ_MASK \ (0xffff << GPDMA_SOFTLSREQ_SOFTLSREQ_SHIFT) #define GPDMA_SOFTLSREQ_SOFTLSREQ(x) \ ((x) << GPDMA_SOFTLSREQ_SOFTLSREQ_SHIFT) /* --- GPDMA_CONFIG values -------------------------------------- */ /* E: DMA Controller enable */ #define GPDMA_CONFIG_E_SHIFT (0) #define GPDMA_CONFIG_E_MASK (0x1 << GPDMA_CONFIG_E_SHIFT) #define GPDMA_CONFIG_E(x) ((x) << GPDMA_CONFIG_E_SHIFT) /* M0: AHB Master 0 endianness configuration */ #define GPDMA_CONFIG_M0_SHIFT (1) #define GPDMA_CONFIG_M0_MASK (0x1 << GPDMA_CONFIG_M0_SHIFT) #define GPDMA_CONFIG_M0(x) ((x) << GPDMA_CONFIG_M0_SHIFT) /* M1: AHB Master 1 endianness configuration */ #define GPDMA_CONFIG_M1_SHIFT (2) #define GPDMA_CONFIG_M1_MASK (0x1 << GPDMA_CONFIG_M1_SHIFT) #define GPDMA_CONFIG_M1(x) ((x) << GPDMA_CONFIG_M1_SHIFT) /* --- GPDMA_SYNC values ---------------------------------------- */ /* DMACSYNC: Controls the synchronization logic for DMA request signals */ #define GPDMA_SYNC_DMACSYNC_SHIFT (0) #define GPDMA_SYNC_DMACSYNC_MASK (0xffff << GPDMA_SYNC_DMACSYNC_SHIFT) #define GPDMA_SYNC_DMACSYNC(x) ((x) << GPDMA_SYNC_DMACSYNC_SHIFT) /* --- GPDMA_C[0..7]SRCADDR values ----------------------------------- */ /* SRCADDR: DMA source address */ #define GPDMA_CxSRCADDR_SRCADDR_SHIFT (0) #define GPDMA_CxSRCADDR_SRCADDR_MASK \ (0xffffffff << GPDMA_CxSRCADDR_SRCADDR_SHIFT) #define GPDMA_CxSRCADDR_SRCADDR(x) ((x) << GPDMA_CxSRCADDR_SRCADDR_SHIFT) /* --- GPDMA_C[0..7]DESTADDR values ---------------------------------- */ /* DESTADDR: DMA source address */ #define GPDMA_CxDESTADDR_DESTADDR_SHIFT (0) #define GPDMA_CxDESTADDR_DESTADDR_MASK \ (0xffffffff << GPDMA_CxDESTADDR_DESTADDR_SHIFT) #define GPDMA_CxDESTADDR_DESTADDR(x) ((x) << GPDMA_CxDESTADDR_DESTADDR_SHIFT) /* --- GPDMA_C[0..7]LLI values --------------------------------------- */ /* LM: AHB master select for loading the next LLI */ #define GPDMA_CxLLI_LM_SHIFT (0) #define GPDMA_CxLLI_LM_MASK (0x1 << GPDMA_CxLLI_LM_SHIFT) #define GPDMA_CxLLI_LM(x) ((x) << GPDMA_CxLLI_LM_SHIFT) /* LLI: Linked list item */ #define GPDMA_CxLLI_LLI_SHIFT (2) #define GPDMA_CxLLI_LLI_MASK (0x3fffffff << GPDMA_CxLLI_LLI_SHIFT) #define GPDMA_CxLLI_LLI(x) ((x) << GPDMA_CxLLI_LLI_SHIFT) /* --- GPDMA_C[0..7]CONTROL values ----------------------------------- */ /* TRANSFERSIZE: Transfer size in number of transfers */ #define GPDMA_CxCONTROL_TRANSFERSIZE_SHIFT (0) #define GPDMA_CxCONTROL_TRANSFERSIZE_MASK \ (0xfff << GPDMA_CxCONTROL_TRANSFERSIZE_SHIFT) #define GPDMA_CxCONTROL_TRANSFERSIZE(x) \ ((x) << GPDMA_CxCONTROL_TRANSFERSIZE_SHIFT) /* SBSIZE: Source burst size */ #define GPDMA_CxCONTROL_SBSIZE_SHIFT (12) #define GPDMA_CxCONTROL_SBSIZE_MASK (0x7 << GPDMA_CxCONTROL_SBSIZE_SHIFT) #define GPDMA_CxCONTROL_SBSIZE(x) ((x) << GPDMA_CxCONTROL_SBSIZE_SHIFT) /* DBSIZE: Destination burst size */ #define GPDMA_CxCONTROL_DBSIZE_SHIFT (15) #define GPDMA_CxCONTROL_DBSIZE_MASK (0x7 << GPDMA_CxCONTROL_DBSIZE_SHIFT) #define GPDMA_CxCONTROL_DBSIZE(x) ((x) << GPDMA_CxCONTROL_DBSIZE_SHIFT) /* SWIDTH: Source transfer width */ #define GPDMA_CxCONTROL_SWIDTH_SHIFT (18) #define GPDMA_CxCONTROL_SWIDTH_MASK (0x7 << GPDMA_CxCONTROL_SWIDTH_SHIFT) #define GPDMA_CxCONTROL_SWIDTH(x) ((x) << GPDMA_CxCONTROL_SWIDTH_SHIFT) /* DWIDTH: Destination transfer width */ #define GPDMA_CxCONTROL_DWIDTH_SHIFT (21) #define GPDMA_CxCONTROL_DWIDTH_MASK (0x7 << GPDMA_CxCONTROL_DWIDTH_SHIFT) #define GPDMA_CxCONTROL_DWIDTH(x) ((x) << GPDMA_CxCONTROL_DWIDTH_SHIFT) /* S: Source AHB master select */ #define GPDMA_CxCONTROL_S_SHIFT (24) #define GPDMA_CxCONTROL_S_MASK (0x1 << GPDMA_CxCONTROL_S_SHIFT) #define GPDMA_CxCONTROL_S(x) ((x) << GPDMA_CxCONTROL_S_SHIFT) /* D: Destination AHB master select */ #define GPDMA_CxCONTROL_D_SHIFT (25) #define GPDMA_CxCONTROL_D_MASK (0x1 << GPDMA_CxCONTROL_D_SHIFT) #define GPDMA_CxCONTROL_D(x) ((x) << GPDMA_CxCONTROL_D_SHIFT) /* SI: Source increment */ #define GPDMA_CxCONTROL_SI_SHIFT (26) #define GPDMA_CxCONTROL_SI_MASK (0x1 << GPDMA_CxCONTROL_SI_SHIFT) #define GPDMA_Cx0CONTROL_SI(x) ((x) << GPDMA_CxCONTROL_SI_SHIFT) /* DI: Destination increment */ #define GPDMA_CxCONTROL_DI_SHIFT (27) #define GPDMA_CxCONTROL_DI_MASK (0x1 << GPDMA_CxCONTROL_DI_SHIFT) #define GPDMA_CxCONTROL_DI(x) ((x) << GPDMA_CxCONTROL_DI_SHIFT) /* PROT1: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode */ #define GPDMA_CxCONTROL_PROT1_SHIFT (28) #define GPDMA_CxCONTROL_PROT1_MASK (0x1 << GPDMA_CxCONTROL_PROT1_SHIFT) #define GPDMA_CxCONTROL_PROT1(x) ((x) << GPDMA_CxCONTROL_PROT1_SHIFT) /* PROT2: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable */ #define GPDMA_CxCONTROL_PROT2_SHIFT (29) #define GPDMA_CxCONTROL_PROT2_MASK (0x1 << GPDMA_CxCONTROL_PROT2_SHIFT) #define GPDMA_CxCONTROL_PROT2(x) ((x) << GPDMA_CxCONTROL_PROT2_SHIFT) /* PROT3: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable */ #define GPDMA_CxCONTROL_PROT3_SHIFT (30) #define GPDMA_CxCONTROL_PROT3_MASK (0x1 << GPDMA_CxCONTROL_PROT3_SHIFT) #define GPDMA_CxCONTROL_PROT3(x) ((x) << GPDMA_CxCONTROL_PROT3_SHIFT) /* I: Terminal count interrupt enable bit */ #define GPDMA_CxCONTROL_I_SHIFT (31) #define GPDMA_CxCONTROL_I_MASK (0x1 << GPDMA_CxCONTROL_I_SHIFT) #define GPDMA_CxCONTROL_I(x) ((x) << GPDMA_CxCONTROL_I_SHIFT) /* --- GPDMA_C[0..7]CONFIG values ------------------------------------ */ /* E: Channel enable */ #define GPDMA_CxCONFIG_E_SHIFT (0) #define GPDMA_CxCONFIG_E_MASK (0x1 << GPDMA_CxCONFIG_E_SHIFT) #define GPDMA_CxCONFIG_E(x) ((x) << GPDMA_CxCONFIG_E_SHIFT) /* SRCPERIPHERAL: Source peripheral */ #define GPDMA_CxCONFIG_SRCPERIPHERAL_SHIFT (1) #define GPDMA_CxCONFIG_SRCPERIPHERAL_MASK \ (0x1f << GPDMA_CxCONFIG_SRCPERIPHERAL_SHIFT) #define GPDMA_CxCONFIG_SRCPERIPHERAL(x) \ ((x) << GPDMA_CxCONFIG_SRCPERIPHERAL_SHIFT) /* DESTPERIPHERAL: Destination peripheral */ #define GPDMA_CxCONFIG_DESTPERIPHERAL_SHIFT (6) #define GPDMA_CxCONFIG_DESTPERIPHERAL_MASK \ (0x1f << GPDMA_CxCONFIG_DESTPERIPHERAL_SHIFT) #define GPDMA_CxCONFIG_DESTPERIPHERAL(x) \ ((x) << GPDMA_CxCONFIG_DESTPERIPHERAL_SHIFT) /* FLOWCNTRL: Flow control and transfer type */ #define GPDMA_CxCONFIG_FLOWCNTRL_SHIFT (11) #define GPDMA_CxCONFIG_FLOWCNTRL_MASK (0x7 << GPDMA_CxCONFIG_FLOWCNTRL_SHIFT) #define GPDMA_CxCONFIG_FLOWCNTRL(x) ((x) << GPDMA_CxCONFIG_FLOWCNTRL_SHIFT) /* IE: Interrupt error mask */ #define GPDMA_CxCONFIG_IE_SHIFT (14) #define GPDMA_CxCONFIG_IE_MASK (0x1 << GPDMA_CxCONFIG_IE_SHIFT) #define GPDMA_CxCONFIG_IE(x) ((x) << GPDMA_CxCONFIG_IE_SHIFT) /* ITC: Terminal count interrupt mask */ #define GPDMA_CxCONFIG_ITC_SHIFT (15) #define GPDMA_CxCONFIG_ITC_MASK (0x1 << GPDMA_CxCONFIG_ITC_SHIFT) #define GPDMA_CxCONFIG_ITC(x) ((x) << GPDMA_CxCONFIG_ITC_SHIFT) /* L: Lock */ #define GPDMA_CxCONFIG_L_SHIFT (16) #define GPDMA_CxCONFIG_L_MASK (0x1 << GPDMA_CxCONFIG_L_SHIFT) #define GPDMA_CxCONFIG_L(x) ((x) << GPDMA_CxCONFIG_L_SHIFT) /* A: Active */ #define GPDMA_CxCONFIG_A_SHIFT (17) #define GPDMA_CxCONFIG_A_MASK (0x1 << GPDMA_CxCONFIG_A_SHIFT) #define GPDMA_CxCONFIG_A(x) ((x) << GPDMA_CxCONFIG_A_SHIFT) /* H: Halt */ #define GPDMA_CxCONFIG_H_SHIFT (18) #define GPDMA_CxCONFIG_H_MASK (0x1 << GPDMA_CxCONFIG_H_SHIFT) #define GPDMA_CxCONFIG_H(x) ((x) << GPDMA_CxCONFIG_H_SHIFT) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/gpio.h ================================================ /** @defgroup gpio_defines General Purpose I/O Defines @brief Defined Constants and Types for the LPC43xx General Purpose I/O @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_GPIO_H #define LPC43XX_GPIO_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ #define GPIO0 (GPIO_PORT_BASE + 0x2000) #define GPIO1 (GPIO_PORT_BASE + 0x2004) #define GPIO2 (GPIO_PORT_BASE + 0x2008) #define GPIO3 (GPIO_PORT_BASE + 0x200C) #define GPIO4 (GPIO_PORT_BASE + 0x2010) #define GPIO5 (GPIO_PORT_BASE + 0x2014) #define GPIO6 (GPIO_PORT_BASE + 0x2018) #define GPIO7 (GPIO_PORT_BASE + 0x201C) /* GPIO number definitions (for convenience) */ #define GPIOPIN0 (1 << 0) #define GPIOPIN1 (1 << 1) #define GPIOPIN2 (1 << 2) #define GPIOPIN3 (1 << 3) #define GPIOPIN4 (1 << 4) #define GPIOPIN5 (1 << 5) #define GPIOPIN6 (1 << 6) #define GPIOPIN7 (1 << 7) #define GPIOPIN8 (1 << 8) #define GPIOPIN9 (1 << 9) #define GPIOPIN10 (1 << 10) #define GPIOPIN11 (1 << 11) #define GPIOPIN12 (1 << 12) #define GPIOPIN13 (1 << 13) #define GPIOPIN14 (1 << 14) #define GPIOPIN15 (1 << 15) #define GPIOPIN16 (1 << 16) #define GPIOPIN17 (1 << 17) #define GPIOPIN18 (1 << 18) #define GPIOPIN19 (1 << 19) #define GPIOPIN20 (1 << 20) #define GPIOPIN21 (1 << 21) #define GPIOPIN22 (1 << 22) #define GPIOPIN23 (1 << 23) #define GPIOPIN24 (1 << 24) #define GPIOPIN25 (1 << 25) #define GPIOPIN26 (1 << 26) #define GPIOPIN27 (1 << 27) #define GPIOPIN28 (1 << 28) #define GPIOPIN29 (1 << 29) #define GPIOPIN30 (1 << 30) #define GPIOPIN31 (1 << 31) /* --- GPIO registers ------------------------------------------------------ */ /* GPIO pin interrupts */ /* Pin Interrupt Mode register */ #define GPIO_PIN_INTERRUPT_ISEL MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x000) /* Pin interrupt level (rising edge) interrupt enable register */ #define GPIO_PIN_INTERRUPT_IENR MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x004) /* Pin interrupt level (rising edge) interrupt set register */ #define GPIO_PIN_INTERRUPT_SIENR MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x008) /* Pin interrupt level (rising edge interrupt) clear register */ #define GPIO_PIN_INTERRUPT_CIENR MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x00C) /* Pin interrupt active level (falling edge) interrupt enable register */ #define GPIO_PIN_INTERRUPT_IENF MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x010) /* Pin interrupt active level (falling edge) interrupt set register */ #define GPIO_PIN_INTERRUPT_SIENF MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x014) /* Pin interrupt active level (falling edge) interrupt clear register */ #define GPIO_PIN_INTERRUPT_CIENF MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x018) /* Pin interrupt rising edge register */ #define GPIO_PIN_INTERRUPT_RISE MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x01C) /* Pin interrupt falling edge register */ #define GPIO_PIN_INTERRUPT_FALL MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x020) /* Pin interrupt status register */ #define GPIO_PIN_INTERRUPT_IST MMIO32(GPIO_PIN_INTERRUPT_BASE + 0x024) /* GPIO GROUP0 interrupt */ /* GPIO grouped interrupt control register */ #define GPIO_GROUP0_INTERRUPT_CTRL \ MMIO32(GPIO_GROUP0_INTERRUPT_BASE + 0x000) /* GPIO grouped interrupt port [0..7] polarity register */ #define GPIO_GROUP0_INTERRUPT_PORT_POL(x) \ MMIO32(GPIO_GROUP0_INTERRUPT_BASE + 0x020 + ((x)*4)) /* GPIO grouped interrupt port [0..7] enable register */ #define GPIO_GROUP0_INTERRUPT_PORT_ENA(x) \ MMIO32(GPIO_GROUP0_INTERRUPT_BASE + 0x040 + ((x)*4)) /* GPIO GROUP1 interrupt */ /* GPIO grouped interrupt control register */ #define GPIO_GROUP1_INTERRUPT_CTRL \ MMIO32(GPIO_GROUP1_INTERRUPT_BASE + 0x000) /* GPIO grouped interrupt port [0..7] polarity register */ #define GPIO_GROUP1_INTERRUPT_PORT_POL(x) \ MMIO32(GPIO_GROUP1_INTERRUPT_BASE + 0x020 + ((x)*4)) /* GPIO grouped interrupt port [0..7] enable register */ #define GPIO_GROUP1_INTERRUPT_PORT_ENA(x) \ MMIO32(GPIO_GROUP1_INTERRUPT_BASE + 0x040 + ((x)*4)) /* Byte pin registers port 0; pins PIO0_0 to PIO0_31 (R/W) */ #define GPIO_B0 (GPIO_PORT_BASE + 0x0000) #define GPIO_B1 (GPIO_PORT_BASE + 0x0001) #define GPIO_B2 (GPIO_PORT_BASE + 0x0002) #define GPIO_B3 (GPIO_PORT_BASE + 0x0003) #define GPIO_B4 (GPIO_PORT_BASE + 0x0004) #define GPIO_B5 (GPIO_PORT_BASE + 0x0005) #define GPIO_B6 (GPIO_PORT_BASE + 0x0006) #define GPIO_B7 (GPIO_PORT_BASE + 0x0007) #define GPIO_B8 (GPIO_PORT_BASE + 0x0008) #define GPIO_B9 (GPIO_PORT_BASE + 0x0009) #define GPIO_B10 (GPIO_PORT_BASE + 0x000A) #define GPIO_B11 (GPIO_PORT_BASE + 0x000B) #define GPIO_B12 (GPIO_PORT_BASE + 0x000C) #define GPIO_B13 (GPIO_PORT_BASE + 0x000D) #define GPIO_B14 (GPIO_PORT_BASE + 0x000E) #define GPIO_B15 (GPIO_PORT_BASE + 0x000F) #define GPIO_B16 (GPIO_PORT_BASE + 0x0010) #define GPIO_B17 (GPIO_PORT_BASE + 0x0011) #define GPIO_B18 (GPIO_PORT_BASE + 0x0012) #define GPIO_B19 (GPIO_PORT_BASE + 0x0013) #define GPIO_B20 (GPIO_PORT_BASE + 0x0014) #define GPIO_B21 (GPIO_PORT_BASE + 0x0015) #define GPIO_B22 (GPIO_PORT_BASE + 0x0016) #define GPIO_B23 (GPIO_PORT_BASE + 0x0017) #define GPIO_B24 (GPIO_PORT_BASE + 0x0018) #define GPIO_B25 (GPIO_PORT_BASE + 0x0019) #define GPIO_B26 (GPIO_PORT_BASE + 0x001A) #define GPIO_B27 (GPIO_PORT_BASE + 0x001B) #define GPIO_B28 (GPIO_PORT_BASE + 0x001C) #define GPIO_B29 (GPIO_PORT_BASE + 0x001D) #define GPIO_B30 (GPIO_PORT_BASE + 0x001E) #define GPIO_B31 (GPIO_PORT_BASE + 0x001F) /* Byte pin registers port 1 (R/W) */ #define GPIO_B32 (GPIO_PORT_BASE + 0x0020) #define GPIO_B33 (GPIO_PORT_BASE + 0x0021) #define GPIO_B34 (GPIO_PORT_BASE + 0x0022) #define GPIO_B35 (GPIO_PORT_BASE + 0x0023) #define GPIO_B36 (GPIO_PORT_BASE + 0x0024) #define GPIO_B37 (GPIO_PORT_BASE + 0x0025) #define GPIO_B38 (GPIO_PORT_BASE + 0x0026) #define GPIO_B39 (GPIO_PORT_BASE + 0x0027) #define GPIO_B40 (GPIO_PORT_BASE + 0x0028) #define GPIO_B41 (GPIO_PORT_BASE + 0x0029) #define GPIO_B42 (GPIO_PORT_BASE + 0x002A) #define GPIO_B43 (GPIO_PORT_BASE + 0x002B) #define GPIO_B44 (GPIO_PORT_BASE + 0x002C) #define GPIO_B45 (GPIO_PORT_BASE + 0x002D) #define GPIO_B46 (GPIO_PORT_BASE + 0x002E) #define GPIO_B47 (GPIO_PORT_BASE + 0x002F) #define GPIO_B48 (GPIO_PORT_BASE + 0x0030) #define GPIO_B49 (GPIO_PORT_BASE + 0x0031) #define GPIO_B50 (GPIO_PORT_BASE + 0x0032) #define GPIO_B51 (GPIO_PORT_BASE + 0x0033) #define GPIO_B52 (GPIO_PORT_BASE + 0x0034) #define GPIO_B53 (GPIO_PORT_BASE + 0x0035) #define GPIO_B54 (GPIO_PORT_BASE + 0x0036) #define GPIO_B55 (GPIO_PORT_BASE + 0x0037) #define GPIO_B56 (GPIO_PORT_BASE + 0x0038) #define GPIO_B57 (GPIO_PORT_BASE + 0x0039) #define GPIO_B58 (GPIO_PORT_BASE + 0x003A) #define GPIO_B59 (GPIO_PORT_BASE + 0x003B) #define GPIO_B60 (GPIO_PORT_BASE + 0x003C) #define GPIO_B61 (GPIO_PORT_BASE + 0x003D) #define GPIO_B62 (GPIO_PORT_BASE + 0x003E) #define GPIO_B63 (GPIO_PORT_BASE + 0x003F) /* Byte pin registers port 2 (R/W) */ #define GPIO_B64 (GPIO_PORT_BASE + 0x0040) #define GPIO_B65 (GPIO_PORT_BASE + 0x0041) #define GPIO_B66 (GPIO_PORT_BASE + 0x0042) #define GPIO_B67 (GPIO_PORT_BASE + 0x0043) #define GPIO_B68 (GPIO_PORT_BASE + 0x0044) #define GPIO_B69 (GPIO_PORT_BASE + 0x0045) #define GPIO_B70 (GPIO_PORT_BASE + 0x0046) #define GPIO_B71 (GPIO_PORT_BASE + 0x0047) #define GPIO_B72 (GPIO_PORT_BASE + 0x0048) #define GPIO_B73 (GPIO_PORT_BASE + 0x0049) #define GPIO_B74 (GPIO_PORT_BASE + 0x004A) #define GPIO_B75 (GPIO_PORT_BASE + 0x004B) #define GPIO_B76 (GPIO_PORT_BASE + 0x004C) #define GPIO_B77 (GPIO_PORT_BASE + 0x004D) #define GPIO_B78 (GPIO_PORT_BASE + 0x004E) #define GPIO_B79 (GPIO_PORT_BASE + 0x004F) #define GPIO_B80 (GPIO_PORT_BASE + 0x0050) #define GPIO_B81 (GPIO_PORT_BASE + 0x0051) #define GPIO_B82 (GPIO_PORT_BASE + 0x0052) #define GPIO_B83 (GPIO_PORT_BASE + 0x0053) #define GPIO_B84 (GPIO_PORT_BASE + 0x0054) #define GPIO_B85 (GPIO_PORT_BASE + 0x0055) #define GPIO_B86 (GPIO_PORT_BASE + 0x0056) #define GPIO_B87 (GPIO_PORT_BASE + 0x0057) #define GPIO_B88 (GPIO_PORT_BASE + 0x0058) #define GPIO_B89 (GPIO_PORT_BASE + 0x0059) #define GPIO_B90 (GPIO_PORT_BASE + 0x005A) #define GPIO_B91 (GPIO_PORT_BASE + 0x005B) #define GPIO_B92 (GPIO_PORT_BASE + 0x005C) #define GPIO_B93 (GPIO_PORT_BASE + 0x005D) #define GPIO_B94 (GPIO_PORT_BASE + 0x005E) #define GPIO_B95 (GPIO_PORT_BASE + 0x005F) /* Byte pin registers port 3 (R/W) */ #define GPIO_B96 (GPIO_PORT_BASE + 0x0060) #define GPIO_B97 (GPIO_PORT_BASE + 0x0061) #define GPIO_B98 (GPIO_PORT_BASE + 0x0062) #define GPIO_B99 (GPIO_PORT_BASE + 0x0063) #define GPIO_B100 (GPIO_PORT_BASE + 0x0064) #define GPIO_B101 (GPIO_PORT_BASE + 0x0065) #define GPIO_B102 (GPIO_PORT_BASE + 0x0066) #define GPIO_B103 (GPIO_PORT_BASE + 0x0067) #define GPIO_B104 (GPIO_PORT_BASE + 0x0068) #define GPIO_B105 (GPIO_PORT_BASE + 0x0069) #define GPIO_B106 (GPIO_PORT_BASE + 0x006A) #define GPIO_B107 (GPIO_PORT_BASE + 0x006B) #define GPIO_B108 (GPIO_PORT_BASE + 0x006C) #define GPIO_B109 (GPIO_PORT_BASE + 0x006D) #define GPIO_B110 (GPIO_PORT_BASE + 0x006E) #define GPIO_B111 (GPIO_PORT_BASE + 0x006F) #define GPIO_B112 (GPIO_PORT_BASE + 0x0070) #define GPIO_B113 (GPIO_PORT_BASE + 0x0071) #define GPIO_B114 (GPIO_PORT_BASE + 0x0072) #define GPIO_B115 (GPIO_PORT_BASE + 0x0073) #define GPIO_B116 (GPIO_PORT_BASE + 0x0074) #define GPIO_B117 (GPIO_PORT_BASE + 0x0075) #define GPIO_B118 (GPIO_PORT_BASE + 0x0076) #define GPIO_B119 (GPIO_PORT_BASE + 0x0077) #define GPIO_B120 (GPIO_PORT_BASE + 0x0078) #define GPIO_B121 (GPIO_PORT_BASE + 0x0079) #define GPIO_B122 (GPIO_PORT_BASE + 0x007A) #define GPIO_B123 (GPIO_PORT_BASE + 0x007B) #define GPIO_B124 (GPIO_PORT_BASE + 0x007C) #define GPIO_B125 (GPIO_PORT_BASE + 0x007D) #define GPIO_B126 (GPIO_PORT_BASE + 0x007E) #define GPIO_B127 (GPIO_PORT_BASE + 0x007F) /* Byte pin registers port 4 (R/W) */ #define GPIO_B128 (GPIO_PORT_BASE + 0x0080) #define GPIO_B129 (GPIO_PORT_BASE + 0x0081) #define GPIO_B130 (GPIO_PORT_BASE + 0x0082) #define GPIO_B131 (GPIO_PORT_BASE + 0x0083) #define GPIO_B132 (GPIO_PORT_BASE + 0x0084) #define GPIO_B133 (GPIO_PORT_BASE + 0x0085) #define GPIO_B134 (GPIO_PORT_BASE + 0x0086) #define GPIO_B135 (GPIO_PORT_BASE + 0x0087) #define GPIO_B136 (GPIO_PORT_BASE + 0x0088) #define GPIO_B137 (GPIO_PORT_BASE + 0x0089) #define GPIO_B138 (GPIO_PORT_BASE + 0x008A) #define GPIO_B139 (GPIO_PORT_BASE + 0x008B) #define GPIO_B140 (GPIO_PORT_BASE + 0x008C) #define GPIO_B141 (GPIO_PORT_BASE + 0x008D) #define GPIO_B142 (GPIO_PORT_BASE + 0x008E) #define GPIO_B143 (GPIO_PORT_BASE + 0x008F) #define GPIO_B144 (GPIO_PORT_BASE + 0x0090) #define GPIO_B145 (GPIO_PORT_BASE + 0x0091) #define GPIO_B146 (GPIO_PORT_BASE + 0x0092) #define GPIO_B147 (GPIO_PORT_BASE + 0x0093) #define GPIO_B148 (GPIO_PORT_BASE + 0x0094) #define GPIO_B149 (GPIO_PORT_BASE + 0x0095) #define GPIO_B150 (GPIO_PORT_BASE + 0x0096) #define GPIO_B151 (GPIO_PORT_BASE + 0x0097) #define GPIO_B152 (GPIO_PORT_BASE + 0x0098) #define GPIO_B153 (GPIO_PORT_BASE + 0x0099) #define GPIO_B154 (GPIO_PORT_BASE + 0x009A) #define GPIO_B155 (GPIO_PORT_BASE + 0x009B) #define GPIO_B156 (GPIO_PORT_BASE + 0x009C) #define GPIO_B157 (GPIO_PORT_BASE + 0x009D) #define GPIO_B158 (GPIO_PORT_BASE + 0x009E) #define GPIO_B159 (GPIO_PORT_BASE + 0x009F) /* Byte pin registers port 5 (R/W) */ #define GPIO_B160 (GPIO_PORT_BASE + 0x00A0) #define GPIO_B161 (GPIO_PORT_BASE + 0x00A1) #define GPIO_B162 (GPIO_PORT_BASE + 0x00A2) #define GPIO_B163 (GPIO_PORT_BASE + 0x00A3) #define GPIO_B164 (GPIO_PORT_BASE + 0x00A4) #define GPIO_B165 (GPIO_PORT_BASE + 0x00A5) #define GPIO_B166 (GPIO_PORT_BASE + 0x00A6) #define GPIO_B167 (GPIO_PORT_BASE + 0x00A7) #define GPIO_B168 (GPIO_PORT_BASE + 0x00A8) #define GPIO_B169 (GPIO_PORT_BASE + 0x00A9) #define GPIO_B170 (GPIO_PORT_BASE + 0x00AA) #define GPIO_B171 (GPIO_PORT_BASE + 0x00AB) #define GPIO_B172 (GPIO_PORT_BASE + 0x00AC) #define GPIO_B173 (GPIO_PORT_BASE + 0x00AD) #define GPIO_B174 (GPIO_PORT_BASE + 0x00AE) #define GPIO_B175 (GPIO_PORT_BASE + 0x00AF) #define GPIO_B176 (GPIO_PORT_BASE + 0x00B0) #define GPIO_B177 (GPIO_PORT_BASE + 0x00B1) #define GPIO_B178 (GPIO_PORT_BASE + 0x00B2) #define GPIO_B179 (GPIO_PORT_BASE + 0x00B3) #define GPIO_B180 (GPIO_PORT_BASE + 0x00B4) #define GPIO_B181 (GPIO_PORT_BASE + 0x00B5) #define GPIO_B182 (GPIO_PORT_BASE + 0x00B6) #define GPIO_B183 (GPIO_PORT_BASE + 0x00B7) #define GPIO_B184 (GPIO_PORT_BASE + 0x00B8) #define GPIO_B185 (GPIO_PORT_BASE + 0x00B9) #define GPIO_B186 (GPIO_PORT_BASE + 0x00BA) #define GPIO_B187 (GPIO_PORT_BASE + 0x00BB) #define GPIO_B188 (GPIO_PORT_BASE + 0x00BC) #define GPIO_B189 (GPIO_PORT_BASE + 0x00BD) #define GPIO_B190 (GPIO_PORT_BASE + 0x00BE) #define GPIO_B191 (GPIO_PORT_BASE + 0x00BF) /* Byte pin registers port 6 (R/W) */ #define GPIO_B192 (GPIO_PORT_BASE + 0x00C0) #define GPIO_B193 (GPIO_PORT_BASE + 0x00C1) #define GPIO_B194 (GPIO_PORT_BASE + 0x00C2) #define GPIO_B195 (GPIO_PORT_BASE + 0x00C3) #define GPIO_B196 (GPIO_PORT_BASE + 0x00C4) #define GPIO_B197 (GPIO_PORT_BASE + 0x00C5) #define GPIO_B198 (GPIO_PORT_BASE + 0x00C6) #define GPIO_B199 (GPIO_PORT_BASE + 0x00C7) #define GPIO_B200 (GPIO_PORT_BASE + 0x00C8) #define GPIO_B201 (GPIO_PORT_BASE + 0x00C9) #define GPIO_B202 (GPIO_PORT_BASE + 0x00CA) #define GPIO_B203 (GPIO_PORT_BASE + 0x00CB) #define GPIO_B204 (GPIO_PORT_BASE + 0x00CC) #define GPIO_B205 (GPIO_PORT_BASE + 0x00CD) #define GPIO_B206 (GPIO_PORT_BASE + 0x00CE) #define GPIO_B207 (GPIO_PORT_BASE + 0x00CF) #define GPIO_B208 (GPIO_PORT_BASE + 0x00D0) #define GPIO_B209 (GPIO_PORT_BASE + 0x00D1) #define GPIO_B210 (GPIO_PORT_BASE + 0x00D2) #define GPIO_B211 (GPIO_PORT_BASE + 0x00D3) #define GPIO_B212 (GPIO_PORT_BASE + 0x00D4) #define GPIO_B213 (GPIO_PORT_BASE + 0x00D5) #define GPIO_B214 (GPIO_PORT_BASE + 0x00D6) #define GPIO_B215 (GPIO_PORT_BASE + 0x00D7) #define GPIO_B216 (GPIO_PORT_BASE + 0x00D8) #define GPIO_B217 (GPIO_PORT_BASE + 0x00D9) #define GPIO_B218 (GPIO_PORT_BASE + 0x00DA) #define GPIO_B219 (GPIO_PORT_BASE + 0x00DB) #define GPIO_B220 (GPIO_PORT_BASE + 0x00DC) #define GPIO_B221 (GPIO_PORT_BASE + 0x00DD) #define GPIO_B222 (GPIO_PORT_BASE + 0x00DE) #define GPIO_B223 (GPIO_PORT_BASE + 0x00DF) /* Byte pin registers port 7 (R/W) */ #define GPIO_B224 (GPIO_PORT_BASE + 0x00E0) #define GPIO_B225 (GPIO_PORT_BASE + 0x00E1) #define GPIO_B226 (GPIO_PORT_BASE + 0x00E2) #define GPIO_B227 (GPIO_PORT_BASE + 0x00E3) #define GPIO_B228 (GPIO_PORT_BASE + 0x00E4) #define GPIO_B229 (GPIO_PORT_BASE + 0x00E5) #define GPIO_B230 (GPIO_PORT_BASE + 0x00E6) #define GPIO_B231 (GPIO_PORT_BASE + 0x00E7) #define GPIO_B232 (GPIO_PORT_BASE + 0x00E8) #define GPIO_B233 (GPIO_PORT_BASE + 0x00E9) #define GPIO_B234 (GPIO_PORT_BASE + 0x00EA) #define GPIO_B235 (GPIO_PORT_BASE + 0x00EB) #define GPIO_B236 (GPIO_PORT_BASE + 0x00EC) #define GPIO_B237 (GPIO_PORT_BASE + 0x00ED) #define GPIO_B238 (GPIO_PORT_BASE + 0x00EE) #define GPIO_B239 (GPIO_PORT_BASE + 0x00EF) #define GPIO_B240 (GPIO_PORT_BASE + 0x00F0) #define GPIO_B241 (GPIO_PORT_BASE + 0x00F1) #define GPIO_B242 (GPIO_PORT_BASE + 0x00F2) #define GPIO_B243 (GPIO_PORT_BASE + 0x00F3) #define GPIO_B244 (GPIO_PORT_BASE + 0x00F4) #define GPIO_B245 (GPIO_PORT_BASE + 0x00F5) #define GPIO_B246 (GPIO_PORT_BASE + 0x00F6) #define GPIO_B247 (GPIO_PORT_BASE + 0x00F7) #define GPIO_B248 (GPIO_PORT_BASE + 0x00F8) #define GPIO_B249 (GPIO_PORT_BASE + 0x00F9) #define GPIO_B250 (GPIO_PORT_BASE + 0x00FA) #define GPIO_B251 (GPIO_PORT_BASE + 0x00FB) #define GPIO_B252 (GPIO_PORT_BASE + 0x00FC) #define GPIO_B253 (GPIO_PORT_BASE + 0x00FD) #define GPIO_B254 (GPIO_PORT_BASE + 0x00FE) #define GPIO_B255 (GPIO_PORT_BASE + 0x00FF) /* Word pin registers port 0 (R/W) */ #define GPIO_W0 (GPIO_PORT_BASE + 0x1000) #define GPIO_W1 (GPIO_PORT_BASE + 0x1004) #define GPIO_W2 (GPIO_PORT_BASE + 0x1008) #define GPIO_W3 (GPIO_PORT_BASE + 0x100C) #define GPIO_W4 (GPIO_PORT_BASE + 0x1010) #define GPIO_W5 (GPIO_PORT_BASE + 0x1014) #define GPIO_W6 (GPIO_PORT_BASE + 0x1018) #define GPIO_W7 (GPIO_PORT_BASE + 0x101C) #define GPIO_W8 (GPIO_PORT_BASE + 0x1020) #define GPIO_W9 (GPIO_PORT_BASE + 0x1024) #define GPIO_W10 (GPIO_PORT_BASE + 0x1028) #define GPIO_W11 (GPIO_PORT_BASE + 0x102C) #define GPIO_W12 (GPIO_PORT_BASE + 0x1030) #define GPIO_W13 (GPIO_PORT_BASE + 0x1034) #define GPIO_W14 (GPIO_PORT_BASE + 0x1038) #define GPIO_W15 (GPIO_PORT_BASE + 0x103C) #define GPIO_W16 (GPIO_PORT_BASE + 0x1040) #define GPIO_W17 (GPIO_PORT_BASE + 0x1044) #define GPIO_W18 (GPIO_PORT_BASE + 0x1048) #define GPIO_W19 (GPIO_PORT_BASE + 0x104C) #define GPIO_W20 (GPIO_PORT_BASE + 0x1050) #define GPIO_W21 (GPIO_PORT_BASE + 0x1054) #define GPIO_W22 (GPIO_PORT_BASE + 0x1058) #define GPIO_W23 (GPIO_PORT_BASE + 0x105C) #define GPIO_W24 (GPIO_PORT_BASE + 0x1060) #define GPIO_W25 (GPIO_PORT_BASE + 0x1064) #define GPIO_W26 (GPIO_PORT_BASE + 0x1068) #define GPIO_W27 (GPIO_PORT_BASE + 0x106C) #define GPIO_W28 (GPIO_PORT_BASE + 0x1070) #define GPIO_W29 (GPIO_PORT_BASE + 0x1074) #define GPIO_W30 (GPIO_PORT_BASE + 0x1078) #define GPIO_W31 (GPIO_PORT_BASE + 0x107C) /* Word pin registers port 1 (R/W) */ #define GPIO_W32 (GPIO_PORT_BASE + 0x1080) #define GPIO_W33 (GPIO_PORT_BASE + 0x1084) #define GPIO_W34 (GPIO_PORT_BASE + 0x1088) #define GPIO_W35 (GPIO_PORT_BASE + 0x108C) #define GPIO_W36 (GPIO_PORT_BASE + 0x1090) #define GPIO_W37 (GPIO_PORT_BASE + 0x1094) #define GPIO_W38 (GPIO_PORT_BASE + 0x1098) #define GPIO_W39 (GPIO_PORT_BASE + 0x109C) #define GPIO_W40 (GPIO_PORT_BASE + 0x10A0) #define GPIO_W41 (GPIO_PORT_BASE + 0x10A4) #define GPIO_W42 (GPIO_PORT_BASE + 0x10A8) #define GPIO_W43 (GPIO_PORT_BASE + 0x10AC) #define GPIO_W44 (GPIO_PORT_BASE + 0x10B0) #define GPIO_W45 (GPIO_PORT_BASE + 0x10B4) #define GPIO_W46 (GPIO_PORT_BASE + 0x10B8) #define GPIO_W47 (GPIO_PORT_BASE + 0x10BC) #define GPIO_W48 (GPIO_PORT_BASE + 0x10C0) #define GPIO_W49 (GPIO_PORT_BASE + 0x10C4) #define GPIO_W50 (GPIO_PORT_BASE + 0x10C8) #define GPIO_W51 (GPIO_PORT_BASE + 0x10CC) #define GPIO_W52 (GPIO_PORT_BASE + 0x10D0) #define GPIO_W53 (GPIO_PORT_BASE + 0x10D4) #define GPIO_W54 (GPIO_PORT_BASE + 0x10D8) #define GPIO_W55 (GPIO_PORT_BASE + 0x10DC) #define GPIO_W56 (GPIO_PORT_BASE + 0x10E0) #define GPIO_W57 (GPIO_PORT_BASE + 0x10E4) #define GPIO_W58 (GPIO_PORT_BASE + 0x10E8) #define GPIO_W59 (GPIO_PORT_BASE + 0x10EC) #define GPIO_W60 (GPIO_PORT_BASE + 0x10F0) #define GPIO_W61 (GPIO_PORT_BASE + 0x10F4) #define GPIO_W62 (GPIO_PORT_BASE + 0x10F8) #define GPIO_W63 (GPIO_PORT_BASE + 0x10FC) /* Word pin registers port 2 (R/W) */ #define GPIO_W64 (GPIO_PORT_BASE + 0x1100) #define GPIO_W65 (GPIO_PORT_BASE + 0x1104) #define GPIO_W66 (GPIO_PORT_BASE + 0x1108) #define GPIO_W67 (GPIO_PORT_BASE + 0x110C) #define GPIO_W68 (GPIO_PORT_BASE + 0x1110) #define GPIO_W69 (GPIO_PORT_BASE + 0x1114) #define GPIO_W70 (GPIO_PORT_BASE + 0x1118) #define GPIO_W71 (GPIO_PORT_BASE + 0x111C) #define GPIO_W72 (GPIO_PORT_BASE + 0x1120) #define GPIO_W73 (GPIO_PORT_BASE + 0x1124) #define GPIO_W74 (GPIO_PORT_BASE + 0x1128) #define GPIO_W75 (GPIO_PORT_BASE + 0x112C) #define GPIO_W76 (GPIO_PORT_BASE + 0x1130) #define GPIO_W77 (GPIO_PORT_BASE + 0x1134) #define GPIO_W78 (GPIO_PORT_BASE + 0x1138) #define GPIO_W79 (GPIO_PORT_BASE + 0x113C) #define GPIO_W80 (GPIO_PORT_BASE + 0x1140) #define GPIO_W81 (GPIO_PORT_BASE + 0x1144) #define GPIO_W82 (GPIO_PORT_BASE + 0x1148) #define GPIO_W83 (GPIO_PORT_BASE + 0x114C) #define GPIO_W84 (GPIO_PORT_BASE + 0x1150) #define GPIO_W85 (GPIO_PORT_BASE + 0x1154) #define GPIO_W86 (GPIO_PORT_BASE + 0x1158) #define GPIO_W87 (GPIO_PORT_BASE + 0x115C) #define GPIO_W88 (GPIO_PORT_BASE + 0x1160) #define GPIO_W89 (GPIO_PORT_BASE + 0x1164) #define GPIO_W90 (GPIO_PORT_BASE + 0x1168) #define GPIO_W91 (GPIO_PORT_BASE + 0x116C) #define GPIO_W92 (GPIO_PORT_BASE + 0x1170) #define GPIO_W93 (GPIO_PORT_BASE + 0x1174) #define GPIO_W94 (GPIO_PORT_BASE + 0x1178) #define GPIO_W95 (GPIO_PORT_BASE + 0x117C) /* Word pin registers port 3 (R/W) */ #define GPIO_W96 (GPIO_PORT_BASE + 0x1180) #define GPIO_W97 (GPIO_PORT_BASE + 0x1184) #define GPIO_W98 (GPIO_PORT_BASE + 0x1188) #define GPIO_W99 (GPIO_PORT_BASE + 0x118C) #define GPIO_W100 (GPIO_PORT_BASE + 0x1190) #define GPIO_W101 (GPIO_PORT_BASE + 0x1194) #define GPIO_W102 (GPIO_PORT_BASE + 0x1198) #define GPIO_W103 (GPIO_PORT_BASE + 0x119C) #define GPIO_W104 (GPIO_PORT_BASE + 0x11A0) #define GPIO_W105 (GPIO_PORT_BASE + 0x11A4) #define GPIO_W106 (GPIO_PORT_BASE + 0x11A8) #define GPIO_W107 (GPIO_PORT_BASE + 0x11AC) #define GPIO_W108 (GPIO_PORT_BASE + 0x11B0) #define GPIO_W109 (GPIO_PORT_BASE + 0x11B4) #define GPIO_W110 (GPIO_PORT_BASE + 0x11B8) #define GPIO_W111 (GPIO_PORT_BASE + 0x11BC) #define GPIO_W112 (GPIO_PORT_BASE + 0x11C0) #define GPIO_W113 (GPIO_PORT_BASE + 0x11C4) #define GPIO_W114 (GPIO_PORT_BASE + 0x11C8) #define GPIO_W115 (GPIO_PORT_BASE + 0x11CC) #define GPIO_W116 (GPIO_PORT_BASE + 0x11D0) #define GPIO_W117 (GPIO_PORT_BASE + 0x11D4) #define GPIO_W118 (GPIO_PORT_BASE + 0x11D8) #define GPIO_W119 (GPIO_PORT_BASE + 0x11DC) #define GPIO_W120 (GPIO_PORT_BASE + 0x11E0) #define GPIO_W121 (GPIO_PORT_BASE + 0x11E4) #define GPIO_W122 (GPIO_PORT_BASE + 0x11E8) #define GPIO_W123 (GPIO_PORT_BASE + 0x11EC) #define GPIO_W124 (GPIO_PORT_BASE + 0x11F0) #define GPIO_W125 (GPIO_PORT_BASE + 0x11F4) #define GPIO_W126 (GPIO_PORT_BASE + 0x11F8) #define GPIO_W127 (GPIO_PORT_BASE + 0x11FC) /* Word pin registers port 4 (R/W) */ #define GPIO_W128 (GPIO_PORT_BASE + 0x1200) #define GPIO_W129 (GPIO_PORT_BASE + 0x1204) #define GPIO_W130 (GPIO_PORT_BASE + 0x1208) #define GPIO_W131 (GPIO_PORT_BASE + 0x120C) #define GPIO_W132 (GPIO_PORT_BASE + 0x1210) #define GPIO_W133 (GPIO_PORT_BASE + 0x1214) #define GPIO_W134 (GPIO_PORT_BASE + 0x1218) #define GPIO_W135 (GPIO_PORT_BASE + 0x121C) #define GPIO_W136 (GPIO_PORT_BASE + 0x1220) #define GPIO_W137 (GPIO_PORT_BASE + 0x1224) #define GPIO_W138 (GPIO_PORT_BASE + 0x1228) #define GPIO_W139 (GPIO_PORT_BASE + 0x122C) #define GPIO_W140 (GPIO_PORT_BASE + 0x1230) #define GPIO_W141 (GPIO_PORT_BASE + 0x1234) #define GPIO_W142 (GPIO_PORT_BASE + 0x1238) #define GPIO_W143 (GPIO_PORT_BASE + 0x123C) #define GPIO_W144 (GPIO_PORT_BASE + 0x1240) #define GPIO_W145 (GPIO_PORT_BASE + 0x1244) #define GPIO_W146 (GPIO_PORT_BASE + 0x1248) #define GPIO_W147 (GPIO_PORT_BASE + 0x124C) #define GPIO_W148 (GPIO_PORT_BASE + 0x1250) #define GPIO_W149 (GPIO_PORT_BASE + 0x1254) #define GPIO_W150 (GPIO_PORT_BASE + 0x1258) #define GPIO_W151 (GPIO_PORT_BASE + 0x125C) #define GPIO_W152 (GPIO_PORT_BASE + 0x1260) #define GPIO_W153 (GPIO_PORT_BASE + 0x1264) #define GPIO_W154 (GPIO_PORT_BASE + 0x1268) #define GPIO_W155 (GPIO_PORT_BASE + 0x126C) #define GPIO_W156 (GPIO_PORT_BASE + 0x1270) #define GPIO_W157 (GPIO_PORT_BASE + 0x1274) #define GPIO_W158 (GPIO_PORT_BASE + 0x1278) #define GPIO_W159 (GPIO_PORT_BASE + 0x127C) /* Word pin registers port 5 (R/W) */ #define GPIO_W160 (GPIO_PORT_BASE + 0x1280) #define GPIO_W161 (GPIO_PORT_BASE + 0x1284) #define GPIO_W162 (GPIO_PORT_BASE + 0x1288) #define GPIO_W163 (GPIO_PORT_BASE + 0x128C) #define GPIO_W164 (GPIO_PORT_BASE + 0x1290) #define GPIO_W165 (GPIO_PORT_BASE + 0x1294) #define GPIO_W166 (GPIO_PORT_BASE + 0x1298) #define GPIO_W167 (GPIO_PORT_BASE + 0x129C) #define GPIO_W168 (GPIO_PORT_BASE + 0x12A0) #define GPIO_W169 (GPIO_PORT_BASE + 0x12A4) #define GPIO_W170 (GPIO_PORT_BASE + 0x12A8) #define GPIO_W171 (GPIO_PORT_BASE + 0x12AC) #define GPIO_W172 (GPIO_PORT_BASE + 0x12B0) #define GPIO_W173 (GPIO_PORT_BASE + 0x12B4) #define GPIO_W174 (GPIO_PORT_BASE + 0x12B8) #define GPIO_W175 (GPIO_PORT_BASE + 0x12BC) #define GPIO_W176 (GPIO_PORT_BASE + 0x12C0) #define GPIO_W177 (GPIO_PORT_BASE + 0x12C4) #define GPIO_W178 (GPIO_PORT_BASE + 0x12C8) #define GPIO_W179 (GPIO_PORT_BASE + 0x12CC) #define GPIO_W180 (GPIO_PORT_BASE + 0x12D0) #define GPIO_W181 (GPIO_PORT_BASE + 0x12D4) #define GPIO_W182 (GPIO_PORT_BASE + 0x12D8) #define GPIO_W183 (GPIO_PORT_BASE + 0x12DC) #define GPIO_W184 (GPIO_PORT_BASE + 0x12E0) #define GPIO_W185 (GPIO_PORT_BASE + 0x12E4) #define GPIO_W186 (GPIO_PORT_BASE + 0x12E8) #define GPIO_W187 (GPIO_PORT_BASE + 0x12EC) #define GPIO_W188 (GPIO_PORT_BASE + 0x12F0) #define GPIO_W189 (GPIO_PORT_BASE + 0x12F4) #define GPIO_W190 (GPIO_PORT_BASE + 0x12F8) #define GPIO_W191 (GPIO_PORT_BASE + 0x12FC) /* Word pin registers port 6 (R/W) */ #define GPIO_W192 (GPIO_PORT_BASE + 0x1300) #define GPIO_W193 (GPIO_PORT_BASE + 0x1304) #define GPIO_W194 (GPIO_PORT_BASE + 0x1308) #define GPIO_W195 (GPIO_PORT_BASE + 0x130C) #define GPIO_W196 (GPIO_PORT_BASE + 0x1310) #define GPIO_W197 (GPIO_PORT_BASE + 0x1314) #define GPIO_W198 (GPIO_PORT_BASE + 0x1318) #define GPIO_W199 (GPIO_PORT_BASE + 0x131C) #define GPIO_W200 (GPIO_PORT_BASE + 0x1320) #define GPIO_W201 (GPIO_PORT_BASE + 0x1324) #define GPIO_W202 (GPIO_PORT_BASE + 0x1328) #define GPIO_W203 (GPIO_PORT_BASE + 0x132C) #define GPIO_W204 (GPIO_PORT_BASE + 0x1330) #define GPIO_W205 (GPIO_PORT_BASE + 0x1334) #define GPIO_W206 (GPIO_PORT_BASE + 0x1338) #define GPIO_W207 (GPIO_PORT_BASE + 0x133C) #define GPIO_W208 (GPIO_PORT_BASE + 0x1340) #define GPIO_W209 (GPIO_PORT_BASE + 0x1344) #define GPIO_W210 (GPIO_PORT_BASE + 0x1348) #define GPIO_W211 (GPIO_PORT_BASE + 0x134C) #define GPIO_W212 (GPIO_PORT_BASE + 0x1350) #define GPIO_W213 (GPIO_PORT_BASE + 0x1354) #define GPIO_W214 (GPIO_PORT_BASE + 0x1358) #define GPIO_W215 (GPIO_PORT_BASE + 0x135C) #define GPIO_W216 (GPIO_PORT_BASE + 0x1360) #define GPIO_W217 (GPIO_PORT_BASE + 0x1364) #define GPIO_W218 (GPIO_PORT_BASE + 0x1368) #define GPIO_W219 (GPIO_PORT_BASE + 0x136C) #define GPIO_W220 (GPIO_PORT_BASE + 0x1370) #define GPIO_W221 (GPIO_PORT_BASE + 0x1374) #define GPIO_W222 (GPIO_PORT_BASE + 0x1378) #define GPIO_W223 (GPIO_PORT_BASE + 0x137C) /* Word pin registers port 7 (R/W) */ #define GPIO_W224 (GPIO_PORT_BASE + 0x1380) #define GPIO_W225 (GPIO_PORT_BASE + 0x1384) #define GPIO_W226 (GPIO_PORT_BASE + 0x1388) #define GPIO_W227 (GPIO_PORT_BASE + 0x138C) #define GPIO_W228 (GPIO_PORT_BASE + 0x1390) #define GPIO_W229 (GPIO_PORT_BASE + 0x1394) #define GPIO_W230 (GPIO_PORT_BASE + 0x1398) #define GPIO_W231 (GPIO_PORT_BASE + 0x139C) #define GPIO_W232 (GPIO_PORT_BASE + 0x13A0) #define GPIO_W233 (GPIO_PORT_BASE + 0x13A4) #define GPIO_W234 (GPIO_PORT_BASE + 0x13A8) #define GPIO_W235 (GPIO_PORT_BASE + 0x13AC) #define GPIO_W236 (GPIO_PORT_BASE + 0x13B0) #define GPIO_W237 (GPIO_PORT_BASE + 0x13B4) #define GPIO_W238 (GPIO_PORT_BASE + 0x13B8) #define GPIO_W239 (GPIO_PORT_BASE + 0x13BC) #define GPIO_W240 (GPIO_PORT_BASE + 0x13C0) #define GPIO_W241 (GPIO_PORT_BASE + 0x13C4) #define GPIO_W242 (GPIO_PORT_BASE + 0x13C8) #define GPIO_W243 (GPIO_PORT_BASE + 0x13CC) #define GPIO_W244 (GPIO_PORT_BASE + 0x13D0) #define GPIO_W245 (GPIO_PORT_BASE + 0x13D4) #define GPIO_W246 (GPIO_PORT_BASE + 0x13D8) #define GPIO_W247 (GPIO_PORT_BASE + 0x13DC) #define GPIO_W248 (GPIO_PORT_BASE + 0x13E0) #define GPIO_W249 (GPIO_PORT_BASE + 0x13E4) #define GPIO_W250 (GPIO_PORT_BASE + 0x13E8) #define GPIO_W251 (GPIO_PORT_BASE + 0x13EC) #define GPIO_W252 (GPIO_PORT_BASE + 0x13F0) #define GPIO_W253 (GPIO_PORT_BASE + 0x13F4) #define GPIO_W254 (GPIO_PORT_BASE + 0x13F8) #define GPIO_W255 (GPIO_PORT_BASE + 0x13FC) /* GPIO data direction register (GPIOn_DIR) */ #define GPIO_DIR(port) MMIO32(port + 0x00) #define GPIO0_DIR GPIO_DIR(GPIO0) #define GPIO1_DIR GPIO_DIR(GPIO1) #define GPIO2_DIR GPIO_DIR(GPIO2) #define GPIO3_DIR GPIO_DIR(GPIO3) #define GPIO4_DIR GPIO_DIR(GPIO4) #define GPIO5_DIR GPIO_DIR(GPIO5) #define GPIO6_DIR GPIO_DIR(GPIO6) #define GPIO7_DIR GPIO_DIR(GPIO7) /* GPIO fast mask register (GPIOn_MASK) */ #define GPIO_MASK(port) MMIO32(port + 0x80) #define GPIO0_MASK GPIO_MASK(GPIO0) #define GPIO1_MASK GPIO_MASK(GPIO1) #define GPIO2_MASK GPIO_MASK(GPIO2) #define GPIO3_MASK GPIO_MASK(GPIO3) #define GPIO4_MASK GPIO_MASK(GPIO4) #define GPIO5_MASK GPIO_MASK(GPIO5) #define GPIO6_MASK GPIO_MASK(GPIO6) #define GPIO7_MASK GPIO_MASK(GPIO7) /* GPIO port pin value register (GPIOn_PIN) */ #define GPIO_PIN(port) MMIO32(port + 0x100) #define GPIO0_PIN GPIO_PIN(GPIO0) #define GPIO1_PIN GPIO_PIN(GPIO1) #define GPIO2_PIN GPIO_PIN(GPIO2) #define GPIO3_PIN GPIO_PIN(GPIO3) #define GPIO4_PIN GPIO_PIN(GPIO4) #define GPIO5_PIN GPIO_PIN(GPIO5) #define GPIO6_PIN GPIO_PIN(GPIO6) #define GPIO7_PIN GPIO_PIN(GPIO7) /* GPIO port masked pin value register (GPIOn_MPIN) */ #define GPIO_MPIN(port) MMIO32(port + 0x180) #define GPIO0_MPIN GPIO_MPIN(GPIO0) #define GPIO1_MPIN GPIO_MPIN(GPIO1) #define GPIO2_MPIN GPIO_MPIN(GPIO2) #define GPIO3_MPIN GPIO_MPIN(GPIO3) #define GPIO4_MPIN GPIO_MPIN(GPIO4) #define GPIO5_MPIN GPIO_MPIN(GPIO5) #define GPIO6_MPIN GPIO_MPIN(GPIO6) #define GPIO7_MPIN GPIO_MPIN(GPIO7) /* GPIO port output set register (GPIOn_SET) */ #define GPIO_SET(port) MMIO32(port + 0x200) #define GPIO0_SET GPIO_SET(GPIO0) #define GPIO1_SET GPIO_SET(GPIO1) #define GPIO2_SET GPIO_SET(GPIO2) #define GPIO3_SET GPIO_SET(GPIO3) #define GPIO4_SET GPIO_SET(GPIO4) #define GPIO5_SET GPIO_SET(GPIO5) #define GPIO6_SET GPIO_SET(GPIO6) #define GPIO7_SET GPIO_SET(GPIO7) /* GPIO port output clear register (GPIOn_CLR) */ #define GPIO_CLR(port) MMIO32(port + 0x280) #define GPIO0_CLR GPIO_CLR(GPIO0) #define GPIO1_CLR GPIO_CLR(GPIO1) #define GPIO2_CLR GPIO_CLR(GPIO2) #define GPIO3_CLR GPIO_CLR(GPIO3) #define GPIO4_CLR GPIO_CLR(GPIO4) #define GPIO5_CLR GPIO_CLR(GPIO5) #define GPIO6_CLR GPIO_CLR(GPIO6) #define GPIO7_CLR GPIO_CLR(GPIO7) /* GPIO port toggle register (GPIOn_NOT) */ #define GPIO_NOT(port) MMIO32(port + 0x300) #define GPIO0_NOT GPIO_NOT(GPIO0) #define GPIO1_NOT GPIO_NOT(GPIO1) #define GPIO2_NOT GPIO_NOT(GPIO2) #define GPIO3_NOT GPIO_NOT(GPIO3) #define GPIO4_NOT GPIO_NOT(GPIO4) #define GPIO5_NOT GPIO_NOT(GPIO5) #define GPIO6_NOT GPIO_NOT(GPIO6) #define GPIO7_NOT GPIO_NOT(GPIO7) /* TODO interrupts */ BEGIN_DECLS void gpio_set(uint32_t gpioport, uint32_t gpios); void gpio_clear(uint32_t gpioport, uint32_t gpios); void gpio_toggle(uint32_t gpioport, uint32_t gpios); uint32_t gpio_get(uint32_t gpioport, uint32_t gpios); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines @brief Defined Constants and Types for the LPC43xx I2C @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_I2C_H #define LPC43XX_I2C_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* I2C port base addresses (for convenience) */ #define I2C0 I2C0_BASE #define I2C1 I2C1_BASE /* --- I2C registers ------------------------------------------------------- */ /* I2C Control Set Register */ #define I2C_CONSET(port) MMIO32(port + 0x000) #define I2C0_CONSET I2C_CONSET(I2C0) #define I2C1_CONSET I2C_CONSET(I2C1) /* I2C Status Register */ #define I2C_STAT(port) MMIO32(port + 0x004) #define I2C0_STAT I2C_STAT(I2C0) #define I2C1_STAT I2C_STAT(I2C1) /* I2C Data Register */ #define I2C_DAT(port) MMIO32(port + 0x008) #define I2C0_DAT I2C_DAT(I2C0) #define I2C1_DAT I2C_DAT(I2C1) /* I2C Slave Address Register 0 */ #define I2C_ADR0(port) MMIO32(port + 0x00C) #define I2C0_ADR0 I2C_ADR0(I2C0) #define I2C1_ADR0 I2C_ADR0(I2C1) /* SCH Duty Cycle Register High Half Word */ #define I2C_SCLH(port) MMIO32(port + 0x010) #define I2C0_SCLH I2C_SCLH(I2C0) #define I2C1_SCLH I2C_SCLH(I2C1) /* SCL Duty Cycle Register Low Half Word */ #define I2C_SCLL(port) MMIO32(port + 0x014) #define I2C0_SCLL I2C_SCLL(I2C0) #define I2C1_SCLL I2C_SCLL(I2C1) /* I2C Control Clear Register */ #define I2C_CONCLR(port) MMIO32(port + 0x018) #define I2C0_CONCLR I2C_CONCLR(I2C0) #define I2C1_CONCLR I2C_CONCLR(I2C1) /* Monitor mode control register */ #define I2C_MMCTRL(port) MMIO32(port + 0x01C) #define I2C0_MMCTRL I2C_MMCTRL(I2C0) #define I2C1_MMCTRL I2C_MMCTRL(I2C1) /* I2C Slave Address Register 1 */ #define I2C_ADR1(port) MMIO32(port + 0x020) #define I2C0_ADR1 I2C_ADR1(I2C0) #define I2C1_ADR1 I2C_ADR1(I2C1) /* I2C Slave Address Register 2 */ #define I2C_ADR2(port) MMIO32(port + 0x024) #define I2C0_ADR2 I2C_ADR2(I2C0) #define I2C1_ADR2 I2C_ADR2(I2C1) /* I2C Slave Address Register 3 */ #define I2C_ADR3(port) MMIO32(port + 0x028) #define I2C0_ADR3 I2C_ADR3(I2C0) #define I2C1_ADR3 I2C_ADR3(I2C1) /* Data buffer register */ #define I2C_DATA_BUFFER(port) MMIO32(port + 0x02C) #define I2C0_DATA_BUFFER I2C_DATA_BUFFER(I2C0) #define I2C1_DATA_BUFFER I2C_DATA_BUFFER(I2C1) /* I2C Slave address mask register 0 */ #define I2C_MASK0(port) MMIO32(port + 0x030) #define I2C0_MASK0 I2C_MASK0(I2C0) #define I2C1_MASK0 I2C_MASK0(I2C1) /* I2C Slave address mask register 1 */ #define I2C_MASK1(port) MMIO32(port + 0x034) #define I2C0_MASK1 I2C_MASK1(I2C0) #define I2C1_MASK1 I2C_MASK1(I2C1) /* I2C Slave address mask register 2 */ #define I2C_MASK2(port) MMIO32(port + 0x038) #define I2C0_MASK2 I2C_MASK2(I2C0) #define I2C1_MASK2 I2C_MASK2(I2C1) /* I2C Slave address mask register 3 */ #define I2C_MASK3(port) MMIO32(port + 0x03C) #define I2C0_MASK3 I2C_MASK3(I2C0) #define I2C1_MASK3 I2C_MASK3(I2C1) /* --- I2Cx_CONCLR values -------------------------------------------------- */ #define I2C_CONCLR_AAC (1 << 2) /* Assert acknowledge Clear */ #define I2C_CONCLR_SIC (1 << 3) /* I2C interrupt Clear */ #define I2C_CONCLR_STAC (1 << 5) /* START flag Clear */ #define I2C_CONCLR_I2ENC (1 << 6) /* I2C interface Disable bit */ /* --- I2Cx_CONSET values -------------------------------------------------- */ #define I2C_CONSET_AA (1 << 2) /* Assert acknowledge flag */ #define I2C_CONSET_SI (1 << 3) /* I2C interrupt flag */ #define I2C_CONSET_STO (1 << 4) /* STOP flag */ #define I2C_CONSET_STA (1 << 5) /* START flag */ #define I2C_CONSET_I2EN (1 << 6) /* I2C interface enable */ /* --- I2C const definitions ----------------------------------------------- */ #define I2C_WRITE 0 #define I2C_READ 1 /* --- I2C function prototypes --------------------------------------------- */ BEGIN_DECLS void i2c0_init(const uint16_t duty_cycle_count); void i2c0_tx_start(void); void i2c0_tx_byte(uint8_t byte); uint8_t i2c0_rx_byte(void); void i2c0_stop(void); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/i2s.h ================================================ /** @defgroup i2s_defines I2S Defines @brief Defined Constants and Types for the LPC43xx I2S @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_I2S_H #define LPC43XX_I2S_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* I2S port base addresses (for convenience) */ #define I2S0 I2S0_BASE #define I2S1 I2S1_BASE /* --- I2S registers ------------------------------------------------------- */ /* I2S Digital Audio Output Register */ #define I2S_DAO(port) MMIO32(port + 0x000) #define I2S0_DAO I2S_DAO(I2S0) #define I2S1_DAO I2S_DAO(I2S1) /* I2S Digital Audio Input Register */ #define I2S_DAI(port) MMIO32(port + 0x004) #define I2S0_DAI I2S_DAI(I2S0) #define I2S1_DAI I2S_DAI(I2S1) /* I2S Transmit FIFO */ #define I2S_TXFIFO(port) MMIO32(port + 0x008) #define I2S0_TXFIFO I2S_TXFIFO(I2S0) #define I2S1_TXFIFO I2S_TXFIFO(I2S1) /* I2S Receive FIFO */ #define I2S_RXFIFO(port) MMIO32(port + 0x00C) #define I2S0_RXFIFO I2S_RXFIFO(I2S0) #define I2S1_RXFIFO I2S_RXFIFO(I2S1) /* I2S Status Feedback Register */ #define I2S_STATE(port) MMIO32(port + 0x010) #define I2S0_STATE I2S_STATE(I2S0) #define I2S1_STATE I2S_STATE(I2S1) /* I2S DMA Configuration Register 1 */ #define I2S_DMA1(port) MMIO32(port + 0x014) #define I2S0_DMA1 I2S_DMA1(I2S0) #define I2S1_DMA1 I2S_DMA1(I2S1) /* I2S DMA Configuration Register 2 */ #define I2S_DMA2(port) MMIO32(port + 0x018) #define I2S0_DMA2 I2S_DMA2(I2S0) #define I2S1_DMA2 I2S_DMA2(I2S1) /* I2S Interrupt Request Control Register */ #define I2S_IRQ(port) MMIO32(port + 0x01C) #define I2S0_IRQ I2S_IRQ(I2S0) #define I2S1_IRQ I2S_IRQ(I2S1) /* I2S Transmit MCLK divider */ #define I2S_TXRATE(port) MMIO32(port + 0x020) #define I2S0_TXRATE I2S_TXRATE(I2S0) #define I2S1_TXRATE I2S_TXRATE(I2S1) /* I2S Receive MCLK divider */ #define I2S_RXRATE(port) MMIO32(port + 0x024) #define I2S0_RXRATE I2S_RXRATE(I2S0) #define I2S1_RXRATE I2S_RXRATE(I2S1) /* I2S Transmit bit rate divider */ #define I2S_TXBITRATE(port) MMIO32(port + 0x028) #define I2S0_TXBITRATE I2S_TXBITRATE(I2S0) #define I2S1_TXBITRATE I2S_TXBITRATE(I2S1) /* I2S Receive bit rate divider */ #define I2S_RXBITRATE(port) MMIO32(port + 0x02C) #define I2S0_RXBITRATE I2S_RXBITRATE(I2S0) #define I2S1_RXBITRATE I2S_RXBITRATE(I2S1) /* I2S Transmit mode control */ #define I2S_TXMODE(port) MMIO32(port + 0x030) #define I2S0_TXMODE I2S_TXMODE(I2S0) #define I2S1_TXMODE I2S_TXMODE(I2S1) /* I2S Receive mode control */ #define I2S_RXMODE(port) MMIO32(port + 0x034) #define I2S0_RXMODE I2S_RXMODE(I2S0) #define I2S1_RXMODE I2S_RXMODE(I2S1) /* --- I2S0_DAO values ------------------------------------------ */ /* WORDWIDTH: Selects the number of bytes in data */ #define I2S0_DAO_WORDWIDTH_SHIFT (0) #define I2S0_DAO_WORDWIDTH_MASK (0x3 << I2S0_DAO_WORDWIDTH_SHIFT) #define I2S0_DAO_WORDWIDTH(x) ((x) << I2S0_DAO_WORDWIDTH_SHIFT) /* MONO: When 1, data is of monaural format. When 0, the data is in stereo format */ #define I2S0_DAO_MONO_SHIFT (2) #define I2S0_DAO_MONO_MASK (0x1 << I2S0_DAO_MONO_SHIFT) #define I2S0_DAO_MONO(x) ((x) << I2S0_DAO_MONO_SHIFT) /* STOP: When 1, disables accesses on FIFOs, places the transmit channel in mute mode */ #define I2S0_DAO_STOP_SHIFT (3) #define I2S0_DAO_STOP_MASK (0x1 << I2S0_DAO_STOP_SHIFT) #define I2S0_DAO_STOP(x) ((x) << I2S0_DAO_STOP_SHIFT) /* RESET: When 1, asynchronously resets the transmit channel and FIFO */ #define I2S0_DAO_RESET_SHIFT (4) #define I2S0_DAO_RESET_MASK (0x1 << I2S0_DAO_RESET_SHIFT) #define I2S0_DAO_RESET(x) ((x) << I2S0_DAO_RESET_SHIFT) /* WS_SEL: When 0, the interface is in master mode. When 1, the interface is in slave mode */ #define I2S0_DAO_WS_SEL_SHIFT (5) #define I2S0_DAO_WS_SEL_MASK (0x1 << I2S0_DAO_WS_SEL_SHIFT) #define I2S0_DAO_WS_SEL(x) ((x) << I2S0_DAO_WS_SEL_SHIFT) /* WS_HALFPERIOD: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. */ #define I2S0_DAO_WS_HALFPERIOD_SHIFT (6) #define I2S0_DAO_WS_HALFPERIOD_MASK (0x1ff << I2S0_DAO_WS_HALFPERIOD_SHIFT) #define I2S0_DAO_WS_HALFPERIOD(x) ((x) << I2S0_DAO_WS_HALFPERIOD_SHIFT) /* MUTE: When 1, the transmit channel sends only zeroes */ #define I2S0_DAO_MUTE_SHIFT (15) #define I2S0_DAO_MUTE_MASK (0x1 << I2S0_DAO_MUTE_SHIFT) #define I2S0_DAO_MUTE(x) ((x) << I2S0_DAO_MUTE_SHIFT) /* --- I2S1_DAO values ------------------------------------------ */ /* WORDWIDTH: Selects the number of bytes in data */ #define I2S1_DAO_WORDWIDTH_SHIFT (0) #define I2S1_DAO_WORDWIDTH_MASK (0x3 << I2S1_DAO_WORDWIDTH_SHIFT) #define I2S1_DAO_WORDWIDTH(x) ((x) << I2S1_DAO_WORDWIDTH_SHIFT) /* MONO: When 1, data is of monaural format. When 0, the data is in stereo format */ #define I2S1_DAO_MONO_SHIFT (2) #define I2S1_DAO_MONO_MASK (0x1 << I2S1_DAO_MONO_SHIFT) #define I2S1_DAO_MONO(x) ((x) << I2S1_DAO_MONO_SHIFT) /* STOP: When 1, disables accesses on FIFOs, places the transmit channel in mute mode */ #define I2S1_DAO_STOP_SHIFT (3) #define I2S1_DAO_STOP_MASK (0x1 << I2S1_DAO_STOP_SHIFT) #define I2S1_DAO_STOP(x) ((x) << I2S1_DAO_STOP_SHIFT) /* RESET: When 1, asynchronously resets the transmit channel and FIFO */ #define I2S1_DAO_RESET_SHIFT (4) #define I2S1_DAO_RESET_MASK (0x1 << I2S1_DAO_RESET_SHIFT) #define I2S1_DAO_RESET(x) ((x) << I2S1_DAO_RESET_SHIFT) /* WS_SEL: When 0, the interface is in master mode. When 1, the interface is in slave mode */ #define I2S1_DAO_WS_SEL_SHIFT (5) #define I2S1_DAO_WS_SEL_MASK (0x1 << I2S1_DAO_WS_SEL_SHIFT) #define I2S1_DAO_WS_SEL(x) ((x) << I2S1_DAO_WS_SEL_SHIFT) /* WS_HALFPERIOD: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. */ #define I2S1_DAO_WS_HALFPERIOD_SHIFT (6) #define I2S1_DAO_WS_HALFPERIOD_MASK (0x1ff << I2S1_DAO_WS_HALFPERIOD_SHIFT) #define I2S1_DAO_WS_HALFPERIOD(x) ((x) << I2S1_DAO_WS_HALFPERIOD_SHIFT) /* MUTE: When 1, the transmit channel sends only zeroes */ #define I2S1_DAO_MUTE_SHIFT (15) #define I2S1_DAO_MUTE_MASK (0x1 << I2S1_DAO_MUTE_SHIFT) #define I2S1_DAO_MUTE(x) ((x) << I2S1_DAO_MUTE_SHIFT) /* --- I2S0_DAI values ------------------------------------------ */ /* WORDWIDTH: Selects the number of bytes in data */ #define I2S0_DAI_WORDWIDTH_SHIFT (0) #define I2S0_DAI_WORDWIDTH_MASK (0x3 << I2S0_DAI_WORDWIDTH_SHIFT) #define I2S0_DAI_WORDWIDTH(x) ((x) << I2S0_DAI_WORDWIDTH_SHIFT) /* MONO: When 1, data is of monaural format. When 0, the data is in stereo format */ #define I2S0_DAI_MONO_SHIFT (2) #define I2S0_DAI_MONO_MASK (0x1 << I2S0_DAI_MONO_SHIFT) #define I2S0_DAI_MONO(x) ((x) << I2S0_DAI_MONO_SHIFT) /* STOP: When 1, disables accesses on FIFOs, places the transmit channel in mute mode */ #define I2S0_DAI_STOP_SHIFT (3) #define I2S0_DAI_STOP_MASK (0x1 << I2S0_DAI_STOP_SHIFT) #define I2S0_DAI_STOP(x) ((x) << I2S0_DAI_STOP_SHIFT) /* RESET: When 1, asynchronously resets the transmit channel and FIFO */ #define I2S0_DAI_RESET_SHIFT (4) #define I2S0_DAI_RESET_MASK (0x1 << I2S0_DAI_RESET_SHIFT) #define I2S0_DAI_RESET(x) ((x) << I2S0_DAI_RESET_SHIFT) /* WS_SEL: When 0, the interface is in master mode. When 1, the interface is in slave mode */ #define I2S0_DAI_WS_SEL_SHIFT (5) #define I2S0_DAI_WS_SEL_MASK (0x1 << I2S0_DAI_WS_SEL_SHIFT) #define I2S0_DAI_WS_SEL(x) ((x) << I2S0_DAI_WS_SEL_SHIFT) /* WS_HALFPERIOD: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. */ #define I2S0_DAI_WS_HALFPERIOD_SHIFT (6) #define I2S0_DAI_WS_HALFPERIOD_MASK (0x1ff << I2S0_DAI_WS_HALFPERIOD_SHIFT) #define I2S0_DAI_WS_HALFPERIOD(x) ((x) << I2S0_DAI_WS_HALFPERIOD_SHIFT) /* --- I2S1_DAI values ------------------------------------------ */ /* WORDWIDTH: Selects the number of bytes in data */ #define I2S1_DAI_WORDWIDTH_SHIFT (0) #define I2S1_DAI_WORDWIDTH_MASK (0x3 << I2S1_DAI_WORDWIDTH_SHIFT) #define I2S1_DAI_WORDWIDTH(x) ((x) << I2S1_DAI_WORDWIDTH_SHIFT) /* MONO: When 1, data is of monaural format. When 0, the data is in stereo format */ #define I2S1_DAI_MONO_SHIFT (2) #define I2S1_DAI_MONO_MASK (0x1 << I2S1_DAI_MONO_SHIFT) #define I2S1_DAI_MONO(x) ((x) << I2S1_DAI_MONO_SHIFT) /* STOP: When 1, disables accesses on FIFOs, places the transmit channel in mute mode */ #define I2S1_DAI_STOP_SHIFT (3) #define I2S1_DAI_STOP_MASK (0x1 << I2S1_DAI_STOP_SHIFT) #define I2S1_DAI_STOP(x) ((x) << I2S1_DAI_STOP_SHIFT) /* RESET: When 1, asynchronously resets the transmit channel and FIFO */ #define I2S1_DAI_RESET_SHIFT (4) #define I2S1_DAI_RESET_MASK (0x1 << I2S1_DAI_RESET_SHIFT) #define I2S1_DAI_RESET(x) ((x) << I2S1_DAI_RESET_SHIFT) /* WS_SEL: When 0, the interface is in master mode. When 1, the interface is in slave mode */ #define I2S1_DAI_WS_SEL_SHIFT (5) #define I2S1_DAI_WS_SEL_MASK (0x1 << I2S1_DAI_WS_SEL_SHIFT) #define I2S1_DAI_WS_SEL(x) ((x) << I2S1_DAI_WS_SEL_SHIFT) /* WS_HALFPERIOD: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. */ #define I2S1_DAI_WS_HALFPERIOD_SHIFT (6) #define I2S1_DAI_WS_HALFPERIOD_MASK (0x1ff << I2S1_DAI_WS_HALFPERIOD_SHIFT) #define I2S1_DAI_WS_HALFPERIOD(x) ((x) << I2S1_DAI_WS_HALFPERIOD_SHIFT) /* --- I2S0_TXFIFO values --------------------------------------- */ /* I2STXFIFO: 8 x 32-bit transmit FIFO */ #define I2S0_TXFIFO_I2STXFIFO_SHIFT (0) #define I2S0_TXFIFO_I2STXFIFO_MASK (0xffffffff << I2S0_TXFIFO_I2STXFIFO_SHIFT) #define I2S0_TXFIFO_I2STXFIFO(x) ((x) << I2S0_TXFIFO_I2STXFIFO_SHIFT) /* --- I2S1_TXFIFO values --------------------------------------- */ /* I2STXFIFO: 8 x 32-bit transmit FIFO */ #define I2S1_TXFIFO_I2STXFIFO_SHIFT (0) #define I2S1_TXFIFO_I2STXFIFO_MASK (0xffffffff << I2S1_TXFIFO_I2STXFIFO_SHIFT) #define I2S1_TXFIFO_I2STXFIFO(x) ((x) << I2S1_TXFIFO_I2STXFIFO_SHIFT) /* --- I2S0_RXFIFO values --------------------------------------- */ /* I2SRXFIFO: 8 x 32-bit receive FIFO */ #define I2S0_RXFIFO_I2SRXFIFO_SHIFT (0) #define I2S0_RXFIFO_I2SRXFIFO_MASK (0xffffffff << I2S0_RXFIFO_I2SRXFIFO_SHIFT) #define I2S0_RXFIFO_I2SRXFIFO(x) ((x) << I2S0_RXFIFO_I2SRXFIFO_SHIFT) /* --- I2S1_RXFIFO values --------------------------------------- */ /* I2SRXFIFO: 8 x 32-bit receive FIFO */ #define I2S1_RXFIFO_I2SRXFIFO_SHIFT (0) #define I2S1_RXFIFO_I2SRXFIFO_MASK (0xffffffff << I2S1_RXFIFO_I2SRXFIFO_SHIFT) #define I2S1_RXFIFO_I2SRXFIFO(x) ((x) << I2S1_RXFIFO_I2SRXFIFO_SHIFT) /* --- I2S0_STATE values ---------------------------------------- */ /* IRQ: This bit reflects the presence of Receive Interrupt or Transmit Interrupt */ #define I2S0_STATE_IRQ_SHIFT (0) #define I2S0_STATE_IRQ_MASK (0x1 << I2S0_STATE_IRQ_SHIFT) #define I2S0_STATE_IRQ(x) ((x) << I2S0_STATE_IRQ_SHIFT) /* DMAREQ1: This bit reflects the presence of Receive or Transmit DMA Request 1 */ #define I2S0_STATE_DMAREQ1_SHIFT (1) #define I2S0_STATE_DMAREQ1_MASK (0x1 << I2S0_STATE_DMAREQ1_SHIFT) #define I2S0_STATE_DMAREQ1(x) ((x) << I2S0_STATE_DMAREQ1_SHIFT) /* DMAREQ2: This bit reflects the presence of Receive or Transmit DMA Request 2 */ #define I2S0_STATE_DMAREQ2_SHIFT (2) #define I2S0_STATE_DMAREQ2_MASK (0x1 << I2S0_STATE_DMAREQ2_SHIFT) #define I2S0_STATE_DMAREQ2(x) ((x) << I2S0_STATE_DMAREQ2_SHIFT) /* RX_LEVEL: Reflects the current level of the Receive FIFO */ #define I2S0_STATE_RX_LEVEL_SHIFT (8) #define I2S0_STATE_RX_LEVEL_MASK (0xf << I2S0_STATE_RX_LEVEL_SHIFT) #define I2S0_STATE_RX_LEVEL(x) ((x) << I2S0_STATE_RX_LEVEL_SHIFT) /* TX_LEVEL: Reflects the current level of the Transmit FIFO */ #define I2S0_STATE_TX_LEVEL_SHIFT (16) #define I2S0_STATE_TX_LEVEL_MASK (0xf << I2S0_STATE_TX_LEVEL_SHIFT) #define I2S0_STATE_TX_LEVEL(x) ((x) << I2S0_STATE_TX_LEVEL_SHIFT) /* --- I2S1_STATE values ---------------------------------------- */ /* IRQ: This bit reflects the presence of Receive Interrupt or Transmit Interrupt */ #define I2S1_STATE_IRQ_SHIFT (0) #define I2S1_STATE_IRQ_MASK (0x1 << I2S1_STATE_IRQ_SHIFT) #define I2S1_STATE_IRQ(x) ((x) << I2S1_STATE_IRQ_SHIFT) /* DMAREQ1: This bit reflects the presence of Receive or Transmit DMA Request 1 */ #define I2S1_STATE_DMAREQ1_SHIFT (1) #define I2S1_STATE_DMAREQ1_MASK (0x1 << I2S1_STATE_DMAREQ1_SHIFT) #define I2S1_STATE_DMAREQ1(x) ((x) << I2S1_STATE_DMAREQ1_SHIFT) /* DMAREQ2: This bit reflects the presence of Receive or Transmit DMA Request 2 */ #define I2S1_STATE_DMAREQ2_SHIFT (2) #define I2S1_STATE_DMAREQ2_MASK (0x1 << I2S1_STATE_DMAREQ2_SHIFT) #define I2S1_STATE_DMAREQ2(x) ((x) << I2S1_STATE_DMAREQ2_SHIFT) /* RX_LEVEL: Reflects the current level of the Receive FIFO */ #define I2S1_STATE_RX_LEVEL_SHIFT (8) #define I2S1_STATE_RX_LEVEL_MASK (0xf << I2S1_STATE_RX_LEVEL_SHIFT) #define I2S1_STATE_RX_LEVEL(x) ((x) << I2S1_STATE_RX_LEVEL_SHIFT) /* TX_LEVEL: Reflects the current level of the Transmit FIFO */ #define I2S1_STATE_TX_LEVEL_SHIFT (16) #define I2S1_STATE_TX_LEVEL_MASK (0xf << I2S1_STATE_TX_LEVEL_SHIFT) #define I2S1_STATE_TX_LEVEL(x) ((x) << I2S1_STATE_TX_LEVEL_SHIFT) /* --- I2S0_DMA1 values ----------------------------------------- */ /* RX_DMA1_ENABLE: When 1, enables DMA1 for I2S receive */ #define I2S0_DMA1_RX_DMA1_ENABLE_SHIFT (0) #define I2S0_DMA1_RX_DMA1_ENABLE_MASK (0x1 << I2S0_DMA1_RX_DMA1_ENABLE_SHIFT) #define I2S0_DMA1_RX_DMA1_ENABLE(x) ((x) << I2S0_DMA1_RX_DMA1_ENABLE_SHIFT) /* TX_DMA1_ENABLE: When 1, enables DMA1 for I2S transmit */ #define I2S0_DMA1_TX_DMA1_ENABLE_SHIFT (1) #define I2S0_DMA1_TX_DMA1_ENABLE_MASK (0x1 << I2S0_DMA1_TX_DMA1_ENABLE_SHIFT) #define I2S0_DMA1_TX_DMA1_ENABLE(x) ((x) << I2S0_DMA1_TX_DMA1_ENABLE_SHIFT) /* RX_DEPTH_DMA1: Set the FIFO level that triggers a receive DMA request on DMA1 */ #define I2S0_DMA1_RX_DEPTH_DMA1_SHIFT (8) #define I2S0_DMA1_RX_DEPTH_DMA1_MASK (0xf << I2S0_DMA1_RX_DEPTH_DMA1_SHIFT) #define I2S0_DMA1_RX_DEPTH_DMA1(x) ((x) << I2S0_DMA1_RX_DEPTH_DMA1_SHIFT) /* TX_DEPTH_DMA1: Set the FIFO level that triggers a transmit DMA request on DMA1 */ #define I2S0_DMA1_TX_DEPTH_DMA1_SHIFT (16) #define I2S0_DMA1_TX_DEPTH_DMA1_MASK (0xf << I2S0_DMA1_TX_DEPTH_DMA1_SHIFT) #define I2S0_DMA1_TX_DEPTH_DMA1(x) ((x) << I2S0_DMA1_TX_DEPTH_DMA1_SHIFT) /* --- I2S1_DMA1 values ----------------------------------------- */ /* RX_DMA1_ENABLE: When 1, enables DMA1 for I2S receive */ #define I2S1_DMA1_RX_DMA1_ENABLE_SHIFT (0) #define I2S1_DMA1_RX_DMA1_ENABLE_MASK (0x1 << I2S1_DMA1_RX_DMA1_ENABLE_SHIFT) #define I2S1_DMA1_RX_DMA1_ENABLE(x) ((x) << I2S1_DMA1_RX_DMA1_ENABLE_SHIFT) /* TX_DMA1_ENABLE: When 1, enables DMA1 for I2S transmit */ #define I2S1_DMA1_TX_DMA1_ENABLE_SHIFT (1) #define I2S1_DMA1_TX_DMA1_ENABLE_MASK (0x1 << I2S1_DMA1_TX_DMA1_ENABLE_SHIFT) #define I2S1_DMA1_TX_DMA1_ENABLE(x) ((x) << I2S1_DMA1_TX_DMA1_ENABLE_SHIFT) /* RX_DEPTH_DMA1: Set the FIFO level that triggers a receive DMA request on DMA1 */ #define I2S1_DMA1_RX_DEPTH_DMA1_SHIFT (8) #define I2S1_DMA1_RX_DEPTH_DMA1_MASK (0xf << I2S1_DMA1_RX_DEPTH_DMA1_SHIFT) #define I2S1_DMA1_RX_DEPTH_DMA1(x) ((x) << I2S1_DMA1_RX_DEPTH_DMA1_SHIFT) /* TX_DEPTH_DMA1: Set the FIFO level that triggers a transmit DMA request on DMA1 */ #define I2S1_DMA1_TX_DEPTH_DMA1_SHIFT (16) #define I2S1_DMA1_TX_DEPTH_DMA1_MASK (0xf << I2S1_DMA1_TX_DEPTH_DMA1_SHIFT) #define I2S1_DMA1_TX_DEPTH_DMA1(x) ((x) << I2S1_DMA1_TX_DEPTH_DMA1_SHIFT) /* --- I2S0_DMA2 values ----------------------------------------- */ /* RX_DMA2_ENABLE: When 1, enables DMA2 for I2S receive */ #define I2S0_DMA2_RX_DMA2_ENABLE_SHIFT (0) #define I2S0_DMA2_RX_DMA2_ENABLE_MASK (0x1 << I2S0_DMA2_RX_DMA2_ENABLE_SHIFT) #define I2S0_DMA2_RX_DMA2_ENABLE(x) ((x) << I2S0_DMA2_RX_DMA2_ENABLE_SHIFT) /* TX_DMA2_ENABLE: When 1, enables DMA2 for I2S transmit */ #define I2S0_DMA2_TX_DMA2_ENABLE_SHIFT (1) #define I2S0_DMA2_TX_DMA2_ENABLE_MASK (0x1 << I2S0_DMA2_TX_DMA2_ENABLE_SHIFT) #define I2S0_DMA2_TX_DMA2_ENABLE(x) ((x) << I2S0_DMA2_TX_DMA2_ENABLE_SHIFT) /* RX_DEPTH_DMA2: Set the FIFO level that triggers a receive DMA request on DMA2 */ #define I2S0_DMA2_RX_DEPTH_DMA2_SHIFT (8) #define I2S0_DMA2_RX_DEPTH_DMA2_MASK (0xf << I2S0_DMA2_RX_DEPTH_DMA2_SHIFT) #define I2S0_DMA2_RX_DEPTH_DMA2(x) ((x) << I2S0_DMA2_RX_DEPTH_DMA2_SHIFT) /* TX_DEPTH_DMA2: Set the FIFO level that triggers a transmit DMA request on DMA2 */ #define I2S0_DMA2_TX_DEPTH_DMA2_SHIFT (16) #define I2S0_DMA2_TX_DEPTH_DMA2_MASK (0xf << I2S0_DMA2_TX_DEPTH_DMA2_SHIFT) #define I2S0_DMA2_TX_DEPTH_DMA2(x) ((x) << I2S0_DMA2_TX_DEPTH_DMA2_SHIFT) /* --- I2S1_DMA2 values ----------------------------------------- */ /* RX_DMA2_ENABLE: When 1, enables DMA2 for I2S receive */ #define I2S1_DMA2_RX_DMA2_ENABLE_SHIFT (0) #define I2S1_DMA2_RX_DMA2_ENABLE_MASK (0x1 << I2S1_DMA2_RX_DMA2_ENABLE_SHIFT) #define I2S1_DMA2_RX_DMA2_ENABLE(x) ((x) << I2S1_DMA2_RX_DMA2_ENABLE_SHIFT) /* TX_DMA2_ENABLE: When 1, enables DMA2 for I2S transmit */ #define I2S1_DMA2_TX_DMA2_ENABLE_SHIFT (1) #define I2S1_DMA2_TX_DMA2_ENABLE_MASK (0x1 << I2S1_DMA2_TX_DMA2_ENABLE_SHIFT) #define I2S1_DMA2_TX_DMA2_ENABLE(x) ((x) << I2S1_DMA2_TX_DMA2_ENABLE_SHIFT) /* RX_DEPTH_DMA2: Set the FIFO level that triggers a receive DMA request on DMA2 */ #define I2S1_DMA2_RX_DEPTH_DMA2_SHIFT (8) #define I2S1_DMA2_RX_DEPTH_DMA2_MASK (0xf << I2S1_DMA2_RX_DEPTH_DMA2_SHIFT) #define I2S1_DMA2_RX_DEPTH_DMA2(x) ((x) << I2S1_DMA2_RX_DEPTH_DMA2_SHIFT) /* TX_DEPTH_DMA2: Set the FIFO level that triggers a transmit DMA request on DMA2 */ #define I2S1_DMA2_TX_DEPTH_DMA2_SHIFT (16) #define I2S1_DMA2_TX_DEPTH_DMA2_MASK (0xf << I2S1_DMA2_TX_DEPTH_DMA2_SHIFT) #define I2S1_DMA2_TX_DEPTH_DMA2(x) ((x) << I2S1_DMA2_TX_DEPTH_DMA2_SHIFT) /* --- I2S0_IRQ values ------------------------------------------ */ /* RX_IRQ_ENABLE: When 1, enables I2S receive interrupt */ #define I2S0_IRQ_RX_IRQ_ENABLE_SHIFT (0) #define I2S0_IRQ_RX_IRQ_ENABLE_MASK (0x1 << I2S0_IRQ_RX_IRQ_ENABLE_SHIFT) #define I2S0_IRQ_RX_IRQ_ENABLE(x) ((x) << I2S0_IRQ_RX_IRQ_ENABLE_SHIFT) /* TX_IRQ_ENABLE: When 1, enables I2S transmit interrupt */ #define I2S0_IRQ_TX_IRQ_ENABLE_SHIFT (1) #define I2S0_IRQ_TX_IRQ_ENABLE_MASK (0x1 << I2S0_IRQ_TX_IRQ_ENABLE_SHIFT) #define I2S0_IRQ_TX_IRQ_ENABLE(x) ((x) << I2S0_IRQ_TX_IRQ_ENABLE_SHIFT) /* RX_DEPTH_IRQ: Set the FIFO level on which to create an irq request. */ #define I2S0_IRQ_RX_DEPTH_IRQ_SHIFT (8) #define I2S0_IRQ_RX_DEPTH_IRQ_MASK (0xf << I2S0_IRQ_RX_DEPTH_IRQ_SHIFT) #define I2S0_IRQ_RX_DEPTH_IRQ(x) ((x) << I2S0_IRQ_RX_DEPTH_IRQ_SHIFT) /* TX_DEPTH_IRQ: Set the FIFO level on which to create an irq request. */ #define I2S0_IRQ_TX_DEPTH_IRQ_SHIFT (16) #define I2S0_IRQ_TX_DEPTH_IRQ_MASK (0xf << I2S0_IRQ_TX_DEPTH_IRQ_SHIFT) #define I2S0_IRQ_TX_DEPTH_IRQ(x) ((x) << I2S0_IRQ_TX_DEPTH_IRQ_SHIFT) /* --- I2S1_IRQ values ------------------------------------------ */ /* RX_IRQ_ENABLE: When 1, enables I2S receive interrupt */ #define I2S1_IRQ_RX_IRQ_ENABLE_SHIFT (0) #define I2S1_IRQ_RX_IRQ_ENABLE_MASK (0x1 << I2S1_IRQ_RX_IRQ_ENABLE_SHIFT) #define I2S1_IRQ_RX_IRQ_ENABLE(x) ((x) << I2S1_IRQ_RX_IRQ_ENABLE_SHIFT) /* TX_IRQ_ENABLE: When 1, enables I2S transmit interrupt */ #define I2S1_IRQ_TX_IRQ_ENABLE_SHIFT (1) #define I2S1_IRQ_TX_IRQ_ENABLE_MASK (0x1 << I2S1_IRQ_TX_IRQ_ENABLE_SHIFT) #define I2S1_IRQ_TX_IRQ_ENABLE(x) ((x) << I2S1_IRQ_TX_IRQ_ENABLE_SHIFT) /* RX_DEPTH_IRQ: Set the FIFO level on which to create an irq request. */ #define I2S1_IRQ_RX_DEPTH_IRQ_SHIFT (8) #define I2S1_IRQ_RX_DEPTH_IRQ_MASK (0xf << I2S1_IRQ_RX_DEPTH_IRQ_SHIFT) #define I2S1_IRQ_RX_DEPTH_IRQ(x) ((x) << I2S1_IRQ_RX_DEPTH_IRQ_SHIFT) /* TX_DEPTH_IRQ: Set the FIFO level on which to create an irq request. */ #define I2S1_IRQ_TX_DEPTH_IRQ_SHIFT (16) #define I2S1_IRQ_TX_DEPTH_IRQ_MASK (0xf << I2S1_IRQ_TX_DEPTH_IRQ_SHIFT) #define I2S1_IRQ_TX_DEPTH_IRQ(x) ((x) << I2S1_IRQ_TX_DEPTH_IRQ_SHIFT) /* --- I2S0_TXRATE values --------------------------------------- */ /* Y_DIVIDER: I2S transmit MCLK rate denominator */ #define I2S0_TXRATE_Y_DIVIDER_SHIFT (0) #define I2S0_TXRATE_Y_DIVIDER_MASK (0xff << I2S0_TXRATE_Y_DIVIDER_SHIFT) #define I2S0_TXRATE_Y_DIVIDER(x) ((x) << I2S0_TXRATE_Y_DIVIDER_SHIFT) /* X_DIVIDER: I2S transmit MCLK rate numerator */ #define I2S0_TXRATE_X_DIVIDER_SHIFT (8) #define I2S0_TXRATE_X_DIVIDER_MASK (0xff << I2S0_TXRATE_X_DIVIDER_SHIFT) #define I2S0_TXRATE_X_DIVIDER(x) ((x) << I2S0_TXRATE_X_DIVIDER_SHIFT) /* --- I2S1_TXRATE values --------------------------------------- */ /* Y_DIVIDER: I2S transmit MCLK rate denominator */ #define I2S1_TXRATE_Y_DIVIDER_SHIFT (0) #define I2S1_TXRATE_Y_DIVIDER_MASK (0xff << I2S1_TXRATE_Y_DIVIDER_SHIFT) #define I2S1_TXRATE_Y_DIVIDER(x) ((x) << I2S1_TXRATE_Y_DIVIDER_SHIFT) /* X_DIVIDER: I2S transmit MCLK rate numerator */ #define I2S1_TXRATE_X_DIVIDER_SHIFT (8) #define I2S1_TXRATE_X_DIVIDER_MASK (0xff << I2S1_TXRATE_X_DIVIDER_SHIFT) #define I2S1_TXRATE_X_DIVIDER(x) ((x) << I2S1_TXRATE_X_DIVIDER_SHIFT) /* --- I2S0_RXRATE values --------------------------------------- */ /* Y_DIVIDER: I2S receive MCLK rate denominator */ #define I2S0_RXRATE_Y_DIVIDER_SHIFT (0) #define I2S0_RXRATE_Y_DIVIDER_MASK (0xff << I2S0_RXRATE_Y_DIVIDER_SHIFT) #define I2S0_RXRATE_Y_DIVIDER(x) ((x) << I2S0_RXRATE_Y_DIVIDER_SHIFT) /* X_DIVIDER: I2S receive MCLK rate numerator */ #define I2S0_RXRATE_X_DIVIDER_SHIFT (8) #define I2S0_RXRATE_X_DIVIDER_MASK (0xff << I2S0_RXRATE_X_DIVIDER_SHIFT) #define I2S0_RXRATE_X_DIVIDER(x) ((x) << I2S0_RXRATE_X_DIVIDER_SHIFT) /* --- I2S1_RXRATE values --------------------------------------- */ /* Y_DIVIDER: I2S receive MCLK rate denominator */ #define I2S1_RXRATE_Y_DIVIDER_SHIFT (0) #define I2S1_RXRATE_Y_DIVIDER_MASK (0xff << I2S1_RXRATE_Y_DIVIDER_SHIFT) #define I2S1_RXRATE_Y_DIVIDER(x) ((x) << I2S1_RXRATE_Y_DIVIDER_SHIFT) /* X_DIVIDER: I2S receive MCLK rate numerator */ #define I2S1_RXRATE_X_DIVIDER_SHIFT (8) #define I2S1_RXRATE_X_DIVIDER_MASK (0xff << I2S1_RXRATE_X_DIVIDER_SHIFT) #define I2S1_RXRATE_X_DIVIDER(x) ((x) << I2S1_RXRATE_X_DIVIDER_SHIFT) /* --- I2S0_TXBITRATE values ------------------------------------ */ /* TX_BITRATE: I2S transmit bit rate */ #define I2S0_TXBITRATE_TX_BITRATE_SHIFT (0) #define I2S0_TXBITRATE_TX_BITRATE_MASK (0x3f << I2S0_TXBITRATE_TX_BITRATE_SHIFT) #define I2S0_TXBITRATE_TX_BITRATE(x) ((x) << I2S0_TXBITRATE_TX_BITRATE_SHIFT) /* --- I2S1_TXBITRATE values ------------------------------------ */ /* TX_BITRATE: I2S transmit bit rate */ #define I2S1_TXBITRATE_TX_BITRATE_SHIFT (0) #define I2S1_TXBITRATE_TX_BITRATE_MASK (0x3f << I2S1_TXBITRATE_TX_BITRATE_SHIFT) #define I2S1_TXBITRATE_TX_BITRATE(x) ((x) << I2S1_TXBITRATE_TX_BITRATE_SHIFT) /* --- I2S0_RXBITRATE values ------------------------------------ */ /* RX_BITRATE: I2S receive bit rate */ #define I2S0_RXBITRATE_RX_BITRATE_SHIFT (0) #define I2S0_RXBITRATE_RX_BITRATE_MASK (0x3f << I2S0_RXBITRATE_RX_BITRATE_SHIFT) #define I2S0_RXBITRATE_RX_BITRATE(x) ((x) << I2S0_RXBITRATE_RX_BITRATE_SHIFT) /* --- I2S1_RXBITRATE values ------------------------------------ */ /* RX_BITRATE: I2S receive bit rate */ #define I2S1_RXBITRATE_RX_BITRATE_SHIFT (0) #define I2S1_RXBITRATE_RX_BITRATE_MASK (0x3f << I2S1_RXBITRATE_RX_BITRATE_SHIFT) #define I2S1_RXBITRATE_RX_BITRATE(x) ((x) << I2S1_RXBITRATE_RX_BITRATE_SHIFT) /* --- I2S0_TXMODE values --------------------------------------- */ /* TXCLKSEL: Clock source selection for the transmit bit clock divider */ #define I2S0_TXMODE_TXCLKSEL_SHIFT (0) #define I2S0_TXMODE_TXCLKSEL_MASK (0x3 << I2S0_TXMODE_TXCLKSEL_SHIFT) #define I2S0_TXMODE_TXCLKSEL(x) ((x) << I2S0_TXMODE_TXCLKSEL_SHIFT) /* TX4PIN: Transmit 4-pin mode selection */ #define I2S0_TXMODE_TX4PIN_SHIFT (2) #define I2S0_TXMODE_TX4PIN_MASK (0x1 << I2S0_TXMODE_TX4PIN_SHIFT) #define I2S0_TXMODE_TX4PIN(x) ((x) << I2S0_TXMODE_TX4PIN_SHIFT) /* TXMCENA: Enable for the TX_MCLK output */ #define I2S0_TXMODE_TXMCENA_SHIFT (3) #define I2S0_TXMODE_TXMCENA_MASK (0x1 << I2S0_TXMODE_TXMCENA_SHIFT) #define I2S0_TXMODE_TXMCENA(x) ((x) << I2S0_TXMODE_TXMCENA_SHIFT) /* --- I2S1_TXMODE values --------------------------------------- */ /* TXCLKSEL: Clock source selection for the transmit bit clock divider */ #define I2S1_TXMODE_TXCLKSEL_SHIFT (0) #define I2S1_TXMODE_TXCLKSEL_MASK (0x3 << I2S1_TXMODE_TXCLKSEL_SHIFT) #define I2S1_TXMODE_TXCLKSEL(x) ((x) << I2S1_TXMODE_TXCLKSEL_SHIFT) /* TX4PIN: Transmit 4-pin mode selection */ #define I2S1_TXMODE_TX4PIN_SHIFT (2) #define I2S1_TXMODE_TX4PIN_MASK (0x1 << I2S1_TXMODE_TX4PIN_SHIFT) #define I2S1_TXMODE_TX4PIN(x) ((x) << I2S1_TXMODE_TX4PIN_SHIFT) /* TXMCENA: Enable for the TX_MCLK output */ #define I2S1_TXMODE_TXMCENA_SHIFT (3) #define I2S1_TXMODE_TXMCENA_MASK (0x1 << I2S1_TXMODE_TXMCENA_SHIFT) #define I2S1_TXMODE_TXMCENA(x) ((x) << I2S1_TXMODE_TXMCENA_SHIFT) /* --- I2S0_RXMODE values --------------------------------------- */ /* RXCLKSEL: Clock source selection for the receive bit clock divider */ #define I2S0_RXMODE_RXCLKSEL_SHIFT (0) #define I2S0_RXMODE_RXCLKSEL_MASK (0x3 << I2S0_RXMODE_RXCLKSEL_SHIFT) #define I2S0_RXMODE_RXCLKSEL(x) ((x) << I2S0_RXMODE_RXCLKSEL_SHIFT) /* RX4PIN: Receive 4-pin mode selection */ #define I2S0_RXMODE_RX4PIN_SHIFT (2) #define I2S0_RXMODE_RX4PIN_MASK (0x1 << I2S0_RXMODE_RX4PIN_SHIFT) #define I2S0_RXMODE_RX4PIN(x) ((x) << I2S0_RXMODE_RX4PIN_SHIFT) /* RXMCENA: Enable for the RX_MCLK output */ #define I2S0_RXMODE_RXMCENA_SHIFT (3) #define I2S0_RXMODE_RXMCENA_MASK (0x1 << I2S0_RXMODE_RXMCENA_SHIFT) #define I2S0_RXMODE_RXMCENA(x) ((x) << I2S0_RXMODE_RXMCENA_SHIFT) /* --- I2S1_RXMODE values --------------------------------------- */ /* RXCLKSEL: Clock source selection for the receive bit clock divider */ #define I2S1_RXMODE_RXCLKSEL_SHIFT (0) #define I2S1_RXMODE_RXCLKSEL_MASK (0x3 << I2S1_RXMODE_RXCLKSEL_SHIFT) #define I2S1_RXMODE_RXCLKSEL(x) ((x) << I2S1_RXMODE_RXCLKSEL_SHIFT) /* RX4PIN: Receive 4-pin mode selection */ #define I2S1_RXMODE_RX4PIN_SHIFT (2) #define I2S1_RXMODE_RX4PIN_MASK (0x1 << I2S1_RXMODE_RX4PIN_SHIFT) #define I2S1_RXMODE_RX4PIN(x) ((x) << I2S1_RXMODE_RX4PIN_SHIFT) /* RXMCENA: Enable for the RX_MCLK output */ #define I2S1_RXMODE_RXMCENA_SHIFT (3) #define I2S1_RXMODE_RXMCENA_MASK (0x1 << I2S1_RXMODE_RXMCENA_SHIFT) #define I2S1_RXMODE_RXMCENA(x) ((x) << I2S1_RXMODE_RXMCENA_SHIFT) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/ipc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_IPC_H #define LPC43XX_IPC_H #include #include void ipc_halt_m0(void); void ipc_start_m0(uint32_t cm0_baseaddr); void ipc_m0apptxevent_clear(void); #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/m0/irq.yaml ================================================ includeguard: LIBOPENCM3_LPC43xx_M0_NVIC_H partname_humanreadable: LPC 43xx series M0 core partname_doxygen: LPC43xx (M0) irqs: 0: rtc 1: m4core 2: dma # reserved: 3 4: flasheepromat 5: ethernet 6: sdio 7: lcd 8: usb0 9: usb1 10: sct 11: ritimer_or_wwdt 12: timer0 13: gint1 14: pin_int4 15: timer3 16: mcpwm 17: adc0 18: i2c0_or_irc1 19: sgpio 20: spi_or_dac 21: adc1 22: ssp0_or_ssp1 23: eventrouter 24: usart0 25: uart1 26: usart2_or_c_can1 27: usart3 28: i2s0_or_i2s1 29: c_can0 ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/m4/irq.yaml ================================================ includeguard: LIBOPENCM3_LPC43xx_M4_NVIC_H partname_humanreadable: LPC 43xx series M4 core partname_doxygen: LPC43xx (M4) irqs: 0: dac 1: m0core 2: dma # reserved: 3, 4 5: ethernet 6: sdio 7: lcd 8: usb0 9: usb1 10: sct 11: ritimer 12: timer0 13: timer1 14: timer2 15: timer3 16: mcpwm 17: adc0 18: i2c0 19: i2c1 20: spi 21: adc1 22: ssp0 23: ssp1 24: usart0 25: uart1 26: usart2 27: usart3 28: i2s0 29: i2s1 30: spifi 31: sgpio 32: pin_int0 33: pin_int1 34: pin_int2 35: pin_int3 36: pin_int4 37: pin_int5 38: pin_int6 39: pin_int7 40: gint0 41: gint1 42: eventrouter 43: c_can1 # reserved: 44, 45 46: atimer 47: rtc # reserved: 48 49: wwdt # reserved: 50 51: c_can0 52: qei ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_MEMORYMAP_H #define LPC43XX_MEMORYMAP_H #include /* --- LPC43XX specific peripheral definitions ----------------------------- */ /* local SRAM / external static memory banks (0x1000 0000 - 0x2000 0000) */ #define SPIFI_DATA_BASE 0x14000000 /* Memory map for all busses */ #define PERIPH_BASE_AHB 0x40000000 #define PERIPH_BASE_APB0 0x40080000 #define PERIPH_BASE_APB1 0x400A0000 #define PERIPH_BASE_APB2 0x400C0000 #define PERIPH_BASE_APB3 0x400E0000 /* Register boundary addresses */ /* AHB (0x4000 0000 - 0x4001 2000) */ #define SCT_BASE (PERIPH_BASE_AHB + 0x00000) /* PERIPH_BASE_AHB + 0x01000 (0x4000 1000 - 0x4000 1FFF): Reserved */ #define GPDMA_BASE (PERIPH_BASE_AHB + 0x02000) #define SPIFI_BASE (PERIPH_BASE_AHB + 0x03000) #define SDIO_BASE (PERIPH_BASE_AHB + 0x04000) #define EMC_BASE (PERIPH_BASE_AHB + 0x05000) #define USB0_BASE (PERIPH_BASE_AHB + 0x06000) #define USB1_BASE (PERIPH_BASE_AHB + 0x07000) #define LCD_BASE (PERIPH_BASE_AHB + 0x08000) /* PERIPH_BASE_AHB + 0x09000 (0x4000 9000 - 0x4000 FFFF): Reserved */ #define ETHERNET_BASE (PERIPH_BASE_AHB + 0x10000) /* 0x4001 2000 - 0x4003 FFFF Reserved */ /* RTC domain peripherals */ #define ATIMER_BASE 0x40040000 #define BACKUP_REG_BASE 0x40041000 #define PMC_BASE 0x40042000 #define CREG_BASE 0x40043000 #define EVENTROUTER_BASE 0x40044000 #define OTP_BASE 0x40045000 #define RTC_BASE 0x40046000 /* 0x4004 7000 - 0x4004 FFFF Reserved */ /* clocking/reset control peripherals */ #define CGU_BASE 0x40050000 #define CCU1_BASE 0x40051000 #define CCU2_BASE 0x40052000 #define RGU_BASE 0x40053000 /* 0x4005 4000 - 0x4005 FFFF Reserved */ /* 0x4006 0000 - 0x4007 FFFF Reserved */ /* APB0 ( 0x4008 0000 - 0x4008 FFFF) */ #define WWDT_BASE (PERIPH_BASE_APB0 + 0x00000) #define USART0_BASE (PERIPH_BASE_APB0 + 0x01000) #define UART1_BASE (PERIPH_BASE_APB0 + 0x02000) #define SSP0_BASE (PERIPH_BASE_APB0 + 0x03000) #define TIMER0_BASE (PERIPH_BASE_APB0 + 0x04000) #define TIMER1_BASE (PERIPH_BASE_APB0 + 0x05000) #define SCU_BASE (PERIPH_BASE_APB0 + 0x06000) #define GPIO_PIN_INTERRUPT_BASE (PERIPH_BASE_APB0 + 0x07000) #define GPIO_GROUP0_INTERRUPT_BASE (PERIPH_BASE_APB0 + 0x08000) #define GPIO_GROUP1_INTERRUPT_BASE (PERIPH_BASE_APB0 + 0x09000) /* 0x4008 A000 - 0x4008 FFFF Reserved */ /* 0x4009 0000 - 0x4009 FFFF Reserved */ /* APB1 (0x400A 0000 - 0x400A FFFF) */ #define MCPWM_BASE (PERIPH_BASE_APB1 + 0x00000) #define I2C0_BASE (PERIPH_BASE_APB1 + 0x01000) #define I2S0_BASE (PERIPH_BASE_APB1 + 0x02000) #define I2S1_BASE (PERIPH_BASE_APB1 + 0x03000) #define C_CCAN1_BASE (PERIPH_BASE_APB1 + 0x04000) /* 0x400A 5000 - 0x400A FFFF Reserved */ /* 0x400B 0000 - 0x400B FFFF Reserved */ /* APB2 (0x400C 0000 - 0x400C FFFF) */ #define RITIMER_BASE (PERIPH_BASE_APB2 + 0x00000) #define USART2_BASE (PERIPH_BASE_APB2 + 0x01000) #define USART3_BASE (PERIPH_BASE_APB2 + 0x02000) #define TIMER2_BASE (PERIPH_BASE_APB2 + 0x03000) #define TIMER3_BASE (PERIPH_BASE_APB2 + 0x04000) #define SSP1_BASE (PERIPH_BASE_APB2 + 0x05000) #define QEI_BASE (PERIPH_BASE_APB2 + 0x06000) #define GIMA_BASE (PERIPH_BASE_APB2 + 0x07000) /* 0x400C 8000 - 0x400C FFFF Reserved */ /* 0x400D 0000 - 0x400D FFFF Reserved */ /* APB3 (0x400E 0000 - 0x400E FFFF) */ #define I2C1_BASE (PERIPH_BASE_APB3 + 0x00000) #define DAC_BASE (PERIPH_BASE_APB3 + 0x01000) #define C_CAN0_BASE (PERIPH_BASE_APB3 + 0x02000) #define ADC0_BASE (PERIPH_BASE_APB3 + 0x03000) #define ADC1_BASE (PERIPH_BASE_APB3 + 0x04000) /* 0x400E 5000 - 0x400E FFFF Reserved */ /* 0x400F 0000 - 0x400F 0FFF Reserved */ #define AES_BASE 0x400F1000 /* 0x400F 2000 - 0x400F 3FFF Reserved */ #define GPIO_PORT_BASE 0x400F4000 /* 0x400F 8000 - 0x400F FFFF Reserved */ #define SPI_PORT_BASE 0x40100000 #define SGPIO_PORT_BASE 0x40101000 /* 0x4010 2000 - 0x41FF FFFF Reserved */ /* 0x4200 0000 - 0x43FF FFFF peripheral bit band alias region */ /* 0x4400 0000 - 0x5FFF FFFF Reserved */ /* 0x6000 0000 - 0xFFFF FFFF external memories and ARM private bus */ #define SPIFI_DATA_UNCACHED_BASE 0x80000000 #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/rgu.h ================================================ /** @defgroup rgu_defines Reset Generation Unit Defines @brief Defined Constants and Types for the LPC43xx Reset Generation Unit @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_RGU_H #define LPC43XX_RGU_H /**@{*/ #include #include /* --- RGU registers ------------------------------------------------------- */ /* Reset control register 0 */ #define RESET_CTRL0 MMIO32(RGU_BASE + 0x100) /* Reset control register 1 */ #define RESET_CTRL1 MMIO32(RGU_BASE + 0x104) /* Reset status register 0 */ #define RESET_STATUS0 MMIO32(RGU_BASE + 0x110) /* Reset status register 1 */ #define RESET_STATUS1 MMIO32(RGU_BASE + 0x114) /* Reset status register 2 */ #define RESET_STATUS2 MMIO32(RGU_BASE + 0x118) /* Reset status register 3 */ #define RESET_STATUS3 MMIO32(RGU_BASE + 0x11C) /* Reset active status register 0 */ #define RESET_ACTIVE_STATUS0 MMIO32(RGU_BASE + 0x150) /* Reset active status register 1 */ #define RESET_ACTIVE_STATUS1 MMIO32(RGU_BASE + 0x154) /* Reset external status register 0 for CORE_RST */ #define RESET_EXT_STAT0 MMIO32(RGU_BASE + 0x400) /* Reset external status register 1 for PERIPH_RST */ #define RESET_EXT_STAT1 MMIO32(RGU_BASE + 0x404) /* Reset external status register 2 for MASTER_RST */ #define RESET_EXT_STAT2 MMIO32(RGU_BASE + 0x408) /* Reserved */ #define RESET_EXT_STAT3 MMIO32(RGU_BASE + 0x40C) /* Reset external status register 4 for WWDT_RST */ #define RESET_EXT_STAT4 MMIO32(RGU_BASE + 0x410) /* Reset external status register 5 for CREG_RST */ #define RESET_EXT_STAT5 MMIO32(RGU_BASE + 0x414) /* Reserved */ #define RESET_EXT_STAT6 MMIO32(RGU_BASE + 0x418) /* Reserved */ #define RESET_EXT_STAT7 MMIO32(RGU_BASE + 0x41C) /* Reset external status register 8 for BUS_RST */ #define RESET_EXT_STAT8 MMIO32(RGU_BASE + 0x420) /* Reset external status register 9 for SCU_RST */ #define RESET_EXT_STAT9 MMIO32(RGU_BASE + 0x424) /* Reserved */ #define RESET_EXT_STAT10 MMIO32(RGU_BASE + 0x428) /* Reserved */ #define RESET_EXT_STAT11 MMIO32(RGU_BASE + 0x42C) /* Reserved */ #define RESET_EXT_STAT12 MMIO32(RGU_BASE + 0x430) /* Reset external status register 13 for M4_RST */ #define RESET_EXT_STAT13 MMIO32(RGU_BASE + 0x434) /* Reserved */ #define RESET_EXT_STAT14 MMIO32(RGU_BASE + 0x438) /* Reserved */ #define RESET_EXT_STAT15 MMIO32(RGU_BASE + 0x43C) /* Reset external status register 16 for LCD_RST */ #define RESET_EXT_STAT16 MMIO32(RGU_BASE + 0x440) /* Reset external status register 17 for USB0_RST */ #define RESET_EXT_STAT17 MMIO32(RGU_BASE + 0x444) /* Reset external status register 18 for USB1_RST */ #define RESET_EXT_STAT18 MMIO32(RGU_BASE + 0x448) /* Reset external status register 19 for DMA_RST */ #define RESET_EXT_STAT19 MMIO32(RGU_BASE + 0x44C) /* Reset external status register 20 for SDIO_RST */ #define RESET_EXT_STAT20 MMIO32(RGU_BASE + 0x450) /* Reset external status register 21 for EMC_RST */ #define RESET_EXT_STAT21 MMIO32(RGU_BASE + 0x454) /* Reset external status register 22 for ETHERNET_RST */ #define RESET_EXT_STAT22 MMIO32(RGU_BASE + 0x458) /* Reserved */ #define RESET_EXT_STAT23 MMIO32(RGU_BASE + 0x45C) /* Reserved */ #define RESET_EXT_STAT24 MMIO32(RGU_BASE + 0x460) /* Reserved */ #define RESET_EXT_STAT25 MMIO32(RGU_BASE + 0x464) /* Reserved */ #define RESET_EXT_STAT26 MMIO32(RGU_BASE + 0x468) /* Reserved */ #define RESET_EXT_STAT27 MMIO32(RGU_BASE + 0x46C) /* Reset external status register 28 for GPIO_RST */ #define RESET_EXT_STAT28 MMIO32(RGU_BASE + 0x470) /* Reserved */ #define RESET_EXT_STAT29 MMIO32(RGU_BASE + 0x474) /* Reserved */ #define RESET_EXT_STAT30 MMIO32(RGU_BASE + 0x478) /* Reserved */ #define RESET_EXT_STAT31 MMIO32(RGU_BASE + 0x47C) /* Reset external status register 32 for TIMER0_RST */ #define RESET_EXT_STAT32 MMIO32(RGU_BASE + 0x480) /* Reset external status register 33 for TIMER1_RST */ #define RESET_EXT_STAT33 MMIO32(RGU_BASE + 0x484) /* Reset external status register 34 for TIMER2_RST */ #define RESET_EXT_STAT34 MMIO32(RGU_BASE + 0x488) /* Reset external status register 35 for TIMER3_RST */ #define RESET_EXT_STAT35 MMIO32(RGU_BASE + 0x48C) /* Reset external status register 36 for RITIMER_RST */ #define RESET_EXT_STAT36 MMIO32(RGU_BASE + 0x490) /* Reset external status register 37 for SCT_RST */ #define RESET_EXT_STAT37 MMIO32(RGU_BASE + 0x494) /* Reset external status register 38 for MOTOCONPWM_RST */ #define RESET_EXT_STAT38 MMIO32(RGU_BASE + 0x498) /* Reset external status register 39 for QEI_RST */ #define RESET_EXT_STAT39 MMIO32(RGU_BASE + 0x49C) /* Reset external status register 40 for ADC0_RST */ #define RESET_EXT_STAT40 MMIO32(RGU_BASE + 0x4A0) /* Reset external status register 41 for ADC1_RST */ #define RESET_EXT_STAT41 MMIO32(RGU_BASE + 0x4A4) /* Reset external status register 42 for DAC_RST */ #define RESET_EXT_STAT42 MMIO32(RGU_BASE + 0x4A8) /* Reserved */ #define RESET_EXT_STAT43 MMIO32(RGU_BASE + 0x4AC) /* Reset external status register 44 for UART0_RST */ #define RESET_EXT_STAT44 MMIO32(RGU_BASE + 0x4B0) /* Reset external status register 45 for UART1_RST */ #define RESET_EXT_STAT45 MMIO32(RGU_BASE + 0x4B4) /* Reset external status register 46 for UART2_RST */ #define RESET_EXT_STAT46 MMIO32(RGU_BASE + 0x4B8) /* Reset external status register 47 for UART3_RST */ #define RESET_EXT_STAT47 MMIO32(RGU_BASE + 0x4BC) /* Reset external status register 48 for I2C0_RST */ #define RESET_EXT_STAT48 MMIO32(RGU_BASE + 0x4C0) /* Reset external status register 49 for I2C1_RST */ #define RESET_EXT_STAT49 MMIO32(RGU_BASE + 0x4C4) /* Reset external status register 50 for SSP0_RST */ #define RESET_EXT_STAT50 MMIO32(RGU_BASE + 0x4C8) /* Reset external status register 51 for SSP1_RST */ #define RESET_EXT_STAT51 MMIO32(RGU_BASE + 0x4CC) /* Reset external status register 52 for I2S_RST */ #define RESET_EXT_STAT52 MMIO32(RGU_BASE + 0x4D0) /* Reset external status register 53 for SPIFI_RST */ #define RESET_EXT_STAT53 MMIO32(RGU_BASE + 0x4D4) /* Reset external status register 54 for CAN1_RST */ #define RESET_EXT_STAT54 MMIO32(RGU_BASE + 0x4D8) /* Reset external status register 55 for CAN0_RST */ #define RESET_EXT_STAT55 MMIO32(RGU_BASE + 0x4DC) /* Reset external status register 56 for M0APP_RST */ #define RESET_EXT_STAT56 MMIO32(RGU_BASE + 0x4E0) /* Reset external status register 57 for SGPIO_RST */ #define RESET_EXT_STAT57 MMIO32(RGU_BASE + 0x4E4) /* Reset external status register 58 for SPI_RST */ #define RESET_EXT_STAT58 MMIO32(RGU_BASE + 0x4E8) /* Reserved */ #define RESET_EXT_STAT59 MMIO32(RGU_BASE + 0x4EC) /* Reserved */ #define RESET_EXT_STAT60 MMIO32(RGU_BASE + 0x4F0) /* Reserved */ #define RESET_EXT_STAT61 MMIO32(RGU_BASE + 0x4F4) /* Reserved */ #define RESET_EXT_STAT62 MMIO32(RGU_BASE + 0x4F8) /* Reserved */ #define RESET_EXT_STAT63 MMIO32(RGU_BASE + 0x4FC) /* --- RESET_CTRL0 values --------------------------------------- */ /* CORE_RST: Writing a one activates the reset */ #define RESET_CTRL0_CORE_RST_SHIFT (0) #define RESET_CTRL0_CORE_RST (1 << RESET_CTRL0_CORE_RST_SHIFT) /* PERIPH_RST: Writing a one activates the reset */ #define RESET_CTRL0_PERIPH_RST_SHIFT (1) #define RESET_CTRL0_PERIPH_RST (1 << RESET_CTRL0_PERIPH_RST_SHIFT) /* MASTER_RST: Writing a one activates the reset */ #define RESET_CTRL0_MASTER_RST_SHIFT (2) #define RESET_CTRL0_MASTER_RST (1 << RESET_CTRL0_MASTER_RST_SHIFT) /* WWDT_RST: Writing a one to this bit has no effect */ #define RESET_CTRL0_WWDT_RST_SHIFT (4) #define RESET_CTRL0_WWDT_RST (1 << RESET_CTRL0_WWDT_RST_SHIFT) /* CREG_RST: Writing a one to this bit has no effect */ #define RESET_CTRL0_CREG_RST_SHIFT (5) #define RESET_CTRL0_CREG_RST (1 << RESET_CTRL0_CREG_RST_SHIFT) /* BUS_RST: Writing a one activates the reset */ #define RESET_CTRL0_BUS_RST_SHIFT (8) #define RESET_CTRL0_BUS_RST (1 << RESET_CTRL0_BUS_RST_SHIFT) /* SCU_RST: Writing a one activates the reset */ #define RESET_CTRL0_SCU_RST_SHIFT (9) #define RESET_CTRL0_SCU_RST (1 << RESET_CTRL0_SCU_RST_SHIFT) /* M4_RST: Writing a one activates the reset */ #define RESET_CTRL0_M4_RST_SHIFT (13) #define RESET_CTRL0_M4_RST (1 << RESET_CTRL0_M4_RST_SHIFT) /* LCD_RST: Writing a one activates the reset */ #define RESET_CTRL0_LCD_RST_SHIFT (16) #define RESET_CTRL0_LCD_RST (1 << RESET_CTRL0_LCD_RST_SHIFT) /* USB0_RST: Writing a one activates the reset */ #define RESET_CTRL0_USB0_RST_SHIFT (17) #define RESET_CTRL0_USB0_RST (1 << RESET_CTRL0_USB0_RST_SHIFT) /* USB1_RST: Writing a one activates the reset */ #define RESET_CTRL0_USB1_RST_SHIFT (18) #define RESET_CTRL0_USB1_RST (1 << RESET_CTRL0_USB1_RST_SHIFT) /* DMA_RST: Writing a one activates the reset */ #define RESET_CTRL0_DMA_RST_SHIFT (19) #define RESET_CTRL0_DMA_RST (1 << RESET_CTRL0_DMA_RST_SHIFT) /* SDIO_RST: Writing a one activates the reset */ #define RESET_CTRL0_SDIO_RST_SHIFT (20) #define RESET_CTRL0_SDIO_RST (1 << RESET_CTRL0_SDIO_RST_SHIFT) /* EMC_RST: Writing a one activates the reset */ #define RESET_CTRL0_EMC_RST_SHIFT (21) #define RESET_CTRL0_EMC_RST (1 << RESET_CTRL0_EMC_RST_SHIFT) /* ETHERNET_RST: Writing a one activates the reset */ #define RESET_CTRL0_ETHERNET_RST_SHIFT (22) #define RESET_CTRL0_ETHERNET_RST (1 << RESET_CTRL0_ETHERNET_RST_SHIFT) /* FLASHA_RST: Writing a one activates the reset */ #define RESET_CTRL0_FLASHA_RST_SHIFT (25) #define RESET_CTRL0_FLASHA_RST (1 << RESET_CTRL0_FLASHA_RST_SHIFT) /* EEPROM_RST: Writing a one activates the reset */ #define RESET_CTRL0_EEPROM_RST_SHIFT (27) #define RESET_CTRL0_EEPROM_RST (1 << RESET_CTRL0_EEPROM_RST_SHIFT) /* GPIO_RST: Writing a one activates the reset */ #define RESET_CTRL0_GPIO_RST_SHIFT (28) #define RESET_CTRL0_GPIO_RST (1 << RESET_CTRL0_GPIO_RST_SHIFT) /* FLASHB_RST: Writing a one activates the reset */ #define RESET_CTRL0_FLASHB_RST_SHIFT (29) #define RESET_CTRL0_FLASHB_RST (1 << RESET_CTRL0_FLASHB_RST_SHIFT) /* --- RESET_CTRL1 values --------------------------------------- */ /* TIMER0_RST: Writing a one activates the reset */ #define RESET_CTRL1_TIMER0_RST_SHIFT (0) #define RESET_CTRL1_TIMER0_RST (1 << RESET_CTRL1_TIMER0_RST_SHIFT) /* TIMER1_RST: Writing a one activates the reset */ #define RESET_CTRL1_TIMER1_RST_SHIFT (1) #define RESET_CTRL1_TIMER1_RST (1 << RESET_CTRL1_TIMER1_RST_SHIFT) /* TIMER2_RST: Writing a one activates the reset */ #define RESET_CTRL1_TIMER2_RST_SHIFT (2) #define RESET_CTRL1_TIMER2_RST (1 << RESET_CTRL1_TIMER2_RST_SHIFT) /* TIMER3_RST: Writing a one activates the reset */ #define RESET_CTRL1_TIMER3_RST_SHIFT (3) #define RESET_CTRL1_TIMER3_RST (1 << RESET_CTRL1_TIMER3_RST_SHIFT) /* RTIMER_RST: Writing a one activates the reset */ #define RESET_CTRL1_RTIMER_RST_SHIFT (4) #define RESET_CTRL1_RTIMER_RST (1 << RESET_CTRL1_RTIMER_RST_SHIFT) /* SCT_RST: Writing a one activates the reset */ #define RESET_CTRL1_SCT_RST_SHIFT (5) #define RESET_CTRL1_SCT_RST (1 << RESET_CTRL1_SCT_RST_SHIFT) /* MOTOCONPWM_RST: Writing a one activates the reset */ #define RESET_CTRL1_MOTOCONPWM_RST_SHIFT (6) #define RESET_CTRL1_MOTOCONPWM_RST (1 << RESET_CTRL1_MOTOCONPWM_RST_SHIFT) /* QEI_RST: Writing a one activates the reset */ #define RESET_CTRL1_QEI_RST_SHIFT (7) #define RESET_CTRL1_QEI_RST (1 << RESET_CTRL1_QEI_RST_SHIFT) /* ADC0_RST: Writing a one activates the reset */ #define RESET_CTRL1_ADC0_RST_SHIFT (8) #define RESET_CTRL1_ADC0_RST (1 << RESET_CTRL1_ADC0_RST_SHIFT) /* ADC1_RST: Writing a one activates the reset */ #define RESET_CTRL1_ADC1_RST_SHIFT (9) #define RESET_CTRL1_ADC1_RST (1 << RESET_CTRL1_ADC1_RST_SHIFT) /* DAC_RST: Writing a one activates the reset */ #define RESET_CTRL1_DAC_RST_SHIFT (10) #define RESET_CTRL1_DAC_RST (1 << RESET_CTRL1_DAC_RST_SHIFT) /* UART0_RST: Writing a one activates the reset */ #define RESET_CTRL1_UART0_RST_SHIFT (12) #define RESET_CTRL1_UART0_RST (1 << RESET_CTRL1_UART0_RST_SHIFT) /* UART1_RST: Writing a one activates the reset */ #define RESET_CTRL1_UART1_RST_SHIFT (13) #define RESET_CTRL1_UART1_RST (1 << RESET_CTRL1_UART1_RST_SHIFT) /* UART2_RST: Writing a one activates the reset */ #define RESET_CTRL1_UART2_RST_SHIFT (14) #define RESET_CTRL1_UART2_RST (1 << RESET_CTRL1_UART2_RST_SHIFT) /* UART3_RST: Writing a one activates the reset */ #define RESET_CTRL1_UART3_RST_SHIFT (15) #define RESET_CTRL1_UART3_RST (1 << RESET_CTRL1_UART3_RST_SHIFT) /* I2C0_RST: Writing a one activates the reset */ #define RESET_CTRL1_I2C0_RST_SHIFT (16) #define RESET_CTRL1_I2C0_RST (1 << RESET_CTRL1_I2C0_RST_SHIFT) /* I2C1_RST: Writing a one activates the reset */ #define RESET_CTRL1_I2C1_RST_SHIFT (17) #define RESET_CTRL1_I2C1_RST (1 << RESET_CTRL1_I2C1_RST_SHIFT) /* SSP0_RST: Writing a one activates the reset */ #define RESET_CTRL1_SSP0_RST_SHIFT (18) #define RESET_CTRL1_SSP0_RST (1 << RESET_CTRL1_SSP0_RST_SHIFT) /* SSP1_RST: Writing a one activates the reset */ #define RESET_CTRL1_SSP1_RST_SHIFT (19) #define RESET_CTRL1_SSP1_RST (1 << RESET_CTRL1_SSP1_RST_SHIFT) /* I2S_RST: Writing a one activates the reset */ #define RESET_CTRL1_I2S_RST_SHIFT (20) #define RESET_CTRL1_I2S_RST (1 << RESET_CTRL1_I2S_RST_SHIFT) /* SPIFI_RST: Writing a one activates the reset */ #define RESET_CTRL1_SPIFI_RST_SHIFT (21) #define RESET_CTRL1_SPIFI_RST (1 << RESET_CTRL1_SPIFI_RST_SHIFT) /* CAN1_RST: Writing a one activates the reset */ #define RESET_CTRL1_CAN1_RST_SHIFT (22) #define RESET_CTRL1_CAN1_RST (1 << RESET_CTRL1_CAN1_RST_SHIFT) /* CAN0_RST: Writing a one activates the reset */ #define RESET_CTRL1_CAN0_RST_SHIFT (23) #define RESET_CTRL1_CAN0_RST (1 << RESET_CTRL1_CAN0_RST_SHIFT) /* M0APP_RST: Writing a one activates the reset */ #define RESET_CTRL1_M0APP_RST_SHIFT (24) #define RESET_CTRL1_M0APP_RST (1 << RESET_CTRL1_M0APP_RST_SHIFT) /* SGPIO_RST: Writing a one activates the reset */ #define RESET_CTRL1_SGPIO_RST_SHIFT (25) #define RESET_CTRL1_SGPIO_RST (1 << RESET_CTRL1_SGPIO_RST_SHIFT) /* SPI_RST: Writing a one activates the reset */ #define RESET_CTRL1_SPI_RST_SHIFT (26) #define RESET_CTRL1_SPI_RST (1 << RESET_CTRL1_SPI_RST_SHIFT) /* --- RESET_STATUS0 values ------------------------------------- */ /* CORE_RST: Status of the CORE_RST reset generator output */ #define RESET_STATUS0_CORE_RST_SHIFT (0) #define RESET_STATUS0_CORE_RST_MASK (0x3 << RESET_STATUS0_CORE_RST_SHIFT) #define RESET_STATUS0_CORE_RST(x) ((x) << RESET_STATUS0_CORE_RST_SHIFT) /* PERIPH_RST: Status of the PERIPH_RST reset generator output */ #define RESET_STATUS0_PERIPH_RST_SHIFT (2) #define RESET_STATUS0_PERIPH_RST_MASK (0x3 << RESET_STATUS0_PERIPH_RST_SHIFT) #define RESET_STATUS0_PERIPH_RST(x) ((x) << RESET_STATUS0_PERIPH_RST_SHIFT) /* MASTER_RST: Status of the MASTER_RST reset generator output */ #define RESET_STATUS0_MASTER_RST_SHIFT (4) #define RESET_STATUS0_MASTER_RST_MASK (0x3 << RESET_STATUS0_MASTER_RST_SHIFT) #define RESET_STATUS0_MASTER_RST(x) ((x) << RESET_STATUS0_MASTER_RST_SHIFT) /* WWDT_RST: Status of the WWDT_RST reset generator output */ #define RESET_STATUS0_WWDT_RST_SHIFT (8) #define RESET_STATUS0_WWDT_RST_MASK (0x3 << RESET_STATUS0_WWDT_RST_SHIFT) #define RESET_STATUS0_WWDT_RST(x) ((x) << RESET_STATUS0_WWDT_RST_SHIFT) /* CREG_RST: Status of the CREG_RST reset generator output */ #define RESET_STATUS0_CREG_RST_SHIFT (10) #define RESET_STATUS0_CREG_RST_MASK (0x3 << RESET_STATUS0_CREG_RST_SHIFT) #define RESET_STATUS0_CREG_RST(x) ((x) << RESET_STATUS0_CREG_RST_SHIFT) /* BUS_RST: Status of the BUS_RST reset generator output */ #define RESET_STATUS0_BUS_RST_SHIFT (16) #define RESET_STATUS0_BUS_RST_MASK (0x3 << RESET_STATUS0_BUS_RST_SHIFT) #define RESET_STATUS0_BUS_RST(x) ((x) << RESET_STATUS0_BUS_RST_SHIFT) /* SCU_RST: Status of the SCU_RST reset generator output */ #define RESET_STATUS0_SCU_RST_SHIFT (18) #define RESET_STATUS0_SCU_RST_MASK (0x3 << RESET_STATUS0_SCU_RST_SHIFT) #define RESET_STATUS0_SCU_RST(x) ((x) << RESET_STATUS0_SCU_RST_SHIFT) /* M4_RST: Status of the M4_RST reset generator output */ #define RESET_STATUS0_M4_RST_SHIFT (26) #define RESET_STATUS0_M4_RST_MASK (0x3 << RESET_STATUS0_M4_RST_SHIFT) #define RESET_STATUS0_M4_RST(x) ((x) << RESET_STATUS0_M4_RST_SHIFT) /* --- RESET_STATUS1 values ------------------------------------- */ /* LCD_RST: Status of the LCD_RST reset generator output */ #define RESET_STATUS1_LCD_RST_SHIFT (0) #define RESET_STATUS1_LCD_RST_MASK (0x3 << RESET_STATUS1_LCD_RST_SHIFT) #define RESET_STATUS1_LCD_RST(x) ((x) << RESET_STATUS1_LCD_RST_SHIFT) /* USB0_RST: Status of the USB0_RST reset generator output */ #define RESET_STATUS1_USB0_RST_SHIFT (2) #define RESET_STATUS1_USB0_RST_MASK (0x3 << RESET_STATUS1_USB0_RST_SHIFT) #define RESET_STATUS1_USB0_RST(x) ((x) << RESET_STATUS1_USB0_RST_SHIFT) /* USB1_RST: Status of the USB1_RST reset generator output */ #define RESET_STATUS1_USB1_RST_SHIFT (4) #define RESET_STATUS1_USB1_RST_MASK (0x3 << RESET_STATUS1_USB1_RST_SHIFT) #define RESET_STATUS1_USB1_RST(x) ((x) << RESET_STATUS1_USB1_RST_SHIFT) /* DMA_RST: Status of the DMA_RST reset generator output */ #define RESET_STATUS1_DMA_RST_SHIFT (6) #define RESET_STATUS1_DMA_RST_MASK (0x3 << RESET_STATUS1_DMA_RST_SHIFT) #define RESET_STATUS1_DMA_RST(x) ((x) << RESET_STATUS1_DMA_RST_SHIFT) /* SDIO_RST: Status of the SDIO_RST reset generator output */ #define RESET_STATUS1_SDIO_RST_SHIFT (8) #define RESET_STATUS1_SDIO_RST_MASK (0x3 << RESET_STATUS1_SDIO_RST_SHIFT) #define RESET_STATUS1_SDIO_RST(x) ((x) << RESET_STATUS1_SDIO_RST_SHIFT) /* EMC_RST: Status of the EMC_RST reset generator output */ #define RESET_STATUS1_EMC_RST_SHIFT (10) #define RESET_STATUS1_EMC_RST_MASK (0x3 << RESET_STATUS1_EMC_RST_SHIFT) #define RESET_STATUS1_EMC_RST(x) ((x) << RESET_STATUS1_EMC_RST_SHIFT) /* ETHERNET_RST: Status of the ETHERNET_RST reset generator output */ #define RESET_STATUS1_ETHERNET_RST_SHIFT (12) #define RESET_STATUS1_ETHERNET_RST_MASK \ (0x3 << RESET_STATUS1_ETHERNET_RST_SHIFT) #define RESET_STATUS1_ETHERNET_RST(x) ((x) << RESET_STATUS1_ETHERNET_RST_SHIFT) /* FLASHA_RST: Status of the FLASHA_RST reset generator output */ #define RESET_STATUS1_FLASHA_RST_SHIFT (18) #define RESET_STATUS1_FLASHA_RST_MASK (0x3 << RESET_STATUS1_FLASHA_RST_SHIFT) #define RESET_STATUS1_FLASHA_RST(x) ((x) << RESET_STATUS1_FLASHA_RST_SHIFT) /* EEPROM_RST: Status of the EEPROM_RST reset generator output */ #define RESET_STATUS1_EEPROM_RST_SHIFT (22) #define RESET_STATUS1_EEPROM_RST_MASK (0x3 << RESET_STATUS1_EEPROM_RST_SHIFT) #define RESET_STATUS1_EEPROM_RST(x) ((x) << RESET_STATUS1_EEPROM_RST_SHIFT) /* GPIO_RST: Status of the GPIO_RST reset generator output */ #define RESET_STATUS1_GPIO_RST_SHIFT (24) #define RESET_STATUS1_GPIO_RST_MASK (0x3 << RESET_STATUS1_GPIO_RST_SHIFT) #define RESET_STATUS1_GPIO_RST(x) ((x) << RESET_STATUS1_GPIO_RST_SHIFT) /* FLASHB_RST: Status of the FLASHB_RST reset generator output */ #define RESET_STATUS1_FLASHB_RST_SHIFT (26) #define RESET_STATUS1_FLASHB_RST_MASK (0x3 << RESET_STATUS1_FLASHB_RST_SHIFT) #define RESET_STATUS1_FLASHB_RST(x) ((x) << RESET_STATUS1_FLASHB_RST_SHIFT) /* --- RESET_STATUS2 values ------------------------------------- */ /* TIMER0_RST: Status of the TIMER0_RST reset generator output */ #define RESET_STATUS2_TIMER0_RST_SHIFT (0) #define RESET_STATUS2_TIMER0_RST_MASK (0x3 << RESET_STATUS2_TIMER0_RST_SHIFT) #define RESET_STATUS2_TIMER0_RST(x) ((x) << RESET_STATUS2_TIMER0_RST_SHIFT) /* TIMER1_RST: Status of the TIMER1_RST reset generator output */ #define RESET_STATUS2_TIMER1_RST_SHIFT (2) #define RESET_STATUS2_TIMER1_RST_MASK (0x3 << RESET_STATUS2_TIMER1_RST_SHIFT) #define RESET_STATUS2_TIMER1_RST(x) ((x) << RESET_STATUS2_TIMER1_RST_SHIFT) /* TIMER2_RST: Status of the TIMER2_RST reset generator output */ #define RESET_STATUS2_TIMER2_RST_SHIFT (4) #define RESET_STATUS2_TIMER2_RST_MASK (0x3 << RESET_STATUS2_TIMER2_RST_SHIFT) #define RESET_STATUS2_TIMER2_RST(x) ((x) << RESET_STATUS2_TIMER2_RST_SHIFT) /* TIMER3_RST: Status of the TIMER3_RST reset generator output */ #define RESET_STATUS2_TIMER3_RST_SHIFT (6) #define RESET_STATUS2_TIMER3_RST_MASK (0x3 << RESET_STATUS2_TIMER3_RST_SHIFT) #define RESET_STATUS2_TIMER3_RST(x) ((x) << RESET_STATUS2_TIMER3_RST_SHIFT) /* RITIMER_RST: Status of the RITIMER_RST reset generator output */ #define RESET_STATUS2_RITIMER_RST_SHIFT (8) #define RESET_STATUS2_RITIMER_RST_MASK (0x3 << RESET_STATUS2_RITIMER_RST_SHIFT) #define RESET_STATUS2_RITIMER_RST(x) ((x) << RESET_STATUS2_RITIMER_RST_SHIFT) /* SCT_RST: Status of the SCT_RST reset generator output */ #define RESET_STATUS2_SCT_RST_SHIFT (10) #define RESET_STATUS2_SCT_RST_MASK (0x3 << RESET_STATUS2_SCT_RST_SHIFT) #define RESET_STATUS2_SCT_RST(x) ((x) << RESET_STATUS2_SCT_RST_SHIFT) /* MOTOCONPWM_RST: Status of the MOTOCONPWM_RST reset generator output */ #define RESET_STATUS2_MOTOCONPWM_RST_SHIFT (12) #define RESET_STATUS2_MOTOCONPWM_RST_MASK \ (0x3 << RESET_STATUS2_MOTOCONPWM_RST_SHIFT) #define RESET_STATUS2_MOTOCONPWM_RST(x) \ ((x) << RESET_STATUS2_MOTOCONPWM_RST_SHIFT) /* QEI_RST: Status of the QEI_RST reset generator output */ #define RESET_STATUS2_QEI_RST_SHIFT (14) #define RESET_STATUS2_QEI_RST_MASK (0x3 << RESET_STATUS2_QEI_RST_SHIFT) #define RESET_STATUS2_QEI_RST(x) ((x) << RESET_STATUS2_QEI_RST_SHIFT) /* ADC0_RST: Status of the ADC0_RST reset generator output */ #define RESET_STATUS2_ADC0_RST_SHIFT (16) #define RESET_STATUS2_ADC0_RST_MASK (0x3 << RESET_STATUS2_ADC0_RST_SHIFT) #define RESET_STATUS2_ADC0_RST(x) ((x) << RESET_STATUS2_ADC0_RST_SHIFT) /* ADC1_RST: Status of the ADC1_RST reset generator output */ #define RESET_STATUS2_ADC1_RST_SHIFT (18) #define RESET_STATUS2_ADC1_RST_MASK (0x3 << RESET_STATUS2_ADC1_RST_SHIFT) #define RESET_STATUS2_ADC1_RST(x) ((x) << RESET_STATUS2_ADC1_RST_SHIFT) /* DAC_RST: Status of the DAC_RST reset generator output */ #define RESET_STATUS2_DAC_RST_SHIFT (20) #define RESET_STATUS2_DAC_RST_MASK (0x3 << RESET_STATUS2_DAC_RST_SHIFT) #define RESET_STATUS2_DAC_RST(x) ((x) << RESET_STATUS2_DAC_RST_SHIFT) /* UART0_RST: Status of the UART0_RST reset generator output */ #define RESET_STATUS2_UART0_RST_SHIFT (24) #define RESET_STATUS2_UART0_RST_MASK (0x3 << RESET_STATUS2_UART0_RST_SHIFT) #define RESET_STATUS2_UART0_RST(x) ((x) << RESET_STATUS2_UART0_RST_SHIFT) /* UART1_RST: Status of the UART1_RST reset generator output */ #define RESET_STATUS2_UART1_RST_SHIFT (26) #define RESET_STATUS2_UART1_RST_MASK (0x3 << RESET_STATUS2_UART1_RST_SHIFT) #define RESET_STATUS2_UART1_RST(x) ((x) << RESET_STATUS2_UART1_RST_SHIFT) /* UART2_RST: Status of the UART2_RST reset generator output */ #define RESET_STATUS2_UART2_RST_SHIFT (28) #define RESET_STATUS2_UART2_RST_MASK (0x3 << RESET_STATUS2_UART2_RST_SHIFT) #define RESET_STATUS2_UART2_RST(x) ((x) << RESET_STATUS2_UART2_RST_SHIFT) /* UART3_RST: Status of the UART3_RST reset generator output */ #define RESET_STATUS2_UART3_RST_SHIFT (30) #define RESET_STATUS2_UART3_RST_MASK (0x3 << RESET_STATUS2_UART3_RST_SHIFT) #define RESET_STATUS2_UART3_RST(x) ((x) << RESET_STATUS2_UART3_RST_SHIFT) /* --- RESET_STATUS3 values ------------------------------------- */ /* I2C0_RST: Status of the I2C0_RST reset generator output */ #define RESET_STATUS3_I2C0_RST_SHIFT (0) #define RESET_STATUS3_I2C0_RST_MASK (0x3 << RESET_STATUS3_I2C0_RST_SHIFT) #define RESET_STATUS3_I2C0_RST(x) ((x) << RESET_STATUS3_I2C0_RST_SHIFT) /* I2C1_RST: Status of the I2C1_RST reset generator output */ #define RESET_STATUS3_I2C1_RST_SHIFT (2) #define RESET_STATUS3_I2C1_RST_MASK (0x3 << RESET_STATUS3_I2C1_RST_SHIFT) #define RESET_STATUS3_I2C1_RST(x) ((x) << RESET_STATUS3_I2C1_RST_SHIFT) /* SSP0_RST: Status of the SSP0_RST reset generator output */ #define RESET_STATUS3_SSP0_RST_SHIFT (4) #define RESET_STATUS3_SSP0_RST_MASK (0x3 << RESET_STATUS3_SSP0_RST_SHIFT) #define RESET_STATUS3_SSP0_RST(x) ((x) << RESET_STATUS3_SSP0_RST_SHIFT) /* SSP1_RST: Status of the SSP1_RST reset generator output */ #define RESET_STATUS3_SSP1_RST_SHIFT (6) #define RESET_STATUS3_SSP1_RST_MASK (0x3 << RESET_STATUS3_SSP1_RST_SHIFT) #define RESET_STATUS3_SSP1_RST(x) ((x) << RESET_STATUS3_SSP1_RST_SHIFT) /* I2S_RST: Status of the I2S_RST reset generator output */ #define RESET_STATUS3_I2S_RST_SHIFT (8) #define RESET_STATUS3_I2S_RST_MASK (0x3 << RESET_STATUS3_I2S_RST_SHIFT) #define RESET_STATUS3_I2S_RST(x) ((x) << RESET_STATUS3_I2S_RST_SHIFT) /* SPIFI_RST: Status of the SPIFI_RST reset generator output */ #define RESET_STATUS3_SPIFI_RST_SHIFT (10) #define RESET_STATUS3_SPIFI_RST_MASK (0x3 << RESET_STATUS3_SPIFI_RST_SHIFT) #define RESET_STATUS3_SPIFI_RST(x) ((x) << RESET_STATUS3_SPIFI_RST_SHIFT) /* CAN1_RST: Status of the CAN1_RST reset generator output */ #define RESET_STATUS3_CAN1_RST_SHIFT (12) #define RESET_STATUS3_CAN1_RST_MASK (0x3 << RESET_STATUS3_CAN1_RST_SHIFT) #define RESET_STATUS3_CAN1_RST(x) ((x) << RESET_STATUS3_CAN1_RST_SHIFT) /* CAN0_RST: Status of the CAN0_RST reset generator output */ #define RESET_STATUS3_CAN0_RST_SHIFT (14) #define RESET_STATUS3_CAN0_RST_MASK (0x3 << RESET_STATUS3_CAN0_RST_SHIFT) #define RESET_STATUS3_CAN0_RST(x) ((x) << RESET_STATUS3_CAN0_RST_SHIFT) /* M0APP_RST: Status of the M0APP_RST reset generator output */ #define RESET_STATUS3_M0APP_RST_SHIFT (16) #define RESET_STATUS3_M0APP_RST_MASK (0x3 << RESET_STATUS3_M0APP_RST_SHIFT) #define RESET_STATUS3_M0APP_RST(x) ((x) << RESET_STATUS3_M0APP_RST_SHIFT) /* SGPIO_RST: Status of the SGPIO_RST reset generator output */ #define RESET_STATUS3_SGPIO_RST_SHIFT (18) #define RESET_STATUS3_SGPIO_RST_MASK (0x3 << RESET_STATUS3_SGPIO_RST_SHIFT) #define RESET_STATUS3_SGPIO_RST(x) ((x) << RESET_STATUS3_SGPIO_RST_SHIFT) /* SPI_RST: Status of the SPI_RST reset generator output */ #define RESET_STATUS3_SPI_RST_SHIFT (20) #define RESET_STATUS3_SPI_RST_MASK (0x3 << RESET_STATUS3_SPI_RST_SHIFT) #define RESET_STATUS3_SPI_RST(x) ((x) << RESET_STATUS3_SPI_RST_SHIFT) /* --- RESET_ACTIVE_STATUS0 values ------------------------------ */ /* CORE_RST: Current status of the CORE_RST */ #define RESET_ACTIVE_STATUS0_CORE_RST_SHIFT (0) #define RESET_ACTIVE_STATUS0_CORE_RST (1 << RESET_ACTIVE_STATUS0_CORE_RST_SHIFT) /* PERIPH_RST: Current status of the PERIPH_RST */ #define RESET_ACTIVE_STATUS0_PERIPH_RST_SHIFT (1) #define RESET_ACTIVE_STATUS0_PERIPH_RST \ (1 << RESET_ACTIVE_STATUS0_PERIPH_RST_SHIFT) /* MASTER_RST: Current status of the MASTER_RST */ #define RESET_ACTIVE_STATUS0_MASTER_RST_SHIFT (2) #define RESET_ACTIVE_STATUS0_MASTER_RST \ (1 << RESET_ACTIVE_STATUS0_MASTER_RST_SHIFT) /* WWDT_RST: Current status of the WWDT_RST */ #define RESET_ACTIVE_STATUS0_WWDT_RST_SHIFT (4) #define RESET_ACTIVE_STATUS0_WWDT_RST (1 << RESET_ACTIVE_STATUS0_WWDT_RST_SHIFT) /* CREG_RST: Current status of the CREG_RST */ #define RESET_ACTIVE_STATUS0_CREG_RST_SHIFT (5) #define RESET_ACTIVE_STATUS0_CREG_RST (1 << RESET_ACTIVE_STATUS0_CREG_RST_SHIFT) /* BUS_RST: Current status of the BUS_RST */ #define RESET_ACTIVE_STATUS0_BUS_RST_SHIFT (8) #define RESET_ACTIVE_STATUS0_BUS_RST (1 << RESET_ACTIVE_STATUS0_BUS_RST_SHIFT) /* SCU_RST: Current status of the SCU_RST */ #define RESET_ACTIVE_STATUS0_SCU_RST_SHIFT (9) #define RESET_ACTIVE_STATUS0_SCU_RST (1 << RESET_ACTIVE_STATUS0_SCU_RST_SHIFT) /* M4_RST: Current status of the M4_RST */ #define RESET_ACTIVE_STATUS0_M4_RST_SHIFT (13) #define RESET_ACTIVE_STATUS0_M4_RST (1 << RESET_ACTIVE_STATUS0_M4_RST_SHIFT) /* LCD_RST: Current status of the LCD_RST */ #define RESET_ACTIVE_STATUS0_LCD_RST_SHIFT (16) #define RESET_ACTIVE_STATUS0_LCD_RST (1 << RESET_ACTIVE_STATUS0_LCD_RST_SHIFT) /* USB0_RST: Current status of the USB0_RST */ #define RESET_ACTIVE_STATUS0_USB0_RST_SHIFT (17) #define RESET_ACTIVE_STATUS0_USB0_RST (1 << RESET_ACTIVE_STATUS0_USB0_RST_SHIFT) /* USB1_RST: Current status of the USB1_RST */ #define RESET_ACTIVE_STATUS0_USB1_RST_SHIFT (18) #define RESET_ACTIVE_STATUS0_USB1_RST (1 << RESET_ACTIVE_STATUS0_USB1_RST_SHIFT) /* DMA_RST: Current status of the DMA_RST */ #define RESET_ACTIVE_STATUS0_DMA_RST_SHIFT (19) #define RESET_ACTIVE_STATUS0_DMA_RST (1 << RESET_ACTIVE_STATUS0_DMA_RST_SHIFT) /* SDIO_RST: Current status of the SDIO_RST */ #define RESET_ACTIVE_STATUS0_SDIO_RST_SHIFT (20) #define RESET_ACTIVE_STATUS0_SDIO_RST (1 << RESET_ACTIVE_STATUS0_SDIO_RST_SHIFT) /* EMC_RST: Current status of the EMC_RST */ #define RESET_ACTIVE_STATUS0_EMC_RST_SHIFT (21) #define RESET_ACTIVE_STATUS0_EMC_RST (1 << RESET_ACTIVE_STATUS0_EMC_RST_SHIFT) /* ETHERNET_RST: Current status of the ETHERNET_RST */ #define RESET_ACTIVE_STATUS0_ETHERNET_RST_SHIFT (22) #define RESET_ACTIVE_STATUS0_ETHERNET_RST \ (1 << RESET_ACTIVE_STATUS0_ETHERNET_RST_SHIFT) /* FLASHA_RST: Current status of the FLASHA_RST */ #define RESET_ACTIVE_STATUS0_FLASHA_RST_SHIFT (25) #define RESET_ACTIVE_STATUS0_FLASHA_RST \ (1 << RESET_ACTIVE_STATUS0_FLASHA_RST_SHIFT) /* EEPROM_RST: Current status of the EEPROM_RST */ #define RESET_ACTIVE_STATUS0_EEPROM_RST_SHIFT (27) #define RESET_ACTIVE_STATUS0_EEPROM_RST \ (1 << RESET_ACTIVE_STATUS0_EEPROM_RST_SHIFT) /* GPIO_RST: Current status of the GPIO_RST */ #define RESET_ACTIVE_STATUS0_GPIO_RST_SHIFT (28) #define RESET_ACTIVE_STATUS0_GPIO_RST (1 << RESET_ACTIVE_STATUS0_GPIO_RST_SHIFT) /* FLASHB_RST: Current status of the FLASHB_RST */ #define RESET_ACTIVE_STATUS0_FLASHB_RST_SHIFT (29) #define RESET_ACTIVE_STATUS0_FLASHB_RST \ (1 << RESET_ACTIVE_STATUS0_FLASHB_RST_SHIFT) /* --- RESET_ACTIVE_STATUS1 values ------------------------------ */ /* TIMER0_RST: Current status of the TIMER0_RST */ #define RESET_ACTIVE_STATUS1_TIMER0_RST_SHIFT (0) #define RESET_ACTIVE_STATUS1_TIMER0_RST \ (1 << RESET_ACTIVE_STATUS1_TIMER0_RST_SHIFT) /* TIMER1_RST: Current status of the TIMER1_RST */ #define RESET_ACTIVE_STATUS1_TIMER1_RST_SHIFT (1) #define RESET_ACTIVE_STATUS1_TIMER1_RST \ (1 << RESET_ACTIVE_STATUS1_TIMER1_RST_SHIFT) /* TIMER2_RST: Current status of the TIMER2_RST */ #define RESET_ACTIVE_STATUS1_TIMER2_RST_SHIFT (2) #define RESET_ACTIVE_STATUS1_TIMER2_RST \ (1 << RESET_ACTIVE_STATUS1_TIMER2_RST_SHIFT) /* TIMER3_RST: Current status of the TIMER3_RST */ #define RESET_ACTIVE_STATUS1_TIMER3_RST_SHIFT (3) #define RESET_ACTIVE_STATUS1_TIMER3_RST \ (1 << RESET_ACTIVE_STATUS1_TIMER3_RST_SHIFT) /* RITIMER_RST: Current status of the RITIMER_RST */ #define RESET_ACTIVE_STATUS1_RITIMER_RST_SHIFT (4) #define RESET_ACTIVE_STATUS1_RITIMER_RST \ (1 << RESET_ACTIVE_STATUS1_RITIMER_RST_SHIFT) /* SCT_RST: Current status of the SCT_RST */ #define RESET_ACTIVE_STATUS1_SCT_RST_SHIFT (5) #define RESET_ACTIVE_STATUS1_SCT_RST \ (1 << RESET_ACTIVE_STATUS1_SCT_RST_SHIFT) /* MOTOCONPWM_RST: Current status of the MOTOCONPWM_RST */ #define RESET_ACTIVE_STATUS1_MOTOCONPWM_RST_SHIFT (6) #define RESET_ACTIVE_STATUS1_MOTOCONPWM_RST \ (1 << RESET_ACTIVE_STATUS1_MOTOCONPWM_RST_SHIFT) /* QEI_RST: Current status of the QEI_RST */ #define RESET_ACTIVE_STATUS1_QEI_RST_SHIFT (7) #define RESET_ACTIVE_STATUS1_QEI_RST \ (1 << RESET_ACTIVE_STATUS1_QEI_RST_SHIFT) /* ADC0_RST: Current status of the ADC0_RST */ #define RESET_ACTIVE_STATUS1_ADC0_RST_SHIFT (8) #define RESET_ACTIVE_STATUS1_ADC0_RST \ (1 << RESET_ACTIVE_STATUS1_ADC0_RST_SHIFT) /* ADC1_RST: Current status of the ADC1_RST */ #define RESET_ACTIVE_STATUS1_ADC1_RST_SHIFT (9) #define RESET_ACTIVE_STATUS1_ADC1_RST \ (1 << RESET_ACTIVE_STATUS1_ADC1_RST_SHIFT) /* DAC_RST: Current status of the DAC_RST */ #define RESET_ACTIVE_STATUS1_DAC_RST_SHIFT (10) #define RESET_ACTIVE_STATUS1_DAC_RST (1 << RESET_ACTIVE_STATUS1_DAC_RST_SHIFT) /* UART0_RST: Current status of the UART0_RST */ #define RESET_ACTIVE_STATUS1_UART0_RST_SHIFT (12) #define RESET_ACTIVE_STATUS1_UART0_RST \ (1 << RESET_ACTIVE_STATUS1_UART0_RST_SHIFT) /* UART1_RST: Current status of the UART1_RST */ #define RESET_ACTIVE_STATUS1_UART1_RST_SHIFT (13) #define RESET_ACTIVE_STATUS1_UART1_RST \ (1 << RESET_ACTIVE_STATUS1_UART1_RST_SHIFT) /* UART2_RST: Current status of the UART2_RST */ #define RESET_ACTIVE_STATUS1_UART2_RST_SHIFT (14) #define RESET_ACTIVE_STATUS1_UART2_RST \ (1 << RESET_ACTIVE_STATUS1_UART2_RST_SHIFT) /* UART3_RST: Current status of the UART3_RST */ #define RESET_ACTIVE_STATUS1_UART3_RST_SHIFT (15) #define RESET_ACTIVE_STATUS1_UART3_RST \ (1 << RESET_ACTIVE_STATUS1_UART3_RST_SHIFT) /* I2C0_RST: Current status of the I2C0_RST */ #define RESET_ACTIVE_STATUS1_I2C0_RST_SHIFT (16) #define RESET_ACTIVE_STATUS1_I2C0_RST \ (1 << RESET_ACTIVE_STATUS1_I2C0_RST_SHIFT) /* I2C1_RST: Current status of the I2C1_RST */ #define RESET_ACTIVE_STATUS1_I2C1_RST_SHIFT (17) #define RESET_ACTIVE_STATUS1_I2C1_RST \ (1 << RESET_ACTIVE_STATUS1_I2C1_RST_SHIFT) /* SSP0_RST: Current status of the SSP0_RST */ #define RESET_ACTIVE_STATUS1_SSP0_RST_SHIFT (18) #define RESET_ACTIVE_STATUS1_SSP0_RST \ (1 << RESET_ACTIVE_STATUS1_SSP0_RST_SHIFT) /* SSP1_RST: Current status of the SSP1_RST */ #define RESET_ACTIVE_STATUS1_SSP1_RST_SHIFT (19) #define RESET_ACTIVE_STATUS1_SSP1_RST \ (1 << RESET_ACTIVE_STATUS1_SSP1_RST_SHIFT) /* I2S_RST: Current status of the I2S_RST */ #define RESET_ACTIVE_STATUS1_I2S_RST_SHIFT (20) #define RESET_ACTIVE_STATUS1_I2S_RST (1 << RESET_ACTIVE_STATUS1_I2S_RST_SHIFT) /* SPIFI_RST: Current status of the SPIFI_RST */ #define RESET_ACTIVE_STATUS1_SPIFI_RST_SHIFT (21) #define RESET_ACTIVE_STATUS1_SPIFI_RST \ (1 << RESET_ACTIVE_STATUS1_SPIFI_RST_SHIFT) /* CAN1_RST: Current status of the CAN1_RST */ #define RESET_ACTIVE_STATUS1_CAN1_RST_SHIFT (22) #define RESET_ACTIVE_STATUS1_CAN1_RST \ (1 << RESET_ACTIVE_STATUS1_CAN1_RST_SHIFT) /* CAN0_RST: Current status of the CAN0_RST */ #define RESET_ACTIVE_STATUS1_CAN0_RST_SHIFT (23) #define RESET_ACTIVE_STATUS1_CAN0_RST \ (1 << RESET_ACTIVE_STATUS1_CAN0_RST_SHIFT) /* M0APP_RST: Current status of the M0APP_RST */ #define RESET_ACTIVE_STATUS1_M0APP_RST_SHIFT (24) #define RESET_ACTIVE_STATUS1_M0APP_RST \ (1 << RESET_ACTIVE_STATUS1_M0APP_RST_SHIFT) /* SGPIO_RST: Current status of the SGPIO_RST */ #define RESET_ACTIVE_STATUS1_SGPIO_RST_SHIFT (25) #define RESET_ACTIVE_STATUS1_SGPIO_RST \ (1 << RESET_ACTIVE_STATUS1_SGPIO_RST_SHIFT) /* SPI_RST: Current status of the SPI_RST */ #define RESET_ACTIVE_STATUS1_SPI_RST_SHIFT (26) #define RESET_ACTIVE_STATUS1_SPI_RST (1 << RESET_ACTIVE_STATUS1_SPI_RST_SHIFT) /* --- RESET_EXT_STAT0 values ----------------------------------- */ /* EXT_RESET: Reset activated by external reset from reset pin */ #define RESET_EXT_STAT0_EXT_RESET_SHIFT (0) #define RESET_EXT_STAT0_EXT_RESET (1 << RESET_EXT_STAT0_EXT_RESET_SHIFT) /* BOD_RESET: Reset activated by BOD reset */ #define RESET_EXT_STAT0_BOD_RESET_SHIFT (4) #define RESET_EXT_STAT0_BOD_RESET (1 << RESET_EXT_STAT0_BOD_RESET_SHIFT) /* WWDT_RESET: Reset activated by WWDT time-out */ #define RESET_EXT_STAT0_WWDT_RESET_SHIFT (5) #define RESET_EXT_STAT0_WWDT_RESET (1 << RESET_EXT_STAT0_WWDT_RESET_SHIFT) /* --- RESET_EXT_STAT1 values ----------------------------------- */ /* CORE_RESET: Reset activated by CORE_RST output */ #define RESET_EXT_STAT1_CORE_RESET_SHIFT (1) #define RESET_EXT_STAT1_CORE_RESET (1 << RESET_EXT_STAT1_CORE_RESET_SHIFT) /* --- RESET_EXT_STAT2 values ----------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT2_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT2_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT2_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT4 values ----------------------------------- */ /* CORE_RESET: Reset activated by CORE_RST output */ #define RESET_EXT_STAT4_CORE_RESET_SHIFT (1) #define RESET_EXT_STAT4_CORE_RESET (1 << RESET_EXT_STAT4_CORE_RESET_SHIFT) /* --- RESET_EXT_STAT5 values ----------------------------------- */ /* CORE_RESET: Reset activated by CORE_RST output */ #define RESET_EXT_STAT5_CORE_RESET_SHIFT (1) #define RESET_EXT_STAT5_CORE_RESET (1 << RESET_EXT_STAT5_CORE_RESET_SHIFT) /* --- RESET_EXT_STAT8 values ----------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT8_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT8_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT8_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT9 values ----------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT9_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT9_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT9_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT13 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT13_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT13_MASTER_RESET (1 << RESET_EXT_STAT13_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT16 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT16_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT16_MASTER_RESET (1 << RESET_EXT_STAT16_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT17 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT17_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT17_MASTER_RESET (1 << RESET_EXT_STAT17_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT18 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT18_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT18_MASTER_RESET (1 << RESET_EXT_STAT18_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT19 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT19_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT19_MASTER_RESET (1 << RESET_EXT_STAT19_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT20 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT20_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT20_MASTER_RESET (1 << RESET_EXT_STAT20_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT21 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT21_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT21_MASTER_RESET (1 << RESET_EXT_STAT21_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT22 values ---------------------------------- */ /* MASTER_RESET: Reset activated by MASTER_RST output */ #define RESET_EXT_STAT22_MASTER_RESET_SHIFT (3) #define RESET_EXT_STAT22_MASTER_RESET (1 << RESET_EXT_STAT22_MASTER_RESET_SHIFT) /* --- RESET_EXT_STAT25 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT25_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT25_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT25_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT27 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT27_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT27_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT27_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT28 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT28_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT28_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT28_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT29 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT29_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT29_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT29_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT32 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT32_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT32_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT32_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT33 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT33_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT33_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT33_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT34 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT34_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT34_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT34_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT35 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT35_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT35_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT35_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT36 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT36_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT36_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT36_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT37 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT37_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT37_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT37_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT38 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT38_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT38_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT38_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT39 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT39_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT39_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT39_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT40 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT40_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT40_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT40_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT41 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT41_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT41_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT41_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT42 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT42_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT42_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT42_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT44 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT44_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT44_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT44_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT45 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT45_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT45_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT45_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT46 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT46_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT46_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT46_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT47 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT47_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT47_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT47_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT48 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT48_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT48_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT48_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT49 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT49_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT49_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT49_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT50 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT50_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT50_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT50_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT51 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT51_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT51_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT51_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT52 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT52_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT52_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT52_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT53 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT53_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT53_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT53_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT54 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT54_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT54_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT54_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT55 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT55_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT55_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT55_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT56 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT56_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT56_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT56_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT57 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT57_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT57_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT57_PERIPHERAL_RESET_SHIFT) /* --- RESET_EXT_STAT58 values ---------------------------------- */ /* PERIPHERAL_RESET: Reset activated by PERIPHERAL_RST output */ #define RESET_EXT_STAT58_PERIPHERAL_RESET_SHIFT (2) #define RESET_EXT_STAT58_PERIPHERAL_RESET \ (1 << RESET_EXT_STAT58_PERIPHERAL_RESET_SHIFT) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/ritimer.h ================================================ /** @defgroup ritimer_defines Repetitive Interrupt Timer Defines @brief Defined Constants and Types for the LPC43xx Repetitive Interrupt Timer @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_RITIMER_H #define LPC43XX_RITIMER_H /**@{*/ #include #include /* --- Repetitive Interrupt Timer registers -------------------------------- */ /* Compare register */ #define RITIMER_COMPVAL MMIO32(RITIMER_BASE + 0x000) /* Mask register */ #define RITIMER_MASK MMIO32(RITIMER_BASE + 0x004) /* Control register */ #define RITIMER_CTRL MMIO32(RITIMER_BASE + 0x008) /* 32-bit counter */ #define RITIMER_COUNTER MMIO32(RITIMER_BASE + 0x00C) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines @brief Defined Constants and Types for the LPC43xx Real Time Clock (RTC) @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2014 Jared Boone @date 2 January 2014 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2014 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_RTC_H #define LPC43XX_RTC_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* RTC port base address (for convenience) */ #define RTC RTC_BASE /* --- RTC registers ------------------------------------------------------- */ #define RTC_ILR MMIO32(RTC_BASE + 0x000) #define RTC_CCR MMIO32(RTC_BASE + 0x008) #define RTC_CIIR MMIO32(RTC_BASE + 0x00c) #define RTC_AMR MMIO32(RTC_BASE + 0x010) #define RTC_CTIME0 MMIO32(RTC_BASE + 0x014) #define RTC_CTIME1 MMIO32(RTC_BASE + 0x018) #define RTC_CTIME2 MMIO32(RTC_BASE + 0x01c) #define RTC_SEC MMIO32(RTC_BASE + 0x020) #define RTC_MIN MMIO32(RTC_BASE + 0x024) #define RTC_HRS MMIO32(RTC_BASE + 0x028) #define RTC_DOM MMIO32(RTC_BASE + 0x02c) #define RTC_DOW MMIO32(RTC_BASE + 0x030) #define RTC_DOY MMIO32(RTC_BASE + 0x034) #define RTC_MONTH MMIO32(RTC_BASE + 0x038) #define RTC_YEAR MMIO32(RTC_BASE + 0x03c) #define RTC_CALIBRATION MMIO32(RTC_BASE + 0x040) #define RTC_ASEC MMIO32(RTC_BASE + 0x060) #define RTC_AMIN MMIO32(RTC_BASE + 0x064) #define RTC_AHRS MMIO32(RTC_BASE + 0x068) #define RTC_ADOM MMIO32(RTC_BASE + 0x06c) #define RTC_ADOW MMIO32(RTC_BASE + 0x070) #define RTC_ADOY MMIO32(RTC_BASE + 0x074) #define RTC_AMON MMIO32(RTC_BASE + 0x078) #define RTC_AYRS MMIO32(RTC_BASE + 0x07c) /* --- RTC_ILR values ------------------------------------------- */ /* RTCCIF: Counter increment interrupt block interrupted */ #define RTC_ILR_RTCCIF_SHIFT (0) #define RTC_ILR_RTCCIF_MASK (0x1 << RTC_ILR_RTCCIF_SHIFT) #define RTC_ILR_RTCCIF(x) ((x) << RTC_ILR_RTCCIF_SHIFT) /* RTCALF: Alarm interrupted */ #define RTC_ILR_RTCALF_SHIFT (1) #define RTC_ILR_RTCALF_MASK (0x1 << RTC_ILR_RTCALF_SHIFT) #define RTC_ILR_RTCALF(x) ((x) << RTC_ILR_RTCALF_SHIFT) /* --- RTC_CCR values ------------------------------------------- */ /* CLKEN: Clock enable */ #define RTC_CCR_CLKEN_SHIFT (0) #define RTC_CCR_CLKEN_MASK (0x1 << RTC_CCR_CLKEN_SHIFT) #define RTC_CCR_CLKEN(x) ((x) << RTC_CCR_CLKEN_SHIFT) /* CTCRST: CTC reset */ #define RTC_CCR_CTCRST_SHIFT (1) #define RTC_CCR_CTCRST_MASK (0x1 << RTC_CCR_CTCRST_SHIFT) #define RTC_CCR_CTCRST(x) ((x) << RTC_CCR_CTCRST_SHIFT) /* CCALEN: Calibration counter enable */ #define RTC_CCR_CCALEN_SHIFT (4) #define RTC_CCR_CCALEN_MASK (0x1 << RTC_CCR_CCALEN_SHIFT) #define RTC_CCR_CCALEN(x) ((x) << RTC_CCR_CCALEN_SHIFT) /* --- RTC_CIIR values ------------------------------------------ */ /* IMSEC: Second interrupt enable */ #define RTC_CIIR_IMSEC_SHIFT (0) #define RTC_CIIR_IMSEC_MASK (0x1 << RTC_CIIR_IMSEC_SHIFT) #define RTC_CIIR_IMSEC(x) ((x) << RTC_CIIR_IMSEC_SHIFT) /* IMMIN: Minute interrupt enable */ #define RTC_CIIR_IMMIN_SHIFT (1) #define RTC_CIIR_IMMIN_MASK (0x1 << RTC_CIIR_IMMIN_SHIFT) #define RTC_CIIR_IMMIN(x) ((x) << RTC_CIIR_IMMIN_SHIFT) /* IMHOUR: Hour interrupt enable */ #define RTC_CIIR_IMHOUR_SHIFT (2) #define RTC_CIIR_IMHOUR_MASK (0x1 << RTC_CIIR_IMHOUR_SHIFT) #define RTC_CIIR_IMHOUR(x) ((x) << RTC_CIIR_IMHOUR_SHIFT) /* IMDOM: Day of month interrupt enable */ #define RTC_CIIR_IMDOM_SHIFT (3) #define RTC_CIIR_IMDOM_MASK (0x1 << RTC_CIIR_IMDOM_SHIFT) #define RTC_CIIR_IMDOM(x) ((x) << RTC_CIIR_IMDOM_SHIFT) /* IMDOW: Day of week interrupt enable */ #define RTC_CIIR_IMDOW_SHIFT (4) #define RTC_CIIR_IMDOW_MASK (0x1 << RTC_CIIR_IMDOW_SHIFT) #define RTC_CIIR_IMDOW(x) ((x) << RTC_CIIR_IMDOW_SHIFT) /* IMDOY: Day of year interrupt enable */ #define RTC_CIIR_IMDOY_SHIFT (5) #define RTC_CIIR_IMDOY_MASK (0x1 << RTC_CIIR_IMDOY_SHIFT) #define RTC_CIIR_IMDOY(x) ((x) << RTC_CIIR_IMDOY_SHIFT) /* IMMON: Month interrupt enable */ #define RTC_CIIR_IMMON_SHIFT (6) #define RTC_CIIR_IMMON_MASK (0x1 << RTC_CIIR_IMMON_SHIFT) #define RTC_CIIR_IMMON(x) ((x) << RTC_CIIR_IMMON_SHIFT) /* IMYEAR: Year interrupt enable */ #define RTC_CIIR_IMYEAR_SHIFT (7) #define RTC_CIIR_IMYEAR_MASK (0x1 << RTC_CIIR_IMYEAR_SHIFT) #define RTC_CIIR_IMYEAR(x) ((x) << RTC_CIIR_IMYEAR_SHIFT) /* --- RTC_AMR values ------------------------------------------- */ /* AMRSEC: Second not compared for alarm */ #define RTC_AMR_AMRSEC_SHIFT (0) #define RTC_AMR_AMRSEC_MASK (0x1 << RTC_AMR_AMRSEC_SHIFT) #define RTC_AMR_AMRSEC(x) ((x) << RTC_AMR_AMRSEC_SHIFT) /* AMRMIN: Minute not compared for alarm */ #define RTC_AMR_AMRMIN_SHIFT (1) #define RTC_AMR_AMRMIN_MASK (0x1 << RTC_AMR_AMRMIN_SHIFT) #define RTC_AMR_AMRMIN(x) ((x) << RTC_AMR_AMRMIN_SHIFT) /* AMRHOUR: Hour not compared for alarm */ #define RTC_AMR_AMRHOUR_SHIFT (2) #define RTC_AMR_AMRHOUR_MASK (0x1 << RTC_AMR_AMRHOUR_SHIFT) #define RTC_AMR_AMRHOUR(x) ((x) << RTC_AMR_AMRHOUR_SHIFT) /* AMRDOM: Day of month not compared for alarm */ #define RTC_AMR_AMRDOM_SHIFT (3) #define RTC_AMR_AMRDOM_MASK (0x1 << RTC_AMR_AMRDOM_SHIFT) #define RTC_AMR_AMRDOM(x) ((x) << RTC_AMR_AMRDOM_SHIFT) /* AMRDOW: Day of week not compared for alarm */ #define RTC_AMR_AMRDOW_SHIFT (4) #define RTC_AMR_AMRDOW_MASK (0x1 << RTC_AMR_AMRDOW_SHIFT) #define RTC_AMR_AMRDOW(x) ((x) << RTC_AMR_AMRDOW_SHIFT) /* AMRDOY: Day of year not compared for alarm */ #define RTC_AMR_AMRDOY_SHIFT (5) #define RTC_AMR_AMRDOY_MASK (0x1 << RTC_AMR_AMRDOY_SHIFT) #define RTC_AMR_AMRDOY(x) ((x) << RTC_AMR_AMRDOY_SHIFT) /* AMRMON: Month not compared for alarm */ #define RTC_AMR_AMRMON_SHIFT (6) #define RTC_AMR_AMRMON_MASK (0x1 << RTC_AMR_AMRMON_SHIFT) #define RTC_AMR_AMRMON(x) ((x) << RTC_AMR_AMRMON_SHIFT) /* AMRYEAR: Year not compared for alarm */ #define RTC_AMR_AMRYEAR_SHIFT (7) #define RTC_AMR_AMRYEAR_MASK (0x1 << RTC_AMR_AMRYEAR_SHIFT) #define RTC_AMR_AMRYEAR(x) ((x) << RTC_AMR_AMRYEAR_SHIFT) /* --- RTC_CTIME0 values ---------------------------------------- */ /* SECONDS: Seconds */ #define RTC_CTIME0_SECONDS_SHIFT (0) #define RTC_CTIME0_SECONDS_MASK (0x3f << RTC_CTIME0_SECONDS_SHIFT) #define RTC_CTIME0_SECONDS(x) ((x) << RTC_CTIME0_SECONDS_SHIFT) /* MINUTES: Minutes */ #define RTC_CTIME0_MINUTES_SHIFT (8) #define RTC_CTIME0_MINUTES_MASK (0x3f << RTC_CTIME0_MINUTES_SHIFT) #define RTC_CTIME0_MINUTES(x) ((x) << RTC_CTIME0_MINUTES_SHIFT) /* HOURS: Hours */ #define RTC_CTIME0_HOURS_SHIFT (16) #define RTC_CTIME0_HOURS_MASK (0x1f << RTC_CTIME0_HOURS_SHIFT) #define RTC_CTIME0_HOURS(x) ((x) << RTC_CTIME0_HOURS_SHIFT) /* DOW: Day of week */ #define RTC_CTIME0_DOW_SHIFT (24) #define RTC_CTIME0_DOW_MASK (0x7 << RTC_CTIME0_DOW_SHIFT) #define RTC_CTIME0_DOW(x) ((x) << RTC_CTIME0_DOW_SHIFT) /* --- RTC_CTIME1 values ---------------------------------------- */ /* DOM: Day of month */ #define RTC_CTIME1_DOM_SHIFT (0) #define RTC_CTIME1_DOM_MASK (0x1f << RTC_CTIME1_DOM_SHIFT) #define RTC_CTIME1_DOM(x) ((x) << RTC_CTIME1_DOM_SHIFT) /* MONTH: Month */ #define RTC_CTIME1_MONTH_SHIFT (8) #define RTC_CTIME1_MONTH_MASK (0xf << RTC_CTIME1_MONTH_SHIFT) #define RTC_CTIME1_MONTH(x) ((x) << RTC_CTIME1_MONTH_SHIFT) /* YEAR: Year */ #define RTC_CTIME1_YEAR_SHIFT (16) #define RTC_CTIME1_YEAR_MASK (0xfff << RTC_CTIME1_YEAR_SHIFT) #define RTC_CTIME1_YEAR(x) ((x) << RTC_CTIME1_YEAR_SHIFT) /* --- RTC_CTIME2 values ---------------------------------------- */ /* DOY: Day of year */ #define RTC_CTIME2_DOY_SHIFT (0) #define RTC_CTIME2_DOY_MASK (0xfff << RTC_CTIME2_DOY_SHIFT) #define RTC_CTIME2_DOY(x) ((x) << RTC_CTIME2_DOY_SHIFT) /* --- RTC_SEC values ------------------------------------------- */ /* SECONDS: Seconds */ #define RTC_SEC_SECONDS_SHIFT (0) #define RTC_SEC_SECONDS_MASK (0x3f << RTC_SEC_SECONDS_SHIFT) #define RTC_SEC_SECONDS(x) ((x) << RTC_SEC_SECONDS_SHIFT) /* --- RTC_MIN values ------------------------------------------- */ /* MINUTES: Minutes */ #define RTC_MIN_MINUTES_SHIFT (0) #define RTC_MIN_MINUTES_MASK (0x3f << RTC_MIN_MINUTES_SHIFT) #define RTC_MIN_MINUTES(x) ((x) << RTC_MIN_MINUTES_SHIFT) /* --- RTC_HRS values ------------------------------------------- */ /* HOURS: Hours */ #define RTC_HRS_HOURS_SHIFT (0) #define RTC_HRS_HOURS_MASK (0x1f << RTC_HRS_HOURS_SHIFT) #define RTC_HRS_HOURS(x) ((x) << RTC_HRS_HOURS_SHIFT) /* --- RTC_DOM values ------------------------------------------- */ /* DOM: Day of month */ #define RTC_DOM_DOM_SHIFT (0) #define RTC_DOM_DOM_MASK (0x1f << RTC_DOM_DOM_SHIFT) #define RTC_DOM_DOM(x) ((x) << RTC_DOM_DOM_SHIFT) /* --- RTC_DOW values ------------------------------------------- */ /* DOW: Day of week */ #define RTC_DOW_DOW_SHIFT (0) #define RTC_DOW_DOW_MASK (0x7 << RTC_DOW_DOW_SHIFT) #define RTC_DOW_DOW(x) ((x) << RTC_DOW_DOW_SHIFT) /* --- RTC_DOY values ------------------------------------------- */ /* DOY: Day of year */ #define RTC_DOY_DOY_SHIFT (0) #define RTC_DOY_DOY_MASK (0x1ff << RTC_DOY_DOY_SHIFT) #define RTC_DOY_DOY(x) ((x) << RTC_DOY_DOY_SHIFT) /* --- RTC_MONTH values ----------------------------------------- */ /* MONTH: Month */ #define RTC_MONTH_MONTH_SHIFT (0) #define RTC_MONTH_MONTH_MASK (0xf << RTC_MONTH_MONTH_SHIFT) #define RTC_MONTH_MONTH(x) ((x) << RTC_MONTH_MONTH_SHIFT) /* --- RTC_YEAR values ------------------------------------------ */ /* YEAR: Year */ #define RTC_YEAR_YEAR_SHIFT (0) #define RTC_YEAR_YEAR_MASK (0xfff << RTC_YEAR_YEAR_SHIFT) #define RTC_YEAR_YEAR(x) ((x) << RTC_YEAR_YEAR_SHIFT) /* --- RTC_CALIBRATION values ----------------------------------- */ /* CALVAL: Calibration counter max */ #define RTC_CALIBRATION_CALVAL_SHIFT (0) #define RTC_CALIBRATION_CALVAL_MASK (0x1ffff << RTC_CALIBRATION_CALVAL_SHIFT) #define RTC_CALIBRATION_CALVAL(x) ((x) << RTC_CALIBRATION_CALVAL_SHIFT) /* CALDIR: Calibration counter direction */ #define RTC_CALIBRATION_CALDIR_SHIFT (17) #define RTC_CALIBRATION_CALDIR_MASK (0x1 << RTC_CALIBRATION_CALDIR_SHIFT) #define RTC_CALIBRATION_CALDIR(x) ((x) << RTC_CALIBRATION_CALDIR_SHIFT) /* --- RTC_ASEC values ------------------------------------------ */ /* SECONDS: Alarm seconds */ #define RTC_ASEC_SECONDS_SHIFT (0) #define RTC_ASEC_SECONDS_MASK (0x3f << RTC_ASEC_SECONDS_SHIFT) #define RTC_ASEC_SECONDS(x) ((x) << RTC_ASEC_SECONDS_SHIFT) /* --- RTC_AMIN values ------------------------------------------ */ /* MINUTES: Alarm minutes */ #define RTC_AMIN_MINUTES_SHIFT (0) #define RTC_AMIN_MINUTES_MASK (0x3f << RTC_AMIN_MINUTES_SHIFT) #define RTC_AMIN_MINUTES(x) ((x) << RTC_AMIN_MINUTES_SHIFT) /* --- RTC_AHRS values ------------------------------------------ */ /* HOURS: Alarm hours */ #define RTC_AHRS_HOURS_SHIFT (0) #define RTC_AHRS_HOURS_MASK (0x1f << RTC_AHRS_HOURS_SHIFT) #define RTC_AHRS_HOURS(x) ((x) << RTC_AHRS_HOURS_SHIFT) /* --- RTC_ADOM values ------------------------------------------ */ /* DOM: Alarm day of month */ #define RTC_ADOM_DOM_SHIFT (0) #define RTC_ADOM_DOM_MASK (0x1f << RTC_ADOM_DOM_SHIFT) #define RTC_ADOM_DOM(x) ((x) << RTC_ADOM_DOM_SHIFT) /* --- RTC_ADOW values ------------------------------------------ */ /* DOW: Alarm day of week */ #define RTC_ADOW_DOW_SHIFT (0) #define RTC_ADOW_DOW_MASK (0x7 << RTC_ADOW_DOW_SHIFT) #define RTC_ADOW_DOW(x) ((x) << RTC_ADOW_DOW_SHIFT) /* --- RTC_ADOY values ------------------------------------------ */ /* DOY: Alarm day of year */ #define RTC_ADOY_DOY_SHIFT (0) #define RTC_ADOY_DOY_MASK (0x1ff << RTC_ADOY_DOY_SHIFT) #define RTC_ADOY_DOY(x) ((x) << RTC_ADOY_DOY_SHIFT) /* --- RTC_AMON values ------------------------------------------ */ /* MONTH: Alarm month */ #define RTC_AMON_MONTH_SHIFT (0) #define RTC_AMON_MONTH_MASK (0xf << RTC_AMON_MONTH_SHIFT) #define RTC_AMON_MONTH(x) ((x) << RTC_AMON_MONTH_SHIFT) /* --- RTC_AYRS values ------------------------------------------ */ /* YEAR: Alarm year */ #define RTC_AYRS_YEAR_SHIFT (0) #define RTC_AYRS_YEAR_MASK (0xfff << RTC_AYRS_YEAR_SHIFT) #define RTC_AYRS_YEAR(x) ((x) << RTC_AYRS_YEAR_SHIFT) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/scu.h ================================================ /** @defgroup scu_defines System Control Unit Defines @brief Defined Constants and Types for the LPC43xx System Control Unit @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SCU_H #define LPC43XX_SCU_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* Pin group base addresses */ #define PIN_GROUP0 (SCU_BASE + 0x000) #define PIN_GROUP1 (SCU_BASE + 0x080) #define PIN_GROUP2 (SCU_BASE + 0x100) #define PIN_GROUP3 (SCU_BASE + 0x180) #define PIN_GROUP4 (SCU_BASE + 0x200) #define PIN_GROUP5 (SCU_BASE + 0x280) #define PIN_GROUP6 (SCU_BASE + 0x300) #define PIN_GROUP7 (SCU_BASE + 0x380) #define PIN_GROUP8 (SCU_BASE + 0x400) #define PIN_GROUP9 (SCU_BASE + 0x480) #define PIN_GROUPA (SCU_BASE + 0x500) #define PIN_GROUPB (SCU_BASE + 0x580) #define PIN_GROUPC (SCU_BASE + 0x600) #define PIN_GROUPD (SCU_BASE + 0x680) #define PIN_GROUPE (SCU_BASE + 0x700) #define PIN_GROUPF (SCU_BASE + 0x780) #define PIN0 0x000 #define PIN1 0x004 #define PIN2 0x008 #define PIN3 0x00C #define PIN4 0x010 #define PIN5 0x014 #define PIN6 0x018 #define PIN7 0x01C #define PIN8 0x020 #define PIN9 0x024 #define PIN10 0x028 #define PIN11 0x02C #define PIN12 0x030 #define PIN13 0x034 #define PIN14 0x038 #define PIN15 0x03C #define PIN16 0x040 #define PIN17 0x044 #define PIN18 0x048 #define PIN19 0x04C #define PIN20 0x050 /* --- SCU registers ------------------------------------------------------- */ /* Pin configuration registers */ #define SCU_SFS(group, pin) MMIO32(group + pin) /* Pins P0_n */ #define SCU_SFSP0_0 SCU_SFS(PIN_GROUP0, PIN0) #define SCU_SFSP0_1 SCU_SFS(PIN_GROUP0, PIN1) /* Pins P1_n */ #define SCU_SFSP1_0 SCU_SFS(PIN_GROUP1, PIN0) #define SCU_SFSP1_1 SCU_SFS(PIN_GROUP1, PIN1) #define SCU_SFSP1_2 SCU_SFS(PIN_GROUP1, PIN2) #define SCU_SFSP1_3 SCU_SFS(PIN_GROUP1, PIN3) #define SCU_SFSP1_4 SCU_SFS(PIN_GROUP1, PIN4) #define SCU_SFSP1_5 SCU_SFS(PIN_GROUP1, PIN5) #define SCU_SFSP1_6 SCU_SFS(PIN_GROUP1, PIN6) #define SCU_SFSP1_7 SCU_SFS(PIN_GROUP1, PIN7) #define SCU_SFSP1_8 SCU_SFS(PIN_GROUP1, PIN8) #define SCU_SFSP1_9 SCU_SFS(PIN_GROUP1, PIN9) #define SCU_SFSP1_10 SCU_SFS(PIN_GROUP1, PIN10) #define SCU_SFSP1_11 SCU_SFS(PIN_GROUP1, PIN11) #define SCU_SFSP1_12 SCU_SFS(PIN_GROUP1, PIN12) #define SCU_SFSP1_13 SCU_SFS(PIN_GROUP1, PIN13) #define SCU_SFSP1_14 SCU_SFS(PIN_GROUP1, PIN14) #define SCU_SFSP1_15 SCU_SFS(PIN_GROUP1, PIN15) #define SCU_SFSP1_16 SCU_SFS(PIN_GROUP1, PIN16) #define SCU_SFSP1_17 SCU_SFS(PIN_GROUP1, PIN17) #define SCU_SFSP1_18 SCU_SFS(PIN_GROUP1, PIN18) #define SCU_SFSP1_19 SCU_SFS(PIN_GROUP1, PIN19) #define SCU_SFSP1_20 SCU_SFS(PIN_GROUP1, PIN20) /* Pins P2_n */ #define SCU_SFSP2_0 SCU_SFS(PIN_GROUP2, PIN0) #define SCU_SFSP2_1 SCU_SFS(PIN_GROUP2, PIN1) #define SCU_SFSP2_2 SCU_SFS(PIN_GROUP2, PIN2) #define SCU_SFSP2_3 SCU_SFS(PIN_GROUP2, PIN3) #define SCU_SFSP2_4 SCU_SFS(PIN_GROUP2, PIN4) #define SCU_SFSP2_5 SCU_SFS(PIN_GROUP2, PIN5) #define SCU_SFSP2_6 SCU_SFS(PIN_GROUP2, PIN6) #define SCU_SFSP2_7 SCU_SFS(PIN_GROUP2, PIN7) #define SCU_SFSP2_8 SCU_SFS(PIN_GROUP2, PIN8) #define SCU_SFSP2_9 SCU_SFS(PIN_GROUP2, PIN9) #define SCU_SFSP2_10 SCU_SFS(PIN_GROUP2, PIN10) #define SCU_SFSP2_11 SCU_SFS(PIN_GROUP2, PIN11) #define SCU_SFSP2_12 SCU_SFS(PIN_GROUP2, PIN12) #define SCU_SFSP2_13 SCU_SFS(PIN_GROUP2, PIN13) /* Pins P3_n */ #define SCU_SFSP3_0 SCU_SFS(PIN_GROUP3, PIN0) #define SCU_SFSP3_1 SCU_SFS(PIN_GROUP3, PIN1) #define SCU_SFSP3_2 SCU_SFS(PIN_GROUP3, PIN2) #define SCU_SFSP3_3 SCU_SFS(PIN_GROUP3, PIN3) #define SCU_SFSP3_4 SCU_SFS(PIN_GROUP3, PIN4) #define SCU_SFSP3_5 SCU_SFS(PIN_GROUP3, PIN5) #define SCU_SFSP3_6 SCU_SFS(PIN_GROUP3, PIN6) #define SCU_SFSP3_7 SCU_SFS(PIN_GROUP3, PIN7) #define SCU_SFSP3_8 SCU_SFS(PIN_GROUP3, PIN8) /* Pins P4_n */ #define SCU_SFSP4_0 SCU_SFS(PIN_GROUP4, PIN0) #define SCU_SFSP4_1 SCU_SFS(PIN_GROUP4, PIN1) #define SCU_SFSP4_2 SCU_SFS(PIN_GROUP4, PIN2) #define SCU_SFSP4_3 SCU_SFS(PIN_GROUP4, PIN3) #define SCU_SFSP4_4 SCU_SFS(PIN_GROUP4, PIN4) #define SCU_SFSP4_5 SCU_SFS(PIN_GROUP4, PIN5) #define SCU_SFSP4_6 SCU_SFS(PIN_GROUP4, PIN6) #define SCU_SFSP4_7 SCU_SFS(PIN_GROUP4, PIN7) #define SCU_SFSP4_8 SCU_SFS(PIN_GROUP4, PIN8) #define SCU_SFSP4_9 SCU_SFS(PIN_GROUP4, PIN9) #define SCU_SFSP4_10 SCU_SFS(PIN_GROUP4, PIN10) /* Pins P5_n */ #define SCU_SFSP5_0 SCU_SFS(PIN_GROUP5, PIN0) #define SCU_SFSP5_1 SCU_SFS(PIN_GROUP5, PIN1) #define SCU_SFSP5_2 SCU_SFS(PIN_GROUP5, PIN2) #define SCU_SFSP5_3 SCU_SFS(PIN_GROUP5, PIN3) #define SCU_SFSP5_4 SCU_SFS(PIN_GROUP5, PIN4) #define SCU_SFSP5_5 SCU_SFS(PIN_GROUP5, PIN5) #define SCU_SFSP5_6 SCU_SFS(PIN_GROUP5, PIN6) #define SCU_SFSP5_7 SCU_SFS(PIN_GROUP5, PIN7) /* Pins P6_n */ #define SCU_SFSP6_0 SCU_SFS(PIN_GROUP6, PIN0) #define SCU_SFSP6_1 SCU_SFS(PIN_GROUP6, PIN1) #define SCU_SFSP6_2 SCU_SFS(PIN_GROUP6, PIN2) #define SCU_SFSP6_3 SCU_SFS(PIN_GROUP6, PIN3) #define SCU_SFSP6_4 SCU_SFS(PIN_GROUP6, PIN4) #define SCU_SFSP6_5 SCU_SFS(PIN_GROUP6, PIN5) #define SCU_SFSP6_6 SCU_SFS(PIN_GROUP6, PIN6) #define SCU_SFSP6_7 SCU_SFS(PIN_GROUP6, PIN7) #define SCU_SFSP6_8 SCU_SFS(PIN_GROUP6, PIN8) #define SCU_SFSP6_9 SCU_SFS(PIN_GROUP6, PIN9) #define SCU_SFSP6_10 SCU_SFS(PIN_GROUP6, PIN10) #define SCU_SFSP6_11 SCU_SFS(PIN_GROUP6, PIN11) #define SCU_SFSP6_12 SCU_SFS(PIN_GROUP6, PIN12) /* Pins P7_n */ #define SCU_SFSP7_0 SCU_SFS(PIN_GROUP7, PIN0) #define SCU_SFSP7_1 SCU_SFS(PIN_GROUP7, PIN1) #define SCU_SFSP7_2 SCU_SFS(PIN_GROUP7, PIN2) #define SCU_SFSP7_3 SCU_SFS(PIN_GROUP7, PIN3) #define SCU_SFSP7_4 SCU_SFS(PIN_GROUP7, PIN4) #define SCU_SFSP7_5 SCU_SFS(PIN_GROUP7, PIN5) #define SCU_SFSP7_6 SCU_SFS(PIN_GROUP7, PIN6) #define SCU_SFSP7_7 SCU_SFS(PIN_GROUP7, PIN7) /* Pins P8_n */ #define SCU_SFSP8_0 SCU_SFS(PIN_GROUP8, PIN0) #define SCU_SFSP8_1 SCU_SFS(PIN_GROUP8, PIN1) #define SCU_SFSP8_2 SCU_SFS(PIN_GROUP8, PIN2) #define SCU_SFSP8_3 SCU_SFS(PIN_GROUP8, PIN3) #define SCU_SFSP8_4 SCU_SFS(PIN_GROUP8, PIN4) #define SCU_SFSP8_5 SCU_SFS(PIN_GROUP8, PIN5) #define SCU_SFSP8_6 SCU_SFS(PIN_GROUP8, PIN6) #define SCU_SFSP8_7 SCU_SFS(PIN_GROUP8, PIN7) #define SCU_SFSP8_8 SCU_SFS(PIN_GROUP8, PIN8) /* Pins P9_n */ #define SCU_SFSP9_0 SCU_SFS(PIN_GROUP9, PIN0) #define SCU_SFSP9_1 SCU_SFS(PIN_GROUP9, PIN1) #define SCU_SFSP9_2 SCU_SFS(PIN_GROUP9, PIN2) #define SCU_SFSP9_3 SCU_SFS(PIN_GROUP9, PIN3) #define SCU_SFSP9_4 SCU_SFS(PIN_GROUP9, PIN4) #define SCU_SFSP9_5 SCU_SFS(PIN_GROUP9, PIN5) #define SCU_SFSP9_6 SCU_SFS(PIN_GROUP9, PIN6) /* Pins PA_n */ #define SCU_SFSPA_0 SCU_SFS(PIN_GROUPA, PIN0) #define SCU_SFSPA_1 SCU_SFS(PIN_GROUPA, PIN1) #define SCU_SFSPA_2 SCU_SFS(PIN_GROUPA, PIN2) #define SCU_SFSPA_3 SCU_SFS(PIN_GROUPA, PIN3) #define SCU_SFSPA_4 SCU_SFS(PIN_GROUPA, PIN4) /* Pins PB_n */ #define SCU_SFSPB_0 SCU_SFS(PIN_GROUPB, PIN0) #define SCU_SFSPB_1 SCU_SFS(PIN_GROUPB, PIN1) #define SCU_SFSPB_2 SCU_SFS(PIN_GROUPB, PIN2) #define SCU_SFSPB_3 SCU_SFS(PIN_GROUPB, PIN3) #define SCU_SFSPB_4 SCU_SFS(PIN_GROUPB, PIN4) #define SCU_SFSPB_5 SCU_SFS(PIN_GROUPB, PIN5) #define SCU_SFSPB_6 SCU_SFS(PIN_GROUPB, PIN6) /* Pins PC_n */ #define SCU_SFSPC_0 SCU_SFS(PIN_GROUPC, PIN0) #define SCU_SFSPC_1 SCU_SFS(PIN_GROUPC, PIN1) #define SCU_SFSPC_2 SCU_SFS(PIN_GROUPC, PIN2) #define SCU_SFSPC_3 SCU_SFS(PIN_GROUPC, PIN3) #define SCU_SFSPC_4 SCU_SFS(PIN_GROUPC, PIN4) #define SCU_SFSPC_5 SCU_SFS(PIN_GROUPC, PIN5) #define SCU_SFSPC_6 SCU_SFS(PIN_GROUPC, PIN6) #define SCU_SFSPC_7 SCU_SFS(PIN_GROUPC, PIN7) #define SCU_SFSPC_8 SCU_SFS(PIN_GROUPC, PIN8) #define SCU_SFSPC_9 SCU_SFS(PIN_GROUPC, PIN9) #define SCU_SFSPC_10 SCU_SFS(PIN_GROUPC, PIN10) #define SCU_SFSPC_11 SCU_SFS(PIN_GROUPC, PIN11) #define SCU_SFSPC_12 SCU_SFS(PIN_GROUPC, PIN12) #define SCU_SFSPC_13 SCU_SFS(PIN_GROUPC, PIN13) #define SCU_SFSPC_14 SCU_SFS(PIN_GROUPC, PIN14) /* Pins PD_n */ #define SCU_SFSPD_0 SCU_SFS(PIN_GROUPD, PIN0) #define SCU_SFSPD_1 SCU_SFS(PIN_GROUPD, PIN1) #define SCU_SFSPD_2 SCU_SFS(PIN_GROUPD, PIN2) #define SCU_SFSPD_3 SCU_SFS(PIN_GROUPD, PIN3) #define SCU_SFSPD_4 SCU_SFS(PIN_GROUPD, PIN4) #define SCU_SFSPD_5 SCU_SFS(PIN_GROUPD, PIN5) #define SCU_SFSPD_6 SCU_SFS(PIN_GROUPD, PIN6) #define SCU_SFSPD_7 SCU_SFS(PIN_GROUPD, PIN7) #define SCU_SFSPD_8 SCU_SFS(PIN_GROUPD, PIN8) #define SCU_SFSPD_9 SCU_SFS(PIN_GROUPD, PIN9) #define SCU_SFSPD_10 SCU_SFS(PIN_GROUPD, PIN10) #define SCU_SFSPD_11 SCU_SFS(PIN_GROUPD, PIN11) #define SCU_SFSPD_12 SCU_SFS(PIN_GROUPD, PIN12) #define SCU_SFSPD_13 SCU_SFS(PIN_GROUPD, PIN13) #define SCU_SFSPD_14 SCU_SFS(PIN_GROUPD, PIN14) #define SCU_SFSPD_15 SCU_SFS(PIN_GROUPD, PIN15) #define SCU_SFSPD_16 SCU_SFS(PIN_GROUPD, PIN16) /* Pins PE_n */ #define SCU_SFSPE_0 SCU_SFS(PIN_GROUPE, PIN0) #define SCU_SFSPE_1 SCU_SFS(PIN_GROUPE, PIN1) #define SCU_SFSPE_2 SCU_SFS(PIN_GROUPE, PIN2) #define SCU_SFSPE_3 SCU_SFS(PIN_GROUPE, PIN3) #define SCU_SFSPE_4 SCU_SFS(PIN_GROUPE, PIN4) #define SCU_SFSPE_5 SCU_SFS(PIN_GROUPE, PIN5) #define SCU_SFSPE_6 SCU_SFS(PIN_GROUPE, PIN6) #define SCU_SFSPE_7 SCU_SFS(PIN_GROUPE, PIN7) #define SCU_SFSPE_8 SCU_SFS(PIN_GROUPE, PIN8) #define SCU_SFSPE_9 SCU_SFS(PIN_GROUPE, PIN9) #define SCU_SFSPE_10 SCU_SFS(PIN_GROUPE, PIN10) #define SCU_SFSPE_11 SCU_SFS(PIN_GROUPE, PIN11) #define SCU_SFSPE_12 SCU_SFS(PIN_GROUPE, PIN12) #define SCU_SFSPE_13 SCU_SFS(PIN_GROUPE, PIN13) #define SCU_SFSPE_14 SCU_SFS(PIN_GROUPE, PIN14) #define SCU_SFSPE_15 SCU_SFS(PIN_GROUPE, PIN15) /* Pins PF_n */ #define SCU_SFSPF_0 SCU_SFS(PIN_GROUPF, PIN0) #define SCU_SFSPF_1 SCU_SFS(PIN_GROUPF, PIN1) #define SCU_SFSPF_2 SCU_SFS(PIN_GROUPF, PIN2) #define SCU_SFSPF_3 SCU_SFS(PIN_GROUPF, PIN3) #define SCU_SFSPF_4 SCU_SFS(PIN_GROUPF, PIN4) #define SCU_SFSPF_5 SCU_SFS(PIN_GROUPF, PIN5) #define SCU_SFSPF_6 SCU_SFS(PIN_GROUPF, PIN6) #define SCU_SFSPF_7 SCU_SFS(PIN_GROUPF, PIN7) #define SCU_SFSPF_8 SCU_SFS(PIN_GROUPF, PIN8) #define SCU_SFSPF_9 SCU_SFS(PIN_GROUPF, PIN9) #define SCU_SFSPF_10 SCU_SFS(PIN_GROUPF, PIN10) #define SCU_SFSPF_11 SCU_SFS(PIN_GROUPF, PIN11) /* CLKn pins */ #define SCU_SFSCLK0 MMIO32(SCU_BASE + 0xC00) #define SCU_SFSCLK1 MMIO32(SCU_BASE + 0xC04) #define SCU_SFSCLK2 MMIO32(SCU_BASE + 0xC08) #define SCU_SFSCLK3 MMIO32(SCU_BASE + 0xC0C) /* USB1 USB1_DP/USB1_DM pins and I2C-bus open-drain pins */ #define SCU_SFSUSB MMIO32(SCU_BASE + 0xC80) #define SCU_SFSI2C0 MMIO32(SCU_BASE + 0xC84) /* ADC pin select registers */ /* ADC0 function select register */ #define SCU_ENAIO0 MMIO32(SCU_BASE + 0xC88) /* ADC1 function select register */ #define SCU_ENAIO1 MMIO32(SCU_BASE + 0xC8C) /* Analog function select register */ #define SCU_ENAIO2 MMIO32(SCU_BASE + 0xC90) /* EMC clock delay register */ #define SCU_EMCDELAYCLK MMIO32(SCU_BASE + 0xD00) /* Pin interrupt select registers */ /* Pin interrupt select register for pin interrupts 0 to 3 */ #define SCU_PINTSEL0 MMIO32(SCU_BASE + 0xE00) /* Pin interrupt select register for pin interrupts 4 to 7 */ #define SCU_PINTSEL1 MMIO32(SCU_BASE + 0xE04) /**************************/ /* SCU I2C0 Configuration */ /**************************/ /* * Select input glitch filter time constant for the SCL pin. * 0 = 50 ns glitch filter. * 1 = 3ns glitch filter. */ #define SCU_SCL_EFP (BIT0) /* BIT1 Reserved. Always write a 0 to this bit. */ /* * Select I2C mode for the SCL pin. * 0 = Standard/Fast mode transmit. * 1 = Fast-mode Plus transmit. */ #define SCU_SCL_EHD (BIT2) /* * Enable the input receiver for the SCL pin. * Always write a 1 to this bit when using the * I2C0. * 0 = Disabled. * 1 = Enabled. */ #define SCU_SCL_EZI_EN (BIT3) /* BIT4-6 Reserved. */ /* * Enable or disable input glitch filter for the * SCL pin. The filter time constant is * determined by bit EFP. * 0 = Enable input filter. * 1 = Disable input filter. */ #define SCU_SCL_ZIF_DIS (BIT7) /* * Select input glitch filter time constant for the SDA pin. * 0 = 50 ns glitch filter. * 1 = 3ns glitch filter. */ #define SCU_SDA_EFP (BIT8) /* BIT9 Reserved. Always write a 0 to this bit. */ /* * Select I2C mode for the SDA pin. * 0 = Standard/Fast mode transmit. * 1 = Fast-mode Plus transmit. */ #define SCU_SDA_EHD (BIT10) /* * Enable the input receiver for the SDA pin. * Always write a 1 to this bit when using the * I2C0. * 0 = Disabled. * 1 = Enabled. */ #define SCU_SDA_EZI_EN (BIT11) /* BIT 12-14 - Reserved */ /* * Enable or disable input glitch filter for the * SDA pin. The filter time constant is * determined by bit SDA_EFP. * 0 = Enable input filter. * 1 = Disable input filter. */ #define SCU_SDA_ZIF_DIS (BIT15) /* Standard mode for I2C SCL/SDA Standard/Fast mode */ #define SCU_I2C0_NOMINAL (SCU_SCL_EZI_EN | SCU_SDA_EZI_EN) /* Standard mode for I2C SCL/SDA Fast-mode Plus transmit */ #define SCU_I2C0_FAST (SCU_SCL_EFP | SCU_SCL_EHD | SCU_SCL_EZI_EN | \ SCU_SCL_ZIF_DIS | SCU_SDA_EFP | SCU_SDA_EHD | \ SCU_SDA_EZI_EN) /* * SCU PIN Normal Drive: * The configuration registers for normal-drive pins control the following pins: * - P0_0 and P0_1 * - P1_0 to P1_16 and P1_18 to P1_20 * - P2_0 to P2_2 and P2_6 to P2_13 * - P3_0 to P3_2 and P3_4 to P3_8 * - P4_0 to P4_10 * - P5_0 to P5_7 * - P6_0 to P6_12 * - P7_0 to P7_7 * - P8_3 to P8_8 * - P9_0 to P9_6 * - PA_0 and PA_4 * - PB_0 to PB_6 * - PC_0 to PC_14 * - PE_0 to PE_15 * - PF_0 to PF_11 * * Pin configuration registers for High-Drive pins. * The configuration registers for high-drive pins control the following pins: * - P1_17 * - P2_3 to P2_5 * - P8_0 to P8_2 * - PA_1 to PA_3 * * Pin configuration registers for High-Speed pins. * This register controls the following pins: * - P3_3 and pins CLK0 to CLK3. */ typedef enum { /* Group Port 0 */ P0_0 = (PIN_GROUP0+PIN0), P0_1 = (PIN_GROUP0+PIN1), /* Group Port 1 */ P1_0 = (PIN_GROUP1+PIN0), P1_1 = (PIN_GROUP1+PIN1), P1_2 = (PIN_GROUP1+PIN2), P1_3 = (PIN_GROUP1+PIN3), P1_4 = (PIN_GROUP1+PIN4), P1_5 = (PIN_GROUP1+PIN5), P1_6 = (PIN_GROUP1+PIN6), P1_7 = (PIN_GROUP1+PIN7), P1_8 = (PIN_GROUP1+PIN8), P1_9 = (PIN_GROUP1+PIN9), P1_10 = (PIN_GROUP1+PIN10), P1_11 = (PIN_GROUP1+PIN11), P1_12 = (PIN_GROUP1+PIN12), P1_13 = (PIN_GROUP1+PIN13), P1_14 = (PIN_GROUP1+PIN14), P1_15 = (PIN_GROUP1+PIN15), P1_16 = (PIN_GROUP1+PIN16), /* P1_17 is High-Drive pin */ P1_17 = (PIN_GROUP1+PIN17), P1_18 = (PIN_GROUP1+PIN18), P1_19 = (PIN_GROUP1+PIN19), P1_20 = (PIN_GROUP1+PIN20), /* Group Port 2 */ P2_0 = (PIN_GROUP2+PIN0), P2_1 = (PIN_GROUP2+PIN1), P2_2 = (PIN_GROUP2+PIN2), /* P2_3 to P2_5 are High-Drive pins */ P2_3 = (PIN_GROUP2+PIN3), P2_4 = (PIN_GROUP2+PIN4), P2_5 = (PIN_GROUP2+PIN5), P2_6 = (PIN_GROUP2+PIN6), P2_7 = (PIN_GROUP2+PIN7), P2_8 = (PIN_GROUP2+PIN8), P2_9 = (PIN_GROUP2+PIN9), P2_10 = (PIN_GROUP2+PIN10), P2_11 = (PIN_GROUP2+PIN11), P2_12 = (PIN_GROUP2+PIN12), P2_13 = (PIN_GROUP2+PIN13), /* Group Port 3 */ P3_0 = (PIN_GROUP3+PIN0), P3_1 = (PIN_GROUP3+PIN1), P3_2 = (PIN_GROUP3+PIN2), /* P3_3 is High-Speed pin */ P3_3 = (PIN_GROUP3+PIN3), P3_4 = (PIN_GROUP3+PIN4), P3_5 = (PIN_GROUP3+PIN5), P3_6 = (PIN_GROUP3+PIN6), P3_7 = (PIN_GROUP3+PIN7), P3_8 = (PIN_GROUP3+PIN8), /* Group Port 4 */ P4_0 = (PIN_GROUP4+PIN0), P4_1 = (PIN_GROUP4+PIN1), P4_2 = (PIN_GROUP4+PIN2), P4_3 = (PIN_GROUP4+PIN3), P4_4 = (PIN_GROUP4+PIN4), P4_5 = (PIN_GROUP4+PIN5), P4_6 = (PIN_GROUP4+PIN6), P4_7 = (PIN_GROUP4+PIN7), P4_8 = (PIN_GROUP4+PIN8), P4_9 = (PIN_GROUP4+PIN9), P4_10 = (PIN_GROUP4+PIN10), /* Group Port 5 */ P5_0 = (PIN_GROUP5+PIN0), P5_1 = (PIN_GROUP5+PIN1), P5_2 = (PIN_GROUP5+PIN2), P5_3 = (PIN_GROUP5+PIN3), P5_4 = (PIN_GROUP5+PIN4), P5_5 = (PIN_GROUP5+PIN5), P5_6 = (PIN_GROUP5+PIN6), P5_7 = (PIN_GROUP5+PIN7), /* Group Port 6 */ P6_0 = (PIN_GROUP6+PIN0), P6_1 = (PIN_GROUP6+PIN1), P6_2 = (PIN_GROUP6+PIN2), P6_3 = (PIN_GROUP6+PIN3), P6_4 = (PIN_GROUP6+PIN4), P6_5 = (PIN_GROUP6+PIN5), P6_6 = (PIN_GROUP6+PIN6), P6_7 = (PIN_GROUP6+PIN7), P6_8 = (PIN_GROUP6+PIN8), P6_9 = (PIN_GROUP6+PIN9), P6_10 = (PIN_GROUP6+PIN10), P6_11 = (PIN_GROUP6+PIN11), P6_12 = (PIN_GROUP6+PIN12), /* Group Port 7 */ P7_0 = (PIN_GROUP7+PIN0), P7_1 = (PIN_GROUP7+PIN1), P7_2 = (PIN_GROUP7+PIN2), P7_3 = (PIN_GROUP7+PIN3), P7_4 = (PIN_GROUP7+PIN4), P7_5 = (PIN_GROUP7+PIN5), P7_6 = (PIN_GROUP7+PIN6), P7_7 = (PIN_GROUP7+PIN7), /* Group Port 8 */ /* P8_0 to P8_2 are High-Drive pins */ P8_0 = (PIN_GROUP8+PIN0), P8_1 = (PIN_GROUP8+PIN1), P8_2 = (PIN_GROUP8+PIN2), P8_3 = (PIN_GROUP8+PIN3), P8_4 = (PIN_GROUP8+PIN4), P8_5 = (PIN_GROUP8+PIN5), P8_6 = (PIN_GROUP8+PIN6), P8_7 = (PIN_GROUP8+PIN7), P8_8 = (PIN_GROUP8+PIN8), /* Group Port 9 */ P9_0 = (PIN_GROUP9+PIN0), P9_1 = (PIN_GROUP9+PIN1), P9_2 = (PIN_GROUP9+PIN2), P9_3 = (PIN_GROUP9+PIN3), P9_4 = (PIN_GROUP9+PIN4), P9_5 = (PIN_GROUP9+PIN5), P9_6 = (PIN_GROUP9+PIN6), /* Group Port A */ PA_0 = (PIN_GROUPA+PIN0), /* PA_1 to PA_3 are Normal & High-Drive Pins */ PA_1 = (PIN_GROUPA+PIN1), PA_2 = (PIN_GROUPA+PIN2), PA_3 = (PIN_GROUPA+PIN3), PA_4 = (PIN_GROUPA+PIN4), /* Group Port B */ PB_0 = (PIN_GROUPB+PIN0), PB_1 = (PIN_GROUPB+PIN1), PB_2 = (PIN_GROUPB+PIN2), PB_3 = (PIN_GROUPB+PIN3), PB_4 = (PIN_GROUPB+PIN4), PB_5 = (PIN_GROUPB+PIN5), PB_6 = (PIN_GROUPB+PIN6), /* Group Port C */ PC_0 = (PIN_GROUPC+PIN0), PC_1 = (PIN_GROUPC+PIN1), PC_2 = (PIN_GROUPC+PIN2), PC_3 = (PIN_GROUPC+PIN3), PC_4 = (PIN_GROUPC+PIN4), PC_5 = (PIN_GROUPC+PIN5), PC_6 = (PIN_GROUPC+PIN6), PC_7 = (PIN_GROUPC+PIN7), PC_8 = (PIN_GROUPC+PIN8), PC_9 = (PIN_GROUPC+PIN9), PC_10 = (PIN_GROUPC+PIN10), PC_11 = (PIN_GROUPC+PIN11), PC_12 = (PIN_GROUPC+PIN12), PC_13 = (PIN_GROUPC+PIN13), PC_14 = (PIN_GROUPC+PIN14), /* Group Port D (seems not configurable through SCU, not defined in * UM10503.pdf Rev.1, keep it here) */ PD_0 = (PIN_GROUPD+PIN0), PD_1 = (PIN_GROUPD+PIN1), PD_2 = (PIN_GROUPD+PIN2), PD_3 = (PIN_GROUPD+PIN3), PD_4 = (PIN_GROUPD+PIN4), PD_5 = (PIN_GROUPD+PIN5), PD_6 = (PIN_GROUPD+PIN6), PD_7 = (PIN_GROUPD+PIN7), PD_8 = (PIN_GROUPD+PIN8), PD_9 = (PIN_GROUPD+PIN9), PD_10 = (PIN_GROUPD+PIN10), PD_11 = (PIN_GROUPD+PIN11), PD_12 = (PIN_GROUPD+PIN12), PD_13 = (PIN_GROUPD+PIN13), PD_14 = (PIN_GROUPD+PIN14), PD_15 = (PIN_GROUPD+PIN15), PD_16 = (PIN_GROUPD+PIN16), /* Group Port E */ PE_0 = (PIN_GROUPE+PIN0), PE_1 = (PIN_GROUPE+PIN1), PE_2 = (PIN_GROUPE+PIN2), PE_3 = (PIN_GROUPE+PIN3), PE_4 = (PIN_GROUPE+PIN4), PE_5 = (PIN_GROUPE+PIN5), PE_6 = (PIN_GROUPE+PIN6), PE_7 = (PIN_GROUPE+PIN7), PE_8 = (PIN_GROUPE+PIN8), PE_9 = (PIN_GROUPE+PIN9), PE_10 = (PIN_GROUPE+PIN10), PE_11 = (PIN_GROUPE+PIN11), PE_12 = (PIN_GROUPE+PIN12), PE_13 = (PIN_GROUPE+PIN13), PE_14 = (PIN_GROUPE+PIN14), PE_15 = (PIN_GROUPE+PIN15), /* Group Port F */ PF_0 = (PIN_GROUPF+PIN0), PF_1 = (PIN_GROUPF+PIN1), PF_2 = (PIN_GROUPF+PIN2), PF_3 = (PIN_GROUPF+PIN3), PF_4 = (PIN_GROUPF+PIN4), PF_5 = (PIN_GROUPF+PIN5), PF_6 = (PIN_GROUPF+PIN6), PF_7 = (PIN_GROUPF+PIN7), PF_8 = (PIN_GROUPF+PIN8), PF_9 = (PIN_GROUPF+PIN9), PF_10 = (PIN_GROUPF+PIN10), PF_11 = (PIN_GROUPF+PIN11), /* Group Clock 0 to 3 High-Speed pins */ CLK0 = (SCU_BASE + 0xC00), CLK1 = (SCU_BASE + 0xC04), CLK2 = (SCU_BASE + 0xC08), CLK3 = (SCU_BASE + 0xC0C) } scu_grp_pin_t; /* * Pin Configuration to be used for scu_pinmux() parameter scu_conf * For normal-drive pins, high-drive pins, high-speed pins */ /* * Function BIT0 to 2. * Common to normal-drive pins, high-drive pins, high-speed pins. */ #define SCU_CONF_FUNCTION0 (0x0) #define SCU_CONF_FUNCTION1 (0x1) #define SCU_CONF_FUNCTION2 (0x2) #define SCU_CONF_FUNCTION3 (0x3) #define SCU_CONF_FUNCTION4 (0x4) #define SCU_CONF_FUNCTION5 (0x5) #define SCU_CONF_FUNCTION6 (0x6) #define SCU_CONF_FUNCTION7 (0x7) /* * Enable pull-down resistor at pad * By default=0 Disable pull-down. * Available to normal-drive pins, high-drive pins, high-speed pins */ #define SCU_CONF_EPD_EN_PULLDOWN (BIT3) /* * Disable pull-up resistor at pad. * By default=0 the pull-up resistor is enabled at reset. * Available to normal-drive pins, high-drive pins, high-speed pins */ #define SCU_CONF_EPUN_DIS_PULLUP (BIT4) /* * Select Slew Rate. * By Default=0 Slow. * Available to normal-drive and high-speed pins, reserved for high-drive pins. */ #define SCU_CONF_EHS_FAST (BIT5) /* * Input buffer enable. * By Default=0 Disable Input Buffer. * The input buffer is disabled by default at reset and must be enabled for * receiving(in normal/highspeed-drive) or to transfer data from the I/O buffer * to the pad(in high-drive pins). * Available to normal-drive pins, high-drive pins, high-speed pins. */ #define SCU_CONF_EZI_EN_IN_BUFFER (BIT6) /* * Input glitch filter. Disable the input glitch filter for clocking signals * higher than 30 MHz. * Available to normal-drive pins, high-drive pins, high-speed pins. */ #define SCU_CONF_ZIF_DIS_IN_GLITCH_FILT (BIT7) /* * Select drive strength. (default=0 Normal-drive: 4 mA drive strength) (BIT8/9). * Available to high-drive pins, reserved for others. */ #define SCU_CONF_EHD_NORMAL_DRIVE_8MILLIA (0x100) #define SCU_CONF_EHD_NORMAL_DRIVE_14MILLIA (0x200) #define SCU_CONF_EHD_NORMAL_DRIVE_20MILLIA (0x300) /* BIT10 to 31 are Reserved */ /* Configuration for different I/O pins types */ #define SCU_EMC_IO (SCU_CONF_EPD_EN_PULLDOWN | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) #define SCU_LCD (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) #define SCU_CLK_IN (SCU_CONF_EPD_EN_PULLDOWN | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) #define SCU_CLK_OUT (SCU_CONF_EPD_EN_PULLDOWN | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) #define SCU_GPIO_PUP (SCU_CONF_EZI_EN_IN_BUFFER) #define SCU_GPIO_PDN (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EPD_EN_PULLDOWN | \ SCU_CONF_EZI_EN_IN_BUFFER) #define SCU_GPIO_NOPULL (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EZI_EN_IN_BUFFER) #define SCU_GPIO_FAST (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) #define SCU_UART_RX_TX (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EPD_EN_PULLDOWN | \ SCU_CONF_EZI_EN_IN_BUFFER) #define SCU_SSP_IO (SCU_CONF_EPUN_DIS_PULLUP | \ SCU_CONF_EHS_FAST | \ SCU_CONF_EZI_EN_IN_BUFFER | \ SCU_CONF_ZIF_DIS_IN_GLITCH_FILT) BEGIN_DECLS void scu_pinmux(scu_grp_pin_t group_pin, uint32_t scu_conf); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/sdio.h ================================================ /** @defgroup sdio_defines SDIO @brief Defined Constants and Types for the LPC43xx SDIO @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SDIO_H #define LPC43XX_SDIO_H /**@{*/ #include #include /* --- SDIO registers ----------------------------------------------------- */ /* Control Register */ #define SDIO_CTRL MMIO32(SDIO_BASE + 0x000) /* Power Enable Register */ #define SDIO_PWREN MMIO32(SDIO_BASE + 0x004) /* Clock Divider Register */ #define SDIO_CLKDIV MMIO32(SDIO_BASE + 0x008) /* SD Clock Source Register */ #define SDIO_CLKSRC MMIO32(SDIO_BASE + 0x00C) /* Clock Enable Register */ #define SDIO_CLKENA MMIO32(SDIO_BASE + 0x010) /* Time-out Register */ #define SDIO_TMOUT MMIO32(SDIO_BASE + 0x014) /* Card Type Register */ #define SDIO_CTYPE MMIO32(SDIO_BASE + 0x018) /* Block Size Register */ #define SDIO_BLKSIZ MMIO32(SDIO_BASE + 0x01C) /* Byte Count Register */ #define SDIO_BYTCNT MMIO32(SDIO_BASE + 0x020) /* Interrupt Mask Register */ #define SDIO_INTMASK MMIO32(SDIO_BASE + 0x024) /* Command Argument Register */ #define SDIO_CMDARG MMIO32(SDIO_BASE + 0x028) /* Command Register */ #define SDIO_CMD MMIO32(SDIO_BASE + 0x02C) /* Response Register 0 */ #define SDIO_RESP0 MMIO32(SDIO_BASE + 0x030) /* Response Register 1 */ #define SDIO_RESP1 MMIO32(SDIO_BASE + 0x034) /* Response Register 2 */ #define SDIO_RESP2 MMIO32(SDIO_BASE + 0x038) /* Response Register 3 */ #define SDIO_RESP3 MMIO32(SDIO_BASE + 0x03C) /* Masked Interrupt Status Register */ #define SDIO_MINTSTS MMIO32(SDIO_BASE + 0x040) /* Raw Interrupt Status Register */ #define SDIO_RINTSTS MMIO32(SDIO_BASE + 0x044) /* Status Register */ #define SDIO_STATUS MMIO32(SDIO_BASE + 0x048) /* FIFO Threshold Watermark Register */ #define SDIO_FIFOTH MMIO32(SDIO_BASE + 0x04C) /* Card Detect Register */ #define SDIO_CDETECT MMIO32(SDIO_BASE + 0x050) /* Write Protect Register */ #define SDIO_WRTPRT MMIO32(SDIO_BASE + 0x054) /* Transferred CIU Card Byte Count Register */ #define SDIO_TCBCNT MMIO32(SDIO_BASE + 0x05C) /* Transferred Host to BIU-FIFO Byte Count Register */ #define SDIO_TBBCNT MMIO32(SDIO_BASE + 0x060) /* Debounce Count Register */ #define SDIO_DEBNCE MMIO32(SDIO_BASE + 0x064) /* UHS-1 Register */ #define SDIO_UHS_REG MMIO32(SDIO_BASE + 0x074) /* Hardware Reset */ #define SDIO_RST_N MMIO32(SDIO_BASE + 0x078) /* Bus Mode Register */ #define SDIO_BMOD MMIO32(SDIO_BASE + 0x080) /* Poll Demand Register */ #define SDIO_PLDMND MMIO32(SDIO_BASE + 0x084) /* Descriptor List Base Address Register */ #define SDIO_DBADDR MMIO32(SDIO_BASE + 0x088) /* Internal DMAC Status Register */ #define SDIO_IDSTS MMIO32(SDIO_BASE + 0x08C) /* Internal DMAC Interrupt Enable Register */ #define SDIO_IDINTEN MMIO32(SDIO_BASE + 0x090) /* Current Host Descriptor Address Register */ #define SDIO_DSCADDR MMIO32(SDIO_BASE + 0x094) /* Current Buffer Descriptor Address Register */ #define SDIO_BUFADDR MMIO32(SDIO_BASE + 0x098) /* Data FIFO read/write */ #define SDIO_DATA MMIO32(SDIO_BASE + 0x100) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/sgpio.h ================================================ /** @defgroup sgpio_defines Serial General Purpose I/O @brief Defined Constants and Types for the LPC43xx Serial General Purpose I/O @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /** @defgroup sdio_defines SDIO @brief Defined Constants and Types for the LPC43xx SDIO @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Jared Boone * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SGPIO_H #define LPC43XX_SGPIO_H /**@{*/ #include #include /* --- SGPIO registers ----------------------------------------------------- */ /* Pin multiplexer configuration registers (OUT_MUX_CFG0 to 15) */ #define SGPIO_OUT_MUX_CFG(pin) MMIO32(SGPIO_PORT_BASE + (pin * 0x04)) #define SGPIO_OUT_MUX_CFG0 MMIO32(SGPIO_PORT_BASE + 0x00) #define SGPIO_OUT_MUX_CFG1 MMIO32(SGPIO_PORT_BASE + 0x04) #define SGPIO_OUT_MUX_CFG2 MMIO32(SGPIO_PORT_BASE + 0x08) #define SGPIO_OUT_MUX_CFG3 MMIO32(SGPIO_PORT_BASE + 0x0C) #define SGPIO_OUT_MUX_CFG4 MMIO32(SGPIO_PORT_BASE + 0x10) #define SGPIO_OUT_MUX_CFG5 MMIO32(SGPIO_PORT_BASE + 0x14) #define SGPIO_OUT_MUX_CFG6 MMIO32(SGPIO_PORT_BASE + 0x18) #define SGPIO_OUT_MUX_CFG7 MMIO32(SGPIO_PORT_BASE + 0x1C) #define SGPIO_OUT_MUX_CFG8 MMIO32(SGPIO_PORT_BASE + 0x20) #define SGPIO_OUT_MUX_CFG9 MMIO32(SGPIO_PORT_BASE + 0x24) #define SGPIO_OUT_MUX_CFG10 MMIO32(SGPIO_PORT_BASE + 0x28) #define SGPIO_OUT_MUX_CFG11 MMIO32(SGPIO_PORT_BASE + 0x2C) #define SGPIO_OUT_MUX_CFG12 MMIO32(SGPIO_PORT_BASE + 0x30) #define SGPIO_OUT_MUX_CFG13 MMIO32(SGPIO_PORT_BASE + 0x34) #define SGPIO_OUT_MUX_CFG14 MMIO32(SGPIO_PORT_BASE + 0x38) #define SGPIO_OUT_MUX_CFG15 MMIO32(SGPIO_PORT_BASE + 0x3C) /* SGPIO multiplexer configuration registers (SGPIO_MUX_CFG0 to 15) */ #define SGPIO_MUX_CFG(slice) MMIO32(SGPIO_PORT_BASE + 0x40 + \ (slice * 0x04)) #define SGPIO_MUX_CFG0 MMIO32(SGPIO_PORT_BASE + 0x40) #define SGPIO_MUX_CFG1 MMIO32(SGPIO_PORT_BASE + 0x44) #define SGPIO_MUX_CFG2 MMIO32(SGPIO_PORT_BASE + 0x48) #define SGPIO_MUX_CFG3 MMIO32(SGPIO_PORT_BASE + 0x4C) #define SGPIO_MUX_CFG4 MMIO32(SGPIO_PORT_BASE + 0x50) #define SGPIO_MUX_CFG5 MMIO32(SGPIO_PORT_BASE + 0x54) #define SGPIO_MUX_CFG6 MMIO32(SGPIO_PORT_BASE + 0x58) #define SGPIO_MUX_CFG7 MMIO32(SGPIO_PORT_BASE + 0x5C) #define SGPIO_MUX_CFG8 MMIO32(SGPIO_PORT_BASE + 0x60) #define SGPIO_MUX_CFG9 MMIO32(SGPIO_PORT_BASE + 0x64) #define SGPIO_MUX_CFG10 MMIO32(SGPIO_PORT_BASE + 0x68) #define SGPIO_MUX_CFG11 MMIO32(SGPIO_PORT_BASE + 0x6C) #define SGPIO_MUX_CFG12 MMIO32(SGPIO_PORT_BASE + 0x70) #define SGPIO_MUX_CFG13 MMIO32(SGPIO_PORT_BASE + 0x74) #define SGPIO_MUX_CFG14 MMIO32(SGPIO_PORT_BASE + 0x78) #define SGPIO_MUX_CFG15 MMIO32(SGPIO_PORT_BASE + 0x7C) /* Slice multiplexer configuration registers (SLICE_MUX_CFG0 to 15) */ #define SGPIO_SLICE_MUX_CFG(slice) MMIO32(SGPIO_PORT_BASE + 0x80 + \ (slice * 0x04)) #define SGPIO_SLICE_MUX_CFG0 MMIO32(SGPIO_PORT_BASE + 0x80) #define SGPIO_SLICE_MUX_CFG1 MMIO32(SGPIO_PORT_BASE + 0x84) #define SGPIO_SLICE_MUX_CFG2 MMIO32(SGPIO_PORT_BASE + 0x88) #define SGPIO_SLICE_MUX_CFG3 MMIO32(SGPIO_PORT_BASE + 0x8C) #define SGPIO_SLICE_MUX_CFG4 MMIO32(SGPIO_PORT_BASE + 0x90) #define SGPIO_SLICE_MUX_CFG5 MMIO32(SGPIO_PORT_BASE + 0x94) #define SGPIO_SLICE_MUX_CFG6 MMIO32(SGPIO_PORT_BASE + 0x98) #define SGPIO_SLICE_MUX_CFG7 MMIO32(SGPIO_PORT_BASE + 0x9C) #define SGPIO_SLICE_MUX_CFG8 MMIO32(SGPIO_PORT_BASE + 0xA0) #define SGPIO_SLICE_MUX_CFG9 MMIO32(SGPIO_PORT_BASE + 0xA4) #define SGPIO_SLICE_MUX_CFG10 MMIO32(SGPIO_PORT_BASE + 0xA8) #define SGPIO_SLICE_MUX_CFG11 MMIO32(SGPIO_PORT_BASE + 0xAC) #define SGPIO_SLICE_MUX_CFG12 MMIO32(SGPIO_PORT_BASE + 0xB0) #define SGPIO_SLICE_MUX_CFG13 MMIO32(SGPIO_PORT_BASE + 0xB4) #define SGPIO_SLICE_MUX_CFG14 MMIO32(SGPIO_PORT_BASE + 0xB8) #define SGPIO_SLICE_MUX_CFG15 MMIO32(SGPIO_PORT_BASE + 0xBC) /* Slice data registers (REG0 to 15) */ #define SGPIO_REG(slice) MMIO32(SGPIO_PORT_BASE + 0xC0 + \ (slice * 0x04)) #define SGPIO_REG0 MMIO32(SGPIO_PORT_BASE + 0xC0) #define SGPIO_REG1 MMIO32(SGPIO_PORT_BASE + 0xC4) #define SGPIO_REG2 MMIO32(SGPIO_PORT_BASE + 0xC8) #define SGPIO_REG3 MMIO32(SGPIO_PORT_BASE + 0xCC) #define SGPIO_REG4 MMIO32(SGPIO_PORT_BASE + 0xD0) #define SGPIO_REG5 MMIO32(SGPIO_PORT_BASE + 0xD4) #define SGPIO_REG6 MMIO32(SGPIO_PORT_BASE + 0xD8) #define SGPIO_REG7 MMIO32(SGPIO_PORT_BASE + 0xDC) #define SGPIO_REG8 MMIO32(SGPIO_PORT_BASE + 0xE0) #define SGPIO_REG9 MMIO32(SGPIO_PORT_BASE + 0xE4) #define SGPIO_REG10 MMIO32(SGPIO_PORT_BASE + 0xE8) #define SGPIO_REG11 MMIO32(SGPIO_PORT_BASE + 0xEC) #define SGPIO_REG12 MMIO32(SGPIO_PORT_BASE + 0xF0) #define SGPIO_REG13 MMIO32(SGPIO_PORT_BASE + 0xF4) #define SGPIO_REG14 MMIO32(SGPIO_PORT_BASE + 0xF8) #define SGPIO_REG15 MMIO32(SGPIO_PORT_BASE + 0xFC) /* Slice data shadow registers (REG_SS0 to 15) */ #define SGPIO_REG_SS(slice) MMIO32(SGPIO_PORT_BASE + 0x100 + \ (slice * 0x04)) #define SGPIO_REG_SS0 MMIO32(SGPIO_PORT_BASE + 0x100) #define SGPIO_REG_SS1 MMIO32(SGPIO_PORT_BASE + 0x104) #define SGPIO_REG_SS2 MMIO32(SGPIO_PORT_BASE + 0x108) #define SGPIO_REG_SS3 MMIO32(SGPIO_PORT_BASE + 0x10C) #define SGPIO_REG_SS4 MMIO32(SGPIO_PORT_BASE + 0x110) #define SGPIO_REG_SS5 MMIO32(SGPIO_PORT_BASE + 0x114) #define SGPIO_REG_SS6 MMIO32(SGPIO_PORT_BASE + 0x118) #define SGPIO_REG_SS7 MMIO32(SGPIO_PORT_BASE + 0x11C) #define SGPIO_REG_SS8 MMIO32(SGPIO_PORT_BASE + 0x120) #define SGPIO_REG_SS9 MMIO32(SGPIO_PORT_BASE + 0x124) #define SGPIO_REG_SS10 MMIO32(SGPIO_PORT_BASE + 0x128) #define SGPIO_REG_SS11 MMIO32(SGPIO_PORT_BASE + 0x12C) #define SGPIO_REG_SS12 MMIO32(SGPIO_PORT_BASE + 0x130) #define SGPIO_REG_SS13 MMIO32(SGPIO_PORT_BASE + 0x134) #define SGPIO_REG_SS14 MMIO32(SGPIO_PORT_BASE + 0x138) #define SGPIO_REG_SS15 MMIO32(SGPIO_PORT_BASE + 0x13C) /* Reload registers (PRESET0 to 15) */ #define SGPIO_PRESET(slice) MMIO32(SGPIO_PORT_BASE + 0x140 + \ (slice * 0x04)) #define SGPIO_PRESET0 MMIO32(SGPIO_PORT_BASE + 0x140) #define SGPIO_PRESET1 MMIO32(SGPIO_PORT_BASE + 0x144) #define SGPIO_PRESET2 MMIO32(SGPIO_PORT_BASE + 0x148) #define SGPIO_PRESET3 MMIO32(SGPIO_PORT_BASE + 0x14C) #define SGPIO_PRESET4 MMIO32(SGPIO_PORT_BASE + 0x150) #define SGPIO_PRESET5 MMIO32(SGPIO_PORT_BASE + 0x154) #define SGPIO_PRESET6 MMIO32(SGPIO_PORT_BASE + 0x158) #define SGPIO_PRESET7 MMIO32(SGPIO_PORT_BASE + 0x15C) #define SGPIO_PRESET8 MMIO32(SGPIO_PORT_BASE + 0x160) #define SGPIO_PRESET9 MMIO32(SGPIO_PORT_BASE + 0x164) #define SGPIO_PRESET10 MMIO32(SGPIO_PORT_BASE + 0x168) #define SGPIO_PRESET11 MMIO32(SGPIO_PORT_BASE + 0x16C) #define SGPIO_PRESET12 MMIO32(SGPIO_PORT_BASE + 0x170) #define SGPIO_PRESET13 MMIO32(SGPIO_PORT_BASE + 0x174) #define SGPIO_PRESET14 MMIO32(SGPIO_PORT_BASE + 0x178) #define SGPIO_PRESET15 MMIO32(SGPIO_PORT_BASE + 0x17C) /* Down counter registers (COUNT0 to 15) */ #define SGPIO_COUNT(slice) MMIO32(SGPIO_PORT_BASE + 0x180 + \ (slice * 0x04)) #define SGPIO_COUNT0 MMIO32(SGPIO_PORT_BASE + 0x180) #define SGPIO_COUNT1 MMIO32(SGPIO_PORT_BASE + 0x184) #define SGPIO_COUNT2 MMIO32(SGPIO_PORT_BASE + 0x188) #define SGPIO_COUNT3 MMIO32(SGPIO_PORT_BASE + 0x18C) #define SGPIO_COUNT4 MMIO32(SGPIO_PORT_BASE + 0x190) #define SGPIO_COUNT5 MMIO32(SGPIO_PORT_BASE + 0x194) #define SGPIO_COUNT6 MMIO32(SGPIO_PORT_BASE + 0x198) #define SGPIO_COUNT7 MMIO32(SGPIO_PORT_BASE + 0x19C) #define SGPIO_COUNT8 MMIO32(SGPIO_PORT_BASE + 0x1A0) #define SGPIO_COUNT9 MMIO32(SGPIO_PORT_BASE + 0x1A4) #define SGPIO_COUNT10 MMIO32(SGPIO_PORT_BASE + 0x1A8) #define SGPIO_COUNT11 MMIO32(SGPIO_PORT_BASE + 0x1AC) #define SGPIO_COUNT12 MMIO32(SGPIO_PORT_BASE + 0x1B0) #define SGPIO_COUNT13 MMIO32(SGPIO_PORT_BASE + 0x1B4) #define SGPIO_COUNT14 MMIO32(SGPIO_PORT_BASE + 0x1B8) #define SGPIO_COUNT15 MMIO32(SGPIO_PORT_BASE + 0x1BC) /* Position registers (POS0 to 15) */ #define SGPIO_POS(slice) MMIO32(SGPIO_PORT_BASE + 0x1C0 + \ (slice * 0x04)) #define SGPIO_POS0 MMIO32(SGPIO_PORT_BASE + 0x1C0) #define SGPIO_POS1 MMIO32(SGPIO_PORT_BASE + 0x1C4) #define SGPIO_POS2 MMIO32(SGPIO_PORT_BASE + 0x1C8) #define SGPIO_POS3 MMIO32(SGPIO_PORT_BASE + 0x1CC) #define SGPIO_POS4 MMIO32(SGPIO_PORT_BASE + 0x1D0) #define SGPIO_POS5 MMIO32(SGPIO_PORT_BASE + 0x1D4) #define SGPIO_POS6 MMIO32(SGPIO_PORT_BASE + 0x1D8) #define SGPIO_POS7 MMIO32(SGPIO_PORT_BASE + 0x1DC) #define SGPIO_POS8 MMIO32(SGPIO_PORT_BASE + 0x1E0) #define SGPIO_POS9 MMIO32(SGPIO_PORT_BASE + 0x1E4) #define SGPIO_POS10 MMIO32(SGPIO_PORT_BASE + 0x1E8) #define SGPIO_POS11 MMIO32(SGPIO_PORT_BASE + 0x1EC) #define SGPIO_POS12 MMIO32(SGPIO_PORT_BASE + 0x1F0) #define SGPIO_POS13 MMIO32(SGPIO_PORT_BASE + 0x1F4) #define SGPIO_POS14 MMIO32(SGPIO_PORT_BASE + 0x1F8) #define SGPIO_POS15 MMIO32(SGPIO_PORT_BASE + 0x1FC) /* Slice name to slice index mapping */ #define SGPIO_SLICE_A 0 #define SGPIO_SLICE_B 1 #define SGPIO_SLICE_C 2 #define SGPIO_SLICE_D 3 #define SGPIO_SLICE_E 4 #define SGPIO_SLICE_F 5 #define SGPIO_SLICE_G 6 #define SGPIO_SLICE_H 7 #define SGPIO_SLICE_I 8 #define SGPIO_SLICE_J 9 #define SGPIO_SLICE_K 10 #define SGPIO_SLICE_L 11 #define SGPIO_SLICE_M 12 #define SGPIO_SLICE_N 13 #define SGPIO_SLICE_O 14 #define SGPIO_SLICE_P 15 /* Mask for pattern match function of slice A */ #define SGPIO_MASK_A MMIO32(SGPIO_PORT_BASE + 0x200) /* Mask for pattern match function of slice H */ #define SGPIO_MASK_H MMIO32(SGPIO_PORT_BASE + 0x204) /* Mask for pattern match function of slice I */ #define SGPIO_MASK_I MMIO32(SGPIO_PORT_BASE + 0x208) /* Mask for pattern match function of slice P */ #define SGPIO_MASK_P MMIO32(SGPIO_PORT_BASE + 0x20C) /* GPIO input status register */ #define SGPIO_GPIO_INREG MMIO32(SGPIO_PORT_BASE + 0x210) /* GPIO output control register */ #define SGPIO_GPIO_OUTREG MMIO32(SGPIO_PORT_BASE + 0x214) /* GPIO OE control register */ #define SGPIO_GPIO_OENREG MMIO32(SGPIO_PORT_BASE + 0x218) /* Enables the slice COUNT counter */ #define SGPIO_CTRL_ENABLE MMIO32(SGPIO_PORT_BASE + 0x21C) /* Disables the slice COUNT counter */ #define SGPIO_CTRL_DISABLE MMIO32(SGPIO_PORT_BASE + 0x220) /* Shift clock interrupt clear mask */ #define SGPIO_CLR_EN_0 MMIO32(SGPIO_PORT_BASE + 0xF00) /* Shift clock interrupt set mask */ #define SGPIO_SET_EN_0 MMIO32(SGPIO_PORT_BASE + 0xF04) /* Shift clock interrupt enable */ #define SGPIO_ENABLE_0 MMIO32(SGPIO_PORT_BASE + 0xF08) /* Shift clock interrupt status */ #define SGPIO_STATUS_0 MMIO32(SGPIO_PORT_BASE + 0xF0C) /* Shift clock interrupt clear status */ #define SGPIO_CLR_STATUS_0 MMIO32(SGPIO_PORT_BASE + 0xF10) /* Shift clock interrupt set status */ #define SGPIO_SET_STATUS_0 MMIO32(SGPIO_PORT_BASE + 0xF14) /* Exchange clock interrupt clear mask */ #define SGPIO_CLR_EN_1 MMIO32(SGPIO_PORT_BASE + 0xF20) /* Exchange clock interrupt set mask */ #define SGPIO_SET_EN_1 MMIO32(SGPIO_PORT_BASE + 0xF24) /* Exchange clock interrupt enable */ #define SGPIO_ENABLE_1 MMIO32(SGPIO_PORT_BASE + 0xF28) /* Exchange clock interrupt status */ #define SGPIO_STATUS_1 MMIO32(SGPIO_PORT_BASE + 0xF2C) /* Exchange clock interrupt clear status */ #define SGPIO_CLR_STATUS_1 MMIO32(SGPIO_PORT_BASE + 0xF30) /* Exchange clock interrupt set status */ #define SGPIO_SET_STATUS_1 MMIO32(SGPIO_PORT_BASE + 0xF34) /* Pattern match interrupt clear mask */ #define SGPIO_CLR_EN_2 MMIO32(SGPIO_PORT_BASE + 0xF40) /* Pattern match interrupt set mask */ #define SGPIO_SET_EN_2 MMIO32(SGPIO_PORT_BASE + 0xF44) /* Pattern match interrupt enable */ #define SGPIO_ENABLE_2 MMIO32(SGPIO_PORT_BASE + 0xF48) /* Pattern match interrupt status */ #define SGPIO_STATUS_2 MMIO32(SGPIO_PORT_BASE + 0xF4C) /* Pattern match interrupt clear status */ #define SGPIO_CLR_STATUS_2 MMIO32(SGPIO_PORT_BASE + 0xF50) /* Pattern match interrupt set status */ #define SGPIO_SET_STATUS_2 MMIO32(SGPIO_PORT_BASE + 0xF54) /* Input interrupt clear mask */ #define SGPIO_CLR_EN_3 MMIO32(SGPIO_PORT_BASE + 0xF60) /* Input bit match interrupt set mask */ #define SGPIO_SET_EN_3 MMIO32(SGPIO_PORT_BASE + 0xF64) /* Input bit match interrupt enable */ #define SGPIO_ENABLE_3 MMIO32(SGPIO_PORT_BASE + 0xF68) /* Input bit match interrupt status */ #define SGPIO_STATUS_3 MMIO32(SGPIO_PORT_BASE + 0xF6C) /* Input bit match interrupt clear status */ #define SGPIO_CLR_STATUS_3 MMIO32(SGPIO_PORT_BASE + 0xF70) /* Input bit match interrupt set status */ #define SGPIO_SET_STATUS_3 MMIO32(SGPIO_PORT_BASE + 0xF74) /* --- Common register fields ----------------------------------- */ /* TODO: Generate this stuff with the gen.py script as well! */ #define SGPIO_OUT_MUX_CFG_P_OUT_CFG_SHIFT (0) #define SGPIO_OUT_MUX_CFG_P_OUT_CFG_MASK \ (0xf << SGPIO_OUT_MUX_CFG_P_OUT_CFG_SHIFT) #define SGPIO_OUT_MUX_CFG_P_OUT_CFG(x) \ ((x) << SGPIO_OUT_MUX_CFG_P_OUT_CFG_SHIFT) #define SGPIO_OUT_MUX_CFG_P_OE_CFG_SHIFT (4) #define SGPIO_OUT_MUX_CFG_P_OE_CFG_MASK \ (0x7 << SGPIO_OUT_MUX_CFG_P_OE_CFG_SHIFT) #define SGPIO_OUT_MUX_CFG_P_OE_CFG(x) \ ((x) << SGPIO_OUT_MUX_CFG_P_OE_CFG_SHIFT) #define SGPIO_MUX_CFG_EXT_CLK_ENABLE_SHIFT (0) #define SGPIO_MUX_CFG_EXT_CLK_ENABLE_MASK \ (1 << SGPIO_MUX_CFG_EXT_CLK_ENABLE_SHIFT) #define SGPIO_MUX_CFG_EXT_CLK_ENABLE(x) \ ((x) << SGPIO_MUX_CFG_EXT_CLK_ENABLE_SHIFT) #define SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE_SHIFT (1) #define SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE_MASK \ (0x3 << SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE_SHIFT) #define SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE(x) \ ((x) << SGPIO_MUX_CFG_CLK_SOURCE_PIN_MODE_SHIFT) #define SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE_SHIFT (3) #define SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE_MASK \ (0x3 << SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE(x) \ ((x) << SGPIO_MUX_CFG_CLK_SOURCE_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_MODE_SHIFT (5) #define SGPIO_MUX_CFG_QUALIFIER_MODE_MASK \ (0x3 << SGPIO_MUX_CFG_QUALIFIER_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_MODE(x) \ ((x) << SGPIO_MUX_CFG_QUALIFIER_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_PIN_MODE_SHIFT (7) #define SGPIO_MUX_CFG_QUALIFIER_PIN_MODE_MASK \ (0x3 << SGPIO_MUX_CFG_QUALIFIER_PIN_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_PIN_MODE(x) \ ((x) << SGPIO_MUX_CFG_QUALIFIER_PIN_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE_SHIFT (9) #define SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE_MASK \ (0x3 << SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE(x) \ ((x) << SGPIO_MUX_CFG_QUALIFIER_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFG_CONCAT_ENABLE_SHIFT (11) #define SGPIO_MUX_CFG_CONCAT_ENABLE_MASK \ (1 << SGPIO_MUX_CFG_CONCAT_ENABLE_SHIFT) #define SGPIO_MUX_CFG_CONCAT_ENABLE(x) \ ((x) << SGPIO_MUX_CFG_CONCAT_ENABLE_SHIFT) #define SGPIO_MUX_CFG_CONCAT_ORDER_SHIFT (12) #define SGPIO_MUX_CFG_CONCAT_ORDER_MASK \ (0x3 << SGPIO_MUX_CFG_CONCAT_ORDER_SHIFT) #define SGPIO_MUX_CFG_CONCAT_ORDER(x) \ ((x) << SGPIO_MUX_CFG_CONCAT_ORDER_SHIFT) #define SGPIO_SLICE_MUX_CFG_MATCH_MODE_SHIFT (0) #define SGPIO_SLICE_MUX_CFG_MATCH_MODE_MASK \ (1 << SGPIO_SLICE_MUX_CFG_MATCH_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_MATCH_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFG_MATCH_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE_SHIFT (1) #define SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE_MASK \ (1 << SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFG_CLK_CAPTURE_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_CLKGEN_MODE_SHIFT (2) #define SGPIO_SLICE_MUX_CFG_CLKGEN_MODE_MASK \ (1 << SGPIO_SLICE_MUX_CFG_CLKGEN_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_CLKGEN_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFG_CLKGEN_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_INV_OUT_CLK_SHIFT (3) #define SGPIO_SLICE_MUX_CFG_INV_OUT_CLK_MASK \ (1 << SGPIO_SLICE_MUX_CFG_INV_OUT_CLK_SHIFT) #define SGPIO_SLICE_MUX_CFG_INV_OUT_CLK(x) \ ((x) << SGPIO_SLICE_MUX_CFG_INV_OUT_CLK_SHIFT) #define SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE_SHIFT (4) #define SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE_MASK \ (0x3 << SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFG_DATA_CAPTURE_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_PARALLEL_MODE_SHIFT (6) #define SGPIO_SLICE_MUX_CFG_PARALLEL_MODE_MASK \ (0x3 << SGPIO_SLICE_MUX_CFG_PARALLEL_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_PARALLEL_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFG_PARALLEL_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFG_INV_QUALIFIER_SHIFT (8) #define SGPIO_SLICE_MUX_CFG_INV_QUALIFIER_MASK \ (1 << SGPIO_SLICE_MUX_CFG_INV_QUALIFIER_SHIFT) #define SGPIO_SLICE_MUX_CFG_INV_QUALIFIER(x) \ ((x) << SGPIO_SLICE_MUX_CFG_INV_QUALIFIER_SHIFT) #define SGPIO_POS_POS_SHIFT (0) #define SGPIO_POS_POS_MASK (0xff << SGPIO_POS_POS_SHIFT) #define SGPIO_POS_POS(x) ((x) << SGPIO_POS_POS_SHIFT) #define SGPIO_POS_POS_RESET_SHIFT (8) #define SGPIO_POS_POS_RESET_MASK (0xff << SGPIO_POS_POS_RESET_SHIFT) #define SGPIO_POS_POS_RESET(x) ((x) << SGPIO_POS_POS_RESET_SHIFT) /* --- AUTO-GENERATED STUFF FOLLOWS ----------------------------- */ /* --- SGPIO_OUT_MUX_CFG[0..15] values ------------------------------------ */ /* P_OUT_CFG: Output control of output SGPIOn */ #define SGPIO_OUT_MUX_CFGx_P_OUT_CFG_SHIFT (0) #define SGPIO_OUT_MUX_CFGx_P_OUT_CFG_MASK \ (0xf << SGPIO_OUT_MUX_CFGx_P_OUT_CFG_SHIFT) #define SGPIO_OUT_MUX_CFGx_P_OUT_CFG(x) \ ((x) << SGPIO_OUT_MUX_CFGx_P_OUT_CFG_SHIFT) /* P_OE_CFG: Output enable source */ #define SGPIO_OUT_MUX_CFGx_P_OE_CFG_SHIFT (4) #define SGPIO_OUT_MUX_CFGx_P_OE_CFG_MASK \ (0x7 << SGPIO_OUT_MUX_CFGx_P_OE_CFG_SHIFT) #define SGPIO_OUT_MUX_CFGx_P_OE_CFG(x) \ ((x) << SGPIO_OUT_MUX_CFGx_P_OE_CFG_SHIFT) /* --- SGPIO_MUX_CFG[0..15] values ---------------------------------------- */ /* EXT_CLK_ENABLE: Select clock signal */ #define SGPIO_MUX_CFGx_EXT_CLK_ENABLE_SHIFT (0) #define SGPIO_MUX_CFGx_EXT_CLK_ENABLE \ (1 << SGPIO_MUX_CFGx_EXT_CLK_ENABLE_SHIFT) /* CLK_SOURCE_PIN_MODE: Select source clock pin */ #define SGPIO_MUX_CFGx_CLK_SOURCE_PIN_MODE_SHIFT (1) #define SGPIO_MUX_CFGx_CLK_SOURCE_PIN_MODE_MASK \ (0x3 << SGPIO_MUX_CFGx_CLK_SOURCE_PIN_MODE_SHIFT) #define SGPIO_MUX_CFGx_CLK_SOURCE_PIN_MODE(x) \ ((x) << SGPIO_MUX_CFGx_CLK_SOURCE_PIN_MODE_SHIFT) /* CLK_SOURCE_SLICE_MODE: Select clock source slice */ #define SGPIO_MUX_CFGx_CLK_SOURCE_SLICE_MODE_SHIFT (3) #define SGPIO_MUX_CFGx_CLK_SOURCE_SLICE_MODE_MASK \ (0x3 << SGPIO_MUX_CFGx_CLK_SOURCE_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFGx_CLK_SOURCE_SLICE_MODE(x) \ ((x) << SGPIO_MUX_CFGx_CLK_SOURCE_SLICE_MODE_SHIFT) /* QUALIFIER_MODE: Select qualifier mode */ #define SGPIO_MUX_CFGx_QUALIFIER_MODE_SHIFT (5) #define SGPIO_MUX_CFGx_QUALIFIER_MODE_MASK \ (0x3 << SGPIO_MUX_CFGx_QUALIFIER_MODE_SHIFT) #define SGPIO_MUX_CFGx_QUALIFIER_MODE(x) \ ((x) << SGPIO_MUX_CFGx_QUALIFIER_MODE_SHIFT) /* QUALIFIER_PIN_MODE: Select qualifier pin */ #define SGPIO_MUX_CFGx_QUALIFIER_PIN_MODE_SHIFT (7) #define SGPIO_MUX_CFGx_QUALIFIER_PIN_MODE_MASK \ (0x3 << SGPIO_MUX_CFGx_QUALIFIER_PIN_MODE_SHIFT) #define SGPIO_MUX_CFGx_QUALIFIER_PIN_MODE(x) \ ((x) << SGPIO_MUX_CFGx_QUALIFIER_PIN_MODE_SHIFT) /* QUALIFIER_SLICE_MODE: Select qualifier slice */ #define SGPIO_MUX_CFGx_QUALIFIER_SLICE_MODE_SHIFT (9) #define SGPIO_MUX_CFGx_QUALIFIER_SLICE_MODE_MASK \ (0x3 << SGPIO_MUX_CFGx_QUALIFIER_SLICE_MODE_SHIFT) #define SGPIO_MUX_CFGx_QUALIFIER_SLICE_MODE(x) \ ((x) << SGPIO_MUX_CFG0_QUALIFIER_SLICE_MODE_SHIFT) /* CONCAT_ENABLE: Enable concatenation */ #define SGPIO_MUX_CFGx_CONCAT_ENABLE_SHIFT (11) #define SGPIO_MUX_CFGx_CONCAT_ENABLE \ (1 << SGPIO_MUX_CFGx_CONCAT_ENABLE_SHIFT) /* CONCAT_ORDER: Select concatenation order */ #define SGPIO_MUX_CFGx_CONCAT_ORDER_SHIFT (12) #define SGPIO_MUX_CFGx_CONCAT_ORDER_MASK \ (0x3 << SGPIO_MUX_CFGx_CONCAT_ORDER_SHIFT) #define SGPIO_MUX_CFGx_CONCAT_ORDER(x) \ ((x) << SGPIO_MUX_CFGx_CONCAT_ORDER_SHIFT) /* --- SGPIO_SLICE_MUX_CFG[0..15] values ---------------------------------- */ /* MATCH_MODE: Match mode */ #define SGPIO_SLICE_MUX_CFGx_MATCH_MODE_SHIFT (0) #define SGPIO_SLICE_MUX_CFGx_MATCH_MODE \ (1 << SGPIO_SLICE_MUX_CFG0_MATCH_MODE_SHIFT) /* CLK_CAPTURE_MODE: Capture clock mode */ #define SGPIO_SLICE_MUX_CFGx_CLK_CAPTURE_MODE_SHIFT (1) #define SGPIO_SLICE_MUX_CFGx_CLK_CAPTURE_MODE \ (1 << SGPIO_SLICE_MUX_CFGx_CLK_CAPTURE_MODE_SHIFT) /* CLKGEN_MODE: Clock generation mode */ #define SGPIO_SLICE_MUX_CFGx_CLKGEN_MODE_SHIFT (2) #define SGPIO_SLICE_MUX_CFGx_CLKGEN_MODE \ (1 << SGPIO_SLICE_MUX_CFGx_CLKGEN_MODE_SHIFT) /* INV_OUT_CLK: Invert output clock */ #define SGPIO_SLICE_MUX_CFGx_INV_OUT_CLK_SHIFT (3) #define SGPIO_SLICE_MUX_CFGx_INV_OUT_CLK \ (1 << SGPIO_SLICE_MUX_CFGx_INV_OUT_CLK_SHIFT) /* DATA_CAPTURE_MODE: Condition for input bit match interrupt */ #define SGPIO_SLICE_MUX_CFGx_DATA_CAPTURE_MODE_SHIFT (4) #define SGPIO_SLICE_MUX_CFGx_DATA_CAPTURE_MODE_MASK \ (0x3 << SGPIO_SLICE_MUX_CFGx_DATA_CAPTURE_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFGx_DATA_CAPTURE_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFGx_DATA_CAPTURE_MODE_SHIFT) /* PARALLEL_MODE: Parallel mode */ #define SGPIO_SLICE_MUX_CFGx_PARALLEL_MODE_SHIFT (6) #define SGPIO_SLICE_MUX_CFGx_PARALLEL_MODE_MASK \ (0x3 << SGPIO_SLICE_MUX_CFGx_PARALLEL_MODE_SHIFT) #define SGPIO_SLICE_MUX_CFGx_PARALLEL_MODE(x) \ ((x) << SGPIO_SLICE_MUX_CFGx_PARALLEL_MODE_SHIFT) /* INV_QUALIFIER: Inversion qualifier */ #define SGPIO_SLICE_MUX_CFGx_INV_QUALIFIER_SHIFT (8) #define SGPIO_SLICE_MUX_CFGx_INV_QUALIFIER \ (1 << SGPIO_SLICE_MUX_CFGx_INV_QUALIFIER_SHIFT) /* --- SGPIO_POS[0..15] values -------------------------------------------- */ /* POS: Each time COUNT reaches 0x0 POS counts down */ #define SGPIO_POSx_POS_SHIFT (0) #define SGPIO_POSx_POS_MASK (0xff << SGPIO_POSx_POS_SHIFT) #define SGPIO_POSx_POS(x) ((x) << SGPIO_POSx_POS_SHIFT) /* POS_RESET: Reload value for POS after POS reaches 0x0 */ #define SGPIO_POSx_POS_RESET_SHIFT (8) #define SGPIO_POSx_POS_RESET_MASK (0xff << SGPIO_POSx_POS_RESET_SHIFT) #define SGPIO_POSx_POS_RESET(x) ((x) << SGPIO_POSx_POS_RESET_SHIFT) /* SGPIO structure for faster/better code generation (especially when optimized * with -O2/-O3) */ /* This structure is compliant with LPC43xx User Manual UM10503 Rev.1.4 - 3 * September 2012 */ typedef struct { /* Pin multiplexer configuration registers. RW */ volatile uint32_t OUT_MUX_CFG[16]; /* SGPIO multiplexer configuration registers. RW */ volatile uint32_t SGPIO_MUX_CFG[16]; /* Slice multiplexer configuration registers. RW */ volatile uint32_t SLICE_MUX_CFG[16]; /* Slice data registers. RW */ volatile uint32_t REG[16]; /* Slice data shadow registers. Each time POS reaches 0x0 the contents * of REG_SS is exchanged with the content of REG. RW */ volatile uint32_t REG_SS[16]; /* Reload registers. Counter reload value; loaded when COUNT reaches * 0x0 RW */ volatile uint32_t PRESET[16]; /* Down counter registers, counts down each shift clock cycle. RW */ volatile uint32_t COUNT[16]; /* Position registers. POS Each time COUNT reaches 0x0 POS counts down. * POS_RESET Reload value for POS after POS reaches 0x0. RW */ volatile uint32_t POS[16]; /* Slice A mask register. Mask for pattern match function of slice A. * RW */ volatile uint32_t MASK_A; /* Slice H mask register. Mask for pattern match function of slice H. * RW */ volatile uint32_t MASK_H; /* Slice I mask register. Mask for pattern match function of slice I. * RW */ volatile uint32_t MASK_I; /* Slice P mask register. Mask for pattern match function of slice P. * RW */ volatile uint32_t MASK_P; /* GPIO input status register. R */ volatile uint32_t GPIO_INREG; /* GPIO output control register. RW */ volatile uint32_t GPIO_OUTREG; /* GPIO output enable register. RW */ volatile uint32_t GPIO_OENREG; /* Slice count enable register. RW */ volatile uint32_t CTRL_ENABLE; /* Slice count disable register. RW */ volatile uint32_t CTRL_DISABLE; volatile uint32_t RES0[823]; /* Shift clock interrupt clear mask register. W */ volatile uint32_t CLR_EN_0; /* Shift clock interrupt set mask register. W */ volatile uint32_t SET_EN_0; /* Shift clock interrupt enable register. R */ volatile uint32_t ENABLE_0; /* Shift clock interrupt status register. R */ volatile uint32_t STATUS_0; /* Shift clock interrupt clear status register. W */ volatile uint32_t CLR_STATUS_0; /* Shift clock interrupt set status register. W */ volatile uint32_t SET_STATUS_0; volatile uint32_t RES1[2]; /* Exchange clock interrupt clear mask register. W */ volatile uint32_t CLR_EN_1; /* Exchange clock interrupt set mask register. W */ volatile uint32_t SET_EN_1; /* Exchange clock interrupt enable. R */ volatile uint32_t ENABLE_1; /* Exchange clock interrupt status register. R */ volatile uint32_t STATUS_1; /* Exchange clock interrupt clear status register. W */ volatile uint32_t CLR_STATUS_1; /* Exchange clock interrupt set status register. W */ volatile uint32_t SET_STATUS_1; volatile uint32_t RES2[2]; /* Pattern match interrupt clear mask register. W */ volatile uint32_t CLR_EN_2; /* Pattern match interrupt set mask register. W */ volatile uint32_t SET_EN_2; /* Pattern match interrupt enable register. R */ volatile uint32_t ENABLE_2; /* Pattern match interrupt status register. R */ volatile uint32_t STATUS_2; /* Pattern match interrupt clear status register. W */ volatile uint32_t CLR_STATUS_2; /* Pattern match interrupt set status register. W */ volatile uint32_t SET_STATUS_2; volatile uint32_t RES3[2]; /* Input interrupt clear mask register. W */ volatile uint32_t CLR_EN_3; /* Input bit match interrupt set mask register. W */ volatile uint32_t SET_EN_3; /* Input bit match interrupt enable register. R */ volatile uint32_t ENABLE_3; /* Input bit match interrupt status register. R */ volatile uint32_t STATUS_3; /* Input bit match interrupt clear status register. W */ volatile uint32_t CLR_STATUS_3; /* Input bit match interrupt set status register. W */ volatile uint32_t SET_STATUS_3; } sgpio_t; /* Global access to SGPIO structure */ #define SGPIO ((sgpio_t*)SGPIO_PORT_BASE) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/spi.h ================================================ /** @defgroup spi_defines Serial Peripheral Interface Defines @brief Defined Constants and Types for the LPC43xx Serial Peripheral Interface @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2013 Jared Boone @date 15 November 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SPI_H #define LPC43XX_SPI_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* SPI port base addresses (for convenience) */ #define SPI (SPI_PORT_BASE) /* --- SPI registers ----------------------------------------------------- */ /* Control Register */ #define SPI_CR MMIO32(SPI + 0x000) /* Status Register */ #define SPI_SR MMIO32(SPI + 0x004) /* Data Register */ #define SPI_DR MMIO32(SPI + 0x008) /* Clock Counter Register */ #define SPI_CCR MMIO32(SPI + 0x00C) /* Test Control Register */ #define SPI_TCR MMIO32(SPI + 0x010) /* Test Status Register */ #define SPI_TSR MMIO32(SPI + 0x014) /* Interrupt Flag */ #define SPI_INT MMIO32(SPI + 0x01C) /* --- SPI_CR values -------------------------------------------- */ /* BITENABLE: Bit length enable */ #define SPI_CR_BITENABLE_SHIFT (2) #define SPI_CR_BITENABLE_MASK (0x1 << SPI_CR_BITENABLE_SHIFT) #define SPI_CR_BITENABLE(x) ((x) << SPI_CR_BITENABLE_SHIFT) /* CPHA: Clock phase control */ #define SPI_CR_CPHA_SHIFT (3) #define SPI_CR_CPHA_MASK (0x1 << SPI_CR_CPHA_SHIFT) #define SPI_CR_CPHA(x) ((x) << SPI_CR_CPHA_SHIFT) /* CPOL: Clock polarity control */ #define SPI_CR_CPOL_SHIFT (4) #define SPI_CR_CPOL_MASK (0x1 << SPI_CR_CPOL_SHIFT) #define SPI_CR_CPOL(x) ((x) << SPI_CR_CPOL_SHIFT) /* MSTR: Master mode select */ #define SPI_CR_MSTR_SHIFT (5) #define SPI_CR_MSTR_MASK (0x1 << SPI_CR_MSTR_SHIFT) #define SPI_CR_MSTR(x) ((x) << SPI_CR_MSTR_SHIFT) /* LSBF: LSB first */ #define SPI_CR_LSBF_SHIFT (6) #define SPI_CR_LSBF_MASK (0x1 << SPI_CR_LSBF_SHIFT) #define SPI_CR_LSBF(x) ((x) << SPI_CR_LSBF_SHIFT) /* SPIE: Serial peripheral interrupt enable */ #define SPI_CR_SPIE_SHIFT (7) #define SPI_CR_SPIE_MASK (0x1 << SPI_CR_SPIE_SHIFT) #define SPI_CR_SPIE(x) ((x) << SPI_CR_SPIE_SHIFT) /* BITS: Bits per transfer */ #define SPI_CR_BITS_SHIFT (8) #define SPI_CR_BITS_MASK (0xf << SPI_CR_BITS_SHIFT) #define SPI_CR_BITS(x) ((x) << SPI_CR_BITS_SHIFT) /* SPIF: Interrupt */ #define SPI_CR_SPIF_SHIFT (0) #define SPI_CR_SPIF_MASK (0x1 << SPI_CR_SPIF_SHIFT) #define SPI_CR_SPIF(x) ((x) << SPI_CR_SPIF_SHIFT) /* --- SPI_SR values -------------------------------------------- */ /* ABRT: Slave abort */ #define SPI_SR_ABRT_SHIFT (3) #define SPI_SR_ABRT_MASK (0x1 << SPI_SR_ABRT_SHIFT) #define SPI_SR_ABRT(x) ((x) << SPI_SR_ABRT_SHIFT) /* MODF: Mode fault */ #define SPI_SR_MODF_SHIFT (4) #define SPI_SR_MODF_MASK (0x1 << SPI_SR_MODF_SHIFT) #define SPI_SR_MODF(x) ((x) << SPI_SR_MODF_SHIFT) /* ROVR: Read overrun */ #define SPI_SR_ROVR_SHIFT (5) #define SPI_SR_ROVR_MASK (0x1 << SPI_SR_ROVR_SHIFT) #define SPI_SR_ROVR(x) ((x) << SPI_SR_ROVR_SHIFT) /* WCOL: Write collision */ #define SPI_SR_WCOL_SHIFT (6) #define SPI_SR_WCOL_MASK (0x1 << SPI_SR_WCOL_SHIFT) #define SPI_SR_WCOL(x) ((x) << SPI_SR_WCOL_SHIFT) /* SPIF: Transfer complete */ #define SPI_SR_SPIF_SHIFT (7) #define SPI_SR_SPIF_MASK (0x1 << SPI_SR_SPIF_SHIFT) #define SPI_SR_SPIF(x) ((x) << SPI_SR_SPIF_SHIFT) /* --- SPI_DR values -------------------------------------------- */ /* DATA: Bi-directional data port */ #define SPI_DR_DATA_SHIFT (0) #define SPI_DR_DATA_MASK (0xffff << SPI_DR_DATA_SHIFT) #define SPI_DR_DATA(x) ((x) << SPI_DR_DATA_SHIFT) /* --- SPI_CCR values ------------------------------------------- */ /* COUNTER: Clock counter setting */ #define SPI_CCR_COUNTER_SHIFT (0) #define SPI_CCR_COUNTER_MASK (0xff << SPI_CCR_COUNTER_SHIFT) #define SPI_CCR_COUNTER(x) ((x) << SPI_CCR_COUNTER_SHIFT) /* --- SPI_TCR values ------------------------------------------- */ /* TEST: Test mode */ #define SPI_TCR_TEST_SHIFT (1) #define SPI_TCR_TEST_MASK (0x7f << SPI_TCR_TEST_SHIFT) #define SPI_TCR_TEST(x) ((x) << SPI_TCR_TEST_SHIFT) /* --- SPI_TSR values ------------------------------------------- */ /* ABRT: Slave abort */ #define SPI_TSR_ABRT_SHIFT (3) #define SPI_TSR_ABRT_MASK (0x1 << SPI_TSR_ABRT_SHIFT) #define SPI_TSR_ABRT(x) ((x) << SPI_TSR_ABRT_SHIFT) /* MODF: Mode fault */ #define SPI_TSR_MODF_SHIFT (4) #define SPI_TSR_MODF_MASK (0x1 << SPI_TSR_MODF_SHIFT) #define SPI_TSR_MODF(x) ((x) << SPI_TSR_MODF_SHIFT) /* ROVR: Read overrun */ #define SPI_TSR_ROVR_SHIFT (5) #define SPI_TSR_ROVR_MASK (0x1 << SPI_TSR_ROVR_SHIFT) #define SPI_TSR_ROVR(x) ((x) << SPI_TSR_ROVR_SHIFT) /* WCOL: Write collision */ #define SPI_TSR_WCOL_SHIFT (6) #define SPI_TSR_WCOL_MASK (0x1 << SPI_TSR_WCOL_SHIFT) #define SPI_TSR_WCOL(x) ((x) << SPI_TSR_WCOL_SHIFT) /* SPIF: Transfer complete */ #define SPI_TSR_SPIF_SHIFT (7) #define SPI_TSR_SPIF_MASK (0x1 << SPI_TSR_SPIF_SHIFT) #define SPI_TSR_SPIF(x) ((x) << SPI_TSR_SPIF_SHIFT) BEGIN_DECLS /*****/ END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/spifi.h ================================================ /** @defgroup spifi_defines SPI Flash Interface (SPIFI) Defines @brief Defined Constants and Types for the LPC43xx SPI Flash Interface (SPIFI) @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2014 Jared Boone @date 16 January 2014 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2014 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SPIFI_H #define LPC43XX_SPIFI_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* SPIFI port base addresses (for convenience) */ #define SPIFI (SPIFI_BASE) /* --- SPIFI registers ----------------------------------------------------- */ /* Control Register */ #define SPIFI_CTRL MMIO32(SPIFI_BASE + 0x000) /* Command Register */ #define SPIFI_CMD MMIO32(SPIFI_BASE + 0x004) /* Address Register */ #define SPIFI_ADDR MMIO32(SPIFI_BASE + 0x008) /* Intermediate Data Register */ #define SPIFI_IDATA MMIO32(SPIFI_BASE + 0x00C) /* Cache Limit Register */ #define SPIFI_CLIMIT MMIO32(SPIFI_BASE + 0x010) /* Data Register */ #define SPIFI_DATA MMIO32(SPIFI_BASE + 0x014) #define SPIFI_DATA_BYTE MMIO8(SPIFI_BASE + 0x014) /* Memory Command Register */ #define SPIFI_MCMD MMIO32(SPIFI_BASE + 0x018) /* Status Register */ #define SPIFI_STAT MMIO32(SPIFI_BASE + 0x01C) /* --- SPIFI_CTRL values ---------------------------------------- */ /* TIMEOUT: Memory mode idle timeout */ #define SPIFI_CTRL_TIMEOUT_SHIFT (0) #define SPIFI_CTRL_TIMEOUT_MASK (0xffff << SPIFI_CTRL_TIMEOUT_SHIFT) #define SPIFI_CTRL_TIMEOUT(x) ((x) << SPIFI_CTRL_TIMEOUT_SHIFT) /* CSHIGH: Minimum CS# high time */ #define SPIFI_CTRL_CSHIGH_SHIFT (16) #define SPIFI_CTRL_CSHIGH_MASK (0xf << SPIFI_CTRL_CSHIGH_SHIFT) #define SPIFI_CTRL_CSHIGH(x) ((x) << SPIFI_CTRL_CSHIGH_SHIFT) /* D_PRFTCH_DIS: Disable speculative prefetch */ #define SPIFI_CTRL_D_PRFTCH_DIS_SHIFT (21) #define SPIFI_CTRL_D_PRFTCH_DIS_MASK (0x1 << SPIFI_CTRL_D_PRFTCH_DIS_SHIFT) #define SPIFI_CTRL_D_PRFTCH_DIS(x) ((x) << SPIFI_CTRL_D_PRFTCH_DIS_SHIFT) /* INTEN: Enable command end interrupt */ #define SPIFI_CTRL_INTEN_SHIFT (22) #define SPIFI_CTRL_INTEN_MASK (0x1 << SPIFI_CTRL_INTEN_SHIFT) #define SPIFI_CTRL_INTEN(x) ((x) << SPIFI_CTRL_INTEN_SHIFT) /* MODE3: SPI mode 3 select */ #define SPIFI_CTRL_MODE3_SHIFT (23) #define SPIFI_CTRL_MODE3_MASK (0x1 << SPIFI_CTRL_MODE3_SHIFT) #define SPIFI_CTRL_MODE3(x) ((x) << SPIFI_CTRL_MODE3_SHIFT) /* PRFTCH_DIS: Disable prefetching of cache lines */ #define SPIFI_CTRL_PRFTCH_DIS_SHIFT (27) #define SPIFI_CTRL_PRFTCH_DIS_MASK (0x1 << SPIFI_CTRL_PRFTCH_DIS_SHIFT) #define SPIFI_CTRL_PRFTCH_DIS(x) ((x) << SPIFI_CTRL_PRFTCH_DIS_SHIFT) /* DUAL: Select dual protocol */ #define SPIFI_CTRL_DUAL_SHIFT (28) #define SPIFI_CTRL_DUAL_MASK (0x1 << SPIFI_CTRL_DUAL_SHIFT) #define SPIFI_CTRL_DUAL(x) ((x) << SPIFI_CTRL_DUAL_SHIFT) /* RFCLK: Read data on falling edge */ #define SPIFI_CTRL_RFCLK_SHIFT (29) #define SPIFI_CTRL_RFCLK_MASK (0x1 << SPIFI_CTRL_RFCLK_SHIFT) #define SPIFI_CTRL_RFCLK(x) ((x) << SPIFI_CTRL_RFCLK_SHIFT) /* FBCLK: Feedback clock select */ #define SPIFI_CTRL_FBCLK_SHIFT (30) #define SPIFI_CTRL_FBCLK_MASK (0x1 << SPIFI_CTRL_FBCLK_SHIFT) #define SPIFI_CTRL_FBCLK(x) ((x) << SPIFI_CTRL_FBCLK_SHIFT) /* DMAEN: DMA request output enable */ #define SPIFI_CTRL_DMAEN_SHIFT (31) #define SPIFI_CTRL_DMAEN_MASK (0x1 << SPIFI_CTRL_DMAEN_SHIFT) #define SPIFI_CTRL_DMAEN(x) ((x) << SPIFI_CTRL_DMAEN_SHIFT) /* --- SPIFI_CMD values ----------------------------------------- */ /* DATALEN: Data bytes in command */ #define SPIFI_CMD_DATALEN_SHIFT (0) #define SPIFI_CMD_DATALEN_MASK (0x3fff << SPIFI_CMD_DATALEN_SHIFT) #define SPIFI_CMD_DATALEN(x) ((x) << SPIFI_CMD_DATALEN_SHIFT) /* POLL: Poll at end of command */ #define SPIFI_CMD_POLL_SHIFT (14) #define SPIFI_CMD_POLL_MASK (0x1 << SPIFI_CMD_POLL_SHIFT) #define SPIFI_CMD_POLL(x) ((x) << SPIFI_CMD_POLL_SHIFT) /* DOUT: Data output to serial flash */ #define SPIFI_CMD_DOUT_SHIFT (15) #define SPIFI_CMD_DOUT_MASK (0x1 << SPIFI_CMD_DOUT_SHIFT) #define SPIFI_CMD_DOUT(x) ((x) << SPIFI_CMD_DOUT_SHIFT) /* INTLEN: Intermediate bytes before data */ #define SPIFI_CMD_INTLEN_SHIFT (16) #define SPIFI_CMD_INTLEN_MASK (0x7 << SPIFI_CMD_INTLEN_SHIFT) #define SPIFI_CMD_INTLEN(x) ((x) << SPIFI_CMD_INTLEN_SHIFT) /* FIELDFORM: Form of command fields */ #define SPIFI_CMD_FIELDFORM_SHIFT (19) #define SPIFI_CMD_FIELDFORM_MASK (0x3 << SPIFI_CMD_FIELDFORM_SHIFT) #define SPIFI_CMD_FIELDFORM(x) ((x) << SPIFI_CMD_FIELDFORM_SHIFT) /* FRAMEFORM: Form of the opcode/address fields */ #define SPIFI_CMD_FRAMEFORM_SHIFT (21) #define SPIFI_CMD_FRAMEFORM_MASK (0x7 << SPIFI_CMD_FRAMEFORM_SHIFT) #define SPIFI_CMD_FRAMEFORM(x) ((x) << SPIFI_CMD_FRAMEFORM_SHIFT) /* OPCODE: Command opcode */ #define SPIFI_CMD_OPCODE_SHIFT (24) #define SPIFI_CMD_OPCODE_MASK (0xff << SPIFI_CMD_OPCODE_SHIFT) #define SPIFI_CMD_OPCODE(x) ((x) << SPIFI_CMD_OPCODE_SHIFT) /* --- SPIFI_ADDR values ---------------------------------------- */ /* ADDRESS: Address field value */ #define SPIFI_ADDR_ADDRESS_SHIFT (0) #define SPIFI_ADDR_ADDRESS_MASK (0xffffffff << SPIFI_ADDR_ADDRESS_SHIFT) #define SPIFI_ADDR_ADDRESS(x) ((x) << SPIFI_ADDR_ADDRESS_SHIFT) /* --- SPIFI_IDATA values --------------------------------------- */ /* IDATA: Intermediate bytes value */ #define SPIFI_IDATA_IDATA_SHIFT (0) #define SPIFI_IDATA_IDATA_MASK (0xffffffff << SPIFI_IDATA_IDATA_SHIFT) #define SPIFI_IDATA_IDATA(x) ((x) << SPIFI_IDATA_IDATA_SHIFT) /* --- SPIFI_CLIMIT values -------------------------------------- */ /* CLIMIT: Upper limit of cacheable memory */ #define SPIFI_CLIMIT_CLIMIT_SHIFT (0) #define SPIFI_CLIMIT_CLIMIT_MASK (0xffffffff << SPIFI_CLIMIT_CLIMIT_SHIFT) #define SPIFI_CLIMIT_CLIMIT(x) ((x) << SPIFI_CLIMIT_CLIMIT_SHIFT) /* --- SPIFI_DATA values ---------------------------------------- */ /* DATA: Input or output data */ #define SPIFI_DATA_DATA_SHIFT (0) #define SPIFI_DATA_DATA_MASK (0xffffffff << SPIFI_DATA_DATA_SHIFT) #define SPIFI_DATA_DATA(x) ((x) << SPIFI_DATA_DATA_SHIFT) /* --- SPIFI_MCMD values ---------------------------------------- */ /* POLL: Must be zero */ #define SPIFI_MCMD_POLL_SHIFT (14) #define SPIFI_MCMD_POLL_MASK (0x1 << SPIFI_MCMD_POLL_SHIFT) #define SPIFI_MCMD_POLL(x) ((x) << SPIFI_MCMD_POLL_SHIFT) /* DOUT: Must be zero */ #define SPIFI_MCMD_DOUT_SHIFT (15) #define SPIFI_MCMD_DOUT_MASK (0x1 << SPIFI_MCMD_DOUT_SHIFT) #define SPIFI_MCMD_DOUT(x) ((x) << SPIFI_MCMD_DOUT_SHIFT) /* INTLEN: Intermediate bytes before data */ #define SPIFI_MCMD_INTLEN_SHIFT (16) #define SPIFI_MCMD_INTLEN_MASK (0x7 << SPIFI_MCMD_INTLEN_SHIFT) #define SPIFI_MCMD_INTLEN(x) ((x) << SPIFI_MCMD_INTLEN_SHIFT) /* FIELDFORM: Form of command fields */ #define SPIFI_MCMD_FIELDFORM_SHIFT (19) #define SPIFI_MCMD_FIELDFORM_MASK (0x3 << SPIFI_MCMD_FIELDFORM_SHIFT) #define SPIFI_MCMD_FIELDFORM(x) ((x) << SPIFI_MCMD_FIELDFORM_SHIFT) /* FRAMEFORM: Form of the opcode/address fields */ #define SPIFI_MCMD_FRAMEFORM_SHIFT (21) #define SPIFI_MCMD_FRAMEFORM_MASK (0x7 << SPIFI_MCMD_FRAMEFORM_SHIFT) #define SPIFI_MCMD_FRAMEFORM(x) ((x) << SPIFI_MCMD_FRAMEFORM_SHIFT) /* OPCODE: Command opcode */ #define SPIFI_MCMD_OPCODE_SHIFT (24) #define SPIFI_MCMD_OPCODE_MASK (0xff << SPIFI_MCMD_OPCODE_SHIFT) #define SPIFI_MCMD_OPCODE(x) ((x) << SPIFI_MCMD_OPCODE_SHIFT) /* --- SPIFI_STAT values ---------------------------------------- */ /* MCINIT: Memory command initialized */ #define SPIFI_STAT_MCINIT_SHIFT (0) #define SPIFI_STAT_MCINIT_MASK (0x1 << SPIFI_STAT_MCINIT_SHIFT) #define SPIFI_STAT_MCINIT(x) ((x) << SPIFI_STAT_MCINIT_SHIFT) /* CMD: Command active */ #define SPIFI_STAT_CMD_SHIFT (1) #define SPIFI_STAT_CMD_MASK (0x1 << SPIFI_STAT_CMD_SHIFT) #define SPIFI_STAT_CMD(x) ((x) << SPIFI_STAT_CMD_SHIFT) /* RESET: Abort current command/memory mode */ #define SPIFI_STAT_RESET_SHIFT (4) #define SPIFI_STAT_RESET_MASK (0x1 << SPIFI_STAT_RESET_SHIFT) #define SPIFI_STAT_RESET(x) ((x) << SPIFI_STAT_RESET_SHIFT) /* INTRQ: Interrupt request status */ #define SPIFI_STAT_INTRQ_SHIFT (5) #define SPIFI_STAT_INTRQ_MASK (0x1 << SPIFI_STAT_INTRQ_SHIFT) #define SPIFI_STAT_INTRQ(x) ((x) << SPIFI_STAT_INTRQ_SHIFT) /* VERSION: Peripheral hardware version */ #define SPIFI_STAT_VERSION_SHIFT (24) #define SPIFI_STAT_VERSION_MASK (0xff << SPIFI_STAT_VERSION_SHIFT) #define SPIFI_STAT_VERSION(x) ((x) << SPIFI_STAT_VERSION_SHIFT) BEGIN_DECLS END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/ssp.h ================================================ /** @defgroup ssp_defines Synchronous Serial Port @brief Defined Constants and Types for the LPC43xx Synchronous Serial Port @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_SSP_H #define LPC43XX_SSP_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* SSP port base addresses (for convenience) */ #define SSP0 SSP0_BASE #define SSP1 SSP1_BASE /* --- SSP registers ------------------------------------------------------- */ /* Control Register 0 */ #define SSP_CR0(port) MMIO32(port + 0x000) #define SSP0_CR0 SSP_CR0(SSP0) #define SSP1_CR0 SSP_CR0(SSP1) /* Control Register 1 */ #define SSP_CR1(port) MMIO32(port + 0x004) #define SSP0_CR1 SSP_CR1(SSP0) #define SSP1_CR1 SSP_CR1(SSP1) /* Data Register */ #define SSP_DR(port) MMIO32(port + 0x008) #define SSP0_DR SSP_DR(SSP0) #define SSP1_DR SSP_DR(SSP1) /* Status Register */ #define SSP_SR(port) MMIO32(port + 0x00C) #define SSP0_SR SSP_SR(SSP0) #define SSP1_SR SSP_SR(SSP1) #define SSP_SR_TFE BIT0 #define SSP_SR_TNF BIT1 #define SSP_SR_RNE BIT2 #define SSP_SR_RFF BIT3 #define SSP_SR_BSY BIT4 /* Clock Prescale Register */ #define SSP_CPSR(port) MMIO32(port + 0x010) #define SSP0_CPSR SSP_CPSR(SSP0) #define SSP1_CPSR SSP_CPSR(SSP1) /* Interrupt Mask Set and Clear Register */ #define SSP_IMSC(port) MMIO32(port + 0x014) #define SSP0_IMSC SSP_IMSC(SSP0) #define SSP1_IMSC SSP_IMSC(SSP1) /* Raw Interrupt Status Register */ #define SSP_RIS(port) MMIO32(port + 0x018) #define SSP0_RIS SSP_RIS(SSP0) #define SSP1_RIS SSP_RIS(SSP1) /* Masked Interrupt Status Register */ #define SSP_MIS(port) MMIO32(port + 0x01C) #define SSP0_MIS SSP_MIS(SSP0) #define SSP1_MIS SSP_MIS(SSP1) /* SSPICR Interrupt Clear Register */ #define SSP_ICR(port) MMIO32(port + 0x020) #define SSP0_ICR SSP_ICR(SSP0) #define SSP1_ICR SSP_ICR(SSP1) /* SSP1 DMA control register */ #define SSP_DMACR(port) MMIO32(port + 0x024) #define SSP0_DMACR SSP_DMACR(SSP0) #define SSP1_DMACR SSP_DMACR(SSP1) /* RXDMAE: Receive DMA enable */ #define SSP_DMACR_RXDMAE 0x1 /* RXDMAE: Transmit DMA enable */ #define SSP_DMACR_TXDMAE 0x2 typedef enum { SSP0_NUM = 0x0, SSP1_NUM = 0x1 } ssp_num_t; /* * SSP Control Register 0 */ /* SSP Data Size Bits 0 to 3 */ typedef enum { SSP_DATA_4BITS = 0x3, SSP_DATA_5BITS = 0x4, SSP_DATA_6BITS = 0x5, SSP_DATA_7BITS = 0x6, SSP_DATA_8BITS = 0x7, SSP_DATA_9BITS = 0x8, SSP_DATA_10BITS = 0x9, SSP_DATA_11BITS = 0xA, SSP_DATA_12BITS = 0xB, SSP_DATA_13BITS = 0xC, SSP_DATA_14BITS = 0xD, SSP_DATA_15BITS = 0xE, SSP_DATA_16BITS = 0xF } ssp_datasize_t; /* SSP Frame Format/Type Bits 4 & 5 */ typedef enum { SSP_FRAME_SPI = 0x00, SSP_FRAME_TI = BIT4, SSP_FRAM_MICROWIRE = BIT5 } ssp_frame_format_t; /* Clock Out Polarity / Clock Out Phase Bits Bits 6 & 7 */ typedef enum { SSP_CPOL_0_CPHA_0 = 0x0, SSP_CPOL_1_CPHA_0 = BIT6, SSP_CPOL_0_CPHA_1 = BIT7, SSP_CPOL_1_CPHA_1 = (BIT6|BIT7) } ssp_cpol_cpha_t; /* * SSP Control Register 1 */ /* SSP Mode Bit0 */ typedef enum { SSP_MODE_NORMAL = 0x0, SSP_MODE_LOOPBACK = BIT0 } ssp_mode_t; /* SSP Enable Bit1 */ #define SSP_ENABLE BIT1 /* SSP Master/Slave Mode Bit2 */ typedef enum { SSP_MASTER = 0x0, SSP_SLAVE = BIT2 } ssp_master_slave_t; /* * SSP Slave Output Disable Bit3 * Slave Output Disable. This bit is relevant only in slave mode * (MS = 1). If it is 1, this blocks this SSP controller from driving the * transmit data line (MISO). */ typedef enum { SSP_SLAVE_OUT_ENABLE = 0x0, SSP_SLAVE_OUT_DISABLE = BIT3 } ssp_slave_option_t; /* This option is relevant only in slave mode */ BEGIN_DECLS void ssp_disable(ssp_num_t ssp_num); /* * SSP Init * clk_prescale shall be in range 2 to 254 (even number only). * Clock computation: PCLK / (CPSDVSR * [SCR+1]) => CPSDVSR=clk_prescale, * SCR=serial_clock_rate */ void ssp_init(ssp_num_t ssp_num, ssp_datasize_t data_size, ssp_frame_format_t frame_format, ssp_cpol_cpha_t cpol_cpha_format, uint8_t serial_clock_rate, uint8_t clk_prescale, ssp_mode_t mode, ssp_master_slave_t master_slave, ssp_slave_option_t slave_option); uint16_t ssp_transfer(ssp_num_t ssp_num, uint16_t data); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/timer.h ================================================ /** @defgroup timer_defines Timer @brief Defined Constants and Types for the LPC43xx timer @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_TIMER_H #define LPC43XX_TIMER_H /**@{*/ #include #include /* --- Convenience macros -------------------------------------------------- */ /* Timer base addresses */ #define TIMER0 TIMER0_BASE #define TIMER1 TIMER1_BASE #define TIMER2 TIMER2_BASE #define TIMER3 TIMER3_BASE /* --- Timer registers ----------------------------------------------------- */ /* Interrupt Register */ #define TIMER_IR(timer) MMIO32(timer + 0x000) #define TIMER0_IR TIMER_IR(TIMER0) #define TIMER1_IR TIMER_IR(TIMER1) #define TIMER2_IR TIMER_IR(TIMER2) #define TIMER3_IR TIMER_IR(TIMER3) /* Timer Control Register */ #define TIMER_TCR(timer) MMIO32(timer + 0x004) #define TIMER0_TCR TIMER_TCR(TIMER0) #define TIMER1_TCR TIMER_TCR(TIMER1) #define TIMER2_TCR TIMER_TCR(TIMER2) #define TIMER3_TCR TIMER_TCR(TIMER3) /* Timer Counter */ #define TIMER_TC(timer) MMIO32(timer + 0x008) #define TIMER0_TC TIMER_TC(TIMER0) #define TIMER1_TC TIMER_TC(TIMER1) #define TIMER2_TC TIMER_TC(TIMER2) #define TIMER3_TC TIMER_TC(TIMER3) /* Prescale Register */ #define TIMER_PR(timer) MMIO32(timer + 0x00C) #define TIMER0_PR TIMER_PR(TIMER0) #define TIMER1_PR TIMER_PR(TIMER1) #define TIMER2_PR TIMER_PR(TIMER2) #define TIMER3_PR TIMER_PR(TIMER3) /* Prescale Counter */ #define TIMER_PC(timer) MMIO32(timer + 0x010) #define TIMER0_PC TIMER_PC(TIMER0) #define TIMER1_PC TIMER_PC(TIMER1) #define TIMER2_PC TIMER_PC(TIMER2) #define TIMER3_PC TIMER_PC(TIMER3) /* Match Control Register */ #define TIMER_MCR(timer) MMIO32(timer + 0x014) #define TIMER0_MCR TIMER_MCR(TIMER0) #define TIMER1_MCR TIMER_MCR(TIMER1) #define TIMER2_MCR TIMER_MCR(TIMER2) #define TIMER3_MCR TIMER_MCR(TIMER3) /* Match Register 0 */ #define TIMER_MR0(timer) MMIO32(timer + 0x018) #define TIMER0_MR0 TIMER_MR0(TIMER0) #define TIMER1_MR0 TIMER_MR0(TIMER1) #define TIMER2_MR0 TIMER_MR0(TIMER2) #define TIMER3_MR0 TIMER_MR0(TIMER3) /* Match Register 1 */ #define TIMER_MR1(timer) MMIO32(timer + 0x01C) #define TIMER0_MR1 TIMER_MR1(TIMER0) #define TIMER1_MR1 TIMER_MR1(TIMER1) #define TIMER2_MR1 TIMER_MR1(TIMER2) #define TIMER3_MR1 TIMER_MR1(TIMER3) /* Match Register 2 */ #define TIMER_MR2(timer) MMIO32(timer + 0x020) #define TIMER0_MR2 TIMER_MR2(TIMER0) #define TIMER1_MR2 TIMER_MR2(TIMER1) #define TIMER2_MR2 TIMER_MR2(TIMER2) #define TIMER3_MR2 TIMER_MR2(TIMER3) /* Match Register 3 */ #define TIMER_MR3(timer) MMIO32(timer + 0x024) #define TIMER0_MR3 TIMER_MR3(TIMER0) #define TIMER1_MR3 TIMER_MR3(TIMER1) #define TIMER2_MR3 TIMER_MR3(TIMER2) #define TIMER3_MR3 TIMER_MR3(TIMER3) /* Capture Control Register */ #define TIMER_CCR(timer) MMIO32(timer + 0x028) #define TIMER0_CCR TIMER_CCR(TIMER0) #define TIMER1_CCR TIMER_CCR(TIMER1) #define TIMER2_CCR TIMER_CCR(TIMER2) #define TIMER3_CCR TIMER_CCR(TIMER3) /* Capture Register 0 */ #define TIMER_CR0(timer) MMIO32(timer + 0x02C) #define TIMER0_CR0 TIMER_CR0(TIMER0) #define TIMER1_CR0 TIMER_CR0(TIMER1) #define TIMER2_CR0 TIMER_CR0(TIMER2) #define TIMER3_CR0 TIMER_CR0(TIMER3) /* Capture Register 1 */ #define TIMER_CR1(timer) MMIO32(timer + 0x030) #define TIMER0_CR1 TIMER_CR1(TIMER0) #define TIMER1_CR1 TIMER_CR1(TIMER1) #define TIMER2_CR1 TIMER_CR1(TIMER2) #define TIMER3_CR1 TIMER_CR1(TIMER3) /* Capture Register 2 */ #define TIMER_CR2(timer) MMIO32(timer + 0x034) #define TIMER0_CR2 TIMER_CR2(TIMER0) #define TIMER1_CR2 TIMER_CR2(TIMER1) #define TIMER2_CR2 TIMER_CR2(TIMER2) #define TIMER3_CR2 TIMER_CR2(TIMER3) /* Capture Register 3 */ #define TIMER_CR3(timer) MMIO32(timer + 0x038) #define TIMER0_CR3 TIMER_CR3(TIMER0) #define TIMER1_CR3 TIMER_CR3(TIMER1) #define TIMER2_CR3 TIMER_CR3(TIMER2) #define TIMER3_CR3 TIMER_CR3(TIMER3) /* External Match Register */ #define TIMER_EMR(timer) MMIO32(timer + 0x03C) #define TIMER0_EMR TIMER_EMR(TIMER0) #define TIMER1_EMR TIMER_EMR(TIMER1) #define TIMER2_EMR TIMER_EMR(TIMER2) #define TIMER3_EMR TIMER_EMR(TIMER3) /* Count Control Register */ #define TIMER_CTCR(timer) MMIO32(timer + 0x070) #define TIMER0_CTCR TIMER_CTCR(TIMER0) #define TIMER1_CTCR TIMER_CTCR(TIMER1) #define TIMER2_CTCR TIMER_CTCR(TIMER2) #define TIMER3_CTCR TIMER_CTCR(TIMER3) /* --- TIMERx_IR values ----------------------------------------------------- */ #define TIMER_IR_MR0INT (1 << 0) #define TIMER_IR_MR1INT (1 << 1) #define TIMER_IR_MR2INT (1 << 2) #define TIMER_IR_MR3INT (1 << 3) #define TIMER_IR_CR0INT (1 << 4) #define TIMER_IR_CR1INT (1 << 5) #define TIMER_IR_CR2INT (1 << 6) #define TIMER_IR_CR3INT (1 << 7) /* --- TIMERx_TCR values --------------------------------------------------- */ #define TIMER_TCR_CEN (1 << 0) #define TIMER_TCR_CRST (1 << 1) /* --- TIMERx_MCR values --------------------------------------------------- */ #define TIMER_MCR_MR0I (1 << 0) #define TIMER_MCR_MR0R (1 << 1) #define TIMER_MCR_MR0S (1 << 2) #define TIMER_MCR_MR1I (1 << 3) #define TIMER_MCR_MR1R (1 << 4) #define TIMER_MCR_MR1S (1 << 5) #define TIMER_MCR_MR2I (1 << 6) #define TIMER_MCR_MR2R (1 << 7) #define TIMER_MCR_MR2S (1 << 8) #define TIMER_MCR_MR3I (1 << 9) #define TIMER_MCR_MR3R (1 << 10) #define TIMER_MCR_MR3S (1 << 11) /* --- TIMERx_MCR values --------------------------------------------------- */ #define TIMER_CCR_CAP0RE (1 << 0) #define TIMER_CCR_CAP0FE (1 << 1) #define TIMER_CCR_CAP0I (1 << 2) #define TIMER_CCR_CAP1RE (1 << 3) #define TIMER_CCR_CAP1FE (1 << 4) #define TIMER_CCR_CAP1I (1 << 5) #define TIMER_CCR_CAP2RE (1 << 6) #define TIMER_CCR_CAP2FE (1 << 7) #define TIMER_CCR_CAP2I (1 << 8) #define TIMER_CCR_CAP3RE (1 << 9) #define TIMER_CCR_CAP3FE (1 << 10) #define TIMER_CCR_CAP3I (1 << 11) /* --- TIMERx_EMR values --------------------------------------------------- */ #define TIMER_EMR_EM0 (1 << 0) #define TIMER_EMR_EM1 (1 << 1) #define TIMER_EMR_EM2 (1 << 2) #define TIMER_EMR_EM3 (1 << 3) #define TIMER_EMR_EMC0_SHIFT 4 #define TIMER_EMR_EMC0_MASK (0x3 << TIMER_EMR_EMC0_SHIFT) #define TIMER_EMR_EMC1_SHIFT 6 #define TIMER_EMR_EMC1_MASK (0x3 << TIMER_EMR_EMC1_SHIFT) #define TIMER_EMR_EMC2_SHIFT 8 #define TIMER_EMR_EMC2_MASK (0x3 << TIMER_EMR_EMC2_SHIFT) #define TIMER_EMR_EMC3_SHIFT 10 #define TIMER_EMR_EMC3_MASK (0x3 << TIMER_EMR_EMC3_SHIFT) #define TIMER_EMR_EMC_NOTHING 0x0 #define TIMER_EMR_EMC_CLEAR 0x1 #define TIMER_EMR_EMC_SET 0x2 #define TIMER_EMR_EMC_TOGGLE 0x3 /* --- TIMERx_CTCR values -------------------------------------------------- */ #define TIMER_CTCR_MODE_TIMER (0x0 << 0) #define TIMER_CTCR_MODE_COUNTER_RISING (0x1 << 0) #define TIMER_CTCR_MODE_COUNTER_FALLING (0x2 << 0) #define TIMER_CTCR_MODE_COUNTER_BOTH (0x3 << 0) #define TIMER_CTCR_MODE_MASK (0x3 << 0) #define TIMER_CTCR_CINSEL_CAPN_0 (0x0 << 2) #define TIMER_CTCR_CINSEL_CAPN_1 (0x1 << 2) #define TIMER_CTCR_CINSEL_CAPN_2 (0x2 << 2) #define TIMER_CTCR_CINSEL_CAPN_3 (0x3 << 2) #define TIMER_CTCR_CINSEL_MASK (0x3 << 2) /* --- TIMER function prototypes ------------------------------------------- */ BEGIN_DECLS void timer_reset(uint32_t timer_peripheral); void timer_enable_counter(uint32_t timer_peripheral); void timer_disable_counter(uint32_t timer_peripheral); uint32_t timer_get_counter(uint32_t timer_peripheral); void timer_set_counter(uint32_t timer_peripheral, uint32_t count); uint32_t timer_get_prescaler(uint32_t timer_peripheral); void timer_set_prescaler(uint32_t timer_peripheral, uint32_t prescaler); void timer_set_mode(uint32_t timer_peripheral, uint32_t mode); void timer_set_count_input(uint32_t timer_peripheral, uint32_t input); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/uart.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_UART_H #define LPC43XX_UART_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* UART port base addresses (for convenience) */ #define UART0 USART0_BASE /* APB0 */ #define UART1 UART1_BASE /* APB0 */ #define UART2 USART2_BASE /* APB2 */ #define UART3 USART3_BASE /* APB2 */ /* --- UART registers ------------------------------------------------------- */ /* Receiver Buffer Register (DLAB=0) Read Only */ #define UART_RBR(port) MMIO32(port + 0x000) /* 8bits */ /* Transmitter Holding Register (DLAB=0) Write Only */ #define UART_THR(port) MMIO32(port + 0x000) /* 8bits */ /* Divisor Latch LSB Register (DLAB=1) */ #define UART_DLL(port) MMIO32(port + 0x000) /* 8bits */ /* Divisor Latch MSB Register (DLAB=1) */ #define UART_DLM(port) MMIO32(port + 0x004) /* 8bits */ /* Interrupt Enable Register (DLAB=0) */ #define UART_IER(port) MMIO32(port + 0x004) /* Interrupt ID Register Read Only */ #define UART_IIR(port) MMIO32(port + 0x008) /* FIFO Control Register Write Only */ #define UART_FCR(port) MMIO32(port + 0x008) /* Line Control Register */ #define UART_LCR(port) MMIO32(port + 0x00C) /* MCR only for UART1 */ /* Line Status Register */ #define UART_LSR(port) MMIO32(port + 0x014) /* Auto Baud Control Register */ #define UART_ACR(port) MMIO32(port + 0x020) /* IrDA Control Register only for UART0/2/3 */ #define UART_ICR(port) MMIO32(port + 0x024) /* Fractional Divider Register */ #define UART_FDR(port) MMIO32(port + 0x028) /* Oversampling Register only for UART0/2/3 */ #define UART_OSR(port) MMIO32(port + 0x02C) /* Half-Duplex enable Register only for UART0/2/3 */ #define UART_HDEN(port) MMIO32(port + 0x040) /* Smart card Interface Register Only for UART0/2/3 */ #define UART_SCICTRL(port) MMIO32(port + 0x048) /* RS-485/EIA-485 Control Register */ #define UART_RS485CTRL(port) MMIO32(port + 0x04C) /* RS-485/EIA-485 Address Match Register */ #define UART_RS485ADRMATCH(port) MMIO32(port + 0x050) /* RS-485/EIA-485 Direction Control Delay Register */ #define UART_RS485DLY(port) MMIO32(port + 0x054) /* Synchronous Mode Control Register only for UART0/2/3 */ #define UART_SYNCCTRL(port) MMIO32(port + 0x058) /* Transmit Enable Register */ #define UART_TER(port) MMIO32(port + 0x05C) /* --------------------- BIT DEFINITIONS ----------------------------------- */ /*********************************************************************** * Macro defines for Macro defines for UARTn Receiver Buffer Register **********************************************************************/ /* UART Received Buffer mask bit (8 bits) */ #define UART_RBR_MASKBIT ((uint8_t)0xFF) /*********************************************************************** * Macro defines for Macro defines for UARTn Transmit Holding Register **********************************************************************/ /* UART Transmit Holding mask bit (8 bits) */ #define UART_THR_MASKBIT ((uint8_t)0xFF) /*********************************************************************** * Macro defines for Macro defines for UARTn Divisor Latch LSB register **********************************************************************/ /* Macro for loading least significant halfs of divisors */ #define UART_LOAD_DLL(div) ((div) & 0xFF) /* Divisor latch LSB bit mask */ #define UART_DLL_MASKBIT ((uint8_t)0xFF) /*********************************************************************** * Macro defines for Macro defines for UARTn Divisor Latch MSB register **********************************************************************/ /* Divisor latch MSB bit mask */ #define UART_DLM_MASKBIT ((uint8_t)0xFF) /* Macro for loading most significant halfs of divisors */ #define UART_LOAD_DLM(div) (((div) >> 8) & 0xFF) /*********************************************************************** * Macro defines for Macro defines for UART interrupt enable register **********************************************************************/ /* RBR Interrupt enable*/ #define UART_IER_RBRINT_EN (1 << 0) /* THR Interrupt enable*/ #define UART_IER_THREINT_EN (1 << 1) /* RX line status interrupt enable*/ #define UART_IER_RLSINT_EN (1 << 2) /* Modem status interrupt enable */ #define UART1_IER_MSINT_EN (1 << 3) /* CTS1 signal transition interrupt enable */ #define UART1_IER_CTSINT_EN (1 << 7) /* Enables the end of auto-baud interrupt */ #define UART_IER_ABEOINT_EN (1 << 8) /* Enables the auto-baud time-out interrupt */ #define UART_IER_ABTOINT_EN (1 << 9) /* UART interrupt enable register bit mask */ #define UART_IER_BITMASK ((uint32_t)(0x307)) /* UART1 interrupt enable register bit mask */ #define UART1_IER_BITMASK ((uint32_t)(0x38F)) /********************************************************************** * Macro defines for Macro defines for UART interrupt identification register **********************************************************************/ /* Interrupt Status - Active low */ #define UART_IIR_INTSTAT_PEND (1 << 0) /* Interrupt identification: Modem interrupt*/ #define UART1_IIR_INTID_MODEM (0 << 1) /* Interrupt identification: THRE interrupt*/ #define UART_IIR_INTID_THRE (1 << 1) /* Interrupt identification: Receive data available*/ #define UART_IIR_INTID_RDA (2 << 1) /* Interrupt identification: Receive line status*/ #define UART_IIR_INTID_RLS (3 << 1) /* Interrupt identification: Character time-out indicator*/ #define UART_IIR_INTID_CTI (6 << 1) /* Interrupt identification: Interrupt ID mask */ #define UART_IIR_INTID_MASK (7 << 1) /* These bits are equivalent to UnFCR[0] */ #define UART_IIR_FIFO_EN (3 << 6) /* End of auto-baud interrupt */ #define UART_IIR_ABEO_INT (1 << 8) /* Auto-baud time-out interrupt */ #define UART_IIR_ABTO_INT (1 << 9) /* UART interrupt identification register bit mask */ #define UART_IIR_BITMASK ((uint32_t)(0x3CF)) /********************************************************************** * Macro defines for Macro defines for UART FIFO control register **********************************************************************/ /* UART FIFO enable */ #define UART_FCR_FIFO_EN (1 << 0) /* UART FIFO RX reset */ #define UART_FCR_RX_RS (1 << 1) /* UART FIFO TX reset */ #define UART_FCR_TX_RS (1 << 2) /* UART DMA mode selection */ #define UART_FCR_DMAMODE_SEL (1 << 3) /* UART FIFO trigger level 0: 1 character */ #define UART_FCR_TRG_LEV0 (0 << 6) /* UART FIFO trigger level 1: 4 character */ #define UART_FCR_TRG_LEV1 (1 << 6) /* UART FIFO trigger level 2: 8 character */ #define UART_FCR_TRG_LEV2 (2 << 6) /* UART FIFO trigger level 3: 14 character */ #define UART_FCR_TRG_LEV3 (3 << 6) /* UART FIFO control bit mask */ #define UART_FCR_BITMASK ((uint8_t)(0xCF)) #define UART_TX_FIFO_SIZE (16) /********************************************************************** * Macro defines for Macro defines for UART line control register **********************************************************************/ /* UART 5 bit data mode */ #define UART_LCR_WLEN5 (0 << 0) /* UART 6 bit data mode */ #define UART_LCR_WLEN6 (1 << 0) /* UART 7 bit data mode */ #define UART_LCR_WLEN7 (2 << 0) /* UART 8 bit data mode */ #define UART_LCR_WLEN8 (3 << 0) /* UART One Stop Bits */ #define UART_LCR_ONE_STOPBIT (0 << 2) /* UART Two Stop Bits */ #define UART_LCR_TWO_STOPBIT (1 << 2) /* UART Parity Disabled / No Parity */ #define UART_LCR_NO_PARITY (0 << 3) /* UART Parity Enable */ #define UART_LCR_PARITY_EN (1 << 3) /* UART Odd Parity Select */ #define UART_LCR_PARITY_ODD (0 << 4) /* UART Even Parity Select */ #define UART_LCR_PARITY_EVEN (1 << 4) /* UART force 1 stick parity */ #define UART_LCR_PARITY_SP_1 (1 << 5) /* UART force 0 stick parity */ #define UART_LCR_PARITY_SP_0 ((1 << 5) | (1 << 4)) /* UART Transmission Break enable */ #define UART_LCR_BREAK_EN (1 << 6) /* UART Divisor Latches Access bit enable */ #define UART_LCR_DLAB_EN (1 << 7) /* UART line control bit mask */ #define UART_LCR_BITMASK ((uint8_t)(0xFF)) /********************************************************************** * Macro defines for Macro defines for UART line status register **********************************************************************/ /* Line status register: Receive data ready */ #define UART_LSR_RDR (1 << 0) /* Line status register: Overrun error */ #define UART_LSR_OE (1 << 1) /* Line status register: Parity error */ #define UART_LSR_PE (1 << 2) /* Line status register: Framing error */ #define UART_LSR_FE (1 << 3) /* Line status register: Break interrupt */ #define UART_LSR_BI (1 << 4) /* Line status register: Transmit holding register empty */ #define UART_LSR_THRE (1 << 5) /* Line status register: Transmitter empty */ #define UART_LSR_TEMT (1 << 6) /* Error in RX FIFO */ #define UART_LSR_RXFE (1 << 7) /* UART Line status bit mask */ #define UART_LSR_BITMASK ((uint8_t)(0xFF)) #define UART_LSR_ERROR_MASK \ (UART_LSR_OE | UART_LSR_PE | UART_LSR_FE | UART_LSR_BI | UART_LSR_RXFE) /********************************************************************** * Macro defines for Macro defines for UART Scratch Pad Register **********************************************************************/ /* UART Scratch Pad bit mask */ #define UART_SCR_BIMASK ((uint8_t)(0xFF)) /*********************************************************************** * Macro defines for Macro defines for UART Auto baudrate control register **********************************************************************/ /* UART Auto-baud start */ #define UART_ACR_START (1 << 0) /* UART Auto baudrate Mode 1 */ #define UART_ACR_MODE (1 << 1) /* UART Auto baudrate restart */ #define UART_ACR_AUTO_RESTART (1 << 2) /* UART End of auto-baud interrupt clear */ #define UART_ACR_ABEOINT_CLR (1 << 8) /* UART Auto-baud time-out interrupt clear */ #define UART_ACR_ABTOINT_CLR (1 << 9) /* UART Auto Baudrate register bit mask */ #define UART_ACR_BITMASK ((uint32_t)(0x307)) /********************************************************************* * Macro defines for Macro defines for UART IrDA control register **********************************************************************/ /* IrDA mode enable */ #define UART_ICR_IRDAEN (1 << 0) /* IrDA serial input inverted */ #define UART_ICR_IRDAINV (1 << 1) /* IrDA fixed pulse width mode */ #define UART_ICR_FIXPULSE_EN (1 << 2) /* PulseDiv - Configures the pulse when FixPulseEn = 1 */ #define UART_ICR_PULSEDIV(n) ((uint32_t)((n&0x07)<<3)) /* UART IRDA bit mask */ #define UART_ICR_BITMASK ((uint32_t)(0x3F)) /********************************************************************** * Macro defines for Macro defines for UART half duplex register **********************************************************************/ /* enable half-duplex mode*/ #define UART_HDEN_HDEN (1 << 0) /********************************************************************** * Macro defines for Macro defines for UART smart card interface control register **********************************************************************/ /* enable asynchronous half-duplex smart card interface*/ #define UART_SCICTRL_SCIEN (1 << 0) /* NACK response is inhibited*/ #define UART_SCICTRL_NACKDIS (1 << 1) /* ISO7816-3 protocol T1 is selected*/ #define UART_SCICTRL_PROTSEL_T1 (1 << 2) /* number of retransmission*/ #define UART_SCICTRL_TXRETRY(n) ((uint32_t)((n&0x07)<<5)) /* Extra guard time*/ #define UART_SCICTRL_GUARDTIME(n) ((uint32_t)((n&0xFF)<<8)) /********************************************************************* * Macro defines for Macro defines for UART synchronous control register **********************************************************************/ /* enable synchronous mode*/ #define UART_SYNCCTRL_SYNC (1 << 0) /* synchronous master mode*/ #define UART_SYNCCTRL_CSRC_MASTER (1 << 1) /* sample on falling edge*/ #define UART_SYNCCTRL_FES (1 << 2) /* to be defined*/ #define UART_SYNCCTRL_TSBYPASS (1 << 3) /* continuous running clock enable (master mode only) */ #define UART_SYNCCTRL_CSCEN (1 << 4) /* Do not send start/stop bit */ #define UART_SYNCCTRL_NOSTARTSTOP (1 << 5) /* stop continuous clock */ #define UART_SYNCCTRL_CCCLR (1 << 6) /********************************************************************* * Macro defines for Macro defines for UART Fractional divider register **********************************************************************/ /* Baud-rate generation pre-scaler divisor */ #define UART_FDR_DIVADDVAL(n) ((uint32_t)(n&0x0F)) /* Baud-rate pre-scaler multiplier value */ #define UART_FDR_MULVAL(n) ((uint32_t)((n<<4)&0xF0)) /* UART Fractional Divider register bit mask */ #define UART_FDR_BITMASK ((uint32_t)(0xFF)) /********************************************************************* * Macro defines for Macro defines for UART Tx Enable register **********************************************************************/ #define UART_TER_TXEN (1 << 0) /* Transmit enable bit */ /********************************************************************** * Macro defines for Macro defines for UART FIFO Level register **********************************************************************/ /* Reflects the current level of the UART receiver FIFO */ #define UART_FIFOLVL_RX(n) ((uint32_t)(n&0x0F)) /* Reflects the current level of the UART transmitter FIFO */ #define UART_FIFOLVL_TX(n) ((uint32_t)((n>>8)&0x0F)) /* UART FIFO Level Register bit mask */ #define UART_FIFOLVL_BITMASK ((uint32_t)(0x0F0F)) /********************************************************************* * UART enum **********************************************************************/ /* * UART Databit type definitions */ typedef enum { UART_DATABIT_5 = UART_LCR_WLEN5,/* UART 5 bit data mode */ UART_DATABIT_6 = UART_LCR_WLEN6,/* UART 6 bit data mode */ UART_DATABIT_7 = UART_LCR_WLEN7,/* UART 7 bit data mode */ UART_DATABIT_8 = UART_LCR_WLEN8/* UART 8 bit data mode */ } uart_databit_t; /* * UART Stop bit type definitions */ typedef enum { /* UART 1 Stop Bits Select */ UART_STOPBIT_1 = UART_LCR_ONE_STOPBIT, /* UART 2 Stop Bits Select */ UART_STOPBIT_2 = UART_LCR_TWO_STOPBIT } uart_stopbit_t; /* * UART Parity type definitions */ typedef enum { /* No parity */ UART_PARITY_NONE = UART_LCR_NO_PARITY, /* Odd parity */ UART_PARITY_ODD = (UART_LCR_PARITY_ODD | UART_LCR_PARITY_EN), /* Even parity */ UART_PARITY_EVEN = (UART_LCR_PARITY_EVEN | UART_LCR_PARITY_EN), /* Forced 1 stick parity */ UART_PARITY_SP_1 = (UART_LCR_PARITY_SP_1 | UART_LCR_PARITY_EN), /* Forced 0 stick parity */ UART_PARITY_SP_0 = (UART_LCR_PARITY_SP_0 | UART_LCR_PARITY_EN) } uart_parity_t; typedef enum { UART0_NUM = UART0, UART1_NUM = UART1, UART2_NUM = UART2, UART3_NUM = UART3 } uart_num_t; typedef enum { UART_NO_ERROR = 0, UART_TIMEOUT_ERROR = 1 } uart_error_t; typedef enum { UART_RX_NO_DATA = 0, UART_RX_DATA_READY = 1, UART_RX_DATA_ERROR = 2 } uart_rx_data_ready_t; /* function prototypes */ BEGIN_DECLS /* Init UART and set PLL1 as clock source (PCLK) */ void uart_init(uart_num_t uart_num, uart_databit_t data_nb_bits, uart_stopbit_t data_nb_stop, uart_parity_t data_parity, uint16_t uart_divisor, uint8_t uart_divaddval, uint8_t uart_mulval); uart_rx_data_ready_t uart_rx_data_ready(uart_num_t uart_num); uint8_t uart_read(uart_num_t uart_num); uint8_t uart_read_timeout(uart_num_t uart_num, uint32_t rx_timeout_nb_cycles, uart_error_t *error); void uart_write(uart_num_t uart_num, uint8_t data); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/usb.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_USB_H #define LPC43XX_USB_H #include #include #define BIT_MASK(base_name) \ (((1 << base_name##_WIDTH) - 1) << base_name##_SHIFT) #define BIT_ARG(base_name, x) ((x) << base_name##_SHIFT) /* USB device data structures */ /* "The software must ensure that no interface data structure reachable * by the Device controller crosses a 4kB-page boundary." */ /* --- Endpoint Transfer Descriptor (dTD) ---------------------------------- */ typedef struct usb_transfer_descriptor_t usb_transfer_descriptor_t; struct usb_transfer_descriptor_t { volatile usb_transfer_descriptor_t *next_dtd_pointer; volatile uint32_t total_bytes; volatile uint32_t buffer_pointer_page[5]; volatile uint32_t _reserved; }; #define USB_TD_NEXT_DTD_POINTER_TERMINATE_SHIFT (0) #define USB_TD_NEXT_DTD_POINTER_TERMINATE \ ((volatile usb_transfer_descriptor_t *) \ (1 << USB_TD_NEXT_DTD_POINTER_TERMINATE_SHIFT)) #define USB_TD_DTD_TOKEN_TOTAL_BYTES_SHIFT (16) #define USB_TD_DTD_TOKEN_TOTAL_BYTES_WIDTH (15) #define USB_TD_DTD_TOKEN_TOTAL_BYTES_MASK BIT_MASK(USB_TD_DTD_TOKEN_TOTAL_BYTES) #define USB_TD_DTD_TOKEN_TOTAL_BYTES(x) BIT_ARG(USB_TD_DTD_TOKEN_TOTAL_BYTES, x) #define USB_TD_DTD_TOKEN_IOC_SHIFT (15) #define USB_TD_DTD_TOKEN_IOC (1 << USB_TD_DTD_TOKEN_IOC_SHIFT) #define USB_TD_DTD_TOKEN_MULTO_SHIFT (10) #define USB_TD_DTD_TOKEN_MULTO_WIDTH (2) #define USB_TD_DTD_TOKEN_MULTO_MASK BIT_MASK(USB_TD_DTD_TOKEN_MULTO) #define USB_TD_DTD_TOKEN_MULTO(x) BIT_ARG(USB_TD_DTD_TOKEN_MULTO, x) #define USB_TD_DTD_TOKEN_STATUS_ACTIVE_SHIFT (7) #define USB_TD_DTD_TOKEN_STATUS_ACTIVE \ (1 << USB_TD_DTD_TOKEN_STATUS_ACTIVE_SHIFT) #define USB_TD_DTD_TOKEN_STATUS_HALTED_SHIFT (6) #define USB_TD_DTD_TOKEN_STATUS_HALTED \ (1 << USB_TD_DTD_TOKEN_STATUS_HALTED_SHIFT) #define USB_TD_DTD_TOKEN_STATUS_BUFFER_ERROR_SHIFT (5) #define USB_TD_DTD_TOKEN_STATUS_BUFFER_ERROR \ (1 << USB_TD_DTD_TOKEN_STATUS_BUFFER_ERROR_SHIFT) #define USB_TD_DTD_TOKEN_STATUS_TRANSACTION_ERROR_SHIFT (3) #define USB_TD_DTD_TOKEN_STATUS_TRANSACTION_ERROR \ (1 << USB_TD_DTD_TOKEN_STATUS_TRANSACTION_ERROR_SHIFT) /* --- Endpoint Queue Head (dQH) ------------------------------------------- */ /* - must be aligned on 64-byte boundaries. */ typedef struct { volatile uint32_t capabilities; volatile usb_transfer_descriptor_t *current_dtd_pointer; volatile usb_transfer_descriptor_t *next_dtd_pointer; volatile uint32_t total_bytes; volatile uint32_t buffer_pointer_page[5]; volatile uint32_t _reserved_0; volatile uint8_t setup[8]; volatile uint32_t _reserved_1[4]; } usb_queue_head_t; #define USB_QH_CAPABILITIES_IOS_SHIFT (15) #define USB_QH_CAPABILITIES_IOS (1 << USB_QH_CAPABILITIES_IOS_SHIFT) #define USB_QH_CAPABILITIES_MPL_SHIFT (16) #define USB_QH_CAPABILITIES_MPL_WIDTH (11) #define USB_QH_CAPABILITIES_MPL_MASK BIT_MASK(USB_QH_CAPABILITIES_MPL) #define USB_QH_CAPABILITIES_MPL(x) BIT_ARG(USB_QH_CAPABILITIES_MPL, x) #define USB_QH_CAPABILITIES_ZLT_SHIFT (29) #define USB_QH_CAPABILITIES_ZLT (1 << USB_QH_CAPABILITIES_ZLT_SHIFT) #define USB_QH_CAPABILITIES_MULT_SHIFT (30) #define USB_QH_CAPABILITIES_MULT_WIDTH (2) #define USB_QH_CAPABILITIES_MULT_MASK BIT_MASK(USB_QH_CAPABILITIES_MULT) #define USB_QH_CAPABILITIES_MULT(x) BIT_ARG(USB_QH_CAPABILITIES_MULT, x) /* --- USB0 registers ------------------------------------------------------ */ /* Device/host capability registers */ /* Capability register length */ #define USB0_CAPLENGTH MMIO32(USB0_BASE + 0x100) /* Host controller structural parameters */ #define USB0_HCSPARAMS MMIO32(USB0_BASE + 0x104) /* Host controller capability parameters */ #define USB0_HCCPARAMS MMIO32(USB0_BASE + 0x108) /* Device interface version number */ #define USB0_DCIVERSION MMIO32(USB0_BASE + 0x120) /* Device controller capability parameters */ #define USB0_DCCPARAMS MMIO32(USB0_BASE + 0x124) /* Device/host operational registers */ /* USB command (device mode) */ #define USB0_USBCMD_D MMIO32(USB0_BASE + 0x140) /* USB command (host mode) */ #define USB0_USBCMD_H MMIO32(USB0_BASE + 0x140) /* USB status (device mode) */ #define USB0_USBSTS_D MMIO32(USB0_BASE + 0x144) /* USB status (host mode) */ #define USB0_USBSTS_H MMIO32(USB0_BASE + 0x144) /* USB interrupt enable (device mode) */ #define USB0_USBINTR_D MMIO32(USB0_BASE + 0x148) /* USB interrupt enable (host mode) */ #define USB0_USBINTR_H MMIO32(USB0_BASE + 0x148) /* USB frame index (device mode) */ #define USB0_FRINDEX_D MMIO32(USB0_BASE + 0x14C) /* USB frame index (host mode) */ #define USB0_FRINDEX_H MMIO32(USB0_BASE + 0x14C) /* USB device address (device mode) */ #define USB0_DEVICEADDR MMIO32(USB0_BASE + 0x154) /* Frame list base address (host mode) */ #define USB0_PERIODICLISTBASE MMIO32(USB0_BASE + 0x154) /* Address of endpoint list in memory */ #define USB0_ENDPOINTLISTADDR MMIO32(USB0_BASE + 0x158) /* Asynchronous list address */ #define USB0_ASYNCLISTADDR MMIO32(USB0_BASE + 0x158) /* Asynchronous buffer status for embedded TT (host mode) */ #define USB0_TTCTRL MMIO32(USB0_BASE + 0x15C) /* Programmable burst size */ #define USB0_BURSTSIZE MMIO32(USB0_BASE + 0x160) /* Host transmit pre-buffer packet tuning (host mode) */ #define USB0_TXFILLTUNING MMIO32(USB0_BASE + 0x164) /* Length of virtual frame */ #define USB0_BINTERVAL MMIO32(USB0_BASE + 0x174) /* Endpoint NAK (device mode) */ #define USB0_ENDPTNAK MMIO32(USB0_BASE + 0x178) /* Endpoint NAK Enable (device mode) */ #define USB0_ENDPTNAKEN MMIO32(USB0_BASE + 0x17C) /* Port 1 status/control (device mode) */ #define USB0_PORTSC1_D MMIO32(USB0_BASE + 0x184) /* Port 1 status/control (host mode) */ #define USB0_PORTSC1_H MMIO32(USB0_BASE + 0x184) /* OTG status and control */ #define USB0_OTGSC MMIO32(USB0_BASE + 0x1A4) /* USB device mode (device mode) */ #define USB0_USBMODE_D MMIO32(USB0_BASE + 0x1A8) /* USB device mode (host mode) */ #define USB0_USBMODE_H MMIO32(USB0_BASE + 0x1A8) /* Device endpoint registers */ /* Endpoint setup status */ #define USB0_ENDPTSETUPSTAT MMIO32(USB0_BASE + 0x1AC) /* Endpoint initialization */ #define USB0_ENDPTPRIME MMIO32(USB0_BASE + 0x1B0) /* Endpoint de-initialization */ #define USB0_ENDPTFLUSH MMIO32(USB0_BASE + 0x1B4) /* Endpoint status */ #define USB0_ENDPTSTAT MMIO32(USB0_BASE + 0x1B8) /* Endpoint complete */ #define USB0_ENDPTCOMPLETE MMIO32(USB0_BASE + 0x1BC) /* Endpoint control */ #define USB0_ENDPTCTRL(logical_ep) MMIO32(USB0_BASE + 0x1C0 + \ (logical_ep * 4)) /* Endpoint control 0 */ #define USB0_ENDPTCTRL0 USB0_ENDPTCTRL(0) /* Endpoint control 1 */ #define USB0_ENDPTCTRL1 USB0_ENDPTCTRL(1) /* Endpoint control 2 */ #define USB0_ENDPTCTRL2 USB0_ENDPTCTRL(2) /* Endpoint control 3 */ #define USB0_ENDPTCTRL3 USB0_ENDPTCTRL(3) /* Endpoint control 4 */ #define USB0_ENDPTCTRL4 USB0_ENDPTCTRL(4) /* Endpoint control 5 */ #define USB0_ENDPTCTRL5 USB0_ENDPTCTRL(5) /* --- USB0_CAPLENGTH values ------------------------------------ */ /* CAPLENGTH: Indicates offset to add to the register base address at the beginning of the Operational Register */ #define USB0_CAPLENGTH_CAPLENGTH_SHIFT (0) #define USB0_CAPLENGTH_CAPLENGTH_MASK (0xff << USB0_CAPLENGTH_CAPLENGTH_SHIFT) #define USB0_CAPLENGTH_CAPLENGTH(x) ((x) << USB0_CAPLENGTH_CAPLENGTH_SHIFT) /* HCIVERSION: BCD encoding of the EHCI revision number supported by this host controller */ #define USB0_CAPLENGTH_HCIVERSION_SHIFT (8) #define USB0_CAPLENGTH_HCIVERSION_MASK \ (0xffff << USB0_CAPLENGTH_HCIVERSION_SHIFT) #define USB0_CAPLENGTH_HCIVERSION(x) ((x) << USB0_CAPLENGTH_HCIVERSION_SHIFT) /* --- USB0_HCSPARAMS values ------------------------------------ */ /* N_PORTS: Number of downstream ports */ #define USB0_HCSPARAMS_N_PORTS_SHIFT (0) #define USB0_HCSPARAMS_N_PORTS_MASK (0xf << USB0_HCSPARAMS_N_PORTS_SHIFT) #define USB0_HCSPARAMS_N_PORTS(x) ((x) << USB0_HCSPARAMS_N_PORTS_SHIFT) /* PPC: Port Power Control */ #define USB0_HCSPARAMS_PPC_SHIFT (4) #define USB0_HCSPARAMS_PPC (1 << USB0_HCSPARAMS_PPC_SHIFT) /* N_PCC: Number of Ports per Companion Controller */ #define USB0_HCSPARAMS_N_PCC_SHIFT (8) #define USB0_HCSPARAMS_N_PCC_MASK (0xf << USB0_HCSPARAMS_N_PCC_SHIFT) #define USB0_HCSPARAMS_N_PCC(x) ((x) << USB0_HCSPARAMS_N_PCC_SHIFT) /* N_CC: Number of Companion Controller */ #define USB0_HCSPARAMS_N_CC_SHIFT (12) #define USB0_HCSPARAMS_N_CC_MASK (0xf << USB0_HCSPARAMS_N_CC_SHIFT) #define USB0_HCSPARAMS_N_CC(x) ((x) << USB0_HCSPARAMS_N_CC_SHIFT) /* PI: Port indicators */ #define USB0_HCSPARAMS_PI_SHIFT (16) #define USB0_HCSPARAMS_PI (1 << USB0_HCSPARAMS_PI_SHIFT) /* N_PTT: Number of Ports per Transaction Translator */ #define USB0_HCSPARAMS_N_PTT_SHIFT (20) #define USB0_HCSPARAMS_N_PTT_MASK (0xf << USB0_HCSPARAMS_N_PTT_SHIFT) #define USB0_HCSPARAMS_N_PTT(x) ((x) << USB0_HCSPARAMS_N_PTT_SHIFT) /* N_TT: Number of Transaction Translators */ #define USB0_HCSPARAMS_N_TT_SHIFT (24) #define USB0_HCSPARAMS_N_TT_MASK (0xf << USB0_HCSPARAMS_N_TT_SHIFT) #define USB0_HCSPARAMS_N_TT(x) ((x) << USB0_HCSPARAMS_N_TT_SHIFT) /* --- USB0_HCCPARAMS values ------------------------------------ */ /* ADC: 64-bit Addressing Capability */ #define USB0_HCCPARAMS_ADC_SHIFT (0) #define USB0_HCCPARAMS_ADC (1 << USB0_HCCPARAMS_ADC_SHIFT) /* PFL: Programmable Frame List Flag */ #define USB0_HCCPARAMS_PFL_SHIFT (1) #define USB0_HCCPARAMS_PFL (1 << USB0_HCCPARAMS_PFL_SHIFT) /* ASP: Asynchronous Schedule Park Capability */ #define USB0_HCCPARAMS_ASP_SHIFT (2) #define USB0_HCCPARAMS_ASP (1 << USB0_HCCPARAMS_ASP_SHIFT) /* IST: Isochronous Scheduling Threshold */ #define USB0_HCCPARAMS_IST_SHIFT (4) #define USB0_HCCPARAMS_IST_MASK (0xf << USB0_HCCPARAMS_IST_SHIFT) #define USB0_HCCPARAMS_IST(x) ((x) << USB0_HCCPARAMS_IST_SHIFT) /* EECP: EHCI Extended Capabilities Pointer */ #define USB0_HCCPARAMS_EECP_SHIFT (8) #define USB0_HCCPARAMS_EECP_MASK (0xf << USB0_HCCPARAMS_EECP_SHIFT) #define USB0_HCCPARAMS_EECP(x) ((x) << USB0_HCCPARAMS_EECP_SHIFT) /* --- USB0_DCCPARAMS values ------------------------------------ */ /* DEN: Device Endpoint Number */ #define USB0_DCCPARAMS_DEN_SHIFT (0) #define USB0_DCCPARAMS_DEN_MASK (0x1f << USB0_DCCPARAMS_DEN_SHIFT) #define USB0_DCCPARAMS_DEN(x) ((x) << USB0_DCCPARAMS_DEN_SHIFT) /* DC: Device Capable */ #define USB0_DCCPARAMS_DC_SHIFT (7) #define USB0_DCCPARAMS_DC (1 << USB0_DCCPARAMS_DC_SHIFT) /* HC: Host Capable */ #define USB0_DCCPARAMS_HC_SHIFT (8) #define USB0_DCCPARAMS_HC (1 << USB0_DCCPARAMS_HC_SHIFT) /* --- USB0_USBCMD_D values ------------------------------------- */ /* RS: Run/Stop */ #define USB0_USBCMD_D_RS_SHIFT (0) #define USB0_USBCMD_D_RS (1 << USB0_USBCMD_D_RS_SHIFT) /* RST: Controller reset */ #define USB0_USBCMD_D_RST_SHIFT (1) #define USB0_USBCMD_D_RST (1 << USB0_USBCMD_D_RST_SHIFT) /* SUTW: Setup trip wire */ #define USB0_USBCMD_D_SUTW_SHIFT (13) #define USB0_USBCMD_D_SUTW (1 << USB0_USBCMD_D_SUTW_SHIFT) /* ATDTW: Add dTD trip wire */ #define USB0_USBCMD_D_ATDTW_SHIFT (14) #define USB0_USBCMD_D_ATDTW (1 << USB0_USBCMD_D_ATDTW_SHIFT) /* ITC: Interrupt threshold control */ #define USB0_USBCMD_D_ITC_SHIFT (16) #define USB0_USBCMD_D_ITC_MASK (0xff << USB0_USBCMD_D_ITC_SHIFT) #define USB0_USBCMD_D_ITC(x) ((x) << USB0_USBCMD_D_ITC_SHIFT) /* --- USB0_USBCMD_H values ------------------------------------- */ /* RS: Run/Stop */ #define USB0_USBCMD_H_RS_SHIFT (0) #define USB0_USBCMD_H_RS (1 << USB0_USBCMD_H_RS_SHIFT) /* RST: Controller reset */ #define USB0_USBCMD_H_RST_SHIFT (1) #define USB0_USBCMD_H_RST (1 << USB0_USBCMD_H_RST_SHIFT) /* FS0: Bit 0 of the Frame List Size bits */ #define USB0_USBCMD_H_FS0_SHIFT (2) #define USB0_USBCMD_H_FS0 (1 << USB0_USBCMD_H_FS0_SHIFT) /* FS1: Bit 1 of the Frame List Size bits */ #define USB0_USBCMD_H_FS1_SHIFT (3) #define USB0_USBCMD_H_FS1 (1 << USB0_USBCMD_H_FS1_SHIFT) /* PSE: This bit controls whether the host controller skips processing the periodic schedule */ #define USB0_USBCMD_H_PSE_SHIFT (4) #define USB0_USBCMD_H_PSE (1 << USB0_USBCMD_H_PSE_SHIFT) /* ASE: This bit controls whether the host controller skips processing the asynchronous schedule */ #define USB0_USBCMD_H_ASE_SHIFT (5) #define USB0_USBCMD_H_ASE (1 << USB0_USBCMD_H_ASE_SHIFT) /* IAA: This bit is used as a doorbell by software to tell the host controller to issue an interrupt the next time it advances asynchronous schedule */ #define USB0_USBCMD_H_IAA_SHIFT (6) #define USB0_USBCMD_H_IAA (1 << USB0_USBCMD_H_IAA_SHIFT) /* ASP1_0: Asynchronous schedule park mode */ #define USB0_USBCMD_H_ASP1_0_SHIFT (8) #define USB0_USBCMD_H_ASP1_0_MASK (0x3 << USB0_USBCMD_H_ASP1_0_SHIFT) #define USB0_USBCMD_H_ASP1_0(x) ((x) << USB0_USBCMD_H_ASP1_0_SHIFT) /* ASPE: Asynchronous Schedule Park Mode Enable */ #define USB0_USBCMD_H_ASPE_SHIFT (11) #define USB0_USBCMD_H_ASPE (1 << USB0_USBCMD_H_ASPE_SHIFT) /* FS2: Bit 2 of the Frame List Size bits */ #define USB0_USBCMD_H_FS2_SHIFT (15) #define USB0_USBCMD_H_FS2 (1 << USB0_USBCMD_H_FS2_SHIFT) /* ITC: Interrupt threshold control */ #define USB0_USBCMD_H_ITC_SHIFT (16) #define USB0_USBCMD_H_ITC_MASK (0xff << USB0_USBCMD_H_ITC_SHIFT) #define USB0_USBCMD_H_ITC(x) ((x) << USB0_USBCMD_H_ITC_SHIFT) /* --- USB0_USBSTS_D values ------------------------------------- */ /* UI: USB interrupt */ #define USB0_USBSTS_D_UI_SHIFT (0) #define USB0_USBSTS_D_UI (1 << USB0_USBSTS_D_UI_SHIFT) /* UEI: USB error interrupt */ #define USB0_USBSTS_D_UEI_SHIFT (1) #define USB0_USBSTS_D_UEI (1 << USB0_USBSTS_D_UEI_SHIFT) /* PCI: Port change detect */ #define USB0_USBSTS_D_PCI_SHIFT (2) #define USB0_USBSTS_D_PCI (1 << USB0_USBSTS_D_PCI_SHIFT) /* URI: USB reset received */ #define USB0_USBSTS_D_URI_SHIFT (6) #define USB0_USBSTS_D_URI (1 << USB0_USBSTS_D_URI_SHIFT) /* SRI: SOF received */ #define USB0_USBSTS_D_SRI_SHIFT (7) #define USB0_USBSTS_D_SRI (1 << USB0_USBSTS_D_SRI_SHIFT) /* SLI: DCSuspend */ #define USB0_USBSTS_D_SLI_SHIFT (8) #define USB0_USBSTS_D_SLI (1 << USB0_USBSTS_D_SLI_SHIFT) /* NAKI: NAK interrupt bit */ #define USB0_USBSTS_D_NAKI_SHIFT (16) #define USB0_USBSTS_D_NAKI (1 << USB0_USBSTS_D_NAKI_SHIFT) /* --- USB0_USBSTS_H values ------------------------------------- */ /* UI: USB interrupt */ #define USB0_USBSTS_H_UI_SHIFT (0) #define USB0_USBSTS_H_UI (1 << USB0_USBSTS_H_UI_SHIFT) /* UEI: USB error interrupt */ #define USB0_USBSTS_H_UEI_SHIFT (1) #define USB0_USBSTS_H_UEI (1 << USB0_USBSTS_H_UEI_SHIFT) /* PCI: Port change detect */ #define USB0_USBSTS_H_PCI_SHIFT (2) #define USB0_USBSTS_H_PCI (1 << USB0_USBSTS_H_PCI_SHIFT) /* FRI: Frame list roll-over */ #define USB0_USBSTS_H_FRI_SHIFT (3) #define USB0_USBSTS_H_FRI (1 << USB0_USBSTS_H_FRI_SHIFT) /* AAI: Interrupt on async advance */ #define USB0_USBSTS_H_AAI_SHIFT (5) #define USB0_USBSTS_H_AAI (1 << USB0_USBSTS_H_AAI_SHIFT) /* SRI: SOF received */ #define USB0_USBSTS_H_SRI_SHIFT (7) #define USB0_USBSTS_H_SRI (1 << USB0_USBSTS_H_SRI_SHIFT) /* HCH: HCHalted */ #define USB0_USBSTS_H_HCH_SHIFT (12) #define USB0_USBSTS_H_HCH (1 << USB0_USBSTS_H_HCH_SHIFT) /* RCL: Reclamation */ #define USB0_USBSTS_H_RCL_SHIFT (13) #define USB0_USBSTS_H_RCL (1 << USB0_USBSTS_H_RCL_SHIFT) /* PS: Periodic schedule status */ #define USB0_USBSTS_H_PS_SHIFT (14) #define USB0_USBSTS_H_PS (1 << USB0_USBSTS_H_PS_SHIFT) /* AS: Asynchronous schedule status */ #define USB0_USBSTS_H_AS_SHIFT (15) #define USB0_USBSTS_H_AS (1 << USB0_USBSTS_H_AS_SHIFT) /* UAI: USB host asynchronous interrupt (USBHSTASYNCINT) */ #define USB0_USBSTS_H_UAI_SHIFT (18) #define USB0_USBSTS_H_UAI (1 << USB0_USBSTS_H_UAI_SHIFT) /* UPI: USB host periodic interrupt (USBHSTPERINT) */ #define USB0_USBSTS_H_UPI_SHIFT (19) #define USB0_USBSTS_H_UPI (1 << USB0_USBSTS_H_UPI_SHIFT) /* --- USB0_USBINTR_D values ------------------------------------ */ /* UE: USB interrupt enable */ #define USB0_USBINTR_D_UE_SHIFT (0) #define USB0_USBINTR_D_UE (1 << USB0_USBINTR_D_UE_SHIFT) /* UEE: USB error interrupt enable */ #define USB0_USBINTR_D_UEE_SHIFT (1) #define USB0_USBINTR_D_UEE (1 << USB0_USBINTR_D_UEE_SHIFT) /* PCE: Port change detect enable */ #define USB0_USBINTR_D_PCE_SHIFT (2) #define USB0_USBINTR_D_PCE (1 << USB0_USBINTR_D_PCE_SHIFT) /* URE: USB reset enable */ #define USB0_USBINTR_D_URE_SHIFT (6) #define USB0_USBINTR_D_URE (1 << USB0_USBINTR_D_URE_SHIFT) /* SRE: SOF received enable */ #define USB0_USBINTR_D_SRE_SHIFT (7) #define USB0_USBINTR_D_SRE (1 << USB0_USBINTR_D_SRE_SHIFT) /* SLE: Sleep enable */ #define USB0_USBINTR_D_SLE_SHIFT (8) #define USB0_USBINTR_D_SLE (1 << USB0_USBINTR_D_SLE_SHIFT) /* NAKE: NAK interrupt enable */ #define USB0_USBINTR_D_NAKE_SHIFT (16) #define USB0_USBINTR_D_NAKE (1 << USB0_USBINTR_D_NAKE_SHIFT) /* --- USB0_USBINTR_H values ------------------------------------ */ /* UE: USB interrupt enable */ #define USB0_USBINTR_H_UE_SHIFT (0) #define USB0_USBINTR_H_UE (1 << USB0_USBINTR_H_UE_SHIFT) /* UEE: USB error interrupt enable */ #define USB0_USBINTR_H_UEE_SHIFT (1) #define USB0_USBINTR_H_UEE (1 << USB0_USBINTR_H_UEE_SHIFT) /* PCE: Port change detect enable */ #define USB0_USBINTR_H_PCE_SHIFT (2) #define USB0_USBINTR_H_PCE (1 << USB0_USBINTR_H_PCE_SHIFT) /* FRE: Frame list rollover enable */ #define USB0_USBINTR_H_FRE_SHIFT (3) #define USB0_USBINTR_H_FRE (1 << USB0_USBINTR_H_FRE_SHIFT) /* AAE: Interrupt on asynchronous advance enable */ #define USB0_USBINTR_H_AAE_SHIFT (5) #define USB0_USBINTR_H_AAE (1 << USB0_USBINTR_H_AAE_SHIFT) /* SRE: SOF received enable */ #define USB0_USBINTR_H_SRE_SHIFT (7) #define USB0_USBINTR_H_SRE (1 << USB0_USBINTR_H_SRE_SHIFT) /* UAIE: USB host asynchronous interrupt enable */ #define USB0_USBINTR_H_UAIE_SHIFT (18) #define USB0_USBINTR_H_UAIE (1 << USB0_USBINTR_H_UAIE_SHIFT) /* UPIA: USB host periodic interrupt enable */ #define USB0_USBINTR_H_UPIA_SHIFT (19) #define USB0_USBINTR_H_UPIA (1 << USB0_USBINTR_H_UPIA_SHIFT) /* --- USB0_FRINDEX_D values ------------------------------------ */ /* FRINDEX2_0: Current micro frame number */ #define USB0_FRINDEX_D_FRINDEX2_0_SHIFT (0) #define USB0_FRINDEX_D_FRINDEX2_0_MASK (0x7 << USB0_FRINDEX_D_FRINDEX2_0_SHIFT) #define USB0_FRINDEX_D_FRINDEX2_0(x) ((x) << USB0_FRINDEX_D_FRINDEX2_0_SHIFT) /* FRINDEX13_3: Current frame number of the last frame transmitted */ #define USB0_FRINDEX_D_FRINDEX13_3_SHIFT (3) #define USB0_FRINDEX_D_FRINDEX13_3_MASK \ (0x7ff << USB0_FRINDEX_D_FRINDEX13_3_SHIFT) #define USB0_FRINDEX_D_FRINDEX13_3(x) ((x) << USB0_FRINDEX_D_FRINDEX13_3_SHIFT) /* --- USB0_FRINDEX_H values ------------------------------------ */ /* FRINDEX2_0: Current micro frame number */ #define USB0_FRINDEX_H_FRINDEX2_0_SHIFT (0) #define USB0_FRINDEX_H_FRINDEX2_0_MASK (0x7 << USB0_FRINDEX_H_FRINDEX2_0_SHIFT) #define USB0_FRINDEX_H_FRINDEX2_0(x) ((x) << USB0_FRINDEX_H_FRINDEX2_0_SHIFT) /* FRINDEX12_3: Frame list current index */ #define USB0_FRINDEX_H_FRINDEX12_3_SHIFT (3) #define USB0_FRINDEX_H_FRINDEX12_3_MASK \ (0x3ff << USB0_FRINDEX_H_FRINDEX12_3_SHIFT) #define USB0_FRINDEX_H_FRINDEX12_3(x) ((x) << USB0_FRINDEX_H_FRINDEX12_3_SHIFT) /* --- USB0_DEVICEADDR values ----------------------------------- */ /* USBADRA: Device address advance */ #define USB0_DEVICEADDR_USBADRA_SHIFT (24) #define USB0_DEVICEADDR_USBADRA (1 << USB0_DEVICEADDR_USBADRA_SHIFT) /* USBADR: USB device address */ #define USB0_DEVICEADDR_USBADR_SHIFT (25) #define USB0_DEVICEADDR_USBADR_MASK (0x7f << USB0_DEVICEADDR_USBADR_SHIFT) #define USB0_DEVICEADDR_USBADR(x) ((x) << USB0_DEVICEADDR_USBADR_SHIFT) /* --- USB0_PERIODICLISTBASE values ----------------------------- */ /* PERBASE31_12: Base Address (Low) */ #define USB0_PERIODICLISTBASE_PERBASE31_12_SHIFT (12) #define USB0_PERIODICLISTBASE_PERBASE31_12_MASK \ (0xfffff << USB0_PERIODICLISTBASE_PERBASE31_12_SHIFT) #define USB0_PERIODICLISTBASE_PERBASE31_12(x) \ ((x) << USB0_PERIODICLISTBASE_PERBASE31_12_SHIFT) /* --- USB0_ENDPOINTLISTADDR values ----------------------------- */ /* EPBASE31_11: Endpoint list pointer (low) */ #define USB0_ENDPOINTLISTADDR_EPBASE31_11_SHIFT (11) #define USB0_ENDPOINTLISTADDR_EPBASE31_11_MASK \ (0x1fffff << USB0_ENDPOINTLISTADDR_EPBASE31_11_SHIFT) #define USB0_ENDPOINTLISTADDR_EPBASE31_11(x) \ ((x) << USB0_ENDPOINTLISTADDR_EPBASE31_11_SHIFT) /* --- USB0_ASYNCLISTADDR values -------------------------------- */ /* ASYBASE31_5: Link pointer (Low) LPL */ #define USB0_ASYNCLISTADDR_ASYBASE31_5_SHIFT (5) #define USB0_ASYNCLISTADDR_ASYBASE31_5_MASK \ (0x7ffffff << USB0_ASYNCLISTADDR_ASYBASE31_5_SHIFT) #define USB0_ASYNCLISTADDR_ASYBASE31_5(x) \ ((x) << USB0_ASYNCLISTADDR_ASYBASE31_5_SHIFT) /* --- USB0_TTCTRL values --------------------------------------- */ /* TTHA: Hub address when FS or LS device are connected directly */ #define USB0_TTCTRL_TTHA_SHIFT (24) #define USB0_TTCTRL_TTHA_MASK (0x7f << USB0_TTCTRL_TTHA_SHIFT) #define USB0_TTCTRL_TTHA(x) ((x) << USB0_TTCTRL_TTHA_SHIFT) /* --- USB0_BURSTSIZE values ------------------------------------ */ /* RXPBURST: Programmable RX burst length */ #define USB0_BURSTSIZE_RXPBURST_SHIFT (0) #define USB0_BURSTSIZE_RXPBURST_MASK (0xff << USB0_BURSTSIZE_RXPBURST_SHIFT) #define USB0_BURSTSIZE_RXPBURST(x) ((x) << USB0_BURSTSIZE_RXPBURST_SHIFT) /* TXPBURST: Programmable TX burst length */ #define USB0_BURSTSIZE_TXPBURST_SHIFT (8) #define USB0_BURSTSIZE_TXPBURST_MASK (0xff << USB0_BURSTSIZE_TXPBURST_SHIFT) #define USB0_BURSTSIZE_TXPBURST(x) ((x) << USB0_BURSTSIZE_TXPBURST_SHIFT) /* --- USB0_TXFILLTUNING values --------------------------------- */ /* TXSCHOH: FIFO burst threshold */ #define USB0_TXFILLTUNING_TXSCHOH_SHIFT (0) #define USB0_TXFILLTUNING_TXSCHOH_MASK (0xff << USB0_TXFILLTUNING_TXSCHOH_SHIFT) #define USB0_TXFILLTUNING_TXSCHOH(x) ((x) << USB0_TXFILLTUNING_TXSCHOH_SHIFT) /* TXSCHEATLTH: Scheduler health counter */ #define USB0_TXFILLTUNING_TXSCHEATLTH_SHIFT (8) #define USB0_TXFILLTUNING_TXSCHEATLTH_MASK \ (0x1f << USB0_TXFILLTUNING_TXSCHEATLTH_SHIFT) #define USB0_TXFILLTUNING_TXSCHEATLTH(x) \ ((x) << USB0_TXFILLTUNING_TXSCHEATLTH_SHIFT) /* TXFIFOTHRES: Scheduler overhead */ #define USB0_TXFILLTUNING_TXFIFOTHRES_SHIFT (16) #define USB0_TXFILLTUNING_TXFIFOTHRES_MASK \ (0x3f << USB0_TXFILLTUNING_TXFIFOTHRES_SHIFT) #define USB0_TXFILLTUNING_TXFIFOTHRES(x) \ ((x) << USB0_TXFILLTUNING_TXFIFOTHRES_SHIFT) /* --- USB0_BINTERVAL values ------------------------------------ */ /* BINT: bInterval value */ #define USB0_BINTERVAL_BINT_SHIFT (0) #define USB0_BINTERVAL_BINT_MASK (0xf << USB0_BINTERVAL_BINT_SHIFT) #define USB0_BINTERVAL_BINT(x) ((x) << USB0_BINTERVAL_BINT_SHIFT) /* --- USB0_ENDPTNAK values ------------------------------------- */ /* EPRN: Rx endpoint NAK */ #define USB0_ENDPTNAK_EPRN_SHIFT (0) #define USB0_ENDPTNAK_EPRN_MASK (0x3f << USB0_ENDPTNAK_EPRN_SHIFT) #define USB0_ENDPTNAK_EPRN(x) ((x) << USB0_ENDPTNAK_EPRN_SHIFT) /* EPTN: Tx endpoint NAK */ #define USB0_ENDPTNAK_EPTN_SHIFT (16) #define USB0_ENDPTNAK_EPTN_MASK (0x3f << USB0_ENDPTNAK_EPTN_SHIFT) #define USB0_ENDPTNAK_EPTN(x) ((x) << USB0_ENDPTNAK_EPTN_SHIFT) /* --- USB0_ENDPTNAKEN values ----------------------------------- */ /* EPRNE: Rx endpoint NAK enable */ #define USB0_ENDPTNAKEN_EPRNE_SHIFT (0) #define USB0_ENDPTNAKEN_EPRNE_MASK (0x3f << USB0_ENDPTNAKEN_EPRNE_SHIFT) #define USB0_ENDPTNAKEN_EPRNE(x) ((x) << USB0_ENDPTNAKEN_EPRNE_SHIFT) /* EPTNE: Tx endpoint NAK */ #define USB0_ENDPTNAKEN_EPTNE_SHIFT (16) #define USB0_ENDPTNAKEN_EPTNE_MASK (0x3f << USB0_ENDPTNAKEN_EPTNE_SHIFT) #define USB0_ENDPTNAKEN_EPTNE(x) ((x) << USB0_ENDPTNAKEN_EPTNE_SHIFT) /* --- USB0_PORTSC1_D values ------------------------------------ */ /* CCS: Current connect status */ #define USB0_PORTSC1_D_CCS_SHIFT (0) #define USB0_PORTSC1_D_CCS (1 << USB0_PORTSC1_D_CCS_SHIFT) /* PE: Port enable */ #define USB0_PORTSC1_D_PE_SHIFT (2) #define USB0_PORTSC1_D_PE (1 << USB0_PORTSC1_D_PE_SHIFT) /* PEC: Port enable/disable change */ #define USB0_PORTSC1_D_PEC_SHIFT (3) #define USB0_PORTSC1_D_PEC (1 << USB0_PORTSC1_D_PEC_SHIFT) /* FPR: Force port resume */ #define USB0_PORTSC1_D_FPR_SHIFT (6) #define USB0_PORTSC1_D_FPR (1 << USB0_PORTSC1_D_FPR_SHIFT) /* SUSP: Suspend */ #define USB0_PORTSC1_D_SUSP_SHIFT (7) #define USB0_PORTSC1_D_SUSP (1 << USB0_PORTSC1_D_SUSP_SHIFT) /* PR: Port reset */ #define USB0_PORTSC1_D_PR_SHIFT (8) #define USB0_PORTSC1_D_PR (1 << USB0_PORTSC1_D_PR_SHIFT) /* HSP: High-speed status */ #define USB0_PORTSC1_D_HSP_SHIFT (9) #define USB0_PORTSC1_D_HSP (1 << USB0_PORTSC1_D_HSP_SHIFT) /* PIC1_0: Port indicator control */ #define USB0_PORTSC1_D_PIC1_0_SHIFT (14) #define USB0_PORTSC1_D_PIC1_0_MASK (0x3 << USB0_PORTSC1_D_PIC1_0_SHIFT) #define USB0_PORTSC1_D_PIC1_0(x) ((x) << USB0_PORTSC1_D_PIC1_0_SHIFT) /* PTC3_0: Port test control */ #define USB0_PORTSC1_D_PTC3_0_SHIFT (16) #define USB0_PORTSC1_D_PTC3_0_MASK (0xf << USB0_PORTSC1_D_PTC3_0_SHIFT) #define USB0_PORTSC1_D_PTC3_0(x) ((x) << USB0_PORTSC1_D_PTC3_0_SHIFT) /* PHCD: PHY low power suspend - clock disable (PLPSCD) */ #define USB0_PORTSC1_D_PHCD_SHIFT (23) #define USB0_PORTSC1_D_PHCD (1 << USB0_PORTSC1_D_PHCD_SHIFT) /* PFSC: Port force full speed connect */ #define USB0_PORTSC1_D_PFSC_SHIFT (24) #define USB0_PORTSC1_D_PFSC (1 << USB0_PORTSC1_D_PFSC_SHIFT) /* PSPD: Port speed */ #define USB0_PORTSC1_D_PSPD_SHIFT (26) #define USB0_PORTSC1_D_PSPD_MASK (0x3 << USB0_PORTSC1_D_PSPD_SHIFT) #define USB0_PORTSC1_D_PSPD(x) ((x) << USB0_PORTSC1_D_PSPD_SHIFT) /* --- USB0_PORTSC1_H values ------------------------------------ */ /* CCS: Current connect status */ #define USB0_PORTSC1_H_CCS_SHIFT (0) #define USB0_PORTSC1_H_CCS (1 << USB0_PORTSC1_H_CCS_SHIFT) /* CSC: Connect status change */ #define USB0_PORTSC1_H_CSC_SHIFT (1) #define USB0_PORTSC1_H_CSC (1 << USB0_PORTSC1_H_CSC_SHIFT) /* PE: Port enable */ #define USB0_PORTSC1_H_PE_SHIFT (2) #define USB0_PORTSC1_H_PE (1 << USB0_PORTSC1_H_PE_SHIFT) /* PEC: Port disable/enable change */ #define USB0_PORTSC1_H_PEC_SHIFT (3) #define USB0_PORTSC1_H_PEC (1 << USB0_PORTSC1_H_PEC_SHIFT) /* OCA: Over-current active */ #define USB0_PORTSC1_H_OCA_SHIFT (4) #define USB0_PORTSC1_H_OCA (1 << USB0_PORTSC1_H_OCA_SHIFT) /* OCC: Over-current change */ #define USB0_PORTSC1_H_OCC_SHIFT (5) #define USB0_PORTSC1_H_OCC (1 << USB0_PORTSC1_H_OCC_SHIFT) /* FPR: Force port resume */ #define USB0_PORTSC1_H_FPR_SHIFT (6) #define USB0_PORTSC1_H_FPR (1 << USB0_PORTSC1_H_FPR_SHIFT) /* SUSP: Suspend */ #define USB0_PORTSC1_H_SUSP_SHIFT (7) #define USB0_PORTSC1_H_SUSP (1 << USB0_PORTSC1_H_SUSP_SHIFT) /* PR: Port reset */ #define USB0_PORTSC1_H_PR_SHIFT (8) #define USB0_PORTSC1_H_PR (1 << USB0_PORTSC1_H_PR_SHIFT) /* HSP: High-speed status */ #define USB0_PORTSC1_H_HSP_SHIFT (9) #define USB0_PORTSC1_H_HSP (1 << USB0_PORTSC1_H_HSP_SHIFT) /* LS: Line status */ #define USB0_PORTSC1_H_LS_SHIFT (10) #define USB0_PORTSC1_H_LS_MASK (0x3 << USB0_PORTSC1_H_LS_SHIFT) #define USB0_PORTSC1_H_LS(x) ((x) << USB0_PORTSC1_H_LS_SHIFT) /* PP: Port power control */ #define USB0_PORTSC1_H_PP_SHIFT (12) #define USB0_PORTSC1_H_PP (1 << USB0_PORTSC1_H_PP_SHIFT) /* PIC1_0: Port indicator control */ #define USB0_PORTSC1_H_PIC1_0_SHIFT (14) #define USB0_PORTSC1_H_PIC1_0_MASK (0x3 << USB0_PORTSC1_H_PIC1_0_SHIFT) #define USB0_PORTSC1_H_PIC1_0(x) ((x) << USB0_PORTSC1_H_PIC1_0_SHIFT) /* PTC3_0: Port test control */ #define USB0_PORTSC1_H_PTC3_0_SHIFT (16) #define USB0_PORTSC1_H_PTC3_0_MASK (0xf << USB0_PORTSC1_H_PTC3_0_SHIFT) #define USB0_PORTSC1_H_PTC3_0(x) ((x) << USB0_PORTSC1_H_PTC3_0_SHIFT) /* WKCN: Wake on connect enable (WKCNNT_E) */ #define USB0_PORTSC1_H_WKCN_SHIFT (20) #define USB0_PORTSC1_H_WKCN (1 << USB0_PORTSC1_H_WKCN_SHIFT) /* WKDC: Wake on disconnect enable (WKDSCNNT_E) */ #define USB0_PORTSC1_H_WKDC_SHIFT (21) #define USB0_PORTSC1_H_WKDC (1 << USB0_PORTSC1_H_WKDC_SHIFT) /* WKOC: Wake on over-current enable (WKOC_E) */ #define USB0_PORTSC1_H_WKOC_SHIFT (22) #define USB0_PORTSC1_H_WKOC (1 << USB0_PORTSC1_H_WKOC_SHIFT) /* PHCD: PHY low power suspend - clock disable (PLPSCD) */ #define USB0_PORTSC1_H_PHCD_SHIFT (23) #define USB0_PORTSC1_H_PHCD (1 << USB0_PORTSC1_H_PHCD_SHIFT) /* PFSC: Port force full speed connect */ #define USB0_PORTSC1_H_PFSC_SHIFT (24) #define USB0_PORTSC1_H_PFSC (1 << USB0_PORTSC1_H_PFSC_SHIFT) /* PSPD: Port speed */ #define USB0_PORTSC1_H_PSPD_SHIFT (26) #define USB0_PORTSC1_H_PSPD_MASK (0x3 << USB0_PORTSC1_H_PSPD_SHIFT) #define USB0_PORTSC1_H_PSPD(x) ((x) << USB0_PORTSC1_H_PSPD_SHIFT) /* --- USB0_OTGSC values ---------------------------------------- */ /* VD: VBUS_Discharge */ #define USB0_OTGSC_VD_SHIFT (0) #define USB0_OTGSC_VD (1 << USB0_OTGSC_VD_SHIFT) /* VC: VBUS_Charge */ #define USB0_OTGSC_VC_SHIFT (1) #define USB0_OTGSC_VC (1 << USB0_OTGSC_VC_SHIFT) /* HAAR: Hardware assist auto_reset */ #define USB0_OTGSC_HAAR_SHIFT (2) #define USB0_OTGSC_HAAR (1 << USB0_OTGSC_HAAR_SHIFT) /* OT: OTG termination */ #define USB0_OTGSC_OT_SHIFT (3) #define USB0_OTGSC_OT (1 << USB0_OTGSC_OT_SHIFT) /* DP: Data pulsing */ #define USB0_OTGSC_DP_SHIFT (4) #define USB0_OTGSC_DP (1 << USB0_OTGSC_DP_SHIFT) /* IDPU: ID pull-up */ #define USB0_OTGSC_IDPU_SHIFT (5) #define USB0_OTGSC_IDPU (1 << USB0_OTGSC_IDPU_SHIFT) /* HADP: Hardware assist data pulse */ #define USB0_OTGSC_HADP_SHIFT (6) #define USB0_OTGSC_HADP (1 << USB0_OTGSC_HADP_SHIFT) /* HABA: Hardware assist B-disconnect to A-connect */ #define USB0_OTGSC_HABA_SHIFT (7) #define USB0_OTGSC_HABA (1 << USB0_OTGSC_HABA_SHIFT) /* ID: USB ID */ #define USB0_OTGSC_ID_SHIFT (8) #define USB0_OTGSC_ID (1 << USB0_OTGSC_ID_SHIFT) /* AVV: A-VBUS valid */ #define USB0_OTGSC_AVV_SHIFT (9) #define USB0_OTGSC_AVV (1 << USB0_OTGSC_AVV_SHIFT) /* ASV: A-session valid */ #define USB0_OTGSC_ASV_SHIFT (10) #define USB0_OTGSC_ASV (1 << USB0_OTGSC_ASV_SHIFT) /* BSV: B-session valid */ #define USB0_OTGSC_BSV_SHIFT (11) #define USB0_OTGSC_BSV (1 << USB0_OTGSC_BSV_SHIFT) /* BSE: B-session end */ #define USB0_OTGSC_BSE_SHIFT (12) #define USB0_OTGSC_BSE (1 << USB0_OTGSC_BSE_SHIFT) /* MS1T: 1 millisecond timer toggle */ #define USB0_OTGSC_MS1T_SHIFT (13) #define USB0_OTGSC_MS1T (1 << USB0_OTGSC_MS1T_SHIFT) /* DPS: Data bus pulsing status */ #define USB0_OTGSC_DPS_SHIFT (14) #define USB0_OTGSC_DPS (1 << USB0_OTGSC_DPS_SHIFT) /* IDIS: USB ID interrupt status */ #define USB0_OTGSC_IDIS_SHIFT (16) #define USB0_OTGSC_IDIS (1 << USB0_OTGSC_IDIS_SHIFT) /* AVVIS: A-VBUS valid interrupt status */ #define USB0_OTGSC_AVVIS_SHIFT (17) #define USB0_OTGSC_AVVIS (1 << USB0_OTGSC_AVVIS_SHIFT) /* ASVIS: A-Session valid interrupt status */ #define USB0_OTGSC_ASVIS_SHIFT (18) #define USB0_OTGSC_ASVIS (1 << USB0_OTGSC_ASVIS_SHIFT) /* BSVIS: B-Session valid interrupt status */ #define USB0_OTGSC_BSVIS_SHIFT (19) #define USB0_OTGSC_BSVIS (1 << USB0_OTGSC_BSVIS_SHIFT) /* BSEIS: B-Session end interrupt status */ #define USB0_OTGSC_BSEIS_SHIFT (20) #define USB0_OTGSC_BSEIS (1 << USB0_OTGSC_BSEIS_SHIFT) /* MS1S: 1 millisecond timer interrupt status */ #define USB0_OTGSC_MS1S_SHIFT (21) #define USB0_OTGSC_MS1S (1 << USB0_OTGSC_MS1S_SHIFT) /* DPIS: Data pulse interrupt status */ #define USB0_OTGSC_DPIS_SHIFT (22) #define USB0_OTGSC_DPIS (1 << USB0_OTGSC_DPIS_SHIFT) /* IDIE: USB ID interrupt enable */ #define USB0_OTGSC_IDIE_SHIFT (24) #define USB0_OTGSC_IDIE (1 << USB0_OTGSC_IDIE_SHIFT) /* AVVIE: A-VBUS valid interrupt enable */ #define USB0_OTGSC_AVVIE_SHIFT (25) #define USB0_OTGSC_AVVIE (1 << USB0_OTGSC_AVVIE_SHIFT) /* ASVIE: A-session valid interrupt enable */ #define USB0_OTGSC_ASVIE_SHIFT (26) #define USB0_OTGSC_ASVIE (1 << USB0_OTGSC_ASVIE_SHIFT) /* BSVIE: B-session valid interrupt enable */ #define USB0_OTGSC_BSVIE_SHIFT (27) #define USB0_OTGSC_BSVIE (1 << USB0_OTGSC_BSVIE_SHIFT) /* BSEIE: B-session end interrupt enable */ #define USB0_OTGSC_BSEIE_SHIFT (28) #define USB0_OTGSC_BSEIE (1 << USB0_OTGSC_BSEIE_SHIFT) /* MS1E: 1 millisecond timer interrupt enable */ #define USB0_OTGSC_MS1E_SHIFT (29) #define USB0_OTGSC_MS1E (1 << USB0_OTGSC_MS1E_SHIFT) /* DPIE: Data pulse interrupt enable */ #define USB0_OTGSC_DPIE_SHIFT (30) #define USB0_OTGSC_DPIE (1 << USB0_OTGSC_DPIE_SHIFT) /* --- USB0_USBMODE_D values ------------------------------------ */ /* CM1_0: Controller mode */ #define USB0_USBMODE_D_CM1_0_SHIFT (0) #define USB0_USBMODE_D_CM1_0_MASK (0x3 << USB0_USBMODE_D_CM1_0_SHIFT) #define USB0_USBMODE_D_CM1_0(x) ((x) << USB0_USBMODE_D_CM1_0_SHIFT) /* ES: Endian select */ #define USB0_USBMODE_D_ES_SHIFT (2) #define USB0_USBMODE_D_ES (1 << USB0_USBMODE_D_ES_SHIFT) /* SLOM: Setup Lockout mode */ #define USB0_USBMODE_D_SLOM_SHIFT (3) #define USB0_USBMODE_D_SLOM (1 << USB0_USBMODE_D_SLOM_SHIFT) /* SDIS: Setup Lockout mode */ #define USB0_USBMODE_D_SDIS_SHIFT (4) #define USB0_USBMODE_D_SDIS (1 << USB0_USBMODE_D_SDIS_SHIFT) /* --- USB0_USBMODE_H values ------------------------------------ */ /* CM: Controller mode */ #define USB0_USBMODE_H_CM_SHIFT (0) #define USB0_USBMODE_H_CM_MASK (0x3 << USB0_USBMODE_H_CM_SHIFT) #define USB0_USBMODE_H_CM(x) ((x) << USB0_USBMODE_H_CM_SHIFT) /* ES: Endian select */ #define USB0_USBMODE_H_ES_SHIFT (2) #define USB0_USBMODE_H_ES (1 << USB0_USBMODE_H_ES_SHIFT) /* SDIS: Stream disable mode */ #define USB0_USBMODE_H_SDIS_SHIFT (4) #define USB0_USBMODE_H_SDIS (1 << USB0_USBMODE_H_SDIS_SHIFT) /* VBPS: VBUS power select */ #define USB0_USBMODE_H_VBPS_SHIFT (5) #define USB0_USBMODE_H_VBPS (1 << USB0_USBMODE_H_VBPS_SHIFT) /* --- USB0_ENDPTSETUPSTAT values ------------------------------- */ /* ENDPSETUPSTAT: Setup endpoint status for logical endpoints 0 to 5 */ #define USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT_SHIFT (0) #define USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT_MASK \ (0x3f << USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT_SHIFT) #define USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT(x) \ ((x) << USB0_ENDPTSETUPSTAT_ENDPTSETUPSTAT_SHIFT) /* --- USB0_ENDPTPRIME values ----------------------------------- */ /* PERB: Prime endpoint receive buffer for physical OUT endpoints 5 to 0 */ #define USB0_ENDPTPRIME_PERB_SHIFT (0) #define USB0_ENDPTPRIME_PERB_MASK (0x3f << USB0_ENDPTPRIME_PERB_SHIFT) #define USB0_ENDPTPRIME_PERB(x) ((x) << USB0_ENDPTPRIME_PERB_SHIFT) /* PETB: Prime endpoint transmit buffer for physical IN endpoints 5 to 0 */ #define USB0_ENDPTPRIME_PETB_SHIFT (16) #define USB0_ENDPTPRIME_PETB_MASK (0x3f << USB0_ENDPTPRIME_PETB_SHIFT) #define USB0_ENDPTPRIME_PETB(x) ((x) << USB0_ENDPTPRIME_PETB_SHIFT) /* --- USB0_ENDPTFLUSH values ----------------------------------- */ /* FERB: Flush endpoint receive buffer for physical OUT endpoints 5 to 0 */ #define USB0_ENDPTFLUSH_FERB_SHIFT (0) #define USB0_ENDPTFLUSH_FERB_MASK (0x3f << USB0_ENDPTFLUSH_FERB_SHIFT) #define USB0_ENDPTFLUSH_FERB(x) ((x) << USB0_ENDPTFLUSH_FERB_SHIFT) /* FETB: Flush endpoint transmit buffer for physical IN endpoints 5 to 0 */ #define USB0_ENDPTFLUSH_FETB_SHIFT (16) #define USB0_ENDPTFLUSH_FETB_MASK (0x3f << USB0_ENDPTFLUSH_FETB_SHIFT) #define USB0_ENDPTFLUSH_FETB(x) ((x) << USB0_ENDPTFLUSH_FETB_SHIFT) /* --- USB0_ENDPTSTAT values ------------------------------------ */ /* ERBR: Endpoint receive buffer ready for physical OUT endpoints 5 to 0 */ #define USB0_ENDPTSTAT_ERBR_SHIFT (0) #define USB0_ENDPTSTAT_ERBR_MASK (0x3f << USB0_ENDPTSTAT_ERBR_SHIFT) #define USB0_ENDPTSTAT_ERBR(x) ((x) << USB0_ENDPTSTAT_ERBR_SHIFT) /* ETBR: Endpoint transmit buffer ready for physical IN endpoints 3 to 0 */ #define USB0_ENDPTSTAT_ETBR_SHIFT (16) #define USB0_ENDPTSTAT_ETBR_MASK (0x3f << USB0_ENDPTSTAT_ETBR_SHIFT) #define USB0_ENDPTSTAT_ETBR(x) ((x) << USB0_ENDPTSTAT_ETBR_SHIFT) /* --- USB0_ENDPTCOMPLETE values -------------------------------- */ /* ERCE: Endpoint receive complete event for physical OUT endpoints 5 to 0 */ #define USB0_ENDPTCOMPLETE_ERCE_SHIFT (0) #define USB0_ENDPTCOMPLETE_ERCE_MASK (0x3f << USB0_ENDPTCOMPLETE_ERCE_SHIFT) #define USB0_ENDPTCOMPLETE_ERCE(x) ((x) << USB0_ENDPTCOMPLETE_ERCE_SHIFT) /* ETCE: Endpoint transmit complete event for physical IN endpoints 5 to 0 */ #define USB0_ENDPTCOMPLETE_ETCE_SHIFT (16) #define USB0_ENDPTCOMPLETE_ETCE_MASK (0x3f << USB0_ENDPTCOMPLETE_ETCE_SHIFT) #define USB0_ENDPTCOMPLETE_ETCE(x) ((x) << USB0_ENDPTCOMPLETE_ETCE_SHIFT) /* --- USB0_ENDPTCTRL0 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL0_RXS_SHIFT (0) #define USB0_ENDPTCTRL0_RXS (1 << USB0_ENDPTCTRL0_RXS_SHIFT) /* RXT1_0: Endpoint type */ #define USB0_ENDPTCTRL0_RXT1_0_SHIFT (2) #define USB0_ENDPTCTRL0_RXT1_0_MASK (0x3 << USB0_ENDPTCTRL0_RXT1_0_SHIFT) #define USB0_ENDPTCTRL0_RXT1_0(x) ((x) << USB0_ENDPTCTRL0_RXT1_0_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL0_RXE_SHIFT (7) #define USB0_ENDPTCTRL0_RXE (1 << USB0_ENDPTCTRL0_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL0_TXS_SHIFT (16) #define USB0_ENDPTCTRL0_TXS (1 << USB0_ENDPTCTRL0_TXS_SHIFT) /* TXT1_0: Endpoint type */ #define USB0_ENDPTCTRL0_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL0_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL0_TXT1_0_SHIFT) #define USB0_ENDPTCTRL0_TXT1_0(x) ((x) << USB0_ENDPTCTRL0_TXT1_0_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL0_TXE_SHIFT (23) #define USB0_ENDPTCTRL0_TXE (1 << USB0_ENDPTCTRL0_TXE_SHIFT) /* --- USB0_ENDPTCTRL1 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL1_RXS_SHIFT (0) #define USB0_ENDPTCTRL1_RXS (1 << USB0_ENDPTCTRL1_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL1_RXT_SHIFT (2) #define USB0_ENDPTCTRL1_RXT_MASK (0x3 << USB0_ENDPTCTRL1_RXT_SHIFT) #define USB0_ENDPTCTRL1_RXT(x) ((x) << USB0_ENDPTCTRL1_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL1_RXI_SHIFT (5) #define USB0_ENDPTCTRL1_RXI (1 << USB0_ENDPTCTRL1_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL1_RXR_SHIFT (6) #define USB0_ENDPTCTRL1_RXR (1 << USB0_ENDPTCTRL1_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL1_RXE_SHIFT (7) #define USB0_ENDPTCTRL1_RXE (1 << USB0_ENDPTCTRL1_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL1_TXS_SHIFT (16) #define USB0_ENDPTCTRL1_TXS (1 << USB0_ENDPTCTRL1_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL1_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL1_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL1_TXT1_0_SHIFT) #define USB0_ENDPTCTRL1_TXT1_0(x) ((x) << USB0_ENDPTCTRL1_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL1_TXI_SHIFT (21) #define USB0_ENDPTCTRL1_TXI (1 << USB0_ENDPTCTRL1_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL1_TXR_SHIFT (22) #define USB0_ENDPTCTRL1_TXR (1 << USB0_ENDPTCTRL1_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL1_TXE_SHIFT (23) #define USB0_ENDPTCTRL1_TXE (1 << USB0_ENDPTCTRL1_TXE_SHIFT) /* --- USB0_ENDPTCTRL2 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL2_RXS_SHIFT (0) #define USB0_ENDPTCTRL2_RXS (1 << USB0_ENDPTCTRL2_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL2_RXT_SHIFT (2) #define USB0_ENDPTCTRL2_RXT_MASK (0x3 << USB0_ENDPTCTRL2_RXT_SHIFT) #define USB0_ENDPTCTRL2_RXT(x) ((x) << USB0_ENDPTCTRL2_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL2_RXI_SHIFT (5) #define USB0_ENDPTCTRL2_RXI (1 << USB0_ENDPTCTRL2_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL2_RXR_SHIFT (6) #define USB0_ENDPTCTRL2_RXR (1 << USB0_ENDPTCTRL2_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL2_RXE_SHIFT (7) #define USB0_ENDPTCTRL2_RXE (1 << USB0_ENDPTCTRL2_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL2_TXS_SHIFT (16) #define USB0_ENDPTCTRL2_TXS (1 << USB0_ENDPTCTRL2_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL2_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL2_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL2_TXT1_0_SHIFT) #define USB0_ENDPTCTRL2_TXT1_0(x) ((x) << USB0_ENDPTCTRL2_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL2_TXI_SHIFT (21) #define USB0_ENDPTCTRL2_TXI (1 << USB0_ENDPTCTRL2_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL2_TXR_SHIFT (22) #define USB0_ENDPTCTRL2_TXR (1 << USB0_ENDPTCTRL2_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL2_TXE_SHIFT (23) #define USB0_ENDPTCTRL2_TXE (1 << USB0_ENDPTCTRL2_TXE_SHIFT) /* --- USB0_ENDPTCTRL3 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL3_RXS_SHIFT (0) #define USB0_ENDPTCTRL3_RXS (1 << USB0_ENDPTCTRL3_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL3_RXT_SHIFT (2) #define USB0_ENDPTCTRL3_RXT_MASK (0x3 << USB0_ENDPTCTRL3_RXT_SHIFT) #define USB0_ENDPTCTRL3_RXT(x) ((x) << USB0_ENDPTCTRL3_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL3_RXI_SHIFT (5) #define USB0_ENDPTCTRL3_RXI (1 << USB0_ENDPTCTRL3_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL3_RXR_SHIFT (6) #define USB0_ENDPTCTRL3_RXR (1 << USB0_ENDPTCTRL3_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL3_RXE_SHIFT (7) #define USB0_ENDPTCTRL3_RXE (1 << USB0_ENDPTCTRL3_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL3_TXS_SHIFT (16) #define USB0_ENDPTCTRL3_TXS (1 << USB0_ENDPTCTRL3_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL3_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL3_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL3_TXT1_0_SHIFT) #define USB0_ENDPTCTRL3_TXT1_0(x) ((x) << USB0_ENDPTCTRL3_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL3_TXI_SHIFT (21) #define USB0_ENDPTCTRL3_TXI (1 << USB0_ENDPTCTRL3_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL3_TXR_SHIFT (22) #define USB0_ENDPTCTRL3_TXR (1 << USB0_ENDPTCTRL3_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL3_TXE_SHIFT (23) #define USB0_ENDPTCTRL3_TXE (1 << USB0_ENDPTCTRL3_TXE_SHIFT) /* --- USB0_ENDPTCTRL4 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL4_RXS_SHIFT (0) #define USB0_ENDPTCTRL4_RXS (1 << USB0_ENDPTCTRL4_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL4_RXT_SHIFT (2) #define USB0_ENDPTCTRL4_RXT_MASK (0x3 << USB0_ENDPTCTRL4_RXT_SHIFT) #define USB0_ENDPTCTRL4_RXT(x) ((x) << USB0_ENDPTCTRL4_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL4_RXI_SHIFT (5) #define USB0_ENDPTCTRL4_RXI (1 << USB0_ENDPTCTRL4_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL4_RXR_SHIFT (6) #define USB0_ENDPTCTRL4_RXR (1 << USB0_ENDPTCTRL4_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL4_RXE_SHIFT (7) #define USB0_ENDPTCTRL4_RXE (1 << USB0_ENDPTCTRL4_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL4_TXS_SHIFT (16) #define USB0_ENDPTCTRL4_TXS (1 << USB0_ENDPTCTRL4_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL4_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL4_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL4_TXT1_0_SHIFT) #define USB0_ENDPTCTRL4_TXT1_0(x) ((x) << USB0_ENDPTCTRL4_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL4_TXI_SHIFT (21) #define USB0_ENDPTCTRL4_TXI (1 << USB0_ENDPTCTRL4_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL4_TXR_SHIFT (22) #define USB0_ENDPTCTRL4_TXR (1 << USB0_ENDPTCTRL4_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL4_TXE_SHIFT (23) #define USB0_ENDPTCTRL4_TXE (1 << USB0_ENDPTCTRL4_TXE_SHIFT) /* --- USB0_ENDPTCTRL5 values ----------------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL5_RXS_SHIFT (0) #define USB0_ENDPTCTRL5_RXS (1 << USB0_ENDPTCTRL5_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL5_RXT_SHIFT (2) #define USB0_ENDPTCTRL5_RXT_MASK (0x3 << USB0_ENDPTCTRL5_RXT_SHIFT) #define USB0_ENDPTCTRL5_RXT(x) ((x) << USB0_ENDPTCTRL5_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL5_RXI_SHIFT (5) #define USB0_ENDPTCTRL5_RXI (1 << USB0_ENDPTCTRL5_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL5_RXR_SHIFT (6) #define USB0_ENDPTCTRL5_RXR (1 << USB0_ENDPTCTRL5_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL5_RXE_SHIFT (7) #define USB0_ENDPTCTRL5_RXE (1 << USB0_ENDPTCTRL5_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL5_TXS_SHIFT (16) #define USB0_ENDPTCTRL5_TXS (1 << USB0_ENDPTCTRL5_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL5_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL5_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL5_TXT1_0_SHIFT) #define USB0_ENDPTCTRL5_TXT1_0(x) ((x) << USB0_ENDPTCTRL5_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL5_TXI_SHIFT (21) #define USB0_ENDPTCTRL5_TXI (1 << USB0_ENDPTCTRL5_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL5_TXR_SHIFT (22) #define USB0_ENDPTCTRL5_TXR (1 << USB0_ENDPTCTRL5_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL5_TXE_SHIFT (23) #define USB0_ENDPTCTRL5_TXE (1 << USB0_ENDPTCTRL5_TXE_SHIFT) /* -------------------------------------------------------------- */ /* --- USB0_ENDPTCTRL common values ----------------------------- */ /* RXS: Rx endpoint stall */ #define USB0_ENDPTCTRL_RXS_SHIFT (0) #define USB0_ENDPTCTRL_RXS (1 << USB0_ENDPTCTRL_RXS_SHIFT) /* RXT: Endpoint type */ #define USB0_ENDPTCTRL_RXT_SHIFT (2) #define USB0_ENDPTCTRL_RXT_MASK (0x3 << USB0_ENDPTCTRL_RXT_SHIFT) #define USB0_ENDPTCTRL_RXT(x) ((x) << USB0_ENDPTCTRL_RXT_SHIFT) /* RXI: Rx data toggle inhibit */ #define USB0_ENDPTCTRL_RXI_SHIFT (5) #define USB0_ENDPTCTRL_RXI (1 << USB0_ENDPTCTRL_RXI_SHIFT) /* RXR: Rx data toggle reset */ #define USB0_ENDPTCTRL_RXR_SHIFT (6) #define USB0_ENDPTCTRL_RXR (1 << USB0_ENDPTCTRL_RXR_SHIFT) /* RXE: Rx endpoint enable */ #define USB0_ENDPTCTRL_RXE_SHIFT (7) #define USB0_ENDPTCTRL_RXE (1 << USB0_ENDPTCTRL_RXE_SHIFT) /* TXS: Tx endpoint stall */ #define USB0_ENDPTCTRL_TXS_SHIFT (16) #define USB0_ENDPTCTRL_TXS (1 << USB0_ENDPTCTRL_TXS_SHIFT) /* TXT1_0: Tx Endpoint type */ #define USB0_ENDPTCTRL_TXT1_0_SHIFT (18) #define USB0_ENDPTCTRL_TXT1_0_MASK (0x3 << USB0_ENDPTCTRL_TXT1_0_SHIFT) #define USB0_ENDPTCTRL_TXT1_0(x) ((x) << USB0_ENDPTCTRL_TXT1_0_SHIFT) /* TXI: Tx data toggle inhibit */ #define USB0_ENDPTCTRL_TXI_SHIFT (21) #define USB0_ENDPTCTRL_TXI (1 << USB0_ENDPTCTRL_TXI_SHIFT) /* TXR: Tx data toggle reset */ #define USB0_ENDPTCTRL_TXR_SHIFT (22) #define USB0_ENDPTCTRL_TXR (1 << USB0_ENDPTCTRL_TXR_SHIFT) /* TXE: Tx endpoint enable */ #define USB0_ENDPTCTRL_TXE_SHIFT (23) #define USB0_ENDPTCTRL_TXE (1 << USB0_ENDPTCTRL_TXE_SHIFT) /* --- USB1 registers ------------------------------------------------------ */ /* TODO */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/lpc43xx/wwdt.h ================================================ /** @defgroup wwdt_defines Windowed Watchdog Timer @brief Defined Constants and Types for the LPC43xx Windowed Watchdog Timer @ingroup LPC43xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LPC43XX_WWDT_H #define LPC43XX_WWDT_H /**@{*/ #include #include /* --- Windowed Watchdog Timer (WWDT) registers ---------------------------- */ /* Watchdog mode register */ #define WWDT_MOD MMIO32(WWDT_BASE + 0x000) /* Watchdog timer constant register */ #define WWDT_TC MMIO32(WWDT_BASE + 0x004) /* Watchdog feed sequence register */ #define WWDT_FEED MMIO32(WWDT_BASE + 0x008) /* Watchdog timer value register */ #define WWDT_TV MMIO32(WWDT_BASE + 0x00C) /* Watchdog warning interrupt register */ #define WWDT_WARNINT MMIO32(WWDT_BASE + 0x014) /* Watchdog timer window register */ #define WWDT_WINDOW MMIO32(WWDT_BASE + 0x018) /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/3n/irq.yaml ================================================ includeguard: LIBOPENCM3_SAM3N_NVIC_H partname_humanreadable: Atmel SAM3N series partname_doxygen: SAM3N irqs: - supc - rstc - rtc - rtt - wdg - pmc - eefc0 - reserved0 - uart0 - uart1 - reserved1 - pioa - piob - pioc - usart0 - usart1 - reserved2 - reserved3 - reserved4 - twi0 - twi1 - spi - reserved5 - tc0 - tc1 - tc2 - tc3 - tc4 - tc5 - adc - dacc - pwm ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/3n/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3N_MEMORYMAP_H #define SAM3N_MEMORYMAP_H #include /* --- SAM3N peripheral space -------------------------------------------- */ #define SPI_BASE (0x40008000) #define TC0_BASE (0x40010000) #define TC1_BASE (0x40010040) #define TC2_BASE (0x40010080) #define TC3_BASE (0x40014000) #define TC4_BASE (0x40014040) #define TC5_BASE (0x40014080) #define TWI0_BASE (0x40018000) #define TWI1_BASE (0x4001C000) #define PWM_BASE (0x40020000) #define USART0_BASE (0x40024000) #define USART1_BASE (0x40028000) #define ADC_BASE (0x40038000) #define DACC_BASE (0x4003C000) /* --- SAM3N system controller space ------------------------------------- */ #define SMC_BASE (0x400E0000) #define MATRIX_BASE (0x400E0200) #define PMC_BASE (0x400E0400) #define UART0_BASE (0x400E0600) #define CHIPID_BASE (0x400E0740) #define UART1_BASE (0x400E0800) #define EEFC_BASE (0x400E0A00) #define PIOA_BASE (0x400E0E00) #define PIOB_BASE (0x400E1000) #define PIOC_BASE (0x400E1200) #define RSTC_BASE (0x400E1400) #define SUPC_BASE (0x400E1410) #define RTT_BASE (0x400E1430) #define WDT_BASE (0x400E1450) #define RTC_BASE (0x400E1460) #define GPBR_BASE (0x400E1490) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/3x/irq.yaml ================================================ includeguard: LIBOPENCM3_SAM3X_NVIC_H partname_humanreadable: Atmel SAM3X series partname_doxygen: SAM3X irqs: - supc - rstc - rtc - rtt - wdg - pmc - eefc0 - eefc1 - uart - smc_sdramc - sdramc - pioa - piob - pioc - piod - pioe - piof - usart0 - usart1 - usart2 - usart3 - hsmci - twi0 - twi1 - spi0 - spi1 - ssc - tc0 - tc1 - tc2 - tc3 - tc4 - tc5 - tc6 - tc7 - tc8 - pwm - adc - dacc - dmac - uotghs - trng - emac - can0 - can1 ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/3x/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_MEMORYMAP_H #define SAM3X_MEMORYMAP_H #include /* --- SAM3X peripheral space -------------------------------------------- */ #define HSMCI_BASE (0x40000000) #define SSC_BASE (0x40004000) #define SPI0_BASE (0x40008000) #define SPI1_BASE (0x4000C000) #define TC0_BASE (0x40080000) #define TC1_BASE (0x40080040) #define TC2_BASE (0x40080080) #define TC3_BASE (0x40084000) #define TC4_BASE (0x40084040) #define TC5_BASE (0x40084080) #define TC6_BASE (0x40088000) #define TC7_BASE (0x40088040) #define TC8_BASE (0x40088080) #define TWI0_BASE (0x4008C000) #define TWI1_BASE (0x40090000) #define PWM_BASE (0x40094000) #define USART0_BASE (0x40098000) #define USART1_BASE (0x4009C000) #define USART2_BASE (0x400A0000) #define USART3_BASE (0x400A4000) #define UOTGHS_BASE (0x400AC000) #define EMAC_BASE (0x400B0000) #define CAN0_BASE (0x400B4000) #define CAN1_BASE (0x400B8000) #define TRNG_BASE (0x400BC000) #define ADC_BASE (0x400C0000) #define DMAC_BASE (0x400C4000) /* --- SAM3X system controller space ------------------------------------- */ #define SMC_BASE (0x400E0000) #define SDRAM_BASE (0x400E0200) #define MATRIX_BASE (0x400E0400) #define PMC_BASE (0x400E0600) #define UART_BASE (0x400E0800) #define CHIPID_BASE (0x400E0940) #define EEFC0_BASE (0x400E0A00) #define EEFC1_BASE (0x400E0C00) #define PIOA_BASE (0x400E0E00) #define PIOB_BASE (0x400E1000) #define PIOC_BASE (0x400E1200) #define PIOD_BASE (0x400E1400) #define PIOE_BASE (0x400E1600) #define PIOF_BASE (0x400E1800) #define RSTC_BASE (0x400E1A00) #define SUPC_BASE (0x400E1A10) #define RTT_BASE (0x400E1A30) #define WDT_BASE (0x400E1A50) #define RTC_BASE (0x400E1A60) #define GPBR_BASE (0x400E1A90) #define RTC_BASE (0x400E1A60) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/eefc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_EEFC_H #define SAM3X_EEFC_H #include #include /* --- Convenience macros ------------------------------------------------ */ #define EEFC EEFC_BASE #define EEFC0 EEFC0_BASE #define EEFC1 EEFC1_BASE /* --- Enhanced Embedded Flash Controller (EEFC) registers --------------- */ #define EEFC_FMR(port) MMIO32((port) + 0x00) #define EEFC_FCR(port) MMIO32((port) + 0x04) #define EEFC_FSR(port) MMIO32((port) + 0x08) #define EEFC_FRR(port) MMIO32((port) + 0x0C) /* 0x0010 - Reserved */ /* EEFC Flash Mode Register (EEFC_FMR) */ /* Bit [31:25] - Reserved */ #define EEFC_FMR_FAM (0x01 << 24) /* Bit [23:12] - Reserved */ #define EEFC_FMR_FWS_MASK (0x0F << 8) /* Bit [7:1] - Reserved */ #define EEFC_FMR_FRDY (0x01 << 0) /* EEFC Flash Command Register (EEFC_FCR) */ #define EEFC_FCR_FKEY (0x5A << 24) #define EEFC_FCR_FARG_MASK (0xFFFF << 8) #define EEFC_FCR_FCMD_MASK (0xFF << 0) #define EEFC_FCR_FCMD_GETD (0x00 << 0) #define EEFC_FCR_FCMD_WP (0x01 << 0) #define EEFC_FCR_FCMD_WPL (0x02 << 0) #define EEFC_FCR_FCMD_EWP (0x03 << 0) #define EEFC_FCR_FCMD_EWPL (0x04 << 0) #define EEFC_FCR_FCMD_EA (0x05 << 0) #define EEFC_FCR_FCMD_SLB (0x08 << 0) #define EEFC_FCR_FCMD_CLB (0x09 << 0) #define EEFC_FCR_FCMD_GLB (0x0A << 0) #define EEFC_FCR_FCMD_SGPB (0x0B << 0) #define EEFC_FCR_FCMD_CGPB (0x0C << 0) #define EEFC_FCR_FCMD_GGPB (0x0D << 0) #define EEFC_FCR_FCMD_STUI (0x0E << 0) #define EEFC_FCR_FCMD_SPUI (0x0F << 0) /* EEFC Flash Status Register (EEFC_FSR) */ /* Bit [31:3] - Reserved */ #define EEFC_FSR_FLOCKE (0x01 << 2) #define EEFC_FSR_FCMDE (0x01 << 1) #define EEFC_FSR_FRDY (0x01 << 0) static inline void eefc_set_latency(uint8_t wait) { #if defined(SAM3X) EEFC_FMR(EEFC0) = (EEFC_FMR(EEFC0) & ~EEFC_FMR_FWS_MASK) | (wait << 8); EEFC_FMR(EEFC1) = (EEFC_FMR(EEFC1) & ~EEFC_FMR_FWS_MASK) | (wait << 8); #elif defined(SAM3N) EEFC_FMR(EEFC) = (EEFC_FMR(EEFC) & ~EEFC_FMR_FWS_MASK) | (wait << 8); #endif } #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/gpio.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_GPIO_H #define SAM3X_GPIO_H #include /* flags may be or'd together, but only contain one of * GPOUTPUT, PERIPHA and PERIPHB */ enum gpio_flags { GPIO_FLAG_GPINPUT = 0, GPIO_FLAG_GPOUTPUT = 1, GPIO_FLAG_PERIPHA = 2, GPIO_FLAG_PERIPHB = 3, GPIO_FLAG_OPEN_DRAIN = 4, GPIO_FLAG_PULL_UP = 8, }; void gpio_init(uint32_t gpioport, uint32_t pins, enum gpio_flags flags); static inline void gpio_set(uint32_t gpioport, uint32_t gpios) { PIO_SODR(gpioport) = gpios; } static inline void gpio_clear(uint32_t gpioport, uint32_t gpios) { PIO_CODR(gpioport) = gpios; } void gpio_toggle(uint32_t gpioport, uint32_t gpios); #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM_MEMORYMAP_H #define SAM_MEMORYMAP_H #if defined(SAM3X) # include #elif defined(SAM3N) # include #else # error "Processor family not defined." #endif #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/pio.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM_PIO_H #define SAM_PIO_H #include #include /* --- Convenience macros ------------------------------------------------ */ /* GPIO port base addresses (for convenience) */ #define PIOA PIOA_BASE #define PIOB PIOB_BASE #define PIOC PIOC_BASE #define PIOD PIOD_BASE #define PIOE PIOE_BASE #define PIOF PIOF_BASE #define PIOG PIOG_BASE #define PIOH PIOH_BASE /* --- PIO registers ----------------------------------------------------- */ #define PIO_PER(port) MMIO32((port) + 0x0000) #define PIO_PDR(port) MMIO32((port) + 0x0004) #define PIO_PSR(port) MMIO32((port) + 0x0008) /* 0x000C - Reserved */ #define PIO_OER(port) MMIO32((port) + 0x0010) #define PIO_ODR(port) MMIO32((port) + 0x0014) #define PIO_OSR(port) MMIO32((port) + 0x0018) /* 0x001C - Reserved */ #define PIO_IFER(port) MMIO32((port) + 0x0020) #define PIO_IFDR(port) MMIO32((port) + 0x0024) #define PIO_IFSR(port) MMIO32((port) + 0x0028) /* 0x002C - Reserved */ #define PIO_SODR(port) MMIO32((port) + 0x0030) #define PIO_CODR(port) MMIO32((port) + 0x0034) #define PIO_ODSR(port) MMIO32((port) + 0x0038) #define PIO_PDSR(port) MMIO32((port) + 0x003C) #define PIO_IER(port) MMIO32((port) + 0x0040) #define PIO_IDR(port) MMIO32((port) + 0x0044) #define PIO_IMR(port) MMIO32((port) + 0x0048) #define PIO_ISR(port) MMIO32((port) + 0x004C) #define PIO_MDER(port) MMIO32((port) + 0x0050) #define PIO_MDDR(port) MMIO32((port) + 0x0054) #define PIO_MDSR(port) MMIO32((port) + 0x0058) /* 0x005C - Reserved */ #define PIO_PUDR(port) MMIO32((port) + 0x0060) #define PIO_PUER(port) MMIO32((port) + 0x0064) #define PIO_PUSR(port) MMIO32((port) + 0x0068) /* 0x006C - Reserved */ #define PIO_ABSR(port) MMIO32((port) + 0x0070) /* 0x0074-0x007C - Reserved */ #define PIO_SCIFSR(port) MMIO32((port) + 0x0080) #define PIO_DIFSR(port) MMIO32((port) + 0x0084) #define PIO_IFDGSR(port) MMIO32((port) + 0x0088) #define PIO_SCDR(port) MMIO32((port) + 0x008C) /* 0x0090-0x009C - Reserved */ #define PIO_OWER(port) MMIO32((port) + 0x00A0) #define PIO_OWDR(port) MMIO32((port) + 0x00A4) #define PIO_OWSR(port) MMIO32((port) + 0x00A8) /* 0x00AC - Reserved */ #define PIO_AIMER(port) MMIO32((port) + 0x00B0) #define PIO_AIMDR(port) MMIO32((port) + 0x00B4) #define PIO_AIMMR(port) MMIO32((port) + 0x00B8) /* 0x00BC - Reserved */ #define PIO_ESR(port) MMIO32((port) + 0x00C0) #define PIO_LSR(port) MMIO32((port) + 0x00C4) #define PIO_ELSR(port) MMIO32((port) + 0x00C8) /* 0x00CC - Reserved */ #define PIO_FELLSR(port) MMIO32((port) + 0x00D0) #define PIO_REHLSR(port) MMIO32((port) + 0x00D4) #define PIO_FRLHSR(port) MMIO32((port) + 0x00D8) /* 0x00DC - Reserved */ #define PIO_LOCKSR(port) MMIO32((port) + 0x00E0) #define PIO_WPMR(port) MMIO32((port) + 0x00E4) #define PIO_WPSR(port) MMIO32((port) + 0x00E8) /* 0x00EC-0x0144 - Reserved */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/pmc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_PMC_H #define SAM3X_PMC_H #include #include /* --- Power Management Controller (PMC) registers ----------------------- */ #define PMC_SCER MMIO32(PMC_BASE + 0x0000) #define PMC_SCDR MMIO32(PMC_BASE + 0x0004) #define PMC_SCSR MMIO32(PMC_BASE + 0x0008) /* 0x000C - Reserved */ #define PMC_PCER0 MMIO32(PMC_BASE + 0x0010) #define PMC_PCDR0 MMIO32(PMC_BASE + 0x0014) #define PMC_PCSR0 MMIO32(PMC_BASE + 0x0018) #define CKGR_UCKR MMIO32(PMC_BASE + 0x001C) #define CKGR_MOR MMIO32(PMC_BASE + 0x0020) #define CKGR_MCFR MMIO32(PMC_BASE + 0x0024) #define CKGR_PLLAR MMIO32(PMC_BASE + 0x0028) /* 0x002C - Reserved */ #define PMC_MCKR MMIO32(PMC_BASE + 0x0030) /* 0x0034 - Reserved */ #define PMC_USB MMIO32(PMC_BASE + 0x0038) /* 0x003C - Reserved */ #define PMC_PCK0 MMIO32(PMC_BASE + 0x0040) #define PMC_PCK1 MMIO32(PMC_BASE + 0x0044) #define PMC_PCK2 MMIO32(PMC_BASE + 0x0048) /* 0x004C-0x005C - Reserved */ #define PMC_IER MMIO32(PMC_BASE + 0x0060) #define PMC_IDR MMIO32(PMC_BASE + 0x0064) #define PMC_SR MMIO32(PMC_BASE + 0x0068) #define PMC_IMR MMIO32(PMC_BASE + 0x006C) #define PMC_FSMR MMIO32(PMC_BASE + 0x0070) #define PMC_FSPR MMIO32(PMC_BASE + 0x0074) #define PMC_FOCR MMIO32(PMC_BASE + 0x0078) /* 0x007C-0x00E0 - Reserved */ #define PMC_WPMR MMIO32(PMC_BASE + 0x00E4) #define PMC_WPSR MMIO32(PMC_BASE + 0x00E8) /* 0x00EC-0x00FC - Reserved */ #define PMC_PCER1 MMIO32(PMC_BASE + 0x0100) #define PMC_PCDR1 MMIO32(PMC_BASE + 0x0104) #define PMC_PCSR1 MMIO32(PMC_BASE + 0x0108) #define PMC_PCR MMIO32(PMC_BASE + 0x010C) /* PMC UTMI Clock Configuration Register (CKGR_UCKR) */ /* Bit [31:22] - Reserved */ #define CKGR_CKGR_UPLLCOUNT_MASK (0x0F << 20) /* Bit [19:17] - Reserved */ #define CKGR_CKGR_UPLLEN (0x01 << 16) /* Bit [15:0] - Reserved */ /* PMC Clock Generator Main Oscillator Register (CKGR_MOR) */ /* Bit [31:26] - Reserved */ #define CKGR_MOR_CFDEN (0x01 << 25) #define CKGR_MOR_MOSCSEL (0x01 << 24) #define CKGR_MOR_KEY (0x37 << 16) #define CKGR_MOR_MOSCXTST_MASK (0xFF << 8) /* Bit 7 - Reserved */ #define CKGR_MOR_MOSCRCF_MASK (0x07 << 4) #define CKGR_MOR_MOSCRCEN (0x01 << 3) /* Bit 2 - Reserved */ #define CKGR_MOR_MOSCXTBY (0x01 << 1) #define CKGR_MOR_MOSCXTEN (0x01 << 0) /* PMC Clock Generator PLLA Register (CKGR_PLLAR) */ #define CKGR_PLLAR_ONE (0x01 << 29) #define CKGR_PLLAR_MULA_MASK (0x7FF << 16) #define CKGR_PLLAR_PLLACOUNT_MASK (0x3F << 8) #define CKGR_PLLAR_DIVA_MASK (0xFF << 0) /* PMC Master Clock Register (PMC_MCKR) */ /* Bit [31:14] - Reserved */ #define PMC_MCKR_UPLLDIV2 (0x01 << 13) #define PMC_MCKR_PLLADIV2 (0x01 << 12) /* Bit [11:7] - Reserved */ #define PMC_MCKR_PRES_MASK (0x07 << 4) /* Bit [3:2] - Reserved */ #define PMC_MCKR_CSS_MASK (0x03 << 0) #define PMC_MCKR_CSS_SLOW_CLK (0x00 << 0) #define PMC_MCKR_CSS_MAIN_CLK (0x01 << 0) #define PMC_MCKR_CSS_PLLA_CLK (0x02 << 0) #define PMC_MCKR_CSS_UPLL_CLK (0x03 << 0) /* PMC USB Clock Register (PMC_USB) */ /* Bit [31:12] - Reserved */ #define PMC_USB_USBDIV_MASK (0x0F << 8) /* Bit [7:1] - Reserved */ #define PMC_USB_USBS (0x01 << 0) /* PMC Status Register (PMC_SR) */ /* Bits [31:21] - Reserved */ #define PMC_SR_FOS (0x01 << 20) #define PMC_SR_CFDS (0x01 << 19) #define PMC_SR_CFDEV (0x01 << 18) #define PMC_SR_MOSCRCS (0x01 << 17) #define PMC_SR_MOSCSELS (0x01 << 16) /* Bits [15:11] - Reserved */ #define PMC_SR_PCKRDY2 (0x01 << 10) #define PMC_SR_PCKRDY1 (0x01 << 9) #define PMC_SR_PCKRDY0 (0x01 << 8) #define PMC_SR_OSCSELS (0x01 << 7) #define PMC_SR_LOCKU (0x01 << 6) /* Bits [5:4] - Reserved */ #define PMC_SR_MCKRDY (0x01 << 3) /* Bit [2] - Reserved */ #define PMC_SR_LOCKA (0x01 << 1) #define PMC_SR_MOSCXTS (0x01 << 0) extern uint32_t pmc_mck_frequency; enum mck_src { MCK_SRC_SLOW = 0, MCK_SRC_MAIN = 1, MCK_SRC_PLLA = 2, MCK_SRC_UPLL = 3, }; void pmc_mck_set_source(enum mck_src src); void pmc_xtal_enable(bool en, uint8_t startup_time); void pmc_plla_config(uint8_t mul, uint8_t div); void pmc_peripheral_clock_enable(uint8_t pid); void pmc_peripheral_clock_disable(uint8_t pid); void pmc_clock_setup_in_xtal_12mhz_out_84mhz(void); void pmc_clock_setup_in_rc_4mhz_out_84mhz(void); #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/pwm.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_PWM_H #define SAM3X_PWM_H #include #include /* --- Pulse Width Modulation (PWM) registers ----------------------- */ #define PWM_CLK MMIO32(PWM_BASE + 0x0000) #define PWM_ENA MMIO32(PWM_BASE + 0x0004) #define PWM_DIS MMIO32(PWM_BASE + 0x0008) #define PWM_SR MMIO32(PWM_BASE + 0x000C) #define PWM_IER1 MMIO32(PWM_BASE + 0x0010) #define PWM_IDR1 MMIO32(PWM_BASE + 0x0014) #define PWM_IMR1 MMIO32(PWM_BASE + 0x0018) #define PWM_ISR1 MMIO32(PWM_BASE + 0x001C) #define PWM_SCM MMIO32(PWM_BASE + 0x0020) /* 0x0024 - Reserved */ #define PWM_SCUC MMIO32(PWM_BASE + 0x0028) #define PWM_SCUP MMIO32(PWM_BASE + 0x002C) #define PWM_SCUPUPD MMIO32(PWM_BASE + 0x0030) #define PWM_IER2 MMIO32(PWM_BASE + 0x0034) #define PWM_IDR2 MMIO32(PWM_BASE + 0x0038) #define PWM_IMR2 MMIO32(PWM_BASE + 0x003C) #define PWM_ISR2 MMIO32(PWM_BASE + 0x0040) #define PWM_OOV MMIO32(PWM_BASE + 0x0044) #define PWM_OS MMIO32(PWM_BASE + 0x0048) #define PWM_OSS MMIO32(PWM_BASE + 0x004C) #define PWM_OSC MMIO32(PWM_BASE + 0x0050) #define PWM_OSSUPD MMIO32(PWM_BASE + 0x0054) #define PWM_OSCUPD MMIO32(PWM_BASE + 0x0058) #define PWM_FMR MMIO32(PWM_BASE + 0x005C) #define PWM_FSR MMIO32(PWM_BASE + 0x0060) #define PWM_FCR MMIO32(PWM_BASE + 0x0064) #define PWM_FPV MMIO32(PWM_BASE + 0x0068) #define PWM_FPE1 MMIO32(PWM_BASE + 0x006C) #define PWM_FPE2 MMIO32(PWM_BASE + 0x0070) /* 0x0074:0x0078 - Reserved */ #define PWM_ELMR0 MMIO32(PWM_BASE + 0x007C) #define PWM_ELMR1 MMIO32(PWM_BASE + 0x0080) /* 0x0084:0x00AC - Reserved */ #define PWM_SMMR MMIO32(PWM_BASE + 0x00B0) /* 0x00B4:0x00E0 - Reserved */ #define PWM_WPCR MMIO32(PWM_BASE + 0x00E4) #define PWM_WPSR MMIO32(PWM_BASE + 0x00E8) /* 0x00EC:0x00FC - Reserved */ /* 0x0100:0x012C - Reserved */ #define PWM_CMPV(x) MMIO32(PWM_BASE + 0x0130 + 0x10*(x)) #define PWM_CMPVUPD(x) MMIO32(PWM_BASE + 0x0134 + 0x10*(x)) #define PWM_CMMV(x) MMIO32(PWM_BASE + 0x0138 + 0x10*(x)) #define PWM_CMMVUPD(x) MMIO32(PWM_BASE + 0x013C + 0x10*(x)) /* 0x01B0:0x01FC - Reserved */ #define PWM_CMR(x) MMIO32(PWM_BASE + 0x0200 + 0x20*(x)) #define PWM_CDTY(x) MMIO32(PWM_BASE + 0x0204 + 0x20*(x)) #if defined(SAM3X) # define PWM_CDTYUPD(x) MMIO32(PWM_BASE + 0x0208 + 0x20*(x)) # define PWM_CPRD(x) MMIO32(PWM_BASE + 0x020C + 0x20*(x)) # define PWM_CPRDUPD(x) MMIO32(PWM_BASE + 0x0210 + 0x20*(x)) # define PWM_CCNT(x) MMIO32(PWM_BASE + 0x0214 + 0x20*(x)) # define PWM_DT(x) MMIO32(PWM_BASE + 0x0218 + 0x20*(x)) # define PWM_DTUPD(x) MMIO32(PWM_BASE + 0x021C + 0x20*(x)) #elif defined(SAM3N) # define PWM_CPRD(x) MMIO32(PWM_BASE + 0x0208 + 0x20*(x)) # define PWM_CCNT(x) MMIO32(PWM_BASE + 0x020C + 0x20*(x)) # define PWM_CUPD(x) MMIO32(PWM_BASE + 0x0210 + 0x20*(x)) #else # error "Processor family not defined." #endif static inline void pwm_set_period(int ch, uint32_t period) { PWM_CPRD(ch) = period; } static inline void pwm_set_duty(int ch, uint32_t duty) { PWM_CDTY(ch) = duty; } static inline void pwm_enable(int ch) { PWM_ENA = 1 << ch; } static inline void pwm_disable(int ch) { PWM_DIS = 1 << ch; } #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/tc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_TC_H #define SAM3X_TC_H #include #include /* --- Timer Counter (TC) registers -------------------------------------- */ #define TC_CCR(x) MMIO32(TC_BASE + 0x00 + 0x40*(x)) #define TC_CMR(x) MMIO32(TC_BASE + 0x04 + 0x40*(x)) #define TC_SMMR(x) MMIO32(TC_BASE + 0x08 + 0x40*(x)) /* 0x0C + 0x40*channel - Reserved */ #define TC_CV(x) MMIO32(TC_BASE + 0x10 + 0x40*(x)) #define TC_RA(x) MMIO32(TC_BASE + 0x14 + 0x40*(x)) #define TC_RB(x) MMIO32(TC_BASE + 0x18 + 0x40*(x)) #define TC_RC(x) MMIO32(TC_BASE + 0x1C + 0x40*(x)) #define TC_SR(x) MMIO32(TC_BASE + 0x20 + 0x40*(x)) #define TC_IER(x) MMIO32(TC_BASE + 0x24 + 0x40*(x)) #define TC_IDR(x) MMIO32(TC_BASE + 0x28 + 0x40*(x)) #define TC_IMR(x) MMIO32(TC_BASE + 0x2C + 0x40*(x)) #define TC_BCR MMIO32(TC_BASE + 0xC0) #define TC_BMR MMIO32(TC_BASE + 0xC4) #define TC_QIER MMIO32(TC_BASE + 0xC8) #define TC_QIDR MMIO32(TC_BASE + 0xCC) #define TC_QIMR MMIO32(TC_BASE + 0xD0) #define TC_QISR MMIO32(TC_BASE + 0xD4) #define TC_FMR MMIO32(TC_BASE + 0xD8) /* 0x00DC:0x00E0 - Undocumented */ #define TC_WPMR MMIO32(TC_BASE + 0xE4) /* 0x00E8:0x00F8 - Undocumented */ /* 0x00FC - Reserved */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/uart.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_UART_H #define SAM3X_UART_H #include #include /* --- Universal Asynchronous Receiver Transmitter (UART) registers ------- */ #define UART_CR MMIO32(UART_BASE + 0x0000) #define UART_MR MMIO32(UART_BASE + 0x0004) #define UART_IER MMIO32(UART_BASE + 0x0008) #define UART_IDR MMIO32(UART_BASE + 0x000C) #define UART_IMR MMIO32(UART_BASE + 0x0010) #define UART_SR MMIO32(UART_BASE + 0x0014) #define UART_RHR MMIO32(UART_BASE + 0x0018) #define UART_THR MMIO32(UART_BASE + 0x001C) #define UART_BRGR MMIO32(UART_BASE + 0x0020) /* 0x0024:0x003C - Reserved */ /* 0x004C:0x00FC - Reserved */ /* 0x0100:0x0124 - PDC Area */ /* UART Control Register (UART_CR) */ /* Bits [31:9] - Reserved */ #define UART_CR_RSTSTA (0x01 << 8) #define UART_CR_TXDIS (0x01 << 7) #define UART_CR_TXEN (0x01 << 6) #define UART_CR_RXDIS (0x01 << 5) #define UART_CR_RXEN (0x01 << 4) #define UART_CR_RSTTX (0x01 << 3) #define UART_CR_RSTRX (0x01 << 2) /* Bit [1:0] - Reserved */ /* UART Mode Register (UART_MR) */ /* Bits [31:16] - Reserved */ #define UART_MR_CHMODE_MASK (0x03 << 14) #define UART_MR_CHMODE_NORMAL (0x00 << 14) #define UART_MR_CHMODE_AUTOMATIC (0x01 << 14) #define UART_MR_CHMODE_LOCAL_LOOPBACK (0x02 << 14) #define UART_MR_CHMODE_REMOTE_LOOPBACK (0x03 << 14) /* Bits [13:12] - Reserved */ #define UART_MR_PAR_MASK (0x07 << 9) #define UART_MR_PAR_EVEN (0x00 << 9) #define UART_MR_PAR_ODD (0x01 << 9) #define UART_MR_PAR_SPACE (0x02 << 9) #define UART_MR_PAR_MARK (0x03 << 9) #define UART_MR_PAR_NO (0x04 << 9) /* Bits [8:0] - Reserved */ /* UART Status Register (UART_SR) */ /* Bits [31:13] - Reserved */ #define UART_SR_RXBUFF (0x01 << 12) #define UART_SR_TXBUFF (0x01 << 11) /* Bit [10] - Reserved */ #define UART_SR_TXEMPTY (0x01 << 9) /* Bit [8] - Reserved */ #define UART_SR_PARE (0x01 << 7) #define UART_SR_FRAME (0x01 << 6) #define UART_SR_OVRE (0x01 << 5) #define UART_SR_ENDTX (0x01 << 4) #define UART_SR_ENDRX (0x01 << 3) /* Bit [2] - Reserved */ #define UART_SR_TXRDY (0x01 << 1) #define UART_SR_RXRDY (0x01 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/usart.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_USART_H #define SAM3X_USART_H #include #include #define USART0 USART0_BASE #define USART1 USART1_BASE #define USART2 USART2_BASE #define USART3 USART3_BASE /* --- Universal Synchronous Asynchronous Receiver Transmitter (USART) */ #define USART_CR(x) MMIO32((x) + 0x0000) #define USART_MR(x) MMIO32((x) + 0x0004) #define USART_IER(x) MMIO32((x) + 0x0008) #define USART_IDR(x) MMIO32((x) + 0x000C) #define USART_IMR(x) MMIO32((x) + 0x0010) #define USART_CSR(x) MMIO32((x) + 0x0014) #define USART_RHR(x) MMIO32((x) + 0x0018) #define USART_THR(x) MMIO32((x) + 0x001C) #define USART_BRGR(x) MMIO32((x) + 0x0020) #define USART_RTOR(x) MMIO32((x) + 0x0024) #define USART_TTGR(x) MMIO32((x) + 0x0028) /* 0x002C:0x003C - Reserved */ #define USART_FIDI(x) MMIO32((x) + 0x0040) #define USART_NER(x) MMIO32((x) + 0x0044) #define USART_NER(x) MMIO32((x) + 0x0044) /* 0x0048 - Reserved */ #define USART_IF(x) MMIO32((x) + 0x004C) #define USART_MAN(x) MMIO32((x) + 0x0050) #define USART_LINMR(x) MMIO32((x) + 0x0054) #define USART_LINIR(x) MMIO32((x) + 0x0058) /* 0x005C:0x00E0 - Reserved */ #define USART_WPMR(x) MMIO32((x) + 0x00E4) #define USART_WPSR(x) MMIO32((x) + 0x00E8) /* 0x00EC:0x00F8 - Reserved */ #define USART_VERSION(x) MMIO32((x) + 0x00FC) /* 0x0100:0x0124 - PDC Area */ /* USART Control Register (USART_CR) */ /* Bits [31:22] - Reserved */ #define USART_CR_LINWKUP (0x01 << 21) #define USART_CR_LINABT (0x01 << 20) #define USART_CR_RTSDIS (0x01 << 19) #define USART_CR_RCS (0x01 << 19) #define USART_CR_RTSEN (0x01 << 18) #define USART_CR_FCS (0x01 << 18) /* Bits [17:16] - Reserved */ #define USART_CR_RETTO (0x01 << 15) #define USART_CR_RSTNACK (0x01 << 14) #define USART_CR_RSTIT (0x01 << 13) #define USART_CR_SENDA (0x01 << 12) #define USART_CR_STTTO (0x01 << 11) #define USART_CR_STPBRK (0x01 << 10) #define USART_CR_STTBRK (0x01 << 9) #define USART_CR_RSTSTA (0x01 << 8) #define USART_CR_TXDIS (0x01 << 7) #define USART_CR_TXEN (0x01 << 6) #define USART_CR_RXDIS (0x01 << 5) #define USART_CR_RXEN (0x01 << 4) #define USART_CR_RSTTX (0x01 << 3) #define USART_CR_RSTRX (0x01 << 2) /* Bits [1:0] - Reserved */ /* USART Mode Register (USART_MR) */ #define USART_MR_ONEBIT (0x01 << 31) #define USART_MR_MODSYNC (0x01 << 30) #define USART_MR_MAN (0x01 << 29) #define USART_MR_FILTER (0x01 << 28) /* Bit [27] - Reserved */ #define USART_MR_MAX_ITERATION_MASK (0x07 << 24) #define USART_MR_INVDATA (0x01 << 23) #define USART_MR_VAR_SYNC (0x01 << 22) #define USART_MR_DSNACK (0x01 << 21) #define USART_MR_INACK (0x01 << 20) #define USART_MR_OVER (0x01 << 19) #define USART_MR_CLKO (0x01 << 18) #define USART_MR_MODE9 (0x01 << 17) #define USART_MR_MSBF (0x01 << 16) #define USART_MR_CPOL (0x01 << 16) #define USART_MR_CHMODE_MASK (0x03 << 14) #define USART_MR_CHMODE_NORMAL (0x00 << 14) #define USART_MR_CHMODE_AUTOMATIC (0x01 << 14) #define USART_MR_CHMODE_LOCAL_LOOPBACK (0x02 << 14) #define USART_MR_CHMODE_REMOTE_LOOPBACK (0x03 << 14) #define USART_MR_NBSTOP_MASK (0x03 << 12) #define USART_MR_NBSTOP_1_BIT (0x00 << 12) #define USART_MR_NBSTOP_1_5_BIT (0x01 << 12) #define USART_MR_NBSTOP_2_BIT (0x02 << 12) /* Bits [13:12] - Reserved */ #define USART_MR_PAR_MASK (0x07 << 9) #define USART_MR_PAR_EVEN (0x00 << 9) #define USART_MR_PAR_ODD (0x01 << 9) #define USART_MR_PAR_SPACE (0x02 << 9) #define USART_MR_PAR_MARK (0x03 << 9) #define USART_MR_PAR_NO (0x04 << 9) /* Bits [8:0] - Reserved */ #define USART_MR_SYNC (0x01 << 8) #define USART_MR_CPHA (0x01 << 8) #define USART_MR_CHRL_MASK (0x03 << 6) #define USART_MR_CHRL_5BIT (0x00 << 6) #define USART_MR_CHRL_6BIT (0x01 << 6) #define USART_MR_CHRL_7BIT (0x02 << 6) #define USART_MR_CHRL_8BIT (0x03 << 6) #define USART_MR_USCLKS_MASK (0x03 << 4) #define USART_MR_USCLKS_MCK (0x00 << 4) #define USART_MR_USCLKS_DIV (0x01 << 4) #define USART_MR_USCLKS_SCK (0x03 << 4) #define USART_MR_MODE_MASK (0x0F << 0) #define USART_MR_MODE_NORMAL (0x00 << 0) #define USART_MR_MODE_RS485 (0x01 << 0) #define USART_MR_MODE_HW_HANDSHAKING (0x02 << 0) #define USART_MR_MODE_ISO7816_T_0 (0x03 << 0) #define USART_MR_MODE_ISO7816_T_1 (0x04 << 0) #define USART_MR_MODE_IRDA (0x06 << 0) #define USART_MR_MODE_LIN_MASTER (0x0A << 0) #define USART_MR_MODE_LIN_SLAVE (0x0B << 0) #define USART_MR_MODE_SPI_MASTER (0x0E << 0) #define USART_MR_MODE_SPI_SLAVE (0x0F << 0) /* USART Status Register (USART_CSR) */ /* Bits [31:30] - Reserved */ #define USART_CSR_LINSNRE (0x01 << 29) #define USART_CSR_LINCE (0x01 << 28) #define USART_CSR_LINIPE (0x01 << 27) #define USART_CSR_LINSFE (0x01 << 26) #define USART_CSR_LINBE (0x01 << 25) #define USART_CSR_MANERR (0x01 << 24) #define USART_CSR_CTS (0x01 << 23) #define USART_CSR_LINBLS (0x01 << 23) /* Bits [22:20] - Reserved */ #define USART_CSR_CTSIC (0x01 << 19) /* Bits [18:16] - Reserved */ #define USART_CSR_LINTC (0x01 << 15) #define USART_CSR_LINID (0x01 << 14) #define USART_CSR_NACK (0x01 << 13) #define USART_CSR_LINBK (0x01 << 13) #define USART_CSR_RXBUFF (0x01 << 12) #define USART_CSR_TXBUFE (0x01 << 11) /* Bit [10] - Reserved */ #define USART_CSR_TXEMPTY (0x01 << 9) /* Bit [8] - Reserved */ #define USART_CSR_PARE (0x01 << 7) #define USART_CSR_FRAME (0x01 << 6) #define USART_CSR_OVRE (0x01 << 5) #define USART_CSR_ENDTX (0x01 << 4) #define USART_CSR_ENDRX (0x01 << 3) /* Bit [2] - Reserved */ #define USART_CSR_TXRDY (0x01 << 1) #define USART_CSR_RXRDY (0x01 << 0) enum usart_stopbits { USART_STOPBITS_1, USART_STOPBITS_1_5, USART_STOPBITS_2, }; enum usart_parity { USART_PARITY_EVEN, USART_PARITY_ODD, USART_PARITY_SPACE, USART_PARITY_MARK, USART_PARITY_NONE, USART_PARITY_MULTIDROP, }; enum usart_mode { USART_MODE_DISABLED, USART_MODE_RX, USART_MODE_TX, USART_MODE_TX_RX, }; enum usart_flowcontrol { USART_FLOWCONTROL_NONE, USART_FLOWCONTROL_RTS_CTS, }; void usart_set_baudrate(uint32_t usart, uint32_t baud); void usart_set_databits(uint32_t usart, int bits); void usart_set_stopbits(uint32_t usart, enum usart_stopbits); void usart_set_parity(uint32_t usart, enum usart_parity); void usart_set_mode(uint32_t usart, enum usart_mode); void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol); void usart_enable(uint32_t usart); void usart_disable(uint32_t usart); void usart_send(uint32_t usart, uint16_t data); uint16_t usart_recv(uint32_t usart); void usart_wait_send_ready(uint32_t usart); void usart_wait_recv_ready(uint32_t usart); void usart_send_blocking(uint32_t usart, uint16_t data); uint16_t usart_recv_blocking(uint32_t usart); void usart_enable_rx_interrupt(uint32_t usart); void usart_disable_rx_interrupt(uint32_t usart); #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/sam/wdt.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef SAM3X_WDT_H #define SAM3X_WDT_H #include #include /* --- WDT registers ----------------------------------------------------- */ #define WDT_CR MMIO32(WDT_BASE + 0x00) #define WDT_MR MMIO32(WDT_BASE + 0x04) #define WDT_SR MMIO32(WDT_BASE + 0x08) /* --- WDT_CR values ------------------------------------------------------ */ #define WDT_CR_KEY (0xA5 << 24) /* Bits [23:1]: Reserved. */ #define WDT_CR_WDRSTT (1 << 0) /* --- WDT_MR values ------------------------------------------------------ */ /* Bits [31:32]: Reserved. */ #define WDT_MR_WDIDLEHLT (1 << 29) #define WDT_MR_WDDBGHLT (1 << 28) #define WDT_MR_WDD_MASK (0xFFF << 16) #define WDT_MR_WDDIS (1 << 15) #define WDT_MR_WDRPROC (1 << 14) #define WDT_MR_WDRSTEN (1 << 13) #define WDT_MR_WDFIEN (1 << 12) #define WDT_MR_WDV_MASK (0xFFF << 0) /* --- WDT_SR values ------------------------------------------------------ */ /* Bits [31:2]: Reserved. */ #define WDT_SR_WDERR (1 << 1) #define WDT_SR_WDUNF (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/adc.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/can.h ================================================ /** @defgroup can_defines CAN defines @ingroup STM32F_defines @brief libopencm3 Defined Constants and Types for STM32 CAN @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Piotr Esden-Tempski @date 12 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CAN_H #define LIBOPENCM3_CAN_H #include #include /**@{*/ /* --- Convenience macros -------------------------------------------------- */ /* CAN register base addresses (for convenience) */ /*****************************************************************************/ /** @defgroup can_reg_base CAN register base address @ingroup can_defines @{*/ #define CAN1 BX_CAN1_BASE #define CAN2 BX_CAN2_BASE /**@}*/ /* --- CAN registers ------------------------------------------------------- */ /* CAN master control register (CAN_MCR) */ #define CAN_MCR(can_base) MMIO32(can_base + 0x000) /* CAN master status register (CAN_MSR) */ #define CAN_MSR(can_base) MMIO32(can_base + 0x004) /* CAN transmit status register (CAN_TSR) */ #define CAN_TSR(can_base) MMIO32(can_base + 0x008) /* CAN receive FIFO 0 register (CAN_RF0R) */ #define CAN_RF0R(can_base) MMIO32(can_base + 0x00C) /* CAN receive FIFO 1 register (CAN_RF1R) */ #define CAN_RF1R(can_base) MMIO32(can_base + 0x010) /* CAN interrupt enable register (CAN_IER) */ #define CAN_IER(can_base) MMIO32(can_base + 0x014) /* CAN error status register (CAN_ESR) */ #define CAN_ESR(can_base) MMIO32(can_base + 0x018) /* CAN bit timing register (CAN_BTR) */ #define CAN_BTR(can_base) MMIO32(can_base + 0x01C) /* Registers in the offset range 0x020 to 0x17F are reserved. */ /* --- CAN mailbox registers ----------------------------------------------- */ /* CAN mailbox / FIFO register offsets */ #define CAN_MBOX0 0x180 #define CAN_MBOX1 0x190 #define CAN_MBOX2 0x1A0 #define CAN_FIFO0 0x1B0 #define CAN_FIFO1 0x1C0 /* CAN TX mailbox identifier register (CAN_TIxR) */ #define CAN_TIxR(can_base, mbox) MMIO32(can_base + mbox + 0x0) #define CAN_TI0R(can_base) CAN_TIxR(can_base, CAN_MBOX0) #define CAN_TI1R(can_base) CAN_TIxR(can_base, CAN_MBOX1) #define CAN_TI2R(can_base) CAN_TIxR(can_base, CAN_MBOX2) /* CAN mailbox data length control and time stamp register (CAN_TDTxR) */ #define CAN_TDTxR(can_base, mbox) MMIO32(can_base + mbox + 0x4) #define CAN_TDT0R(can_base) CAN_TDTxR(can_base, CAN_MBOX0) #define CAN_TDT1R(can_base) CAN_TDTxR(can_base, CAN_MBOX1) #define CAN_TDT2R(can_base) CAN_TDTxR(can_base, CAN_MBOX2) /* CAN mailbox data low register (CAN_TDLxR) */ #define CAN_TDLxR(can_base, mbox) MMIO32(can_base + mbox + 0x8) #define CAN_TDL0R(can_base) CAN_TDLxR(can_base, CAN_MBOX0) #define CAN_TDL1R(can_base) CAN_TDLxR(can_base, CAN_MBOX1) #define CAN_TDL2R(can_base) CAN_TDLxR(can_base, CAN_MBOX2) /* CAN mailbox data high register (CAN_TDHxR) */ #define CAN_TDHxR(can_base, mbox) MMIO32(can_base + mbox + 0xC) #define CAN_TDH0R(can_base) CAN_TDHxR(can_base, CAN_MBOX0) #define CAN_TDH1R(can_base) CAN_TDHxR(can_base, CAN_MBOX1) #define CAN_TDH2R(can_base) CAN_TDHxR(can_base, CAN_MBOX2) /* CAN RX FIFO identifier register (CAN_RIxR) */ #define CAN_RIxR(can_base, fifo) MMIO32(can_base + fifo + 0x0) #define CAN_RI0R(can_base) CAN_RIxR(can_base, CAN_FIFO0) #define CAN_RI1R(can_base) CAN_RIxR(can_base, CAN_FIFO1) /* CAN RX FIFO mailbox data length control & time stamp register (CAN_RDTxR) */ #define CAN_RDTxR(can_base, fifo) MMIO32(can_base + fifo + 0x4) #define CAN_RDT0R(can_base) CAN_RDTxR(can_base, CAN_FIFO0) #define CAN_RDT1R(can_base) CAN_RDTxR(can_base, CAN_FIFO1) /* CAN RX FIFO mailbox data low register (CAN_RDLxR) */ #define CAN_RDLxR(can_base, fifo) MMIO32(can_base + fifo + 0x8) #define CAN_RDL0R(can_base) CAN_RDLxR(can_base, CAN_FIFO0) #define CAN_RDL1R(can_base) CAN_RDLxR(can_base, CAN_FIFO1) /* CAN RX FIFO mailbox data high register (CAN_RDHxR) */ #define CAN_RDHxR(can_base, fifo) MMIO32(can_base + fifo + 0xC) #define CAN_RDH0R(can_base) CAN_RDHxR(can_base, CAN_FIFO0) #define CAN_RDH1R(can_base) CAN_RDHxR(can_base, CAN_FIFO1) /* --- CAN filter registers ------------------------------------------------ */ /* CAN filter master register (CAN_FMR) */ #define CAN_FMR(can_base) MMIO32(can_base + 0x200) /* CAN filter mode register (CAN_FM1R) */ #define CAN_FM1R(can_base) MMIO32(can_base + 0x204) /* Register offset 0x208 is reserved. */ /* CAN filter scale register (CAN_FS1R) */ #define CAN_FS1R(can_base) MMIO32(can_base + 0x20C) /* Register offset 0x210 is reserved. */ /* CAN filter FIFO assignement register (CAN_FFA1R) */ #define CAN_FFA1R(can_base) MMIO32(can_base + 0x214) /* Register offset 0x218 is reserved. */ /* CAN filter activation register (CAN_FA1R) */ #define CAN_FA1R(can_base) MMIO32(can_base + 0x21C) /* Register offset 0x220 is reserved. */ /* Registers with offset 0x224 to 0x23F are reserved. */ /* CAN filter bank registers (CAN_FiRx) */ /* * Connectivity line devices have 28 banks so the bank ID spans 0..27 * all other devices have 14 banks so the bank ID spans 0..13. */ #define CAN_FiR1(can_base, bank) MMIO32(can_base + 0x240 + \ (bank * 0x8) + 0x0) #define CAN_FiR2(can_base, bank) MMIO32(can_base + 0x240 + \ (bank * 0x8) + 0x4) /* --- CAN_MCR values ------------------------------------------------------ */ /* 31:17 Reserved, forced by hardware to 0 */ /* DBF: Debug freeze */ #define CAN_MCR_DBF (1 << 16) /* RESET: bxCAN software master reset */ #define CAN_MCR_RESET (1 << 15) /* 14:8 Reserved, forced by hardware to 0 */ /* TTCM: Time triggered communication mode */ #define CAN_MCR_TTCM (1 << 7) /* ABOM: Automatic bus-off management */ #define CAN_MCR_ABOM (1 << 6) /* AWUM: Automatic wakeup mode */ #define CAN_MCR_AWUM (1 << 5) /* NART: No automatic retransmission */ #define CAN_MCR_NART (1 << 4) /* RFLM: Receive FIFO locked mode */ #define CAN_MCR_RFLM (1 << 3) /* TXFP: Transmit FIFO priority */ #define CAN_MCR_TXFP (1 << 2) /* SLEEP: Sleep mode request */ #define CAN_MCR_SLEEP (1 << 1) /* INRQ: Initialization request */ #define CAN_MCR_INRQ (1 << 0) /* --- CAN_MSR values ------------------------------------------------------ */ /* 31:12 Reserved, forced by hardware to 0 */ /* RX: CAN Rx signal */ #define CAN_MSR_RX (1 << 11) /* SAMP: Last sample point */ #define CAN_MSR_SAMP (1 << 10) /* RXM: Receive mode */ #define CAN_MSR_RXM (1 << 9) /* TXM: Transmit mode */ #define CAN_MSR_TXM (1 << 8) /* 7:5 Reserved, forced by hardware to 0 */ /* SLAKI: Sleep acknowledge interrupt */ #define CAN_MSR_SLAKI (1 << 4) /* WKUI: Wakeup interrupt */ #define CAN_MSR_WKUI (1 << 3) /* ERRI: Error interrupt */ #define CAN_MSR_ERRI (1 << 2) /* SLAK: Sleep acknowledge */ #define CAN_MSR_SLAK (1 << 1) /* INAK: Initialization acknowledge */ #define CAN_MSR_INAK (1 << 0) /* --- CAN_TSR values ------------------------------------------------------ */ /* LOW2: Lowest priority flag for mailbox 2 */ #define CAN_TSR_LOW2 (1 << 31) /* LOW1: Lowest priority flag for mailbox 1 */ #define CAN_TSR_LOW1 (1 << 30) /* LOW0: Lowest priority flag for mailbox 0 */ #define CAN_TSR_LOW0 (1 << 29) /* TME2: Transmit mailbox 2 empty */ #define CAN_TSR_TME2 (1 << 28) /* TME1: Transmit mailbox 1 empty */ #define CAN_TSR_TME1 (1 << 27) /* TME0: Transmit mailbox 0 empty */ #define CAN_TSR_TME0 (1 << 26) /* CODE[1:0]: Mailbox code */ #define CAN_TSR_CODE_MASK (0x3 << 24) /* ABRQ2: Abort request for mailbox 2 */ #define CAN_TSR_TABRQ2 (1 << 23) /* 22:20 Reserved, forced by hardware to 0 */ /* TERR2: Transmission error for mailbox 2 */ #define CAN_TSR_TERR2 (1 << 19) /* ALST2: Arbitration lost for mailbox 2 */ #define CAN_TSR_ALST2 (1 << 18) /* TXOK2: Transmission OK for mailbox 2 */ #define CAN_TSR_TXOK2 (1 << 17) /* RQCP2: Request completed mailbox 2 */ #define CAN_TSR_RQCP2 (1 << 16) /* ABRQ1: Abort request for mailbox 1 */ #define CAN_TSR_ABRQ1 (1 << 15) /* 14:12 Reserved, forced by hardware to 0 */ /* TERR1: Transmission error for mailbox 1 */ #define CAN_TSR_TERR1 (1 << 11) /* ALST1: Arbitration lost for mailbox 1 */ #define CAN_TSR_ALST1 (1 << 10) /* TXOK1: Transmission OK for mailbox 1 */ #define CAN_TSR_TXOK1 (1 << 9) /* RQCP1: Request completed mailbox 1 */ #define CAN_TSR_RQCP1 (1 << 8) /* ABRQ0: Abort request for mailbox 0 */ #define CAN_TSR_ABRQ0 (1 << 7) /* 6:4 Reserved, forced by hardware to 0 */ /* TERR0: Transmission error for mailbox 0 */ #define CAN_TSR_TERR0 (1 << 3) /* ALST0: Arbitration lost for mailbox 0 */ #define CAN_TSR_ALST0 (1 << 2) /* TXOK0: Transmission OK for mailbox 0 */ #define CAN_TSR_TXOK0 (1 << 1) /* RQCP0: Request completed mailbox 0 */ #define CAN_TSR_RQCP0 (1 << 0) /* --- CAN_RF0R values ----------------------------------------------------- */ /* 31:6 Reserved, forced by hardware to 0 */ /* RFOM0: Release FIFO 0 output mailbox */ #define CAN_RF0R_RFOM0 (1 << 5) /* FOVR0: FIFO 0 overrun */ #define CAN_RF0R_FAVR0 (1 << 4) /* FULL0: FIFO 0 full */ #define CAN_RF0R_FULL0 (1 << 3) /* 2 Reserved, forced by hardware to 0 */ /* FMP0[1:0]: FIFO 0 message pending */ #define CAN_RF0R_FMP0_MASK (0x3 << 0) /* --- CAN_RF1R values ----------------------------------------------------- */ /* 31:6 Reserved, forced by hardware to 0 */ /* RFOM1: Release FIFO 1 output mailbox */ #define CAN_RF1R_RFOM1 (1 << 5) /* FOVR1: FIFO 1 overrun */ #define CAN_RF1R_FAVR1 (1 << 4) /* FULL1: FIFO 1 full */ #define CAN_RF1R_FULL1 (1 << 3) /* 2 Reserved, forced by hardware to 0 */ /* FMP1[1:0]: FIFO 1 message pending */ #define CAN_RF1R_FMP1_MASK (0x3 << 0) /* --- CAN_IER values ------------------------------------------------------ */ /* 32:18 Reserved, forced by hardware to 0 */ /* SLKIE: Sleep interrupt enable */ #define CAN_IER_SLKIE (1 << 17) /* WKUIE: Wakeup interrupt enable */ #define CAN_IER_WKUIE (1 << 16) /* ERRIE: Error interrupt enable */ #define CAN_IER_ERRIE (1 << 15) /* 14:12 Reserved, forced by hardware to 0 */ /* LECIE: Last error code interrupt enable */ #define CAN_IER_LECIE (1 << 11) /* BOFIE: Bus-off interrupt enable */ #define CAN_IER_BOFIE (1 << 10) /* EPVIE: Error passive interrupt enable */ #define CAN_IER_EPVIE (1 << 9) /* EWGIE: Error warning interrupt enable */ #define CAN_IER_EWGIE (1 << 8) /* 7 Reserved, forced by hardware to 0 */ /* FOVIE1: FIFO overrun interrupt enable */ #define CAN_IER_FOVIE1 (1 << 6) /* FFIE1: FIFO full interrupt enable */ #define CAN_IER_FFIE1 (1 << 5) /* FMPIE1: FIFO message pending interrupt enable */ #define CAN_IER_FMPIE1 (1 << 4) /* FOVIE0: FIFO overrun interrupt enable */ #define CAN_IER_FOVIE0 (1 << 3) /* FFIE0: FIFO full interrupt enable */ #define CAN_IER_FFIE0 (1 << 2) /* FMPIE0: FIFO message pending interrupt enable */ #define CAN_IER_FMPIE0 (1 << 1) /* TMEIE: Transmit mailbox empty interrupt enable */ #define CAN_IER_TMEIE (1 << 0) /* --- CAN_ESR values ------------------------------------------------------ */ /* REC[7:0]: Receive error counter */ #define CAN_ESR_REC_MASK (0xF << 24) /* TEC[7:0]: Least significant byte of the 9-bit transmit error counter */ #define CAN_ESR_TEC_MASK (0xF << 16) /* 15:7 Reserved, forced by hardware to 0 */ /* LEC[2:0]: Last error code */ #define CAN_ESR_LEC_NO_ERROR (0x0 << 4) #define CAN_ESR_LEC_STUFF_ERROR (0x1 << 4) #define CAN_ESR_LEC_FORM_ERROR (0x2 << 4) #define CAN_ESR_LEC_ACK_ERROR (0x3 << 4) #define CAN_ESR_LEC_REC_ERROR (0x4 << 4) #define CAN_ESR_LEC_DOM_ERROR (0x5 << 4) #define CAN_ESR_LEC_CRC_ERROR (0x6 << 4) #define CAN_ESR_LEC_SOFT_ERROR (0x7 << 4) #define CAN_ESR_LEC_MASK (0x7 << 4) /* 3 Reserved, forced by hardware to 0 */ /* BOFF: Bus-off flag */ #define CAN_ESR_BOFF (1 << 2) /* EPVF: Error passive flag */ #define CAN_ESR_EPVF (1 << 1) /* EWGF: Error warning flag */ #define CAN_ESR_EWGF (1 << 0) /* --- CAN_BTR values ------------------------------------------------------ */ /* SILM: Silent mode (debug) */ #define CAN_BTR_SILM (1 << 31) /* LBKM: Loop back mode (debug) */ #define CAN_BTR_LBKM (1 << 30) /* 29:26 Reserved, forced by hardware to 0 */ /* SJW[1:0]: Resynchronization jump width */ #define CAN_BTR_SJW_1TQ (0x0 << 24) #define CAN_BTR_SJW_2TQ (0x1 << 24) #define CAN_BTR_SJW_3TQ (0x2 << 24) #define CAN_BTR_SJW_4TQ (0x3 << 24) #define CAN_BTR_SJW_MASK (0x3 << 24) #define CAN_BTR_SJW_SHIFT 24 /* 23 Reserved, forced by hardware to 0 */ /* TS2[2:0]: Time segment 2 */ #define CAN_BTR_TS2_1TQ (0x0 << 20) #define CAN_BTR_TS2_2TQ (0x1 << 20) #define CAN_BTR_TS2_3TQ (0x2 << 20) #define CAN_BTR_TS2_4TQ (0x3 << 20) #define CAN_BTR_TS2_5TQ (0x4 << 20) #define CAN_BTR_TS2_6TQ (0x5 << 20) #define CAN_BTR_TS2_7TQ (0x6 << 20) #define CAN_BTR_TS2_8TQ (0x7 << 20) #define CAN_BTR_TS2_MASK (0x7 << 20) #define CAN_BTR_TS2_SHIFT 20 /* TS1[3:0]: Time segment 1 */ #define CAN_BTR_TS1_1TQ (0x0 << 16) #define CAN_BTR_TS1_2TQ (0x1 << 16) #define CAN_BTR_TS1_3TQ (0x2 << 16) #define CAN_BTR_TS1_4TQ (0x3 << 16) #define CAN_BTR_TS1_5TQ (0x4 << 16) #define CAN_BTR_TS1_6TQ (0x5 << 16) #define CAN_BTR_TS1_7TQ (0x6 << 16) #define CAN_BTR_TS1_8TQ (0x7 << 16) #define CAN_BTR_TS1_9TQ (0x8 << 16) #define CAN_BTR_TS1_10TQ (0x9 << 16) #define CAN_BTR_TS1_11TQ (0xA << 16) #define CAN_BTR_TS1_12TQ (0xB << 16) #define CAN_BTR_TS1_13TQ (0xC << 16) #define CAN_BTR_TS1_14TQ (0xD << 16) #define CAN_BTR_TS1_15TQ (0xE << 16) #define CAN_BTR_TS1_16TQ (0xF << 16) #define CAN_BTR_TS1_MASK (0xF << 16) #define CAN_BTR_TS1_SHIFT 16 /* 15:10 Reserved, forced by hardware to 0 */ /* BRP[9:0]: Baud rate prescaler */ #define CAN_BTR_BRP_MASK (0x1FFUL << 0) /* --- CAN_TIxR values ------------------------------------------------------ */ /* STID[10:0]: Standard identifier */ #define CAN_TIxR_STID_MASK (0x7FF << 21) #define CAN_TIxR_STID_SHIFT 21 /* EXID[15:0]: Extended identifier */ #define CAN_TIxR_EXID_MASK (0x1FFFFFF << 3) #define CAN_TIxR_EXID_SHIFT 3 /* IDE: Identifier extension */ #define CAN_TIxR_IDE (1 << 2) /* RTR: Remote transmission request */ #define CAN_TIxR_RTR (1 << 1) /* TXRQ: Transmit mailbox request */ #define CAN_TIxR_TXRQ (1 << 0) /* --- CAN_TDTxR values ----------------------------------------------------- */ /* TIME[15:0]: Message time stamp */ #define CAN_TDTxR_TIME_MASK (0xFFFF << 15) #define CAN_TDTxR_TIME_SHIFT 15 /* 15:6 Reserved, forced by hardware to 0 */ /* TGT: Transmit global time */ #define CAN_TDTxR_TGT (1 << 5) /* 7:4 Reserved, forced by hardware to 0 */ /* DLC[3:0]: Data length code */ #define CAN_TDTxR_DLC_MASK (0xF << 0) #define CAN_TDTxR_DLC_SHIFT 0 /* --- CAN_TDLxR values ----------------------------------------------------- */ /* DATA3[7:0]: Data byte 3 */ /* DATA2[7:0]: Data byte 2 */ /* DATA1[7:0]: Data byte 1 */ /* DATA0[7:0]: Data byte 0 */ /* --- CAN_TDHxR values ----------------------------------------------------- */ /* DATA7[7:0]: Data byte 7 */ /* DATA6[7:0]: Data byte 6 */ /* DATA5[7:0]: Data byte 5 */ /* DATA4[7:0]: Data byte 4 */ /* --- CAN_RIxR values ------------------------------------------------------ */ /* STID[10:0]: Standard identifier */ #define CAN_RIxR_STID_MASK (0x7FF) #define CAN_RIxR_STID_SHIFT 21 /* EXID[15:0]: Extended identifier */ #define CAN_RIxR_EXID_MASK (0x1FFFFFFF) #define CAN_RIxR_EXID_SHIFT 3 /* IDE: Identifier extension */ #define CAN_RIxR_IDE (1 << 2) /* RTR: Remote transmission request */ #define CAN_RIxR_RTR (1 << 1) /* 0 Reserved */ /* --- CAN_RDTxR values ----------------------------------------------------- */ /* TIME[15:0]: Message time stamp */ #define CAN_RDTxR_TIME_MASK (0xFFFF << 15) #define CAN_RDTxR_TIME_SHIFT 15 /* FMI[7:0]: Filter match index */ #define CAN_RDTxR_FMI_MASK (0xFF << 8) #define CAN_RDTxR_FMI_SHIFT 8 /* 7:4 Reserved, forced by hardware to 0 */ /* DLC[3:0]: Data length code */ #define CAN_RDTxR_DLC_MASK (0xF << 0) #define CAN_RDTxR_DLC_SHIFT 0 /* --- CAN_RDLxR values ----------------------------------------------------- */ /* DATA3[7:0]: Data byte 3 */ /* DATA2[7:0]: Data byte 2 */ /* DATA1[7:0]: Data byte 1 */ /* DATA0[7:0]: Data byte 0 */ /* --- CAN_RDHxR values ----------------------------------------------------- */ /* DATA7[7:0]: Data byte 7 */ /* DATA6[7:0]: Data byte 6 */ /* DATA5[7:0]: Data byte 5 */ /* DATA4[7:0]: Data byte 4 */ /* --- CAN_FMR values ------------------------------------------------------- */ /* 31:14 Reserved, forced to reset value */ /* * CAN2SB[5:0]: CAN2 start bank * (only on connectivity line devices otherwise reserved) */ #define CAN_FMR_CAN2SB_MASK (0x3F << 8) #define CAN_FMR_CAN2SB_SHIFT 15 /* 7:1 Reserved, forced to reset value */ /* FINIT: Filter init mode */ #define CAN_FMR_FINIT (1 << 0) /* --- CAN_FM1R values ------------------------------------------------------ */ /* 31:28 Reserved, forced by hardware to 0 */ /* * FBMx: Filter mode * x is 0..27 should be calculated by a helper function making so many macros * seems like an overkill? */ /* --- CAN_FS1R values ------------------------------------------------------ */ /* 31:28 Reserved, forced by hardware to 0 */ /* * FSCx: Filter scale configuration * x is 0..27 should be calculated by a helper function making so many macros * seems like an overkill? */ /* --- CAN_FFA1R values ----------------------------------------------------- */ /* 31:28 Reserved, forced by hardware to 0 */ /* * FFAx: Filter scale configuration * x is 0..27 should be calculated by a helper function making so many macros * seems like an overkill? */ /* --- CAN_FA1R values ------------------------------------------------------ */ /* 31:28 Reserved, forced by hardware to 0 */ /* * FACTx: Filter active * x is 0..27 should be calculated by a helper function making so many macros * seems like an overkill? */ /* --- CAN_FiRx values ------------------------------------------------------ */ /* FB[31:0]: Filter bits */ /* --- CAN functions -------------------------------------------------------- */ BEGIN_DECLS void can_reset(uint32_t canport); int can_init(uint32_t canport, bool ttcm, bool abom, bool awum, bool nart, bool rflm, bool txfp, uint32_t sjw, uint32_t ts1, uint32_t ts2, uint32_t brp, bool loopback, bool silent); void can_filter_init(uint32_t canport, uint32_t nr, bool scale_32bit, bool id_list_mode, uint32_t fr1, uint32_t fr2, uint32_t fifo, bool enable); void can_filter_id_mask_16bit_init(uint32_t canport, uint32_t nr, uint16_t id1, uint16_t mask1, uint16_t id2, uint16_t mask2, uint32_t fifo, bool enable); void can_filter_id_mask_32bit_init(uint32_t canport, uint32_t nr, uint32_t id, uint32_t mask, uint32_t fifo, bool enable); void can_filter_id_list_16bit_init(uint32_t canport, uint32_t nr, uint16_t id1, uint16_t id2, uint16_t id3, uint16_t id4, uint32_t fifo, bool enable); void can_filter_id_list_32bit_init(uint32_t canport, uint32_t nr, uint32_t id1, uint32_t id2, uint32_t fifo, bool enable); void can_enable_irq(uint32_t canport, uint32_t irq); void can_disable_irq(uint32_t canport, uint32_t irq); int can_transmit(uint32_t canport, uint32_t id, bool ext, bool rtr, uint8_t length, uint8_t *data); void can_receive(uint32_t canport, uint8_t fifo, bool release, uint32_t *id, bool *ext, bool *rtr, uint32_t *fmi, uint8_t *length, uint8_t *data); void can_fifo_release(uint32_t canport, uint8_t fifo); bool can_available_mailbox(uint32_t canport); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/cec.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/crc_common_all.h ================================================ /** @addtogroup crc_defines @author @htmlonly © @endhtmlonly 2010 Thomas Otto */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA CRC.H The order of header inclusion is important. crc.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_CRC_H /** @endcond */ #ifndef LIBOPENCM3_CRC_COMMON_ALL_H #define LIBOPENCM3_CRC_COMMON_ALL_H /**@{*/ #include /* --- CRC registers ------------------------------------------------------- */ /* Data register (CRC_DR) */ #define CRC_DR MMIO32(CRC_BASE + 0x00) /* Independent data register (CRC_IDR) */ #define CRC_IDR MMIO32(CRC_BASE + 0x04) /* Control register (CRC_CR) */ #define CRC_CR MMIO32(CRC_BASE + 0x08) /* --- CRC_DR values ------------------------------------------------------- */ /* Bits [31:0]: Data register */ /* --- CRC_IDR values ------------------------------------------------------ */ /* Bits [31:8]: Reserved */ /* Bits [7:0]: General-purpose 8-bit data register bits */ /* --- CRC_CR values ------------------------------------------------------- */ /* Bits [31:1]: Reserved */ /* RESET bit */ #define CRC_CR_RESET (1 << 0) /* --- CRC function prototypes --------------------------------------------- */ BEGIN_DECLS /* TODO */ /** * Reset the CRC calculator to initial values. */ void crc_reset(void); /** * Add a word to the CRC calculator and return the result. * @param data new word to add to the CRC calculator * @return final CRC calculator value */ uint32_t crc_calculate(uint32_t data); /** * Add a block of data to the CRC calculator and return the final result * @param datap pointer to the start of a block of 32bit data words * @param size length of data, in 32bit increments * @return final CRC calculator value */ uint32_t crc_calculate_block(uint32_t *datap, int size); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "crc_common_all.h should not be included explicitly, only via crc.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/crypto_common_f24.h ================================================ /** @addtogroup crypto_defines * * @warning The CRYP subsystem is present only in a limited set of devices, * see next section for list of supported devices. * * @section crypto_api_supported Supported devices * * - STM32F205 * - STM32F207 * - STM32F215 * - STM32F217 * - STM32F405 * - STM32F407 * - STM32F415 * - STM32F417 (tested) * - STM32F427 * - STM32F437 * * @section crypto_api_theory Theory of operation * * * * @section crypto_api_basic Basic handling API * * * @b Example @b 1: Blocking mode * * @code * //[enable-clocks] * crypto_set_key(CRYPTO_KEY_128BIT,key); * crypto_set_iv(iv); // only in CBC or CTR mode * crypto_set_datatype(CRYPTO_DATA_16BIT); * crypto_set_algorithm(ENCRYPT_AES_ECB); * crypto_start(); * foreach(block in blocks) * crypto_process_block(plaintext,ciphertext,blocksize); * crypto_stop(); * @endcode * * @section crypto_api_interrupt Interrupt supported handling API * * @warning This operation mode is currently not supported. * * @b Example @b 2: Interrupt mode * * @code * //[enable-clocks] * crypto_set_key(CRYPTO_KEY_128BIT,key); * crypto_set_iv(iv); // only in CBC or CTR mode * crypto_set_datatype(CRYPTO_DATA_16BIT); * crypto_set_algorithm(ENCRYPT_AES_ECB); * crypto_start(); * [... API to be described later ...] * crypto_stop(); * @endcode * * @section crypto_api_dma DMA handling API * * @warning This operation mode is currently not supported. * * @b Example @b 3: DMA mode * * @code * //[enable-clocks] * crypto_set_key(CRYPTO_KEY_128BIT,key); * crypto_set_iv(iv); // only in CBC or CTR mode * crypto_set_datatype(CRYPTO_DATA_16BIT); * crypto_set_algorithm(ENCRYPT_AES_ECB); * crypto_start(); * [... API to be described later ...] * crypto_stop(); * @endcode */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA CRYP.H The order of header inclusion is important. cryp.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_CRYPTO_H /** @endcond */ #ifndef LIBOPENCM3_CRYPTO_COMMON_F24_H #define LIBOPENCM3_CRYPTO_COMMON_F24_H #include /**@{*/ /* --- CRYP registers ------------------------------------------------------ */ /** @defgroup crypto_registers_gen Registers (Generic) * * @brief Register access to the CRYP controller. (All chips) * * @ingroup crypto_defines */ /**@{*/ #define CRYP CRYP_BASE /* CRYP Control Register (CRYP_CR) */ #define CRYP_CR MMIO32(CRYP_BASE + 0x00) /* CRYP Status Register (CRYP_SR) */ #define CRYP_SR MMIO32(CRYP_BASE + 0x04) /* CRYP Data Input Register (CRYP_DIN) */ #define CRYP_DIN MMIO32(CRYP_BASE + 0x08) /** CRYP Data Output Register (CRYP_DOUT) @see blablabla */ #define CRYP_DOUT MMIO32(CRYP_BASE + 0x0C) /* CRYP DMA Control Register (CRYP_DMACR) */ #define CRYP_DMACR MMIO32(CRYP_BASE + 0x10) /* CRYP Interrupt mask set/clear register (CRYP_IMSCR) */ #define CRYP_IMSCR MMIO32(CRYP_BASE + 0x14) /* CRYP Raw Interrupt status register (CRYP_RISR) */ #define CRYP_RISR MMIO32(CRYP_BASE + 0x18) /* CRYP Masked Interrupt status register (CRYP_MISR) */ #define CRYP_MISR MMIO32(CRYP_BASE + 0x1C) /* CRYP Key registers (CRYP_KxLR) x=0..3 */ #define CRYP_KR(i) MMIO64(CRYP_BASE + 0x20 + (i) * 8) /* CRYP Initialization Vector Registers (CRYP_IVxLR) x=0..1 */ #define CRYP_IVR(i) MMIO32(CRYP_BASE + 0x40 + (i) * 8) /* --- CRYP_CR values ------------------------------------------------------ */ /* ALGODIR: Algorithm direction */ #define CRYP_CR_ALGODIR (1 << 2) /* ALGOMODE: Algorithm mode */ #define CRYP_CR_ALGOMODE_SHIFT 3 #define CRYP_CR_ALGOMODE (7 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_TDES_ECB (0 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_TDES_CBC (1 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_DES_ECB (2 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_DES_CBC (3 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_AES_ECB (4 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_AES_CBC (5 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_AES_CTR (6 << CRYP_CR_ALGOMODE_SHIFT) #define CRYP_CR_ALGOMODE_AES_PREP (7 << CRYP_CR_ALGOMODE_SHIFT) /* DATATYPE: Data type selection */ #define CRYP_CR_DATATYPE_SHIFT 6 #define CRYP_CR_DATATYPE (3 << CRYP_CR_DATATYPE_SHIFT) #define CRYP_CR_DATATYPE_32 (0 << CRYP_CR_DATATYPE_SHIFT) #define CRYP_CR_DATATYPE_16 (1 << CRYP_CR_DATATYPE_SHIFT) #define CRYP_CR_DATATYPE_8 (2 << CRYP_CR_DATATYPE_SHIFT) #define CRYP_CR_DATATYPE_BIT (3 << CRYP_CR_DATATYPE_SHIFT) /* KEYSIZE: Key size selection (AES mode only)*/ #define CRYP_CR_KEYSIZE_SHIFT 8 #define CRYP_CR_KEYSIZE (3 << CRYP_CR_KEYSIZE_SHIFT) #define CRYP_CR_KEYSIZE_128 (0 << CRYP_CR_KEYSIZE_SHIFT) #define CRYP_CR_KEYSIZE_192 (1 << CRYP_CR_KEYSIZE_SHIFT) #define CRYP_CR_KEYSIZE_256 (2 << CRYP_CR_KEYSIZE_SHIFT) /* FFLUSH: FIFO Flush */ #define CRYP_CR_FFLUSH (1 << 14) /* CRYPEN: Cryptographic processor enable*/ #define CRYP_CR_CRYPEN (1 << 15) /* --- CRYP_SR values ------------------------------------------------------ */ /* IFEM: Input FIFO empty */ #define CRYP_SR_IFEM (1 << 0) /* IFNF: Input FIFO not full */ #define CRYP_SR_IFNF (1 << 1) /* OFNE: Output FIFO not empty */ #define CRYP_SR_OFNE (1 << 2) /* OFFU: Output FIFO full */ #define CRYP_SR_OFFU (1 << 3) /* BUSY: Busy bit */ #define CRYP_SR_BUSY (1 << 4) /* --- CRYP_DMACR values --------------------------------------------------- */ /* DIEN: DMA input enable */ #define CRYP_DMACR_DIEN (1 << 0) /* DOEN: DMA output enable */ #define CRYP_DMACR_DOEN (1 << 1) /* --- CRYP_IMSCR values --------------------------------------------------- */ /* INIM: Input FIFO service interrupt mask */ #define CRYP_IMSCR_INIM (1 << 0) /* OUTIM: Output FIFO service interrupt mask */ #define CRYP_IMSCR_OUTIM (1 << 1) /* --- CRYP_RISR values ---------------------------------------------------- */ /* INRIS: Input FIFO service raw interrupt status */ #define CRYP_RISR_INRIS (1 << 0) /* OUTRIS: Output FIFO service raw data */ #define CRYP_RISR_OUTRIS (1 << 0) /* --- CRYP_MISR values ---------------------------------------------------- */ /* INMIS: Input FIFO service masked interrupt status */ #define CRYP_MISR_INMIS (1 << 0) /* OUTMIS: Output FIFO service masked interrupt status */ #define CRYP_MISR_OUTMIS (1 << 0) /**@}*/ /** @defgroup crypto_api_gen API (Generic) * * @brief API for the CRYP controller * * @ingroup crypto_defines */ /**@{*/ enum crypto_mode { ENCRYPT_TDES_ECB = CRYP_CR_ALGOMODE_TDES_ECB, ENCRYPT_TDES_CBC = CRYP_CR_ALGOMODE_TDES_CBC, ENCRYPT_DES_ECB = CRYP_CR_ALGOMODE_DES_ECB, ENCRYPT_DES_CBC = CRYP_CR_ALGOMODE_DES_CBC, ENCRYPT_AES_ECB = CRYP_CR_ALGOMODE_AES_ECB, ENCRYPT_AES_CBC = CRYP_CR_ALGOMODE_AES_CBC, ENCRYPT_AES_CTR = CRYP_CR_ALGOMODE_AES_CTR, DECRYPT_TDES_ECB = CRYP_CR_ALGOMODE_TDES_ECB | CRYP_CR_ALGODIR, DECRYPT_TDES_CBC = CRYP_CR_ALGOMODE_TDES_CBC | CRYP_CR_ALGODIR, DECRYPT_DES_ECB = CRYP_CR_ALGOMODE_DES_ECB | CRYP_CR_ALGODIR, DECRYPT_DES_CBC = CRYP_CR_ALGOMODE_DES_CBC | CRYP_CR_ALGODIR, DECRYPT_AES_ECB = CRYP_CR_ALGOMODE_AES_ECB | CRYP_CR_ALGODIR, DECRYPT_AES_CBC = CRYP_CR_ALGOMODE_AES_CBC | CRYP_CR_ALGODIR, DECRYPT_AES_CTR = CRYP_CR_ALGOMODE_AES_CTR,/* XOR is same ENC as DEC */ }; enum crypto_keysize { CRYPTO_KEY_128BIT = 0, CRYPTO_KEY_192BIT, CRYPTO_KEY_256BIT, }; enum crypto_datatype { CRYPTO_DATA_32BIT = 0, CRYPTO_DATA_16BIT, CRYPTO_DATA_8BIT, CRYPTO_DATA_BIT, }; BEGIN_DECLS void crypto_wait_busy(void); void crypto_set_key(enum crypto_keysize keysize, uint64_t key[]); void crypto_set_iv(uint64_t iv[]); void crypto_set_datatype(enum crypto_datatype datatype); void crypto_set_algorithm(enum crypto_mode mode); void crypto_start(void); void crypto_stop(void); uint32_t crypto_process_block(uint32_t *inp, uint32_t *outp, uint32_t length); END_DECLS /**@}*/ /**@}*/ #endif /** @cond */ #else #warning "crypto_common_f24.h should not be included explicitly, " "only via crypto.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/dac_common_all.h ================================================ /** @addtogroup dac_defines @author @htmlonly © @endhtmlonly 2012 Felix Held */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Felix Held * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DAC.H The order of header inclusion is important. dac.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_DAC_H /** @endcond */ #ifndef LIBOPENCM3_DAC_COMMON_ALL_H #define LIBOPENCM3_DAC_COMMON_ALL_H #include /* --- DAC registers ------------------------------------------------------- */ /* DAC control register (DAC_CR) */ #define DAC_CR MMIO32(DAC_BASE + 0x00) /* DAC software trigger register (DAC_SWTRIGR) */ #define DAC_SWTRIGR MMIO32(DAC_BASE + 0x04) /* DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1) */ #define DAC_DHR12R1 MMIO32(DAC_BASE + 0x08) /* DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1) */ #define DAC_DHR12L1 MMIO32(DAC_BASE + 0x0C) /* DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1) */ #define DAC_DHR8R1 MMIO32(DAC_BASE + 0x10) /* DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2) */ #define DAC_DHR12R2 MMIO32(DAC_BASE + 0x14) /* DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2) */ #define DAC_DHR12L2 MMIO32(DAC_BASE + 0x18) /* DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2) */ #define DAC_DHR8R2 MMIO32(DAC_BASE + 0x1C) /* Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD) */ #define DAC_DHR12RD MMIO32(DAC_BASE + 0x20) /* DUAL DAC 12-bit left aligned data holding register (DAC_DHR12LD) */ #define DAC_DHR12LD MMIO32(DAC_BASE + 0x24) /* DUAL DAC 8-bit right aligned data holding register (DAC_DHR8RD) */ #define DAC_DHR8RD MMIO32(DAC_BASE + 0x28) /* DAC channel1 data output register (DAC_DOR1) */ #define DAC_DOR1 MMIO32(DAC_BASE + 0x2C) /* DAC channel2 data output register (DAC_DOR2) */ #define DAC_DOR2 MMIO32(DAC_BASE + 0x30) /* --- DAC_CR values ------------------------------------------------------- */ /* DMAUDRIE2: DAC channel2 DMA underrun interrupt enable */ /* doesn't exist in most members of the STM32F1 family */ #define DAC_CR_DMAUDRIE2 (1 << 29) /* DMAEN2: DAC channel2 DMA enable */ #define DAC_CR_DMAEN2 (1 << 28) /* MAMP2[3:0]: DAC channel2 mask/amplitude selector */ /* DAC_CR_MAMP2_n: * Unmask bits [(n-1)..0] of LFSR/Triangle Amplitude equal to (2**n)-1 */ #define DAC_CR_MAMP2_SHIFT 24 /** @defgroup dac_mamp2 DAC Channel 2 LFSR Mask and Triangle Wave Amplitude values @ingroup dac_defines Unmask bits [(n-1)..0] of LFSR/Triangle Amplitude equal to (2**(n)-1 @{*/ #define DAC_CR_MAMP2_1 (0x0 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_2 (0x1 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_3 (0x2 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_4 (0x3 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_5 (0x4 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_6 (0x5 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_7 (0x6 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_8 (0x7 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_9 (0x8 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_10 (0x9 << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_11 (0xA << DAC_CR_MAMP2_SHIFT) #define DAC_CR_MAMP2_12 (0xB << DAC_CR_MAMP2_SHIFT) /**@}*/ /* WAVE2[1:0]: DAC channel2 noise/triangle wave generation enable */ /* Legend: * DIS: wave generation disabled * NOISE: Noise wave generation enabled * TRI: Triangle wave generation enabled * * Note: only used if bit TEN2 = 1 (DAC channel2 trigger enabled) */ #define DAC_CR_WAVE2_SHIFT 22 #define DAC_CR_WAVE2_DIS (0x3 << DAC_CR_WAVE2_SHIFT) /** @defgroup dac_wave2_en DAC Channel 2 Waveform Generation Enable @ingroup dac_defines @li NOISE: Noise wave generation enabled @li TRI: Triangle wave generation enabled @note: only used if bit TEN2 is set (DAC channel2 trigger enabled) @{*/ #define DAC_CR_WAVE2_NOISE (0x1 << DAC_CR_WAVE2_SHIFT) #define DAC_CR_WAVE2_TRI (0x2 << DAC_CR_WAVE2_SHIFT) /**@}*/ /* TSEL2[2:0]: DAC channel2 trigger selection */ /* Legend: * * T6: Timer 6 TRGO event * T3: Timer 3 TRGO event * T8: Timer 8 TRGO event * T7: Timer 7 TRGO event * T5: Timer 5 TRGO event * T15: Timer 15 TRGO event * T2: Timer 2 TRGO event * T4: Timer 4 TRGO event * E9: External line9 * SW: Software trigger * * Note: only used if bit TEN2 = 1 (DAC channel2 trigger enabled) * Note: T3 == T8; T5 == T15; not both present on one device * Note: this is *not* valid for the STM32L1 family */ #define DAC_CR_TSEL2_SHIFT 19 /** @defgroup dac_trig2_sel DAC Channel 2 Trigger Source Selection @ingroup dac_defines @li T6: Timer 6 TRGO event @li T3: Timer 3 TRGO event @li T8: Timer 8 TRGO event @li T7: Timer 7 TRGO event @li T5: Timer 5 TRGO event @li T15: Timer 15 TRGO event @li T2: Timer 2 TRGO event @li T4: Timer 4 TRGO event @li E9: External line9 @li SW: Software trigger @note: Refer to the timer documentation for details of the TRGO event. @note: T3 replaced by T8 and T5 replaced by T15 in some devices. @note: this is not valid for the STM32L1 family. @note: only used if bit TEN2 is set (DAC channel 2 trigger enabled) @{*/ #define DAC_CR_TSEL2_T6 (0x0 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T3 (0x1 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T8 (0x1 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T7 (0x2 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T5 (0x3 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T15 (0x3 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T2 (0x4 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_T4 (0x5 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_E9 (0x6 << DAC_CR_TSEL2_SHIFT) #define DAC_CR_TSEL2_SW (0x7 << DAC_CR_TSEL2_SHIFT) /**@}*/ /* TEN2: DAC channel2 trigger enable */ #define DAC_CR_TEN2 (1 << 18) /* BOFF2: DAC channel2 output buffer disable */ #define DAC_CR_BOFF2 (1 << 17) /* EN2: DAC channel2 enable */ #define DAC_CR_EN2 (1 << 16) /* DMAUDRIE1: DAC channel1 DMA underrun interrupt enable */ /* doesn't exist in most members of the STM32F1 family */ #define DAC_CR_DMAUDRIE1 (1 << 13) /* DMAEN1: DAC channel1 DMA enable */ #define DAC_CR_DMAEN1 (1 << 12) /* MAMP1[3:0]: DAC channel1 mask/amplitude selector */ /* DAC_CR_MAMP1_n: * Unmask bits [(n-1)..0] of LFSR/Triangle Amplitude equal to (2**n)-1 */ #define DAC_CR_MAMP1_SHIFT 8 /** @defgroup dac_mamp1 DAC Channel 1 LFSR Mask and Triangle Wave Amplitude values @ingroup dac_defines Unmask bits [(n-1)..0] of LFSR/Triangle Amplitude equal to (2**(n+1)-1 @{*/ #define DAC_CR_MAMP1_1 (0x0 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_2 (0x1 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_3 (0x2 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_4 (0x3 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_5 (0x4 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_6 (0x5 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_7 (0x6 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_8 (0x7 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_9 (0x8 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_10 (0x9 << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_11 (0xA << DAC_CR_MAMP1_SHIFT) #define DAC_CR_MAMP1_12 (0xB << DAC_CR_MAMP1_SHIFT) /**@}*/ /* WAVE1[1:0]: DAC channel1 noise/triangle wave generation enable */ /* Legend: * DIS: wave generation disabled * NOISE: Noise wave generation enabled * TRI: Triangle wave generation enabled * * Note: only used if bit TEN1 = 1 (DAC channel1 trigger enabled) */ #define DAC_CR_WAVE1_SHIFT 6 #define DAC_CR_WAVE1_DIS (0x3 << DAC_CR_WAVE1_SHIFT) /** @defgroup dac_wave1_en DAC Channel 1 Waveform Generation Enable @ingroup dac_defines @li DIS: wave generation disabled @li NOISE: Noise wave generation enabled @li TRI: Triangle wave generation enabled @note: only used if bit TEN2 = 1 (DAC channel2 trigger enabled) @{*/ #define DAC_CR_WAVE1_NOISE (0x1 << DAC_CR_WAVE1_SHIFT) #define DAC_CR_WAVE1_TRI (0x2 << DAC_CR_WAVE1_SHIFT) /**@}*/ /* TSEL1[2:0]: DAC channel1 trigger selection */ /* Legend: * * T6: Timer 6 TRGO event * T3: Timer 3 TRGO event in connectivity line devices * T8: Timer 8 TRGO event in high-density and XL-density devices * T7: Timer 7 TRGO event * T5: Timer 5 TRGO event * T15: Timer 15 TRGO event * T2: Timer 2 TRGO event * T4: Timer 4 TRGO event * E9: External line9 * SW: Software trigger * * Note: only used if bit TEN1 = 1 (DAC channel1 trigger enabled) * Note: T3 == T8; T5 == T15; not both present on one device * Note: this is *not* valid for the STM32L1 family */ #define DAC_CR_TSEL1_SHIFT 3 /** @defgroup dac_trig1_sel DAC Channel 1 Trigger Source Selection @ingroup dac_defines @li T6: Timer 6 TRGO event @li T3: Timer 3 TRGO event @li T8: Timer 8 TRGO event @li T7: Timer 7 TRGO event @li T5: Timer 5 TRGO event @li T15: Timer 15 TRGO event @li T2: Timer 2 TRGO event @li T4: Timer 4 TRGO event @li E9: External line 9 @li SW: Software trigger @note: Refer to the timer documentation for details of the TRGO event. @note: T3 replaced by T8 and T5 replaced by T15 in some devices. @note: this is not valid for the STM32L1 family. @note: only used if bit TEN2 is set (DAC channel 1 trigger enabled). @{*/ #define DAC_CR_TSEL1_T6 (0x0 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T3 (0x1 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T8 (0x1 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T7 (0x2 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T5 (0x3 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T15 (0x3 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T2 (0x4 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_T4 (0x5 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_E9 (0x6 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_SW (0x7 << DAC_CR_TSEL1_SHIFT) /**@}*/ /* TEN1: DAC channel1 trigger enable */ #define DAC_CR_TEN1 (1 << 2) /* BOFF1: DAC channel1 output buffer disable */ #define DAC_CR_BOFF1 (1 << 1) /* EN1: DAC channel1 enable */ #define DAC_CR_EN1 (1 << 0) /* --- DAC_SWTRIGR values -------------------------------------------------- */ /* SWTRIG2: DAC channel2 software trigger */ #define DAC_SWTRIGR_SWTRIG2 (1 << 1) /* SWTRIG1: DAC channel1 software trigger */ #define DAC_SWTRIGR_SWTRIG1 (1 << 0) /* --- DAC_DHR12R1 values -------------------------------------------------- */ #define DAC_DHR12R1_DACC1DHR_LSB (1 << 0) #define DAC_DHR12R1_DACC1DHR_MSK (0x0FFF << 0) /* --- DAC_DHR12L1 values -------------------------------------------------- */ #define DAC_DHR12L1_DACC1DHR_LSB (1 << 4) #define DAC_DHR12L1_DACC1DHR_MSK (0x0FFF << 4) /* --- DAC_DHR8R1 values --------------------------------------------------- */ #define DAC_DHR8R1_DACC1DHR_LSB (1 << 0) #define DAC_DHR8R1_DACC1DHR_MSK (0x00FF << 0) /* --- DAC_DHR12R2 values -------------------------------------------------- */ #define DAC_DHR12R2_DACC2DHR_LSB (1 << 0) #define DAC_DHR12R2_DACC2DHR_MSK (0x00FFF << 0) /* --- DAC_DHR12L2 values -------------------------------------------------- */ #define DAC_DHR12L2_DACC2DHR_LSB (1 << 4) #define DAC_DHR12L2_DACC2DHR_MSK (0x0FFF << 4) /* --- DAC_DHR8R2 values --------------------------------------------------- */ #define DAC_DHR8R2_DACC2DHR_LSB (1 << 0) #define DAC_DHR8R2_DACC2DHR_MSK (0x00FF << 0) /* --- DAC_DHR12RD values -------------------------------------------------- */ #define DAC_DHR12RD_DACC2DHR_LSB (1 << 16) #define DAC_DHR12RD_DACC2DHR_MSK (0x0FFF << 16) #define DAC_DHR12RD_DACC1DHR_LSB (1 << 0) #define DAC_DHR12RD_DACC1DHR_MSK (0x0FFF << 0) /* --- DAC_DHR12LD values -------------------------------------------------- */ #define DAC_DHR12LD_DACC2DHR_LSB (1 << 16) #define DAC_DHR12LD_DACC2DHR_MSK (0x0FFF << 20) #define DAC_DHR12LD_DACC1DHR_LSB (1 << 0) #define DAC_DHR12LD_DACC1DHR_MSK (0x0FFF << 4) /* --- DAC_DHR8RD values --------------------------------------------------- */ #define DAC_DHR8RD_DACC2DHR_LSB (1 << 8) #define DAC_DHR8RD_DACC2DHR_MSK (0x00FF << 8) #define DAC_DHR8RD_DACC1DHR_LSB (1 << 0) #define DAC_DHR8RD_DACC1DHR_MSK (0x00FF << 0) /* --- DAC_DOR1 values ----------------------------------------------------- */ #define DAC_DOR1_DACC1DOR_LSB (1 << 0) #define DAC_DOR1_DACC1DOR_MSK (0x0FFF << 0) /* --- DAC_DOR2 values ----------------------------------------------------- */ #define DAC_DOR2_DACC2DOR_LSB (1 << 0) #define DAC_DOR2_DACC2DOR_MSK (0x0FFF << 0) /** DAC channel identifier */ typedef enum { CHANNEL_1, CHANNEL_2, CHANNEL_D } data_channel; /** DAC data size (8/12 bits), alignment (right/left) */ typedef enum { RIGHT8, RIGHT12, LEFT12 } data_align; /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void dac_enable(data_channel dac_channel); void dac_disable(data_channel dac_channel); void dac_buffer_enable(data_channel dac_channel); void dac_buffer_disable(data_channel dac_channel); void dac_dma_enable(data_channel dac_channel); void dac_dma_disable(data_channel dac_channel); void dac_trigger_enable(data_channel dac_channel); void dac_trigger_disable(data_channel dac_channel); void dac_set_trigger_source(uint32_t dac_trig_src); void dac_set_waveform_generation(uint32_t dac_wave_ens); void dac_disable_waveform_generation(data_channel dac_channel); void dac_set_waveform_characteristics(uint32_t dac_mamp); void dac_load_data_buffer_single(uint16_t dac_data, data_align dac_data_format, data_channel dac_channel); void dac_load_data_buffer_dual(uint16_t dac_data1, uint16_t dac_data2, data_align dac_data_format); void dac_software_trigger(data_channel dac_channel); END_DECLS #endif /** @cond */ #else #warning "dac_common_all.h should not be included explicitly, only via dac.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/dma_common_f24.h ================================================ /** @addtogroup dma_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DMA.H The order of header inclusion is important. dma.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_DMA_H /** @endcond */ #ifndef LIBOPENCM3_DMA_COMMON_F24_H #define LIBOPENCM3_DMA_COMMON_F24_H /**@{*/ #include /* --- Convenience macros -------------------------------------------------- */ /* DMA controller base addresses (for convenience) */ #define DMA1 DMA1_BASE #define DMA2 DMA2_BASE /* DMA stream base addresses (for API parameters) */ /** @defgroup dma_st_number DMA Stream Number @ingroup STM32F4xx_dma_defines @{*/ #define DMA_STREAM0 0 #define DMA_STREAM1 1 #define DMA_STREAM2 2 #define DMA_STREAM3 3 #define DMA_STREAM4 4 #define DMA_STREAM5 5 #define DMA_STREAM6 6 #define DMA_STREAM7 7 /**@}*/ #define DMA_STREAM(port, n) ((port) + 0x10 + (24 * (n))) #define DMA1_STREAM(n) DMA_STREAM(DMA1, n) #define DMA2_STREAM(n) DMA_STREAM(DMA2, n) #define DMA1_STREAM0 DMA1_STREAM(0) #define DMA1_STREAM1 DMA1_STREAM(1) #define DMA1_STREAM2 DMA1_STREAM(2) #define DMA1_STREAM3 DMA1_STREAM(3) #define DMA1_STREAM4 DMA1_STREAM(4) #define DMA1_STREAM5 DMA1_STREAM(5) #define DMA1_STREAM6 DMA1_STREAM(6) #define DMA1_STREAM7 DMA1_STREAM(7) #define DMA2_STREAM0 DMA2_STREAM(0) #define DMA2_STREAM1 DMA2_STREAM(1) #define DMA2_STREAM2 DMA2_STREAM(2) #define DMA2_STREAM3 DMA2_STREAM(3) #define DMA2_STREAM4 DMA2_STREAM(4) #define DMA2_STREAM5 DMA2_STREAM(5) #define DMA2_STREAM6 DMA2_STREAM(6) #define DMA2_STREAM7 DMA2_STREAM(7) /* --- DMA controller registers -------------------------------------------- */ /* DMA low interrupt status register (DMAx_LISR) */ #define DMA_LISR(port) MMIO32(port + 0x00) #define DMA1_LISR DMA_LISR(DMA1) #define DMA2_LISR DMA_LISR(DMA2) /* DMA high interrupt status register (DMAx_HISR) */ #define DMA_HISR(port) MMIO32(port + 0x04) #define DMA1_HISR DMA_HISR(DMA1) #define DMA2_HISR DMA_HISR(DMA2) /* DMA low interrupt flag clear register (DMAx_LIFCR) */ #define DMA_LIFCR(port) MMIO32(port + 0x08) #define DMA1_LIFCR DMA_LIFCR(DMA1) #define DMA2_LIFCR DMA_LIFCR(DMA2) /* DMA high interrupt flag clear register (DMAx_HIFCR) */ #define DMA_HIFCR(port) MMIO32(port + 0x0C) #define DMA1_HIFCR DMA_HIFCR(DMA1) #define DMA2_HIFCR DMA_HIFCR(DMA2) /* --- DMA stream registers ------------------------------------------------ */ /* DMA Stream x configuration register (DMA_SxCR) */ #define DMA_SCR(port, n) MMIO32(DMA_STREAM(port, n) + 0x00) #define DMA1_SCR(n) DMA_SCR(DMA1, n) #define DMA2_SCR(n) DMA_SCR(DMA2, n) #define DMA1_S0CR DMA1_SCR(0) #define DMA1_S1CR DMA1_SCR(1) #define DMA1_S2CR DMA1_SCR(2) #define DMA1_S3CR DMA1_SCR(3) #define DMA1_S4CR DMA1_SCR(4) #define DMA1_S5CR DMA1_SCR(5) #define DMA1_S6CR DMA1_SCR(6) #define DMA1_S7CR DMA1_SCR(7) #define DMA2_S0CR DMA2_SCR(0) #define DMA2_S1CR DMA2_SCR(1) #define DMA2_S2CR DMA2_SCR(2) #define DMA2_S3CR DMA2_SCR(3) #define DMA2_S4CR DMA2_SCR(4) #define DMA2_S5CR DMA2_SCR(5) #define DMA2_S6CR DMA2_SCR(6) #define DMA2_S7CR DMA2_SCR(7) /* DMA Stream x number of data register (DMA_SxNDTR) */ #define DMA_SNDTR(port, n) MMIO32(DMA_STREAM(port, n) + 0x04) #define DMA1_SNDTR(n) DMA_SNDTR(DMA1, n) #define DMA2_SNDTR(n) DMA_SNDTR(DMA2, n) #define DMA1_S0NDTR DMA1_SNDTR(0) #define DMA1_S1NDTR DMA1_SNDTR(1) #define DMA1_S2NDTR DMA1_SNDTR(2) #define DMA1_S3NDTR DMA1_SNDTR(3) #define DMA1_S4NDTR DMA1_SNDTR(4) #define DMA1_S5NDTR DMA1_SNDTR(5) #define DMA1_S6NDTR DMA1_SNDTR(6) #define DMA1_S7NDTR DMA1_SNDTR(7) #define DMA2_S0NDTR DMA2_SNDTR(0) #define DMA2_S1NDTR DMA2_SNDTR(1) #define DMA2_S2NDTR DMA2_SNDTR(2) #define DMA2_S3NDTR DMA2_SNDTR(3) #define DMA2_S4NDTR DMA2_SNDTR(4) #define DMA2_S5NDTR DMA2_SNDTR(5) #define DMA2_S6NDTR DMA2_SNDTR(6) #define DMA2_S7NDTR DMA2_SNDTR(7) /* DMA Stream x peripheral address register (DMA_SxPAR) */ #define DMA_SPAR(port, n) (*(volatile void **)\ (DMA_STREAM(port, n) + 0x08)) #define DMA1_SPAR(n) DMA_SPAR(DMA1, n) #define DMA2_SPAR(n) DMA_SPAR(DMA2, n) #define DMA1_S0PAR DMA1_SPAR(0) #define DMA1_S1PAR DMA1_SPAR(1) #define DMA1_S2PAR DMA1_SPAR(2) #define DMA1_S3PAR DMA1_SPAR(3) #define DMA1_S4PAR DMA1_SPAR(4) #define DMA1_S5PAR DMA1_SPAR(5) #define DMA1_S6PAR DMA1_SPAR(6) #define DMA1_S7PAR DMA1_SPAR(7) #define DMA2_S0PAR DMA2_SPAR(0) #define DMA2_S1PAR DMA2_SPAR(1) #define DMA2_S2PAR DMA2_SPAR(2) #define DMA2_S3PAR DMA2_SPAR(3) #define DMA2_S4PAR DMA2_SPAR(4) #define DMA2_S5PAR DMA2_SPAR(5) #define DMA2_S6PAR DMA2_SPAR(6) #define DMA2_S7PAR DMA2_SPAR(7) /* DMA Stream x memory address 0 register (DMA_SxM0AR) */ #define DMA_SM0AR(port, n) (*(volatile void **) \ (DMA_STREAM(port, n) + 0x0c)) #define DMA1_SM0AR(n) DMA_SM0AR(DMA1, n) #define DMA2_SM0AR(n) DMA_SM0AR(DMA2, n) #define DMA1_S0M0AR DMA1_SM0AR(0) #define DMA1_S1M0AR DMA1_SM0AR(1) #define DMA1_S2M0AR DMA1_SM0AR(2) #define DMA1_S3M0AR DMA1_SM0AR(3) #define DMA1_S4M0AR DMA1_SM0AR(4) #define DMA1_S5M0AR DMA1_SM0AR(5) #define DMA1_S6M0AR DMA1_SM0AR(6) #define DMA1_S7M0AR DMA1_SM0AR(7) #define DMA2_S0M0AR DMA2_SM0AR(0) #define DMA2_S1M0AR DMA2_SM0AR(1) #define DMA2_S2M0AR DMA2_SM0AR(2) #define DMA2_S3M0AR DMA2_SM0AR(3) #define DMA2_S4M0AR DMA2_SM0AR(4) #define DMA2_S5M0AR DMA2_SM0AR(5) #define DMA2_S6M0AR DMA2_SM0AR(6) #define DMA2_S7M0AR DMA2_SM0AR(7) /* DMA Stream x memory address 1 register (DMA_SxM1AR) */ #define DMA_SM1AR(port, n) (*(volatile void **)\ (DMA_STREAM(port, n) + 0x10)) #define DMA1_SM1AR(n) DMA_SM1AR(DMA1, n) #define DMA2_SM1AR(n) DMA_SM1AR(DMA2, n) #define DMA1_S0M1AR DMA1_SM1AR(0) #define DMA1_S1M1AR DMA1_SM1AR(1) #define DMA1_S2M1AR DMA1_SM1AR(2) #define DMA1_S3M1AR DMA1_SM1AR(3) #define DMA1_S4M1AR DMA1_SM1AR(4) #define DMA1_S5M1AR DMA1_SM1AR(5) #define DMA1_S6M1AR DMA1_SM1AR(6) #define DMA1_S7M1AR DMA1_SM1AR(7) #define DMA2_S0M1AR DMA2_SM1AR(0) #define DMA2_S1M1AR DMA2_SM1AR(1) #define DMA2_S2M1AR DMA2_SM1AR(2) #define DMA2_S3M1AR DMA2_SM1AR(3) #define DMA2_S4M1AR DMA2_SM1AR(4) #define DMA2_S5M1AR DMA2_SM1AR(5) #define DMA2_S6M1AR DMA2_SM1AR(6) #define DMA2_S7M1AR DMA2_SM1AR(7) /* DMA Stream x FIFO control register (DMA_SxFCR) */ #define DMA_SFCR(port, n) MMIO32(DMA_STREAM(port, n) + 0x14) #define DMA1_SFCR(n) DMA_SFCR(DMA1, n) #define DMA2_SFCR(n) DMA_SFCR(DMA2, n) #define DMA1_S0FCR DMA1_SFCR(0) #define DMA1_S1FCR DMA1_SFCR(1) #define DMA1_S2FCR DMA1_SFCR(2) #define DMA1_S3FCR DMA1_SFCR(3) #define DMA1_S4FCR DMA1_SFCR(4) #define DMA1_S5FCR DMA1_SFCR(5) #define DMA1_S6FCR DMA1_SFCR(6) #define DMA1_S7FCR DMA1_SFCR(7) #define DMA2_S0FCR DMA2_SFCR(0) #define DMA2_S1FCR DMA2_SFCR(1) #define DMA2_S2FCR DMA2_SFCR(2) #define DMA2_S3FCR DMA2_SFCR(3) #define DMA2_S4FCR DMA2_SFCR(4) #define DMA2_S5FCR DMA2_SFCR(5) #define DMA2_S6FCR DMA2_SFCR(6) #define DMA2_S7FCR DMA2_SFCR(7) /* --- DMA Interrupt Flag offset values ------------------------------------- */ /* For API parameters. These are based on every interrupt flag and flag clear being at the same relative location */ /** @defgroup dma_if_offset DMA Interrupt Flag Offsets within stream flag group. @ingroup dma_defines @{*/ /** Transfer Complete Interrupt Flag */ #define DMA_TCIF (1 << 5) /** Half Transfer Interrupt Flag */ #define DMA_HTIF (1 << 4) /** Transfer Error Interrupt Flag */ #define DMA_TEIF (1 << 3) /** Direct Mode Error Interrupt Flag */ #define DMA_DMEIF (1 << 2) /** FIFO Error Interrupt Flag */ #define DMA_FEIF (1 << 0) /**@}*/ /* Offset within interrupt status register to start of stream interrupt flag * field */ #define DMA_ISR_OFFSET(stream) (6*(stream & 0x01)+16*((stream & 0x02) >> 1)) #define DMA_ISR_FLAGS (DMA_TCIF | DMA_HTIF | DMA_TEIF | DMA_DMEIF | \ DMA_FEIF) #define DMA_ISR_MASK(stream) (DMA_ISR_FLAGS << DMA_ISR_OFFSET(stream)) /* --- DMA_LISR values ----------------------------------------------------- */ #define DMA_LISR_FEIF0 (1 << 0) #define DMA_LISR_DMEIF0 (1 << 2) #define DMA_LISR_TEIF0 (1 << 3) #define DMA_LISR_HTIF0 (1 << 4) #define DMA_LISR_TCIF0 (1 << 5) #define DMA_LISR_FEIF1 (1 << 6) #define DMA_LISR_DMEIF1 (1 << 8) #define DMA_LISR_TEIF1 (1 << 9) #define DMA_LISR_HTIF1 (1 << 10) #define DMA_LISR_TCIF1 (1 << 11) #define DMA_LISR_FEIF2 (1 << 16) #define DMA_LISR_DMEIF2 (1 << 18) #define DMA_LISR_TEIF2 (1 << 19) #define DMA_LISR_HTIF2 (1 << 20) #define DMA_LISR_TCIF2 (1 << 21) #define DMA_LISR_FEIF3 (1 << 22) #define DMA_LISR_DMEIF3 (1 << 24) #define DMA_LISR_TEIF3 (1 << 25) #define DMA_LISR_HTIF3 (1 << 26) #define DMA_LISR_TCIF3 (1 << 27) /* --- DMA_HISR values ----------------------------------------------------- */ #define DMA_HISR_FEIF4 (1 << 0) #define DMA_HISR_DMEIF4 (1 << 2) #define DMA_HISR_TEIF4 (1 << 3) #define DMA_HISR_HTIF4 (1 << 4) #define DMA_HISR_TCIF4 (1 << 5) #define DMA_HISR_FEIF5 (1 << 6) #define DMA_HISR_DMEIF5 (1 << 8) #define DMA_HISR_TEIF5 (1 << 9) #define DMA_HISR_HTIF5 (1 << 10) #define DMA_HISR_TCIF5 (1 << 11) #define DMA_HISR_FEIF6 (1 << 16) #define DMA_HISR_DMEIF6 (1 << 18) #define DMA_HISR_TEIF6 (1 << 19) #define DMA_HISR_HTIF6 (1 << 20) #define DMA_HISR_TCIF6 (1 << 21) #define DMA_HISR_FEIF7 (1 << 22) #define DMA_HISR_DMEIF7 (1 << 24) #define DMA_HISR_TEIF7 (1 << 25) #define DMA_HISR_HTIF7 (1 << 26) #define DMA_HISR_TCIF7 (1 << 27) /* --- DMA_LIFCR values ----------------------------------------------------- */ #define DMA_LIFCR_CFEIF0 (1 << 0) #define DMA_LIFCR_CDMEIF0 (1 << 2) #define DMA_LIFCR_CTEIF0 (1 << 3) #define DMA_LIFCR_CHTIF0 (1 << 4) #define DMA_LIFCR_CTCIF0 (1 << 5) #define DMA_LIFCR_CFEIF1 (1 << 6) #define DMA_LIFCR_CDMEIF1 (1 << 8) #define DMA_LIFCR_CTEIF1 (1 << 9) #define DMA_LIFCR_CHTIF1 (1 << 10) #define DMA_LIFCR_CTCIF1 (1 << 11) #define DMA_LIFCR_CFEIF2 (1 << 16) #define DMA_LIFCR_CDMEIF2 (1 << 18) #define DMA_LIFCR_CTEIF2 (1 << 19) #define DMA_LIFCR_CHTIF2 (1 << 20) #define DMA_LIFCR_CTCIF2 (1 << 21) #define DMA_LIFCR_CFEIF3 (1 << 22) #define DMA_LIFCR_CDMEIF3 (1 << 24) #define DMA_LIFCR_CTEIF3 (1 << 25) #define DMA_LIFCR_CHTIF3 (1 << 26) #define DMA_LIFCR_CTCIF3 (1 << 27) /* --- DMA_HIFCR values ----------------------------------------------------- */ #define DMA_HIFCR_CFEIF4 (1 << 0) #define DMA_HIFCR_CDMEIF4 (1 << 2) #define DMA_HIFCR_CTEIF4 (1 << 3) #define DMA_HIFCR_CHTIF4 (1 << 4) #define DMA_HIFCR_CTCIF4 (1 << 5) #define DMA_HIFCR_CFEIF5 (1 << 6) #define DMA_HIFCR_CDMEIF5 (1 << 8) #define DMA_HIFCR_CTEIF5 (1 << 9) #define DMA_HIFCR_CHTIF5 (1 << 10) #define DMA_HIFCR_CTCIF5 (1 << 11) #define DMA_HIFCR_CFEIF6 (1 << 16) #define DMA_HIFCR_CDMEIF6 (1 << 18) #define DMA_HIFCR_CTEIF6 (1 << 19) #define DMA_HIFCR_CHTIF6 (1 << 20) #define DMA_HIFCR_CTCIF6 (1 << 21) #define DMA_HIFCR_CFEIF7 (1 << 22) #define DMA_HIFCR_CDMEIF7 (1 << 24) #define DMA_HIFCR_CTEIF7 (1 << 25) #define DMA_HIFCR_CHTIF7 (1 << 26) #define DMA_HIFCR_CTCIF7 (1 << 27) /* --- DMA_SxCR values ----------------------------------------------------- */ /* EN: Stream enable */ #define DMA_SxCR_EN (1 << 0) /* DMEIE: Direct Mode error interrupt enable */ #define DMA_SxCR_DMEIE (1 << 1) /* TEIE: Transfer error interrupt enable */ #define DMA_SxCR_TEIE (1 << 2) /* HTIE: Half transfer interrupt enable */ #define DMA_SxCR_HTIE (1 << 3) /* TCIE: Transfer complete interrupt enable */ #define DMA_SxCR_TCIE (1 << 4) /* PFCTRL: Peripheral Flow Controller */ #define DMA_SxCR_PFCTRL (1 << 5) /* DIR[7:6]: Data transfer direction */ /** @defgroup dma_st_dir DMA Stream Data transfer direction @ingroup dma_defines @{*/ #define DMA_SxCR_DIR_PERIPHERAL_TO_MEM (0 << 6) #define DMA_SxCR_DIR_MEM_TO_PERIPHERAL (1 << 6) #define DMA_SxCR_DIR_MEM_TO_MEM (2 << 6) /**@}*/ #define DMA_SxCR_DIR_SHIFT 6 #define DMA_SxCR_DIR_MASK (3 << 6) /* CIRC: Circular mode */ #define DMA_SxCR_CIRC (1 << 8) /* PINC: Peripheral increment mode */ #define DMA_SxCR_PINC (1 << 9) /* MINC: Memory increment mode */ #define DMA_SxCR_MINC (1 << 10) /* PSIZE[12:11]: Peripheral size */ /** @defgroup dma_st_perwidth DMA Stream Peripheral Word Width @ingroup STM32F4xx_dma_defines @{*/ #define DMA_SxCR_PSIZE_8BIT (0 << 11) #define DMA_SxCR_PSIZE_16BIT (1 << 11) #define DMA_SxCR_PSIZE_32BIT (2 << 11) /**@}*/ #define DMA_SxCR_PSIZE_SHIFT 11 #define DMA_SxCR_PSIZE_MASK (3 << 11) /* MSIZE[14:13]: Memory size */ /** @defgroup dma_st_memwidth DMA Stream Memory Word Width @ingroup STM32F4xx_dma_defines @{*/ #define DMA_SxCR_MSIZE_8BIT (0 << 13) #define DMA_SxCR_MSIZE_16BIT (1 << 13) #define DMA_SxCR_MSIZE_32BIT (2 << 13) /**@}*/ #define DMA_SxCR_MSIZE_SHIFT 13 #define DMA_SxCR_MSIZE_MASK (3 << 13) /* PINCOS: Peripheral increment offset size */ #define DMA_SxCR_PINCOS (1 << 15) /* PL[17:16]: Stream priority level */ /** @defgroup dma_st_pri DMA Stream Priority Levels @ingroup dma_defines @{*/ #define DMA_SxCR_PL_LOW (0 << 16) #define DMA_SxCR_PL_MEDIUM (1 << 16) #define DMA_SxCR_PL_HIGH (2 << 16) #define DMA_SxCR_PL_VERY_HIGH (3 << 16) /**@}*/ #define DMA_SxCR_PL_SHIFT 16 #define DMA_SxCR_PL_MASK (3 << 16) /* DBM: Double buffered mode */ #define DMA_SxCR_DBM (1 << 18) /* CT: Current target (in double buffered mode) */ #define DMA_SxCR_CT (1 << 19) /* Bit 20 reserved */ /* PBURST[13:12]: Peripheral Burst Configuration */ /** @defgroup dma_pburst DMA Peripheral Burst Length @ingroup dma_defines @{*/ #define DMA_SxCR_PBURST_SINGLE (0 << 21) #define DMA_SxCR_PBURST_INCR4 (1 << 21) #define DMA_SxCR_PBURST_INCR8 (2 << 21) #define DMA_SxCR_PBURST_INCR16 (3 << 21) /**@}*/ #define DMA_SxCR_PBURST_SHIFT 21 #define DMA_SxCR_PBURST_MASK (3 << 21) /* MBURST[13:12]: Memory Burst Configuration */ /** @defgroup dma_mburst DMA Memory Burst Length @ingroup STM32F4xx_dma_defines @{*/ #define DMA_SxCR_MBURST_SINGLE (0 << 23) #define DMA_SxCR_MBURST_INCR4 (1 << 23) #define DMA_SxCR_MBURST_INCR8 (2 << 23) #define DMA_SxCR_MBURST_INCR16 (3 << 23) /**@}*/ #define DMA_SxCR_MBURST_SHIFT 23 #define DMA_SxCR_MBURST_MASK (3 << 23) /* CHSEL[25:27]: Channel Select */ /** @defgroup dma_ch_sel DMA Channel Select @ingroup dma_defines @{*/ #define DMA_SxCR_CHSEL_0 (0 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_1 (1 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_2 (2 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_3 (3 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_4 (4 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_5 (5 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_6 (6 << DMA_SxCR_CHSEL_SHIFT) #define DMA_SxCR_CHSEL_7 (7 << DMA_SxCR_CHSEL_SHIFT) /**@}*/ #define DMA_SxCR_CHSEL_SHIFT 25 #define DMA_SxCR_CHSEL_MASK (7 << 25) #define DMA_SxCR_CHSEL(n) (n << DMA_SxCR_CHSEL_SHIFT) /* Reserved [31:28] */ /* --- DMA_SxNDTR values --------------------------------------------------- */ /* DMA_SxNDTR[15:0]: Number of data register. */ /* --- DMA_SxPAR values ---------------------------------------------------- */ /* DMA_SxPAR[31:0]: Peripheral address register. */ /* --- DMA_SxM0AR values --------------------------------------------------- */ /* DMA_SxM0AR[31:0]: Memory 0 address register. */ /* --- DMA_SxM1AR values --------------------------------------------------- */ /* DMA_SxM1AR[31:0]: Memory 1 address register. */ /* --- DMA_SxFCR values ---------------------------------------------------- */ /* FTH[1:0]: FIFO Threshold selection */ /** @defgroup dma_fifo_thresh FIFO Threshold selection @ingroup STM32F4xx_dma_defines @{*/ #define DMA_SxFCR_FTH_1_4_FULL (0 << 0) #define DMA_SxFCR_FTH_2_4_FULL (1 << 0) #define DMA_SxFCR_FTH_3_4_FULL (2 << 0) #define DMA_SxFCR_FTH_4_4_FULL (3 << 0) /**@}*/ #define DMA_SxFCR_FTH_SHIFT 0 #define DMA_SxFCR_FTH_MASK (3 << 0) /* DMDIS: Direct Mode disable */ #define DMA_SxFCR_DMDIS (1 << 2) /* FS[5:3]: FIFO Status */ /** @defgroup dma_fifo_status FIFO Status @ingroup STM32F4xx_dma_defines @{*/ #define DMA_SxFCR_FS_LT_1_4_FULL (0 << 0) #define DMA_SxFCR_FS_LT_2_4_FULL (1 << 0) #define DMA_SxFCR_FS_LT_3_4_FULL (2 << 0) #define DMA_SxFCR_FS_LT_4_4_FULL (3 << 0) #define DMA_SxFCR_FS_FULL (4 << 3) #define DMA_SxFCR_FS_EMPTY (5 << 3) /**@}*/ #define DMA_SxFCR_FS_SHIFT 3 #define DMA_SxFCR_FS_MASK (7 << 3) /* [6]: reserved */ /* FEIE[7]: FIFO error interrupt enable */ #define DMA_SxFCR_FEIE (1 << 7) /* [31:8]: Reserved */ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS /* * Note: The F2 and F4 series have a completely new DMA peripheral with * different configuration options. */ void dma_stream_reset(uint32_t dma, uint8_t stream); void dma_clear_interrupt_flags(uint32_t dma, uint8_t stream, uint32_t interrupts); bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t interrupt); void dma_set_transfer_mode(uint32_t dma, uint8_t stream, uint32_t direction); void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio); void dma_set_memory_size(uint32_t dma, uint8_t stream, uint32_t mem_size); void dma_set_peripheral_size(uint32_t dma, uint8_t stream, uint32_t peripheral_size); void dma_enable_memory_increment_mode(uint32_t dma, uint8_t stream); void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel); void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t stream); void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel); void dma_enable_fixed_peripheral_increment_mode(uint32_t dma, uint8_t stream); void dma_enable_circular_mode(uint32_t dma, uint8_t stream); void dma_channel_select(uint32_t dma, uint8_t stream, uint32_t channel); void dma_set_memory_burst(uint32_t dma, uint8_t stream, uint32_t burst); void dma_set_peripheral_burst(uint32_t dma, uint8_t stream, uint32_t burst); void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory); uint8_t dma_get_target(uint32_t dma, uint8_t stream); void dma_enable_double_buffer_mode(uint32_t dma, uint8_t stream); void dma_disable_double_buffer_mode(uint32_t dma, uint8_t stream); void dma_set_peripheral_flow_control(uint32_t dma, uint8_t stream); void dma_set_dma_flow_control(uint32_t dma, uint8_t stream); void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t stream); void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t stream); void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t stream); void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t stream); void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t stream); void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t stream); uint32_t dma_fifo_status(uint32_t dma, uint8_t stream); void dma_enable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream); void dma_disable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream); void dma_enable_fifo_error_interrupt(uint32_t dma, uint8_t stream); void dma_disable_fifo_error_interrupt(uint32_t dma, uint8_t stream); void dma_enable_direct_mode(uint32_t dma, uint8_t stream); void dma_enable_fifo_mode(uint32_t dma, uint8_t stream); void dma_set_fifo_threshold(uint32_t dma, uint8_t stream, uint32_t threshold); void dma_enable_stream(uint32_t dma, uint8_t stream); void dma_disable_stream(uint32_t dma, uint8_t stream); void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t address); void dma_set_memory_address(uint32_t dma, uint8_t stream, uint32_t address); void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address); void dma_set_number_of_data(uint32_t dma, uint8_t stream, uint16_t number); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "dma_common_f24.h should not be included explicitly, only via dma.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/dma_common_l1f013.h ================================================ /** @addtogroup dma_defines @author @htmlonly © @endhtmlonly 2010 Thomas Otto @author @htmlonly © @endhtmlonly 2012 Piotr Esden-Tempski */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2012 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DMA.H The order of header inclusion is important. dma.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_DMA_H /** @endcond */ #ifndef LIBOPENCM3_DMA_COMMON_F13_H #define LIBOPENCM3_DMA_COMMON_F13_H #include /* --- Convenience macros -------------------------------------------------- */ /* DMA register base adresses (for convenience) */ #define DMA1 DMA1_BASE #define DMA2 DMA2_BASE /* --- DMA registers ------------------------------------------------------- */ /* DMA interrupt status register (DMAx_ISR) */ #define DMA_ISR(dma_base) MMIO32(dma_base + 0x00) #define DMA1_ISR DMA_ISR(DMA1) #define DMA2_ISR DMA_ISR(DMA2) /* DMA interrupt flag clear register (DMAx_IFCR) */ #define DMA_IFCR(dma_base) MMIO32(dma_base + 0x04) #define DMA1_IFCR DMA_IFCR(DMA1) #define DMA2_IFCR DMA_IFCR(DMA2) /* DMA channel configuration register (DMAx_CCRy) */ #define DMA_CCR(dma_base, channel) MMIO32(dma_base + 0x08 + \ (0x14 * ((channel) - 1))) #define DMA1_CCR(channel) DMA_CCR(DMA1, channel) #define DMA1_CCR1 DMA1_CCR(DMA_CHANNEL1) #define DMA1_CCR2 DMA1_CCR(DMA_CHANNEL2) #define DMA1_CCR3 DMA1_CCR(DMA_CHANNEL3) #define DMA1_CCR4 DMA1_CCR(DMA_CHANNEL4) #define DMA1_CCR5 DMA1_CCR(DMA_CHANNEL5) #define DMA1_CCR6 DMA1_CCR(DMA_CHANNEL6) #define DMA1_CCR7 DMA1_CCR(DMA_CHANNEL7) #define DMA2_CCR(channel) DMA_CCR(DMA2, channel) #define DMA2_CCR1 DMA2_CCR(DMA_CHANNEL1) #define DMA2_CCR2 DMA2_CCR(DMA_CHANNEL2) #define DMA2_CCR3 DMA2_CCR(DMA_CHANNEL3) #define DMA2_CCR4 DMA2_CCR(DMA_CHANNEL4) #define DMA2_CCR5 DMA2_CCR(DMA_CHANNEL5) /* DMA number of data register (DMAx_CNDTRy) */ #define DMA_CNDTR(dma_base, channel) MMIO32(dma_base + 0x0C + \ (0x14 * ((channel) - 1))) #define DMA1_CNDTR(channel) DMA_CNDTR(DMA1, channel) #define DMA1_CNDTR1 DMA1_CNDTR(DMA_CHANNEL1) #define DMA1_CNDTR2 DMA1_CNDTR(DMA_CHANNEL2) #define DMA1_CNDTR3 DMA1_CNDTR(DMA_CHANNEL3) #define DMA1_CNDTR4 DMA1_CNDTR(DMA_CHANNEL4) #define DMA1_CNDTR5 DMA1_CNDTR(DMA_CHANNEL5) #define DMA1_CNDTR6 DMA1_CNDTR(DMA_CHANNEL6) #define DMA1_CNDTR7 DMA1_CNDTR(DMA_CHANNEL7) #define DMA2_CNDTR(channel) DMA_CNDTR(DMA2, channel) #define DMA2_CNDTR1 DMA2_CNDTR(DMA_CHANNEL1) #define DMA2_CNDTR2 DMA2_CNDTR(DMA_CHANNEL2) #define DMA2_CNDTR3 DMA2_CNDTR(DMA_CHANNEL3) #define DMA2_CNDTR4 DMA2_CNDTR(DMA_CHANNEL4) #define DMA2_CNDTR5 DMA2_CNDTR(DMA_CHANNEL5) /* DMA peripheral address register (DMAx_CPARy) */ #define DMA_CPAR(dma_base, channel) MMIO32(dma_base + 0x10 + \ (0x14 * ((channel) - 1))) #define DMA1_CPAR(channel) DMA_CPAR(DMA1, channel) #define DMA1_CPAR1 DMA1_CPAR(DMA_CHANNEL1) #define DMA1_CPAR2 DMA1_CPAR(DMA_CHANNEL2) #define DMA1_CPAR3 DMA1_CPAR(DMA_CHANNEL3) #define DMA1_CPAR4 DMA1_CPAR(DMA_CHANNEL4) #define DMA1_CPAR5 DMA1_CPAR(DMA_CHANNEL5) #define DMA1_CPAR6 DMA1_CPAR(DMA_CHANNEL6) #define DMA1_CPAR7 DMA1_CPAR(DMA_CHANNEL7) #define DMA2_CPAR(channel) DMA_CPAR(DMA2, channel) #define DMA2_CPAR1 DMA2_CPAR(DMA_CHANNEL1) #define DMA2_CPAR2 DMA2_CPAR(DMA_CHANNEL2) #define DMA2_CPAR3 DMA2_CPAR(DMA_CHANNEL3) #define DMA2_CPAR4 DMA2_CPAR(DMA_CHANNEL4) #define DMA2_CPAR5 DMA2_CPAR(DMA_CHANNEL5) /* DMA memory address register (DMAx_CMARy) */ #define DMA_CMAR(dma_base, channel) MMIO32(dma_base + 0x14 + \ (0x14 * ((channel) - 1))) #define DMA1_CMAR(channel) DMA_CMAR(DMA1, channel) #define DMA1_CMAR1 DMA1_CMAR(DMA_CHANNEL1) #define DMA1_CMAR2 DMA1_CMAR(DMA_CHANNEL2) #define DMA1_CMAR3 DMA1_CMAR(DMA_CHANNEL3) #define DMA1_CMAR4 DMA1_CMAR(DMA_CHANNEL4) #define DMA1_CMAR5 DMA1_CMAR(DMA_CHANNEL5) #define DMA1_CMAR6 DMA1_CMAR(DMA_CHANNEL6) #define DMA1_CMAR7 DMA1_CMAR(DMA_CHANNEL7) #define DMA2_CMAR(channel) DMA_CMAR(DMA2, channel) #define DMA2_CMAR1 DMA2_CMAR(DMA_CHANNEL1) #define DMA2_CMAR2 DMA2_CMAR(DMA_CHANNEL2) #define DMA2_CMAR3 DMA2_CMAR(DMA_CHANNEL3) #define DMA2_CMAR4 DMA2_CMAR(DMA_CHANNEL4) #define DMA2_CMAR5 DMA2_CMAR(DMA_CHANNEL5) /* --- DMA_ISR values ------------------------------------------------------ */ /* --- DMA Interrupt Flag offset values ------------------------------------- */ /* These are based on every interrupt flag and flag clear being at the same * relative location */ /** @defgroup dma_if_offset DMA Interrupt Flag Offsets within channel flag group. @ingroup dma_defines @{*/ /** Transfer Error Interrupt Flag */ #define DMA_TEIF (1 << 3) /** Half Transfer Interrupt Flag */ #define DMA_HTIF (1 << 2) /** Transfer Complete Interrupt Flag */ #define DMA_TCIF (1 << 1) /** Global Interrupt Flag */ #define DMA_GIF (1 << 0) /**@}*/ /* Offset within interrupt status register to start of channel interrupt flag * field */ #define DMA_FLAG_OFFSET(channel) (4*(channel - 1)) #define DMA_FLAGS (DMA_TEIF | DMA_TCIF | DMA_HTIF | \ DMA_GIF) #define DMA_ISR_MASK(channel) (DMA_FLAGS << DMA_FLAG_OFFSET(channel)) /* TEIF: Transfer error interrupt flag */ #define DMA_ISR_TEIF_BIT DMA_TEIF #define DMA_ISR_TEIF(channel) (DMA_ISR_TEIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_ISR_TEIF1 DMA_ISR_TEIF(DMA_CHANNEL1) #define DMA_ISR_TEIF2 DMA_ISR_TEIF(DMA_CHANNEL2) #define DMA_ISR_TEIF3 DMA_ISR_TEIF(DMA_CHANNEL3) #define DMA_ISR_TEIF4 DMA_ISR_TEIF(DMA_CHANNEL4) #define DMA_ISR_TEIF5 DMA_ISR_TEIF(DMA_CHANNEL5) #define DMA_ISR_TEIF6 DMA_ISR_TEIF(DMA_CHANNEL6) #define DMA_ISR_TEIF7 DMA_ISR_TEIF(DMA_CHANNEL7) /* HTIF: Half transfer interrupt flag */ #define DMA_ISR_HTIF_BIT DMA_HTIF #define DMA_ISR_HTIF(channel) (DMA_ISR_HTIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_ISR_HTIF1 DMA_ISR_HTIF(DMA_CHANNEL1) #define DMA_ISR_HTIF2 DMA_ISR_HTIF(DMA_CHANNEL2) #define DMA_ISR_HTIF3 DMA_ISR_HTIF(DMA_CHANNEL3) #define DMA_ISR_HTIF4 DMA_ISR_HTIF(DMA_CHANNEL4) #define DMA_ISR_HTIF5 DMA_ISR_HTIF(DMA_CHANNEL5) #define DMA_ISR_HTIF6 DMA_ISR_HTIF(DMA_CHANNEL6) #define DMA_ISR_HTIF7 DMA_ISR_HTIF(DMA_CHANNEL7) /* TCIF: Transfer complete interrupt flag */ #define DMA_ISR_TCIF_BIT DMA_TCIF #define DMA_ISR_TCIF(channel) (DMA_ISR_TCIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_ISR_TCIF1 DMA_ISR_TCIF(DMA_CHANNEL1) #define DMA_ISR_TCIF2 DMA_ISR_TCIF(DMA_CHANNEL2) #define DMA_ISR_TCIF3 DMA_ISR_TCIF(DMA_CHANNEL3) #define DMA_ISR_TCIF4 DMA_ISR_TCIF(DMA_CHANNEL4) #define DMA_ISR_TCIF5 DMA_ISR_TCIF(DMA_CHANNEL5) #define DMA_ISR_TCIF6 DMA_ISR_TCIF(DMA_CHANNEL6) #define DMA_ISR_TCIF7 DMA_ISR_TCIF(DMA_CHANNEL7) /* GIF: Global interrupt flag */ #define DMA_ISR_GIF_BIT DMA_GIF #define DMA_ISR_GIF(channel) (DMA_ISR_GIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_ISR_GIF1 DMA_ISR_GIF(DMA_CHANNEL1) #define DMA_ISR_GIF2 DMA_ISR_GIF(DMA_CHANNEL2) #define DMA_ISR_GIF3 DMA_ISR_GIF(DMA_CHANNEL3) #define DMA_ISR_GIF4 DMA_ISR_GIF(DMA_CHANNEL4) #define DMA_ISR_GIF5 DMA_ISR_GIF(DMA_CHANNEL5) #define DMA_ISR_GIF6 DMA_ISR_GIF(DMA_CHANNEL6) #define DMA_ISR_GIF7 DMA_ISR_GIF(DMA_CHANNEL7) /* --- DMA_IFCR values ----------------------------------------------------- */ /* CTEIF: Transfer error clear */ #define DMA_IFCR_CTEIF_BIT DMA_TEIF #define DMA_IFCR_CTEIF(channel) (DMA_IFCR_CTEIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_IFCR_CTEIF1 DMA_IFCR_CTEIF(DMA_CHANNEL1) #define DMA_IFCR_CTEIF2 DMA_IFCR_CTEIF(DMA_CHANNEL2) #define DMA_IFCR_CTEIF3 DMA_IFCR_CTEIF(DMA_CHANNEL3) #define DMA_IFCR_CTEIF4 DMA_IFCR_CTEIF(DMA_CHANNEL4) #define DMA_IFCR_CTEIF5 DMA_IFCR_CTEIF(DMA_CHANNEL5) #define DMA_IFCR_CTEIF6 DMA_IFCR_CTEIF(DMA_CHANNEL6) #define DMA_IFCR_CTEIF7 DMA_IFCR_CTEIF(DMA_CHANNEL7) /* CHTIF: Half transfer clear */ #define DMA_IFCR_CHTIF_BIT DMA_HTIF #define DMA_IFCR_CHTIF(channel) (DMA_IFCR_CHTIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_IFCR_CHTIF1 DMA_IFCR_CHTIF(DMA_CHANNEL1) #define DMA_IFCR_CHTIF2 DMA_IFCR_CHTIF(DMA_CHANNEL2) #define DMA_IFCR_CHTIF3 DMA_IFCR_CHTIF(DMA_CHANNEL3) #define DMA_IFCR_CHTIF4 DMA_IFCR_CHTIF(DMA_CHANNEL4) #define DMA_IFCR_CHTIF5 DMA_IFCR_CHTIF(DMA_CHANNEL5) #define DMA_IFCR_CHTIF6 DMA_IFCR_CHTIF(DMA_CHANNEL6) #define DMA_IFCR_CHTIF7 DMA_IFCR_CHTIF(DMA_CHANNEL7) /* CTCIF: Transfer complete clear */ #define DMA_IFCR_CTCIF_BIT DMA_TCIF #define DMA_IFCR_CTCIF(channel) (DMA_IFCR_CTCIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_IFCR_CTCIF1 DMA_IFCR_CTCIF(DMA_CHANNEL1) #define DMA_IFCR_CTCIF2 DMA_IFCR_CTCIF(DMA_CHANNEL2) #define DMA_IFCR_CTCIF3 DMA_IFCR_CTCIF(DMA_CHANNEL3) #define DMA_IFCR_CTCIF4 DMA_IFCR_CTCIF(DMA_CHANNEL4) #define DMA_IFCR_CTCIF5 DMA_IFCR_CTCIF(DMA_CHANNEL5) #define DMA_IFCR_CTCIF6 DMA_IFCR_CTCIF(DMA_CHANNEL6) #define DMA_IFCR_CTCIF7 DMA_IFCR_CTCIF(DMA_CHANNEL7) /* CGIF: Global interrupt clear */ #define DMA_IFCR_CGIF_BIT DMA_GIF #define DMA_IFCR_CGIF(channel) (DMA_IFCR_CGIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_IFCR_CGIF1 DMA_IFCR_CGIF(DMA_CHANNEL1) #define DMA_IFCR_CGIF2 DMA_IFCR_CGIF(DMA_CHANNEL2) #define DMA_IFCR_CGIF3 DMA_IFCR_CGIF(DMA_CHANNEL3) #define DMA_IFCR_CGIF4 DMA_IFCR_CGIF(DMA_CHANNEL4) #define DMA_IFCR_CGIF5 DMA_IFCR_CGIF(DMA_CHANNEL5) #define DMA_IFCR_CGIF6 DMA_IFCR_CGIF(DMA_CHANNEL6) #define DMA_IFCR_CGIF7 DMA_IFCR_CGIF(DMA_CHANNEL7) /* Clear interrupts mask */ #define DMA_IFCR_CIF_BIT 0xF #define DMA_IFCR_CIF(channel) (DMA_IFCR_CIF_BIT << \ (DMA_FLAG_OFFSET(channel))) #define DMA_IFCR_CIF1 DMA_IFCR_CIF(DMA_CHANNEL1) #define DMA_IFCR_CIF2 DMA_IFCR_CIF(DMA_CHANNEL2) #define DMA_IFCR_CIF3 DMA_IFCR_CIF(DMA_CHANNEL3) #define DMA_IFCR_CIF4 DMA_IFCR_CIF(DMA_CHANNEL4) #define DMA_IFCR_CIF5 DMA_IFCR_CIF(DMA_CHANNEL5) #define DMA_IFCR_CIF6 DMA_IFCR_CIF(DMA_CHANNEL6) #define DMA_IFCR_CIF7 DMA_IFCR_CIF(DMA_CHANNEL7) /* --- DMA_CCRx generic values --------------------------------------------- */ /* MEM2MEM: Memory to memory mode */ #define DMA_CCR_MEM2MEM (1 << 14) /* PL[13:12]: Channel priority level */ /** @defgroup dma_ch_pri DMA Channel Priority Levels @ingroup dma_defines @{*/ #define DMA_CCR_PL_LOW (0x0 << 12) #define DMA_CCR_PL_MEDIUM (0x1 << 12) #define DMA_CCR_PL_HIGH (0x2 << 12) #define DMA_CCR_PL_VERY_HIGH (0x3 << 12) /**@}*/ #define DMA_CCR_PL_MASK (0x3 << 12) #define DMA_CCR_PL_SHIFT 12 /* MSIZE[11:10]: Memory size */ /** @defgroup dma_ch_memwidth DMA Channel Memory Word Width @ingroup dma_defines @{*/ #define DMA_CCR_MSIZE_8BIT (0x0 << 10) #define DMA_CCR_MSIZE_16BIT (0x1 << 10) #define DMA_CCR_MSIZE_32BIT (0x2 << 10) /**@}*/ #define DMA_CCR_MSIZE_MASK (0x3 << 10) #define DMA_CCR_MSIZE_SHIFT 10 /* PSIZE[9:8]: Peripheral size */ /** @defgroup dma_ch_perwidth DMA Channel Peripheral Word Width @ingroup dma_defines @{*/ #define DMA_CCR_PSIZE_8BIT (0x0 << 8) #define DMA_CCR_PSIZE_16BIT (0x1 << 8) #define DMA_CCR_PSIZE_32BIT (0x2 << 8) /**@}*/ #define DMA_CCR_PSIZE_MASK (0x3 << 8) #define DMA_CCR_PSIZE_SHIFT 8 /* MINC: Memory increment mode */ #define DMA_CCR_MINC (1 << 7) /* PINC: Peripheral increment mode */ #define DMA_CCR_PINC (1 << 6) /* CIRC: Circular mode */ #define DMA_CCR_CIRC (1 << 5) /* DIR: Data transfer direction */ #define DMA_CCR_DIR (1 << 4) /* TEIE: Transfer error interrupt enable */ #define DMA_CCR_TEIE (1 << 3) /* HTIE: Half transfer interrupt enable */ #define DMA_CCR_HTIE (1 << 2) /* TCIE: Transfer complete interrupt enable */ #define DMA_CCR_TCIE (1 << 1) /* EN: Channel enable */ #define DMA_CCR_EN (1 << 0) /* --- DMA_CNDTRx values --------------------------------------------------- */ /* NDT[15:0]: Number of data to transfer */ /* --- DMA_CPARx values ---------------------------------------------------- */ /* PA[31:0]: Peripheral address */ /* --- DMA_CMARx values ---------------------------------------------------- */ /* MA[31:0]: Memory address */ /* --- Generic values ------------------------------------------------------ */ /** @defgroup dma_ch DMA Channel Number @ingroup dma_defines @{*/ #define DMA_CHANNEL1 1 #define DMA_CHANNEL2 2 #define DMA_CHANNEL3 3 #define DMA_CHANNEL4 4 #define DMA_CHANNEL5 5 #define DMA_CHANNEL6 6 #define DMA_CHANNEL7 7 /**@}*/ /* --- function prototypes ------------------------------------------------- */ BEGIN_DECLS void dma_channel_reset(uint32_t dma, uint8_t channel); void dma_clear_interrupt_flags(uint32_t dma, uint8_t channel, uint32_t interrupts); bool dma_get_interrupt_flag(uint32_t dma, uint8_t channel, uint32_t interrupts); void dma_enable_mem2mem_mode(uint32_t dma, uint8_t channel); void dma_set_priority(uint32_t dma, uint8_t channel, uint32_t prio); void dma_set_memory_size(uint32_t dma, uint8_t channel, uint32_t mem_size); void dma_set_peripheral_size(uint32_t dma, uint8_t channel, uint32_t peripheral_size); void dma_enable_memory_increment_mode(uint32_t dma, uint8_t channel); void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel); void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t channel); void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel); void dma_enable_circular_mode(uint32_t dma, uint8_t channel); void dma_set_read_from_peripheral(uint32_t dma, uint8_t channel); void dma_set_read_from_memory(uint32_t dma, uint8_t channel); void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t channel); void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t channel); void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t channel); void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t channel); void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t channel); void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t channel); void dma_enable_channel(uint32_t dma, uint8_t channel); void dma_disable_channel(uint32_t dma, uint8_t channel); void dma_set_peripheral_address(uint32_t dma, uint8_t channel, uint32_t address); void dma_set_memory_address(uint32_t dma, uint8_t channel, uint32_t address); void dma_set_number_of_data(uint32_t dma, uint8_t channel, uint16_t number); END_DECLS #endif /** @cond */ #else #warning "dma_common_f13.h should not be included explicitly, only via dma.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/exti_common_all.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @cond */ #if defined(LIBOPENCM3_EXTI_H) /** @endcond */ #ifndef LIBOPENCM3_EXTI_COMMON_ALL_H #define LIBOPENCM3_EXTI_COMMON_ALL_H #include #include /* --- EXTI registers ------------------------------------------------------ */ #define EXTI_IMR MMIO32(EXTI_BASE + 0x00) #define EXTI_EMR MMIO32(EXTI_BASE + 0x04) #define EXTI_RTSR MMIO32(EXTI_BASE + 0x08) #define EXTI_FTSR MMIO32(EXTI_BASE + 0x0c) #define EXTI_SWIER MMIO32(EXTI_BASE + 0x10) #define EXTI_PR MMIO32(EXTI_BASE + 0x14) /* EXTI number definitions */ #define EXTI0 (1 << 0) #define EXTI1 (1 << 1) #define EXTI2 (1 << 2) #define EXTI3 (1 << 3) #define EXTI4 (1 << 4) #define EXTI5 (1 << 5) #define EXTI6 (1 << 6) #define EXTI7 (1 << 7) #define EXTI8 (1 << 8) #define EXTI9 (1 << 9) #define EXTI10 (1 << 10) #define EXTI11 (1 << 11) #define EXTI12 (1 << 12) #define EXTI13 (1 << 13) #define EXTI14 (1 << 14) #define EXTI15 (1 << 15) #define EXTI16 (1 << 16) #define EXTI17 (1 << 17) #define EXTI18 (1 << 18) #define EXTI19 (1 << 19) /* Trigger types */ enum exti_trigger_type { EXTI_TRIGGER_RISING, EXTI_TRIGGER_FALLING, EXTI_TRIGGER_BOTH, }; BEGIN_DECLS void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig); void exti_enable_request(uint32_t extis); void exti_disable_request(uint32_t extis); void exti_reset_request(uint32_t extis); void exti_select_source(uint32_t exti, uint32_t gpioport); uint32_t exti_get_flag_status(uint32_t exti); END_DECLS #endif /** @cond */ #else #warning "exti_common_all.h should not be included directly, only via exti.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/exti_common_l1f24.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @cond */ #if defined(LIBOPENCM3_EXTI_H) /** @endcond */ #ifndef LIBOPENCM3_EXTI_COMMON_F24_H #define LIBOPENCM3_EXTI_COMMON_F24_H #include #include #include /* EXTI number definitions */ #define EXTI20 (1 << 20) #define EXTI21 (1 << 21) #define EXTI22 (1 << 22) #endif /** @cond */ #else #warning "exti_common_f24.h should not be included directly, only via exti.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/flash_common_f234.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * For details see: * PM0081 Programming manual: STM32F40xxx and STM32F41xxx Flash programming * September 2011, Doc ID 018520 Rev 1 * https://github.com/libopencm3/libopencm3-archive/blob/master/st_micro/DM00023388.pdf */ /** @cond */ #ifdef LIBOPENCM3_FLASH_H /** @endcond */ #ifndef LIBOPENCM3_FLASH_COMMON_F234_H #define LIBOPENCM3_FLASH_COMMON_F234_H #include /* --- FLASH registers ----------------------------------------------------- */ #define FLASH_ACR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x00) #define FLASH_KEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x04) #define FLASH_OPTKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x08) #define FLASH_SR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x0C) #define FLASH_CR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x10) /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_LATENCY_0WS 0x00 #define FLASH_ACR_LATENCY_1WS 0x01 #define FLASH_ACR_LATENCY_2WS 0x02 #define FLASH_ACR_LATENCY_3WS 0x03 #define FLASH_ACR_LATENCY_4WS 0x04 #define FLASH_ACR_LATENCY_5WS 0x05 #define FLASH_ACR_LATENCY_6WS 0x06 #define FLASH_ACR_LATENCY_7WS 0x07 /* --- FLASH_SR values ----------------------------------------------------- */ /* --- FLASH_CR values ----------------------------------------------------- */ /* --- FLASH Keys -----------------------------------------------------------*/ #define FLASH_KEYR_KEY1 ((uint32_t)0x45670123) #define FLASH_KEYR_KEY2 ((uint32_t)0xcdef89ab) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void flash_set_ws(uint32_t ws); void flash_unlock(void); void flash_lock(void); void flash_clear_pgperr_flag(void); void flash_clear_eop_flag(void); void flash_clear_bsy_flag(void); void flash_clear_status_flags(void); void flash_wait_for_last_operation(void); END_DECLS #endif /** @cond */ #else #warning "flash_common_f234.h should not be included direcitly," #warning "only via flash.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/flash_common_f24.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * For details see: * PM0081 Programming manual: STM32F40xxx and STM32F41xxx Flash programming * September 2011, Doc ID 018520 Rev 1 * https://github.com/libopencm3/libopencm3-archive/blob/master/st_micro/DM00023388.pdf */ /** @cond */ #ifdef LIBOPENCM3_FLASH_H /** @endcond */ #ifndef LIBOPENCM3_FLASH_COMMON_F24_H #define LIBOPENCM3_FLASH_COMMON_F24_H #include #include /* --- FLASH registers ----------------------------------------------------- */ #define FLASH_OPTCR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x14) /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_DCRST (1 << 12) #define FLASH_ACR_ICRST (1 << 11) #define FLASH_ACR_DCE (1 << 10) #define FLASH_ACR_ICE (1 << 9) #define FLASH_ACR_PRFTEN (1 << 8) /* --- FLASH_SR values ----------------------------------------------------- */ #define FLASH_SR_BSY (1 << 16) #define FLASH_SR_PGSERR (1 << 7) #define FLASH_SR_PGPERR (1 << 6) #define FLASH_SR_PGAERR (1 << 5) #define FLASH_SR_WRPERR (1 << 4) #define FLASH_SR_OPERR (1 << 1) #define FLASH_SR_EOP (1 << 0) /* --- FLASH_CR values ----------------------------------------------------- */ #define FLASH_CR_LOCK (1 << 31) #define FLASH_CR_ERRIE (1 << 25) #define FLASH_CR_EOPIE (1 << 24) #define FLASH_CR_STRT (1 << 16) #define FLASH_CR_MER (1 << 2) #define FLASH_CR_SER (1 << 1) #define FLASH_CR_PG (1 << 0) #define FLASH_CR_SECTOR_0 (0x00 << 3) #define FLASH_CR_SECTOR_1 (0x01 << 3) #define FLASH_CR_SECTOR_2 (0x02 << 3) #define FLASH_CR_SECTOR_3 (0x03 << 3) #define FLASH_CR_SECTOR_4 (0x04 << 3) #define FLASH_CR_SECTOR_5 (0x05 << 3) #define FLASH_CR_SECTOR_6 (0x06 << 3) #define FLASH_CR_SECTOR_7 (0x07 << 3) #define FLASH_CR_SECTOR_8 (0x08 << 3) #define FLASH_CR_SECTOR_9 (0x09 << 3) #define FLASH_CR_SECTOR_10 (0x0a << 3) #define FLASH_CR_SECTOR_11 (0x0b << 3) #define FLASH_CR_PROGRAM_X8 (0x00 << 8) #define FLASH_CR_PROGRAM_X16 (0x01 << 8) #define FLASH_CR_PROGRAM_X32 (0x02 << 8) #define FLASH_CR_PROGRAM_X64 (0x03 << 8) /* --- FLASH_OPTCR values -------------------------------------------------- */ /* FLASH_OPTCR[27:16]: nWRP */ /* FLASH_OBR[15:8]: RDP */ #define FLASH_OPTCR_NRST_STDBY (1 << 7) #define FLASH_OPTCR_NRST_STOP (1 << 6) #define FLASH_OPTCR_WDG_SW (1 << 5) #define FLASH_OPTCR_OPTSTRT (1 << 1) #define FLASH_OPTCR_OPTLOCK (1 << 0) #define FLASH_OPTCR_BOR_LEVEL_3 (0x00 << 2) #define FLASH_OPTCR_BOR_LEVEL_2 (0x01 << 2) #define FLASH_OPTCR_BOR_LEVEL_1 (0x02 << 2) #define FLASH_OPTCR_BOR_OFF (0x03 << 2) /* --- FLASH Keys -----------------------------------------------------------*/ #define FLASH_OPTKEYR_KEY1 ((uint32_t)0x08192a3b) #define FLASH_OPTKEYR_KEY2 ((uint32_t)0x4c5d6e7f) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void flash_unlock_option_bytes(void); void flash_lock_option_bytes(void); void flash_clear_pgserr_flag(void); void flash_clear_wrperr_flag(void); void flash_clear_pgaerr_flag(void); void flash_dcache_enable(void); void flash_dcache_disable(void); void flash_icache_enable(void); void flash_icache_disable(void); void flash_prefetch_enable(void); void flash_prefetch_disable(void); void flash_dcache_reset(void); void flash_icache_reset(void); void flash_erase_all_sectors(uint32_t program_size); void flash_erase_sector(uint8_t sector, uint32_t program_size); void flash_program_double_word(uint32_t address, uint64_t data); void flash_program_word(uint32_t address, uint32_t data); void flash_program_half_word(uint32_t address, uint16_t data); void flash_program_byte(uint32_t address, uint8_t data); void flash_program(uint32_t address, uint8_t *data, uint32_t len); void flash_program_option_bytes(uint32_t data); END_DECLS #endif /** @cond */ #else #warning "flash_common_f24.h should not be included direcitly," #warning "only via flash.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/gpio_common_all.h ================================================ /** @addtogroup gpio_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA GPIO.H The order of header inclusion is important. gpio.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_GPIO_H) || defined(LIBOPENCM3_GPIO_COMMON_F24_H) /** @endcond */ #ifndef LIBOPENCM3_GPIO_COMMON_ALL_H #define LIBOPENCM3_GPIO_COMMON_ALL_H /**@{*/ #include /* --- Convenience macros -------------------------------------------------- */ /* --- GPIO_LCKR values ---------------------------------------------------- */ #define GPIO_LCKK (1 << 16) /* GPIO_LCKR[15:0]: LCKy: Port x lock bit y (y = 0..15) */ /* GPIO number definitions (for convenience) */ /** @defgroup gpio_pin_id GPIO Pin Identifiers @ingroup gpio_defines @{*/ #define GPIO0 (1 << 0) #define GPIO1 (1 << 1) #define GPIO2 (1 << 2) #define GPIO3 (1 << 3) #define GPIO4 (1 << 4) #define GPIO5 (1 << 5) #define GPIO6 (1 << 6) #define GPIO7 (1 << 7) #define GPIO8 (1 << 8) #define GPIO9 (1 << 9) #define GPIO10 (1 << 10) #define GPIO11 (1 << 11) #define GPIO12 (1 << 12) #define GPIO13 (1 << 13) #define GPIO14 (1 << 14) #define GPIO15 (1 << 15) #define GPIO_ALL 0xffff /**@}*/ BEGIN_DECLS void gpio_set(uint32_t gpioport, uint16_t gpios); void gpio_clear(uint32_t gpioport, uint16_t gpios); uint16_t gpio_get(uint32_t gpioport, uint16_t gpios); void gpio_toggle(uint32_t gpioport, uint16_t gpios); uint16_t gpio_port_read(uint32_t gpioport); void gpio_port_write(uint32_t gpioport, uint16_t data); void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "gpio_common_all.h should not be included explicitly, only via gpio.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/gpio_common_f234.h ================================================ /** @addtogroup gpio_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA GPIO.H The order of header inclusion is important. gpio.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_GPIO_H /** @endcond */ #ifndef LIBOPENCM3_GPIO_COMMON_F234_H #define LIBOPENCM3_GPIO_COMMON_F234_H /**@{*/ #include /* GPIO port base addresses (for convenience) */ /** @defgroup gpio_port_id GPIO Port IDs @ingroup gpio_defines @{*/ #define GPIOA GPIO_PORT_A_BASE #define GPIOB GPIO_PORT_B_BASE #define GPIOC GPIO_PORT_C_BASE #define GPIOD GPIO_PORT_D_BASE #define GPIOE GPIO_PORT_E_BASE #define GPIOF GPIO_PORT_F_BASE /**@}*/ /* --- GPIO registers for STM32F2, STM32F3 and STM32F4 --------------------- */ /* Port mode register (GPIOx_MODER) */ #define GPIO_MODER(port) MMIO32(port + 0x00) #define GPIOA_MODER GPIO_MODER(GPIOA) #define GPIOB_MODER GPIO_MODER(GPIOB) #define GPIOC_MODER GPIO_MODER(GPIOC) #define GPIOD_MODER GPIO_MODER(GPIOD) #define GPIOE_MODER GPIO_MODER(GPIOE) #define GPIOF_MODER GPIO_MODER(GPIOF) /* Port output type register (GPIOx_OTYPER) */ #define GPIO_OTYPER(port) MMIO32(port + 0x04) #define GPIOA_OTYPER GPIO_OTYPER(GPIOA) #define GPIOB_OTYPER GPIO_OTYPER(GPIOB) #define GPIOC_OTYPER GPIO_OTYPER(GPIOC) #define GPIOD_OTYPER GPIO_OTYPER(GPIOD) #define GPIOE_OTYPER GPIO_OTYPER(GPIOE) #define GPIOF_OTYPER GPIO_OTYPER(GPIOF) /* Port output speed register (GPIOx_OSPEEDR) */ #define GPIO_OSPEEDR(port) MMIO32(port + 0x08) #define GPIOA_OSPEEDR GPIO_OSPEEDR(GPIOA) #define GPIOB_OSPEEDR GPIO_OSPEEDR(GPIOB) #define GPIOC_OSPEEDR GPIO_OSPEEDR(GPIOC) #define GPIOD_OSPEEDR GPIO_OSPEEDR(GPIOD) #define GPIOE_OSPEEDR GPIO_OSPEEDR(GPIOE) #define GPIOF_OSPEEDR GPIO_OSPEEDR(GPIOF) /* Port pull-up/pull-down register (GPIOx_PUPDR) */ #define GPIO_PUPDR(port) MMIO32(port + 0x0c) #define GPIOA_PUPDR GPIO_PUPDR(GPIOA) #define GPIOB_PUPDR GPIO_PUPDR(GPIOB) #define GPIOC_PUPDR GPIO_PUPDR(GPIOC) #define GPIOD_PUPDR GPIO_PUPDR(GPIOD) #define GPIOE_PUPDR GPIO_PUPDR(GPIOE) #define GPIOF_PUPDR GPIO_PUPDR(GPIOF) /* Port input data register (GPIOx_IDR) */ #define GPIO_IDR(port) MMIO32(port + 0x10) #define GPIOA_IDR GPIO_IDR(GPIOA) #define GPIOB_IDR GPIO_IDR(GPIOB) #define GPIOC_IDR GPIO_IDR(GPIOC) #define GPIOD_IDR GPIO_IDR(GPIOD) #define GPIOE_IDR GPIO_IDR(GPIOE) #define GPIOF_IDR GPIO_IDR(GPIOF) /* Port output data register (GPIOx_ODR) */ #define GPIO_ODR(port) MMIO32(port + 0x14) #define GPIOA_ODR GPIO_ODR(GPIOA) #define GPIOB_ODR GPIO_ODR(GPIOB) #define GPIOC_ODR GPIO_ODR(GPIOC) #define GPIOD_ODR GPIO_ODR(GPIOD) #define GPIOE_ODR GPIO_ODR(GPIOE) #define GPIOF_ODR GPIO_ODR(GPIOF) /* Port bit set/reset register (GPIOx_BSRR) */ #define GPIO_BSRR(port) MMIO32(port + 0x18) #define GPIOA_BSRR GPIO_BSRR(GPIOA) #define GPIOB_BSRR GPIO_BSRR(GPIOB) #define GPIOC_BSRR GPIO_BSRR(GPIOC) #define GPIOD_BSRR GPIO_BSRR(GPIOD) #define GPIOE_BSRR GPIO_BSRR(GPIOE) #define GPIOF_BSRR GPIO_BSRR(GPIOF) /* Port configuration lock register (GPIOx_LCKR) */ #define GPIO_LCKR(port) MMIO32(port + 0x1c) #define GPIOA_LCKR GPIO_LCKR(GPIOA) #define GPIOB_LCKR GPIO_LCKR(GPIOB) #define GPIOC_LCKR GPIO_LCKR(GPIOC) #define GPIOD_LCKR GPIO_LCKR(GPIOD) #define GPIOE_LCKR GPIO_LCKR(GPIOE) #define GPIOF_LCKR GPIO_LCKR(GPIOF) /* Alternate function low register (GPIOx_AFRL) */ #define GPIO_AFRL(port) MMIO32(port + 0x20) #define GPIOA_AFRL GPIO_AFRL(GPIOA) #define GPIOB_AFRL GPIO_AFRL(GPIOB) #define GPIOC_AFRL GPIO_AFRL(GPIOC) #define GPIOD_AFRL GPIO_AFRL(GPIOD) #define GPIOE_AFRL GPIO_AFRL(GPIOE) #define GPIOF_AFRL GPIO_AFRL(GPIOF) /* Alternate function high register (GPIOx_AFRH) */ #define GPIO_AFRH(port) MMIO32(port + 0x24) #define GPIOA_AFRH GPIO_AFRH(GPIOA) #define GPIOB_AFRH GPIO_AFRH(GPIOB) #define GPIOC_AFRH GPIO_AFRH(GPIOC) #define GPIOD_AFRH GPIO_AFRH(GPIOD) #define GPIOE_AFRH GPIO_AFRH(GPIOE) #define GPIOF_AFRH GPIO_AFRH(GPIOF) /* --- GPIOx_MODER values -------------------------------------------------- */ #define GPIO_MODE(n, mode) (mode << (2 * (n))) #define GPIO_MODE_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_mode GPIO Pin Direction and Analog/Digital Mode @ingroup gpio_defines @{*/ #define GPIO_MODE_INPUT 0x0 #define GPIO_MODE_OUTPUT 0x1 #define GPIO_MODE_AF 0x2 #define GPIO_MODE_ANALOG 0x3 /**@}*/ /* --- GPIOx_OTYPER values ------------------------------------------------- */ /** @defgroup gpio_output_type GPIO Output Pin Driver Type @ingroup gpio_defines @list Push Pull @list Open Drain @{*/ #define GPIO_OTYPE_PP 0x0 #define GPIO_OTYPE_OD 0x1 /**@}*/ /* --- GPIOx_OSPEEDR values ------------------------------------------------ */ #define GPIO_OSPEED(n, speed) (speed << (2 * (n))) #define GPIO_OSPEED_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_speed GPIO Output Pin Speed @ingroup gpio_defines @{*/ #define GPIO_OSPEED_2MHZ 0x0 #define GPIO_OSPEED_25MHZ 0x1 #define GPIO_OSPEED_50MHZ 0x2 #define GPIO_OSPEED_100MHZ 0x3 /**@}*/ /* --- GPIOx_PUPDR values -------------------------------------------------- */ #define GPIO_PUPD(n, pupd) (pupd << (2 * (n))) #define GPIO_PUPD_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_pup GPIO Output Pin Pullup @ingroup gpio_defines @{*/ #define GPIO_PUPD_NONE 0x0 #define GPIO_PUPD_PULLUP 0x1 #define GPIO_PUPD_PULLDOWN 0x2 /**@}*/ /* --- GPIOx_IDR values ---------------------------------------------------- */ /* GPIOx_IDR[15:0]: IDRy[15:0]: Port input data (y = 0..15) */ /* --- GPIOx_ODR values ---------------------------------------------------- */ /* GPIOx_ODR[15:0]: ODRy[15:0]: Port output data (y = 0..15) */ /* --- GPIOx_BSRR values --------------------------------------------------- */ /* GPIOx_BSRR[31:16]: BRy: Port x reset bit y (y = 0..15) */ /* GPIOx_BSRR[15:0]: BSy: Port x set bit y (y = 0..15) */ /* --- GPIOx_LCKR values --------------------------------------------------- */ #define GPIO_LCKK (1 << 16) /* GPIOx_LCKR[15:0]: LCKy: Port x lock bit y (y = 0..15) */ /* --- GPIOx_AFRL/H values ------------------------------------------------- */ /* Note: AFRL is used for bits 0..7, AFRH is used for 8..15 */ /* See datasheet table 6 (pg. 48) for alternate function mappings. */ #define GPIO_AFR(n, af) (af << ((n) * 4)) #define GPIO_AFR_MASK(n) (0xf << ((n) * 4)) /** @defgroup gpio_af_num Alternate Function Pin Selection @ingroup gpio_defines @{*/ #define GPIO_AF0 0x0 #define GPIO_AF1 0x1 #define GPIO_AF2 0x2 #define GPIO_AF3 0x3 #define GPIO_AF4 0x4 #define GPIO_AF5 0x5 #define GPIO_AF6 0x6 #define GPIO_AF7 0x7 #define GPIO_AF8 0x8 #define GPIO_AF9 0x9 #define GPIO_AF10 0xa #define GPIO_AF11 0xb #define GPIO_AF12 0xc #define GPIO_AF13 0xd #define GPIO_AF14 0xe #define GPIO_AF15 0xf /**@}*/ /* Note: EXTI source selection is now in the SYSCFG peripheral. */ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS /* * Note: The F2 and F4 series have a completely new GPIO peripheral with * different configuration options. Here we implement a different API partly to * more closely match the peripheral capabilities and also to deliberately * break compatibility with old F1 code so there is no confusion with similar * sounding functions that have very different functionality. */ void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down, uint16_t gpios); void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t speed, uint16_t gpios); void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "gpio_common_f234.h should not be included explicitly, only via gpio.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/gpio_common_f24.h ================================================ /** @addtogroup gpio_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA GPIO.H The order of header inclusion is important. gpio.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_GPIO_H /** @endcond */ #ifndef LIBOPENCM3_GPIO_COMMON_F24_H #define LIBOPENCM3_GPIO_COMMON_F24_H /**@{*/ #include #include /* GPIO port base addresses (for convenience) */ /** @defgroup gpio_port_id GPIO Port IDs @ingroup gpio_defines @{*/ #define GPIOG GPIO_PORT_G_BASE #define GPIOH GPIO_PORT_H_BASE #define GPIOI GPIO_PORT_I_BASE /**@}*/ /* --- GPIO registers for STM32F2, STM32F3 and STM32F4 --------------------- */ /* Port mode register (GPIOx_MODER) */ #define GPIOG_MODER GPIO_MODER(GPIOG) #define GPIOH_MODER GPIO_MODER(GPIOH) #define GPIOI_MODER GPIO_MODER(GPIOI) /* Port output type register (GPIOx_OTYPER) */ #define GPIOG_OTYPER GPIO_OTYPER(GPIOG) #define GPIOH_OTYPER GPIO_OTYPER(GPIOH) #define GPIOI_OTYPER GPIO_OTYPER(GPIOI) /* Port output speed register (GPIOx_OSPEEDR) */ #define GPIOG_OSPEEDR GPIO_OSPEEDR(GPIOG) #define GPIOH_OSPEEDR GPIO_OSPEEDR(GPIOH) #define GPIOI_OSPEEDR GPIO_OSPEEDR(GPIOI) /* Port pull-up/pull-down register (GPIOx_PUPDR) */ #define GPIOG_PUPDR GPIO_PUPDR(GPIOG) #define GPIOH_PUPDR GPIO_PUPDR(GPIOH) #define GPIOI_PUPDR GPIO_PUPDR(GPIOI) /* Port input data register (GPIOx_IDR) */ #define GPIOG_IDR GPIO_IDR(GPIOG) #define GPIOH_IDR GPIO_IDR(GPIOH) #define GPIOI_IDR GPIO_IDR(GPIOI) /* Port output data register (GPIOx_ODR) */ #define GPIOG_ODR GPIO_ODR(GPIOG) #define GPIOH_ODR GPIO_ODR(GPIOH) #define GPIOI_ODR GPIO_ODR(GPIOI) /* Port bit set/reset register (GPIOx_BSRR) */ #define GPIOG_BSRR GPIO_BSRR(GPIOG) #define GPIOH_BSRR GPIO_BSRR(GPIOH) #define GPIOI_BSRR GPIO_BSRR(GPIOI) /* Port configuration lock register (GPIOx_LCKR) */ #define GPIOG_LCKR GPIO_LCKR(GPIOG) #define GPIOH_LCKR GPIO_LCKR(GPIOH) #define GPIOI_LCKR GPIO_LCKR(GPIOI) /* Alternate function low register (GPIOx_AFRL) */ #define GPIOG_AFRL GPIO_AFRL(GPIOG) #define GPIOH_AFRL GPIO_AFRL(GPIOH) #define GPIOI_AFRL GPIO_AFRL(GPIOI) /* Alternate function high register (GPIOx_AFRH) */ #define GPIOG_AFRH GPIO_AFRH(GPIOG) #define GPIOH_AFRH GPIO_AFRH(GPIOH) #define GPIOI_AFRH GPIO_AFRH(GPIOI) #endif /** @cond */ #else #warning "gpio_common_f24.h should not be included explicitly, only via gpio.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/hash_common_f24.h ================================================ /** @addtogroup hash_defines @author @htmlonly © @endhtmlonly 2013 Mikhail Avkhimenia */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Mikhail Avkhimenia * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifdef LIBOPENCM3_HASH_H #ifndef LIBOPENCM3_HASH_COMMON_F24_H #define LIBOPENCM3_HASH_COMMON_F24_H #include /* --- Convenience macros -------------------------------------------------- */ /****************************************************************************/ /** @defgroup hash_reg_base HASH register base addresses @ingroup STM32F_hash_defines @{*/ #define HASH_BASE (PERIPH_BASE_AHB2 + 0x60400) #define HASH HASH_BASE /**@}*/ /* --- HASH registers ------------------------------------------------------ */ /* HASH control register (HASH_CR) */ #define HASH_CR MMIO32(HASH + 0x00) /* HASH data input register (HASH_DIR) */ #define HASH_DIN MMIO32(HASH + 0x04) /* HASH start register (HASH_STR) */ #define HASH_STR MMIO32(HASH + 0x08) /* HASH digest registers (HASH_HR[5]) */ #define HASH_HR (&MMIO32(HASH + 0x0C)) /* x5 */ /* HASH interrupt enable register (HASH_IMR) */ #define HASH_IMR MMIO32(HASH + 0x20) /* HASH status register (HASH_SR) */ #define HASH_SR MMIO32(HASH + 0x28) /* HASH context swap registers (HASH_CSR[51]) */ #define HASH_CSR (&MMIO32(HASH + 0xF8)) /* x51 */ /* --- HASH_CR values ------------------------------------------------------ */ /* INIT: Initialize message digest calculation */ #define HASH_CR_INIT (1 << 2) /* DMAE: DMA enable */ #define HASH_CR_DMAE (1 << 3) /* DATATYPE: Data type selection */ /****************************************************************************/ /** @defgroup hash_data_type HASH Data Type @ingroup hash_defines @{*/ #define HASH_DATA_32BIT (0 << 4) #define HASH_DATA_16BIT (1 << 4) #define HASH_DATA_8BIT (2 << 4) #define HASH_DATA_BITSTRING (3 << 4) /**@}*/ #define HASH_CR_DATATYPE (3 << 4) /* MODE: Mode selection */ /****************************************************************************/ /** @defgroup hash_mode HASH Mode @ingroup hash_defines @{*/ #define HASH_MODE_HASH (0 << 6) #define HASH_MODE_HMAC (1 << 6) /**@}*/ #define HASH_CR_MODE (1 << 6) /* ALGO: Algorithm selection */ /****************************************************************************/ /** @defgroup hash_algorithm HASH Algorithm @ingroup hash_defines @{*/ #define HASH_ALGO_SHA1 (0 << 7) #define HASH_ALGO_MD5 (1 << 7) /**@}*/ #define HASH_CR_ALGO (1 << 7) /* NBW: Number of words already pushed */ #define HASH_CR_NBW (15 << 8) /* DINNE: DIN(Data input register) not empty */ #define HASH_CR_DINNE (1 << 12) /* LKEY: Long key selection */ /****************************************************************************/ /** @defgroup hash_key_length HASH Key length @ingroup hash_defines @{*/ #define HASH_KEY_SHORT (0 << 16) #define HASH_KEY_LONG (1 << 16) /**@}*/ #define HASH_CR_LKEY (1 << 16) /* --- HASH_STR values ----------------------------------------------------- */ /* NBLW: Number of valid bits in the last word of the message in the bit string */ #define HASH_STR_NBW (31 << 0) /* DCAL: Digest calculation */ #define HASH_STR_DCAL (1 << 8) /* --- HASH_IMR values ----------------------------------------------------- */ /* DINIE: Data input interrupt enable */ #define HASH_IMR_DINIE (1 << 0) /* DCIE: Digest calculation completion interrupt enable */ #define HASH_IMR_DCIE (1 << 1) /* --- HASH_SR values ------------------------------------------------------ */ /* DINIS: Data input interrupt status */ #define HASH_SR_DINIS (1 << 0) /* DCIS: Digest calculation completion interrupt status */ #define HASH_SR_DCIS (1 << 1) /* DMAS: DMA Status */ #define HASH_SR_DMAS (1 << 2) /* BUSY: Busy bit */ #define HASH_SR_BUSY (1 << 3) /* --- HASH function prototypes -------------------------------------------- */ BEGIN_DECLS void hash_set_mode(uint8_t mode); void hash_set_algorithm(uint8_t algorithm); void hash_set_data_type(uint8_t datatype); void hash_set_key_length(uint8_t keylength); void hash_set_last_word_valid_bits(uint8_t validbits); void hash_init(void); void hash_add_data(uint32_t data); void hash_digest(void); void hash_get_result(uint32_t *data); END_DECLS /**@}*/ #endif #else #warning "hash_common_f24.h should not be included explicitly, only via hash.h" #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/i2c_common_all.h ================================================ /** @addtogroup i2c_defines @author @htmlonly © @endhtmlonly 2010 Thomas Otto */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA I2C.H The order of header inclusion is important. i2c.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_I2C_H) || defined(LIBOPENCM3_I2C_COMMON_F24_H) /** @endcond */ #ifndef LIBOPENCM3_I2C_COMMON_ALL_H #define LIBOPENCM3_I2C_COMMON_ALL_H #include /**@{*/ /* --- Convenience macros -------------------------------------------------- */ /* I2C register base addresses (for convenience) */ /****************************************************************************/ /** @defgroup i2c_reg_base I2C register base address @ingroup i2c_defines @{*/ #define I2C1 I2C1_BASE #define I2C2 I2C2_BASE /**@}*/ /* --- I2C registers ------------------------------------------------------- */ /* Control register 1 (I2Cx_CR1) */ #define I2C_CR1(i2c_base) MMIO32(i2c_base + 0x00) #define I2C1_CR1 I2C_CR1(I2C1) #define I2C2_CR1 I2C_CR1(I2C2) /* Control register 2 (I2Cx_CR2) */ #define I2C_CR2(i2c_base) MMIO32(i2c_base + 0x04) #define I2C1_CR2 I2C_CR2(I2C1) #define I2C2_CR2 I2C_CR2(I2C2) /* Own address register 1 (I2Cx_OAR1) */ #define I2C_OAR1(i2c_base) MMIO32(i2c_base + 0x08) #define I2C1_OAR1 I2C_OAR1(I2C1) #define I2C2_OAR1 I2C_OAR1(I2C2) /* Own address register 2 (I2Cx_OAR2) */ #define I2C_OAR2(i2c_base) MMIO32(i2c_base + 0x0c) #define I2C1_OAR2 I2C_OAR2(I2C1) #define I2C2_OAR2 I2C_OAR2(I2C2) /* Data register (I2Cx_DR) */ #define I2C_DR(i2c_base) MMIO32(i2c_base + 0x10) #define I2C1_DR I2C_DR(I2C1) #define I2C2_DR I2C_DR(I2C2) /* Status register 1 (I2Cx_SR1) */ #define I2C_SR1(i2c_base) MMIO32(i2c_base + 0x14) #define I2C1_SR1 I2C_SR1(I2C1) #define I2C2_SR1 I2C_SR1(I2C2) /* Status register 2 (I2Cx_SR2) */ #define I2C_SR2(i2c_base) MMIO32(i2c_base + 0x18) #define I2C1_SR2 I2C_SR2(I2C1) #define I2C2_SR2 I2C_SR2(I2C2) /* Clock control register (I2Cx_CCR) */ #define I2C_CCR(i2c_base) MMIO32(i2c_base + 0x1c) #define I2C1_CCR I2C_CCR(I2C1) #define I2C2_CCR I2C_CCR(I2C2) /* TRISE register (I2Cx_CCR) */ #define I2C_TRISE(i2c_base) MMIO32(i2c_base + 0x20) #define I2C1_TRISE I2C_TRISE(I2C1) #define I2C2_TRISE I2C_TRISE(I2C2) /* --- I2Cx_CR1 values ----------------------------------------------------- */ /* SWRST: Software reset */ #define I2C_CR1_SWRST (1 << 15) /* Note: Bit 14 is reserved, and forced to 0 by hardware. */ /* ALERT: SMBus alert */ #define I2C_CR1_ALERT (1 << 13) /* PEC: Packet error checking */ #define I2C_CR1_PEC (1 << 12) /* POS: Acknowledge / PEC position */ #define I2C_CR1_POS (1 << 11) /* ACK: Acknowledge enable */ #define I2C_CR1_ACK (1 << 10) /* STOP: STOP generation */ #define I2C_CR1_STOP (1 << 9) /* START: START generation */ #define I2C_CR1_START (1 << 8) /* NOSTRETCH: Clock stretching disable (slave mode) */ #define I2C_CR1_NOSTRETCH (1 << 7) /* ENGC: General call enable */ #define I2C_CR1_ENGC (1 << 6) /* ENPEC: Enable PEC */ #define I2C_CR1_ENPEC (1 << 5) /* ENARP: ARP enable */ #define I2C_CR1_ENARP (1 << 4) /* SMBTYPE: SMBus type */ #define I2C_CR1_SMBTYPE (1 << 3) /* Note: Bit 2 is reserved, and forced to 0 by hardware. */ /* SMBUS: SMBus mode */ #define I2C_CR1_SMBUS (1 << 1) /* PE: Peripheral enable */ #define I2C_CR1_PE (1 << 0) /* --- I2Cx_CR2 values ----------------------------------------------------- */ /* Note: Bits [15:13] are reserved, and forced to 0 by hardware. */ /* LAST: DMA last transfer */ #define I2C_CR2_LAST (1 << 12) /* DMAEN: DMA requests enable */ #define I2C_CR2_DMAEN (1 << 11) /* ITBUFEN: Buffer interrupt enable */ #define I2C_CR2_ITBUFEN (1 << 10) /* ITEVTEN: Event interrupt enable */ #define I2C_CR2_ITEVTEN (1 << 9) /* ITERREN: Error interrupt enable */ #define I2C_CR2_ITERREN (1 << 8) /* Note: Bits [7:6] are reserved, and forced to 0 by hardware. */ /* FREQ[5:0]: Peripheral clock frequency (valid values: 2-36 MHz) */ /****************************************************************************/ /** @defgroup i2c_clock I2C clock frequency settings @ingroup i2c_defines @{*/ #define I2C_CR2_FREQ_2MHZ 0x02 #define I2C_CR2_FREQ_3MHZ 0x03 #define I2C_CR2_FREQ_4MHZ 0x04 #define I2C_CR2_FREQ_5MHZ 0x05 #define I2C_CR2_FREQ_6MHZ 0x06 #define I2C_CR2_FREQ_7MHZ 0x07 #define I2C_CR2_FREQ_8MHZ 0x08 #define I2C_CR2_FREQ_9MHZ 0x09 #define I2C_CR2_FREQ_10MHZ 0x0a #define I2C_CR2_FREQ_11MHZ 0x0b #define I2C_CR2_FREQ_12MHZ 0x0c #define I2C_CR2_FREQ_13MHZ 0x0d #define I2C_CR2_FREQ_14MHZ 0x0e #define I2C_CR2_FREQ_15MHZ 0x0f #define I2C_CR2_FREQ_16MHZ 0x10 #define I2C_CR2_FREQ_17MHZ 0x11 #define I2C_CR2_FREQ_18MHZ 0x12 #define I2C_CR2_FREQ_19MHZ 0x13 #define I2C_CR2_FREQ_20MHZ 0x14 #define I2C_CR2_FREQ_21MHZ 0x15 #define I2C_CR2_FREQ_22MHZ 0x16 #define I2C_CR2_FREQ_23MHZ 0x17 #define I2C_CR2_FREQ_24MHZ 0x18 #define I2C_CR2_FREQ_25MHZ 0x19 #define I2C_CR2_FREQ_26MHZ 0x1a #define I2C_CR2_FREQ_27MHZ 0x1b #define I2C_CR2_FREQ_28MHZ 0x1c #define I2C_CR2_FREQ_29MHZ 0x1d #define I2C_CR2_FREQ_30MHZ 0x1e #define I2C_CR2_FREQ_31MHZ 0x1f #define I2C_CR2_FREQ_32MHZ 0x20 #define I2C_CR2_FREQ_33MHZ 0x21 #define I2C_CR2_FREQ_34MHZ 0x22 #define I2C_CR2_FREQ_35MHZ 0x23 #define I2C_CR2_FREQ_36MHZ 0x24 /**@}*/ /* --- I2Cx_OAR1 values ---------------------------------------------------- */ /* ADDMODE: Addressing mode (slave mode) */ #define I2C_OAR1_ADDMODE (1 << 15) #define I2C_OAR1_ADDMODE_7BIT 0 #define I2C_OAR1_ADDMODE_10BIT 1 /* Note: Bit 14 should always be kept at 1 by software! */ /* Note: Bits [13:10] are reserved, and forced to 0 by hardware. */ /* ADD: Address bits: [7:1] in 7-bit mode, bits [9:0] in 10-bit mode */ /* --- I2Cx_OAR2 values ---------------------------------------------------- */ /* Note: Bits [15:8] are reserved, and forced to 0 by hardware. */ /* ADD2[7:1]: Interface address (bits [7:1] in dual addressing mode) */ /* ENDUAL: Dual addressing mode enable */ #define I2C_OAR2_ENDUAL (1 << 0) /* --- I2Cx_DR values ------------------------------------------------------ */ /* Note: Bits [15:8] are reserved, and forced to 0 by hardware. */ /* DR[7:0] 8-bit data register */ /* --- I2Cx_SR1 values ----------------------------------------------------- */ /* SMBALERT: SMBus alert */ #define I2C_SR1_SMBALERT (1 << 15) /* TIMEOUT: Timeout or Tlow Error */ #define I2C_SR1_TIMEOUT (1 << 14) /* Note: Bit 13 is reserved, and forced to 0 by hardware. */ /* PECERR: PEC Error in reception */ #define I2C_SR1_PECERR (1 << 12) /* OVR: Overrun/Underrun */ #define I2C_SR1_OVR (1 << 11) /* AF: Acknowledge failure */ #define I2C_SR1_AF (1 << 10) /* ARLO: Arbitration lost (master mode) */ #define I2C_SR1_ARLO (1 << 9) /* BERR: Bus error */ #define I2C_SR1_BERR (1 << 8) /* TxE: Data register empty (transmitters) */ #define I2C_SR1_TxE (1 << 7) /* RxNE: Data register not empty (receivers) */ #define I2C_SR1_RxNE (1 << 6) /* Note: Bit 5 is reserved, and forced to 0 by hardware. */ /* STOPF: STOP detection (slave mode) */ #define I2C_SR1_STOPF (1 << 4) /* ADD10: 10-bit header sent (master mode) */ #define I2C_SR1_ADD10 (1 << 3) /* BTF: Byte transfer finished */ #define I2C_SR1_BTF (1 << 2) /* ADDR: Address sent (master mode) / address matched (slave mode) */ #define I2C_SR1_ADDR (1 << 1) /* SB: Start bit (master mode) */ #define I2C_SR1_SB (1 << 0) /* --- I2Cx_SR2 values ----------------------------------------------------- */ /* Bits [15:8]: PEC[7:0]: Packet error checking register */ /* DUALF: Dual flag (slave mode) */ #define I2C_SR2_DUALF (1 << 7) /* SMBHOST: SMBus host header (slave mode) */ #define I2C_SR2_SMBHOST (1 << 6) /* SMBDEFAULT: SMBus device default address (slave mode) */ #define I2C_SR2_SMBDEFAULT (1 << 5) /* GENCALL: General call address (slave mode) */ #define I2C_SR2_GENCALL (1 << 4) /* Note: Bit 3 is reserved, and forced to 0 by hardware. */ /* TRA: Transmitter / receiver */ #define I2C_SR2_TRA (1 << 2) /* BUSY: Bus busy */ #define I2C_SR2_BUSY (1 << 1) /* MSL: Master / slave */ #define I2C_SR2_MSL (1 << 0) /* --- I2Cx_CCR values ----------------------------------------------------- */ /* F/S: I2C Master mode selection (fast / standard) */ #define I2C_CCR_FS (1 << 15) /* DUTY: Fast Mode Duty Cycle */ /** @defgroup i2c_duty_cycle I2C peripheral clock duty cycles @ingroup i2c_defines @{*/ #define I2C_CCR_DUTY (1 << 14) #define I2C_CCR_DUTY_DIV2 0 #define I2C_CCR_DUTY_16_DIV_9 1 /**@}*/ /* Note: Bits [13:12] are reserved, and forced to 0 by hardware. */ /* * Bits [11:0]: * CCR[11:0]: Clock control register in Fast/Standard mode (master mode) */ /* --- I2Cx_TRISE values --------------------------------------------------- */ /* Note: Bits [15:6] are reserved, and forced to 0 by hardware. */ /* * Bits [5:0]: * TRISE[5:0]: Maximum rise time in Fast/Standard mode (master mode) */ /* --- I2C constant definitions -------------------------------------------- */ /****************************************************************************/ /** @defgroup i2c_rw I2C Read/Write bit @ingroup i2c_defines @{*/ #define I2C_WRITE 0 #define I2C_READ 1 /**@}*/ /* --- I2C function prototypes---------------------------------------------- */ BEGIN_DECLS void i2c_reset(uint32_t i2c); void i2c_peripheral_enable(uint32_t i2c); void i2c_peripheral_disable(uint32_t i2c); void i2c_send_start(uint32_t i2c); void i2c_send_stop(uint32_t i2c); void i2c_clear_stop(uint32_t i2c); void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave); void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave); void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq); void i2c_send_data(uint32_t i2c, uint8_t data); void i2c_set_fast_mode(uint32_t i2c); void i2c_set_standard_mode(uint32_t i2c); void i2c_set_ccr(uint32_t i2c, uint16_t freq); void i2c_set_trise(uint32_t i2c, uint16_t trise); void i2c_send_7bit_address(uint32_t i2c, uint8_t slave, uint8_t readwrite); uint8_t i2c_get_data(uint32_t i2c); void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt); void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt); void i2c_enable_ack(uint32_t i2c); void i2c_disable_ack(uint32_t i2c); void i2c_nack_next(uint32_t i2c); void i2c_nack_current(uint32_t i2c); void i2c_set_dutycycle(uint32_t i2c, uint32_t dutycycle); void i2c_enable_dma(uint32_t i2c); void i2c_disable_dma(uint32_t i2c); void i2c_set_dma_last_transfer(uint32_t i2c); void i2c_clear_dma_last_transfer(uint32_t i2c); END_DECLS #endif /** @cond */ #else #warning "i2c_common_all.h should not be included explicitly, only via i2c.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/i2c_common_f24.h ================================================ /** @addtogroup i2c_defines @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA I2C.H The order of header inclusion is important. i2c.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_I2C_H /** @endcond */ #ifndef LIBOPENCM3_I2C_COMMON_F24_H #define LIBOPENCM3_I2C_COMMON_F24_H #include /**@{*/ #define I2C3 I2C3_BASE /**@}*/ #endif /** @cond */ #else #warning "i2c_common_f24.h should not be included explicitly, only via i2c.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/iwdg_common_all.h ================================================ /** @addtogroup iwdg_defines @author @htmlonly © @endhtmlonly 2010 Thomas Otto */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA IWDG.H The order of header inclusion is important. iwdg.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_IWDG_H /** @endcond */ #ifndef LIBOPENCM3_IWDG_COMMON_ALL_H #define LIBOPENCM3_IWDG_COMMON_ALL_H #include /**@{*/ /* --- IWDG registers ------------------------------------------------------ */ /* Key Register (IWDG_KR) */ #define IWDG_KR MMIO32(IWDG_BASE + 0x00) /* Prescaler register (IWDG_PR) */ #define IWDG_PR MMIO32(IWDG_BASE + 0x04) /* Reload register (IWDG_RLR) */ #define IWDG_RLR MMIO32(IWDG_BASE + 0x08) /* Status register (IWDG_SR) */ #define IWDG_SR MMIO32(IWDG_BASE + 0x0c) /* --- IWDG_KR values ------------------------------------------------------ */ /* Bits [31:16]: Reserved. */ /* KEY[15:0]: Key value (write-only, reads as 0x0000) */ /** @defgroup iwdg_key IWDG Key Values @ingroup STM32F_iwdg_defines @{*/ #define IWDG_KR_RESET 0xaaaa #define IWDG_KR_UNLOCK 0x5555 #define IWDG_KR_START 0xcccc /**@}*/ /* --- IWDG_PR values ------------------------------------------------------ */ /* Bits [31:3]: Reserved. */ /* PR[2:0]: Prescaler divider */ #define IWDG_PR_LSB 0 /** @defgroup iwdg_prediv IWDG prescaler divider @ingroup STM32F_iwdg_defines @{*/ #define IWDG_PR_DIV4 0x0 #define IWDG_PR_DIV8 0x1 #define IWDG_PR_DIV16 0x2 #define IWDG_PR_DIV32 0x3 #define IWDG_PR_DIV64 0x4 #define IWDG_PR_DIV128 0x5 #define IWDG_PR_DIV256 0x6 /**@}*/ /* Double definition: 0x06 and 0x07 both mean DIV256 as per datasheet. */ /* #define IWDG_PR_DIV256 0x7 */ /* --- IWDG_RLR values ----------------------------------------------------- */ /* Bits [31:12]: Reserved. */ /* RL[11:0]: Watchdog counter reload value */ /* --- IWDG_SR values ------------------------------------------------------ */ /* Bits [31:2]: Reserved. */ /* RVU: Watchdog counter reload value update */ #define IWDG_SR_RVU (1 << 1) /* PVU: Watchdog prescaler value update */ #define IWDG_SR_PVU (1 << 0) /* --- IWDG function prototypes---------------------------------------------- */ BEGIN_DECLS void iwdg_start(void); void iwdg_set_period_ms(uint32_t period); bool iwdg_reload_busy(void); bool iwdg_prescaler_busy(void); void iwdg_reset(void); END_DECLS #endif /** @cond */ #else #warning "iwdg_common_all.h should not be included explicitly, only via iwdg.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/pwr_common_all.h ================================================ /** @addtogroup pwr_defines @author @htmlonly © @endhtmlonly 2010 Thomas Otto */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA PWR.H The order of header inclusion is important. pwr.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_PWR_H /** @endcond */ #ifndef LIBOPENCM3_PWR_COMMON_ALL_H #define LIBOPENCM3_PWR_COMMON_ALL_H /**@{*/ #include /* --- PWR registers ------------------------------------------------------- */ /* Power control register (PWR_CR) */ #define PWR_CR MMIO32(POWER_CONTROL_BASE + 0x00) /* Power control/status register (PWR_CSR) */ #define PWR_CSR MMIO32(POWER_CONTROL_BASE + 0x04) /* --- PWR_CR values ------------------------------------------------------- */ /* Bits [31:9]: Reserved, must be kept at reset value. */ /* DBP: Disable backup domain write protection */ #define PWR_CR_DBP (1 << 8) /* PLS[7:5]: PVD level selection */ #define PWR_CR_PLS_LSB 5 /** @defgroup pwr_pls PVD level selection @ingroup STM32F_pwr_defines @{*/ #define PWR_CR_PLS_2V2 (0x0 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V3 (0x1 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V4 (0x2 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V5 (0x3 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V6 (0x4 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V7 (0x5 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V8 (0x6 << PWR_CR_PLS_LSB) #define PWR_CR_PLS_2V9 (0x7 << PWR_CR_PLS_LSB) /**@}*/ #define PWR_CR_PLS_MASK (0x7 << PWR_CR_PLS_LSB) /* PVDE: Power voltage detector enable */ #define PWR_CR_PVDE (1 << 4) /* CSBF: Clear standby flag */ #define PWR_CR_CSBF (1 << 3) /* CWUF: Clear wakeup flag */ #define PWR_CR_CWUF (1 << 2) /* PDDS: Power down deepsleep */ #define PWR_CR_PDDS (1 << 1) /* LPDS: Low-power deepsleep */ #define PWR_CR_LPDS (1 << 0) /* --- PWR_CSR values ------------------------------------------------------ */ /* Bits [31:9]: Reserved, must be kept at reset value. */ /* EWUP: Enable WKUP pin */ #define PWR_CSR_EWUP (1 << 8) /* Bits [7:3]: Reserved, must be kept at reset value. */ /* PVDO: PVD output */ #define PWR_CSR_PVDO (1 << 2) /* SBF: Standby flag */ #define PWR_CSR_SBF (1 << 1) /* WUF: Wakeup flag */ #define PWR_CSR_WUF (1 << 0) /* --- PWR function prototypes ------------------------------------------- */ BEGIN_DECLS void pwr_disable_backup_domain_write_protect(void); void pwr_enable_backup_domain_write_protect(void); void pwr_enable_power_voltage_detect(uint32_t pvd_level); void pwr_disable_power_voltage_detect(void); void pwr_clear_standby_flag(void); void pwr_clear_wakeup_flag(void); void pwr_set_standby_mode(void); void pwr_set_stop_mode(void); void pwr_voltage_regulator_on_in_stop(void); void pwr_voltage_regulator_low_power_in_stop(void); void pwr_enable_wakeup_pin(void); void pwr_disable_wakeup_pin(void); bool pwr_voltage_high(void); bool pwr_get_standby_flag(void); bool pwr_get_wakeup_flag(void); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "pwr_common_all.h should not be included explicitly, only via pwr.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/rng_common_f24.h ================================================ /* * This file is part of the libopencm3 project. * * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA RNG.H The order of header inclusion is important. rng.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_RNG_H /** @endcond */ #ifndef LIBOPENCM3_RNG_COMMON_F24_H #define LIBOPENCM3_RNG_COMMON_F24_H #include #include /* --- Random number generator registers ----------------------------------- */ /* Control register */ #define RNG_CR MMIO32(RNG_BASE + 0x00) /* Status register */ #define RNG_SR MMIO32(RNG_BASE + 0x04) /* Data register */ #define RNG_DR MMIO32(RNG_BASE + 0x08) /* --- RNG_CR values ------------------------------------------------------- */ /* RNG ENABLE */ #define RNG_CR_RNGEN (1 << 2) /* RNG interrupt enable */ #define RNG_CR_IE (1 << 3) /* --- RNG_SR values ------------------------------------------------------- */ /* Data ready */ #define RNG_SR_DRDY (1 << 0) /* Clock error current status */ #define RNG_SR_CECS (1 << 1) /* Seed error current status */ #define RNG_SR_SECS (1 << 2) /* Clock error interrupt status */ #define RNG_SR_CEIS (1 << 5) /* Seed error interrupt status */ #define RNG_SR_SEIS (1 << 6) #endif /** @cond */ #else #warning "rng_common_f24.h should not be included explicitly, only via rng.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/rtc_common_l1f024.h ================================================ /** @addtogroup rtc_defines @author @htmlonly © @endhtmlonly 2012 Karl Palsson */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * This covers the "version 2" RTC peripheral. This is completely different * to the v1 RTC periph on the F1 series devices. It has BCD counters, with * automatic leapyear corrections and daylight savings support. * This peripheral is used on the F0, F2, F3, F4 and L1 devices, though some * only support a subset. */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA RTC.H The order of header inclusion is important. rtc.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_RTC_H /** @endcond */ #ifndef LIBOPENCM3_RTC2_H #define LIBOPENCM3_RTC2_H /**@{*/ #include #include /* RTC time register (RTC_TR) */ #define RTC_TR MMIO32(RTC_BASE + 0x00) /* RTC date register (RTC_DR) */ #define RTC_DR MMIO32(RTC_BASE + 0x04) /* RTC control register (RTC_CR) */ #define RTC_CR MMIO32(RTC_BASE + 0x08) /* RTC initialization and status register (RTC_ISR) */ #define RTC_ISR MMIO32(RTC_BASE + 0x0c) /* RTC prescaler register (RTC_PRER) */ #define RTC_PRER MMIO32(RTC_BASE + 0x10) /* RTC wakeup timer register (RTC_WUTR) */ #define RTC_WUTR MMIO32(RTC_BASE + 0x14) /* RTC calibration register (RTC_CALIBR) NB: see also RTC_CALR */ #define RTC_CALIBR MMIO32(RTC_BASE + 0x18) /* RTC alarm X register (RTC_ALRMxR) */ #define RTC_ALRMAR MMIO32(RTC_BASE + 0x1c) #define RTC_ALRMBR MMIO32(RTC_BASE + 0x20) /* RTC write protection register (RTC_WPR)*/ #define RTC_WPR MMIO32(RTC_BASE + 0x24) /* RTC sub second register (RTC_SSR) (high and med+ only) */ #define RTC_SSR MMIO32(RTC_BASE + 0x28) /* RTC shift control register (RTC_SHIFTR) (high and med+ only) */ #define RTC_SHIFTR MMIO32(RTC_BASE + 0x2c) /* RTC time stamp time register (RTC_TSTR) */ #define RTC_TSTR MMIO32(RTC_BASE + 0x30) /* RTC time stamp date register (RTC_TSDR) */ #define RTC_TSDR MMIO32(RTC_BASE + 0x34) /* RTC timestamp sub second register (RTC_TSSSR) (high and med+ only) */ #define RTC_TSSSR MMIO32(RTC_BASE + 0x38) /* RTC calibration register (RTC_CALR) (high and med+ only) */ #define RTC_CALR MMIO32(RTC_BASE + 0x3c) /* RTC tamper and alternate function configuration register (RTC_TAFCR) */ #define RTC_TAFCR MMIO32(RTC_BASE + 0x40) /* RTC alarm X sub second register (RTC_ALRMxSSR) (high and med+ only) */ #define RTC_ALRMASSR MMIO32(RTC_BASE + 0x44) #define RTC_ALRMBSSR MMIO32(RTC_BASE + 0x48) /* RTC backup registers (RTC_BKPxR) */ #define RTC_BKP_BASE (RTC_BASE + 0x50) #define RTC_BKPXR(reg) MMIO32(RTC_BKP_BASE + (4*reg)) /* RTC time register (RTC_TR) ----------------------------------- */ /* Note: Bits [31:23], 15, and 7 are reserved, and must be kept at reset value. */ #define RTC_TR_PM (1 << 22) /* AM/PM notation */ #define RTC_TR_HT_SHIFT (20) /* Hour tens in BCD format shift */ #define RTC_TR_HT_MASK (0x3) /* Hour tens in BCD format mask */ #define RTC_TR_HU_SHIFT (16) /* Hour units in BCD format shift */ #define RTC_TR_HU_MASK (0xf) /* Hour units in BCD format mask */ #define RTC_TR_MNT_SHIFT (12) /* Minute tens in BCD format shift */ #define RTC_TR_MNT_MASK (0x7) /* Minute tens in BCD format mask */ #define RTC_TR_MNU_SHIFT (8) /* Minute units in BCD format shift */ #define RTC_TR_MNU_MASK (0xf) /* Minute units in BCD format mask */ #define RTC_TR_ST_SHIFT (4) /* Second tens in BCD format shift */ #define RTC_TR_ST_MASK (0x7) /* Second tens in BCD format mask */ #define RTC_TR_SU_SHIFT (0) /* Second units in BCD format shift */ #define RTC_TR_SU_MASK (0xf) /* Second units in BCD format mask */ /* RTC date register (RTC_DR) ----------------------------------- */ /* Note: Bits [31:24] and [7:6] are reserved, and must be kept at reset value. */ #define RTC_DR_YT_SHIFT (20) /* Year tens in BCD format shift */ #define RTC_DR_YT_MASK (0xf) /* Year tens in BCD format mask */ #define RTC_DR_YU_SHIFT (16) /* Year units in BCD format shift */ #define RTC_DR_YU_MASK (0xf) /* Year units in BCD format mask */ #define RTC_DR_WDU_SHIFT (13) /* Weekday units shift */ #define RTC_DR_WDU_MASK (0x7) /* Weekday units mask */ #define RTC_DR_MT (1<<12) /* Month tens in BCD format shift */ #define RTC_DR_MT_SHIFT (12) /* Month tens in BCD format mask */ #define RTC_DR_MU_SHIFT (8) /* Month units in BCD format shift */ #define RTC_DR_MU_MASK (0xf) /* Month units in BCD format mask */ #define RTC_DR_DT_SHIFT (4) /* Date tens in BCD format shift */ #define RTC_DR_DT_MASK (0x3) /* Date tens in BCD format mask */ #define RTC_DR_DU_SHIFT (0) /* Date units in BCD format shift */ #define RTC_DR_DU_MASK (0xf) /* Date units in BCD format mask */ /* RTC control register (RTC_CR) -------------------------------- */ /* Note: Bits [31:24] are reserved, and must be kept at reset value. */ /* Note: Bits 7, 6 and 4 of this register can be written in initialization mode * only (RTC_ISR/INITF = 1). */ /* Note: Bits 2 to 0 of this register can be written only when RTC_CR WUTE bit * = 0 and RTC_ISR WUTWF bit = 1. */ #define RTC_CR_COE (1<<23) /* RTC_CR_COE: Calibration output enable */ /* RTC_CR_OSEL: Output selection values */ /* Note: These bits are used to select the flag to be routed to AFO_ALARM RTC * output */ #define RTC_CR_OSEL_SHIFT 21 #define RTC_CR_OSEL_MASK (0x3) #define RTC_CR_OSEL_DISABLED (0x0) #define RTC_CR_OSEL_ALARMA (0x1) #define RTC_CR_OSEL_ALARMB (0x2) #define RTC_CR_OSEL_WAKEUP (0x3) #define RTC_CR_POL (1<<20) /* RTC_CR_POL: Output polarity */ #define RTC_CR_COSEL (1<<19) /* RTC_CR_COSEL: Calibration output selection */ #define RTC_CR_BKP (1<<18) /* RTC_CR_BKP: Backup */ #define RTC_CR_SUB1H (1<<17) /* RTC_CR_SUB1H: Subtract 1 hour (winter time change) */ #define RTC_CR_ADD1H (1<<16) /* RTC_CR_ADD1H: Add 1 hour (summer time change) */ #define RTC_CR_TSIE (1<<15) /* RTC_CR_TSIE: Timestamp interrupt enable */ #define RTC_CR_WUTIE (1<<14) /* RTC_CR_WUTIE: Wakeup timer interrupt enable */ #define RTC_CR_ALRBIE (1<<13) /* RTC_CR_ALRBIE: Alarm B interrupt enable */ #define RTC_CR_ALRAIE (1<<12) /* RTC_CR_ALRAIE: Alarm A interrupt enable */ #define RTC_CR_TSE (1<<11) /* RTC_CR_TSE: Time stamp enable */ #define RTC_CR_WUTE (1<<10) /* RTC_CR_WUTE: Wakeup timer enable */ #define RTC_CR_ALRBE (1<<9) /* RTC_CR_ALRBIE: Alarm B enable */ #define RTC_CR_ALRAE (1<<8) /* RTC_CR_ALRAE: Alarm A enable */ #define RTC_CR_DCE (1<<7) /* RTC_CR_DCE: Course digital calibration enable */ #define RTC_CR_FMT (1<<6) /* RTC_CR_FMT: Hour format */ #define RTC_CR_BYPSHAD (1<<5) /* RTC_CR_BYPSHAD: Bypass the shadow registers */ #define RTC_CR_REFCKON (1<<4) /* RTC_CR_REFCKON: Reference clock detection enable */ #define RTC_CR_TSEDGE (1<<3) /* RTC_CR_TSEDGE: Timestamp event active edge */ /* RTC_CR_WUCKSEL: Wakeup clock selection */ #define RTC_CR_WUCLKSEL_SHIFT (0) #define RTC_CR_WUCLKSEL_MASK (0x7) #define RTC_CR_WUCLKSEL_RTC_DIV16 (0x0) #define RTC_CR_WUCLKSEL_RTC_DIV8 (0x1) #define RTC_CR_WUCLKSEL_RTC_DIV4 (0x2) #define RTC_CR_WUCLKSEL_RTC_DIV2 (0x3) #define RTC_CR_WUCLKSEL_SPRE (0x4) #define RTC_CR_WUCLKSEL_SPRE_216 (0x6) /* RTC initialization and status register (RTC_ISR) ------------- */ /* Note: Bits [31:17] and [15] are reserved, and must be kept at reset value. */ /* Note: This register is write protected (except for RTC_ISR[13:8] bits). */ #define RTC_ISR_RECALPF (1<<16) /* RECALPF: Recalib pending flag */ #define RTC_ISR_TAMP3F (1<<15) /* TAMP3F: TAMPER3 detection flag (not on F4)*/ #define RTC_ISR_TAMP2F (1<<14) /* TAMP2F: TAMPER2 detection flag */ #define RTC_ISR_TAMP1F (1<<13) /* TAMP1F: TAMPER detection flag */ #define RTC_ISR_TSOVF (1<<12) /* TSOVF: Timestamp overflow flag */ #define RTC_ISR_TSF (1<<11) /* TSF: Timestamp flag */ #define RTC_ISR_WUTF (1<<10) /* WUTF: Wakeup timer flag */ #define RTC_ISR_ALRBF (1<<9) /* ALRBF: Alarm B flag */ #define RTC_ISR_ALRAF (1<<8) /* ALRAF: Alarm A flag */ #define RTC_ISR_INIT (1<<7) /* INIT: Initialization mode */ #define RTC_ISR_INITF (1<<6) /* INITF: Initialization flag */ #define RTC_ISR_RSF (1<<5) /* RSF: Registers sync flag */ #define RTC_ISR_INITS (1<<4) /* INITS: Init status flag */ #define RTC_ISR_SHPF (1<<3) /* SHPF: Shift operation pending */ #define RTC_ISR_WUTWF (1<<2) /* WUTWF: Wakeup timer write flag */ #define RTC_ISR_ALRBWF (1<<1) /* ALRBWF: Alarm B write flag */ #define RTC_ISR_ALRAWF (1<<0) /* ALRAWF: Alarm A write flag */ /* RTC prescaler register (RTC_PRER) ---------------------------- */ #define RTC_PRER_PREDIV_A_SHIFT (16) /* Async prescaler factor shift */ #define RTC_PRER_PREDIV_A_MASK (0x7f) /* Async prescaler factor mask */ #define RTC_PRER_PREDIV_S_SHIFT (0) /* Sync prescaler factor shift */ #define RTC_PRER_PREDIV_S_MASK (0x7fff) /* Sync prescaler factor mask */ /* RTC calibration register (RTC_CALIBR) ------------------------ */ /* FIXME - TODO */ /* RTC Alarm register ------------------------------------------- */ /* Note: Applies to RTC_ALRMAR and RTC_ALRMBR */ #define RTC_ALRMXR_MSK4 (1<<31) #define RTC_ALRMXR_WDSEL (1<<30) #define RTC_ALRMXR_DT_SHIFT (28) #define RTC_ALRMXR_DT_MASK (0x3) #define RTC_ALRMXR_DU_SHIFT (24) #define RTC_ALRMXR_DU_MASK (0xf) #define RTC_ALRMXR_MSK3 (1<<23) #define RTC_ALRMXR_PM (1<<22) #define RTC_ALRMXR_HT_SHIFT (20) #define RTC_ALRMXR_HT_MASK (0x3) #define RTC_ALRMXR_HU_SHIFT (16) #define RTC_ALRMXR_HU_MASK (0xf) #define RTC_ALRMXR_MSK2 (1<<15) #define RTC_ALRMXR_MNT_SHIFT (12) #define RTC_ALRMXR_MNT_MASK (0x7) #define RTC_ALRMXR_MNU_SHIFT (8) #define RTC_ALRMXR_MNU_MASK (0xf) #define RTC_ALRMXR_MSK1 (1<<7) #define RTC_ALRMXR_ST_SHIFT (4) #define RTC_ALRMXR_ST_MASK (0x7) #define RTC_ALRMXR_SU_SHIFT (0) #define RTC_ALRMXR_SU_MASK (0xf) /* RTC shift control register (RTC_SHIFTR) */ /* FIXME - TODO */ /* RTC time stamp time register (RTC_TSTR) ---------------------- */ #define RTC_TSTR_PM (1<<22) #define RTC_TSTR_HT_SHIFT (20) #define RTC_TSTR_HT_MASK (0x3) #define RTC_TSTR_HU_SHIFT (16) #define RTC_TSTR_HU_MASK (0xf) #define RTC_TSTR_MNT_SHIFT (12) #define RTC_TSTR_MNT_MASK (0x7) #define RTC_TSTR_MNU_SHIFT (8) #define RTC_TSTR_MNU_MASK (0xf) #define RTC_TSTR_ST_SHIFT (4) #define RTC_TSTR_ST_MASK (0x7) #define RTC_TSTR_SU_SHIFT (0) #define RTC_TSTR_SU_MASK (0xf) /* RTC time stamp date register (RTC_TSDR) ---------------------- */ #define RTC_TSDR_WDU_SHIFT (13) #define RTC_TSDR_WDU_MASK (0x7) #define RTC_TSDR_MT (1<<12) #define RTC_TSDR_MU_SHIFT (8) #define RTC_TSDR_MU_MASK (0xf) #define RTC_TSDR_DT_SHIFT (4) #define RTC_TSDR_DT_MASK (0x3) #define RTC_TSDR_DU_SHIFT (0) #define RTC_TSDR_DU_MASK (0xf) /* RTC calibration register (RTC_CALR) -------------------------- */ /* FIXME - TODO */ /* RTC tamper and alternate function configuration register (RTC_TAFCR) --- */ #define RTC_TAFCR_ALARMOUTTYPE (1<<18) #define RTC_TAFCR_TAMPPUDIS (1<<15) #define RTC_TAFCR_TAMPPRCH_SHIFT (13) #define RTC_TAFCR_TAMPPRCH_MASK (0x3) #define RTC_TAFCR_TAMPPRCH_1RTC (0x0) #define RTC_TAFCR_TAMPPRCH_2RTC (0x1) #define RTC_TAFCR_TAMPPRCH_4RTC (0x2) #define RTC_TAFCR_TAMPPRCH_8RTC (0x3) #define RTC_TAFCR_TAMPFLT_SHIFT (11) #define RTC_TAFCR_TAMPFLT_MASK (0x3) #define RTC_TAFCR_TAMPFLT_EDGE1 (0x0) #define RTC_TAFCR_TAMPFLT_EDGE2 (0x1) #define RTC_TAFCR_TAMPFLT_EDGE4 (0x2) #define RTC_TAFCR_TAMPFLT_EDGE8 (0x3) #define RTC_TAFCR_TAMPFREQ_SHIFT (8) #define RTC_TAFCR_TAMPFREQ_MASK (0x7) #define RTC_TAFCR_TAMPFREQ_RTCDIV32K (0x0) #define RTC_TAFCR_TAMPFREQ_RTCDIV16K (0x1) #define RTC_TAFCR_TAMPFREQ_RTCDIV8K (0x2) #define RTC_TAFCR_TAMPFREQ_RTCDIV4K (0x3) #define RTC_TAFCR_TAMPFREQ_RTCDIV2K (0x4) #define RTC_TAFCR_TAMPFREQ_RTCDIV1K (0x5) #define RTC_TAFCR_TAMPFREQ_RTCDIV512 (0x6) #define RTC_TAFCR_TAMPFREQ_RTCDIV256 (0x7) #define RTC_TAFCR_TAMPTS (1<<7) #define RTC_TAFCR_TAMP3TRG (1<<6) #define RTC_TAFCR_TAMP3E (1<<5) #define RTC_TAFCR_TAMP2TRG (1<<4) #define RTC_TAFCR_TAMP2E (1<<3) #define RTC_TAFCR_TAMPIE (1<<2) #define RTC_TAFCR_TAMP1TRG (1<<1) #define RTC_TAFCR_TAMP1E (1<<0) /* RTC alarm X sub second register */ /* FIXME - TODO */ BEGIN_DECLS void rtc_set_prescaler(uint32_t sync, uint32_t async); void rtc_wait_for_synchro(void); void rtc_lock(void); void rtc_unlock(void); void rtc_set_wakeup_time(uint16_t wkup_time, uint8_t rtc_cr_wucksel); void rtc_clear_wakeup_flag(void); END_DECLS /**@}*/ #endif /* RTC2_H */ /** @cond */ #else #warning "rtc_common_bcd.h should not be included explicitly, only via rtc.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/spi_common_all.h ================================================ /** @addtogroup spi_defines @author @htmlonly © @endhtmlonly 2009 Uwe Hermann */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA SPI.H The order of header inclusion is important. spi.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_SPI_H) || defined(LIBOPENCM3_SPI_COMMON_F24_H) /** @endcond */ #ifndef LIBOPENCM3_SPI_COMMON_ALL_H #define LIBOPENCM3_SPI_COMMON_ALL_H #include /**@{*/ /* Registers can be accessed as 16bit or 32bit values. */ /* --- Convenience macros -------------------------------------------------- */ /****************************************************************************/ /** @defgroup spi_reg_base SPI Register base address @ingroup spi_defines @{*/ #define SPI1 SPI1_BASE #define SPI2 SPI2_I2S_BASE #define SPI3 SPI3_I2S_BASE /**@}*/ /* --- SPI registers ------------------------------------------------------- */ /* Control register 1 (SPIx_CR1) */ /* Note: Not used in I2S mode. */ #define SPI_CR1(spi_base) MMIO32(spi_base + 0x00) #define SPI1_CR1 SPI_CR1(SPI1_BASE) #define SPI2_CR1 SPI_CR1(SPI2_I2S_BASE) #define SPI3_CR1 SPI_CR1(SPI3_I2S_BASE) /* Control register 2 (SPIx_CR2) */ #define SPI_CR2(spi_base) MMIO32(spi_base + 0x04) #define SPI1_CR2 SPI_CR2(SPI1_BASE) #define SPI2_CR2 SPI_CR2(SPI2_I2S_BASE) #define SPI3_CR2 SPI_CR2(SPI3_I2S_BASE) /* Status register (SPIx_SR) */ #define SPI_SR(spi_base) MMIO32(spi_base + 0x08) #define SPI1_SR SPI_SR(SPI1_BASE) #define SPI2_SR SPI_SR(SPI2_I2S_BASE) #define SPI3_SR SPI_SR(SPI3_I2S_BASE) /* Data register (SPIx_DR) */ #define SPI_DR(spi_base) MMIO32(spi_base + 0x0c) #define SPI1_DR SPI_DR(SPI1_BASE) #define SPI2_DR SPI_DR(SPI2_I2S_BASE) #define SPI3_DR SPI_DR(SPI3_I2S_BASE) /* CRC polynomial register (SPIx_CRCPR) */ /* Note: Not used in I2S mode. */ #define SPI_CRCPR(spi_base) MMIO32(spi_base + 0x10) #define SPI1_CRCPR SPI_CRCPR(SPI1_BASE) #define SPI2_CRCPR SPI_CRCPR(SPI2_I2S_BASE) #define SPI3_CRCPR SPI_CRCPR(SPI3_I2S_BASE) /* RX CRC register (SPIx_RXCRCR) */ /* Note: Not used in I2S mode. */ #define SPI_RXCRCR(spi_base) MMIO32(spi_base + 0x14) #define SPI1_RXCRCR SPI_RXCRCR(SPI1_BASE) #define SPI2_RXCRCR SPI_RXCRCR(SPI2_I2S_BASE) #define SPI3_RXCRCR SPI_RXCRCR(SPI3_I2S_BASE) /* TX CRC register (SPIx_RXCRCR) */ /* Note: Not used in I2S mode. */ #define SPI_TXCRCR(spi_base) MMIO32(spi_base + 0x18) #define SPI1_TXCRCR SPI_TXCRCR(SPI1_BASE) #define SPI2_TXCRCR SPI_TXCRCR(SPI2_I2S_BASE) #define SPI3_TXCRCR SPI_TXCRCR(SPI3_I2S_BASE) /* I2S configuration register (SPIx_I2SCFGR) */ #define SPI_I2SCFGR(spi_base) MMIO32(spi_base + 0x1c) #define SPI1_I2SCFGR SPI_I2SCFGR(SPI1_BASE) #define SPI2_I2SCFGR SPI_I2SCFGR(SPI2_I2S_BASE) #define SPI3_I2SCFGR SPI_I2SCFGR(SPI3_I2S_BASE) /* I2S prescaler register (SPIx_I2SPR) */ #define SPI_I2SPR(spi_base) MMIO32(spi_base + 0x20) #define SPI1_I2SPR SPI_I2SPR(SPI1_BASE) #define SPI2_I2SPR SPI_I2SPR(SPI2_I2S_BASE) #define SPI3_I2SPR SPI_I2SPR(SPI3_I2S_BASE) /* --- SPI_CR1 values ------------------------------------------------------ */ /* Note: None of the CR1 bits are used in I2S mode. */ /* BIDIMODE: Bidirectional data mode enable */ #define SPI_CR1_BIDIMODE_2LINE_UNIDIR (0 << 15) #define SPI_CR1_BIDIMODE_1LINE_BIDIR (1 << 15) #define SPI_CR1_BIDIMODE (1 << 15) /* BIDIOE: Output enable in bidirectional mode */ #define SPI_CR1_BIDIOE (1 << 14) /* CRCEN: Hardware CRC calculation enable */ #define SPI_CR1_CRCEN (1 << 13) /* CRCNEXT: Transmit CRC next */ #define SPI_CR1_CRCNEXT (1 << 12) /* RXONLY: Receive only */ #define SPI_CR1_RXONLY (1 << 10) /* SSM: Software slave management */ #define SPI_CR1_SSM (1 << 9) /* SSI: Internal slave select */ #define SPI_CR1_SSI (1 << 8) /* LSBFIRST: Frame format */ /****************************************************************************/ /** @defgroup spi_lsbfirst SPI lsb/msb first @ingroup spi_defines @{*/ #define SPI_CR1_MSBFIRST (0 << 7) #define SPI_CR1_LSBFIRST (1 << 7) /**@}*/ /* SPE: SPI enable */ #define SPI_CR1_SPE (1 << 6) /* BR[2:0]: Baud rate control */ /****************************************************************************/ /** @defgroup spi_baudrate SPI peripheral baud rates @ingroup spi_defines @{*/ #define SPI_CR1_BAUDRATE_FPCLK_DIV_2 (0x00 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_4 (0x01 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_8 (0x02 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_16 (0x03 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_32 (0x04 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_64 (0x05 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_128 (0x06 << 3) #define SPI_CR1_BAUDRATE_FPCLK_DIV_256 (0x07 << 3) /**@}*/ /****************************************************************************/ /** @defgroup spi_br_pre SPI peripheral baud rate prescale values @ingroup spi_defines @{*/ #define SPI_CR1_BR_FPCLK_DIV_2 0x0 #define SPI_CR1_BR_FPCLK_DIV_4 0x1 #define SPI_CR1_BR_FPCLK_DIV_8 0x2 #define SPI_CR1_BR_FPCLK_DIV_16 0x3 #define SPI_CR1_BR_FPCLK_DIV_32 0x4 #define SPI_CR1_BR_FPCLK_DIV_64 0x5 #define SPI_CR1_BR_FPCLK_DIV_128 0x6 #define SPI_CR1_BR_FPCLK_DIV_256 0x7 /**@}*/ /* MSTR: Master selection */ #define SPI_CR1_MSTR (1 << 2) /* CPOL: Clock polarity */ /****************************************************************************/ /** @defgroup spi_cpol SPI clock polarity @ingroup spi_defines @{*/ #define SPI_CR1_CPOL_CLK_TO_0_WHEN_IDLE (0 << 1) #define SPI_CR1_CPOL_CLK_TO_1_WHEN_IDLE (1 << 1) /**@}*/ #define SPI_CR1_CPOL (1 << 1) /* CPHA: Clock phase */ /****************************************************************************/ /** @defgroup spi_cpha SPI clock phase @ingroup spi_defines @{*/ #define SPI_CR1_CPHA_CLK_TRANSITION_1 (0 << 0) #define SPI_CR1_CPHA_CLK_TRANSITION_2 (1 << 0) /**@}*/ #define SPI_CR1_CPHA (1 << 0) /* --- SPI_CR2 values ------------------------------------------------------ */ /* Bits [15:8]: Reserved. Forced to 0 by hardware. Used on F3. */ /* TXEIE: Tx buffer empty interrupt enable */ #define SPI_CR2_TXEIE (1 << 7) /* RXNEIE: Rx buffer not empty interrupt enable */ #define SPI_CR2_RXNEIE (1 << 6) /* ERRIE: Error interrupt enable */ #define SPI_CR2_ERRIE (1 << 5) /* Bits [4:3]: Reserved. Forced to 0 by hardware. */ /* SSOE: SS output enable */ /* Note: Not used in I2S mode. */ #define SPI_CR2_SSOE (1 << 2) /* TXDMAEN: Tx buffer DMA enable */ #define SPI_CR2_TXDMAEN (1 << 1) /* RXDMAEN: Rx buffer DMA enable */ #define SPI_CR2_RXDMAEN (1 << 0) /* --- SPI_SR values ------------------------------------------------------- */ /* Bits [15:8]: Reserved. Forced to 0 by hardware. Used on F3. */ /* BSY: Busy flag */ #define SPI_SR_BSY (1 << 7) /* OVR: Overrun flag */ #define SPI_SR_OVR (1 << 6) /* MODF: Mode fault */ /* Note: Not used in I2S mode. */ #define SPI_SR_MODF (1 << 5) /* CRCERR: CRC error flag */ /* Note: Not used in I2S mode. */ #define SPI_SR_CRCERR (1 << 4) /* UDR: Underrun flag */ /* Note: Not used in SPI mode. */ #define SPI_SR_UDR (1 << 3) /* CHSIDE: Channel side */ /* Note: Not used in SPI mode. No meaning in PCM mode. */ #define SPI_SR_CHSIDE (1 << 2) /* TXE: Transmit buffer empty */ #define SPI_SR_TXE (1 << 1) /* RXNE: Receive buffer not empty */ #define SPI_SR_RXNE (1 << 0) /* --- SPI_DR values ------------------------------------------------------- */ /* SPI_DR[15:0]: Data Register. */ /* --- SPI_CRCPR values ---------------------------------------------------- */ /* Note: Not used in I2S mode. */ /* SPI_CRCPR [15:0]: CRC Polynomial Register. */ /* --- SPI_RXCRCR values --------------------------------------------------- */ /* Note: Not used in I2S mode. */ /* SPI_RXCRCR [15:0]: RX CRC Register. */ /* --- SPI_TXCRCR values --------------------------------------------------- */ /* Note: Not used in I2S mode. */ /* SPI_TXCRCR [15:0]: TX CRC Register. */ /* --- SPI_I2SCFGR values -------------------------------------------------- */ /* Note: None of these bits are used in SPI mode. */ /* Bits [15:12]: Reserved. Forced to 0 by hardware. */ /* I2SMOD: I2S mode selection */ #define SPI_I2SCFGR_I2SMOD (1 << 11) /* I2SE: I2S enable */ #define SPI_I2SCFGR_I2SE (1 << 10) /* I2SCFG[9:8]: I2S configuration mode */ #define SPI_I2SCFGR_I2SCFG_LSB 8 #define SPI_I2SCFGR_I2SCFG_SLAVE_TRANSMIT 0x0 #define SPI_I2SCFGR_I2SCFG_SLAVE_RECEIVE 0x1 #define SPI_I2SCFGR_I2SCFG_MASTER_TRANSMIT 0x2 #define SPI_I2SCFGR_I2SCFG_MASTER_RECEIVE 0x3 /* PCMSYNC: PCM frame synchronization */ #define SPI_I2SCFGR_PCMSYNC (1 << 7) /* Bit 6: Reserved. Forced to 0 by hardware. */ /* I2SSTD[5:4]: I2S standard selection */ #define SPI_I2SCFGR_I2SSTD_LSB 4 #define SPI_I2SCFGR_I2SSTD_I2S_PHILLIPS 0x0 #define SPI_I2SCFGR_I2SSTD_MSB_JUSTIFIED 0x1 #define SPI_I2SCFGR_I2SSTD_LSB_JUSTIFIED 0x2 #define SPI_I2SCFGR_I2SSTD_PCM 0x3 /* CKPOL: Steady state clock polarity */ #define SPI_I2SCFGR_CKPOL (1 << 3) /* DATLEN[2:1]: Data length to be transferred */ #define SPI_I2SCFGR_DATLEN_LSB 1 #define SPI_I2SCFGR_DATLEN_16BIT 0x0 #define SPI_I2SCFGR_DATLEN_24BIT 0x1 #define SPI_I2SCFGR_DATLEN_32BIT 0x2 /* CHLEN: Channel length */ #define SPI_I2SCFGR_CHLEN (1 << 0) /* --- SPI_I2SPR values ---------------------------------------------------- */ /* Note: None of these bits are used in SPI mode. */ /* Bits [15:10]: Reserved. Forced to 0 by hardware. */ /* MCKOE: Master clock output enable */ #define SPI_I2SPR_MCKOE (1 << 9) /* ODD: Odd factor for the prescaler */ #define SPI_I2SPR_ODD (1 << 8) /* I2SDIV[7:0]: I2S linear prescaler */ /* 0 and 1 are forbidden values */ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void spi_reset(uint32_t spi_peripheral); int spi_init_master(uint32_t spi, uint32_t br, uint32_t cpol, uint32_t cpha, uint32_t dff, uint32_t lsbfirst); void spi_enable(uint32_t spi); void spi_disable(uint32_t spi); uint16_t spi_clean_disable(uint32_t spi); void spi_write(uint32_t spi, uint16_t data); void spi_send(uint32_t spi, uint16_t data); uint16_t spi_read(uint32_t spi); uint16_t spi_xfer(uint32_t spi, uint16_t data); void spi_set_bidirectional_mode(uint32_t spi); void spi_set_unidirectional_mode(uint32_t spi); void spi_set_bidirectional_receive_only_mode(uint32_t spi); void spi_set_bidirectional_transmit_only_mode(uint32_t spi); void spi_enable_crc(uint32_t spi); void spi_disable_crc(uint32_t spi); void spi_set_next_tx_from_buffer(uint32_t spi); void spi_set_next_tx_from_crc(uint32_t spi); void spi_set_dff_8bit(uint32_t spi); void spi_set_dff_16bit(uint32_t spi); void spi_set_full_duplex_mode(uint32_t spi); void spi_set_receive_only_mode(uint32_t spi); void spi_disable_software_slave_management(uint32_t spi); void spi_enable_software_slave_management(uint32_t spi); void spi_set_nss_high(uint32_t spi); void spi_set_nss_low(uint32_t spi); void spi_send_lsb_first(uint32_t spi); void spi_send_msb_first(uint32_t spi); void spi_set_baudrate_prescaler(uint32_t spi, uint8_t baudrate); void spi_set_master_mode(uint32_t spi); void spi_set_slave_mode(uint32_t spi); void spi_set_clock_polarity_1(uint32_t spi); void spi_set_clock_polarity_0(uint32_t spi); void spi_set_clock_phase_1(uint32_t spi); void spi_set_clock_phase_0(uint32_t spi); void spi_enable_tx_buffer_empty_interrupt(uint32_t spi); void spi_disable_tx_buffer_empty_interrupt(uint32_t spi); void spi_enable_rx_buffer_not_empty_interrupt(uint32_t spi); void spi_disable_rx_buffer_not_empty_interrupt(uint32_t spi); void spi_enable_error_interrupt(uint32_t spi); void spi_disable_error_interrupt(uint32_t spi); void spi_enable_ss_output(uint32_t spi); void spi_disable_ss_output(uint32_t spi); void spi_enable_tx_dma(uint32_t spi); void spi_disable_tx_dma(uint32_t spi); void spi_enable_rx_dma(uint32_t spi); void spi_disable_rx_dma(uint32_t spi); END_DECLS /**@}*/ #endif /** @cond */ #else #warning "spi_common_all.h should not be included explicitly, only via spi.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/spi_common_f124.h ================================================ /** @addtogroup spi_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA SPI.H The order of header inclusion is important. spi.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_SPI_H /** @endcond */ #ifndef LIBOPENCM3_SPI_COMMON_F0124_H #define LIBOPENCM3_SPI_COMMON_F0124_H /**@{*/ #include /* * This file extends the common STM32 version with definitions only * applicable to the STM32F0/1/2/4 series of devices. */ /* DFF: Data frame format */ /****************************************************************************/ /** @defgroup spi_dff SPI data frame format @ingroup spi_defines @{*/ #define SPI_CR1_DFF_8BIT (0 << 11) #define SPI_CR1_DFF_16BIT (1 << 11) /**@}*/ #define SPI_CR1_DFF (1 << 11) #endif /** @cond */ #else #warning "spi_common_f24.h should not be included explicitly, only via spi.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/spi_common_f24.h ================================================ /** @addtogroup spi_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA SPI.H The order of header inclusion is important. spi.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_SPI_H /** @endcond */ #ifndef LIBOPENCM3_SPI_COMMON_F24_H #define LIBOPENCM3_SPI_COMMON_F24_H /**@{*/ #include /* * This file extends the common STM32 version with definitions only * applicable to the STM32F2/4 series of devices. */ /* --- SPI_CR2 values ------------------------------------------------------ */ /* FRF: Frame format */ /* Note: Not used in I2S mode. */ #define SPI_CR2_FRF (1 << 4) #define SPI_CR2_FRF_MOTOROLA_MODE (0 << 4) #define SPI_CR2_FRF_TI_MODE (1 << 4) /* --- SPI_SR values ------------------------------------------------------- */ /* TIFRFE: TI frame format error */ #define SPI_SR_TIFRFE (1 << 8) #endif /** @cond */ #else #warning "spi_common_f24.h should not be included explicitly, only via spi.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/syscfg_common_l1f234.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA SPI.H The order of header inclusion is important. spi.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_SYSCFG_H) /** @endcond */ #ifndef LIBOPENCM3_SYSCFG_COMMON_L1F234_H #define LIBOPENCM3_SYSCFG_COMMON_L1F234_H #include /* --- SYSCFG registers ---------------------------------------------------- */ #define SYSCFG_MEMRM MMIO32(SYSCFG_BASE + 0x00) #define SYSCFG_PMC MMIO32(SYSCFG_BASE + 0x04) /* External interrupt configuration registers [0..3] (SYSCFG_EXTICR[1..4]) */ #define SYSCFG_EXTICR(i) MMIO32(SYSCFG_BASE + 0x08 + (i)*4) #define SYSCFG_EXTICR1 SYSCFG_EXTICR(0) #define SYSCFG_EXTICR2 SYSCFG_EXTICR(1) #define SYSCFG_EXTICR3 SYSCFG_EXTICR(2) #define SYSCFG_EXTICR4 SYSCFG_EXTICR(3) #define SYSCFG_CMPCR MMIO32(SYSCFG_BASE + 0x20) #endif /** @cond */ #else #warning "syscfg_common_l1f234.h should not be included explicitly," #warning "only via syscfg.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/timer_common_all.h ================================================ /** @addtogroup timer_defines @author @htmlonly © @endhtmlonly 2009 Piotr Esden-Tempski */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA TIMER.H The order of header inclusion is important. timer.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_TIMER_H) || defined(LIBOPENCM3_TIMER_COMMON_F24_H) /** @endcond */ #ifndef LIBOPENCM3_TIMER_COMMON_H #define LIBOPENCM3_TIMER_COMMON_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* Timer register base addresses (for convenience) */ /****************************************************************************/ /** @defgroup tim_reg_base Timer register base addresses @ingroup timer_defines @{*/ #define TIM1 TIM1_BASE #define TIM2 TIM2_BASE #define TIM3 TIM3_BASE #define TIM4 TIM4_BASE #define TIM5 TIM5_BASE #define TIM6 TIM6_BASE #define TIM7 TIM7_BASE #define TIM8 TIM8_BASE /**@}*/ /* --- Timer registers ----------------------------------------------------- */ /* Control register 1 (TIMx_CR1) */ #define TIM_CR1(tim_base) MMIO32(tim_base + 0x00) #define TIM1_CR1 TIM_CR1(TIM1) #define TIM2_CR1 TIM_CR1(TIM2) #define TIM3_CR1 TIM_CR1(TIM3) #define TIM4_CR1 TIM_CR1(TIM4) #define TIM5_CR1 TIM_CR1(TIM5) #define TIM6_CR1 TIM_CR1(TIM6) #define TIM7_CR1 TIM_CR1(TIM7) #define TIM8_CR1 TIM_CR1(TIM8) /* Control register 2 (TIMx_CR2) */ #define TIM_CR2(tim_base) MMIO32(tim_base + 0x04) #define TIM1_CR2 TIM_CR2(TIM1) #define TIM2_CR2 TIM_CR2(TIM2) #define TIM3_CR2 TIM_CR2(TIM3) #define TIM4_CR2 TIM_CR2(TIM4) #define TIM5_CR2 TIM_CR2(TIM5) #define TIM6_CR2 TIM_CR2(TIM6) #define TIM7_CR2 TIM_CR2(TIM7) #define TIM8_CR2 TIM_CR2(TIM8) /* Slave mode control register (TIMx_SMCR) */ #define TIM_SMCR(tim_base) MMIO32(tim_base + 0x08) #define TIM1_SMCR TIM_SMCR(TIM1) #define TIM2_SMCR TIM_SMCR(TIM2) #define TIM3_SMCR TIM_SMCR(TIM3) #define TIM4_SMCR TIM_SMCR(TIM4) #define TIM5_SMCR TIM_SMCR(TIM5) #define TIM8_SMCR TIM_SMCR(TIM8) /* DMA/Interrupt enable register (TIMx_DIER) */ #define TIM_DIER(tim_base) MMIO32(tim_base + 0x0C) #define TIM1_DIER TIM_DIER(TIM1) #define TIM2_DIER TIM_DIER(TIM2) #define TIM3_DIER TIM_DIER(TIM3) #define TIM4_DIER TIM_DIER(TIM4) #define TIM5_DIER TIM_DIER(TIM5) #define TIM6_DIER TIM_DIER(TIM6) #define TIM7_DIER TIM_DIER(TIM7) #define TIM8_DIER TIM_DIER(TIM8) /* Status register (TIMx_SR) */ #define TIM_SR(tim_base) MMIO32(tim_base + 0x10) #define TIM1_SR TIM_SR(TIM1) #define TIM2_SR TIM_SR(TIM2) #define TIM3_SR TIM_SR(TIM3) #define TIM4_SR TIM_SR(TIM4) #define TIM5_SR TIM_SR(TIM5) #define TIM6_SR TIM_SR(TIM6) #define TIM7_SR TIM_SR(TIM7) #define TIM8_SR TIM_SR(TIM8) /* Event generation register (TIMx_EGR) */ #define TIM_EGR(tim_base) MMIO32(tim_base + 0x14) #define TIM1_EGR TIM_EGR(TIM1) #define TIM2_EGR TIM_EGR(TIM2) #define TIM3_EGR TIM_EGR(TIM3) #define TIM4_EGR TIM_EGR(TIM4) #define TIM5_EGR TIM_EGR(TIM5) #define TIM6_EGR TIM_EGR(TIM6) #define TIM7_EGR TIM_EGR(TIM7) #define TIM8_EGR TIM_EGR(TIM8) /* Capture/compare mode register 1 (TIMx_CCMR1) */ #define TIM_CCMR1(tim_base) MMIO32(tim_base + 0x18) #define TIM1_CCMR1 TIM_CCMR1(TIM1) #define TIM2_CCMR1 TIM_CCMR1(TIM2) #define TIM3_CCMR1 TIM_CCMR1(TIM3) #define TIM4_CCMR1 TIM_CCMR1(TIM4) #define TIM5_CCMR1 TIM_CCMR1(TIM5) #define TIM8_CCMR1 TIM_CCMR1(TIM8) /* Capture/compare mode register 2 (TIMx_CCMR2) */ #define TIM_CCMR2(tim_base) MMIO32(tim_base + 0x1C) #define TIM1_CCMR2 TIM_CCMR2(TIM1) #define TIM2_CCMR2 TIM_CCMR2(TIM2) #define TIM3_CCMR2 TIM_CCMR2(TIM3) #define TIM4_CCMR2 TIM_CCMR2(TIM4) #define TIM5_CCMR2 TIM_CCMR2(TIM5) #define TIM8_CCMR2 TIM_CCMR2(TIM8) /* Capture/compare enable register (TIMx_CCER) */ #define TIM_CCER(tim_base) MMIO32(tim_base + 0x20) #define TIM1_CCER TIM_CCER(TIM1) #define TIM2_CCER TIM_CCER(TIM2) #define TIM3_CCER TIM_CCER(TIM3) #define TIM4_CCER TIM_CCER(TIM4) #define TIM5_CCER TIM_CCER(TIM5) #define TIM8_CCER TIM_CCER(TIM8) /* Counter (TIMx_CNT) */ #define TIM_CNT(tim_base) MMIO32(tim_base + 0x24) #define TIM1_CNT TIM_CNT(TIM1) #define TIM2_CNT TIM_CNT(TIM2) #define TIM3_CNT TIM_CNT(TIM3) #define TIM4_CNT TIM_CNT(TIM4) #define TIM5_CNT TIM_CNT(TIM5) #define TIM6_CNT TIM_CNT(TIM6) #define TIM7_CNT TIM_CNT(TIM7) #define TIM8_CNT TIM_CNT(TIM8) /* Prescaler (TIMx_PSC) */ #define TIM_PSC(tim_base) MMIO32(tim_base + 0x28) #define TIM1_PSC TIM_PSC(TIM1) #define TIM2_PSC TIM_PSC(TIM2) #define TIM3_PSC TIM_PSC(TIM3) #define TIM4_PSC TIM_PSC(TIM4) #define TIM5_PSC TIM_PSC(TIM5) #define TIM6_PSC TIM_PSC(TIM6) #define TIM7_PSC TIM_PSC(TIM7) #define TIM8_PSC TIM_PSC(TIM8) /* Auto-reload register (TIMx_ARR) */ #define TIM_ARR(tim_base) MMIO32(tim_base + 0x2C) #define TIM1_ARR TIM_ARR(TIM1) #define TIM2_ARR TIM_ARR(TIM2) #define TIM3_ARR TIM_ARR(TIM3) #define TIM4_ARR TIM_ARR(TIM4) #define TIM5_ARR TIM_ARR(TIM5) #define TIM6_ARR TIM_ARR(TIM6) #define TIM7_ARR TIM_ARR(TIM7) #define TIM8_ARR TIM_ARR(TIM8) /* Repetition counter register (TIMx_RCR) */ #define TIM_RCR(tim_base) MMIO32(tim_base + 0x30) #define TIM1_RCR TIM_RCR(TIM1) #define TIM8_RCR TIM_RCR(TIM8) /* Capture/compare register 1 (TIMx_CCR1) */ #define TIM_CCR1(tim_base) MMIO32(tim_base + 0x34) #define TIM1_CCR1 TIM_CCR1(TIM1) #define TIM2_CCR1 TIM_CCR1(TIM2) #define TIM3_CCR1 TIM_CCR1(TIM3) #define TIM4_CCR1 TIM_CCR1(TIM4) #define TIM5_CCR1 TIM_CCR1(TIM5) #define TIM8_CCR1 TIM_CCR1(TIM8) /* Capture/compare register 2 (TIMx_CCR2) */ #define TIM_CCR2(tim_base) MMIO32(tim_base + 0x38) #define TIM1_CCR2 TIM_CCR2(TIM1) #define TIM2_CCR2 TIM_CCR2(TIM2) #define TIM3_CCR2 TIM_CCR2(TIM3) #define TIM4_CCR2 TIM_CCR2(TIM4) #define TIM5_CCR2 TIM_CCR2(TIM5) #define TIM8_CCR2 TIM_CCR2(TIM8) /* Capture/compare register 3 (TIMx_CCR3) */ #define TIM_CCR3(tim_base) MMIO32(tim_base + 0x3C) #define TIM1_CCR3 TIM_CCR3(TIM1) #define TIM2_CCR3 TIM_CCR3(TIM2) #define TIM3_CCR3 TIM_CCR3(TIM3) #define TIM4_CCR3 TIM_CCR3(TIM4) #define TIM5_CCR3 TIM_CCR3(TIM5) #define TIM8_CCR3 TIM_CCR3(TIM8) /* Capture/compare register 4 (TIMx_CCR4) */ #define TIM_CCR4(tim_base) MMIO32(tim_base + 0x40) #define TIM1_CCR4 TIM_CCR4(TIM1) #define TIM2_CCR4 TIM_CCR4(TIM2) #define TIM3_CCR4 TIM_CCR4(TIM3) #define TIM4_CCR4 TIM_CCR4(TIM4) #define TIM5_CCR4 TIM_CCR4(TIM5) #define TIM8_CCR4 TIM_CCR4(TIM8) /* Break and dead-time register (TIMx_BDTR) */ #define TIM_BDTR(tim_base) MMIO32(tim_base + 0x44) #define TIM1_BDTR TIM_BDTR(TIM1) #define TIM8_BDTR TIM_BDTR(TIM8) /* DMA control register (TIMx_DCR) */ #define TIM_DCR(tim_base) MMIO32(tim_base + 0x48) #define TIM1_DCR TIM_DCR(TIM1) #define TIM2_DCR TIM_DCR(TIM2) #define TIM3_DCR TIM_DCR(TIM3) #define TIM4_DCR TIM_DCR(TIM4) #define TIM5_DCR TIM_DCR(TIM5) #define TIM8_DCR TIM_DCR(TIM8) /* DMA address for full transfer (TIMx_DMAR) */ #define TIM_DMAR(tim_base) MMIO32(tim_base + 0x4C) #define TIM1_DMAR TIM_DMAR(TIM1) #define TIM2_DMAR TIM_DMAR(TIM2) #define TIM3_DMAR TIM_DMAR(TIM3) #define TIM4_DMAR TIM_DMAR(TIM4) #define TIM5_DMAR TIM_DMAR(TIM5) #define TIM8_DMAR TIM_DMAR(TIM8) /* --- TIMx_CR1 values ----------------------------------------------------- */ /****************************************************************************/ /** @defgroup tim_x_cr1_cdr TIMx_CR1 CKD[1:0] Clock Division Ratio @ingroup timer_defines @{*/ /* CKD[1:0]: Clock division */ #define TIM_CR1_CKD_CK_INT (0x0 << 8) #define TIM_CR1_CKD_CK_INT_MUL_2 (0x1 << 8) #define TIM_CR1_CKD_CK_INT_MUL_4 (0x2 << 8) #define TIM_CR1_CKD_CK_INT_MASK (0x3 << 8) /**@}*/ /* ARPE: Auto-reload preload enable */ #define TIM_CR1_ARPE (1 << 7) /* CMS[1:0]: Center-aligned mode selection */ /****************************************************************************/ /** @defgroup tim_x_cr1_cms TIMx_CR1 CMS[1:0]: Center-aligned Mode Selection @ingroup timer_defines @{*/ #define TIM_CR1_CMS_EDGE (0x0 << 5) #define TIM_CR1_CMS_CENTER_1 (0x1 << 5) #define TIM_CR1_CMS_CENTER_2 (0x2 << 5) #define TIM_CR1_CMS_CENTER_3 (0x3 << 5) #define TIM_CR1_CMS_MASK (0x3 << 5) /**@}*/ /* DIR: Direction */ /****************************************************************************/ /** @defgroup tim_x_cr1_dir TIMx_CR1 DIR: Direction @ingroup timer_defines @{*/ #define TIM_CR1_DIR_UP (0 << 4) #define TIM_CR1_DIR_DOWN (1 << 4) /**@}*/ /* OPM: One pulse mode */ #define TIM_CR1_OPM (1 << 3) /* URS: Update request source */ #define TIM_CR1_URS (1 << 2) /* UDIS: Update disable */ #define TIM_CR1_UDIS (1 << 1) /* CEN: Counter enable */ #define TIM_CR1_CEN (1 << 0) /* --- TIMx_CR2 values ----------------------------------------------------- */ /****************************************************************************/ /** @defgroup tim_x_cr2_ois TIMx_CR2_OIS: Force Output Idle State Control Values @ingroup timer_defines @{*/ /* OIS4:*//** Output idle state 4 (OC4 output) */ #define TIM_CR2_OIS4 (1 << 14) /* OIS3N:*//** Output idle state 3 (OC3N output) */ #define TIM_CR2_OIS3N (1 << 13) /* OIS3:*//** Output idle state 3 (OC3 output) */ #define TIM_CR2_OIS3 (1 << 12) /* OIS2N:*//** Output idle state 2 (OC2N output) */ #define TIM_CR2_OIS2N (1 << 11) /* OIS2:*//** Output idle state 2 (OC2 output) */ #define TIM_CR2_OIS2 (1 << 10) /* OIS1N:*//** Output idle state 1 (OC1N output) */ #define TIM_CR2_OIS1N (1 << 9) /* OIS1:*//** Output idle state 1 (OC1 output) */ #define TIM_CR2_OIS1 (1 << 8) #define TIM_CR2_OIS_MASK (0x7f << 8) /**@}*/ /* TI1S: TI1 selection */ #define TIM_CR2_TI1S (1 << 7) /* MMS[2:0]: Master mode selection */ /****************************************************************************/ /** @defgroup tim_mastermode TIMx_CR2 MMS[6:4]: Master Mode Selection @ingroup timer_defines @{*/ #define TIM_CR2_MMS_RESET (0x0 << 4) #define TIM_CR2_MMS_ENABLE (0x1 << 4) #define TIM_CR2_MMS_UPDATE (0x2 << 4) #define TIM_CR2_MMS_COMPARE_PULSE (0x3 << 4) #define TIM_CR2_MMS_COMPARE_OC1REF (0x4 << 4) #define TIM_CR2_MMS_COMPARE_OC2REF (0x5 << 4) #define TIM_CR2_MMS_COMPARE_OC3REF (0x6 << 4) #define TIM_CR2_MMS_COMPARE_OC4REF (0x7 << 4) #define TIM_CR2_MMS_MASK (0x7 << 4) /**@}*/ /* CCDS: Capture/compare DMA selection */ #define TIM_CR2_CCDS (1 << 3) /* CCUS: Capture/compare control update selection */ #define TIM_CR2_CCUS (1 << 2) /* CCPC: Capture/compare preload control */ #define TIM_CR2_CCPC (1 << 0) /* --- TIMx_SMCR values ---------------------------------------------------- */ /* ETP: External trigger polarity */ #define TIM_SMCR_ETP (1 << 15) /* ECE: External clock enable */ #define TIM_SMCR_ECE (1 << 14) /* ETPS[1:0]: External trigger prescaler */ #define TIM_SMCR_ETPS_OFF (0x0 << 12) #define TIM_SMCR_ETPS_ETRP_DIV_2 (0x1 << 12) #define TIM_SMCR_ETPS_ETRP_DIV_4 (0x2 << 12) #define TIM_SMCR_ETPS_ETRP_DIV_8 (0x3 << 12) #define TIM_SMCR_ETPS_MASK (0X3 << 12) /* ETF[3:0]: External trigger filter */ #define TIM_SMCR_ETF_OFF (0x0 << 8) #define TIM_SMCR_ETF_CK_INT_N_2 (0x1 << 8) #define TIM_SMCR_ETF_CK_INT_N_4 (0x2 << 8) #define TIM_SMCR_ETF_CK_INT_N_8 (0x3 << 8) #define TIM_SMCR_ETF_DTS_DIV_2_N_6 (0x4 << 8) #define TIM_SMCR_ETF_DTS_DIV_2_N_8 (0x5 << 8) #define TIM_SMCR_ETF_DTS_DIV_4_N_6 (0x6 << 8) #define TIM_SMCR_ETF_DTS_DIV_4_N_8 (0x7 << 8) #define TIM_SMCR_ETF_DTS_DIV_8_N_6 (0x8 << 8) #define TIM_SMCR_ETF_DTS_DIV_8_N_8 (0x9 << 8) #define TIM_SMCR_ETF_DTS_DIV_16_N_5 (0xA << 8) #define TIM_SMCR_ETF_DTS_DIV_16_N_6 (0xB << 8) #define TIM_SMCR_ETF_DTS_DIV_16_N_8 (0xC << 8) #define TIM_SMCR_ETF_DTS_DIV_32_N_5 (0xD << 8) #define TIM_SMCR_ETF_DTS_DIV_32_N_6 (0xE << 8) #define TIM_SMCR_ETF_DTS_DIV_32_N_8 (0xF << 8) #define TIM_SMCR_ETF_MASK (0xF << 8) /* MSM: Master/slave mode */ #define TIM_SMCR_MSM (1 << 7) /* TS[2:0]: Trigger selection */ /** @defgroup tim_ts TS Trigger selection @ingroup timer_defines @{*/ /** Internal Trigger 0 (ITR0) */ #define TIM_SMCR_TS_ITR0 (0x0 << 4) /** Internal Trigger 1 (ITR1) */ #define TIM_SMCR_TS_ITR1 (0x1 << 4) /** Internal Trigger 2 (ITR2) */ #define TIM_SMCR_TS_ITR2 (0x2 << 4) /** Internal Trigger 3 (ITR3) */ #define TIM_SMCR_TS_ITR3 (0x3 << 4) /** TI1 Edge Detector (TI1F_ED) */ #define TIM_SMCR_TS_IT1F_ED (0x4 << 4) /** Filtered Timer Input 1 (TI1FP1) */ #define TIM_SMCR_TS_IT1FP1 (0x5 << 4) /** Filtered Timer Input 2 (TI1FP2) */ #define TIM_SMCR_TS_IT1FP2 (0x6 << 4) /** External Trigger input (ETRF) */ #define TIM_SMCR_TS_ETRF (0x7 << 4) #define TIM_SMCR_TS_MASK (0x7 << 4) /**@}*/ /* SMS[2:0]: Slave mode selection */ /** @defgroup tim_sms SMS Slave mode selection @ingroup timer_defines @{*/ /** Slave mode disabled */ #define TIM_SMCR_SMS_OFF (0x0 << 0) /** Encoder mode 1 - Counter counts up/down on TI2FP2 edge depending on TI1FP1 level. */ #define TIM_SMCR_SMS_EM1 (0x1 << 0) /** Encoder mode 2 - Counter counts up/down on TI1FP1 edge depending on TI2FP2 level. */ #define TIM_SMCR_SMS_EM2 (0x2 << 0) /** Encoder mode 3 - Counter counts up/down on both TI1FP1 and TI2FP2 edges depending on the level of the complementary input. */ #define TIM_SMCR_SMS_EM3 (0x3 << 0) /** Reset Mode - Rising edge of the selected trigger input (TRGI) reinitializes * the counter and generates an update of the registers. */ #define TIM_SMCR_SMS_RM (0x4 << 0) /** Gated Mode - The counter clock is enabled when the trigger input (TRGI) is * high. */ #define TIM_SMCR_SMS_GM (0x5 << 0) /** Trigger Mode - The counter starts at a rising edge of the trigger TRGI. */ #define TIM_SMCR_SMS_TM (0x6 << 0) /** External Clock Mode 1 - Rising edges of the selected trigger (TRGI) clock * the counter. */ #define TIM_SMCR_SMS_ECM1 (0x7 << 0) #define TIM_SMCR_SMS_MASK (0x7 << 0) /**@}*/ /* --- TIMx_DIER values ---------------------------------------------------- */ /****************************************************************************/ /** @defgroup tim_irq_enable TIMx_DIER Timer DMA and Interrupt Enable Values @ingroup timer_defines @{*/ /* TDE:*//** Trigger DMA request enable */ #define TIM_DIER_TDE (1 << 14) /* COMDE:*//** COM DMA request enable */ #define TIM_DIER_COMDE (1 << 13) /* CC4DE:*//** Capture/Compare 4 DMA request enable */ #define TIM_DIER_CC4DE (1 << 12) /* CC3DE:*//** Capture/Compare 3 DMA request enable */ #define TIM_DIER_CC3DE (1 << 11) /* CC2DE:*//** Capture/Compare 2 DMA request enable */ #define TIM_DIER_CC2DE (1 << 10) /* CC1DE:*//** Capture/Compare 1 DMA request enable */ #define TIM_DIER_CC1DE (1 << 9) /* UDE*//**: Update DMA request enable */ #define TIM_DIER_UDE (1 << 8) /* BIE:*//** Break interrupt enable */ #define TIM_DIER_BIE (1 << 7) /* TIE:*//** Trigger interrupt enable */ #define TIM_DIER_TIE (1 << 6) /* COMIE:*//** COM interrupt enable */ #define TIM_DIER_COMIE (1 << 5) /* CC4IE:*//** Capture/compare 4 interrupt enable */ #define TIM_DIER_CC4IE (1 << 4) /* CC3IE:*//** Capture/compare 3 interrupt enable */ #define TIM_DIER_CC3IE (1 << 3) /* CC2IE:*//** Capture/compare 2 interrupt enable */ #define TIM_DIER_CC2IE (1 << 2) /* CC1IE:*//** Capture/compare 1 interrupt enable */ #define TIM_DIER_CC1IE (1 << 1) /* UIE:*//** Update interrupt enable */ #define TIM_DIER_UIE (1 << 0) /**@}*/ /* --- TIMx_SR values ------------------------------------------------------ */ /****************************************************************************/ /** @defgroup tim_sr_values TIMx_SR Timer Status Register Flags @ingroup timer_defines @{*/ /* CC4OF:*//** Capture/compare 4 overcapture flag */ #define TIM_SR_CC4OF (1 << 12) /* CC3OF:*//** Capture/compare 3 overcapture flag */ #define TIM_SR_CC3OF (1 << 11) /* CC2OF:*//** Capture/compare 2 overcapture flag */ #define TIM_SR_CC2OF (1 << 10) /* CC1OF:*//** Capture/compare 1 overcapture flag */ #define TIM_SR_CC1OF (1 << 9) /* BIF:*//** Break interrupt flag */ #define TIM_SR_BIF (1 << 7) /* TIF:*//** Trigger interrupt flag */ #define TIM_SR_TIF (1 << 6) /* COMIF:*//** COM interrupt flag */ #define TIM_SR_COMIF (1 << 5) /* CC4IF:*//** Capture/compare 4 interrupt flag */ #define TIM_SR_CC4IF (1 << 4) /* CC3IF:*//** Capture/compare 3 interrupt flag */ #define TIM_SR_CC3IF (1 << 3) /* CC2IF:*//** Capture/compare 2 interrupt flag */ #define TIM_SR_CC2IF (1 << 2) /* CC1IF:*//** Capture/compare 1 interrupt flag */ #define TIM_SR_CC1IF (1 << 1) /* UIF:*//** Update interrupt flag */ #define TIM_SR_UIF (1 << 0) /**@}*/ /* --- TIMx_EGR values ----------------------------------------------------- */ /****************************************************************************/ /** @defgroup tim_event_gen TIMx_EGR Timer Event Generator Values @ingroup timer_defines @{*/ /* BG:*//** Break generation */ #define TIM_EGR_BG (1 << 7) /* TG:*//** Trigger generation */ #define TIM_EGR_TG (1 << 6) /* COMG:*//** Capture/compare control update generation */ #define TIM_EGR_COMG (1 << 5) /* CC4G:*//** Capture/compare 4 generation */ #define TIM_EGR_CC4G (1 << 4) /* CC3G:*//** Capture/compare 3 generation */ #define TIM_EGR_CC3G (1 << 3) /* CC2G:*//** Capture/compare 2 generation */ #define TIM_EGR_CC2G (1 << 2) /* CC1G:*//** Capture/compare 1 generation */ #define TIM_EGR_CC1G (1 << 1) /* UG:*//** Update generation */ #define TIM_EGR_UG (1 << 0) /**@}*/ /* --- TIMx_CCMR1 values --------------------------------------------------- */ /* --- Output compare mode --- */ /* OC2CE: Output compare 2 clear enable */ #define TIM_CCMR1_OC2CE (1 << 15) /* OC2M[2:0]: Output compare 2 mode */ #define TIM_CCMR1_OC2M_FROZEN (0x0 << 12) #define TIM_CCMR1_OC2M_ACTIVE (0x1 << 12) #define TIM_CCMR1_OC2M_INACTIVE (0x2 << 12) #define TIM_CCMR1_OC2M_TOGGLE (0x3 << 12) #define TIM_CCMR1_OC2M_FORCE_LOW (0x4 << 12) #define TIM_CCMR1_OC2M_FORCE_HIGH (0x5 << 12) #define TIM_CCMR1_OC2M_PWM1 (0x6 << 12) #define TIM_CCMR1_OC2M_PWM2 (0x7 << 12) #define TIM_CCMR1_OC2M_MASK (0x7 << 12) /* OC2PE: Output compare 2 preload enable */ #define TIM_CCMR1_OC2PE (1 << 11) /* OC2FE: Output compare 2 fast enable */ #define TIM_CCMR1_OC2FE (1 << 10) /* CC2S[1:0]: Capture/compare 2 selection */ /* Note: CC2S bits are writable only when the channel is OFF (CC2E = 0 in * TIMx_CCER). */ #define TIM_CCMR1_CC2S_OUT (0x0 << 8) #define TIM_CCMR1_CC2S_IN_TI2 (0x1 << 8) #define TIM_CCMR1_CC2S_IN_TI1 (0x2 << 8) #define TIM_CCMR1_CC2S_IN_TRC (0x3 << 8) #define TIM_CCMR1_CC2S_MASK (0x3 << 8) /* OC1CE: Output compare 1 clear enable */ #define TIM_CCMR1_OC1CE (1 << 7) /* OC1M[2:0]: Output compare 1 mode */ #define TIM_CCMR1_OC1M_FROZEN (0x0 << 4) #define TIM_CCMR1_OC1M_ACTIVE (0x1 << 4) #define TIM_CCMR1_OC1M_INACTIVE (0x2 << 4) #define TIM_CCMR1_OC1M_TOGGLE (0x3 << 4) #define TIM_CCMR1_OC1M_FORCE_LOW (0x4 << 4) #define TIM_CCMR1_OC1M_FORCE_HIGH (0x5 << 4) #define TIM_CCMR1_OC1M_PWM1 (0x6 << 4) #define TIM_CCMR1_OC1M_PWM2 (0x7 << 4) #define TIM_CCMR1_OC1M_MASK (0x7 << 4) /* OC1PE: Output compare 1 preload enable */ #define TIM_CCMR1_OC1PE (1 << 3) /* OC1FE: Output compare 1 fast enable */ #define TIM_CCMR1_OC1FE (1 << 2) /* CC1S[1:0]: Capture/compare 1 selection */ /* Note: CC2S bits are writable only when the channel is OFF (CC2E = 0 in * TIMx_CCER). */ #define TIM_CCMR1_CC1S_OUT (0x0 << 0) #define TIM_CCMR1_CC1S_IN_TI2 (0x2 << 0) #define TIM_CCMR1_CC1S_IN_TI1 (0x1 << 0) #define TIM_CCMR1_CC1S_IN_TRC (0x3 << 0) #define TIM_CCMR1_CC1S_MASK (0x3 << 0) /* --- Input capture mode --- */ /* IC2F[3:0]: Input capture 2 filter */ #define TIM_CCMR1_IC2F_OFF (0x0 << 12) #define TIM_CCMR1_IC2F_CK_INT_N_2 (0x1 << 12) #define TIM_CCMR1_IC2F_CK_INT_N_4 (0x2 << 12) #define TIM_CCMR1_IC2F_CK_INT_N_8 (0x3 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_2_N_6 (0x4 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_2_N_8 (0x5 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_4_N_6 (0x6 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_4_N_8 (0x7 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_8_N_6 (0x8 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_8_N_8 (0x9 << 12) #define TIM_CCMR1_IC2F_DTF_DIV_16_N_5 (0xA << 12) #define TIM_CCMR1_IC2F_DTF_DIV_16_N_6 (0xB << 12) #define TIM_CCMR1_IC2F_DTF_DIV_16_N_8 (0xC << 12) #define TIM_CCMR1_IC2F_DTF_DIV_32_N_5 (0xD << 12) #define TIM_CCMR1_IC2F_DTF_DIV_32_N_6 (0xE << 12) #define TIM_CCMR1_IC2F_DTF_DIV_32_N_8 (0xF << 12) #define TIM_CCMR1_IC2F_MASK (0xF << 12) /* IC2PSC[1:0]: Input capture 2 prescaler */ #define TIM_CCMR1_IC2PSC_OFF (0x0 << 10) #define TIM_CCMR1_IC2PSC_2 (0x1 << 10) #define TIM_CCMR1_IC2PSC_4 (0x2 << 10) #define TIM_CCMR1_IC2PSC_8 (0x3 << 10) #define TIM_CCMR1_IC2PSC_MASK (0x3 << 10) /* IC1F[3:0]: Input capture 1 filter */ #define TIM_CCMR1_IC1F_OFF (0x0 << 4) #define TIM_CCMR1_IC1F_CK_INT_N_2 (0x1 << 4) #define TIM_CCMR1_IC1F_CK_INT_N_4 (0x2 << 4) #define TIM_CCMR1_IC1F_CK_INT_N_8 (0x3 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_2_N_6 (0x4 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_2_N_8 (0x5 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_4_N_6 (0x6 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_4_N_8 (0x7 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_8_N_6 (0x8 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_8_N_8 (0x9 << 4) #define TIM_CCMR1_IC1F_DTF_DIV_16_N_5 (0xA << 4) #define TIM_CCMR1_IC1F_DTF_DIV_16_N_6 (0xB << 4) #define TIM_CCMR1_IC1F_DTF_DIV_16_N_8 (0xC << 4) #define TIM_CCMR1_IC1F_DTF_DIV_32_N_5 (0xD << 4) #define TIM_CCMR1_IC1F_DTF_DIV_32_N_6 (0xE << 4) #define TIM_CCMR1_IC1F_DTF_DIV_32_N_8 (0xF << 4) #define TIM_CCMR1_IC1F_MASK (0xF << 4) /* IC1PSC[1:0]: Input capture 1 prescaler */ #define TIM_CCMR1_IC1PSC_OFF (0x0 << 2) #define TIM_CCMR1_IC1PSC_2 (0x1 << 2) #define TIM_CCMR1_IC1PSC_4 (0x2 << 2) #define TIM_CCMR1_IC1PSC_8 (0x3 << 2) #define TIM_CCMR1_IC1PSC_MASK (0x3 << 2) /* --- TIMx_CCMR2 values --------------------------------------------------- */ /* --- Output compare mode --- */ /* OC4CE: Output compare 4 clear enable */ #define TIM_CCMR2_OC4CE (1 << 15) /* OC4M[2:0]: Output compare 4 mode */ #define TIM_CCMR2_OC4M_FROZEN (0x0 << 12) #define TIM_CCMR2_OC4M_ACTIVE (0x1 << 12) #define TIM_CCMR2_OC4M_INACTIVE (0x2 << 12) #define TIM_CCMR2_OC4M_TOGGLE (0x3 << 12) #define TIM_CCMR2_OC4M_FORCE_LOW (0x4 << 12) #define TIM_CCMR2_OC4M_FORCE_HIGH (0x5 << 12) #define TIM_CCMR2_OC4M_PWM1 (0x6 << 12) #define TIM_CCMR2_OC4M_PWM2 (0x7 << 12) #define TIM_CCMR2_OC4M_MASK (0x7 << 12) /* OC4PE: Output compare 4 preload enable */ #define TIM_CCMR2_OC4PE (1 << 11) /* OC4FE: Output compare 4 fast enable */ #define TIM_CCMR2_OC4FE (1 << 10) /* CC4S[1:0]: Capture/compare 4 selection */ /* Note: CC2S bits are writable only when the channel is OFF (CC2E = 0 in * TIMx_CCER). */ #define TIM_CCMR2_CC4S_OUT (0x0 << 8) #define TIM_CCMR2_CC4S_IN_TI2 (0x1 << 8) #define TIM_CCMR2_CC4S_IN_TI1 (0x2 << 8) #define TIM_CCMR2_CC4S_IN_TRC (0x3 << 8) #define TIM_CCMR2_CC4S_MASK (0x3 << 8) /* OC3CE: Output compare 3 clear enable */ #define TIM_CCMR2_OC3CE (1 << 7) /* OC3M[2:0]: Output compare 3 mode */ #define TIM_CCMR2_OC3M_FROZEN (0x0 << 4) #define TIM_CCMR2_OC3M_ACTIVE (0x1 << 4) #define TIM_CCMR2_OC3M_INACTIVE (0x2 << 4) #define TIM_CCMR2_OC3M_TOGGLE (0x3 << 4) #define TIM_CCMR2_OC3M_FORCE_LOW (0x4 << 4) #define TIM_CCMR2_OC3M_FORCE_HIGH (0x5 << 4) #define TIM_CCMR2_OC3M_PWM1 (0x6 << 4) #define TIM_CCMR2_OC3M_PWM2 (0x7 << 4) #define TIM_CCMR2_OC3M_MASK (0x7 << 4) /* OC3PE: Output compare 3 preload enable */ #define TIM_CCMR2_OC3PE (1 << 3) /* OC3FE: Output compare 3 fast enable */ #define TIM_CCMR2_OC3FE (1 << 2) /* CC3S[1:0]: Capture/compare 3 selection */ /* Note: CC2S bits are writable only when the channel is OFF (CC2E = 0 in * TIMx_CCER). */ #define TIM_CCMR2_CC3S_OUT (0x0 << 0) #define TIM_CCMR2_CC3S_IN_TI2 (0x1 << 0) #define TIM_CCMR2_CC3S_IN_TI1 (0x2 << 0) #define TIM_CCMR2_CC3S_IN_TRC (0x3 << 0) #define TIM_CCMR2_CC3S_MASK (0x3 << 0) /* --- Input capture mode --- */ /* IC4F[3:0]: Input capture 4 filter */ #define TIM_CCMR2_IC4F_OFF (0x0 << 12) #define TIM_CCMR2_IC4F_CK_INT_N_2 (0x1 << 12) #define TIM_CCMR2_IC4F_CK_INT_N_4 (0x2 << 12) #define TIM_CCMR2_IC4F_CK_INT_N_8 (0x3 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_2_N_6 (0x4 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_2_N_8 (0x5 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_4_N_6 (0x6 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_4_N_8 (0x7 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_8_N_6 (0x8 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_8_N_8 (0x9 << 12) #define TIM_CCMR2_IC4F_DTF_DIV_16_N_5 (0xA << 12) #define TIM_CCMR2_IC4F_DTF_DIV_16_N_6 (0xB << 12) #define TIM_CCMR2_IC4F_DTF_DIV_16_N_8 (0xC << 12) #define TIM_CCMR2_IC4F_DTF_DIV_32_N_5 (0xD << 12) #define TIM_CCMR2_IC4F_DTF_DIV_32_N_6 (0xE << 12) #define TIM_CCMR2_IC4F_DTF_DIV_32_N_8 (0xF << 12) #define TIM_CCMR2_IC4F_MASK (0xF << 12) /* IC4PSC[1:0]: Input capture 4 prescaler */ #define TIM_CCMR2_IC4PSC_OFF (0x0 << 10) #define TIM_CCMR2_IC4PSC_2 (0x1 << 10) #define TIM_CCMR2_IC4PSC_4 (0x2 << 10) #define TIM_CCMR2_IC4PSC_8 (0x3 << 10) #define TIM_CCMR2_IC4PSC_MASK (0x3 << 10) /* IC3F[3:0]: Input capture 3 filter */ #define TIM_CCMR2_IC3F_OFF (0x0 << 4) #define TIM_CCMR2_IC3F_CK_INT_N_2 (0x1 << 4) #define TIM_CCMR2_IC3F_CK_INT_N_4 (0x2 << 4) #define TIM_CCMR2_IC3F_CK_INT_N_8 (0x3 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_2_N_6 (0x4 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_2_N_8 (0x5 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_4_N_6 (0x6 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_4_N_8 (0x7 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_8_N_6 (0x8 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_8_N_8 (0x9 << 4) #define TIM_CCMR2_IC3F_DTF_DIV_16_N_5 (0xA << 4) #define TIM_CCMR2_IC3F_DTF_DIV_16_N_6 (0xB << 4) #define TIM_CCMR2_IC3F_DTF_DIV_16_N_8 (0xC << 4) #define TIM_CCMR2_IC3F_DTF_DIV_32_N_5 (0xD << 4) #define TIM_CCMR2_IC3F_DTF_DIV_32_N_6 (0xE << 4) #define TIM_CCMR2_IC3F_DTF_DIV_32_N_8 (0xF << 4) #define TIM_CCMR2_IC3F_MASK (0xF << 4) /* IC3PSC[1:0]: Input capture 3 prescaler */ #define TIM_CCMR2_IC3PSC_OFF (0x0 << 2) #define TIM_CCMR2_IC3PSC_2 (0x1 << 2) #define TIM_CCMR2_IC3PSC_4 (0x2 << 2) #define TIM_CCMR2_IC3PSC_8 (0x3 << 2) #define TIM_CCMR2_IC3PSC_MASK (0x3 << 2) /* --- TIMx_CCER values ---------------------------------------------------- */ /* CC4P: Capture/compare 4 output polarity */ #define TIM_CCER_CC4P (1 << 13) /* CC4E: Capture/compare 4 output enable */ #define TIM_CCER_CC4E (1 << 12) /* CC3NP: Capture/compare 3 complementary output polarity */ #define TIM_CCER_CC3NP (1 << 11) /* CC3NE: Capture/compare 3 complementary output enable */ #define TIM_CCER_CC3NE (1 << 10) /* CC3P: Capture/compare 3 output polarity */ #define TIM_CCER_CC3P (1 << 9) /* CC3E: Capture/compare 3 output enable */ #define TIM_CCER_CC3E (1 << 8) /* CC2NP: Capture/compare 2 complementary output polarity */ #define TIM_CCER_CC2NP (1 << 7) /* CC2NE: Capture/compare 2 complementary output enable */ #define TIM_CCER_CC2NE (1 << 6) /* CC2P: Capture/compare 2 output polarity */ #define TIM_CCER_CC2P (1 << 5) /* CC2E: Capture/compare 2 output enable */ #define TIM_CCER_CC2E (1 << 4) /* CC1NP: Capture/compare 1 complementary output polarity */ #define TIM_CCER_CC1NP (1 << 3) /* CC1NE: Capture/compare 1 complementary output enable */ #define TIM_CCER_CC1NE (1 << 2) /* CC1P: Capture/compare 1 output polarity */ #define TIM_CCER_CC1P (1 << 1) /* CC1E: Capture/compare 1 output enable */ #define TIM_CCER_CC1E (1 << 0) /* --- TIMx_CNT values ----------------------------------------------------- */ /* CNT[15:0]: Counter value */ /* --- TIMx_PSC values ----------------------------------------------------- */ /* PSC[15:0]: Prescaler value */ /* --- TIMx_ARR values ----------------------------------------------------- */ /* ARR[15:0]: Prescaler value */ /* --- TIMx_RCR values ----------------------------------------------------- */ /* REP[15:0]: Repetition counter value */ /* --- TIMx_CCR1 values ---------------------------------------------------- */ /* CCR1[15:0]: Capture/compare 1 value */ /* --- TIMx_CCR2 values ---------------------------------------------------- */ /* CCR2[15:0]: Capture/compare 2 value */ /* --- TIMx_CCR3 values ---------------------------------------------------- */ /* CCR3[15:0]: Capture/compare 3 value */ /* --- TIMx_CCR4 values ---------------------------------------------------- */ /* CCR4[15:0]: Capture/compare 4 value */ /* --- TIMx_BDTR values ---------------------------------------------------- */ /* MOE: Main output enable */ #define TIM_BDTR_MOE (1 << 15) /* AOE: Automatic output enable */ #define TIM_BDTR_AOE (1 << 14) /* BKP: Break polarity */ #define TIM_BDTR_BKP (1 << 13) /* BKE: Break enable */ #define TIM_BDTR_BKE (1 << 12) /* OSSR: Off-state selection of run mode */ #define TIM_BDTR_OSSR (1 << 11) /* OSSI: Off-state selection of idle mode */ #define TIM_BDTR_OSSI (1 << 10) /* LOCK[1:0]: Lock configuration */ /****************************************************************************/ /** @defgroup tim_lock TIM_BDTR_LOCK Timer Lock Values @ingroup timer_defines @{*/ #define TIM_BDTR_LOCK_OFF (0x0 << 8) #define TIM_BDTR_LOCK_LEVEL_1 (0x1 << 8) #define TIM_BDTR_LOCK_LEVEL_2 (0x2 << 8) #define TIM_BDTR_LOCK_LEVEL_3 (0x3 << 8) #define TIM_BDTR_LOCK_MASK (0x3 << 8) /**@}*/ /* DTG[7:0]: Dead-time generator set-up */ #define TIM_BDTR_DTG_MASK 0x00FF /* --- TIMx_DCR values ----------------------------------------------------- */ /* DBL[4:0]: DMA burst length */ #define TIM_BDTR_DBL_MASK (0x1F << 8) /* DBA[4:0]: DMA base address */ #define TIM_BDTR_DBA_MASK (0x1F << 0) /* --- TIMx_DMAR values ---------------------------------------------------- */ /* DMAB[15:0]: DMA register for burst accesses */ /* --- TIMx convenience defines -------------------------------------------- */ /** Output Compare channel designators */ enum tim_oc_id { TIM_OC1 = 0, TIM_OC1N, TIM_OC2, TIM_OC2N, TIM_OC3, TIM_OC3N, TIM_OC4, }; /** Output Compare mode designators */ enum tim_oc_mode { TIM_OCM_FROZEN, TIM_OCM_ACTIVE, TIM_OCM_INACTIVE, TIM_OCM_TOGGLE, TIM_OCM_FORCE_LOW, TIM_OCM_FORCE_HIGH, TIM_OCM_PWM1, TIM_OCM_PWM2, }; /** Input Capture channel designators */ enum tim_ic_id { TIM_IC1, TIM_IC2, TIM_IC3, TIM_IC4, }; /** Input Capture input filter. The frequency used to sample the input and the number of events needed to validate an output transition. TIM_IC_CK_INT_N_x No division from the Deadtime and Sampling Clock frequency (DTF), filter length x TIM_IC_DTF_DIV_y_N_x Division by y from the DTF, filter length x */ enum tim_ic_filter { TIM_IC_OFF, TIM_IC_CK_INT_N_2, TIM_IC_CK_INT_N_4, TIM_IC_CK_INT_N_8, TIM_IC_DTF_DIV_2_N_6, TIM_IC_DTF_DIV_2_N_8, TIM_IC_DTF_DIV_4_N_6, TIM_IC_DTF_DIV_4_N_8, TIM_IC_DTF_DIV_8_N_6, TIM_IC_DTF_DIV_8_N_8, TIM_IC_DTF_DIV_16_N_5, TIM_IC_DTF_DIV_16_N_6, TIM_IC_DTF_DIV_16_N_8, TIM_IC_DTF_DIV_32_N_5, TIM_IC_DTF_DIV_32_N_6, TIM_IC_DTF_DIV_32_N_8, }; /** Input Capture input prescaler. TIM_IC_PSC_x Input capture is done every x events*/ enum tim_ic_psc { TIM_IC_PSC_OFF, TIM_IC_PSC_2, TIM_IC_PSC_4, TIM_IC_PSC_8, }; /** Input Capture input source. The direction of the channel (input/output) as well as the input used. */ enum tim_ic_input { TIM_IC_OUT = 0, TIM_IC_IN_TI1 = 1, TIM_IC_IN_TI2 = 2, TIM_IC_IN_TRC = 3, TIM_IC_IN_TI3 = 5, TIM_IC_IN_TI4 = 6, }; /** Slave external trigger polarity */ enum tim_et_pol { TIM_ET_RISING, TIM_ET_FALLING, }; /* --- TIM function prototypes --------------------------------------------- */ BEGIN_DECLS void timer_reset(uint32_t timer_peripheral); void timer_enable_irq(uint32_t timer_peripheral, uint32_t irq); void timer_disable_irq(uint32_t timer_peripheral, uint32_t irq); bool timer_interrupt_source(uint32_t timer_peripheral, uint32_t flag); bool timer_get_flag(uint32_t timer_peripheral, uint32_t flag); void timer_clear_flag(uint32_t timer_peripheral, uint32_t flag); void timer_set_mode(uint32_t timer_peripheral, uint32_t clock_div, uint32_t alignment, uint32_t direction); void timer_set_clock_division(uint32_t timer_peripheral, uint32_t clock_div); void timer_enable_preload(uint32_t timer_peripheral); void timer_disable_preload(uint32_t timer_peripheral); void timer_set_alignment(uint32_t timer_peripheral, uint32_t alignment); void timer_direction_up(uint32_t timer_peripheral); void timer_direction_down(uint32_t timer_peripheral); void timer_one_shot_mode(uint32_t timer_peripheral); void timer_continuous_mode(uint32_t timer_peripheral); void timer_update_on_any(uint32_t timer_peripheral); void timer_update_on_overflow(uint32_t timer_peripheral); void timer_enable_update_event(uint32_t timer_peripheral); void timer_disable_update_event(uint32_t timer_peripheral); void timer_enable_counter(uint32_t timer_peripheral); void timer_disable_counter(uint32_t timer_peripheral); void timer_set_output_idle_state(uint32_t timer_peripheral, uint32_t outputs); void timer_reset_output_idle_state(uint32_t timer_peripheral, uint32_t outputs); void timer_set_ti1_ch123_xor(uint32_t timer_peripheral); void timer_set_ti1_ch1(uint32_t timer_peripheral); void timer_set_master_mode(uint32_t timer_peripheral, uint32_t mode); void timer_set_dma_on_compare_event(uint32_t timer_peripheral); void timer_set_dma_on_update_event(uint32_t timer_peripheral); void timer_enable_compare_control_update_on_trigger(uint32_t timer_peripheral); void timer_disable_compare_control_update_on_trigger(uint32_t timer_peripheral); void timer_enable_preload_complementry_enable_bits(uint32_t timer_peripheral); void timer_disable_preload_complementry_enable_bits(uint32_t timer_peripheral); void timer_set_prescaler(uint32_t timer_peripheral, uint32_t value); void timer_set_repetition_counter(uint32_t timer_peripheral, uint32_t value); void timer_set_period(uint32_t timer_peripheral, uint32_t period); void timer_enable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_disable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_fast_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_slow_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id, enum tim_oc_mode oc_mode); void timer_enable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_disable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_polarity_high(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_polarity_low(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_enable_oc_output(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_disable_oc_output(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_idle_state_set(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_idle_state_unset(uint32_t timer_peripheral, enum tim_oc_id oc_id); void timer_set_oc_value(uint32_t timer_peripheral, enum tim_oc_id oc_id, uint32_t value); void timer_enable_break_main_output(uint32_t timer_peripheral); void timer_disable_break_main_output(uint32_t timer_peripheral); void timer_enable_break_automatic_output(uint32_t timer_peripheral); void timer_disable_break_automatic_output(uint32_t timer_peripheral); void timer_set_break_polarity_high(uint32_t timer_peripheral); void timer_set_break_polarity_low(uint32_t timer_peripheral); void timer_enable_break(uint32_t timer_peripheral); void timer_disable_break(uint32_t timer_peripheral); void timer_set_enabled_off_state_in_run_mode(uint32_t timer_peripheral); void timer_set_disabled_off_state_in_run_mode(uint32_t timer_peripheral); void timer_set_enabled_off_state_in_idle_mode(uint32_t timer_peripheral); void timer_set_disabled_off_state_in_idle_mode(uint32_t timer_peripheral); void timer_set_break_lock(uint32_t timer_peripheral, uint32_t lock); void timer_set_deadtime(uint32_t timer_peripheral, uint32_t deadtime); void timer_generate_event(uint32_t timer_peripheral, uint32_t event); uint32_t timer_get_counter(uint32_t timer_peripheral); void timer_set_counter(uint32_t timer_peripheral, uint32_t count); void timer_ic_set_filter(uint32_t timer, enum tim_ic_id ic, enum tim_ic_filter flt); void timer_ic_set_prescaler(uint32_t timer, enum tim_ic_id ic, enum tim_ic_psc psc); void timer_ic_set_input(uint32_t timer, enum tim_ic_id ic, enum tim_ic_input in); void timer_ic_enable(uint32_t timer, enum tim_ic_id ic); void timer_ic_disable(uint32_t timer, enum tim_ic_id ic); void timer_slave_set_filter(uint32_t timer, enum tim_ic_filter flt); void timer_slave_set_prescaler(uint32_t timer, enum tim_ic_psc psc); void timer_slave_set_polarity(uint32_t timer, enum tim_et_pol pol); void timer_slave_set_mode(uint32_t timer, uint8_t mode); void timer_slave_set_trigger(uint32_t timer, uint8_t trigger); END_DECLS #endif /** @cond */ #else #warning "timer_common_all.h should not be included directly, only via timer.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/timer_common_f24.h ================================================ /** @addtogroup timer_defines @author @htmlonly © @endhtmlonly 2011 Fergus Noble */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA TIMER.H The order of header inclusion is important. timer.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_TIMER_H /** @endcond */ #ifndef LIBOPENCM3_TIMER_COMMON_F24_H #define LIBOPENCM3_TIMER_COMMON_F24_H #include /* * TIM2 and TIM5 are now 32bit and the following registers are now 32-bit wide: * CNT, ARR, CCR1, CCR2, CCR3, CCR4 */ /* Timer 2/5 option register (TIMx_OR) */ #define TIM_OR(tim_base) MMIO32(tim_base + 0x50) #define TIM2_OR TIM_OR(TIM2) #define TIM5_OR TIM_OR(TIM5) /* --- TIM2_OR values ---------------------------------------------------- */ /* ITR1_RMP */ /****************************************************************************/ /** @defgroup tim2_opt_trigger_remap TIM2_OR Timer 2 Option Register Internal Trigger 1 Remap Only available in F2 and F4 series. @ingroup timer_defines @{*/ /** Internal Trigger 1 remapped to timer 8 trigger out */ #define TIM2_OR_ITR1_RMP_TIM8_TRGOU (0x0 << 10) /** Internal Trigger 1 remapped to PTP trigger out */ #define TIM2_OR_ITR1_RMP_PTP (0x1 << 10) /** Internal Trigger 1 remapped to USB OTG FS SOF */ #define TIM2_OR_ITR1_RMP_OTG_FS_SOF (0x2 << 10) /** Internal Trigger 1 remapped to USB OTG HS SOF */ #define TIM2_OR_ITR1_RMP_OTG_HS_SOF (0x3 << 10) /**@}*/ #define TIM2_OR_ITR1_RMP_MASK (0x3 << 10) /* --- TIM5_OR values ---------------------------------------------------- */ /* ITR4_RMP */ /****************************************************************************/ /** @defgroup tim5_opt_trigger_remap TIM5_OR Timer 5 Option Register Internal Trigger 4 Remap Only available in F2 and F4 series. @ingroup timer_defines @{*/ /** Internal Trigger 4 remapped to GPIO (see reference manual) */ #define TIM5_OR_TI4_RMP_GPIO (0x0 << 6) /** Internal Trigger 4 remapped to LSI internal clock */ #define TIM5_OR_TI4_RMP_LSI (0x1 << 6) /** Internal Trigger 4 remapped to LSE internal clock */ #define TIM5_OR_TI4_RMP_LSE (0x2 << 6) /** Internal Trigger 4 remapped to RTC output event */ #define TIM5_OR_TI4_RMP_RTC (0x3 << 6) /**@}*/ #define TIM5_OR_TI4_RMP_MASK (0x3 << 6) /** Input Capture input polarity */ enum tim_ic_pol { TIM_IC_RISING, TIM_IC_FALLING, TIM_IC_BOTH, }; /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void timer_set_option(uint32_t timer_peripheral, uint32_t option); void timer_ic_set_polarity(uint32_t timer, enum tim_ic_id ic, enum tim_ic_pol pol); END_DECLS #endif /** @cond */ #else #warning "timer_common_f24.h should not be included directly, only via timer.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/usart_common_all.h ================================================ /** @addtogroup usart_defines @author @htmlonly © @endhtmlonly 2009 Uwe Hermann */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA USART.H The order of header inclusion is important. usart.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_USART_H) /** @endcond */ #ifndef LIBOPENCM3_USART_COMMON_ALL_H #define LIBOPENCM3_USART_COMMON_ALL_H #include /* --- Convenience macros -------------------------------------------------- */ /****************************************************************************/ /** @defgroup usart_reg_base USART register base addresses @ingroup STM32F_usart_defines @{*/ #define USART1 USART1_BASE #define USART2 USART2_BASE #define USART3 USART3_BASE /**@}*/ #define UART4 UART4_BASE #define UART5 UART5_BASE /* --- Convenience defines ------------------------------------------------- */ /* CR1_PCE / CR1_PS combined values */ /****************************************************************************/ /** @defgroup usart_cr1_parity USART Parity Selection @ingroup STM32F_usart_defines @{*/ #define USART_PARITY_NONE 0x00 #define USART_PARITY_EVEN USART_CR1_PCE #define USART_PARITY_ODD (USART_CR1_PS | USART_CR1_PCE) /**@}*/ #define USART_PARITY_MASK (USART_CR1_PS | USART_CR1_PCE) /* CR1_TE/CR1_RE combined values */ /****************************************************************************/ /** @defgroup usart_cr1_mode USART Tx/Rx Mode Selection @ingroup STM32F_usart_defines @{*/ #define USART_MODE_RX USART_CR1_RE #define USART_MODE_TX USART_CR1_TE #define USART_MODE_TX_RX (USART_CR1_RE | USART_CR1_TE) /**@}*/ #define USART_MODE_MASK (USART_CR1_RE | USART_CR1_TE) /****************************************************************************/ /** @defgroup usart_cr2_stopbits USART Stop Bit Selection @ingroup STM32F_usart_defines @{*/ #define USART_STOPBITS_1 USART_CR2_STOPBITS_1 /* 1 stop bit */ #define USART_STOPBITS_0_5 USART_CR2_STOPBITS_0_5 /* .5 stop bit */ #define USART_STOPBITS_2 USART_CR2_STOPBITS_2 /* 2 stop bits */ #define USART_STOPBITS_1_5 USART_CR2_STOPBITS_1_5 /* 1.5 stop bit*/ /**@}*/ /* CR3_CTSE/CR3_RTSE combined values */ /****************************************************************************/ /** @defgroup usart_cr3_flowcontrol USART Hardware Flow Control Selection @ingroup STM32F_usart_defines @{*/ #define USART_FLOWCONTROL_NONE 0x00 #define USART_FLOWCONTROL_RTS USART_CR3_RTSE #define USART_FLOWCONTROL_CTS USART_CR3_CTSE #define USART_FLOWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE) /**@}*/ #define USART_FLOWCONTROL_MASK (USART_CR3_RTSE | USART_CR3_CTSE) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void usart_set_baudrate(uint32_t usart, uint32_t baud); void usart_set_databits(uint32_t usart, uint32_t bits); void usart_set_stopbits(uint32_t usart, uint32_t stopbits); void usart_set_parity(uint32_t usart, uint32_t parity); void usart_set_mode(uint32_t usart, uint32_t mode); void usart_set_flow_control(uint32_t usart, uint32_t flowcontrol); void usart_enable(uint32_t usart); void usart_disable(uint32_t usart); void usart_send(uint32_t usart, uint16_t data); uint16_t usart_recv(uint32_t usart); void usart_wait_send_ready(uint32_t usart); void usart_wait_recv_ready(uint32_t usart); void usart_send_blocking(uint32_t usart, uint16_t data); uint16_t usart_recv_blocking(uint32_t usart); void usart_enable_rx_dma(uint32_t usart); void usart_disable_rx_dma(uint32_t usart); void usart_enable_tx_dma(uint32_t usart); void usart_disable_tx_dma(uint32_t usart); void usart_enable_rx_interrupt(uint32_t usart); void usart_disable_rx_interrupt(uint32_t usart); void usart_enable_tx_interrupt(uint32_t usart); void usart_disable_tx_interrupt(uint32_t usart); void usart_enable_error_interrupt(uint32_t usart); void usart_disable_error_interrupt(uint32_t usart); bool usart_get_flag(uint32_t usart, uint32_t flag); bool usart_get_interrupt_source(uint32_t usart, uint32_t flag); END_DECLS #endif /** @cond */ #else #warning "usart_common_all.h should not be included directly, only via usart.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/usart_common_f124.h ================================================ /** @addtogroup usart_defines @author @htmlonly © @endhtmlonly 2009 Uwe Hermann */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA USART.H The order of header inclusion is important. usart.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #if defined(LIBOPENCM3_USART_H) /** @endcond */ #ifndef LIBOPENCM3_USART_COMMON_F124_H #define LIBOPENCM3_USART_COMMON_F124_H #include #include /* --- USART registers ----------------------------------------------------- */ /* Status register (USARTx_SR) */ #define USART_SR(usart_base) MMIO32(usart_base + 0x00) #define USART1_SR USART_SR(USART1_BASE) #define USART2_SR USART_SR(USART2_BASE) #define USART3_SR USART_SR(USART3_BASE) #define UART4_SR USART_SR(UART4_BASE) #define UART5_SR USART_SR(UART5_BASE) /* Data register (USARTx_DR) */ #define USART_DR(usart_base) MMIO32(usart_base + 0x04) #define USART1_DR USART_DR(USART1_BASE) #define USART2_DR USART_DR(USART2_BASE) #define USART3_DR USART_DR(USART3_BASE) #define UART4_DR USART_DR(UART4_BASE) #define UART5_DR USART_DR(UART5_BASE) /* Baud rate register (USARTx_BRR) */ #define USART_BRR(usart_base) MMIO32(usart_base + 0x08) #define USART1_BRR USART_BRR(USART1_BASE) #define USART2_BRR USART_BRR(USART2_BASE) #define USART3_BRR USART_BRR(USART3_BASE) #define UART4_BRR USART_BRR(UART4_BASE) #define UART5_BRR USART_BRR(UART5_BASE) /* Control register 1 (USARTx_CR1) */ #define USART_CR1(usart_base) MMIO32(usart_base + 0x0c) #define USART1_CR1 USART_CR1(USART1_BASE) #define USART2_CR1 USART_CR1(USART2_BASE) #define USART3_CR1 USART_CR1(USART3_BASE) #define UART4_CR1 USART_CR1(UART4_BASE) #define UART5_CR1 USART_CR1(UART5_BASE) /* Control register 2 (USARTx_CR2) */ #define USART_CR2(usart_base) MMIO32(usart_base + 0x10) #define USART1_CR2 USART_CR2(USART1_BASE) #define USART2_CR2 USART_CR2(USART2_BASE) #define USART3_CR2 USART_CR2(USART3_BASE) #define UART4_CR2 USART_CR2(UART4_BASE) #define UART5_CR2 USART_CR2(UART5_BASE) /* Control register 3 (USARTx_CR3) */ #define USART_CR3(usart_base) MMIO32(usart_base + 0x14) #define USART1_CR3 USART_CR3(USART1_BASE) #define USART2_CR3 USART_CR3(USART2_BASE) #define USART3_CR3 USART_CR3(USART3_BASE) #define UART4_CR3 USART_CR3(UART4_BASE) #define UART5_CR3 USART_CR3(UART5_BASE) /* Guard time and prescaler register (USARTx_GTPR) */ #define USART_GTPR(usart_base) MMIO32(usart_base + 0x18) #define USART1_GTPR USART_GTPR(USART1_BASE) #define USART2_GTPR USART_GTPR(USART2_BASE) #define USART3_GTPR USART_GTPR(USART3_BASE) #define UART4_GTPR USART_GTPR(UART4_BASE) #define UART5_GTPR USART_GTPR(UART5_BASE) /* --- USART_SR values ----------------------------------------------------- */ /****************************************************************************/ /** @defgroup usart_sr_flags USART Status register Flags @ingroup STM32F_usart_defines @{*/ /** CTS: CTS flag */ /** @note: undefined on UART4 and UART5 */ #define USART_SR_CTS (1 << 9) /** LBD: LIN break detection flag */ #define USART_SR_LBD (1 << 8) /** TXE: Transmit data buffer empty */ #define USART_SR_TXE (1 << 7) /** TC: Transmission complete */ #define USART_SR_TC (1 << 6) /** RXNE: Read data register not empty */ #define USART_SR_RXNE (1 << 5) /** IDLE: Idle line detected */ #define USART_SR_IDLE (1 << 4) /** ORE: Overrun error */ #define USART_SR_ORE (1 << 3) /** NE: Noise error flag */ #define USART_SR_NE (1 << 2) /** FE: Framing error */ #define USART_SR_FE (1 << 1) /** PE: Parity error */ #define USART_SR_PE (1 << 0) /**@}*/ /* --- USART_DR values ----------------------------------------------------- */ /* USART_DR[8:0]: DR[8:0]: Data value */ #define USART_DR_MASK 0x1FF /* --- USART_BRR values ---------------------------------------------------- */ /* DIV_Mantissa[11:0]: mantissa of USARTDIV */ #define USART_BRR_DIV_MANTISSA_MASK (0xFFF << 4) /* DIV_Fraction[3:0]: fraction of USARTDIV */ #define USART_BRR_DIV_FRACTION_MASK 0xF /* --- USART_CR1 values ---------------------------------------------------- */ /* UE: USART enable */ #define USART_CR1_UE (1 << 13) /* M: Word length */ #define USART_CR1_M (1 << 12) /* WAKE: Wakeup method */ #define USART_CR1_WAKE (1 << 11) /* PCE: Parity control enable */ #define USART_CR1_PCE (1 << 10) /* PS: Parity selection */ #define USART_CR1_PS (1 << 9) /* PEIE: PE interrupt enable */ #define USART_CR1_PEIE (1 << 8) /* TXEIE: TXE interrupt enable */ #define USART_CR1_TXEIE (1 << 7) /* TCIE: Transmission complete interrupt enable */ #define USART_CR1_TCIE (1 << 6) /* RXNEIE: RXNE interrupt enable */ #define USART_CR1_RXNEIE (1 << 5) /* IDLEIE: IDLE interrupt enable */ #define USART_CR1_IDLEIE (1 << 4) /* TE: Transmitter enable */ #define USART_CR1_TE (1 << 3) /* RE: Receiver enable */ #define USART_CR1_RE (1 << 2) /* RWU: Receiver wakeup */ #define USART_CR1_RWU (1 << 1) /* SBK: Send break */ #define USART_CR1_SBK (1 << 0) /* --- USART_CR2 values ---------------------------------------------------- */ /* LINEN: LIN mode enable */ #define USART_CR2_LINEN (1 << 14) /* STOP[13:12]: STOP bits */ #define USART_CR2_STOPBITS_1 (0x00 << 12) /* 1 stop bit */ #define USART_CR2_STOPBITS_0_5 (0x01 << 12) /* 0.5 stop bits */ #define USART_CR2_STOPBITS_2 (0x02 << 12) /* 2 stop bits */ #define USART_CR2_STOPBITS_1_5 (0x03 << 12) /* 1.5 stop bits */ #define USART_CR2_STOPBITS_MASK (0x03 << 12) #define USART_CR2_STOPBITS_SHIFT 12 /* CLKEN: Clock enable */ #define USART_CR2_CLKEN (1 << 11) /* CPOL: Clock polarity */ #define USART_CR2_CPOL (1 << 10) /* CPHA: Clock phase */ #define USART_CR2_CPHA (1 << 9) /* LBCL: Last bit clock pulse */ #define USART_CR2_LBCL (1 << 8) /* LBDIE: LIN break detection interrupt enable */ #define USART_CR2_LBDIE (1 << 6) /* LBDL: LIN break detection length */ #define USART_CR2_LBDL (1 << 5) /* ADD[3:0]: Address of the usart node */ #define USART_CR2_ADD_MASK 0xF /* --- USART_CR3 values ---------------------------------------------------- */ /* CTSIE: CTS interrupt enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_CTSIE (1 << 10) /* CTSE: CTS enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_CTSE (1 << 9) /* RTSE: RTS enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_RTSE (1 << 8) /* DMAT: DMA enable transmitter */ /* Note: N/A on UART5 */ #define USART_CR3_DMAT (1 << 7) /* DMAR: DMA enable receiver */ /* Note: N/A on UART5 */ #define USART_CR3_DMAR (1 << 6) /* SCEN: Smartcard mode enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_SCEN (1 << 5) /* NACK: Smartcard NACK enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_NACK (1 << 4) /* HDSEL: Half-duplex selection */ #define USART_CR3_HDSEL (1 << 3) /* IRLP: IrDA low-power */ #define USART_CR3_IRLP (1 << 2) /* IREN: IrDA mode enable */ #define USART_CR3_IREN (1 << 1) /* EIE: Error interrupt enable */ #define USART_CR3_EIE (1 << 0) /* --- USART_GTPR values --------------------------------------------------- */ /* GT[7:0]: Guard time value */ /* Note: N/A on UART4 & UART5 */ #define USART_GTPR_GT_MASK (0xFF << 8) /* PSC[7:0]: Prescaler value */ /* Note: N/A on UART4/5 */ #define USART_GTPR_PSC_MASK 0xFF /* TODO */ /* Note to Uwe: what needs to be done here? */ #endif /** @cond */ #else #warning "usart_common_all.h should not be included directly, only via usart.h" #endif /** @endcond */ /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/common/usart_common_f24.h ================================================ /** @addtogroup usart_defines @author @htmlonly © @endhtmlonly 2011 Uwe Hermann @author @htmlonly © @endhtmlonly 2011 Stephen Caudle */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA USART.H The order of header inclusion is important. usart.h includes the device specific memorymap.h header before including this header file.*/ /** @cond */ #ifdef LIBOPENCM3_USART_H /** @endcond */ #ifndef LIBOPENCM3_USART_COMMON_F24_H #define LIBOPENCM3_USART_COMMON_F24_H #include /* --- Convenience macros -------------------------------------------------- */ #define USART6 USART6_BASE /* --- USART registers ----------------------------------------------------- */ /* Status register (USARTx_SR) */ #define USART6_SR USART_SR(USART6_BASE) /* Data register (USARTx_DR) */ #define USART6_DR USART_DR(USART6_BASE) /* Baud rate register (USARTx_BRR) */ #define USART6_BRR USART_BRR(USART6_BASE) /* Control register 1 (USARTx_CR1) */ #define USART6_CR1 USART_CR1(USART6_BASE) /* Control register 2 (USARTx_CR2) */ #define USART6_CR2 USART_CR2(USART6_BASE) /* Control register 3 (USARTx_CR3) */ #define USART6_CR3 USART_CR3(USART6_BASE) /* Guard time and prescaler register (USARTx_GTPR) */ #define USART6_GTPR USART_GTPR(USART6_BASE) /* --- USART_CR1 values ---------------------------------------------------- */ /* OVER8: Oversampling mode */ #define USART_CR1_OVER8 (1 << 15) /* --- USART_CR3 values ---------------------------------------------------- */ /* ONEBIT: One sample bit method enable */ #define USART_CR3_ONEBIT (1 << 11) #endif /** @cond */ #else #warning "usart_common_f24.h should not be included directly, only via usart.h" #endif /** @endcond */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/comparator.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/crc.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/crypto.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F2) # include #elif defined(STM32F4) # include #else # error "CRYPTO processor is supported only" \ "in stm32f2xx, stm32f41xx, stm32f42xx and stm32f43xx family." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/dac.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/dbgmcu.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_STM32_DBGMCU_H #define LIBOPENCM3_STM32_DBGMCU_H #include #include /* --- DBGMCU registers ---------------------------------------------------- */ /* Debug MCU IDCODE register (DBGMCU_IDCODE) */ #define DBGMCU_IDCODE MMIO32(DBGMCU_BASE + 0x00) /* Debug MCU configuration register (DBGMCU_CR) */ /* Note: Only 32bit access supported. */ #define DBGMCU_CR MMIO32(DBGMCU_BASE + 0x04) /* --- DBGMCU_IDCODE values ------------------------------------------------ */ #define DBGMCU_IDCODE_DEV_ID_MASK 0x00000fff #define DBGMCU_IDCODE_REV_ID_MASK 0xffff0000 /* --- DBGMCU_CR values ---------------------------------------------------- */ /* Bit 31: Reserved. */ /* Bits [24:22]: Reserved, must be kept cleared. */ /* Bits [4:3]: Reserved. */ #define DBGMCU_CR_SLEEP 0x00000001 #define DBGMCU_CR_STOP 0x00000002 #define DBGMCU_CR_STANDBY 0x00000004 #define DBGMCU_CR_TRACE_IOEN 0x00000020 #define DBGMCU_CR_TRACE_MODE_MASK 0x000000C0 #define DBGMCU_CR_TRACE_MODE_ASYNC 0x00000000 #define DBGMCU_CR_TRACE_MODE_SYNC_1 0x00000040 #define DBGMCU_CR_TRACE_MODE_SYNC_2 0x00000080 #define DBGMCU_CR_TRACE_MODE_SYNC_4 0x000000C0 #define DBGMCU_CR_IWDG_STOP 0x00000100 #define DBGMCU_CR_WWDG_STOP 0x00000200 #define DBGMCU_CR_TIM1_STOP 0x00000400 #define DBGMCU_CR_TIM2_STOP 0x00000800 #define DBGMCU_CR_TIM3_STOP 0x00001000 #define DBGMCU_CR_TIM4_STOP 0x00002000 #define DBGMCU_CR_CAN1_STOP 0x00004000 #define DBGMCU_CR_I2C1_SMBUS_TIMEOUT 0x00008000 #define DBGMCU_CR_I2C2_SMBUS_TIMEOUT 0x00010000 #define DBGMCU_CR_TIM8_STOP 0x00020000 #define DBGMCU_CR_TIM5_STOP 0x00040000 #define DBGMCU_CR_TIM6_STOP 0x00080000 #define DBGMCU_CR_TIM7_STOP 0x00100000 #define DBGMCU_CR_CAN2_STOP 0x00200000 #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/desig.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DESIG_H #define LIBOPENCM3_DESIG_H #include #include /* --- Device Electronic Signature -------------------------------- */ /* Flash size register */ #define DESIG_FLASH_SIZE MMIO16(DESIG_FLASH_SIZE_BASE + 0x00) /* Unique ID register (96 bits) */ /* Note: ST says these may be accessed in any width if you choose */ #define DESIG_UID_15_0 MMIO16(DESIG_UNIQUE_ID_BASE + 0x00) /* Listed as "This field value is also reserved for a future feature" WTH?! */ #define DESIG_UID_31_16 MMIO16(DESIG_UNIQUE_ID_BASE + 0x02) #define DESIG_UID_63_32 MMIO32(DESIG_UNIQUE_ID_BASE + 0x04) #define DESIG_UID_95_64 MMIO32(DESIG_UNIQUE_ID_BASE + 0x08) BEGIN_DECLS /** * Read the on board flash size * @return flash size in KB */ uint16_t desig_get_flash_size(void); /** * Read the full 96 bit unique identifier * Note: ST specifies that bits 31..16 are _also_ reserved for future use * @param result pointer to at least 3xuint32_ts (96 bits) */ void desig_get_unique_id(uint32_t result[]); /** * Read the full 96 bit unique identifier and return it as a * zero-terminated string * @param string memory region to write the result to 8 @param string_len the size of string in bytes */ void desig_get_unique_id_as_string(char *string, unsigned int string_len); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/dma.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/exti.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/adc.h ================================================ /** @defgroup adc_defines ADC Defines * * @brief Defined Constants and Types for the STM32F0xx Analog to Digital * Converter * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_ADC_H #define LIBOPENCM3_ADC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /** @defgroup adc_reg_base ADC register base addresses * @ingroup adc_defines * *@{*/ #define ADC ADC_BASE #define ADC1 ADC_BASE/* for API compatibility */ /**@}*/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ /* ADC interrupt and status register */ #define ADC_ISR(base) MMIO32(base + 0x00) #define ADC1_ISR ADC_ISR(ADC) /* Interrupt Enable Register */ #define ADC_IER(base) MMIO32(base + 0x04) #define ADC1_IER ADC_IER(ADC) /* Control Register */ #define ADC_CR(base) MMIO32(base + 0x08) #define ADC1_CR ADC_CR(ADC) /* Configuration Register 1 */ #define ADC_CFGR1(base) MMIO32(base + 0x0C) #define ADC1_CFGR1 ADC_CFGR1(ADC) /* Configuration Register 2 */ #define ADC_CFGR2(base) MMIO32(base + 0x10) #define ADC1_CFGR2 ADC_CFGR2(ADC) /* Sample Time Register 1 */ #define ADC_SMPR(base) MMIO32(base + 0x14) #define ADC1_SMPR ADC_SMPR(ADC) /* Watchdog Threshold Register */ #define ADC_TR(base) MMIO32(base + 0x20) #define ADC1_TR ADC_TR(ADC) /* Channel Select Register */ #define ADC_CHSELR(base) MMIO32(base + 0x28) #define ADC1_CHSELR ADC_CHSELR(ADC) /* Regular Data Register */ #define ADC_DR(base) MMIO32(base + 0x40) #define ADC1_DR ADC_DR(ADC) /* Regular Data Register */ #define ADC_CCR MMIO32(ADC_BASE + 0x308) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* ADC_ISR Values -----------------------------------------------------------*/ #define ADC_ISR_AWD (1 << 7) #define ADC_ISR_OVR (1 << 4) #define ADC_ISR_EOSEQ (1 << 3) #define ADC_ISR_EOC (1 << 2) #define ADC_ISR_EOSMP (1 << 1) #define ADC_ISR_ADRDY (1 << 0) /* ADC_IER Values -----------------------------------------------------------*/ #define ADC_IER_AWDIE (1 << 7) #define ADC_IER_OVRIE (1 << 4) #define ADC_IER_EOSEQIE (1 << 3) #define ADC_IER_EOCIE (1 << 2) #define ADC_IER_EOSMPIE (1 << 1) #define ADC_IER_ADRDYIE (1 << 0) /* ADC_CR Values ------------------------------------------------------------*/ #define ADC_CR_ADCAL (1 << 31) #define ADC_CR_ADSTP (1 << 4) #define ADC_CR_ADSTART (1 << 2) #define ADC_CR_ADDIS (1 << 1) #define ADC_CR_ADEN (1 << 0) /* ADC_CFGR1 Values ---------------------------------------------------------*/ #define ADC_CFGR1_AWDCH_SHIFT 26 #define ADC_CFGR1_AWDCH (0x1F << ADC_CFGR1_AWDCH_SHIFT) #define ADC_CFGR1_AWDCH_VAL(x) ((x) << ADC_CFGR1_AWDCH_SHIFT) #define ADC_CFGR1_AWDEN (1 << 23) #define ADC_CFGR1_AWDSGL (1 << 22) #define ADC_CFGR1_DISCEN (1 << 16) #define ADC_CFGR1_AUTOFF (1 << 15) #define ADC_CFGR1_WAIT (1 << 14) #define ADC_CFGR1_CONT (1 << 13) #define ADC_CFGR1_OVRMOD (1 << 12) #define ADC_CFGR1_EXTEN_SHIFT 10 #define ADC_CFGR1_EXTEN (3 << ADC_CFGR1_EXTEN_SHIFT) #define ADC_CFGR1_EXTEN_DISABLE (0 << ADC_CFGR1_EXTEN_SHIFT) #define ADC_CFGR1_EXTEN_RISING (1 << ADC_CFGR1_EXTEN_SHIFT) #define ADC_CFGR1_EXTEN_FALLING (2 << ADC_CFGR1_EXTEN_SHIFT) #define ADC_CFGR1_EXTEN_BOTH (3 << ADC_CFGR1_EXTEN_SHIFT) #define ADC_CFGR1_EXTSEL_SHIFT 6 #define ADC_CFGR1_EXTSEL (7 << ADC_CFGR1_EXTSEL_SHIFT) #define ADC_CFGR1_EXTSEL_VAL(x) ((x) << ADC_CFGR1_EXTSEL_SHIFT) #define ADC_CFGR1_ALIGN (1 << 5) #define ADC_CFGR1_RES_SHIFT 3 #define ADC_CFGR1_RES (3 << ADC_CFGR1_RES_SHIFT) #define ADC_CFGR1_RES_12_BIT (0 << ADC_CFGR1_RES_SHIFT) #define ADC_CFGR1_RES_10_BIT (1 << ADC_CFGR1_RES_SHIFT) #define ADC_CFGR1_RES_8_BIT (2 << ADC_CFGR1_RES_SHIFT) #define ADC_CFGR1_RES_6_BIT (3 << ADC_CFGR1_RES_SHIFT) #define ADC_CFGR1_SCANDIR (1 << 2) #define ADC_CFGR1_DMACFG (1 << 1) #define ADC_CFGR1_DMAEN (1 << 0) /* ADC_CFGR2 Values ---------------------------------------------------------*/ #define ADC_CFGR2_CKMODE_SHIFT 30 #define ADC_CFGR2_CKMODE (3 << ADC_CFGR2_CKMODE_SHIFT) #define ADC_CFGR2_CKMODE_CK_ADC (0 << ADC_CFGR2_CKMODE_SHIFT) #define ADC_CFGR2_CKMODE_PCLK_DIV2 (1 << ADC_CFGR2_CKMODE_SHIFT) #define ADC_CFGR2_CKMODE_PCLK_DIV4 (2 << ADC_CFGR2_CKMODE_SHIFT) /* ADC_SMPR Values ----------------------------------------------------------*/ #define ADC_SMPR_SMP_SHIFT 0 #define ADC_SMPR_SMP (7 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_001DOT5 (0 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_007DOT5 (1 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_013DOT5 (2 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_028DOT5 (3 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_041DOT5 (4 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_055DOT5 (5 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_071DOT5 (6 << ADC_SMPR_SMP_SHIFT) #define ADC_SMPR_SMP_239DOT5 (7 << ADC_SMPR_SMP_SHIFT) /* ADC_TR Values ------------------------------------------------------------*/ #define ADC_TR_LT_SHIFT 0 #define ADC_TR_LT (0xFFF << ADC_TR_LT_SHIFT) #define ADC_TR_LT_VAL(x) ((x) << ADC_TR_LT_SHIFT) #define ADC_TR_HT_SHIFT 16 #define ADC_TR_HT (0xFFF << ADC_TR_HT_SHIFT) #define ADC_TR_HT_VAL(x) ((x) << ADC_TR_HT_SHIFT) /* ADC_CHSELR Values --------------------------------------------------------*/ #define ADC_CHSELR_CHSEL(x) (1 << (x)) /* ADC_DR Values ------------------------------------------------------------*/ #define ADC_DR_DATA 0xFFFF /* ADC_CCR Values -----------------------------------------------------------*/ #define ADC_CCR_VBATEN (1 << 24) #define ADC_CCR_TSEN (1 << 23) #define ADC_CCR_VREFEN (1 << 22) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /** @defgroup adc_api_res ADC resolutions * @ingroup adc_defines * *@{*/ #define ADC_RESOLUTION_12BIT ADC_CFGR1_RES_12_BIT #define ADC_RESOLUTION_10BIT ADC_CFGR1_RES_10_BIT #define ADC_RESOLUTION_8BIT ADC_CFGR1_RES_8_BIT #define ADC_RESOLUTION_6BIT ADC_CFGR1_RES_6_BIT /**@}*/ /** @defgroup adc_api_smptime ADC sampling time * @ingroup adc_defines * *@{*/ #define ADC_SMPTIME_001DOT5 ADC_SMPR_SMP_001DOT5 #define ADC_SMPTIME_007DOT5 ADC_SMPR_SMP_007DOT5 #define ADC_SMPTIME_013DOT5 ADC_SMPR_SMP_013DOT5 #define ADC_SMPTIME_028DOT5 ADC_SMPR_SMP_028DOT5 #define ADC_SMPTIME_041DOT5 ADC_SMPR_SMP_041DOT5 #define ADC_SMPTIME_055DOT5 ADC_SMPR_SMP_055DOT5 #define ADC_SMPTIME_071DOT5 ADC_SMPR_SMP_071DOT5 #define ADC_SMPTIME_239DOT5 ADC_SMPR_SMP_239DOT5 /**@}*/ /** @defgroup adc_api_clksource ADC clock source * @ingroup adc_defines * *@{*/ #define ADC_CLKSOURCE_ADC ADC_CFGR2_CKMODE_CK_ADC #define ADC_CLKSOURCE_PCLK_DIV2 ADC_CFGR2_CKMODE_PCLK_DIV2 #define ADC_CLKSOURCE_PCLK_DIV4 ADC_CFGR2_CKMODE_PCLK_DIV4 /**@}*/ /** @defgroup adc_channel ADC Channel Numbers * @ingroup adc_defines * *@{*/ #define ADC_CHANNEL0 0x00 #define ADC_CHANNEL1 0x01 #define ADC_CHANNEL2 0x02 #define ADC_CHANNEL3 0x03 #define ADC_CHANNEL4 0x04 #define ADC_CHANNEL5 0x05 #define ADC_CHANNEL6 0x06 #define ADC_CHANNEL7 0x07 #define ADC_CHANNEL8 0x08 #define ADC_CHANNEL9 0x09 #define ADC_CHANNEL10 0x0A #define ADC_CHANNEL11 0x0B #define ADC_CHANNEL12 0x0C #define ADC_CHANNEL13 0x0D #define ADC_CHANNEL14 0x0E #define ADC_CHANNEL15 0x0F #define ADC_CHANNEL_TEMP 0x10 #define ADC_CHANNEL_VREF 0x11 #define ADC_CHANNEL_VBAT 0x12 /**@}*/ /** @defgroup adc_api_opmode ADC Operation Modes * @ingroup adc_defines * *@{*/ enum adc_opmode { ADC_MODE_SEQUENTIAL, ADC_MODE_SCAN, ADC_MODE_SCAN_INFINITE, }; /**@}*/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS /* Operation mode API */ void adc_set_continuous_conversion_mode(uint32_t adc); void adc_set_single_conversion_mode(uint32_t adc); void adc_enable_discontinuous_mode(uint32_t adc); void adc_disable_discontinuous_mode(uint32_t adc); void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode); /* Trigger API */ void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity); void adc_disable_external_trigger_regular(uint32_t adc); /* Conversion API */ void adc_start_conversion_regular(uint32_t adc); bool adc_eoc(uint32_t adc); uint32_t adc_read_regular(uint32_t adc); /* Interrupt configuration */ void adc_enable_watchdog_interrupt(uint32_t adc); void adc_disable_watchdog_interrupt(uint32_t adc); bool adc_get_watchdog_flag(uint32_t adc); void adc_clear_watchdog_flag(uint32_t adc); void adc_enable_overrun_interrupt(uint32_t adc); void adc_disable_overrun_interrupt(uint32_t adc); bool adc_get_overrun_flag(uint32_t adc); void adc_clear_overrun_flag(uint32_t adc); void adc_enable_eoc_sequence_interrupt(uint32_t adc); void adc_disable_eoc_sequence_interrupt(uint32_t adc); bool adc_get_eoc_sequence_flag(uint32_t adc); void adc_enable_eoc_interrupt(uint32_t adc); void adc_disable_eoc_interrupt(uint32_t adc); /* Basic configuration */ void adc_power_off(uint32_t adc); void adc_power_on(uint32_t adc); void adc_set_clk_source(uint32_t adc, uint32_t source); void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time); void adc_set_resolution(uint32_t adc, uint16_t resolution); void adc_set_left_aligned(uint32_t adc); void adc_set_right_aligned(uint32_t adc); void adc_enable_dma(uint32_t adc); void adc_disable_dma(uint32_t adc); void adc_enable_temperature_sensor(void); void adc_disable_temperature_sensor(void); void adc_enable_vref_sensor(void); void adc_disable_vref_sensor(void); void adc_enable_vbat_sensor(void); void adc_disable_vbat_sensor(void); void adc_calibrate_start(uint32_t adc); void adc_calibrate_wait_finish(uint32_t adc); /* Analog Watchdog */ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc); void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t chan); void adc_disable_analog_watchdog(uint32_t adc); void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold); void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/cec.h ================================================ /** @defgroup CEC_defines CEC Defines * * @brief Defined Constants and Types for the STM32F0xx HDMI-CEC * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CEC_H #define LIBOPENCM3_CEC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define CEC CEC_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define CEC_CR MMIO32(CEC_BASE + 0x00) #define CEC_CFGR MMIO32(CEC_BASE + 0x04) #define CEC_TXDR MMIO32(CEC_BASE + 0x08) #define CEC_RXDR MMIO32(CEC_BASE + 0x0c) #define CEC_ISR MMIO32(CEC_BASE + 0x10) #define CEC_IER MMIO32(CEC_BASE + 0x14) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* CEC_CR Values ------------------------------------------------------------*/ #define CEC_CR_TXEOM (1 << 2) #define CEC_CR_TXSOM (1 << 1) #define CEC_CR_CECEN (1 << 0) /* CEC_CFGR Values ----------------------------------------------------------*/ #define CEC_CFGR_LSTN (1 << 31) #define CEC_CFGR_OAR_SHIFT 16 #define CEC_CFGR_OAR (0x3FFF << CEC_CFGR_OAR_SHIFT) #define CEC_CFGR_SFTOPT (1 << 8) #define CEC_CFGR_BRDNOGEN (1 << 7) #define CEC_CFGR_LBPEGEN (1 << 6) #define CEC_CFGR_BREGEN (1 << 5) #define CEC_CFGR_BRESTP (1 << 4) #define CEC_CFGR_RXTOL (1 << 3) #define CEC_CFGR_SFT_SHIFT 0 #define CEC_CFGR_SFT (7 >> CEC_CFGR_SFT_SHIFT) /* CEC_ISR Values -----------------------------------------------------------*/ #define CEC_ISR_TXACKE (1 << 12) #define CEC_ISR_TXERR (1 << 11) #define CEC_ISR_TXUDR (1 << 10) #define CEC_ISR_TXEND (1 << 9) #define CEC_ISR_TXBR (1 << 8) #define CEC_ISR_ARBLST (1 << 7) #define CEC_ISR_RXACKE (1 << 6) #define CEC_ISR_LBPE (1 << 5) #define CEC_ISR_SBPE (1 << 4) #define CEC_ISR_BRE (1 << 3) #define CEC_ISR_RXOVR (1 << 2) #define CEC_ISR_RXEND (1 << 1) #define CEC_ISR_RXBR (1 << 0) /* CEC_IER Values -----------------------------------------------------------*/ #define CEC_IER_TXACKIE (1 << 12) #define CEC_IER_TXERRIE (1 << 11) #define CEC_IER_TXUDRIE (1 << 10) #define CEC_IER_TXENDIE (1 << 9) #define CEC_IER_TXBRIE (1 << 8) #define CEC_IER_ARBLSTIE (1 << 7) #define CEC_IER_RXACKIE (1 << 6) #define CEC_IER_LBPEIE (1 << 5) #define CEC_IER_SBPEIE (1 << 4) #define CEC_IER_BREIE (1 << 3) #define CEC_IER_RXOVRIE (1 << 2) #define CEC_IER_RXENDIE (1 << 1) #define CEC_IER_RXBRIE (1 << 0) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/comparator.h ================================================ /** @defgroup comp_defines COMP Defines * * @brief libopencm3 Defined Constants and Types for the STM32F0xx * Comparator module * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 29 Jun 2013 * *LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_COMP_H #define LIBOPENCM3_COMP_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define COMP1 0 #define COMP2 1 /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define COMP_CSR(i) MMIO16(SYSCFG_COMP_BASE + 0x1c + (i)*2) #define COMP_CSR1 COMP_CSR(COMP1) #define COMP_CSR2 COMP_CSR(COMP2) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* COMP_CSR Values ----------------------------------------------------------*/ #define COMP_CSR_LOCK (1 << 15) #define COMP_CSR_OUT (1 << 14) #define COMP_CSR_HYST_SHIFT 12 #define COMP_CSR_HYST (3 << COMP_CSR_HYST_SHIFT) #define COMP_CSR_HYST_NO (0 << COMP_CSR_HYST_SHIFT) #define COMP_CSR_HYST_LOW (1 << COMP_CSR_HYST_SHIFT) #define COMP_CSR_HYST_MED (2 << COMP_CSR_HYST_SHIFT) #define COMP_CSR_HYST_HIGH (3 << COMP_CSR_HYST_SHIFT) #define COMP_CSR_POL (1 << 11) #define COMP_CSR_OUTSEL_SHIFT 8 #define COMP_CSR_OUTSEL (7 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_NONE (0 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM1_BRK (1 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM1_IC1 (2 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM1_OCRCLR (3 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM2_IC4 (4 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM2_OCRCLR (5 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM3_IC1 (6 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_OUTSEL_TIM3_OCRCLR (7 << COMP_CSR_OUTSEL_SHIFT) #define COMP_CSR_WINDWEN (1 << 23) #define COMP_CSR_INSEL_SHIFT 4 #define COMP_CSR_INSEL (7 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_1_4_VREFINT (0 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_2_4_VREFINT (1 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_3_4_VREFINT (2 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_4_4_VREFINT (3 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_VREFINT (3 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_INM4 (4 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_INM5 (5 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_INSEL_INM6 (6 << COMP_CSR_INSEL_SHIFT) #define COMP_CSR_SPEED_SHIFT 2 #define COMP_CSR_SPEED (3 << COMP_CSR_SPEED_SHIFT) #define COMP_CSR_SPEED_HIGH (0 << COMP_CSR_SPEED_SHIFT) #define COMP_CSR_SPEED_MED (1 << COMP_CSR_SPEED_SHIFT) #define COMP_CSR_SPEED_LOW (2 << COMP_CSR_SPEED_SHIFT) #define COMP_CSR_SPEED_VERYLOW (3 << COMP_CSR_SPEED_SHIFT) #define COMP_CSR_SW1 (1 << 1) #define COMP_CSR_EN (1 << 0) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS void comp_enable(uint8_t id); void comp_disable(uint8_t id); void comp_select_input(uint8_t id, uint32_t input); void comp_select_output(uint8_t id, uint32_t output); void comp_select_hyst(uint8_t id, uint32_t hyst); void comp_select_speed(uint8_t id, uint32_t speed); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/crc.h ================================================ /** @defgroup crc_defines CRC Defines * * @brief libopencm3 Defined Constants and Types for the STM32F1xx CRC * Generator * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 29 Jun 2013 * *LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register values */ /*****************************************************************************/ #define CRC_CR_REV_OUT (1 << 7) #define CRC_CR_REV_IN_SHIFT 5 #define CRC_CR_REV_IN (3 << CRC_CR_REV_IN_SHIFT) #define CRC_CR_REV_IN_NONE (0 << CRC_CR_REV_IN_SHIFT) #define CRC_CR_REV_IN_BYTE (1 << CRC_CR_REV_IN_SHIFT) #define CRC_CR_REV_IN_HALF (2 << CRC_CR_REV_IN_SHIFT) #define CRC_CR_REV_IN_WORD (3 << CRC_CR_REV_IN_SHIFT) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/dac.h ================================================ /** @defgroup dac_defines DAC Defines * * @brief Defined Constants and Types for the STM32F0xx Digital to Analog * Converter * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define DAC DAC_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define DAC_CR MMIO32(DAC_BASE + 0x00) #define DAC_SWTRIGR MMIO32(DAC_BASE + 0x04) #define DAC_DHR12R1 MMIO32(DAC_BASE + 0x08) #define DAC_DHR12L1 MMIO32(DAC_BASE + 0x0C) #define DAC_DHR8R1 MMIO32(DAC_BASE + 0x10) #define DAC_DOR1 MMIO32(DAC_BASE + 0x2C) #define DAC_SR MMIO32(DAC_BASE + 0x34) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* DAC_CR Values ------------------------------------------------------------*/ #define DAC_CR_DMAUDRIE1 (1 << 13) #define DAC_CR_DMAEN1 (1 << 12) #define DAC_CR_TSEL1_SHIFT 3 #define DAC_CR_TSEL1 (7 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM6_TRGO (0 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM8_TRGO (1 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM7_TRGO (2 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM5_TRGO (3 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM2_TRGO (4 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_TIM4_TRGO (5 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_EXT_9 (6 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TSEL1_SWTRG (7 << DAC_CR_TSEL1_SHIFT) #define DAC_CR_TEN1 (1 << 2) #define DAC_CR_BOFF1 (1 << 1) #define DAC_CR_EN1 (1 << 0) /* DAC_SWTRIGR Values -------------------------------------------------------*/ #define DAC_SWTRIGR_SWTRIG1 (1 << 0) /* DAC_DHR12R1 Values -------------------------------------------------------*/ #define DAC_DHR12R1_DACC1DHR 0xFFF /* DAC_DHR12L1 Values -------------------------------------------------------*/ #define DAC_DHR12L1_DACC1DHR (0xFFF << 4) /* DAC_DHR8R1 Values --------------------------------------------------------*/ #define DAC_DHR8R1_DACC1DHR 0xFF /* DAC_DOR1 Values ----------------------------------------------------------*/ #define DAC_DOR1_DACC1DOR 0xFFF /* DAC_SR Values ------------------------------------------------------------*/ #define DAC_SR_DMAUDR1 (1 << 13) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/dma.h ================================================ /** @defgroup dma_defines DMA Defines * * @ingroup STM32F0xx_defines * * @brief Defined Constants and Types for the STM32F0xx DMA Controller * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/doc-stm32f0.h ================================================ /** @mainpage libopencm3 STM32F0 * * @version 1.0.0 * * @date 11 July 2013 * * API documentation for ST Microelectronics STM32F0 Cortex M0 series. * * LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F0xx STM32F0xx * Libraries for ST Microelectronics STM32F0xx series. * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F0xx_defines STM32F0xx Defines * * @brief Defined Constants and Types for the STM32F0xx series * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/exti.h ================================================ /** @defgroup exti_defines EXTI Defines * * @brief Defined Constants and Types for the STM32F0xx External Interrupts * * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/flash.h ================================================ /** @defgroup flash_defines FLASH Defines * * @brief Defined Constants and Types for the STM32F0xx Flash memory * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define FLASH_ACR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x00) #define FLASH_KEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x04) #define FLASH_OPTKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x08) #define FLASH_SR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x0C) #define FLASH_CR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x10) #define FLASH_AR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x14) #define FLASH_OBR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x1C) #define FLASH_WRPR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x20) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_PRFTBS (1 << 5) #define FLASH_ACR_PRFTBE (1 << 4) #define FLASH_ACR_LATENCY_SHIFT 0 #define FLASH_ACR_LATENCY 7 #define FLASH_ACR_LATENCY_000_024MHZ 0 #define FLASH_ACR_LATENCY_024_048MHZ 1 #define FLASH_ACR_LATENCY_0WS 0 #define FLASH_ACR_LATENCY_1WS 1 /* --- FLASH_SR values ----------------------------------------------------- */ #define FLASH_SR_EOP (1 << 5) #define FLASH_SR_WRPRTERR (1 << 4) #define FLASH_SR_PGERR (1 << 2) #define FLASH_SR_BSY (1 << 0) /* --- FLASH_CR values ----------------------------------------------------- */ #define FLASH_CR_OBL_LAUNCH (1 << 13) #define FLASH_CR_EOPIE (1 << 12) #define FLASH_CR_ERRIE (1 << 10) #define FLASH_CR_OPTWRE (1 << 9) #define FLASH_CR_LOCK (1 << 7) #define FLASH_CR_STRT (1 << 6) #define FLASH_CR_OPTER (1 << 5) #define FLASH_CR_OPTPG (1 << 4) #define FLASH_CR_MER (1 << 2) #define FLASH_CR_PER (1 << 1) #define FLASH_CR_PG (1 << 0) /* --- FLASH_OBR values ---------------------------------------------------- */ #define FLASH_OBR_DATA1_SHIFT 24 #define FLASH_OBR_DATA1 (0xFF << FLASH_OBR_DATA1_SHIFT) #define FLASH_OBR_DATA0_SHIFT 16 #define FLASH_OBR_DATA0 (0xFF << FLASH_OBR_DATA0_SHIFT) #define FLASH_OBR_RAM_PARITY_CHECK (1 << 14) #define FLASH_OBR_VDDA_MONITOR (1 << 13) #define FLASH_OBR_NBOOT1 (1 << 12) #define FLASH_OBR_NRST_STDBY (1 << 10) #define FLASH_OBR_NRST_STOP (1 << 9) #define FLASH_OBR_WDG_SW (1 << 8) #define FLASH_OBR_RDPRT_SHIFT 1 #define FLASH_OBR_RDPRT (3 << FLASH_OBR_RDPRT_SHIFT) #define FLASH_OBR_RDPRT_L0 (0 << FLASH_OBR_RDPRT_SHIFT) #define FLASH_OBR_RDPRT_L1 (1 << FLASH_OBR_RDPRT_SHIFT) #define FLASH_OBR_RDPRT_L2 (2 << FLASH_OBR_RDPRT_SHIFT) #define FLASH_OBR_OPTERR (1 << 0) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ #define FLASH_RDP_L0 ((uint8_t)0xaa) #define FLASH_RDP_L1 ((uint8_t)0xf0) /* any value */ #define FLASH_RDP_L2 ((uint8_t)0xcc) #define FLASH_KEYR_KEY1 ((uint32_t)0x45670123) #define FLASH_KEYR_KEY2 ((uint32_t)0xcdef89ab) /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS void flash_prefetch_buffer_enable(void); void flash_prefetch_buffer_disable(void); void flash_set_ws(uint32_t ws); void flash_wait_busy(void); void flash_program_u32(uint32_t address, uint32_t data); void flash_program_u16(uint32_t address, uint16_t data); void flash_erase_page(uint32_t page_address); void flash_erase_all_pages(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines * * @brief Defined Constants and Types for the STM32F0xx General Purpose I/O * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 1 July 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define GPIO_BRR(port) MMIO32(port + 0x24) #define GPIOA_BRR GPIO_BRR(GPIOA) #define GPIOB_BRR GPIO_BRR(GPIOB) #define GPIOC_BRR GPIO_BRR(GPIOC) #define GPIOD_BRR GPIO_BRR(GPIOD) #define GPIOF_BRR GPIO_BRR(GPIOF) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /** @defgroup gpio_speed GPIO Output Pin Speed @ingroup gpio_defines @{*/ #define GPIO_OSPEED_LOW 0x0 #define GPIO_OSPEED_MED 0x1 #define GPIO_OSPEED_HIGH 0x3 /**@}*/ /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines * * @brief Defined Constants and Types for the STM32F0xx I2C * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define I2C1 I2C1_BASE #define I2C2 I2C2_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define I2C_CR1(i2c_base) MMIO32(i2c_base + 0x00) #define I2C1_CR1 I2C_CR1(I2C1) #define I2C2_CR1 I2C_CR1(I2C2) #define I2C_CR2(i2c_base) MMIO32(i2c_base + 0x04) #define I2C1_CR2 I2C_CR2(I2C1) #define I2C2_CR2 I2C_CR2(I2C2) #define I2C_OAR1(i2c_base) MMIO32(i2c_base + 0x08) #define I2C1_OAR1 I2C_OAR1(I2C1) #define I2C2_OAR1 I2C_OAR1(I2C2) #define I2C_OAR2(i2c_base) MMIO32(i2c_base + 0x0c) #define I2C1_OAR2 I2C_OAR2(I2C1) #define I2C2_OAR2 I2C_OAR2(I2C2) #define I2C_TIMINGR(i2c_base) MMIO32(i2c_base + 0x10) #define I2C1_TIMINGR I2C_TIMINGR(I2C1) #define I2C2_TIMINGR I2C_TIMINGR(I2C2) #define I2C_TIMEOUTR(i2c_base) MMIO32(i2c_base + 0x14) #define I2C1_TIMEOUTR I2C_TIMEOUTR(I2C1) #define I2C2_TIMEOUTR I2C_TIMEOUTR(I2C2) #define I2C_ISR(i2c_base) MMIO32(i2c_base + 0x18) #define I2C1_ISR I2C_ISR(I2C1) #define I2C2_ISR I2C_ISR(I2C2) #define I2C_ICR(i2c_base) MMIO32(i2c_base + 0x1C) #define I2C1_ICR I2C_ICR(I2C1) #define I2C2_ICR I2C_ICR(I2C2) #define I2C_PECR(i2c_base) MMIO8(i2c_base + 0x20) #define I2C1_PECR I2C_PECR(I2C1) #define I2C2_PECR I2C_PECR(I2C2) #define I2C_RXDR(i2c_base) MMIO8(i2c_base + 0x24) #define I2C1_RXDR I2C_RXDR(I2C1) #define I2C2_RXDR I2C_RXDR(I2C2) #define I2C_TXDR(i2c_base) MMIO8(i2c_base + 0x28) #define I2C1_TXDR I2C_TXDR(I2C1) #define I2C2_TXDR I2C_TXDR(I2C2) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* I2C_CR1 values ---------------------------------------------------------- */ #define I2C_CR1_PECEN (1 << 23) #define I2C_CR1_ALERTEN (1 << 22) #define I2C_CR1_SMBDEN (1 << 21) #define I2C_CR1_SMBHEN (1 << 20) #define I2C_CR1_GCEN (1 << 19) #define I2C_CR1_WUPEN (1 << 18) #define I2C_CR1_NOSTRETCH (1 << 17) #define I2C_CR1_SBC (1 << 16) #define I2C_CR1_RXDMAEN (1 << 15) #define I2C_CR1_TXDMAEN (1 << 14) #define I2C_CR1_ANFOFF (1 << 12) #define I2C_CR1_DNF_SHIFT 8 #define I2C_CR1_DNF (0x0F << I2C_CR1_DNF_SHIFT) #define I2C_CR1_DNF_VAL(x) ((x) << I2C_CR1_DNF_SHIFT) #define I2C_CR1_ERRIE (1 << 7) #define I2C_CR1_TCIE (1 << 6) #define I2C_CR1_STOPIE (1 << 5) #define I2C_CR1_NACKIE (1 << 4) #define I2C_CR1_ADDRIE (1 << 3) #define I2C_CR1_RXIE (1 << 2) #define I2C_CR1_TXIE (1 << 1) #define I2C_CR1_PE (1 << 0) /* I2C_CR2 values ---------------------------------------------------------- */ #define I2C_CR2_PECBYTE (1 << 26) #define I2C_CR2_AUTOEND (1 << 25) #define I2C_CR2_RELOAD (1 << 24) #define I2C_CR2_NBYTES_SHIFT 16 #define I2C_CR2_NBYTES (0xFF << I2C_CR2_NBYTES_SHIFT) #define I2C_CR2_NBYTES_VAL(x) ((x) << I2C_CR2_NBYTES_SHIFT) #define I2C_CR2_NACK (1 << 15) #define I2C_CR2_STOP (1 << 14) #define I2C_CR2_START (1 << 13) #define I2C_CR2_HEAD10R (1 << 12) #define I2C_CR2_ADD10 (1 << 11) #define I2C_CR2_RD_WRN (1 << 10) #define I2C_CR2_SADD_SHIFT 0 #define I2C_CR2_SADD (0x3FF << I2C_CR2_SADD_SHIFT) #define I2C_CR2_SADD_VAL(x) ((x) << I2C_CR2_SADD_SHIFT) /* I2C_OAR1 values --------------------------------------------------------- */ #define I2C_OAR1_OA1EN (1 << 15) #define I2C_OAR1_OA1MODE (1 << 10) #define I2C_OAR1_OA1_SHIFT 0 #define I2C_OAR1_OA1 (0x3FF << I2C_OAR1_OA1_SHIFT) #define I2C_OAR1_OA1_VAL(x) ((x) << I2C_OAR1_OA1_SHIFT) /* I2C_OAR2 values --------------------------------------------------------- */ #define I2C_OAR2_OA1EN (1 << 15) #define I2C_OAR2_OA2MSK_SHIFT 8 #define I2C_OAR2_OA2MSK (7 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_NOMASK (0 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_1_BIT (1 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_2_BIT (2 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_3_BIT (3 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_4_BIT (4 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_5_BIT (5 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_6_BIT (6 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2MSK_ALL (7 << I2C_OAR2_OA2MSK_SHIFT) #define I2C_OAR2_OA2_SHIFT 1 #define I2C_OAR2_OA2 (0x7F << I2C_OAR2_OA2_SHIFT) #define I2C_OAR2_OA2_VAL(x) ((x) << I2C_OAR2_OA2_SHIFT) /* I2C_TIMINGR values ------------------------------------------------------ */ #define I2C_TIMINGR_PRESC_SHIFT 28 #define I2C_TIMINGR_PRESC (0x0F << I2C_TIMINGR_PRESC_SHIFT) #define I2C_TIMINGR_PRESC_VAL(x) ((x) << I2C_TIMINGR_PRESC_SHIFT) #define I2C_TIMINGR_SCLDEL_SHIFT 20 #define I2C_TIMINGR_SCLDEL (0x0F << I2C_TIMINGR_SCLDEL_SHIFT) #define I2C_TIMINGR_SCLDEL_VAL(x) ((x) << I2C_TIMINGR_SCLDEL_SHIFT) #define I2C_TIMINGR_SDADEL_SHIFT 16 #define I2C_TIMINGR_SDADEL (0x0F << I2C_TIMINGR_SDADEL_SHIFT) #define I2C_TIMINGR_SDADEL_VAL(x) ((x) << I2C_TIMINGR_SDADEL_SHIFT) #define I2C_TIMINGR_SCLH_SHIFT 8 #define I2C_TIMINGR_SCLH (0xFF << I2C_TIMINGR_SCLH_SHIFT) #define I2C_TIMINGR_SCLH_VAL(x) ((x) << I2C_TIMINGR_SCLH_SHIFT) #define I2C_TIMINGR_SCLL_SHIFT 0 #define I2C_TIMINGR_SCLL (0xFF << I2C_TIMINGR_SCLL_SHIFT) #define I2C_TIMINGR_SCLL_VAL(x) ((x) << I2C_TIMINGR_SCLL_SHIFT) /* I2C_TIMEOUTR values ----------------------------------------------------- */ #define I2C_TIMEOUTR_TETXEN (1 << 31) #define I2C_TIMEOUTR_TIMEOUTB_SHIFT 16 #define I2C_TIMEOUTR_TIMEOUTB (0xFFF << I2C_TIMEOUTR_TIMEOUTB_SHIFT) #define I2C_TIMEOUTR_TIMEOUTB_VAL(x) ((x) << I2C_TIMEOUTR_TIMEOUTB_SHIFT) #define I2C_TIMEOUTR_TIMOUTEN (1 << 15) #define I2C_TIMEOUTR_TIDLE (1 << 12) #define I2C_TIMEOUTR_TIMEOUTA_SHIFT 0 #define I2C_TIMEOUTR_TIMEOUTA (0xFFF << I2C_TIMEOUTR_TIMEOUTA_SHIFT) #define I2C_TIMEOUTR_TIMEOUTA_VAL(x) ((x) << I2C_TIMEOUTR_TIMEOUTA_SHIFT) /* I2C_ISR values ---------------------------------------------------------- */ #define I2C_ISR_ADDCODE_SHIFT 17 #define I2C_ISR_ADDCODE (0x7F << I2C_ISR_ADDCODE_SHIFT) #define I2C_ISR_ADDCODE_VAL(x) ((x) << I2C_ISR_ADDCODE_SHIFT) #define I2C_ISR_ADDCODE_VALG(reg) (((reg) & I2C_ISR_ADDCODE) >> \ I2C_ISR_ADDCODE_SHIFT) #define I2C_ISR_DIR (1 << 16) #define I2C_ISR_BUSY (1 << 15) #define I2C_ISR_ALERT (1 << 13) #define I2C_ISR_TIMEOUT (1 << 12) #define I2C_ISR_PECERR (1 << 11) #define I2C_ISR_OVR (1 << 10) #define I2C_ISR_ARLO (1 << 9) #define I2C_ISR_BERR (1 << 8) #define I2C_ISR_TCR (1 << 7) #define I2C_ISR_TC (1 << 6) #define I2C_ISR_STOPF (1 << 5) #define I2C_ISR_NACKF (1 << 4) #define I2C_ISR_ADDR (1 << 3) #define I2C_ISR_RXNE (1 << 2) #define I2C_ISR_TXIS (1 << 1) #define I2C_ISR_TXE (1 << 0) /* I2C_ICR values ---------------------------------------------------------- */ #define I2C_ICR_ALERTCF (1 << 13) #define I2C_ICR_TIMEOUTCF (1 << 12) #define I2C_ICR_PECCF (1 << 11) #define I2C_ICR_OVRCF (1 << 10) #define I2C_ICR_ARLOCF (1 << 9) #define I2C_ICR_BERRCF (1 << 8) #define I2C_ICR_STOPCF (1 << 5) #define I2C_ICR_NACKCF (1 << 4) #define I2C_ICR_ADDRCF (1 << 3) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_F0_NVIC_H partname_humanreadable: STM32 F0 series partname_doxygen: STM32F0 irqs: - wwdg - pvd - rtc - flash - rcc - exti0_1 - exti2_3 - exti4_15 - tsc - dma1_channel1 - dma1_channel2_3 - dma1_channel4_5 - adc_comp - tim1_brk_up_trg_com - tim1_cc - tim2 - tim3 - tim6_dac - reserved0 - tim14 - tim15 - tim16 - tim17 - i2c1 - i2c2 - spi1 - spi2 - usart1 - usart2 - reserved1 - cec - reserved2 ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines * * @brief Defined Constants and Types for the STM32F0xx Independent Watchdog * Timer * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ /* Key Register (IWDG_WINR) */ #define IWDG_WINR MMIO32(IWDG_BASE + 0x10) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* --- IWDG_SR values ------------------------------------------------------ */ /* WVU: Watchdog counter window value update */ #define IWDG_SR_WVU (1 << 2) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * .. based on file from F4. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32 specific peripheral definitions ------------------------------- */ /* Memory map for all buses */ #define FLASH_BASE ((uint32_t)0x08000000) #define PERIPH_BASE ((uint32_t)0x40000000) #define INFO_BASE ((uint32_t)0x1ffff000) #define PERIPH_BASE_APB (PERIPH_BASE + 0x00000000) #define PERIPH_BASE_AHB1 (PERIPH_BASE + 0x00020000) #define PERIPH_BASE_AHB2 (PERIPH_BASE + 0x08000000) /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB + 0x0400) #define TIM6_BASE (PERIPH_BASE_APB + 0x1000) #define TIM14_BASE (PERIPH_BASE_APB + 0x2000) /* PERIPH_BASE_APB1 + 0x2400 (0x4000 2400 - 0x4000 27FF): Reserved */ #define RTC_BASE (PERIPH_BASE_APB + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB + 0x3000) /* PERIPH_BASE_APB + 0x3400 (0x4000 3400 - 0x4000 37FF): Reserved */ #define SPI2_BASE (PERIPH_BASE_APB + 0x3800) /* PERIPH_BASE_APB + 0x4000 (0x4000 4000 - 0x4000 3FFF): Reserved */ #define USART2_BASE (PERIPH_BASE_APB + 0x4400) #define I2C1_BASE (PERIPH_BASE_APB + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB + 0x5800) #define POWER_CONTROL_BASE (PERIPH_BASE_APB + 0x7000) #define DAC_BASE (PERIPH_BASE_APB + 0x7400) #define CEC_BASE (PERIPH_BASE_APB + 0x7800) #define SYSCFG_COMP_BASE (PERIPH_BASE_APB + 0x10000) #define EXTI_BASE (PERIPH_BASE_APB + 0x10400) #define ADC_BASE (PERIPH_BASE_APB + 0x12400) #define TIM1_BASE (PERIPH_BASE_APB + 0x12C00) #define SPI1_I2S1_BASE (PERIPH_BASE_APB + 0x13000) #define USART1_BASE (PERIPH_BASE_APB + 0x13800) #define TIM15_BASE (PERIPH_BASE_APB + 0x14000) #define TIM16_BASE (PERIPH_BASE_APB + 0x14400) #define TIM17_BASE (PERIPH_BASE_APB + 0x14800) #define DBGMCU_BASE (PERIPH_BASE_APB + 0x15800) /* AHB1 */ #define DMA_BASE (PERIPH_BASE_AHB1 + 0x0000) #define RCC_BASE (PERIPH_BASE_AHB1 + 0x1000) #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB1 + 0x2000) #define CRC_BASE (PERIPH_BASE_AHB1 + 0x3000) #define TSC_BASE (PERIPH_BASE_AHB1 + 0x4000) /* AHB2 */ #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB2 + 0x0000) #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB2 + 0x0400) #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB2 + 0x0800) #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB2 + 0x0C00) #define GPIO_PORT_F_BASE (PERIPH_BASE_AHB2 + 0x1400) /* Device Electronic Signature */ /* ??? #define DESIG_FLASH_SIZE_BASE (INFO_BASE + 0x7e0) #define DESIG_UNIQUE_ID_BASE (INFO_BASE + 0x7e8) */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines * * @brief Defined Constants and Types for the STM32F0xx PWR Control * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 5 December 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_H #define LIBOPENCM3_PWR_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* EWUP: Enable WKUP2 pin */ #define PWR_CSR_EWUP2 (1 << 9) /* EWUP: Enable WKUP1 pin */ #define PWR_CSR_EWUP1 (1 << 8) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/rcc.h ================================================ /** @defgroup rcc_defines RCC Defines * * @brief libopencm3 STM32F0xx Reset and Clock Control * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 29 Jun 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_CFGR MMIO32(RCC_BASE + 0x04) #define RCC_CIR MMIO32(RCC_BASE + 0x08) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x0c) #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x10) #define RCC_AHBENR MMIO32(RCC_BASE + 0x14) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x18) #define RCC_APB1ENR MMIO32(RCC_BASE + 0x1c) #define RCC_BDCR MMIO32(RCC_BASE + 0x20) #define RCC_CSR MMIO32(RCC_BASE + 0x24) #define RCC_AHBRSTR MMIO32(RCC_BASE + 0x28) #define RCC_CFGR2 MMIO32(RCC_BASE + 0x2c) #define RCC_CFGR3 MMIO32(RCC_BASE + 0x30) #define RCC_CR2 MMIO32(RCC_BASE + 0x32) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* --- RCC_CR values ------------------------------------------------------- */ #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_CSSON (1 << 19) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) #define RCC_CR_HSICAL_SHIFT 8 #define RCC_CR_HSICAL (0xFF << RCC_CR_HSICAL_SHIFT) #define RCC_CR_HSITRIM_SHIFT 3 #define RCC_CR_HSITRIM (0x1F << RCC_CR_HSITRIM_SHIFT) #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) /* --- RCC_CFGR values ----------------------------------------------------- */ #define RCC_CFGR_PLLNODIV (1 << 31) #define RCC_CFGR_MCOPRE_SHIFT 28 #define RCC_CFGR_MCOPRE (7 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV1 (0 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV2 (1 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV4 (2 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV8 (3 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV16 (4 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV32 (5 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV64 (6 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCOPRE_DIV128 (7 << RCC_CFGR_MCOPRE_SHIFT) #define RCC_CFGR_MCO_SHIFT 24 #define RCC_CFGR_MCO (7 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_NOCLK (0 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_HSI14 (1 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_LSI (2 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_LSE (3 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_SYSCLK (4 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_HSI (5 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_HSE (6 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_PLL (7 << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_PLLMUL_SHIFT 18 #define RCC_CFGR_PLLMUL (0x0F << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL2 (0x00 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL3 (0x01 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL4 (0x02 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL5 (0x03 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL6 (0x04 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL7 (0x05 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL8 (0x06 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL9 (0x06 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL10 (0x07 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL11 (0x08 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL12 (0x09 << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL13 (0x0A << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL14 (0x0B << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL15 (0x0C << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLMUL_MUL16 (0x0D << RCC_CFGR_PLLMUL_SHIFT) #define RCC_CFGR_PLLXTPRE (1<<17) #define RCC_CFGR_PLLSRC (1<<16) #define RCC_CFGR_ADCPRE (1<<14) #define RCC_CFGR_PPRE_SHIFT 8 #define RCC_CFGR_PPRE (7 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_PPRE_NODIV (0 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_PPRE_DIV2 (4 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_PPRE_DIV4 (5 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_PPRE_DIV8 (6 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_PPRE_DIV16 (7 << RCC_CFGR_PPRE_SHIFT) #define RCC_CFGR_HPRE_SHIFT 4 #define RCC_CFGR_HPRE (0xf << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_NODIV (0x0 << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV2 (0x8 << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV4 (0x9 << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV8 (0xa << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV16 (0xb << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV64 (0xc << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV128 (0xd << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV256 (0xe << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_HPRE_DIV512 (0xf << RCC_CFGR_HPRE_SHIFT) #define RCC_CFGR_SWS_SHIFT 2 #define RCC_CFGR_SWS (3 << RCC_CFGR_SWS_SHIFT) #define RCC_CFGR_SWS_HSI (0 << RCC_CFGR_SWS_SHIFT) #define RCC_CFGR_SWS_HSE (1 << RCC_CFGR_SWS_SHIFT) #define RCC_CFGR_SWS_PLL (2 << RCC_CFGR_SWS_SHIFT) #define RCC_CFGR_SW_SHIFT 0 #define RCC_CFGR_SW (3 << RCC_CFGR_SW_SHIFT) #define RCC_CFGR_SW_HSI (0 << RCC_CFGR_SW_SHIFT) #define RCC_CFGR_SW_HSE (1 << RCC_CFGR_SW_SHIFT) #define RCC_CFGR_SW_PLL (2 << RCC_CFGR_SW_SHIFT) /* --- RCC_CIR values ------------------------------------------------------ */ #define RCC_CIR_CSSC (1 << 23) #define RCC_CIR_HSI14RDYC (1 << 21) #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) #define RCC_CIR_HSI14RDYIE (1 << 13) #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) #define RCC_CIR_CSSF (1 << 7) #define RCC_CIR_HSI14RDYF (1 << 5) #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ #define RCC_APB2RSTR_DBGMCURST (1 << 22) #define RCC_APB2RSTR_TIM17RST (1 << 18) #define RCC_APB2RSTR_TIM16RST (1 << 17) #define RCC_APB2RSTR_TIM15RST (1 << 16) #define RCC_APB2RSTR_USART1RST (1 << 14) #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_TIM1RST (1 << 11) #define RCC_APB2RSTR_ADCRST (1 << 9) #define RCC_APB2RSTR_SYSCFGRST (1 << 0) /* --- RCC_APB1RSTR values ------------------------------------------------- */ #define RCC_APB1RSTR_CECRST (1 << 30) #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_TIM14RST (1 << 8) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /* --- RCC_AHBENR values --------------------------------------------------- */ #define RCC_AHBENR_TSCEN (1 << 24) #define RCC_AHBENR_GPIOFEN (1 << 22) #define RCC_AHBENR_GPIODEN (1 << 20) #define RCC_AHBENR_GPIOCEN (1 << 19) #define RCC_AHBENR_GPIOBEN (1 << 18) #define RCC_AHBENR_GPIOAEN (1 << 17) #define RCC_AHBENR_CRCEN (1 << 6) #define RCC_AHBENR_FLTFEN (1 << 4) #define RCC_AHBENR_SRAMEN (1 << 2) #define RCC_AHBENR_DMAEN (1 << 0) /* --- RCC_APB2ENR values -------------------------------------------------- */ #define RCC_APB2ENR_DBGMCUEN (1 << 22) #define RCC_APB2ENR_TIM17EN (1 << 18) #define RCC_APB2ENR_TIM16EN (1 << 17) #define RCC_APB2ENR_TIM15EN (1 << 16) #define RCC_APB2ENR_USART1EN (1 << 14) #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_TIM1EN (1 << 11) #define RCC_APB2ENR_ADCEN (1 << 9) #define RCC_APB2ENR_SYSCFGCOMPEN (1 << 0) /* --- RCC_APB1ENR values -------------------------------------------------- */ #define RCC_APB1ENR_CECEN (1 << 30) #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_TIM14EN (1 << 8) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /* --- RCC_BDCR values ----------------------------------------------------- */ #define RCC_BDCR_BDRST (1 << 16) #define RCC_BDCR_RTCEN (1 << 15) #define RCC_BDCR_RTCSEL_SHIFT 8 #define RCC_BDCR_RTCSEL (3 << RCC_BDCR_RTCSEL_SHIFT) #define RCC_BDCR_RTCSEL_NOCLK (0 << RCC_BDCR_RTCSEL_SHIFT) #define RCC_BDCR_RTCSEL_LSE (1 << RCC_BDCR_RTCSEL_SHIFT) #define RCC_BDCR_RTCSEL_LSI (2 << RCC_BDCR_RTCSEL_SHIFT) #define RCC_BDCR_RTCSEL_HSE (3 << RCC_BDCR_RTCSEL_SHIFT) #define RCC_BDCR_LSEDRV_SHIFT 3 #define RCC_BDCR_LSEDRV (3 << RCC_BDCR_LSEDRV_SHIFT) #define RCC_BDCR_LSEDRV_LOW (0 << RCC_BDCR_LSEDRV_SHIFT) #define RCC_BDCR_LSEDRV_MEDLO (1 << RCC_BDCR_LSEDRV_SHIFT) #define RCC_BDCR_LSEDRV_MEDHI (2 << RCC_BDCR_LSEDRV_SHIFT) #define RCC_BDCR_LSEDRV_HIGH (3 << RCC_BDCR_LSEDRV_SHIFT) #define RCC_BDCR_LSEBYP (1 << 2) #define RCC_BDCR_LSERDY (1 << 1) #define RCC_BDCR_LSEON (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_OBLRSTF (1 << 25) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_V18PWRRSTF (1 << 23) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) /* --- RCC_AHBRSTR values -------------------------------------------------- */ #define RCC_AHBRSTR_TSCRST (1 << 24) #define RCC_AHBRSTR_IOPFRST (1 << 22) #define RCC_AHBRSTR_IOPDRST (1 << 20) #define RCC_AHBRSTR_IOPCRST (1 << 19) #define RCC_AHBRSTR_IOPBRST (1 << 18) #define RCC_AHBRSTR_IOPARST (1 << 17) /* --- RCC_CFGR2 values ---------------------------------------------------- */ #define RCC_CFGR2_PREDIV 0xf #define RCC_CFGR2_PREDIV_NODIV 0x0 #define RCC_CFGR2_PREDIV_DIV2 0x1 #define RCC_CFGR2_PREDIV_DIV3 0x2 #define RCC_CFGR2_PREDIV_DIV4 0x3 #define RCC_CFGR2_PREDIV_DIV5 0x4 #define RCC_CFGR2_PREDIV_DIV6 0x5 #define RCC_CFGR2_PREDIV_DIV7 0x6 #define RCC_CFGR2_PREDIV_DIV8 0x7 #define RCC_CFGR2_PREDIV_DIV9 0x8 #define RCC_CFGR2_PREDIV_DIV10 0x9 #define RCC_CFGR2_PREDIV_DIV11 0xa #define RCC_CFGR2_PREDIV_DIV12 0xb #define RCC_CFGR2_PREDIV_DIV13 0xc #define RCC_CFGR2_PREDIV_DIV14 0xd #define RCC_CFGR2_PREDIV_DIV15 0xe #define RCC_CFGR2_PREDIV_DIV16 0xf /* --- RCC_CFGR3 values ---------------------------------------------------- */ #define RCC_CFGR3_ADCSW (1 << 8) #define RCC_CFGR3_CECSW (1 << 6) #define RCC_CFGR3_I2C1SW (1 << 4) #define RCC_CFGR3_USART1SW_SHIFT 0 #define RCC_CFGR3_USART1SW (3 << RCC_CFGR3_USART1SW_SHIFT) #define RCC_CFGR3_USART1SW_PCLK (0 << RCC_CFGR3_USART1SW_SHIFT) #define RCC_CFGR3_USART1SW_SYSCLK (1 << RCC_CFGR3_USART1SW_SHIFT) #define RCC_CFGR3_USART1SW_LSE (2 << RCC_CFGR3_USART1SW_SHIFT) #define RCC_CFGR3_USART1SW_HSI (3 << RCC_CFGR3_USART1SW_SHIFT) /* --- RCC_CFGR3 values ---------------------------------------------------- */ #define RCC_CR2_HSI14CAL_SHIFT 8 #define RCC_CR2_HSI14CAL (0xFF << RCC_CR2_HSI14CAL_SHIFT) #define RCC_CR2_HSI14TRIM_SHIFT 3 #define RCC_CR2_HSI14TRIM (31 << RCC_CR2_HSI14TRIM_SHIFT) #define RCC_CR2_HSI14DIS (1 << 2) #define RCC_CR2_HSI14RDY (1 << 1) #define RCC_CR2_HSI14ON (1 << 0) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_core_frequency; extern uint32_t rcc_ppre_frequency; enum rcc_osc { HSI14, HSI, HSE, PLL, LSI, LSE }; #define _REG_BIT(base, bit) (((base) << 5) + (bit)) enum rcc_periph_clken { /* AHB peripherals */ RCC_DMA = _REG_BIT(0x14, 0), RCC_SRAM = _REG_BIT(0x14, 2), RCC_FLTIF = _REG_BIT(0x14, 4), RCC_CRC = _REG_BIT(0x14, 6), RCC_GPIOA = _REG_BIT(0x14, 17), RCC_GPIOB = _REG_BIT(0x14, 18), RCC_GPIOC = _REG_BIT(0x14, 19), RCC_GPIOD = _REG_BIT(0x14, 20), RCC_GPIOF = _REG_BIT(0x14, 22), RCC_TSC = _REG_BIT(0x14, 24), /* APB2 peripherals */ RCC_SYSCFG_COMP = _REG_BIT(0x18, 0), RCC_ADC = _REG_BIT(0x18, 9), RCC_TIM1 = _REG_BIT(0x18, 11), RCC_SPI1 = _REG_BIT(0x18, 12), RCC_USART1 = _REG_BIT(0x18, 14), RCC_TIM15 = _REG_BIT(0x18, 16), RCC_TIM16 = _REG_BIT(0x18, 17), RCC_TIM17 = _REG_BIT(0x18, 18), RCC_DBGMCU = _REG_BIT(0x18, 22), /* APB1 peripherals */ RCC_TIM2 = _REG_BIT(0x1C, 0), RCC_TIM3 = _REG_BIT(0x1C, 1), RCC_TIM6 = _REG_BIT(0x1C, 4), RCC_TIM14 = _REG_BIT(0x1C, 8), RCC_WWDG = _REG_BIT(0x1C, 11), RCC_SPI2 = _REG_BIT(0x1C, 14), RCC_USART2 = _REG_BIT(0x1C, 17), RCC_I2C1 = _REG_BIT(0x1C, 21), RCC_I2C2 = _REG_BIT(0x1C, 22), RCC_PWR = _REG_BIT(0x1C, 28), RCC_DAC = _REG_BIT(0x1C, 29), RCC_CEC = _REG_BIT(0x1C, 30), /* Advanced peripherals */ RCC_RTC = _REG_BIT(0x20, 15),/* BDCR[15] */ }; enum rcc_periph_rst { /* APB2 peripherals */ RST_SYSCFG = _REG_BIT(0x0C, 0), RST_ADC = _REG_BIT(0x0C, 9), RST_TIM1 = _REG_BIT(0x0C, 11), RST_SPI1 = _REG_BIT(0x0C, 12), RST_USART1 = _REG_BIT(0x0C, 14), RST_TIM15 = _REG_BIT(0x0C, 16), RST_TIM16 = _REG_BIT(0x0C, 17), RST_TIM17 = _REG_BIT(0x0C, 18), RST_DBGMCU = _REG_BIT(0x0C, 22), /* APB1 peripherals */ RST_TIM2 = _REG_BIT(0x10, 0), RST_TIM3 = _REG_BIT(0x10, 1), RST_TIM6 = _REG_BIT(0x10, 4), RST_TIM14 = _REG_BIT(0x10, 8), RST_WWDG = _REG_BIT(0x10, 11), RST_SPI2 = _REG_BIT(0x10, 14), RST_USART2 = _REG_BIT(0x10, 17), RST_I2C1 = _REG_BIT(0x10, 21), RST_I2C2 = _REG_BIT(0x10, 22), RST_PWR = _REG_BIT(0x10, 28), RST_DAC = _REG_BIT(0x10, 29), RST_CEC = _REG_BIT(0x10, 30), /* Advanced peripherals */ RST_BACKUPDOMAIN = _REG_BIT(0x20, 16),/* BDCR[16] */ /* AHB peripherals */ RST_GPIOA = _REG_BIT(0x28, 17), RST_GPIOB = _REG_BIT(0x28, 18), RST_GPIOC = _REG_BIT(0x28, 19), RST_GPIOD = _REG_BIT(0x28, 20), RST_GPIOF = _REG_BIT(0x28, 22), RST_TSC = _REG_BIT(0x28, 24), }; #undef _REG_BIT /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS void rcc_osc_ready_int_clear(enum rcc_osc osc); void rcc_osc_ready_int_enable(enum rcc_osc osc); void rcc_osc_ready_int_disable(enum rcc_osc osc); int rcc_osc_ready_int_flag(enum rcc_osc osc); void rcc_wait_for_osc_ready(enum rcc_osc osc); void rcc_osc_on(enum rcc_osc osc); void rcc_osc_off(enum rcc_osc osc); void rcc_osc_bypass_enable(enum rcc_osc osc); void rcc_osc_bypass_disable(enum rcc_osc osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_set_sysclk_source(enum rcc_osc clk); void rcc_set_pll_multiplication_factor(uint32_t mul); void rcc_set_ppre(uint32_t ppre); void rcc_set_hpre(uint32_t hpre); void rcc_set_prediv(uint32_t prediv); void rcc_set_mco(uint32_t mcosrc); enum rcc_osc rcc_system_clock_source(void); void rcc_clock_setup_in_hsi_out_8mhz(void); void rcc_clock_setup_in_hsi_out_16mhz(void); void rcc_clock_setup_in_hsi_out_24mhz(void); void rcc_clock_setup_in_hsi_out_32mhz(void); void rcc_clock_setup_in_hsi_out_40mhz(void); void rcc_clock_setup_in_hsi_out_48mhz(void); void rcc_periph_clock_enable(enum rcc_periph_clken periph); void rcc_periph_clock_disable(enum rcc_periph_clken periph); void rcc_periph_reset_pulse(enum rcc_periph_rst periph); void rcc_periph_reset_hold(enum rcc_periph_rst periph); void rcc_periph_reset_release(enum rcc_periph_rst periph); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines * * @brief Defined Constants and Types for the STM32F0xx RTC * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 5 December 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RTC_H #define LIBOPENCM3_RTC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/spi.h ================================================ /** @defgroup spi_defines SPI Defines * * @brief Defined Constants and Types for the STM32F0xx SPI * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define SPI1_BASE SPI1_I2S1_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* DFF: Data frame format */ /** @defgroup spi_dff SPI data frame format * @ingroup spi_defines * * @{*/ #define SPI_CR1_CRCL_8BIT (0 << 11) #define SPI_CR1_CRCL_16BIT (1 << 11) /**@}*/ #define SPI_CR1_CRCL (1 << 11) /* --- SPI_CR2 values ------------------------------------------------------ */ /* LDMA_TX: Last DMA transfer for transmission */ #define SPI_CR2_LDMA_TX (1 << 14) /* LDMA_RX: Last DMA transfer for reception */ #define SPI_CR2_LDMA_RX (1 << 13) /* FRXTH: FIFO reception threshold */ #define SPI_CR2_FRXTH (1 << 12) /* DS [3:0]: Data size */ /* 0x0 - 0x2 NOT USED */ #define SPI_CR2_DS_4BIT (0x3 << 8) #define SPI_CR2_DS_5BIT (0x4 << 8) #define SPI_CR2_DS_6BIT (0x5 << 8) #define SPI_CR2_DS_7BIT (0x6 << 8) #define SPI_CR2_DS_8BIT (0x7 << 8) #define SPI_CR2_DS_9BIT (0x8 << 8) #define SPI_CR2_DS_10BIT (0x9 << 8) #define SPI_CR2_DS_11BIT (0xA << 8) #define SPI_CR2_DS_12BIT (0xB << 8) #define SPI_CR2_DS_13BIT (0xC << 8) #define SPI_CR2_DS_14BIT (0xD << 8) #define SPI_CR2_DS_15BIT (0xE << 8) #define SPI_CR2_DS_16BIT (0xF << 8) #define SPI_CR2_DS_MASK (0xF << 8) /* NSSP: NSS pulse management */ #define SPI_CR2_NSSP (1 << 3) /* --- SPI_SR values ------------------------------------------------------- */ /* FTLVL[1:0]: FIFO Transmission Level */ #define SPI_SR_FTLVL_FIFO_EMPTY (0x0 << 11) #define SPI_SR_FTLVL_QUARTER_FIFO (0x1 << 11) #define SPI_SR_FTLVL_HALF_FIFO (0x2 << 11) #define SPI_SR_FTLVL_FIFO_FULL (0x3 << 11) /* FRLVL[1:0]: FIFO Reception Level */ #define SPI_SR_FRLVL_FIFO_EMPTY (0x0 << 9) #define SPI_SR_FRLVL_QUARTER_FIFO (0x1 << 9) #define SPI_SR_FRLVL_HALF_FIFO (0x2 << 9) #define SPI_SR_FRLVL_FIFO_FULL (0x3 << 9) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS void spi_set_data_size(uint32_t spi, uint16_t data_s); void spi_fifo_reception_threshold_8bit(uint32_t spi); void spi_fifo_reception_threshold_16bit(uint32_t spi); void spi_i2s_mode_spi_mode(uint32_t spi); void spi_send8(uint32_t spi, uint8_t data); uint8_t spi_read8(uint32_t spi); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/syscfg.h ================================================ /** @defgroup syscfg_defines SYSCFG Defines * * @brief Defined Constants and Types for the STM32F0xx System Config * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SYSCFG_H #define LIBOPENCM3_SYSCFG_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define SYSCFG_CFGR1 MMIO32(SYSCFG_COMP_BASE + 0x00) #define SYSCFG_EXTICR(i) MMIO32(SYSCFG_COMP_BASE + 0x08 + (i)*4) #define SYSCFG_EXTICR1 SYSCFG_EXTICR(0) #define SYSCFG_EXTICR2 SYSCFG_EXTICR(1) #define SYSCFG_EXTICR3 SYSCFG_EXTICR(2) #define SYSCFG_EXTICR4 SYSCFG_EXTICR(3) #define SYSCFG_CFGR2 MMIO32(SYSCFG_COMP_BASE + 0x18) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* SYSCFG_CFGR1 Values -- ---------------------------------------------------*/ #define SYSCFG_CFGR1_MEM_MODE_SHIFT 0 #define SYSCFG_CFGR1_MEM_MODE (3 << SYSCFG_CFGR1_MEM_MODE_SHIFT) #define SYSCFG_CFGR1_MEM_MODE_FLASH (0 << SYSCFG_CFGR1_MEM_MODE_SHIFT) #define SYSCFG_CFGR1_MEM_MODE_SYSTEM (1 << SYSCFG_CFGR1_MEM_MODE_SHIFT) #define SYSCFG_CFGR1_MEM_MODE_SRAM (3 << SYSCFG_CFGR1_MEM_MODE_SHIFT) #define SYSCFG_CFGR1_ADC_DMA_RMP (1 << 8) #define SYSCFG_CFGR1_USART1_TX_DMA_RMP (1 << 9) #define SYSCFG_CFGR1_USART1_RX_DMA_RMP (1 << 10) #define SYSCFG_CFGR1_TIM16_DMA_RMP (1 << 11) #define SYSCFG_CFGR1_TIM17_DMA_RMP (1 << 12) #define SYSCFG_CFGR1_I2C_PB6_FMPLUS (1 << 16) #define SYSCFG_CFGR1_I2C_PB7_FMPLUS (1 << 17) #define SYSCFG_CFGR1_I2C_PB8_FMPLUS (1 << 18) #define SYSCFG_CFGR1_I2C_PB9_FMPLUS (1 << 19) #define SYSCFG_CFGR1_I2C1_FMPLUS (1 << 20) #define SYSCFG_CFGR1_I2C_PA9_FMPLUS (1 << 22) #define SYSCFG_CFGR1_I2C_PA10_FMPLUS (1 << 23) /* SYSCFG_EXTICR Values -- --------------------------------------------------*/ #define SYSCFG_EXTICR_SKIP 4 #define SYSCFG_EXTICR_GPIOA 0 #define SYSCFG_EXTICR_GPIOB 1 #define SYSCFG_EXTICR_GPIOC 2 #define SYSCFG_EXTICR_GPIOD 3 #define SYSCFG_EXTICR_GPIOF 5 /* SYSCFG_CFGR2 Values -- ---------------------------------------------------*/ #define SYSCFG_CFGR2_LOCKUP_LOCK (1 << 0) #define SYSCFG_CFGR2_SRAM_PARITY_LOCK (1 << 1) #define SYSCFG_CFGR2_PVD_LOCK (1 << 2) #define SYSCFG_CFGR2_SRAM_PEF (1 << 8) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/timer.h ================================================ /** @defgroup timer_defines Timers Defines * * @brief Defined Constants and Types for the STM32F0xx Timers * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/tsc.h ================================================ /** @defgroup tsc_defines TSC Defines * * @brief Defined Constants and Types for the STM32F0xx Touch Sensor * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TSC_H #define LIBOPENCM3_TSC_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define TSC TSC_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define TSC_CR MMIO32(TSC_BASE + 0x00) #define TSC_IER MMIO32(TSC_BASE + 0x04) #define TSC_ICR MMIO32(TSC_BASE + 0x08) #define TSC_ISR MMIO32(TSC_BASE + 0x0c) #define TSC_IOHCR MMIO32(TSC_BASE + 0x10) #define TSC_IOASCR MMIO32(TSC_BASE + 0x18) #define TSC_IOSCR MMIO32(TSC_BASE + 0x20) #define TSC_IOCCR MMIO32(TSC_BASE + 0x28) #define TSC_IOGCSR MMIO32(TSC_BASE + 0x30) #define TSC_IOGxCR(x) MMIO8(TSC_BASE + 0x34 + (x)*4) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* TSC_CR Values ------------------------------------------------------------*/ #define TSC_CR_CTPH_SHIFT 28 #define TSC_CR_CTPH (0xF << TSC_CR_CTPH_SHIFT) #define TSC_CR_CTPL_SHIFT 24 #define TSC_CR_CTPL (0x0F << TSC_CR_CTPL_SHIFT) #define TSC_CR_SSD_SHIFT 17 #define TSC_CR_SSD (0x7F << TSC_CR_SSD_SHIFT) #define TSC_CR_SSE (1 << 16) #define TSC_CR_SSPSC (1 << 15) #define TSC_CR_PGPSC_SHIFT 12 #define TSC_CR_PGPSC (7 << TSC_CR_PGPSC_SHIFT) #define TSC_CR_MCV_SHIFT 5 #define TSC_CR_MCV (7 << TSC_CR_MCV_SHIFT) #define TSC_CR_IODEF (1 << 4) #define TSC_CR_SYNCPOL (1 << 3) #define TSC_CR_AM (1 << 2) #define TSC_CR_START (1 << 1) #define TSC_CR_TSCE (1 << 0) /* TSC_IER Values -----------------------------------------------------------*/ #define TSC_IER_MCEIE (1 << 1) #define TSC_IER_EOAIE (1 << 0) /* TSC_ICR Values -----------------------------------------------------------*/ #define TSC_ICR_MCEIC (1 << 1) #define TSC_ICR_EOAIC (1 << 0) /* TSC_ISR Values -----------------------------------------------------------*/ #define TSC_ISR_MCEF (1 << 1) #define TSC_ISR_EOAF (1 << 0) /* TSC_IOHCR Values ---------------------------------------------------------*/ /* Bit helper g = [1..6] io = [1..4] */ #define TSC_IOBIT_VAL(g, io) ((1 << ((io)-1)) << (((g)-1)*4)) #define TSC_IOHCR_G1(io) TSC_IOBIT_VAL(1, io) #define TSC_IOHCR_G2(io) TSC_IOBIT_VAL(2, io) #define TSC_IOHCR_G3(io) TSC_IOBIT_VAL(3, io) #define TSC_IOHCR_G4(io) TSC_IOBIT_VAL(4, io) #define TSC_IOHCR_G5(io) TSC_IOBIT_VAL(5, io) #define TSC_IOHCR_G6(io) TSC_IOBIT_VAL(6, io) /* TSC_IOASCR Values --------------------------------------------------------*/ #define TSC_IOASCR_G1(io) TSC_IOBIT_VAL(1, io) #define TSC_IOASCR_G2(io) TSC_IOBIT_VAL(2, io) #define TSC_IOASCR_G3(io) TSC_IOBIT_VAL(3, io) #define TSC_IOASCR_G4(io) TSC_IOBIT_VAL(4, io) #define TSC_IOASCR_G5(io) TSC_IOBIT_VAL(5, io) #define TSC_IOASCR_G6(io) TSC_IOBIT_VAL(6, io) /* TSC_IOSCR Values ---------------------------------------------------------*/ #define TSC_IOSCR_G1(io) TSC_IOBIT_VAL(1, io) #define TSC_IOSCR_G2(io) TSC_IOBIT_VAL(2, io) #define TSC_IOSCR_G3(io) TSC_IOBIT_VAL(3, io) #define TSC_IOSCR_G4(io) TSC_IOBIT_VAL(4, io) #define TSC_IOSCR_G5(io) TSC_IOBIT_VAL(5, io) #define TSC_IOSCR_G6(io) TSC_IOBIT_VAL(6, io) /* TSC_IOCCR Values ---------------------------------------------------------*/ #define TSC_IOCCR_G1(io) TSC_IOBIT_VAL(1, io) #define TSC_IOCCR_G2(io) TSC_IOBIT_VAL(2, io) #define TSC_IOCCR_G3(io) TSC_IOBIT_VAL(3, io) #define TSC_IOCCR_G4(io) TSC_IOBIT_VAL(4, io) #define TSC_IOCCR_G5(io) TSC_IOBIT_VAL(5, io) #define TSC_IOCCR_G6(io) TSC_IOBIT_VAL(6, io) /* TSC_IOGCSR Values --------------------------------------------------------*/ #define TSC_IOGCSR_GxE(x) (1 << ((x)-1)) #define TSC_IOGCSR_GxS(x) (1 << ((x)+15)) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f0/usart.h ================================================ /** @defgroup usart_defines USART Defines * * @brief Defined Constants and Types for the STM32F0xx USART * * @ingroup STM32F0xx_defines * * @version 1.0.0 * * @date 2 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include /*****************************************************************************/ /* Module definitions */ /*****************************************************************************/ #define USART1 USART1_BASE #define USART2 USART2_BASE /*****************************************************************************/ /* Register definitions */ /*****************************************************************************/ #define USART_CR1(usart_base) MMIO32(usart_base + 0x00) #define USART1_CR1 USART_CR1(USART1_BASE) #define USART2_CR1 USART_CR1(USART2_BASE) #define USART_CR2(usart_base) MMIO32(usart_base + 0x04) #define USART1_CR2 USART_CR2(USART1_BASE) #define USART2_CR2 USART_CR2(USART2_BASE) #define USART_CR3(usart_base) MMIO32(usart_base + 0x08) #define USART1_CR3 USART_CR3(USART1_BASE) #define USART2_CR3 USART_CR3(USART2_BASE) #define USART_BRR(usart_base) MMIO32(usart_base + 0x0c) #define USART1_BRR USART_BRR(USART1_BASE) #define USART2_BRR USART_BRR(USART2_BASE) #define USART_GTPR(usart_base) MMIO32(usart_base + 0x10) #define USART1_GTPR USART_GTPR(USART1_BASE) #define USART2_GTPR USART_GTPR(USART2_BASE) #define USART_RTOR(usart_base) MMIO32(usart_base + 0x14) #define USART1_RTOR USART_RTOR(USART1_BASE) #define USART2_RTOR USART_RTOR(USART2_BASE) #define USART_RQR(usart_base) MMIO32(usart_base + 0x18) #define USART1_RQR USART_RQR(USART1_BASE) #define USART2_RQR USART_RQR(USART2_BASE) #define USART_ISR(usart_base) MMIO32(usart_base + 0x1c) #define USART1_ISR USART_ISR(USART1_BASE) #define USART2_ISR USART_ISR(USART2_BASE) #define USART_ICR(usart_base) MMIO32(usart_base + 0x20) #define USART1_ICR USART_ICR(USART1_BASE) #define USART2_ICR USART_ICR(USART2_BASE) #define USART_RDR(usart_base) MMIO8(usart_base + 0x24) #define USART1_RDR USART_RDR(USART1_BASE) #define USART2_RDR USART_RDR(USART2_BASE) #define USART_TDR(usart_base) MMIO8(usart_base + 0x28) #define USART1_TDR USART_TDR(USART1_BASE) #define USART2_TDR USART_TDR(USART2_BASE) /*****************************************************************************/ /* Register values */ /*****************************************************************************/ /* USART_CR1 Values ---------------------------------------------------------*/ #define USART_CR1_EOBIE (1 << 27) #define USART_CR1_RTOIE (1 << 26) #define USART_CR1_DEAT_SHIFT 21 #define USART_CR1_DEAT (0x1F << USART_CR1_DEAT_SHIFT) #define USART_CR1_DEAT_VAL(x) ((x) << USART_CR1_DEAT_SHIFT) #define USART_CR1_DEDT_SHIFT 16 #define USART_CR1_DEDT (0x1F << USART_CR1_DEDT_SHIFT) #define USART_CR1_DEDT_VAL(x) ((x) << USART_CR1_DEDT_SHIFT) #define USART_CR1_OVER8 (1 << 15) #define USART_CR1_CMIE (1 << 14) #define USART_CR1_MME (1 << 13) #define USART_CR1_M (1 << 12) #define USART_CR1_WAKE (1 << 11) #define USART_CR1_PCE (1 << 10) #define USART_CR1_PS (1 << 9) #define USART_CR1_PEIE (1 << 8) #define USART_CR1_TXEIE (1 << 7) #define USART_CR1_TCIE (1 << 6) #define USART_CR1_RXNEIE (1 << 5) #define USART_CR1_IDLEIE (1 << 4) #define USART_CR1_TE (1 << 3) #define USART_CR1_RE (1 << 2) #define USART_CR1_UESM (1 << 1) #define USART_CR1_UE (1 << 0) /* USART_CR2 Values ---------------------------------------------------------*/ #define USART_CR2_ADD_SHIFT 24 #define USART_CR2_ADD (0xFF << USART_CR2_ADD_SHIFT) #define USART_CR2_ADD_VAL(x) ((x) << USART_CR2_ADD_SHIFT) #define USART_CR2_RTOEN (1 << 23) #define USART_CR2_ABRMOD_SHIFT 21 #define USART_CR2_ABRMOD (3 << USART_CR2_ABRMOD_SHIFT) #define USART_CR2_ABRMOD_STARTBIT (0 << USART_CR2_ABRMOD_SHIFT) #define USART_CR2_ABRMOD_FALLTOFALL (1 << USART_CR2_ABRMOD_SHIFT) #define USART_CR2_ABREN (1 << 20) #define USART_CR2_MSBFIRST (1 << 19) #define USART_CR2_DATAINV (1 << 18) #define USART_CR2_TXINV (1 << 17) #define USART_CR2_RXINV (1 << 16) #define USART_CR2_SWAP (1 << 15) #define USART_CR2_LINEN (1 << 14) #define USART_CR2_STOP_SHIFT 12 #define USART_CR2_STOP (3 << USART_CR2_STOP_SHIFT) #define USART_CR2_STOP_1_0BIT (0 << USART_CR2_STOP_SHIFT) #define USART_CR2_STOP_2_0BIT (2 << USART_CR2_STOP_SHIFT) #define USART_CR2_STOP_1_5BIT (3 << USART_CR2_STOP_SHIFT) #define USART_CR2_CLKEN (1 << 11) #define USART_CR2_CPOL (1 << 10) #define USART_CR2_CPHA (1 << 9) #define USART_CR2_LBCL (1 << 8) #define USART_CR2_LBIDE (1 << 6) #define USART_CR2_LBDL (1 << 5) #define USART_CR2_ADDM (1 << 4) /* USART_CR3 Values ---------------------------------------------------------*/ #define USART_CR3_WUFIE (1 << 22) #define USART_CR3_WUS_SHIFT 20 #define USART_CR3_WUS (3 << USART_CR3_WUS_SHIFT) #define USART_CR3_WUS_ADDRMATCH (0 << USART_CR3_WUS_SHIFT) #define USART_CR3_WUS_STARTBIT (2 << USART_CR3_WUS_SHIFT) #define USART_CR3_WUS_RXNE (3 << USART_CR3_WUS_SHIFT) #define USART_CR3_SCARCNT_SHIFT 17 #define USART_CR3_SCARCNT (7 << USART_CR3_SCARCNT_SHIFT) #define USART_CR3_SCARCNT_DISABLE (0 << USART_CR3_SCARCNT_SHIFT) #define USART_CR3_SCARCNT_VAL(x) ((x) << USART_CR3_SCARCNT_SHIFT) #define USART_CR3_DEP (1 << 15) #define USART_CR3_DEM (1 << 14) #define USART_CR3_DDRE (1 << 13) #define USART_CR3_OVRDIS (1 << 12) #define USART_CR3_ONEBIT (1 << 11) #define USART_CR3_CTSIE (1 << 10) #define USART_CR3_CTSE (1 << 9) #define USART_CR3_RTSE (1 << 8) #define USART_CR3_DMAT (1 << 7) #define USART_CR3_DMAR (1 << 6) #define USART_CR3_SCEN (1 << 5) #define USART_CR3_NACK (1 << 4) #define USART_CR3_HDSEL (1 << 3) #define USART_CR3_IRLP (1 << 2) #define USART_CR3_IREN (1 << 1) #define USART_CR3_EIE (1 << 0) /* USART_GTPR Values --------------------------------------------------------*/ #define USART_GTPR_GT_SHIFT 8 #define USART_GTPR_GT (0xFF << USART_GTPR_GT_SHIFT) #define USART_GTPR_GT_VAL(x) ((x) << USART_GTPR_GT_SHIFT) #define USART_GTPR_PSC_SHIFT 0 #define USART_GTPR_PSC (0xFF << USART_GTPR_PSC_SHIFT) #define USART_GTPR_PSC_VAL(x) ((x) << USART_GTPR_PSC_SHIFT) /* USART_RTOR Values --------------------------------------------------------*/ #define USART_RTOR_BLEN_SHIFT 24 #define USART_RTOR_BLEN (0xFF << USART_RTOR_BLEN_SHIFT) #define USART_RTOR_BLEN_VAL(x) ((x) << USART_RTOR_BLEN_SHIFT) #define USART_RTOR_RTO_SHIFT 0 #define USART_RTOR_RTO (0xFF << USART_RTOR_RTO_SHIFT) #define USART_RTOR_RTO_VAL(x) ((x) << USART_RTOR_RTO_SHIFT) /* USART_RQR Values ---------------------------------------------------------*/ #define USART_RQR_TXFRQ (1 << 4) #define USART_RQR_RXFRQ (1 << 3) #define USART_RQR_MMRQ (1 << 2) #define USART_RQR_SBKRQ (1 << 1) #define USART_RQR_ABRRQ (1 << 0) /* USART_ISR Values ---------------------------------------------------------*/ #define USART_ISR_REACK (1 << 22) #define USART_ISR_TEACK (1 << 21) #define USART_ISR_WUF (1 << 20) #define USART_ISR_RWU (1 << 19) #define USART_ISR_SBKF (1 << 18) #define USART_ISR_CMF (1 << 17) #define USART_ISR_BUSY (1 << 16) #define USART_ISR_ABRF (1 << 15) #define USART_ISR_ABRE (1 << 14) #define USART_ISR_EOBF (1 << 12) #define USART_ISR_RTOF (1 << 11) #define USART_ISR_CTS (1 << 10) #define USART_ISR_CTSIF (1 << 9) #define USART_ISR_LBDF (1 << 8) #define USART_ISR_TXE (1 << 7) #define USART_ISR_TC (1 << 6) #define USART_ISR_RXNE (1 << 5) #define USART_ISR_IDLE (1 << 4) #define USART_ISR_ORE (1 << 3) #define USART_ISR_NF (1 << 2) #define USART_ISR_FE (1 << 1) #define USART_ISR_PE (1 << 0) /* USART_ICR Values ---------------------------------------------------------*/ #define USART_ICR_WUCF (1 << 20) #define USART_ICR_CMCF (1 << 17) #define USART_ICR_EOBCF (1 << 12) #define USART_ICR_RTOCF (1 << 11) #define USART_ICR_CTSCF (1 << 9) #define USART_ICR_LBDCF (1 << 8) #define USART_ICR_TCCF (1 << 6) #define USART_ICR_IDLECF (1 << 4) #define USART_ICR_ORECF (1 << 3) #define USART_ICR_NCF (1 << 2) #define USART_ICR_FECF (1 << 1) #define USART_ICR_PECF (1 << 0) /*****************************************************************************/ /* API definitions */ /*****************************************************************************/ #define USART_PARITY (USART_CR1_PCE | USART_CR1_PS) #define USART_PARITY_NONE (0) #define USART_PARITY_EVEN (USART_CR1_PCE) #define USART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS) #define USART_MODE (USART_CR1_TE | USART_CR1_RE) #define USART_MODE_NONE (0) #define USART_MODE_RX (USART_CR1_RE) #define USART_MODE_TX (USART_CR1_TE) #define USART_MODE_TX_RX (USART_CR1_TE | USART_CR1_RE) #define USART_FLOWCONTROL (USART_CR3_RTSE | USART_CR3_CTSE) #define USART_FLOWCONTROL_NONE (0) #define USART_FLOWCONTROL_RTS (USART_CR3_RTSE) #define USART_FLOWCONTROL_CTS (USART_CR3_CTSE) #define USART_FLOWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE) /*****************************************************************************/ /* API Functions */ /*****************************************************************************/ BEGIN_DECLS void usart_set_baudrate(uint32_t usart, uint32_t baud); void usart_set_databits(uint32_t usart, uint32_t bits); void usart_set_stopbits(uint32_t usart, uint32_t stopbits); void usart_set_parity(uint32_t usart, uint32_t parity); void usart_set_mode(uint32_t usart, uint32_t mode); void usart_set_flow_control(uint32_t usart, uint32_t flowcontrol); void usart_enable(uint32_t usart); void usart_disable(uint32_t usart); void usart_send(uint32_t usart, uint8_t data); uint8_t usart_recv(uint32_t usart); void usart_wait_send_ready(uint32_t usart); void usart_wait_recv_ready(uint32_t usart); void usart_send_blocking(uint32_t usart, uint8_t data); uint8_t usart_recv_blocking(uint32_t usart); void usart_enable_rx_dma(uint32_t usart); void usart_disable_rx_dma(uint32_t usart); void usart_enable_tx_dma(uint32_t usart); void usart_disable_tx_dma(uint32_t usart); void usart_enable_rx_interrupt(uint32_t usart); void usart_disable_rx_interrupt(uint32_t usart); void usart_enable_tx_interrupt(uint32_t usart); void usart_disable_tx_interrupt(uint32_t usart); void usart_enable_error_interrupt(uint32_t usart); void usart_disable_error_interrupt(uint32_t usart); bool usart_get_flag(uint32_t usart, uint32_t flag); bool usart_get_interrupt_source(uint32_t usart, uint32_t flag); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/adc.h ================================================ /** @defgroup adc_defines ADC Defines @brief Defined Constants and Types for the STM32F1xx Analog to Digital Converters @ingroup STM32F1xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Edward Cheeseman @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Edward Cheeseman * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_ADC_H #define LIBOPENCM3_ADC_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* ADC port base addresses (for convenience) */ /****************************************************************************/ /** @defgroup adc_reg_base ADC register base addresses @ingroup adc_defines @{*/ #define ADC1 ADC1_BASE #define ADC2 ADC2_BASE #define ADC3 ADC3_BASE /**@}*/ /* --- ADC registers ------------------------------------------------------- */ /* ADC status register (ADC_SR) */ #define ADC_SR(block) MMIO32(block + 0x00) #define ADC1_SR ADC_SR(ADC1) #define ADC2_SR ADC_SR(ADC2) #define ADC3_SR ADC_SR(ADC3) /* ADC control register 1 (ADC_CR1) */ #define ADC_CR1(block) MMIO32(block + 0x04) #define ADC1_CR1 ADC_CR1(ADC1) #define ADC2_CR1 ADC_CR1(ADC2) #define ADC3_CR1 ADC_CR1(ADC3) /* ADC control register 2 (ADC_CR2) */ #define ADC_CR2(block) MMIO32(block + 0x08) #define ADC1_CR2 ADC_CR2(ADC1) #define ADC2_CR2 ADC_CR2(ADC2) #define ADC3_CR2 ADC_CR2(ADC3) /* ADC sample time register 1 (ADC_SMPR1) */ #define ADC_SMPR1(block) MMIO32(block + 0x0c) #define ADC1_SMPR1 ADC_SMPR1(ADC1) #define ADC2_SMPR1 ADC_SMPR1(ADC2) #define ADC3_SMPR1 ADC_SMPR1(ADC3) /* ADC sample time register 2 (ADC_SMPR2) */ #define ADC_SMPR2(block) MMIO32(block + 0x10) #define ADC1_SMPR2 ADC_SMPR2(ADC1) #define ADC2_SMPR2 ADC_SMPR2(ADC2) #define ADC3_SMPR2 ADC_SMPR2(ADC3) /* ADC injected channel data offset register x (ADC_JOFRx) (x=1..4) */ #define ADC_JOFR1(block) MMIO32(block + 0x14) #define ADC_JOFR2(block) MMIO32(block + 0x18) #define ADC_JOFR3(block) MMIO32(block + 0x1c) #define ADC_JOFR4(block) MMIO32(block + 0x20) #define ADC1_JOFR1 ADC_JOFR1(ADC1) #define ADC2_JOFR1 ADC_JOFR1(ADC2) #define ADC3_JOFR1 ADC_JOFR1(ADC3) #define ADC1_JOFR2 ADC_JOFR2(ADC1) #define ADC2_JOFR2 ADC_JOFR2(ADC2) #define ADC3_JOFR2 ADC_JOFR2(ADC3) #define ADC1_JOFR3 ADC_JOFR3(ADC1) #define ADC2_JOFR3 ADC_JOFR3(ADC2) #define ADC3_JOFR3 ADC_JOFR3(ADC3) #define ADC1_JOFR4 ADC_JOFR4(ADC1) #define ADC2_JOFR4 ADC_JOFR4(ADC2) #define ADC3_JOFR4 ADC_JOFR4(ADC3) /* ADC watchdog high threshold register (ADC_HTR) */ #define ADC_HTR(block) MMIO32(block + 0x24) #define ADC1_HTR ADC_HTR(ADC1) #define ADC2_HTR ADC_HTR(ADC2) #define ADC3_HTR ADC_HTR(ADC3) /* ADC watchdog low threshold register (ADC_LTR) */ #define ADC_LTR(block) MMIO32(block + 0x28) #define ADC1_LTR ADC_LTR(ADC1_BASE) #define ADC2_LTR ADC_LTR(ADC2_BASE) #define ADC3_LTR ADC_LTR(ADC3_BASE) /* ADC regular sequence register 1 (ADC_SQR1) */ #define ADC_SQR1(block) MMIO32(block + 0x2c) #define ADC1_SQR1 ADC_SQR1(ADC1) #define ADC2_SQR1 ADC_SQR1(ADC2) #define ADC3_SQR1 ADC_SQR1(ADC3) /* ADC regular sequence register 2 (ADC_SQR2) */ #define ADC_SQR2(block) MMIO32(block + 0x30) #define ADC1_SQR2 ADC_SQR2(ADC1) #define ADC2_SQR2 ADC_SQR2(ADC2) #define ADC3_SQR2 ADC_SQR2(ADC3) /* ADC regular sequence register 3 (ADC_SQR3) */ #define ADC_SQR3(block) MMIO32(block + 0x34) #define ADC1_SQR3 ADC_SQR3(ADC1) #define ADC2_SQR3 ADC_SQR3(ADC2) #define ADC3_SQR3 ADC_SQR3(ADC3) /* ADC injected sequence register (ADC_JSQR) */ #define ADC_JSQR(block) MMIO32(block + 0x38) #define ADC1_JSQR ADC_JSQR(ADC1_BASE) #define ADC2_JSQR ADC_JSQR(ADC2_BASE) #define ADC3_JSQR ADC_JSQR(ADC3_BASE) /* ADC injected data register x (ADC_JDRx) (x=1..4) */ #define ADC_JDR1(block) MMIO32(block + 0x3c) #define ADC_JDR2(block) MMIO32(block + 0x40) #define ADC_JDR3(block) MMIO32(block + 0x44) #define ADC_JDR4(block) MMIO32(block + 0x48) #define ADC1_JDR1 ADC_JDR1(ADC1) #define ADC2_JDR1 ADC_JDR1(ADC2) #define ADC3_JDR1 ADC_JDR1(ADC3) #define ADC1_JDR2 ADC_JDR2(ADC1) #define ADC2_JDR2 ADC_JDR2(ADC2) #define ADC3_JDR2 ADC_JDR2(ADC3) #define ADC1_JDR3 ADC_JDR3(ADC1) #define ADC2_JDR3 ADC_JDR3(ADC2) #define ADC3_JDR3 ADC_JDR3(ADC3) #define ADC1_JDR4 ADC_JDR4(ADC1) #define ADC2_JDR4 ADC_JDR4(ADC2) #define ADC3_JDR4 ADC_JDR4(ADC3) /* ADC regular data register (ADC_DR) */ #define ADC_DR(block) MMIO32(block + 0x4c) #define ADC1_DR ADC_DR(ADC1) #define ADC2_DR ADC_DR(ADC2) #define ADC3_DR ADC_DR(ADC3) /* --- ADC Channels ------------------------------------------------------- */ /****************************************************************************/ /** @defgroup adc_channel ADC Channel Numbers @ingroup adc_defines @{*/ #define ADC_CHANNEL0 0x00 #define ADC_CHANNEL1 0x01 #define ADC_CHANNEL2 0x02 #define ADC_CHANNEL3 0x03 #define ADC_CHANNEL4 0x04 #define ADC_CHANNEL5 0x05 #define ADC_CHANNEL6 0x06 #define ADC_CHANNEL7 0x07 #define ADC_CHANNEL8 0x08 #define ADC_CHANNEL9 0x09 #define ADC_CHANNEL10 0x0A #define ADC_CHANNEL11 0x0B #define ADC_CHANNEL12 0x0C #define ADC_CHANNEL13 0x0D #define ADC_CHANNEL14 0x0E #define ADC_CHANNEL15 0x0F #define ADC_CHANNEL16 0x10 #define ADC_CHANNEL17 0x11 /**@}*/ #define ADC_MASK 0x1F #define ADC_SHIFT 0 /* --- ADC_SR values ------------------------------------------------------- */ #define ADC_SR_STRT (1 << 4) #define ADC_SR_JSTRT (1 << 3) #define ADC_SR_JEOC (1 << 2) #define ADC_SR_EOC (1 << 1) #define ADC_SR_AWD (1 << 0) /* --- ADC_CR1 values ------------------------------------------------------ */ /* AWDEN: Analog watchdog enable on regular channels */ #define ADC_CR1_AWDEN (1 << 23) /* JAWDEN: Analog watchdog enable on injected channels */ #define ADC_CR1_JAWDEN (1 << 22) /* Note: Bits [21:20] are reserved, and must be kept at reset value. */ /* DUALMOD[3:0]: Dual mode selection. (ADC1 only) */ /* Legend: * IND: Independent mode. * CRSISM: Combined regular simultaneous + injected simultaneous mode. * CRSATM: Combined regular simultaneous + alternate trigger mode. * CISFIM: Combined injected simultaneous + fast interleaved mode. * CISSIM: Combined injected simultaneous + slow interleaved mode. * ISM: Injected simultaneous mode only. * RSM: Regular simultaneous mode only. * FIM: Fast interleaved mode only. * SIM: Slow interleaved mode only. * ATM: Alternate trigger mode only. */ /****************************************************************************/ /* ADC_CR1 DUALMOD[3:0] ADC Mode Selection */ /** @defgroup adc_cr1_dualmod ADC Mode Selection @ingroup adc_defines @{*/ /** Independent (non-dual) mode */ #define ADC_CR1_DUALMOD_IND (0x0 << 16) /** Combined regular simultaneous + injected simultaneous mode. */ #define ADC_CR1_DUALMOD_CRSISM (0x1 << 16) /** Combined regular simultaneous + alternate trigger mode. */ #define ADC_CR1_DUALMOD_CRSATM (0x2 << 16) /** Combined injected simultaneous + fast interleaved mode. */ #define ADC_CR1_DUALMOD_CISFIM (0x3 << 16) /** Combined injected simultaneous + slow interleaved mode. */ #define ADC_CR1_DUALMOD_CISSIM (0x4 << 16) /** Injected simultaneous mode only. */ #define ADC_CR1_DUALMOD_ISM (0x5 << 16) /** Regular simultaneous mode only. */ #define ADC_CR1_DUALMOD_RSM (0x6 << 16) /** Fast interleaved mode only. */ #define ADC_CR1_DUALMOD_FIM (0x7 << 16) /** Slow interleaved mode only. */ #define ADC_CR1_DUALMOD_SIM (0x8 << 16) /** Alternate trigger mode only. */ #define ADC_CR1_DUALMOD_ATM (0x9 << 16) /**@}*/ #define ADC_CR1_DUALMOD_MASK (0xF << 16) #define ADC_CR1_DUALMOD_SHIFT 16 /* DISCNUM[2:0]: Discontinuous mode channel count. */ /****************************************************************************/ /** @defgroup adc_cr1_discnum ADC Number of channels in discontinuous mode. @ingroup adc_defines @{*/ #define ADC_CR1_DISCNUM_1CHANNELS (0x0 << 13) #define ADC_CR1_DISCNUM_2CHANNELS (0x1 << 13) #define ADC_CR1_DISCNUM_3CHANNELS (0x2 << 13) #define ADC_CR1_DISCNUM_4CHANNELS (0x3 << 13) #define ADC_CR1_DISCNUM_5CHANNELS (0x4 << 13) #define ADC_CR1_DISCNUM_6CHANNELS (0x5 << 13) #define ADC_CR1_DISCNUM_7CHANNELS (0x6 << 13) #define ADC_CR1_DISCNUM_8CHANNELS (0x7 << 13) /**@}*/ #define ADC_CR1_DISCNUM_MASK (0x7 << 13) #define ADC_CR1_DISCNUM_SHIFT 13 /* JDISCEN: */ /** Discontinuous mode on injected channels. */ #define ADC_CR1_JDISCEN (1 << 12) /* DISCEN: */ /** Discontinuous mode on regular channels. */ #define ADC_CR1_DISCEN (1 << 11) /* JAUTO: */ /** Automatic Injection Group conversion. */ #define ADC_CR1_JAUTO (1 << 10) /* AWDSGL: */ /** Enable the watchdog on a single channel in scan mode. */ #define ADC_CR1_AWDSGL (1 << 9) /* SCAN: */ /** Scan mode. */ #define ADC_CR1_SCAN (1 << 8) /* JEOCIE: */ /** Interrupt enable for injected channels. */ #define ADC_CR1_JEOCIE (1 << 7) /* AWDIE: */ /** Analog watchdog interrupt enable. */ #define ADC_CR1_AWDIE (1 << 6) /* EOCIE: */ /** Interrupt enable EOC. */ #define ADC_CR1_EOCIE (1 << 5) /* AWDCH[4:0]: Analog watchdog channel bits. (Up to 17 other values reserved) */ /* Notes: * ADC1: Analog channel 16 and 17 are internally connected to the temperature * sensor and V_REFINT, respectively. * ADC2: Analog channel 16 and 17 are internally connected to V_SS. * ADC3: Analog channel 9, 14, 15, 16 and 17 are internally connected to V_SS. */ /****************************************************************************/ /* ADC_CR1 AWDCH[4:0] ADC watchdog channel */ /** @defgroup adc_watchdog_channel ADC watchdog channel @ingroup adc_defines @{*/ #define ADC_CR1_AWDCH_CHANNEL0 (0x00 << 0) #define ADC_CR1_AWDCH_CHANNEL1 (0x01 << 0) #define ADC_CR1_AWDCH_CHANNEL2 (0x02 << 0) #define ADC_CR1_AWDCH_CHANNEL3 (0x03 << 0) #define ADC_CR1_AWDCH_CHANNEL4 (0x04 << 0) #define ADC_CR1_AWDCH_CHANNEL5 (0x05 << 0) #define ADC_CR1_AWDCH_CHANNEL6 (0x06 << 0) #define ADC_CR1_AWDCH_CHANNEL7 (0x07 << 0) #define ADC_CR1_AWDCH_CHANNEL8 (0x08 << 0) #define ADC_CR1_AWDCH_CHANNEL9 (0x09 << 0) #define ADC_CR1_AWDCH_CHANNEL10 (0x0A << 0) #define ADC_CR1_AWDCH_CHANNEL11 (0x0B << 0) #define ADC_CR1_AWDCH_CHANNEL12 (0x0C << 0) #define ADC_CR1_AWDCH_CHANNEL13 (0x0D << 0) #define ADC_CR1_AWDCH_CHANNEL14 (0x0E << 0) #define ADC_CR1_AWDCH_CHANNEL15 (0x0F << 0) #define ADC_CR1_AWDCH_CHANNEL16 (0x10 << 0) #define ADC_CR1_AWDCH_CHANNEL17 (0x11 << 0) /**@}*/ #define ADC_CR1_AWDCH_MASK (0x1F << 0) #define ADC_CR1_AWDCH_SHIFT 0 /* --- ADC_CR2 values ------------------------------------------------------ */ /* TSVREFE: */ /** Temperature sensor and V_REFINT enable. (ADC1 only!) */ #define ADC_CR2_TSVREFE (1 << 23) /* SWSTART: */ /** Start conversion of regular channels. */ #define ADC_CR2_SWSTART (1 << 22) /* JSWSTART: */ /** Start conversion of injected channels. */ #define ADC_CR2_JSWSTART (1 << 21) /* EXTTRIG: */ /** External trigger conversion mode for regular channels. */ #define ADC_CR2_EXTTRIG (1 << 20) /* EXTSEL[2:0]: External event select for regular group. */ /* The following are only valid for ADC1 and ADC2. */ /****************************************************************************/ /* ADC_CR2 EXTSEL[2:0] ADC Trigger Identifier for ADC1 and ADC2 */ /** @defgroup adc_trigger_regular_12 ADC Trigger Identifier for ADC1 and ADC2 @ingroup adc_defines @{*/ /** Timer 1 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM1_CC1 (0x0 << 17) /** Timer 1 Compare Output 2 */ #define ADC_CR2_EXTSEL_TIM1_CC2 (0x1 << 17) /** Timer 1 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM1_CC3 (0x2 << 17) /** Timer 2 Compare Output 2 */ #define ADC_CR2_EXTSEL_TIM2_CC2 (0x3 << 17) /** Timer 3 Trigger Output */ #define ADC_CR2_EXTSEL_TIM3_TRGO (0x4 << 17) /** Timer 4 Compare Output 4 */ #define ADC_CR2_EXTSEL_TIM4_CC4 (0x5 << 17) /** External Interrupt 11 */ #define ADC_CR2_EXTSEL_EXTI11 (0x6 << 17) /** Software Trigger */ #define ADC_CR2_EXTSEL_SWSTART (0x7 << 17) /**@}*/ /* The following are only valid for ADC3 */ /****************************************************************************/ /* ADC_CR2 EXTSEL[2:0] ADC Trigger Identifier for ADC3 */ /** @defgroup adc_trigger_regular_3 ADC Trigger Identifier for ADC3 @ingroup adc_defines @{*/ /** Timer 2 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM3_CC1 (0x0 << 17) /** Timer 2 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM2_CC3 (0x1 << 17) /** Timer 1 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM1_CC3 (0x2 << 17) /** Timer 8 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM8_CC1 (0x3 << 17) /** Timer 8 Trigger Output */ #define ADC_CR2_EXTSEL_TIM8_TRGO (0x4 << 17) /** Timer 5 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM5_CC1 (0x5 << 17) /** Timer 5 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM5_CC3 (0x6 << 17) /**@}*/ #define ADC_CR2_EXTSEL_MASK (0x7 << 17) #define ADC_CR2_EXTSEL_SHIFT 17 /* Note: Bit 16 is reserved, must be kept at reset value. */ /* JEXTTRIG: External trigger conversion mode for injected channels. */ #define ADC_CR2_JEXTTRIG (1 << 15) /* JEXTSEL[2:0]: External event selection for injected group. */ /* The following are only valid for ADC1 and ADC2. */ /****************************************************************************/ /* ADC_CR2 JEXTSEL[2:0] ADC Injected Trigger Identifier for ADC1 and ADC2 */ /** @defgroup adc_trigger_injected_12 ADC Injected Trigger Identifier for ADC1 and ADC2 @ingroup adc_defines @{*/ /** Timer 1 Trigger Output */ #define ADC_CR2_JEXTSEL_TIM1_TRGO (0x0 << 12) /** Timer 1 Compare Output 4 */ #define ADC_CR2_JEXTSEL_TIM1_CC4 (0x1 << 12) /** Timer 2 Trigger Output */ #define ADC_CR2_JEXTSEL_TIM2_TRGO (0x2 << 12) /** Timer 2 Compare Output 1 */ #define ADC_CR2_JEXTSEL_TIM2_CC1 (0x3 << 12) /** Timer 3 Compare Output 4 */ #define ADC_CR2_JEXTSEL_TIM3_CC4 (0x4 << 12) /** Timer 4 Trigger Output */ #define ADC_CR2_JEXTSEL_TIM4_TRGO (0x5 << 12) /** External Interrupt 15 */ #define ADC_CR2_JEXTSEL_EXTI15 (0x6 << 12) /** Injected Software Trigger */ #define ADC_CR2_JEXTSEL_JSWSTART (0x7 << 12) /* Software start. */ /**@}*/ /* The following are the different meanings for ADC3 only. */ /****************************************************************************/ /* ADC_CR2 JEXTSEL[2:0] ADC Injected Trigger Identifier for ADC3 */ /** @defgroup adc_trigger_injected_3 ADC Injected Trigger Identifier for ADC3 @ingroup adc_defines @{*/ /** Timer 1 Trigger Output */ #define ADC_CR2_JEXTSEL_TIM1_TRGO (0x0 << 12) /** Timer 1 Compare Output 4 */ #define ADC_CR2_JEXTSEL_TIM1_CC4 (0x1 << 12) /** Timer 4 Compare Output 3 */ #define ADC_CR2_JEXTSEL_TIM4_CC3 (0x2 << 12) /** Timer 8 Compare Output 2 */ #define ADC_CR2_JEXTSEL_TIM8_CC2 (0x3 << 12) /** Timer 8 Compare Output 4 */ #define ADC_CR2_JEXTSEL_TIM8_CC4 (0x4 << 12) /** Timer 5 Trigger Output */ #define ADC_CR2_JEXTSEL_TIM5_TRGO (0x5 << 12) /** Timer 5 Compare Output 4 */ #define ADC_CR2_JEXTSEL_TIM5_CC4 (0x6 << 12) /** Injected Software Trigger */ #define ADC_CR2_JEXTSEL_JSWSTART (0x7 << 12) /* Software start. */ /**@}*/ #define ADC_CR2_JEXTSEL_MASK (0x7 << 12) #define ADC_CR2_JEXTSEL_SHIFT 12 /* ALIGN: Data alignment. */ #define ADC_CR2_ALIGN_RIGHT (0 << 11) #define ADC_CR2_ALIGN_LEFT (1 << 11) #define ADC_CR2_ALIGN (1 << 11) /* Note: Bits [10:9] are reserved and must be kept at reset value. */ /* DMA: Direct memory access mode. (ADC1 and ADC3 only!) */ #define ADC_CR2_DMA (1 << 8) /* Note: Bits [7:4] are reserved and must be kept at reset value. */ /* RSTCAL: Reset calibration. */ #define ADC_CR2_RSTCAL (1 << 3) /* CAL: A/D Calibration. */ #define ADC_CR2_CAL (1 << 2) /* CONT: Continous conversion. */ #define ADC_CR2_CONT (1 << 1) /* ADON: A/D converter On/Off. */ /* Note: If any other bit in this register apart from ADON is changed at the * same time, then conversion is not triggered. This is to prevent triggering * an erroneous conversion. * Conclusion: Must be separately written. */ #define ADC_CR2_ADON (1 << 0) /* --- ADC_SMPR1 values ---------------------------------------------------- */ #define ADC_SMPR1_SMP17_LSB 21 #define ADC_SMPR1_SMP16_LSB 18 #define ADC_SMPR1_SMP15_LSB 15 #define ADC_SMPR1_SMP14_LSB 12 #define ADC_SMPR1_SMP13_LSB 9 #define ADC_SMPR1_SMP12_LSB 6 #define ADC_SMPR1_SMP11_LSB 3 #define ADC_SMPR1_SMP10_LSB 0 #define ADC_SMPR1_SMP17_MSK (0x7 << ADC_SMP17_LSB) #define ADC_SMPR1_SMP16_MSK (0x7 << ADC_SMP16_LSB) #define ADC_SMPR1_SMP15_MSK (0x7 << ADC_SMP15_LSB) #define ADC_SMPR1_SMP14_MSK (0x7 << ADC_SMP14_LSB) #define ADC_SMPR1_SMP13_MSK (0x7 << ADC_SMP13_LSB) #define ADC_SMPR1_SMP12_MSK (0x7 << ADC_SMP12_LSB) #define ADC_SMPR1_SMP11_MSK (0x7 << ADC_SMP11_LSB) #define ADC_SMPR1_SMP10_MSK (0x7 << ADC_SMP10_LSB) /* --- ADC_SMPR2 values ---------------------------------------------------- */ #define ADC_SMPR2_SMP9_LSB 27 #define ADC_SMPR2_SMP8_LSB 24 #define ADC_SMPR2_SMP7_LSB 21 #define ADC_SMPR2_SMP6_LSB 18 #define ADC_SMPR2_SMP5_LSB 15 #define ADC_SMPR2_SMP4_LSB 12 #define ADC_SMPR2_SMP3_LSB 9 #define ADC_SMPR2_SMP2_LSB 6 #define ADC_SMPR2_SMP1_LSB 3 #define ADC_SMPR2_SMP0_LSB 0 #define ADC_SMPR2_SMP9_MSK (0x7 << ADC_SMP9_LSB) #define ADC_SMPR2_SMP8_MSK (0x7 << ADC_SMP8_LSB) #define ADC_SMPR2_SMP7_MSK (0x7 << ADC_SMP7_LSB) #define ADC_SMPR2_SMP6_MSK (0x7 << ADC_SMP6_LSB) #define ADC_SMPR2_SMP5_MSK (0x7 << ADC_SMP5_LSB) #define ADC_SMPR2_SMP4_MSK (0x7 << ADC_SMP4_LSB) #define ADC_SMPR2_SMP3_MSK (0x7 << ADC_SMP3_LSB) #define ADC_SMPR2_SMP2_MSK (0x7 << ADC_SMP2_LSB) #define ADC_SMPR2_SMP1_MSK (0x7 << ADC_SMP1_LSB) #define ADC_SMPR2_SMP0_MSK (0x7 << ADC_SMP0_LSB) /* --- ADC_SMPRx values --------------------------------------------------- */ /****************************************************************************/ /* ADC_SMPRG ADC Sample Time Selection for Channels */ /** @defgroup adc_sample_rg ADC Sample Time Selection for All Channels @ingroup adc_defines @{*/ #define ADC_SMPR_SMP_1DOT5CYC 0x0 #define ADC_SMPR_SMP_7DOT5CYC 0x1 #define ADC_SMPR_SMP_13DOT5CYC 0x2 #define ADC_SMPR_SMP_28DOT5CYC 0x3 #define ADC_SMPR_SMP_41DOT5CYC 0x4 #define ADC_SMPR_SMP_55DOT5CYC 0x5 #define ADC_SMPR_SMP_71DOT5CYC 0x6 #define ADC_SMPR_SMP_239DOT5CYC 0x7 /**@}*/ /* --- ADC_JOFRx, ADC_HTR, ADC_LTR values ---------------------------------- */ #define ADC_JOFFSET_LSB 0 #define ADC_JOFFSET_MSK (0x7ff << 0) #define ADC_HT_LSB 0 #define ADC_HT_MSK (0x7ff << 0) #define ADC_LT_LSB 0 #define ADC_LT_MSK (0x7ff << 0) /* --- ADC_SQR1 values ----------------------------------------------------- */ #define ADC_SQR1_L_LSB 20 #define ADC_SQR1_SQ16_LSB 15 #define ADC_SQR1_SQ15_LSB 10 #define ADC_SQR1_SQ14_LSB 5 #define ADC_SQR1_SQ13_LSB 0 #define ADC_SQR1_L_MSK (0xf << ADC_SQR1_L_LSB) #define ADC_SQR1_SQ16_MSK (0x1f << ADC_SQR1_SQ16_LSB) #define ADC_SQR1_SQ15_MSK (0x1f << ADC_SQR1_SQ15_LSB) #define ADC_SQR1_SQ14_MSK (0x1f << ADC_SQR1_SQ14_LSB) #define ADC_SQR1_SQ13_MSK (0x1f << ADC_SQR1_SQ13_LSB) /* --- ADC_SQR2 values ----------------------------------------------------- */ #define ADC_SQR2_SQ12_LSB 25 #define ADC_SQR2_SQ11_LSB 20 #define ADC_SQR2_SQ10_LSB 15 #define ADC_SQR2_SQ9_LSB 10 #define ADC_SQR2_SQ8_LSB 5 #define ADC_SQR2_SQ7_LSB 0 #define ADC_SQR2_SQ12_MSK (0x1f << ADC_SQR2_SQ12_LSB) #define ADC_SQR2_SQ11_MSK (0x1f << ADC_SQR2_SQ11_LSB) #define ADC_SQR2_SQ10_MSK (0x1f << ADC_SQR2_SQ10_LSB) #define ADC_SQR2_SQ9_MSK (0x1f << ADC_SQR2_SQ9_LSB) #define ADC_SQR2_SQ8_MSK (0x1f << ADC_SQR2_SQ8_LSB) #define ADC_SQR2_SQ7_MSK (0x1f << ADC_SQR2_SQ7_LSB) /* --- ADC_SQR3 values ----------------------------------------------------- */ #define ADC_SQR3_SQ6_LSB 25 #define ADC_SQR3_SQ5_LSB 20 #define ADC_SQR3_SQ4_LSB 15 #define ADC_SQR3_SQ3_LSB 10 #define ADC_SQR3_SQ2_LSB 5 #define ADC_SQR3_SQ1_LSB 0 #define ADC_SQR3_SQ6_MSK (0x1f << ADC_SQR3_SQ6_LSB) #define ADC_SQR3_SQ5_MSK (0x1f << ADC_SQR3_SQ5_LSB) #define ADC_SQR3_SQ4_MSK (0x1f << ADC_SQR3_SQ4_LSB) #define ADC_SQR3_SQ3_MSK (0x1f << ADC_SQR3_SQ3_LSB) #define ADC_SQR3_SQ2_MSK (0x1f << ADC_SQR3_SQ2_LSB) #define ADC_SQR3_SQ1_MSK (0x1f << ADC_SQR3_SQ1_LSB) /* --- ADC_JSQR values ----------------------------------------------------- */ #define ADC_JSQR_JL_LSB 20 #define ADC_JSQR_JSQ4_LSB 15 #define ADC_JSQR_JSQ3_LSB 10 #define ADC_JSQR_JSQ2_LSB 5 #define ADC_JSQR_JSQ1_LSB 0 /* JL[2:0]: Discontinuous mode channel count injected channels. */ /****************************************************************************/ /** @defgroup adc_jsqr_jl ADC Number of channels in discontinuous mode from injected channels. @ingroup adc_defines @{*/ #define ADC_JSQR_JL_1CHANNELS (0x0 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_2CHANNELS (0x1 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_3CHANNELS (0x2 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_4CHANNELS (0x3 << ADC_JSQR_JL_LSB) /**@}*/ #define ADC_JSQR_JL_SHIFT 13 #define ADC_JSQR_JL_MSK (0x2 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JSQ4_MSK (0x1f << ADC_JSQR_JSQ4_LSB) #define ADC_JSQR_JSQ3_MSK (0x1f << ADC_JSQR_JSQ3_LSB) #define ADC_JSQR_JSQ2_MSK (0x1f << ADC_JSQR_JSQ2_LSB) #define ADC_JSQR_JSQ1_MSK (0x1f << ADC_JSQR_JSQ1_LSB) /* --- ADC_JDRx, ADC_DR values --------------------------------------------- */ #define ADC_JDATA_LSB 0 #define ADC_DATA_LSB 0 #define ADC_ADC2DATA_LSB 16 /* ADC1 only (dual mode) */ #define ADC_JDATA_MSK (0xffff << ADC_JDATA_LSB) #define ADC_DATA_MSK (0xffff << ADC_DA) #define ADC_ADC2DATA_MSK (0xffff << ADC_ADC2DATA_LSB) /* ADC1 only (dual mode) */ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void adc_power_on(uint32_t adc); void adc_start_conversion_direct(uint32_t adc); void adc_set_single_channel(uint32_t adc, uint8_t channel); void adc_set_dual_mode(uint32_t mode); bool adc_eoc(uint32_t adc); bool adc_eoc_injected(uint32_t adc); uint32_t adc_read_regular(uint32_t adc); uint32_t adc_read_injected(uint32_t adc, uint8_t reg); void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset); void adc_enable_analog_watchdog_regular(uint32_t adc); void adc_disable_analog_watchdog_regular(uint32_t adc); void adc_enable_analog_watchdog_injected(uint32_t adc); void adc_disable_analog_watchdog_injected(uint32_t adc); void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length); void adc_disable_discontinuous_mode_regular(uint32_t adc); void adc_enable_discontinuous_mode_injected(uint32_t adc); void adc_disable_discontinuous_mode_injected(uint32_t adc); void adc_enable_automatic_injected_group_conversion(uint32_t adc); void adc_disable_automatic_injected_group_conversion(uint32_t adc); void adc_enable_analog_watchdog_on_all_channels(uint32_t adc); void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel); void adc_enable_scan_mode(uint32_t adc); void adc_disable_scan_mode(uint32_t adc); void adc_enable_eoc_interrupt_injected(uint32_t adc); void adc_disable_eoc_interrupt_injected(uint32_t adc); void adc_enable_awd_interrupt(uint32_t adc); void adc_disable_awd_interrupt(uint32_t adc); void adc_enable_eoc_interrupt(uint32_t adc); void adc_disable_eoc_interrupt(uint32_t adc); void adc_enable_temperature_sensor(uint32_t adc); void adc_disable_temperature_sensor(uint32_t adc); void adc_start_conversion_regular(uint32_t adc); void adc_start_conversion_injected(uint32_t adc); void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger); void adc_disable_external_trigger_regular(uint32_t adc); void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger); void adc_disable_external_trigger_injected(uint32_t adc); void adc_set_left_aligned(uint32_t adc); void adc_set_right_aligned(uint32_t adc); void adc_enable_dma(uint32_t adc); void adc_disable_dma(uint32_t adc); void adc_reset_calibration(uint32_t adc); void adc_calibration(uint32_t adc); void adc_set_continuous_conversion_mode(uint32_t adc); void adc_set_single_conversion_mode(uint32_t adc); void adc_on(uint32_t adc) LIBOPENCM3_DEPRECATED("will be removed in the first release"); void adc_off(uint32_t adc); void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time); void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time); void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold); void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold); void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); void adc_set_continous_conversion_mode(uint32_t adc) LIBOPENCM3_DEPRECATED("change to adc_set_continuous_conversion_mode"); void adc_set_conversion_time(uint32_t adc, uint8_t channel, uint8_t time) LIBOPENCM3_DEPRECATED("change to adc_set_sample_time"); void adc_set_conversion_time_on_all_channels(uint32_t adc, uint8_t time) LIBOPENCM3_DEPRECATED("change to adc_set_sample_time_on_all_channels"); void adc_enable_jeoc_interrupt(uint32_t adc) LIBOPENCM3_DEPRECATED("change to adc_enable_eoc_interrupt_injected"); void adc_disable_jeoc_interrupt(uint32_t adc) LIBOPENCM3_DEPRECATED("change to adc_disable_eoc_interrupt_injected"); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/bkp.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_BKP_H #define LIBOPENCM3_BKP_H #include #include /* --- BKP registers ------------------------------------------------------- */ /* Backup data register 1 (BKP_DR1) */ #define BKP_DR1 MMIO32(BACKUP_REGS_BASE + 0x04) /* Backup data register 2 (BKP_DR2) */ #define BKP_DR2 MMIO32(BACKUP_REGS_BASE + 0x08) /* Backup data register 3 (BKP_DR3) */ #define BKP_DR3 MMIO32(BACKUP_REGS_BASE + 0x0C) /* Backup data register 4 (BKP_DR4) */ #define BKP_DR4 MMIO32(BACKUP_REGS_BASE + 0x10) /* Backup data register 5 (BKP_DR5) */ #define BKP_DR5 MMIO32(BACKUP_REGS_BASE + 0x14) /* Backup data register 6 (BKP_DR6) */ #define BKP_DR6 MMIO32(BACKUP_REGS_BASE + 0x18) /* Backup data register 7 (BKP_DR7) */ #define BKP_DR7 MMIO32(BACKUP_REGS_BASE + 0x1C) /* Backup data register 8 (BKP_DR8) */ #define BKP_DR8 MMIO32(BACKUP_REGS_BASE + 0x20) /* Backup data register 9 (BKP_DR9) */ #define BKP_DR9 MMIO32(BACKUP_REGS_BASE + 0x24) /* Backup data register 10 (BKP_DR10) */ #define BKP_DR10 MMIO32(BACKUP_REGS_BASE + 0x28) /* RTC clock calibration register (BKP_RTCCR) */ #define BKP_RTCCR MMIO32(BACKUP_REGS_BASE + 0x2C) /* Backup control register (BKP_CR) */ #define BKP_CR MMIO32(BACKUP_REGS_BASE + 0x30) /* Backup control/status register (BKP_CSR) */ #define BKP_CSR MMIO32(BACKUP_REGS_BASE + 0x34) /* Backup data register 11 (BKP_DR11) */ #define BKP_DR11 MMIO32(BACKUP_REGS_BASE + 0x40) /* Backup data register 12 (BKP_DR12) */ #define BKP_DR12 MMIO32(BACKUP_REGS_BASE + 0x44) /* Backup data register 13 (BKP_DR13) */ #define BKP_DR13 MMIO32(BACKUP_REGS_BASE + 0x48) /* Backup data register 14 (BKP_DR14) */ #define BKP_DR14 MMIO32(BACKUP_REGS_BASE + 0x4C) /* Backup data register 15 (BKP_DR15) */ #define BKP_DR15 MMIO32(BACKUP_REGS_BASE + 0x50) /* Backup data register 16 (BKP_DR16) */ #define BKP_DR16 MMIO32(BACKUP_REGS_BASE + 0x54) /* Backup data register 17 (BKP_DR17) */ #define BKP_DR17 MMIO32(BACKUP_REGS_BASE + 0x58) /* Backup data register 18 (BKP_DR18) */ #define BKP_DR18 MMIO32(BACKUP_REGS_BASE + 0x5C) /* Backup data register 19 (BKP_DR19) */ #define BKP_DR19 MMIO32(BACKUP_REGS_BASE + 0x60) /* Backup data register 20 (BKP_DR20) */ #define BKP_DR20 MMIO32(BACKUP_REGS_BASE + 0x64) /* Backup data register 21 (BKP_DR21) */ #define BKP_DR21 MMIO32(BACKUP_REGS_BASE + 0x68) /* Backup data register 22 (BKP_DR22) */ #define BKP_DR22 MMIO32(BACKUP_REGS_BASE + 0x6C) /* Backup data register 23 (BKP_DR23) */ #define BKP_DR23 MMIO32(BACKUP_REGS_BASE + 0x70) /* Backup data register 24 (BKP_DR24) */ #define BKP_DR24 MMIO32(BACKUP_REGS_BASE + 0x74) /* Backup data register 25 (BKP_DR25) */ #define BKP_DR25 MMIO32(BACKUP_REGS_BASE + 0x78) /* Backup data register 26 (BKP_DR26) */ #define BKP_DR26 MMIO32(BACKUP_REGS_BASE + 0x7C) /* Backup data register 27 (BKP_DR27) */ #define BKP_DR27 MMIO32(BACKUP_REGS_BASE + 0x80) /* Backup data register 28 (BKP_DR28) */ #define BKP_DR28 MMIO32(BACKUP_REGS_BASE + 0x84) /* Backup data register 29 (BKP_DR29) */ #define BKP_DR29 MMIO32(BACKUP_REGS_BASE + 0x88) /* Backup data register 30 (BKP_DR30) */ #define BKP_DR30 MMIO32(BACKUP_REGS_BASE + 0x8C) /* Backup data register 31 (BKP_DR31) */ #define BKP_DR31 MMIO32(BACKUP_REGS_BASE + 0x90) /* Backup data register 32 (BKP_DR32) */ #define BKP_DR32 MMIO32(BACKUP_REGS_BASE + 0x94) /* Backup data register 33 (BKP_DR33) */ #define BKP_DR33 MMIO32(BACKUP_REGS_BASE + 0x98) /* Backup data register 34 (BKP_DR34) */ #define BKP_DR34 MMIO32(BACKUP_REGS_BASE + 0x9C) /* Backup data register 35 (BKP_DR35) */ #define BKP_DR35 MMIO32(BACKUP_REGS_BASE + 0xA0) /* Backup data register 36 (BKP_DR36) */ #define BKP_DR36 MMIO32(BACKUP_REGS_BASE + 0xA4) /* Backup data register 37 (BKP_DR37) */ #define BKP_DR37 MMIO32(BACKUP_REGS_BASE + 0xA8) /* Backup data register 38 (BKP_DR38) */ #define BKP_DR38 MMIO32(BACKUP_REGS_BASE + 0xAC) /* Backup data register 39 (BKP_DR39) */ #define BKP_DR39 MMIO32(BACKUP_REGS_BASE + 0xB0) /* Backup data register 40 (BKP_DR40) */ #define BKP_DR40 MMIO32(BACKUP_REGS_BASE + 0xB4) /* Backup data register 41 (BKP_DR41) */ #define BKP_DR41 MMIO32(BACKUP_REGS_BASE + 0xB8) /* Backup data register 42 (BKP_DR42) */ #define BKP_DR42 MMIO32(BACKUP_REGS_BASE + 0xBC) /* --- BKP_RTCCR values ---------------------------------------------------- */ /* ASOS: Alarm or second output selection */ #define BKP_RTCCR_ASOS (1 << 9) /* ASOE: Alarm or second output enable */ #define BKP_RTCCR_ASOE (1 << 8) /* CCO: Calibration clock output */ #define BKP_RTCCR_CCO (1 << 7) /* CAL[6:0]: Calibration value */ #define BKP_RTCCR_CAL_LSB 0 /* --- BKP_CR values ------------------------------------------------------- */ /* TPAL: TAMPER pin active level */ #define BKP_CR_TAL (1 << 1) /* TPE: TAMPER pin enable */ #define BKP_CR_TPE (1 << 0) /* --- BKP_CSR values ------------------------------------------------------ */ /* TIF: Tamper interrupt flag */ #define BKP_CSR_TIF (1 << 9) /* TEF: Tamper event flag */ #define BKP_CSR_TEF (1 << 8) /* TPIE: TAMPER pin interrupt enable */ #define BKP_CSR_TPIE (1 << 2) /* CTI: Clear tamper interrupt */ #define BKP_CSR_CTI (1 << 1) /* CTE: Clear tamper event */ #define BKP_CSR_CTE (1 << 0) /* --- BKP_DRx values ------------------------------------------------------ */ /* Bits[15:0]: Backup data */ /* --- BKP function prototypes --------------------------------------------- */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/crc.h ================================================ /** @defgroup crc_defines CRC Defines @brief libopencm3 Defined Constants and Types for the STM32F1xx CRC Generator @ingroup STM32F1xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/dac.h ================================================ /** @defgroup dac_defines DAC Defines @brief Defined Constants and Types for the STM32F1xx DAC @ingroup STM32F1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/dma.h ================================================ /** @defgroup dma_defines DMA Defines @ingroup STM32F1xx_defines @brief Defined Constants and Types for the STM32F1xx DMA Controller @version 1.0.0 @date 30 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/doc-stm32f1.h ================================================ /** @mainpage libopencm3 STM32F1 @version 1.0.0 @date 7 September 2012 API documentation for ST Microelectronics STM32F1 Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F1xx STM32F1xx Libraries for ST Microelectronics STM32F1xx series. @version 1.0.0 @date 7 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F1xx_defines STM32F1xx Defines @brief Defined Constants and Types for the STM32F1xx series @version 1.0.0 @date 7 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/ethernet.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_ETHERNET_H #define LIBOPENCM3_ETHERNET_H #include #include /* Ethernet MAC registers */ #define ETH_MACCR MMIO32(ETHERNET_BASE + 0x00) #define ETH_MACFFR MMIO32(ETHERNET_BASE + 0x04) #define ETH_MACHTHR MMIO32(ETHERNET_BASE + 0x08) #define ETH_MACHTLR MMIO32(ETHERNET_BASE + 0x0C) #define ETH_MACMIIAR MMIO32(ETHERNET_BASE + 0x10) #define ETH_MACMIIDR MMIO32(ETHERNET_BASE + 0x14) #define ETH_MACFCR MMIO32(ETHERNET_BASE + 0x18) #define ETH_MACVLANTR MMIO32(ETHERNET_BASE + 0x1C) #define ETH_MACRWUFFR MMIO32(ETHERNET_BASE + 0x28) #define ETH_MACPMTCSR MMIO32(ETHERNET_BASE + 0x2C) #define ETH_MACSR MMIO32(ETHERNET_BASE + 0x38) #define ETH_MACIMR MMIO32(ETHERNET_BASE + 0x3C) #define ETH_MACA0HR MMIO32(ETHERNET_BASE + 0x40) #define ETH_MACA0LR MMIO32(ETHERNET_BASE + 0x44) #define ETH_MACA1HR MMIO32(ETHERNET_BASE + 0x48) #define ETH_MACA1LR MMIO32(ETHERNET_BASE + 0x4C) #define ETH_MACA2HR MMIO32(ETHERNET_BASE + 0x50) #define ETH_MACA2LR MMIO32(ETHERNET_BASE + 0x54) #define ETH_MACA3HR MMIO32(ETHERNET_BASE + 0x58) #define ETH_MACA3LR MMIO32(ETHERNET_BASE + 0x5C) /* Ethernet MMC registers */ #define ETH_MMCCR MMIO32(ETHERNET_BASE + 0x100) #define ETH_MMCRIR MMIO32(ETHERNET_BASE + 0x104) #define ETH_MMCTIR MMIO32(ETHERNET_BASE + 0x108) #define ETH_MMCRIMR MMIO32(ETHERNET_BASE + 0x10C) #define ETH_MMCTIMR MMIO32(ETHERNET_BASE + 0x110) #define ETH_MMCTGFSCCR MMIO32(ETHERNET_BASE + 0x14C) #define ETH_MMCTGFMSCCR MMIO32(ETHERNET_BASE + 0x150) #define ETH_MMCTGFCR MMIO32(ETHERNET_BASE + 0x168) #define ETH_MMCRFCECR MMIO32(ETHERNET_BASE + 0x194) #define ETH_MMCRFAECR MMIO32(ETHERNET_BASE + 0x198) #define ETH_MMCRGUFCR MMIO32(ETHERNET_BASE + 0x1C4) /* Ethrenet IEEE 1588 time stamp registers */ #define ETH_PTPTSCR MMIO32(ETHERNET_BASE + 0x700) #define ETH_PTPSSIR MMIO32(ETHERNET_BASE + 0x704) #define ETH_PTPTSHR MMIO32(ETHERNET_BASE + 0x708) #define ETH_PTPTSLR MMIO32(ETHERNET_BASE + 0x70C) #define ETH_PTPTSHUR MMIO32(ETHERNET_BASE + 0x710) #define ETH_PTPTSLUR MMIO32(ETHERNET_BASE + 0x714) #define ETH_PTPTSAR MMIO32(ETHERNET_BASE + 0x718) #define ETH_PTPTTHR MMIO32(ETHERNET_BASE + 0x71C) #define ETH_PTPTTLR MMIO32(ETHERNET_BASE + 0x720) /* Ethernet DMA registers */ #define ETH_DMABMR MMIO32(ETHERNET_BASE + 0x1000) #define ETH_DMATPDR MMIO32(ETHERNET_BASE + 0x1004) #define ETH_DMARPDR MMIO32(ETHERNET_BASE + 0x1008) #define ETH_DMARDLAR MMIO32(ETHERNET_BASE + 0x100C) #define ETH_DMATDLAR MMIO32(ETHERNET_BASE + 0x1010) #define ETH_DMATDLAR MMIO32(ETHERNET_BASE + 0x1010) #define ETH_DMASR MMIO32(ETHERNET_BASE + 0x1014) #define ETH_DMAOMR MMIO32(ETHERNET_BASE + 0x1018) #define ETH_DMAIER MMIO32(ETHERNET_BASE + 0x101C) #define ETH_DMAMFBOCR MMIO32(ETHERNET_BASE + 0x1020) #define ETH_DMACHTDR MMIO32(ETHERNET_BASE + 0x1048) #define ETH_DMACHRDR MMIO32(ETHERNET_BASE + 0x104C) #define ETH_DMACHTBAR MMIO32(ETHERNET_BASE + 0x1050) #define ETH_DMACHRBAR MMIO32(ETHERNET_BASE + 0x1054) /* Ethernet MAC Register bit definitions */ /* Ethernet MAC configuration register ETH_MACCR bits */ #define ETH_MACCR_RE 0x00000004 #define ETH_MACCR_TE 0x00000008 #define ETH_MACCR_DC 0x00000010 #define ETH_MACCR_BL 0x00000060 #define ETH_MACCR_APCS 0x00000080 #define ETH_MACCR_RD 0x00000200 #define ETH_MACCR_IPCO 0x00000400 #define ETH_MACCR_DM 0x00000800 #define ETH_MACCR_LM 0x00001000 #define ETH_MACCR_ROD 0x00002000 #define ETH_MACCR_FES 0x00004000 #define ETH_MACCR_CSD 0x00010000 #define ETH_MACCR_IFG 0x000E0000 #define ETH_MACCR_JD 0x00400000 #define ETH_MACCR_WD 0x00800000 /* Ethernet MAC frame filter register ETH_MACFFR bits */ #define ETH_MACFFR_PM 0x00000001 #define ETH_MACFFR_HU 0x00000002 #define ETH_MACFFR_HM 0x00000004 #define ETH_MACFFR_DAIF 0x00000008 #define ETH_MACFFR_PAM 0x00000010 #define ETH_MACFFR_BFD 0x00000020 #define ETH_MACFFR_PCF 0x000000C0 #define ETH_MACFFR_SAIF 0x00000100 #define ETH_MACFFR_SAF 0x00000200 #define ETH_MACFFR_HPF 0x00000400 #define ETH_MACFFR_PA 0x80000000 /* Ethernet MAC MII address register ETH_MACMIIAR bits */ #define ETH_MACMIIAR_MB 0x0001 #define ETH_MACMIIAR_MW 0x0002 /* Clock Range for MDC frequency */ #define ETH_MACMIIAR_CR_MASK 0x001C #define ETH_MACMIIAR_CR_HCLK_DIV_42 0x0000 /* For HCLK 60-72 MHz */ #define ETH_MACMIIAR_CR_HCLK_DIV_16 0x0008 /* For HCLK 20-35 MHz */ #define ETH_MACMIIAR_CR_HCLK_DIV_24 0x000C /* For HCLK 35-60 MHz */ #define ETH_MACMIIAR_MR 0x07C0 #define ETH_MACMIIAR_PA 0xF800 /* Ethernet MAC flow control register ETH_MACFCR bits */ #define ETH_MACFCR_FCB 0x00000001 #define ETH_MACFCR_BPA 0x00000001 #define ETH_MACFCR_TFCE 0x00000002 #define ETH_MACFCR_RFCE 0x00000004 #define ETH_MACFCR_UPFD 0x00000008 #define ETH_MACFCR_PLT 0x00000030 #define ETH_MACFCR_ZQPD 0x00000080 #define ETH_MACFCR_PT 0xFFFF0000 /* Ethernet MAC interrupt status register ETH_MACSR bits */ #define ETH_MACSR_PMTS 0x0008 #define ETH_MACSR_MMCS 0x0010 #define ETH_MACSR_MMCRS 0x0020 #define ETH_MACSR_MMCTS 0x0040 #define ETH_MACSR_TSTS 0x0200 /* Ethernet MAC interrupt mask register ETH_MACIMR bits */ #define ETH_MACIMR_PMTIM 0x0008 #define ETH_MACIMR_TSTIM 0x0200 /* Ethernet DMA Register bit definitions */ /* Ethernet DMA bus mode register ETH_DMABMR bits */ #define ETH_DMABMR_SR 0x00000001 #define ETH_DMABMR_DA 0x00000002 #define ETH_DMABMR_DSL_MASK 0x0000007C #define ETH_DMABMR_PBL_MASK 0x00003F00 #define ETH_DMABMR_RTPR_MASK 0x0000C000 #define ETH_DMABMR_RTPR_1TO1 0x00000000 #define ETH_DMABMR_RTPR_2TO1 0x00004000 #define ETH_DMABMR_RTPR_3TO1 0x00008000 #define ETH_DMABMR_RTPR_4TO1 0x0000C000 #define ETH_DMABMR_FB 0x00010000 #define ETH_DMABMR_RDP_MASK 0x007E0000 #define ETH_DMABMR_USP 0x00800000 #define ETH_DMABMR_FPM 0x01000000 #define ETH_DMABMR_AAB 0x02000000 /* Ethernet DMA operation mode register ETH_DMAOMR bits */ #define ETH_DMAOMR_SR 0x00000002 #define ETH_DMAOMR_OSF 0x00000004 #define ETH_DMAOMR_RTC_MASK 0x00000018 #define ETH_DMAOMR_RTC_64 0x00000000 #define ETH_DMAOMR_RTC_32 0x00000008 #define ETH_DMAOMR_RTC_96 0x00000010 #define ETH_DMAOMR_RTC_128 0x00000018 #define ETH_DMAOMR_FUGF 0x00000040 #define ETH_DMAOMR_FEF 0x00000080 #define ETH_DMAOMR_ST 0x00002000 #define ETH_DMAOMR_TTC_MASK 0x0001C000 #define ETH_DMAOMR_FTF 0x00100000 #define ETH_DMAOMR_TSF 0x00200000 #define ETH_DMAOMR_DFRF 0x01000000 #define ETH_DMAOMR_RSF 0x02000000 #define ETH_DMAOMR_DTCEFD 0x04000000 /* Ethernet DMA interrupt enable register ETH_DMAIER bits */ #define ETH_DMAIER_TIE 0x00000001 #define ETH_DMAIER_TPSIE 0x00000002 #define ETH_DMAIER_TBUIE 0x00000004 #define ETH_DMAIER_TJTIE 0x00000008 #define ETH_DMAIER_ROIE 0x00000010 #define ETH_DMAIER_TUIE 0x00000020 #define ETH_DMAIER_RIE 0x00000040 #define ETH_DMAIER_RBUIE 0x00000080 #define ETH_DMAIER_RPSIE 0x00000100 #define ETH_DMAIER_RWTIE 0x00000200 #define ETH_DMAIER_ETIE 0x00000400 #define ETH_DMAIER_FBEIE 0x00002000 #define ETH_DMAIER_ERIE 0x00004000 #define ETH_DMAIER_AISE 0x00008000 #define ETH_DMAIER_NSIE 0x00010000 BEGIN_DECLS void eth_smi_write(uint8_t phy, uint8_t reg, uint16_t data); uint16_t eth_smi_read(uint8_t phy, uint8_t reg); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/exti.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/flash.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * For details see: * PM0075 programming manual: STM32F10xxx Flash programming * August 2010, Doc ID 17863 Rev 1 * https://github.com/libopencm3/libopencm3-archive/blob/master/st_micro/CD00283419.pdf */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include /* --- FLASH registers ----------------------------------------------------- */ #define FLASH_ACR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x00) #define FLASH_KEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x04) #define FLASH_OPTKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x08) #define FLASH_SR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x0C) #define FLASH_CR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x10) #define FLASH_AR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x14) #define FLASH_OBR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x1C) #define FLASH_WRPR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x20) /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_PRFTBS (1 << 5) #define FLASH_ACR_PRFTBE (1 << 4) #define FLASH_ACR_HLFCYA (1 << 3) #define FLASH_ACR_LATENCY_0WS 0x00 #define FLASH_ACR_LATENCY_1WS 0x01 #define FLASH_ACR_LATENCY_2WS 0x02 /* --- FLASH_SR values ----------------------------------------------------- */ #define FLASH_SR_EOP (1 << 5) #define FLASH_SR_WRPRTERR (1 << 4) #define FLASH_SR_PGERR (1 << 2) #define FLASH_SR_BSY (1 << 0) /* --- FLASH_CR values ----------------------------------------------------- */ #define FLASH_CR_EOPIE (1 << 12) #define FLASH_CR_ERRIE (1 << 10) #define FLASH_CR_OPTWRE (1 << 9) #define FLASH_CR_LOCK (1 << 7) #define FLASH_CR_STRT (1 << 6) #define FLASH_CR_OPTER (1 << 5) #define FLASH_CR_OPTPG (1 << 4) #define FLASH_CR_MER (1 << 2) #define FLASH_CR_PER (1 << 1) #define FLASH_CR_PG (1 << 0) /* --- FLASH_OBR values ---------------------------------------------------- */ /* FLASH_OBR[25:18]: Data1 */ /* FLASH_OBR[17:10]: Data0 */ #define FLASH_OBR_NRST_STDBY (1 << 4) #define FLASH_OBR_NRST_STOP (1 << 3) #define FLASH_OBR_WDG_SW (1 << 2) #define FLASH_OBR_RDPRT (1 << 1) #define FLASH_OBR_OPTERR (1 << 0) /* --- FLASH Keys -----------------------------------------------------------*/ #define FLASH_RDP_KEY ((uint16_t)0x00a5) #define FLASH_KEYR_KEY1 ((uint32_t)0x45670123) #define FLASH_KEYR_KEY2 ((uint32_t)0xcdef89ab) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void flash_prefetch_buffer_enable(void); void flash_prefetch_buffer_disable(void); void flash_halfcycle_enable(void); void flash_halfcycle_disable(void); void flash_set_ws(uint32_t ws); void flash_unlock(void); void flash_lock(void); void flash_clear_pgerr_flag(void); void flash_clear_eop_flag(void); void flash_clear_wrprterr_flag(void); void flash_clear_bsy_flag(void); void flash_clear_status_flags(void); uint32_t flash_get_status_flags(void); void flash_unlock_option_bytes(void); void flash_erase_all_pages(void); void flash_erase_page(uint32_t page_address); void flash_program_word(uint32_t address, uint32_t data); void flash_program_half_word(uint32_t address, uint16_t data); void flash_wait_for_last_operation(void); void flash_erase_option_bytes(void); void flash_program_option_bytes(uint32_t address, uint16_t data); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the STM32F1xx General Purpose I/O @ingroup STM32F1xx_defines @version 1.0.0 @date 1 July 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Piotr Esden-Tempski * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ /** @defgroup gpio_port_id GPIO Port IDs @ingroup gpio_defines @{*/ /* GPIO port base addresses (for convenience) */ #define GPIOA GPIO_PORT_A_BASE #define GPIOB GPIO_PORT_B_BASE #define GPIOC GPIO_PORT_C_BASE #define GPIOD GPIO_PORT_D_BASE #define GPIOE GPIO_PORT_E_BASE #define GPIOF GPIO_PORT_F_BASE #define GPIOG GPIO_PORT_G_BASE /**@}*/ /* --- Alternate function GPIOs -------------------------------------------- */ /* Default alternate functions of some pins (with and without remapping) */ /* CAN1 / CAN GPIO */ #define GPIO_CAN1_RX GPIO11 /* PA11 */ #define GPIO_CAN1_TX GPIO12 /* PA12 */ #define GPIO_CAN_RX GPIO_CAN1_RX /* Alias */ #define GPIO_CAN_TX GPIO_CAN1_TX /* Alias */ #define GPIO_CAN_PB_RX GPIO8 /* PB8 */ #define GPIO_CAN_PB_TX GPIO9 /* PB9 */ #define GPIO_CAN1_PB_RX GPIO_CAN_PB_RX /* Alias */ #define GPIO_CAN1_PB_TX GPIO_CAN_PB_TX /* Alias */ #define GPIO_CAN_PD_RX GPIO0 /* PD0 */ #define GPIO_CAN_PD_TX GPIO1 /* PD1 */ #define GPIO_CAN1_PD_RX GPIO_CAN_PD_RX /* Alias */ #define GPIO_CAN1_PD_TX GPIO_CAN_PD_TX /* Alias */ /* CAN1 / CAN BANK */ #define GPIO_BANK_CAN1_RX GPIOA /* PA11 */ #define GPIO_BANK_CAN1_TX GPIOA /* PA12 */ #define GPIO_BANK_CAN_RX GPIO_BANK_CAN1_RX /* Alias */ #define GPIO_BANK_CAN_TX GPIO_BANK_CAN1_TX /* Alias */ #define GPIO_BANK_CAN_PB_RX GPIOB /* PB8 */ #define GPIO_BANK_CAN_PB_TX GPIOB /* PB9 */ #define GPIO_BANK_CAN1_PB_RX GPIO_BANK_CAN_PB_RX /* Alias */ #define GPIO_BANK_CAN1_PB_TX GPIO_BANK_CAN_PB_TX /* Alias */ #define GPIO_BANK_CAN_PD_RX GPIOD /* PD0 */ #define GPIO_BANK_CAN_PD_TX GPIOD /* PD1 */ #define GPIO_BANK_CAN1_PD_RX GPIO_BANK_CAN_PD_RX /* Alias */ #define GPIO_BANK_CAN1_PD_TX GPIO_BANK_CAN_PD_TX /* Alias */ /* CAN2 GPIO */ #define GPIO_CAN2_RX GPIO12 /* PB12 */ #define GPIO_CAN2_TX GPIO13 /* PB13 */ #define GPIO_CAN2_RE_RX GPIO5 /* PB5 */ #define GPIO_CAN2_RE_TX GPIO6 /* PB6 */ /* CAN2 BANK */ #define GPIO_BANK_CAN2_RX GPIOB /* PB12 */ #define GPIO_BANK_CAN2_TX GPIOB /* PB13 */ #define GPIO_BANK_CAN2_RE_RX GPIOB /* PB5 */ #define GPIO_BANK_CAN2_RE_TX GPIOB /* PB6 */ /* JTAG/SWD GPIO */ #define GPIO_JTMS_SWDIO GPIO13 /* PA13 */ #define GPIO_JTCK_SWCLK GPIO14 /* PA14 */ #define GPIO_JTDI GPIO15 /* PA15 */ #define GPIO_JTDO_TRACESWO GPIO3 /* PB3 */ #define GPIO_JNTRST GPIO4 /* PB4 */ #define GPIO_TRACECK GPIO2 /* PE2 */ #define GPIO_TRACED0 GPIO3 /* PE3 */ #define GPIO_TRACED1 GPIO4 /* PE4 */ #define GPIO_TRACED2 GPIO5 /* PE5 */ #define GPIO_TRACED3 GPIO6 /* PE6 */ /* JTAG/SWD BANK */ #define GPIO_BANK_JTMS_SWDIO GPIOA /* PA13 */ #define GPIO_BANK_JTCK_SWCLK GPIOA /* PA14 */ #define GPIO_BANK_JTDI GPIOA /* PA15 */ #define GPIO_BANK_JTDO_TRACESWO GPIOB /* PB3 */ #define GPIO_BANK_JNTRST GPIOB /* PB4 */ #define GPIO_BANK_TRACECK GPIOE /* PE2 */ #define GPIO_BANK_TRACED0 GPIOE /* PE3 */ #define GPIO_BANK_TRACED1 GPIOE /* PE4 */ #define GPIO_BANK_TRACED2 GPIOE /* PE5 */ #define GPIO_BANK_TRACED3 GPIOE /* PE6 */ /* Timer5 GPIO */ #define GPIO_TIM5_CH1 GPIO0 /* PA0 */ #define GPIO_TIM5_CH2 GPIO1 /* PA1 */ #define GPIO_TIM5_CH3 GPIO2 /* PA2 */ #define GPIO_TIM5_CH4 GPIO3 /* PA3 */ /* Timer5 BANK */ #define GPIO_BANK_TIM5_CH1 GPIOA /* PA0 */ #define GPIO_BANK_TIM5_CH2 GPIOA /* PA1 */ #define GPIO_BANK_TIM5_CH3 GPIOA /* PA2 */ #define GPIO_BANK_TIM5_CH4 GPIOA /* PA3 */ #define GPIO_BANK_TIM5 GPIOA /* Timer4 GPIO */ #define GPIO_TIM4_CH1 GPIO6 /* PB6 */ #define GPIO_TIM4_CH2 GPIO7 /* PB7 */ #define GPIO_TIM4_CH3 GPIO8 /* PB8 */ #define GPIO_TIM4_CH4 GPIO9 /* PB9 */ #define GPIO_TIM4_RE_CH1 GPIO12 /* PD12 */ #define GPIO_TIM4_RE_CH2 GPIO13 /* PD13 */ #define GPIO_TIM4_RE_CH3 GPIO14 /* PD14 */ #define GPIO_TIM4_RE_CH4 GPIO15 /* PD15 */ /* Timer4 BANK */ #define GPIO_BANK_TIM4_CH1 GPIOB /* PB6 */ #define GPIO_BANK_TIM4_CH2 GPIOB /* PB7 */ #define GPIO_BANK_TIM4_CH3 GPIOB /* PB8 */ #define GPIO_BANK_TIM4_CH4 GPIOB /* PB9 */ #define GPIO_BANK_TIM4 GPIOB #define GPIO_BANK_TIM4_RE_CH1 GPIOD /* PD12 */ #define GPIO_BANK_TIM4_RE_CH2 GPIOD /* PD13 */ #define GPIO_BANK_TIM4_RE_CH3 GPIOD /* PD14 */ #define GPIO_BANK_TIM4_RE_CH4 GPIOD /* PD15 */ #define GPIO_BANK_TIM4_RE GPIOD /* Timer3 GPIO */ #define GPIO_TIM3_CH1 GPIO6 /* PA6 */ #define GPIO_TIM3_CH2 GPIO7 /* PA7 */ #define GPIO_TIM3_CH3 GPIO0 /* PB0 */ #define GPIO_TIM3_CH4 GPIO1 /* PB1 */ #define GPIO_TIM3_PR_CH1 GPIO4 /* PB4 */ #define GPIO_TIM3_PR_CH2 GPIO5 /* PB5 */ #define GPIO_TIM3_PR_CH3 GPIO0 /* PB0 */ #define GPIO_TIM3_PR_CH4 GPIO1 /* PB1 */ #define GPIO_TIM3_FR_CH1 GPIO6 /* PC6 */ #define GPIO_TIM3_FR_CH2 GPIO7 /* PC7 */ #define GPIO_TIM3_FR_CH3 GPIO8 /* PC8 */ #define GPIO_TIM3_FR_CH4 GPIO9 /* PC9 */ /* Timer3 BANK */ #define GPIO_BANK_TIM3_CH1 GPIOA /* PA6 */ #define GPIO_BANK_TIM3_CH2 GPIOA /* PA7 */ #define GPIO_BANK_TIM3_CH3 GPIOB /* PB0 */ #define GPIO_BANK_TIM3_CH4 GPIOB /* PB1 */ #define GPIO_BANK_TIM3_CH12 GPIOA #define GPIO_BANK_TIM3_CH34 GPIOB #define GPIO_BANK_TIM3_PR_CH1 GPIOB /* PB4 */ #define GPIO_BANK_TIM3_PR_CH2 GPIOB /* PB5 */ #define GPIO_BANK_TIM3_PR_CH3 GPIOB /* PB0 */ #define GPIO_BANK_TIM3_PR_CH4 GPIOB /* PB1 */ #define GPIO_BANK_TIM3_PR GPIOB #define GPIO_BANK_TIM3_FR_CH1 GPIOC /* PC6 */ #define GPIO_BANK_TIM3_FR_CH2 GPIOC /* PC7 */ #define GPIO_BANK_TIM3_FR_CH3 GPIOC /* PC8 */ #define GPIO_BANK_TIM3_FR_CH4 GPIOC /* PC9 */ #define GPIO_BANK_TIM3_FR GPIOC /* Timer2 GPIO */ #define GPIO_TIM2_CH1_ETR GPIO0 /* PA0 */ #define GPIO_TIM2_CH2 GPIO1 /* PA1 */ #define GPIO_TIM2_CH3 GPIO2 /* PA2 */ #define GPIO_TIM2_CH4 GPIO3 /* PA3 */ #define GPIO_TIM2_PR1_CH1_ETR GPIO15 /* PA15 */ #define GPIO_TIM2_PR1_CH2 GPIO3 /* PB3 */ #define GPIO_TIM2_PR1_CH3 GPIO2 /* PA2 */ #define GPIO_TIM2_PR1_CH4 GPIO3 /* PA3 */ #define GPIO_TIM2_PR2_CH1_ETR GPIO0 /* PA0 */ #define GPIO_TIM2_PR2_CH2 GPIO1 /* PA1 */ #define GPIO_TIM2_PR2_CH3 GPIO10 /* PB10 */ #define GPIO_TIM2_PR2_CH4 GPIO11 /* PB11 */ #define GPIO_TIM2_FR_CH1_ETR GPIO15 /* PA15 */ #define GPIO_TIM2_FR_CH2 GPIO3 /* PB3 */ #define GPIO_TIM2_FR_CH3 GPIO10 /* PB10 */ #define GPIO_TIM2_FR_CH4 GPIO11 /* PB11 */ /* Timer2 BANK */ #define GPIO_BANK_TIM2_CH1_ETR GPIOA /* PA0 */ #define GPIO_BANK_TIM2_CH2 GPIOA /* PA1 */ #define GPIO_BANK_TIM2_CH3 GPIOA /* PA2 */ #define GPIO_BANK_TIM2_CH4 GPIOA /* PA3 */ #define GPIO_BANK_TIM2 GPIOA #define GPIO_BANK_TIM2_PR1_CH1_ETR GPIOA /* PA15 */ #define GPIO_BANK_TIM2_PR1_CH2 GPIOB /* PB3 */ #define GPIO_BANK_TIM2_PR1_CH3 GPIOA /* PA2 */ #define GPIO_BANK_TIM2_PR1_CH4 GPIOA /* PA3 */ #define GPIO_BANK_TIM2_PR1_CH134 GPIOA #define GPIO_BANK_TIM2_PR2_CH1_ETR GPIOA /* PA0 */ #define GPIO_BANK_TIM2_PR2_CH2 GPIOA /* PA1 */ #define GPIO_BANK_TIM2_PR2_CH3 GPIOB /* PB10 */ #define GPIO_BANK_TIM2_PR2_CH4 GPIOB /* PB11 */ #define GPIO_BANK_TIM2_PR2_CH12 GPIOA #define GPIO_BANK_TIM2_PR2_CH34 GPIOB #define GPIO_BANK_TIM2_FR_CH1_ETR GPIOA /* PA15 */ #define GPIO_BANK_TIM2_FR_CH2 GPIOB /* PB3 */ #define GPIO_BANK_TIM2_FR_CH3 GPIOB /* PB10 */ #define GPIO_BANK_TIM2_FR_CH4 GPIOB /* PB11 */ #define GPIO_BANK_TIM2_FR_CH234 GPIOB /* Timer1 GPIO */ #define GPIO_TIM1_ETR GPIO12 /* PA12 */ #define GPIO_TIM1_CH1 GPIO8 /* PA8 */ #define GPIO_TIM1_CH2 GPIO9 /* PA9 */ #define GPIO_TIM1_CH3 GPIO10 /* PA10 */ #define GPIO_TIM1_CH4 GPIO11 /* PA11 */ #define GPIO_TIM1_BKIN GPIO12 /* PB12 */ #define GPIO_TIM1_CH1N GPIO13 /* PB13 */ #define GPIO_TIM1_CH2N GPIO14 /* PB14 */ #define GPIO_TIM1_CH3N GPIO15 /* PB15 */ #define GPIO_TIM1_PR_ETR GPIO12 /* PA12 */ #define GPIO_TIM1_PR_CH1 GPIO8 /* PA8 */ #define GPIO_TIM1_PR_CH2 GPIO9 /* PA9 */ #define GPIO_TIM1_PR_CH3 GPIO10 /* PA10 */ #define GPIO_TIM1_PR_CH4 GPIO11 /* PA11 */ #define GPIO_TIM1_PR_BKIN GPIO6 /* PA6 */ #define GPIO_TIM1_PR_CH1N GPIO7 /* PA7 */ #define GPIO_TIM1_PR_CH2N GPIO0 /* PB0 */ #define GPIO_TIM1_PR_CH3N GPIO1 /* PB1 */ #define GPIO_TIM1_FR_ETR GPIO7 /* PE7 */ #define GPIO_TIM1_FR_CH1 GPIO9 /* PE9 */ #define GPIO_TIM1_FR_CH2 GPIO11 /* PE11 */ #define GPIO_TIM1_FR_CH3 GPIO13 /* PE13 */ #define GPIO_TIM1_FR_CH4 GPIO14 /* PE14 */ #define GPIO_TIM1_FR_BKIN GPIO15 /* PE15 */ #define GPIO_TIM1_FR_CH1N GPIO8 /* PE8 */ #define GPIO_TIM1_FR_CH2N GPIO10 /* PE10 */ #define GPIO_TIM1_FR_CH3N GPIO12 /* PE12 */ /* Timer1 BANK */ #define GPIO_BANK_TIM1_ETR GPIOA /* PA12 */ #define GPIO_BANK_TIM1_CH1 GPIOA /* PA8 */ #define GPIO_BANK_TIM1_CH2 GPIOA /* PA9 */ #define GPIO_BANK_TIM1_CH3 GPIOA /* PA10 */ #define GPIO_BANK_TIM1_CH4 GPIOA /* PA11 */ #define GPIO_BANK_TIM1_BKIN GPIOB /* PB12 */ #define GPIO_BANK_TIM1_CH1N GPIOB /* PB13 */ #define GPIO_BANK_TIM1_CH2N GPIOB /* PB14 */ #define GPIO_BANK_TIM1_CH3N GPIOB /* PB15 */ #define GPIO_BANK_TIM1_ETR_CH1234 GPIOA #define GPIO_BANK_TIM1_BKIN_CH123N GPIOB #define GPIO_BANK_TIM1_PR_ETR GPIOA /* PA12 */ #define GPIO_BANK_TIM1_PR_CH1 GPIOA /* PA8 */ #define GPIO_BANK_TIM1_PR_CH2 GPIOA /* PA9 */ #define GPIO_BANK_TIM1_PR_CH3 GPIOA /* PA10 */ #define GPIO_BANK_TIM1_PR_CH4 GPIOA /* PA11 */ #define GPIO_BANK_TIM1_PR_BKIN GPIOA /* PA6 */ #define GPIO_BANK_TIM1_PR_CH1N GPIOA /* PA7 */ #define GPIO_BANK_TIM1_PR_CH2N GPIOB /* PB0 */ #define GPIO_BANK_TIM1_PR_CH3N GPIOB /* PB1 */ #define GPIO_BANK_TIM1_PR_ETR_CH1234_BKIN_CH1N GPIOA #define GPIO_BANK_TIM1_PR_CH23N GPIOB #define GPIO_BANK_TIM1_FR_ETR GPIOE /* PE7 */ #define GPIO_BANK_TIM1_FR_CH1 GPIOE /* PE9 */ #define GPIO_BANK_TIM1_FR_CH2 GPIOE /* PE11 */ #define GPIO_BANK_TIM1_FR_CH3 GPIOE /* PE13 */ #define GPIO_BANK_TIM1_FR_CH4 GPIOE /* PE14 */ #define GPIO_BANK_TIM1_FR_BKIN GPIOE /* PE15 */ #define GPIO_BANK_TIM1_FR_CH1N GPIOE /* PE8 */ #define GPIO_BANK_TIM1_FR_CH2N GPIOE /* PE10 */ #define GPIO_BANK_TIM1_FR_CH3N GPIOE /* PE12 */ #define GPIO_BANK_TIM1_FR GPIOE /* UART5 GPIO */ #define GPIO_UART5_TX GPIO12 /* PC12 */ #define GPIO_UART5_RX GPIO2 /* PD2 */ /* UART5 BANK */ #define GPIO_BANK_UART5_TX GPIOC /* PC12 */ #define GPIO_BANK_UART5_RX GPIOD /* PD2 */ /* UART4 GPIO */ #define GPIO_UART4_TX GPIO10 /* PC10 */ #define GPIO_UART4_RX GPIO11 /* PC11 */ /* UART4 BANK */ #define GPIO_BANK_UART4_TX GPIOC /* PC10 */ #define GPIO_BANK_UART4_RX GPIOC /* PC11 */ /* USART3 GPIO */ #define GPIO_USART3_TX GPIO10 /* PB10 */ #define GPIO_USART3_RX GPIO11 /* PB11 */ #define GPIO_USART3_CK GPIO12 /* PB12 */ #define GPIO_USART3_CTS GPIO13 /* PB13 */ #define GPIO_USART3_RTS GPIO14 /* PB14 */ #define GPIO_USART3_PR_TX GPIO10 /* PC10 */ #define GPIO_USART3_PR_RX GPIO11 /* PC11 */ #define GPIO_USART3_PR_CK GPIO12 /* PC12 */ #define GPIO_USART3_PR_CTS GPIO13 /* PB13 */ #define GPIO_USART3_PR_RTS GPIO14 /* PB14 */ #define GPIO_USART3_FR_TX GPIO8 /* PD8 */ #define GPIO_USART3_FR_RX GPIO9 /* PD9 */ #define GPIO_USART3_FR_CK GPIO10 /* PD10 */ #define GPIO_USART3_FR_CTS GPIO11 /* PD11 */ #define GPIO_USART3_FR_RTS GPIO12 /* PD12 */ /* USART3 BANK */ #define GPIO_BANK_USART3_TX GPIOB /* PB10 */ #define GPIO_BANK_USART3_RX GPIOB /* PB11 */ #define GPIO_BANK_USART3_CK GPIOB /* PB12 */ #define GPIO_BANK_USART3_CTS GPIOB /* PB13 */ #define GPIO_BANK_USART3_RTS GPIOB /* PB14 */ #define GPIO_BANK_USART3_PR_TX GPIOC /* PC10 */ #define GPIO_BANK_USART3_PR_RX GPIOC /* PC11 */ #define GPIO_BANK_USART3_PR_CK GPIOC /* PC12 */ #define GPIO_BANK_USART3_PR_CTS GPIOB /* PB13 */ #define GPIO_BANK_USART3_PR_RTS GPIOB /* PB14 */ #define GPIO_BANK_USART3_FR_TX GPIOD /* PD8 */ #define GPIO_BANK_USART3_FR_RX GPIOD /* PD9 */ #define GPIO_BANK_USART3_FR_CK GPIOD /* PD10 */ #define GPIO_BANK_USART3_FR_CTS GPIOD /* PD11 */ #define GPIO_BANK_USART3_FR_RTS GPIOD /* PD12 */ /* USART2 GPIO */ #define GPIO_USART2_CTS GPIO0 /* PA0 */ #define GPIO_USART2_RTS GPIO1 /* PA1 */ #define GPIO_USART2_TX GPIO2 /* PA2 */ #define GPIO_USART2_RX GPIO3 /* PA3 */ #define GPIO_USART2_CK GPIO4 /* PA4 */ #define GPIO_USART2_RE_CTS GPIO3 /* PD3 */ #define GPIO_USART2_RE_RTS GPIO4 /* PD4 */ #define GPIO_USART2_RE_TX GPIO5 /* PD5 */ #define GPIO_USART2_RE_RX GPIO6 /* PD6 */ #define GPIO_USART2_RE_CK GPIO7 /* PD7 */ /* USART2 BANK */ #define GPIO_BANK_USART2_CTS GPIOA /* PA0 */ #define GPIO_BANK_USART2_RTS GPIOA /* PA1 */ #define GPIO_BANK_USART2_TX GPIOA /* PA2 */ #define GPIO_BANK_USART2_RX GPIOA /* PA3 */ #define GPIO_BANK_USART2_CK GPIOA /* PA4 */ #define GPIO_BANK_USART2_RE_CTS GPIOD /* PD3 */ #define GPIO_BANK_USART2_RE_RTS GPIOD /* PD4 */ #define GPIO_BANK_USART2_RE_TX GPIOD /* PD5 */ #define GPIO_BANK_USART2_RE_RX GPIOD /* PD6 */ #define GPIO_BANK_USART2_RE_CK GPIOD /* PD7 */ /* USART1 GPIO */ #define GPIO_USART1_TX GPIO9 /* PA9 */ #define GPIO_USART1_RX GPIO10 /* PA10 */ #define GPIO_USART1_RE_TX GPIO6 /* PB6 */ #define GPIO_USART1_RE_RX GPIO7 /* PB7 */ /* USART1 BANK */ #define GPIO_BANK_USART1_TX GPIOA /* PA9 */ #define GPIO_BANK_USART1_RX GPIOA /* PA10 */ #define GPIO_BANK_USART1_RE_TX GPIOB /* PB6 */ #define GPIO_BANK_USART1_RE_RX GPIOB /* PB7 */ /* I2C1 GPIO */ #define GPIO_I2C1_SMBAI GPIO5 /* PB5 */ #define GPIO_I2C1_SCL GPIO6 /* PB6 */ #define GPIO_I2C1_SDA GPIO7 /* PB7 */ #define GPIO_I2C1_RE_SMBAI GPIO5 /* PB5 */ #define GPIO_I2C1_RE_SCL GPIO8 /* PB8 */ #define GPIO_I2C1_RE_SDA GPIO9 /* PB9 */ /* I2C1 BANK */ #define GPIO_BANK_I2C1_SMBAI GPIOB /* PB5 */ #define GPIO_BANK_I2C1_SCL GPIOB /* PB6 */ #define GPIO_BANK_I2C1_SDA GPIOB /* PB7 */ #define GPIO_BANK_I2C1_RE_SMBAI GPIOB /* PB5 */ #define GPIO_BANK_I2C1_RE_SCL GPIOB /* PB8 */ #define GPIO_BANK_I2C1_RE_SDA GPIOB /* PB9 */ /* I2C2 GPIO */ #define GPIO_I2C2_SCL GPIO10 /* PB10 */ #define GPIO_I2C2_SDA GPIO11 /* PB11 */ #define GPIO_I2C2_SMBAI GPIO12 /* PB12 */ /* I2C2 BANK */ #define GPIO_BANK_I2C2_SCL GPIOB /* PB10 */ #define GPIO_BANK_I2C2_SDA GPIOB /* PB11 */ #define GPIO_BANK_I2C2_SMBAI GPIOB /* PB12 */ /* SPI1 GPIO */ #define GPIO_SPI1_NSS GPIO4 /* PA4 */ #define GPIO_SPI1_SCK GPIO5 /* PA5 */ #define GPIO_SPI1_MISO GPIO6 /* PA6 */ #define GPIO_SPI1_MOSI GPIO7 /* PA7 */ #define GPIO_SPI1_RE_NSS GPIO15 /* PA15 */ #define GPIO_SPI1_RE_SCK GPIO3 /* PB3 */ #define GPIO_SPI1_RE_MISO GPIO4 /* PB4 */ #define GPIO_SPI1_RE_MOSI GPIO5 /* PB5 */ /* SPI1 BANK */ #define GPIO_BANK_SPI1_NSS GPIOA /* PA4 */ #define GPIO_BANK_SPI1_SCK GPIOA /* PA5 */ #define GPIO_BANK_SPI1_MISO GPIOA /* PA6 */ #define GPIO_BANK_SPI1_MOSI GPIOA /* PA7 */ #define GPIO_BANK_SPI1_RE_NSS GPIOA /* PA15 */ #define GPIO_BANK_SPI1_RE_SCK GPIOB /* PB3 */ #define GPIO_BANK_SPI1_RE_MISO GPIOB /* PB4 */ #define GPIO_BANK_SPI1_RE_MOSI GPIOB /* PB5 */ /* SPI2 GPIO */ #define GPIO_SPI2_NSS GPIO12 /* PB12 */ #define GPIO_SPI2_SCK GPIO13 /* PB13 */ #define GPIO_SPI2_MISO GPIO14 /* PB14 */ #define GPIO_SPI2_MOSI GPIO15 /* PB15 */ /* SPI2 BANK */ #define GPIO_BANK_SPI2_NSS GPIOB /* PB12 */ #define GPIO_BANK_SPI2_SCK GPIOB /* PB13 */ #define GPIO_BANK_SPI2_MISO GPIOB /* PB14 */ #define GPIO_BANK_SPI2_MOSI GPIOB /* PB15 */ /* SPI3 GPIO */ #define GPIO_SPI3_NSS GPIO15 /* PA15 */ #define GPIO_SPI3_SCK GPIO3 /* PB3 */ #define GPIO_SPI3_MISO GPIO4 /* PB4 */ #define GPIO_SPI3_MOSI GPIO5 /* PB5 */ #define GPIO_SPI3_RE_NSS GPIO4 /* PA4 */ #define GPIO_SPI3_RE_SCK GPIO10 /* PC10 */ #define GPIO_SPI3_RE_MISO GPIO11 /* PC11 */ #define GPIO_SPI3_RE_MOSI GPIO12 /* PC12 */ /* SPI3 BANK */ #define GPIO_BANK_SPI3_NSS GPIOA /* PA15 */ #define GPIO_BANK_SPI3_SCK GPIOB /* PB3 */ #define GPIO_BANK_SPI3_MISO GPIOB /* PB4 */ #define GPIO_BANK_SPI3_MOSI GPIOB /* PB5 */ #define GPIO_BANK_SPI3_RE_NSS GPIOA /* PA4 */ #define GPIO_BANK_SPI3_RE_SCK GPIOC /* PC10 */ #define GPIO_BANK_SPI3_RE_MISO GPIOC /* PC11 */ #define GPIO_BANK_SPI3_RE_MOSI GPIOC /* PC12 */ /* ETH GPIO */ #define GPIO_ETH_RX_DV_CRS_DV GPIO7 /* PA7 */ #define GPIO_ETH_RXD0 GPIO4 /* PC4 */ #define GPIO_ETH_RXD1 GPIO5 /* PC5 */ #define GPIO_ETH_RXD2 GPIO0 /* PB0 */ #define GPIO_ETH_RXD3 GPIO1 /* PB1 */ #define GPIO_ETH_RE_RX_DV_CRS_DV GPIO8 /* PD8 */ #define GPIO_ETH_RE_RXD0 GPIO9 /* PD9 */ #define GPIO_ETH_RE_RXD1 GPIO10 /* PD10 */ #define GPIO_ETH_RE_RXD2 GPIO11 /* PD11 */ #define GPIO_ETH_RE_RXD3 GPIO12 /* PD12 */ /* ETH BANK */ #define GPIO_BANK_ETH_RX_DV_CRS_DV GPIOA /* PA7 */ #define GPIO_BANK_ETH_RXD0 GPIOC /* PC4 */ #define GPIO_BANK_ETH_RXD1 GPIOC /* PC5 */ #define GPIO_BANK_ETH_RXD2 GPIOB /* PB0 */ #define GPIO_BANK_ETH_RXD3 GPIOB /* PB1 */ #define GPIO_BANK_ETH_RE_RX_DV_CRS_DV GPIOD /* PD8 */ #define GPIO_BANK_ETH_RE_RXD0 GPIOD /* PD9 */ #define GPIO_BANK_ETH_RE_RXD1 GPIOD /* PD10 */ #define GPIO_BANK_ETH_RE_RXD2 GPIOD /* PD11 */ #define GPIO_BANK_ETH_RE_RXD3 GPIOD /* PD12 */ /* --- GPIO registers ------------------------------------------------------ */ /* Port configuration register low (GPIOx_CRL) */ #define GPIO_CRL(port) MMIO32(port + 0x00) #define GPIOA_CRL GPIO_CRL(GPIOA) #define GPIOB_CRL GPIO_CRL(GPIOB) #define GPIOC_CRL GPIO_CRL(GPIOC) #define GPIOD_CRL GPIO_CRL(GPIOD) #define GPIOE_CRL GPIO_CRL(GPIOE) #define GPIOF_CRL GPIO_CRL(GPIOF) #define GPIOG_CRL GPIO_CRL(GPIOG) /* Port configuration register low (GPIOx_CRH) */ #define GPIO_CRH(port) MMIO32(port + 0x04) #define GPIOA_CRH GPIO_CRH(GPIOA) #define GPIOB_CRH GPIO_CRH(GPIOB) #define GPIOC_CRH GPIO_CRH(GPIOC) #define GPIOD_CRH GPIO_CRH(GPIOD) #define GPIOE_CRH GPIO_CRH(GPIOE) #define GPIOF_CRH GPIO_CRH(GPIOF) #define GPIOG_CRH GPIO_CRH(GPIOG) /* Port input data register (GPIOx_IDR) */ #define GPIO_IDR(port) MMIO32(port + 0x08) #define GPIOA_IDR GPIO_IDR(GPIOA) #define GPIOB_IDR GPIO_IDR(GPIOB) #define GPIOC_IDR GPIO_IDR(GPIOC) #define GPIOD_IDR GPIO_IDR(GPIOD) #define GPIOE_IDR GPIO_IDR(GPIOE) #define GPIOF_IDR GPIO_IDR(GPIOF) #define GPIOG_IDR GPIO_IDR(GPIOG) /* Port output data register (GPIOx_ODR) */ #define GPIO_ODR(port) MMIO32(port + 0x0c) #define GPIOA_ODR GPIO_ODR(GPIOA) #define GPIOB_ODR GPIO_ODR(GPIOB) #define GPIOC_ODR GPIO_ODR(GPIOC) #define GPIOD_ODR GPIO_ODR(GPIOD) #define GPIOE_ODR GPIO_ODR(GPIOE) #define GPIOF_ODR GPIO_ODR(GPIOF) #define GPIOG_ODR GPIO_ODR(GPIOG) /* Port bit set/reset register (GPIOx_BSRR) */ #define GPIO_BSRR(port) MMIO32(port + 0x10) #define GPIOA_BSRR GPIO_BSRR(GPIOA) #define GPIOB_BSRR GPIO_BSRR(GPIOB) #define GPIOC_BSRR GPIO_BSRR(GPIOC) #define GPIOD_BSRR GPIO_BSRR(GPIOD) #define GPIOE_BSRR GPIO_BSRR(GPIOE) #define GPIOF_BSRR GPIO_BSRR(GPIOF) #define GPIOG_BSRR GPIO_BSRR(GPIOG) /* Port bit reset register (GPIOx_BRR) */ #define GPIO_BRR(port) MMIO16(port + 0x14) #define GPIOA_BRR GPIO_BRR(GPIOA) #define GPIOB_BRR GPIO_BRR(GPIOB) #define GPIOC_BRR GPIO_BRR(GPIOC) #define GPIOD_BRR GPIO_BRR(GPIOD) #define GPIOE_BRR GPIO_BRR(GPIOE) #define GPIOF_BRR GPIO_BRR(GPIOF) #define GPIOG_BRR GPIO_BRR(GPIOG) /* Port configuration lock register (GPIOx_LCKR) */ #define GPIO_LCKR(port) MMIO32(port + 0x18) #define GPIOA_LCKR GPIO_LCKR(GPIOA) #define GPIOB_LCKR GPIO_LCKR(GPIOB) #define GPIOC_LCKR GPIO_LCKR(GPIOC) #define GPIOD_LCKR GPIO_LCKR(GPIOD) #define GPIOE_LCKR GPIO_LCKR(GPIOE) #define GPIOF_LCKR GPIO_LCKR(GPIOF) #define GPIOG_LCKR GPIO_LCKR(GPIOG) /* --- GPIO_CRL/GPIO_CRH values -------------------------------------------- */ /** @defgroup gpio_cnf GPIO Pin Configuration @ingroup gpio_defines If mode specifies input, configuration can be @li Analog input @li Floating input @li Pull up/down input If mode specifies output, configuration can be @li Digital push-pull @li Digital open drain @li Alternate function push-pull or analog output @li Alternate function open drain or analog output @{*/ /* CNF[1:0] values when MODE[1:0] is 00 (input mode) */ /** Analog Input */ #define GPIO_CNF_INPUT_ANALOG 0x00 /** Digital Input Floating */ #define GPIO_CNF_INPUT_FLOAT 0x01 /* Default */ /** Digital Input Pull Up and Down */ #define GPIO_CNF_INPUT_PULL_UPDOWN 0x02 /* CNF[1:0] values when MODE[1:0] is != 00 (one of the output modes) */ /** Digital Output Pushpull */ #define GPIO_CNF_OUTPUT_PUSHPULL 0x00 /** Digital Output Open Drain */ #define GPIO_CNF_OUTPUT_OPENDRAIN 0x01 /** Alternate Function Output Pushpull */ #define GPIO_CNF_OUTPUT_ALTFN_PUSHPULL 0x02 /** Alternate Function Output Open Drain */ #define GPIO_CNF_OUTPUT_ALTFN_OPENDRAIN 0x03 /**@}*/ /* Pin mode (MODE[1:0]) values */ /** @defgroup gpio_mode GPIO Pin Mode @ingroup gpio_defines @li Input (default after reset) @li Output mode at 10 MHz maximum speed @li Output mode at 2 MHz maximum speed @li Output mode at 50 MHz maximum speed @{*/ #define GPIO_MODE_INPUT 0x00 /* Default */ #define GPIO_MODE_OUTPUT_10_MHZ 0x01 #define GPIO_MODE_OUTPUT_2_MHZ 0x02 #define GPIO_MODE_OUTPUT_50_MHZ 0x03 /**@}*/ /* --- GPIO_IDR values ----------------------------------------------------- */ /* GPIO_IDR[15:0]: IDRy[15:0]: Port input data (y = 0..15) */ /* --- GPIO_ODR values ----------------------------------------------------- */ /* GPIO_ODR[15:0]: ODRy[15:0]: Port output data (y = 0..15) */ /* --- GPIO_BSRR values ---------------------------------------------------- */ /* GPIO_BSRR[31:16]: BRy: Port x reset bit y (y = 0..15) */ /* GPIO_BSRR[15:0]: BSy: Port x set bit y (y = 0..15) */ /* --- GPIO_BRR values ----------------------------------------------------- */ /* GPIO_BRR[15:0]: BRy: Port x reset bit y (y = 0..15) */ /* --- AFIO registers ------------------------------------------------------ */ /* Event control register (AFIO_EVCR) */ #define AFIO_EVCR MMIO32(AFIO_BASE + 0x00) /* AF remap and debug I/O configuration register (AFIO_MAPR) */ #define AFIO_MAPR MMIO32(AFIO_BASE + 0x04) /* External interrupt configuration register [0..3] (AFIO_EXTICR[1..4])*/ #define AFIO_EXTICR(i) MMIO32(AFIO_BASE + 0x08 + (i)*4) #define AFIO_EXTICR1 AFIO_EXTICR(0) #define AFIO_EXTICR2 AFIO_EXTICR(1) #define AFIO_EXTICR3 AFIO_EXTICR(2) #define AFIO_EXTICR4 AFIO_EXTICR(3) /* AF remap and debug I/O configuration register (AFIO_MAPR) */ #define AFIO_MAPR2 MMIO32(AFIO_BASE + 0x1C) /* --- AFIO_EVCR values ---------------------------------------------------- */ /* EVOE: Event output enable */ #define AFIO_EVCR_EVOE (1 << 7) /* PORT[2:0]: Port selection */ /** @defgroup afio_evcr_port EVENTOUT Port selection @ingroup gpio_defines @{*/ #define AFIO_EVCR_PORT_PA (0x0 << 4) #define AFIO_EVCR_PORT_PB (0x1 << 4) #define AFIO_EVCR_PORT_PC (0x2 << 4) #define AFIO_EVCR_PORT_PD (0x3 << 4) #define AFIO_EVCR_PORT_PE (0x4 << 4) /**@}*/ /* PIN[3:0]: Pin selection */ /** @defgroup afio_evcr_pin EVENTOUT Pin selection @ingroup gpio_defines @{*/ #define AFIO_EVCR_PIN_Px0 (0x0 << 0) #define AFIO_EVCR_PIN_Px1 (0x1 << 0) #define AFIO_EVCR_PIN_Px2 (0x2 << 0) #define AFIO_EVCR_PIN_Px3 (0x3 << 0) #define AFIO_EVCR_PIN_Px4 (0x4 << 0) #define AFIO_EVCR_PIN_Px5 (0x5 << 0) #define AFIO_EVCR_PIN_Px6 (0x6 << 0) #define AFIO_EVCR_PIN_Px7 (0x7 << 0) #define AFIO_EVCR_PIN_Px8 (0x8 << 0) #define AFIO_EVCR_PIN_Px9 (0x9 << 0) #define AFIO_EVCR_PIN_Px10 (0xA << 0) #define AFIO_EVCR_PIN_Px11 (0xB << 0) #define AFIO_EVCR_PIN_Px12 (0xC << 0) #define AFIO_EVCR_PIN_Px13 (0xD << 0) #define AFIO_EVCR_PIN_Px14 (0xE << 0) #define AFIO_EVCR_PIN_Px15 (0xF << 0) /**@}*/ /* --- AFIO_MAPR values ---------------------------------------------------- */ /* 31 reserved */ /** @defgroup afio_remap_cld Alternate Function Remap Controls for Connectivity Line Devices only @ingroup gpio_defines @{*/ /* PTP_PPS_REMAP: */ /** Ethernet PTP PPS remapping (only connectivity line devices) */ #define AFIO_MAPR_PTP_PPS_REMAP (1 << 30) /* TIM2ITR1_IREMAP: */ /** TIM2 internal trigger 1 remapping (only connectivity line devices) */ #define AFIO_MAPR_TIM2ITR1_IREMAP (1 << 29) /* SPI3_REMAP: */ /** SPI3/I2S3 remapping (only connectivity line devices) */ #define AFIO_MAPR_SPI3_REMAP (1 << 28) /* MII_REMAP: */ /** MII or RMII selection (only connectivity line devices) */ #define AFIO_MAPR_MII_RMII_SEL (1 << 23) /* CAN2_REMAP: */ /** CAN2 I/O remapping (only connectivity line devices) */ #define AFIO_MAPR_CAN2_REMAP (1 << 22) /* ETH_REMAP: */ /** Ethernet MAC I/O remapping (only connectivity line devices) */ #define AFIO_MAPR_ETH_REMAP (1 << 21) /**@}*/ /* 27 reserved */ /* SWJ_CFG[2:0]: Serial wire JTAG configuration */ /** @defgroup afio_swj_disable Serial Wire JTAG disables @ingroup gpio_defines @{*/ #define AFIO_MAPR_SWJ_MASK (0x7 << 24) /** Full Serial Wire JTAG capability */ #define AFIO_MAPR_SWJ_CFG_FULL_SWJ (0x0 << 24) /** Full Serial Wire JTAG capability without JNTRST */ #define AFIO_MAPR_SWJ_CFG_FULL_SWJ_NO_JNTRST (0x1 << 24) /** JTAG-DP disabled with SW-DP enabled */ #define AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON (0x2 << 24) /** JTAG-DP disabled and SW-DP disabled */ #define AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_OFF (0x4 << 24) /**@}*/ /** @defgroup afio_remap Alternate Function Remap Controls @ingroup gpio_defines @{*/ /* ADC2_ETRGREG_REMAP: */ /** * ADC2 external trigger regulator conversion remapping * (only low-, medium-, high- and XL-density devices) */ #define AFIO_MAPR_ADC2_ETRGREG_REMAP (1 << 20) /* ADC2_ETRGINJ_REMAP: */ /** * ADC2 external trigger injected conversion remapping * (only low-, medium-, high- and XL-density devices) */ #define AFIO_MAPR_ADC2_ETRGINJ_REMAP (1 << 19) /* ADC1_ETRGREG_REMAP: */ /** * ADC1 external trigger regulator conversion remapping * (only low-, medium-, high- and XL-density devices) */ #define AFIO_MAPR_ADC1_ETRGREG_REMAP (1 << 18) /* ADC1_ETRGINJ_REMAP: */ /** * ADC1 external trigger injected conversion remapping * (only low-, medium-, high- and XL-density devices) */ #define AFIO_MAPR_ADC1_ETRGINJ_REMAP (1 << 17) /* TIM5CH4_IREMAP: */ /** TIM5 channel 4 internal remap */ #define AFIO_MAPR_TIM5CH4_IREMAP (1 << 16) /* PD01_REMAP: */ /** Port D0/Port D1 mapping on OSC_IN/OSC_OUT */ #define AFIO_MAPR_PD01_REMAP (1 << 15) /* TIM4_REMAP: */ /** TIM4 remapping */ #define AFIO_MAPR_TIM4_REMAP (1 << 12) /* USART2_REMAP[1:0]: */ /** USART2 remapping */ #define AFIO_MAPR_USART2_REMAP (1 << 3) /* USART1_REMAP[1:0]: */ /** USART1 remapping */ #define AFIO_MAPR_USART1_REMAP (1 << 2) /* I2C1_REMAP[1:0]: */ /** I2C1 remapping */ #define AFIO_MAPR_I2C1_REMAP (1 << 1) /* SPI1_REMAP[1:0]: */ /** SPI1 remapping */ #define AFIO_MAPR_SPI1_REMAP (1 << 0) /**@}*/ /* CAN_REMAP[1:0]: CAN1 alternate function remapping */ /** @defgroup afio_remap_can1 Alternate Function Remap Controls for CAN 1 @ingroup gpio_defines @{*/ #define AFIO_MAPR_CAN1_REMAP_PORTA (0x0 << 13) #define AFIO_MAPR_CAN1_REMAP_PORTB (0x2 << 13) /* Not 36pin pkg */ #define AFIO_MAPR_CAN1_REMAP_PORTD (0x3 << 13) /**@}*/ /* TIM3_REMAP[1:0]: TIM3 remapping */ /** @defgroup afio_remap_tim3 Alternate Function Remap Controls for Timer 3 @ingroup gpio_defines @{*/ #define AFIO_MAPR_TIM3_REMAP_NO_REMAP (0x0 << 10) #define AFIO_MAPR_TIM3_REMAP_PARTIAL_REMAP (0x2 << 10) #define AFIO_MAPR_TIM3_REMAP_FULL_REMAP (0x3 << 10) /**@}*/ /* TIM2_REMAP[1:0]: TIM2 remapping */ /** @defgroup afio_remap_tim2 Alternate Function Remap Controls for Timer 2 @ingroup gpio_defines @{*/ #define AFIO_MAPR_TIM2_REMAP_NO_REMAP (0x0 << 8) #define AFIO_MAPR_TIM2_REMAP_PARTIAL_REMAP1 (0x1 << 8) #define AFIO_MAPR_TIM2_REMAP_PARTIAL_REMAP2 (0x2 << 8) #define AFIO_MAPR_TIM2_REMAP_FULL_REMAP (0x3 << 8) /**@}*/ /* TIM1_REMAP[1:0]: TIM1 remapping */ /** @defgroup afio_remap_tim1 Alternate Function Remap Controls for Timer 1 @ingroup gpio_defines @{*/ #define AFIO_MAPR_TIM1_REMAP_NO_REMAP (0x0 << 6) #define AFIO_MAPR_TIM1_REMAP_PARTIAL_REMAP (0x1 << 6) #define AFIO_MAPR_TIM1_REMAP_FULL_REMAP (0x3 << 6) /**@}*/ /* USART3_REMAP[1:0]: USART3 remapping */ /** @defgroup afio_remap_usart3 Alternate Function Remap Controls for USART 3 @ingroup gpio_defines @{*/ #define AFIO_MAPR_USART3_REMAP_NO_REMAP (0x0 << 4) #define AFIO_MAPR_USART3_REMAP_PARTIAL_REMAP (0x1 << 4) #define AFIO_MAPR_USART3_REMAP_FULL_REMAP (0x3 << 4) /**@}*/ /** @defgroup afio_remap2 Alternate Function Remap Controls Secondary Set @ingroup gpio_defines @{*/ /* FSMC_NADV_DISCONNECT: */ /** The NADV is disconnected from its allocated pin */ #define AFIO_MAPR2_FSMC_NADV_DISCONNECT (1 << 10) /* TIM14_REMAP: */ /** TIM14 remapping */ #define AFIO_MAPR2_TIM14_REMAP (1 << 9) /* TIM13_REMAP: */ /** TIM13 remapping */ #define AFIO_MAPR2_TIM13_REMAP (1 << 8) /* TIM11_REMAP: */ /** TIM11 remapping */ #define AFIO_MAPR2_TIM11_REMAP (1 << 7) /* TIM10_REMAP: */ /** TIM10 remapping */ #define AFIO_MAPR2_TIM10_REMAP (1 << 6) /* TIM9_REMAP: */ /** TIM9 remapping */ #define AFIO_MAPR2_TIM9_REMAP (1 << 5) /**@}*/ /* --- AFIO_EXTICR1 values ------------------------------------------------- */ /* --- AFIO_EXTICR2 values ------------------------------------------------- */ /* --- AFIO_EXTICR3 values ------------------------------------------------- */ /* --- AFIO_EXTICR4 values ------------------------------------------------- */ /** @defgroup afio_exti Alternate Function EXTI pin number @ingroup gpio_defines @{*/ #define AFIO_EXTI0 0 #define AFIO_EXTI1 1 #define AFIO_EXTI2 2 #define AFIO_EXTI3 3 #define AFIO_EXTI4 4 #define AFIO_EXTI5 5 #define AFIO_EXTI6 6 #define AFIO_EXTI7 7 #define AFIO_EXTI8 8 #define AFIO_EXTI9 9 #define AFIO_EXTI10 10 #define AFIO_EXTI11 11 #define AFIO_EXTI12 12 #define AFIO_EXTI13 13 #define AFIO_EXTI14 14 #define AFIO_EXTI15 15 /**@}*/ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void gpio_set_mode(uint32_t gpioport, uint8_t mode, uint8_t cnf, uint16_t gpios); void gpio_set_eventout(uint8_t evoutport, uint8_t evoutpin); void gpio_primary_remap(uint32_t swjenable, uint32_t maps); void gpio_secondary_remap(uint32_t maps); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines @brief Defined Constants and Types for the STM32F1xx I2C @ingroup STM32F1xx_defines @version 1.0.0 @date 12 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_F1_NVIC_H partname_humanreadable: STM32 F1 series partname_doxygen: STM32F1 irqs: - wwdg - pvd - tamper - rtc - flash - rcc - exti0 - exti1 - exti2 - exti3 - exti4 - dma1_channel1 - dma1_channel2 - dma1_channel3 - dma1_channel4 - dma1_channel5 - dma1_channel6 - dma1_channel7 - adc1_2 - usb_hp_can_tx - usb_lp_can_rx0 - can_rx1 - can_sce - exti9_5 - tim1_brk - tim1_up - tim1_trg_com - tim1_cc - tim2 - tim3 - tim4 - i2c1_ev - i2c1_er - i2c2_ev - i2c2_er - spi1 - spi2 - usart1 - usart2 - usart3 - exti15_10 - rtc_alarm - usb_wakeup - tim8_brk - tim8_up - tim8_trg_com - tim8_cc - adc3 - fsmc - sdio - tim5 - spi3 - uart4 - uart5 - tim6 - tim7 - dma2_channel1 - dma2_channel2 - dma2_channel3 - dma2_channel4_5 - dma2_channel5 - eth - eth_wkup - can2_tx - can2_rx0 - can2_rx1 - can2_sce - otg_fs ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines @brief Defined Constants and Types for the STM32F1xx Independent Watchdog Timer @ingroup STM32F1xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32 specific peripheral definitions ------------------------------- */ /* Memory map for all buses */ #define FLASH_BASE ((uint32_t)0x08000000) #define PERIPH_BASE ((uint32_t)0x40000000) #define INFO_BASE ((uint32_t)0x1ffff000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_AHB (PERIPH_BASE + 0x18000) /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB1 + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB1 + 0x0400) #define TIM4_BASE (PERIPH_BASE_APB1 + 0x0800) #define TIM5_BASE (PERIPH_BASE_APB1 + 0x0c00) #define TIM6_BASE (PERIPH_BASE_APB1 + 0x1000) #define TIM7_BASE (PERIPH_BASE_APB1 + 0x1400) #define TIM12_BASE (PERIPH_BASE_APB1 + 0x1800) #define TIM13_BASE (PERIPH_BASE_APB1 + 0x1c00) #define TIM14_BASE (PERIPH_BASE_APB1 + 0x2000) /* PERIPH_BASE_APB1 + 0x2400 (0x4000 2400 - 0x4000 27FF): Reserved */ #define RTC_BASE (PERIPH_BASE_APB1 + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB1 + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB1 + 0x3000) /* PERIPH_BASE_APB1 + 0x3400 (0x4000 3400 - 0x4000 37FF): Reserved */ #define SPI2_I2S_BASE (PERIPH_BASE_APB1 + 0x3800) #define SPI3_I2S_BASE (PERIPH_BASE_APB1 + 0x3c00) /* PERIPH_BASE_APB1 + 0x4000 (0x4000 4000 - 0x4000 3FFF): Reserved */ #define USART2_BASE (PERIPH_BASE_APB1 + 0x4400) #define USART3_BASE (PERIPH_BASE_APB1 + 0x4800) #define UART4_BASE (PERIPH_BASE_APB1 + 0x4c00) #define UART5_BASE (PERIPH_BASE_APB1 + 0x5000) #define I2C1_BASE (PERIPH_BASE_APB1 + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB1 + 0x5800) #define USB_DEV_FS_BASE (PERIPH_BASE_APB1 + 0x5c00) #define USB_CAN_SRAM_BASE (PERIPH_BASE_APB1 + 0x6000) #define BX_CAN1_BASE (PERIPH_BASE_APB1 + 0x6400) #define BX_CAN2_BASE (PERIPH_BASE_APB1 + 0x6800) /* PERIPH_BASE_APB1 + 0x6800 (0x4000 6800 - 0x4000 6BFF): Reserved? Typo? */ #define BACKUP_REGS_BASE (PERIPH_BASE_APB1 + 0x6c00) #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) #define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) /* PERIPH_BASE_APB1 + 0x7800 (0x4000 7800 - 0x4000 FFFF): Reserved */ /* APB2 */ #define AFIO_BASE (PERIPH_BASE_APB2 + 0x0000) #define EXTI_BASE (PERIPH_BASE_APB2 + 0x0400) #define GPIO_PORT_A_BASE (PERIPH_BASE_APB2 + 0x0800) #define GPIO_PORT_B_BASE (PERIPH_BASE_APB2 + 0x0c00) #define GPIO_PORT_C_BASE (PERIPH_BASE_APB2 + 0x1000) #define GPIO_PORT_D_BASE (PERIPH_BASE_APB2 + 0x1400) #define GPIO_PORT_E_BASE (PERIPH_BASE_APB2 + 0x1800) #define GPIO_PORT_F_BASE (PERIPH_BASE_APB2 + 0x1c00) #define GPIO_PORT_G_BASE (PERIPH_BASE_APB2 + 0x2000) #define ADC1_BASE (PERIPH_BASE_APB2 + 0x2400) #define ADC2_BASE (PERIPH_BASE_APB2 + 0x2800) #define TIM1_BASE (PERIPH_BASE_APB2 + 0x2c00) #define SPI1_BASE (PERIPH_BASE_APB2 + 0x3000) #define TIM8_BASE (PERIPH_BASE_APB2 + 0x3400) #define USART1_BASE (PERIPH_BASE_APB2 + 0x3800) #define ADC3_BASE (PERIPH_BASE_APB2 + 0x3c00) /* PERIPH_BASE_APB2 + 0x4000 (0x4001 4000 - 0x4001 4FFF): Reserved */ #define TIM9_BASE (PERIPH_BASE_APB2 + 0x4c00) #define TIM10_BASE (PERIPH_BASE_APB2 + 0x5000) #define TIM11_BASE (PERIPH_BASE_APB2 + 0x5400) /* PERIPH_BASE_APB2 + 0x5800 (0x4001 5800 - 0x4001 7FFF): Reserved */ /* AHB */ #define SDIO_BASE (PERIPH_BASE_AHB + 0x00000) /* PERIPH_BASE_AHB + 0x0400 (0x4001 8400 - 0x4001 7FFF): Reserved */ #define DMA1_BASE (PERIPH_BASE_AHB + 0x08000) #define DMA2_BASE (PERIPH_BASE_AHB + 0x08400) /* PERIPH_BASE_AHB + 0x8800 (0x4002 0800 - 0x4002 0FFF): Reserved */ #define RCC_BASE (PERIPH_BASE_AHB + 0x09000) /* PERIPH_BASE_AHB + 0x9400 (0x4002 1400 - 0x4002 1FFF): Reserved */ #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB + 0x0a000) #define CRC_BASE (PERIPH_BASE_AHB + 0x0b000) /* PERIPH_BASE_AHB + 0xb400 (0x4002 3400 - 0x4002 7FFF): Reserved */ #define ETHERNET_BASE (PERIPH_BASE_AHB + 0x10000) /* PERIPH_BASE_AHB + 0x18000 (0x4003 0000 - 0x4FFF FFFF): Reserved */ #define USB_OTG_FS_BASE (PERIPH_BASE_AHB + 0xffe8000) /* PPIB */ #define DBGMCU_BASE (PPBI_BASE + 0x00042000) /* FSMC */ #define FSMC_BASE (PERIPH_BASE + 0x60000000) /* Device Electronic Signature */ #define DESIG_FLASH_SIZE_BASE (INFO_BASE + 0x7e0) #define DESIG_UNIQUE_ID_BASE (INFO_BASE + 0x7e8) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines @brief Defined Constants and Types for the STM32F1xx PWR Control @ingroup STM32F1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_H #define LIBOPENCM3_PWR_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/rcc.h ================================================ /** @defgroup STM32F1xx_rcc_defines RCC Defines @brief libopencm3 STM32F1xx Reset and Clock Control @ingroup STM32F1xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Federico Ruiz-Ugalde \ @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2009 Federico Ruiz-Ugalde * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include /* Note: Regs/bits marked (**) only exist in "connectivity line" STM32s. */ /* Note: Regs/bits marked (XX) do NOT exist in "connectivity line" STM32s. */ /* --- RCC registers ------------------------------------------------------- */ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_CFGR MMIO32(RCC_BASE + 0x04) #define RCC_CIR MMIO32(RCC_BASE + 0x08) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x0c) #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x10) #define RCC_AHBENR MMIO32(RCC_BASE + 0x14) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x18) #define RCC_APB1ENR MMIO32(RCC_BASE + 0x1c) #define RCC_BDCR MMIO32(RCC_BASE + 0x20) #define RCC_CSR MMIO32(RCC_BASE + 0x24) #define RCC_AHBRSTR MMIO32(RCC_BASE + 0x28) /*(**)*/ #define RCC_CFGR2 MMIO32(RCC_BASE + 0x2c) /*(**)*/ /* --- RCC_CR values ------------------------------------------------------- */ #define RCC_CR_PLL3RDY (1 << 29) /* (**) */ #define RCC_CR_PLL3ON (1 << 28) /* (**) */ #define RCC_CR_PLL2RDY (1 << 27) /* (**) */ #define RCC_CR_PLL2ON (1 << 26) /* (**) */ #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_CSSON (1 << 19) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) /* HSICAL: [15:8] */ /* HSITRIM: [7:3] */ #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) /* --- RCC_CFGR values ----------------------------------------------------- */ /* MCO: Microcontroller clock output */ /** @defgroup rcc_cfgr_co RCC_CFGR Microcontroller Clock Output Source @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_MCO_NOCLK 0x0 #define RCC_CFGR_MCO_SYSCLK 0x4 #define RCC_CFGR_MCO_HSICLK 0x5 #define RCC_CFGR_MCO_HSECLK 0x6 #define RCC_CFGR_MCO_PLLCLK_DIV2 0x7 #define RCC_CFGR_MCO_PLL2CLK 0x8 /* (**) */ #define RCC_CFGR_MCO_PLL3CLK_DIV2 0x9 /* (**) */ #define RCC_CFGR_MCO_XT1 0xa /* (**) */ #define RCC_CFGR_MCO_PLL3 0xb /* (**) */ /**@}*/ /* USBPRE: USB prescaler (RCC_CFGR[22]) */ /** @defgroup rcc_cfgr_usbpre RCC_CFGR USB prescale Factors @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_USBPRE_PLL_CLK_DIV1_5 0x0 #define RCC_CFGR_USBPRE_PLL_CLK_NODIV 0x1 /**@}*/ /* OTGFSPRE: USB OTG FS prescaler (RCC_CFGR[22]; only in conn. line STM32s) */ #define RCC_CFGR_USBPRE_PLL_VCO_CLK_DIV3 0x0 #define RCC_CFGR_USBPRE_PLL_VCO_CLK_DIV2 0x1 /* PLLMUL: PLL multiplication factor */ /** @defgroup rcc_cfgr_pmf RCC_CFGR PLL Multiplication Factor @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL2 0x0 /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL3 0x1 /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL4 0x2 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL5 0x3 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL6 0x4 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL7 0x5 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL8 0x6 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL9 0x7 #define RCC_CFGR_PLLMUL_PLL_CLK_MUL10 0x8 /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL11 0x9 /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL12 0xa /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL13 0xb /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL14 0xc /* (XX) */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL15 0xd /* 0xd: PLL x 15 */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL6_5 0xd /* 0xd: PLL x 6.5 for conn. line */ #define RCC_CFGR_PLLMUL_PLL_CLK_MUL16 0xe /* (XX) */ /* #define PLLMUL_PLL_CLK_MUL16 0xf */ /* (XX) */ /* Errata? 17? */ /**@}*/ /* TODO: conn. line differs. */ /* PLLXTPRE: HSE divider for PLL entry */ /** @defgroup rcc_cfgr_hsepre RCC_CFGR HSE Divider for PLL @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_PLLXTPRE_HSE_CLK 0x0 #define RCC_CFGR_PLLXTPRE_HSE_CLK_DIV2 0x1 /**@}*/ /* PLLSRC: PLL entry clock source */ /** @defgroup rcc_cfgr_pcs RCC_CFGR PLL Clock Source @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_PLLSRC_HSI_CLK_DIV2 0x0 #define RCC_CFGR_PLLSRC_HSE_CLK 0x1 #define RCC_CFGR_PLLSRC_PREDIV1_CLK 0x1 /* On conn. line */ /**@}*/ /* ADCPRE: ADC prescaler */ /****************************************************************************/ /** @defgroup rcc_cfgr_adcpre RCC ADC clock prescaler enable values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_ADCPRE_PCLK2_DIV2 0x0 #define RCC_CFGR_ADCPRE_PCLK2_DIV4 0x1 #define RCC_CFGR_ADCPRE_PCLK2_DIV6 0x2 #define RCC_CFGR_ADCPRE_PCLK2_DIV8 0x3 /**@}*/ /* PPRE2: APB high-speed prescaler (APB2) */ /** @defgroup rcc_cfgr_apb2pre RCC_CFGR APB2 prescale Factors @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_PPRE2_HCLK_NODIV 0x0 #define RCC_CFGR_PPRE2_HCLK_DIV2 0x4 #define RCC_CFGR_PPRE2_HCLK_DIV4 0x5 #define RCC_CFGR_PPRE2_HCLK_DIV8 0x6 #define RCC_CFGR_PPRE2_HCLK_DIV16 0x7 /**@}*/ /* PPRE1: APB low-speed prescaler (APB1) */ /** @defgroup rcc_cfgr_apb1pre RCC_CFGR APB1 prescale Factors @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_PPRE1_HCLK_NODIV 0x0 #define RCC_CFGR_PPRE1_HCLK_DIV2 0x4 #define RCC_CFGR_PPRE1_HCLK_DIV4 0x5 #define RCC_CFGR_PPRE1_HCLK_DIV8 0x6 #define RCC_CFGR_PPRE1_HCLK_DIV16 0x7 /**@}*/ /* HPRE: AHB prescaler */ /** @defgroup rcc_cfgr_ahbpre RCC_CFGR AHB prescale Factors @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_HPRE_SYSCLK_NODIV 0x0 #define RCC_CFGR_HPRE_SYSCLK_DIV2 0x8 #define RCC_CFGR_HPRE_SYSCLK_DIV4 0x9 #define RCC_CFGR_HPRE_SYSCLK_DIV8 0xa #define RCC_CFGR_HPRE_SYSCLK_DIV16 0xb #define RCC_CFGR_HPRE_SYSCLK_DIV64 0xc #define RCC_CFGR_HPRE_SYSCLK_DIV128 0xd #define RCC_CFGR_HPRE_SYSCLK_DIV256 0xe #define RCC_CFGR_HPRE_SYSCLK_DIV512 0xf /**@}*/ /* SWS: System clock switch status */ #define RCC_CFGR_SWS_SYSCLKSEL_HSICLK 0x0 #define RCC_CFGR_SWS_SYSCLKSEL_HSECLK 0x1 #define RCC_CFGR_SWS_SYSCLKSEL_PLLCLK 0x2 /* SW: System clock switch */ /** @defgroup rcc_cfgr_scs RCC_CFGR System Clock Selection @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_CFGR_SW_SYSCLKSEL_HSICLK 0x0 #define RCC_CFGR_SW_SYSCLKSEL_HSECLK 0x1 #define RCC_CFGR_SW_SYSCLKSEL_PLLCLK 0x2 /**@}*/ /* --- RCC_CIR values ------------------------------------------------------ */ /* Clock security system interrupt clear bit */ #define RCC_CIR_CSSC (1 << 23) /* OSC ready interrupt clear bits */ #define RCC_CIR_PLL3RDYC (1 << 22) /* (**) */ #define RCC_CIR_PLL2RDYC (1 << 21) /* (**) */ #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) /* OSC ready interrupt enable bits */ #define RCC_CIR_PLL3RDYIE (1 << 14) /* (**) */ #define RCC_CIR_PLL2RDYIE (1 << 13) /* (**) */ #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) /* Clock security system interrupt flag bit */ #define RCC_CIR_CSSF (1 << 7) /* OSC ready interrupt flag bits */ #define RCC_CIR_PLL3RDYF (1 << 6) /* (**) */ #define RCC_CIR_PLL2RDYF (1 << 5) /* (**) */ #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ /** @defgroup rcc_apb2rstr_rst RCC_APB2RSTR reset values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_APB2RSTR_ADC3RST (1 << 15) /* (XX) */ #define RCC_APB2RSTR_USART1RST (1 << 14) #define RCC_APB2RSTR_TIM8RST (1 << 13) /* (XX) */ #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_TIM1RST (1 << 11) #define RCC_APB2RSTR_ADC2RST (1 << 10) #define RCC_APB2RSTR_ADC1RST (1 << 9) #define RCC_APB2RSTR_IOPGRST (1 << 8) /* (XX) */ #define RCC_APB2RSTR_IOPFRST (1 << 7) /* (XX) */ #define RCC_APB2RSTR_IOPERST (1 << 6) #define RCC_APB2RSTR_IOPDRST (1 << 5) #define RCC_APB2RSTR_IOPCRST (1 << 4) #define RCC_APB2RSTR_IOPBRST (1 << 3) #define RCC_APB2RSTR_IOPARST (1 << 2) #define RCC_APB2RSTR_AFIORST (1 << 0) /**@}*/ /* --- RCC_APB1RSTR values ------------------------------------------------- */ /** @defgroup rcc_apb1rstr_rst RCC_APB1RSTR reset values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_BKPRST (1 << 27) #define RCC_APB1RSTR_CAN2RST (1 << 26) /* (**) */ #define RCC_APB1RSTR_CAN1RST (1 << 25) /* (**) */ #define RCC_APB1RSTR_CANRST (1 << 25) /* (XX) Alias for CAN1RST */ #define RCC_APB1RSTR_USBRST (1 << 23) /* (XX) */ #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_UART5RST (1 << 20) #define RCC_APB1RSTR_UART4RST (1 << 19) #define RCC_APB1RSTR_USART3RST (1 << 18) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI3RST (1 << 15) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_TIM7RST (1 << 5) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM5RST (1 << 3) #define RCC_APB1RSTR_TIM4RST (1 << 2) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /**@}*/ /* --- RCC_AHBENR values --------------------------------------------------- */ /** @defgroup rcc_ahbenr_en RCC_AHBENR enable values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_AHBENR_ETHMACENRX (1 << 16) #define RCC_AHBENR_ETHMACENTX (1 << 15) #define RCC_AHBENR_ETHMACEN (1 << 14) #define RCC_AHBENR_OTGFSEN (1 << 12) #define RCC_AHBENR_SDIOEN (1 << 10) #define RCC_AHBENR_FSMCEN (1 << 8) #define RCC_AHBENR_CRCEN (1 << 6) #define RCC_AHBENR_FLITFEN (1 << 4) #define RCC_AHBENR_SRAMEN (1 << 2) #define RCC_AHBENR_DMA2EN (1 << 1) #define RCC_AHBENR_DMA1EN (1 << 0) /**@}*/ /* --- RCC_APB2ENR values -------------------------------------------------- */ /** @defgroup rcc_apb2enr_en RCC_APB2ENR enable values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_APB2ENR_ADC3EN (1 << 15) /* (XX) */ #define RCC_APB2ENR_USART1EN (1 << 14) #define RCC_APB2ENR_TIM8EN (1 << 13) /* (XX) */ #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_TIM1EN (1 << 11) #define RCC_APB2ENR_ADC2EN (1 << 10) #define RCC_APB2ENR_ADC1EN (1 << 9) #define RCC_APB2ENR_IOPGEN (1 << 8) /* (XX) */ #define RCC_APB2ENR_IOPFEN (1 << 7) /* (XX) */ #define RCC_APB2ENR_IOPEEN (1 << 6) #define RCC_APB2ENR_IOPDEN (1 << 5) #define RCC_APB2ENR_IOPCEN (1 << 4) #define RCC_APB2ENR_IOPBEN (1 << 3) #define RCC_APB2ENR_IOPAEN (1 << 2) #define RCC_APB2ENR_AFIOEN (1 << 0) /**@}*/ /* --- RCC_APB1ENR values -------------------------------------------------- */ /** @defgroup rcc_apb1enr_en RCC_APB1ENR enable values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_BKPEN (1 << 27) #define RCC_APB1ENR_CAN2EN (1 << 26) /* (**) */ #define RCC_APB1ENR_CAN1EN (1 << 25) /* (**) */ #define RCC_APB1ENR_CANEN (1 << 25) /* (XX) Alias for CAN1EN */ #define RCC_APB1ENR_USBEN (1 << 23) /* (XX) */ #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_UART5EN (1 << 20) #define RCC_APB1ENR_UART4EN (1 << 19) #define RCC_APB1ENR_USART3EN (1 << 18) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI3EN (1 << 15) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_TIM7EN (1 << 5) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM5EN (1 << 3) #define RCC_APB1ENR_TIM4EN (1 << 2) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /**@}*/ /* --- RCC_BDCR values ----------------------------------------------------- */ #define RCC_BDCR_BDRST (1 << 16) #define RCC_BDCR_RTCEN (1 << 15) /* RCC_BDCR[9:8]: RTCSEL */ #define RCC_BDCR_LSEBYP (1 << 2) #define RCC_BDCR_LSERDY (1 << 1) #define RCC_BDCR_LSEON (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) /* --- RCC_AHBRSTR values -------------------------------------------------- */ /** @defgroup rcc_ahbrstr_rst RCC_AHBRSTR reset values @ingroup STM32F1xx_rcc_defines @{*/ #define RCC_AHBRSTR_ETHMACRST (1 << 14) #define RCC_AHBRSTR_OTGFSRST (1 << 12) /**@}*/ /* --- RCC_CFGR2 values ---------------------------------------------------- */ /* I2S3SRC: I2S3 clock source */ #define RCC_CFGR2_I2S3SRC_SYSCLK 0x0 #define RCC_CFGR2_I2S3SRC_PLL3_VCO_CLK 0x1 /* I2S2SRC: I2S2 clock source */ #define RCC_CFGR2_I2S2SRC_SYSCLK 0x0 #define RCC_CFGR2_I2S2SRC_PLL3_VCO_CLK 0x1 /* PREDIV1SRC: PREDIV1 entry clock source */ #define RCC_CFGR2_PREDIV1SRC_HSE_CLK 0x0 #define RCC_CFGR2_PREDIV1SRC_PLL2_CLK 0x1 #define RCC_CFGR2_PLL2MUL (1 << 0) #define RCC_CFGR2_PREDIV2 (1 << 0) #define RCC_CFGR2_PREDIV1 (1 << 0) /* PLL3MUL: PLL3 multiplication factor */ #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL8 0x6 #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL9 0x7 #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL10 0x8 #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL11 0x9 #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL12 0xa #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL13 0xb #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL14 0xc #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL16 0xe #define RCC_CFGR2_PLL3MUL_PLL3_CLK_MUL20 0xf /* PLL2MUL: PLL2 multiplication factor */ #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL8 0x6 #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL9 0x7 #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL10 0x8 #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL11 0x9 #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL12 0xa #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL13 0xb #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL14 0xc #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL16 0xe #define RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL20 0xf /* PREDIV: PREDIV division factor */ #define RCC_CFGR2_PREDIV_NODIV 0x0 #define RCC_CFGR2_PREDIV_DIV2 0x1 #define RCC_CFGR2_PREDIV_DIV3 0x2 #define RCC_CFGR2_PREDIV_DIV4 0x3 #define RCC_CFGR2_PREDIV_DIV5 0x4 #define RCC_CFGR2_PREDIV_DIV6 0x5 #define RCC_CFGR2_PREDIV_DIV7 0x6 #define RCC_CFGR2_PREDIV_DIV8 0x7 #define RCC_CFGR2_PREDIV_DIV9 0x8 #define RCC_CFGR2_PREDIV_DIV10 0x9 #define RCC_CFGR2_PREDIV_DIV11 0xa #define RCC_CFGR2_PREDIV_DIV12 0xb #define RCC_CFGR2_PREDIV_DIV13 0xc #define RCC_CFGR2_PREDIV_DIV14 0xd #define RCC_CFGR2_PREDIV_DIV15 0xe #define RCC_CFGR2_PREDIV_DIV16 0xf /* PREDIV2: PREDIV2 division factor */ #define RCC_CFGR2_PREDIV2_NODIV 0x0 #define RCC_CFGR2_PREDIV2_DIV2 0x1 #define RCC_CFGR2_PREDIV2_DIV3 0x2 #define RCC_CFGR2_PREDIV2_DIV4 0x3 #define RCC_CFGR2_PREDIV2_DIV5 0x4 #define RCC_CFGR2_PREDIV2_DIV6 0x5 #define RCC_CFGR2_PREDIV2_DIV7 0x6 #define RCC_CFGR2_PREDIV2_DIV8 0x7 #define RCC_CFGR2_PREDIV2_DIV9 0x8 #define RCC_CFGR2_PREDIV2_DIV10 0x9 #define RCC_CFGR2_PREDIV2_DIV11 0xa #define RCC_CFGR2_PREDIV2_DIV12 0xb #define RCC_CFGR2_PREDIV2_DIV13 0xc #define RCC_CFGR2_PREDIV2_DIV14 0xd #define RCC_CFGR2_PREDIV2_DIV15 0xe #define RCC_CFGR2_PREDIV2_DIV16 0xf /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_ppre1_frequency; extern uint32_t rcc_ppre2_frequency; /* --- Function prototypes ------------------------------------------------- */ typedef enum { PLL, PLL2, PLL3, HSE, HSI, LSE, LSI } osc_t; BEGIN_DECLS void rcc_osc_ready_int_clear(osc_t osc); void rcc_osc_ready_int_enable(osc_t osc); void rcc_osc_ready_int_disable(osc_t osc); int rcc_osc_ready_int_flag(osc_t osc); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_wait_for_osc_ready(osc_t osc); void rcc_osc_on(osc_t osc); void rcc_osc_off(osc_t osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_set_mco(uint32_t mcosrc); void rcc_osc_bypass_enable(osc_t osc); void rcc_osc_bypass_disable(osc_t osc); void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset); void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset); void rcc_set_sysclk_source(uint32_t clk); void rcc_set_pll_multiplication_factor(uint32_t mul); void rcc_set_pll2_multiplication_factor(uint32_t mul); void rcc_set_pll3_multiplication_factor(uint32_t mul); void rcc_set_pll_source(uint32_t pllsrc); void rcc_set_pllxtpre(uint32_t pllxtpre); void rcc_set_adcpre(uint32_t adcpre); void rcc_set_ppre2(uint32_t ppre2); void rcc_set_ppre1(uint32_t ppre1); void rcc_set_hpre(uint32_t hpre); void rcc_set_usbpre(uint32_t usbpre); void rcc_set_prediv1(uint32_t prediv); void rcc_set_prediv2(uint32_t prediv); void rcc_set_prediv1_source(uint32_t rccsrc); uint32_t rcc_system_clock_source(void); void rcc_clock_setup_in_hsi_out_64mhz(void); void rcc_clock_setup_in_hsi_out_48mhz(void); void rcc_clock_setup_in_hsi_out_24mhz(void); void rcc_clock_setup_in_hse_8mhz_out_24mhz(void); void rcc_clock_setup_in_hse_8mhz_out_72mhz(void); void rcc_clock_setup_in_hse_12mhz_out_72mhz(void); void rcc_clock_setup_in_hse_16mhz_out_72mhz(void); void rcc_clock_setup_in_hse_25mhz_out_72mhz(void); void rcc_backupdomain_reset(void); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines @brief Defined Constants and Types for the STM32F1xx Real Time Clock @ingroup STM32F1xx_defines @author @htmlonly © @endhtmlonly 2010 Uwe Hermann @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * The F1 RTC is a straight time stamp, a completely different peripheral to * that found in the F2, F3, F4, L1 and F0. */ #ifndef LIBOPENCM3_RTC_H #define LIBOPENCM3_RTC_H #include #include #include #include /* --- RTC registers ------------------------------------------------------- */ /* RTC control register high (RTC_CRH) */ #define RTC_CRH MMIO32(RTC_BASE + 0x00) /* RTC control register low (RTC_CRL) */ #define RTC_CRL MMIO32(RTC_BASE + 0x04) /* RTC prescaler load register (RTC_PRLH / RTC_PRLL) */ #define RTC_PRLH MMIO32(RTC_BASE + 0x08) #define RTC_PRLL MMIO32(RTC_BASE + 0x0c) /* RTC prescaler divider register (RTC_DIVH / RTC_DIVL) */ #define RTC_DIVH MMIO32(RTC_BASE + 0x10) #define RTC_DIVL MMIO32(RTC_BASE + 0x14) /* RTC counter register (RTC_CNTH / RTC_CNTL) */ #define RTC_CNTH MMIO32(RTC_BASE + 0x18) #define RTC_CNTL MMIO32(RTC_BASE + 0x1c) /* RTC alarm register high (RTC_ALRH / RTC_ALRL) */ #define RTC_ALRH MMIO32(RTC_BASE + 0x20) #define RTC_ALRL MMIO32(RTC_BASE + 0x24) /* --- RTC_CRH values -------------------------------------------------------*/ /* Note: Bits [15:3] are reserved, and forced to 0 by hardware. */ /* OWIE: Overflow interrupt enable */ #define RTC_CRH_OWIE (1 << 2) /* ALRIE: Alarm interrupt enable */ #define RTC_CRH_ALRIE (1 << 1) /* SECIE: Second interrupt enable */ #define RTC_CRH_SECIE (1 << 0) /* --- RTC_CRL values -------------------------------------------------------*/ /* Note: Bits [15:6] are reserved, and forced to 0 by hardware. */ /* RTOFF: RTC operation OFF */ #define RTC_CRL_RTOFF (1 << 5) /* CNF: Configuration flag */ #define RTC_CRL_CNF (1 << 4) /* RSF: Registers synchronized flag */ #define RTC_CRL_RSF (1 << 3) /* OWF: Overflow flag */ #define RTC_CRL_OWF (1 << 2) /* ALRF: Alarm flag */ #define RTC_CRL_ALRF (1 << 1) /* SECF: Second flag */ #define RTC_CRL_SECF (1 << 0) /* --- RTC_PRLH values ------------------------------------------------------*/ /* Note: Bits [15:4] are reserved, and forced to 0 by hardware. */ /* TODO */ /* --- RTC_PRLL values ------------------------------------------------------*/ /* TODO */ /* --- RTC_DIVH values ------------------------------------------------------*/ /* Bits [15:4] are reserved. */ /* TODO */ /* --- RTC_DIVL values ------------------------------------------------------*/ /* TODO */ /* --- RTC_CNTH values ------------------------------------------------------*/ /* TODO */ /* --- RTC_CNTL values ------------------------------------------------------*/ /* TODO */ /* --- RTC_ALRH values ------------------------------------------------------*/ /* TODO */ /* --- RTC_ALRL values ------------------------------------------------------*/ /* TODO */ /* --- Function prototypes --------------------------------------------------*/ typedef enum { RTC_SEC, RTC_ALR, RTC_OW, } rtcflag_t; BEGIN_DECLS void rtc_awake_from_off(osc_t clock_source); void rtc_enter_config_mode(void); void rtc_exit_config_mode(void); void rtc_set_alarm_time(uint32_t alarm_time); void rtc_enable_alarm(void); void rtc_disable_alarm(void); void rtc_set_prescale_val(uint32_t prescale_val); uint32_t rtc_get_counter_val(void); uint32_t rtc_get_prescale_div_val(void); uint32_t rtc_get_alarm_val(void); void rtc_set_counter_val(uint32_t counter_val); void rtc_interrupt_enable(rtcflag_t flag_val); void rtc_interrupt_disable(rtcflag_t flag_val); void rtc_clear_flag(rtcflag_t flag_val); uint32_t rtc_check_flag(rtcflag_t flag_val); void rtc_awake_from_standby(void); void rtc_auto_awake(osc_t clock_source, uint32_t prescale_val); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/spi.h ================================================ /** @defgroup spi_defines SPI Defines @brief Defined Constants and Types for the STM32F1xx SPI @ingroup STM32F1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/timer.h ================================================ /** @defgroup timer_defines Timer Defines @brief libopencm3 Defined Constants and Types for the STM32F1xx Timers @ingroup STM32F1xx_defines @version 1.0.0 @date 8 March 2013 @author @htmlonly © @endhtmlonly 2011 Fergus Noble LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TIMER_H #define LIBOPENCM3_TIMER_H #include /** Input Capture input polarity */ enum tim_ic_pol { TIM_IC_RISING, TIM_IC_FALLING, }; /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void timer_ic_set_polarity(uint32_t timer, enum tim_ic_id ic, enum tim_ic_pol pol); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f1/usart.h ================================================ /** @defgroup usart_defines USART Defines @brief Defined Constants and Types for the STM32F1xx USART @ingroup STM32F1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/crc.h ================================================ /** @defgroup crc_defines CRC Defines @brief libopencm3 Defined Constants and Types for the STM32F2xx CRC Generator @ingroup STM32F2xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/crypto.h ================================================ /** @defgroup crypto_defines CRYPTO Defines * * @brief Defined Constants and Types for the STM32F2xx CRYP Controller * * @ingroup STM32F2xx_defines * * @version 1.0.0 * * @date 17 Jun 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRYPTO_H #define LIBOPENCM3_CRYPTO_H #include #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/dac.h ================================================ /** @defgroup dac_defines DAC Defines @brief Defined Constants and Types for the STM32F2xx DAC @ingroup STM32F2xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/dma.h ================================================ /** @defgroup dma_defines DMA Defines @ingroup STM32F2xx_defines @brief Defined Constants and Types for the STM32F2xx DMA Controller @version 1.0.0 @date 18 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/doc-stm32f2.h ================================================ /** @mainpage libopencm3 STM32F2 @version 1.0.0 @date 14 September 2012 API documentation for ST Microelectronics STM32F2 Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F2xx STM32F2xx Libraries for ST Microelectronics STM32F2xx series. @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F2xx_defines STM32F2xx Defines @brief Defined Constants and Types for the STM32F2xx series @version 1.0.0 @date 14 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/exti.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/flash.h ================================================ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the STM32F2xx General Purpose I/O @ingroup STM32F2xx_defines @version 1.0.0 @date 1 July 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/hash.h ================================================ /** @defgroup hash_defines HASH Defines @ingroup STM32F2xx_defines @brief Defined Constants and Types for the STM32F2xx HASH Controller @version 1.0.0 @date 31 May 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_HASH_H #define LIBOPENCM3_HASH_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines @brief Defined Constants and Types for the STM32F2xx I2C @ingroup STM32F2xx_defines @version 1.0.0 @date 12 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_F2_NVIC_H partname_humanreadable: STM32 F2 series partname_doxygen: STM32F2 irqs: - nvic_wwdg - pvd - tamp_stamp - rtc_wkup - flash - rcc - exti0 - exti1 - exti2 - exti3 - exti4 - dma1_stream0 - dma1_stream1 - dma1_stream2 - dma1_stream3 - dma1_stream4 - dma1_stream5 - dma1_stream6 - adc - can1_tx - can1_rx0 - can1_rx1 - can1_sce - exti9_5 - tim1_brk_tim9 - tim1_up_tim10 - tim1_trg_com_tim11 - tim1_cc - tim2 - tim3 - tim4 - i2c1_ev - i2c1_er - i2c2_ev - i2c2_er - spi1 - spi2 - usart1 - usart2 - usart3 - exti15_10 - rtc_alarm - usb_fs_wkup - tim8_brk_tim12 - tim8_up_tim13 - tim8_trg_com_tim14 - tim8_cc - dma1_stream7 - fsmc - sdio - tim5 - spi3 - uart4 - uart5 - tim6_dac - tim7 - dma2_stream0 - dma2_stream1 - dma2_stream2 - dma2_stream3 - dma2_stream4 - eth - eth_wkup - can2_tx - can2_rx0 - can2_rx1 - can2_sce - otg_fs - dma2_stream5 - dma2_stream6 - dma2_stream7 - usart6 - i2c3_ev - i2c3_er - otg_hs_ep1_out - otg_hs_ep1_in - otg_hs_wkup - otg_hs - dcmi - cryp - hash_rng ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines @brief Defined Constants and Types for the STM32F2xx Independent Watchdog Timer @ingroup STM32F2xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32F20x specific peripheral definitions --------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE 0x40000000 #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_AHB1 (PERIPH_BASE + 0x20000) #define PERIPH_BASE_AHB2 0x50000000 #define PERIPH_BASE_AHB3 0x60000000 /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB1 + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB1 + 0x0400) #define TIM4_BASE (PERIPH_BASE_APB1 + 0x0800) #define TIM5_BASE (PERIPH_BASE_APB1 + 0x0c00) #define TIM6_BASE (PERIPH_BASE_APB1 + 0x1000) #define TIM7_BASE (PERIPH_BASE_APB1 + 0x1400) #define TIM12_BASE (PERIPH_BASE_APB1 + 0x1800) #define TIM13_BASE (PERIPH_BASE_APB1 + 0x1c00) #define TIM14_BASE (PERIPH_BASE_APB1 + 0x2000) /* PERIPH_BASE_APB1 + 0x2400 (0x4000 2400 - 0x4000 27FF): Reserved */ #define RTC_BASE (PERIPH_BASE_APB1 + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB1 + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB1 + 0x3000) /* PERIPH_BASE_APB1 + 0x3400 (0x4000 3400 - 0x4000 37FF): Reserved */ #define SPI2_I2S_BASE (PERIPH_BASE_APB1 + 0x3800) #define SPI3_I2S_BASE (PERIPH_BASE_APB1 + 0x3c00) /* PERIPH_BASE_APB1 + 0x4000 (0x4000 4000 - 0x4000 3FFF): Reserved */ #define USART2_BASE (PERIPH_BASE_APB1 + 0x4400) #define USART3_BASE (PERIPH_BASE_APB1 + 0x4800) #define UART4_BASE (PERIPH_BASE_APB1 + 0x4c00) #define UART5_BASE (PERIPH_BASE_APB1 + 0x5000) #define I2C1_BASE (PERIPH_BASE_APB1 + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB1 + 0x5800) #define I2C3_BASE (PERIPH_BASE_APB1 + 0x5C00) /* PERIPH_BASE_APB1 + 0x6000 (0x4000 6000 - 0x4000 63FF): Reserved */ #define BX_CAN1_BASE (PERIPH_BASE_APB1 + 0x6400) #define BX_CAN2_BASE (PERIPH_BASE_APB1 + 0x6800) /* PERIPH_BASE_APB1 + 0x6C00 (0x4000 6C00 - 0x4000 6FFF): Reserved */ #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) #define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) /* PERIPH_BASE_APB1 + 0x7800 (0x4000 7800 - 0x4000 FFFF): Reserved */ /* APB2 */ #define TIM1_BASE (PERIPH_BASE_APB2 + 0x0000) #define TIM8_BASE (PERIPH_BASE_APB2 + 0x0400) /* PERIPH_BASE_APB2 + 0x0800 (0x4001 0800 - 0x4001 0FFF): Reserved */ #define USART1_BASE (PERIPH_BASE_APB2 + 0x1000) #define USART6_BASE (PERIPH_BASE_APB2 + 0x1400) /* PERIPH_BASE_APB2 + 0x1800 (0x4001 1800 - 0x4001 1FFF): Reserved */ #define ADC1_BASE (PERIPH_BASE_APB2 + 0x2000) #define ADC2_BASE (PERIPH_BASE_APB2 + 0x2000) #define ADC3_BASE (PERIPH_BASE_APB2 + 0x2000) /* PERIPH_BASE_APB2 + 0x2400 (0x4001 2400 - 0x4001 27FF): Reserved */ #define SDIO_BASE (PERIPH_BASE_APB2 + 0x2C00) /* PERIPH_BASE_APB2 + 0x2C00 (0x4001 2C00 - 0x4001 2FFF): Reserved */ #define SPI1_BASE (PERIPH_BASE_APB2 + 0x3000) /* PERIPH_BASE_APB2 + 0x3400 (0x4001 3400 - 0x4001 37FF): Reserved */ #define SYSCFG_BASE (PERIPH_BASE_APB2 + 0x3800) #define EXTI_BASE (PERIPH_BASE_APB2 + 0x3C00) #define TIM9_BASE (PERIPH_BASE_APB2 + 0x4000) #define TIM10_BASE (PERIPH_BASE_APB2 + 0x4400) #define TIM11_BASE (PERIPH_BASE_APB2 + 0x4800) /* PERIPH_BASE_APB2 + 0x4C00 (0x4001 4C00 - 0x4001 FFFF): Reserved */ /* AHB1 */ #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB1 + 0x0000) #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB1 + 0x0400) #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB1 + 0x0800) #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB1 + 0x0C00) #define GPIO_PORT_E_BASE (PERIPH_BASE_AHB1 + 0x1000) #define GPIO_PORT_F_BASE (PERIPH_BASE_AHB1 + 0x1400) #define GPIO_PORT_G_BASE (PERIPH_BASE_AHB1 + 0x1800) #define GPIO_PORT_H_BASE (PERIPH_BASE_AHB1 + 0x1C00) #define GPIO_PORT_I_BASE (PERIPH_BASE_AHB1 + 0x2000) /* PERIPH_BASE_AHB1 + 0x2400 (0x4002 2400 - 0x4002 2FFF): Reserved */ #define CRC_BASE (PERIPH_BASE_AHB1 + 0x3000) /* PERIPH_BASE_AHB1 + 0x3400 (0x4002 3400 - 0x4002 37FF): Reserved */ #define RCC_BASE (PERIPH_BASE_AHB1 + 0x3800) #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB1 + 0x3C00) #define BKPSRAM_BASE (PERIPH_BASE_AHB1 + 0x4000) /* PERIPH_BASE_AHB1 + 0x5000 (0x4002 5000 - 0x4002 5FFF): Reserved */ #define DMA1_BASE (PERIPH_BASE_AHB1 + 0x6000) #define DMA2_BASE (PERIPH_BASE_AHB1 + 0x6400) /* PERIPH_BASE_AHB1 + 0x6800 (0x4002 6800 - 0x4002 7FFF): Reserved */ #define ETHERNET_BASE (PERIPH_BASE_AHB1 + 0x8000) /* PERIPH_BASE_AHB1 + 0x9400 (0x4002 9400 - 0x4003 FFFF): Reserved */ #define USB_OTG_HS_BASE (PERIPH_BASE_AHB1 + 0x20000) /* PERIPH_BASE_AHB1 + 0x60000 (0x4008 0000 - 0x4FFF FFFF): Reserved */ /* AHB2 */ #define USB_OTG_FS_BASE (PERIPH_BASE_AHB2 + 0x0000) /* PERIPH_BASE_AHB2 + 0x40000 (0x5004 0000 - 0x5004 FFFF): Reserved */ #define DCMI_BASE (PERIPH_BASE_AHB2 + 0x50000) /* PERIPH_BASE_AHB2 + 0x50400 (0x5005 0400 - 0x5005 FFFF): Reserved */ #define CRYP_BASE (PERIPH_BASE_AHB2 + 0x60000) #define HASH_BASE (PERIPH_BASE_AHB2 + 0x60400) #define RNG_BASE (PERIPH_BASE_AHB2 + 0x60800) /* PERIPH_BASE_AHB2 + 0x61000 (0x5006 1000 - 0x5FFF FFFF): Reserved */ /* AHB3 */ #define FSMC_BASE (PERIPH_BASE_AHB3 + 0x40000000) /* PPIB */ #define DBGMCU_BASE (PPBI_BASE + 0x00042000) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines @brief Defined Constants and Types for the STM32F2xx PWR Control @ingroup STM32F2xx_defines @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_F2_H #define LIBOPENCM3_PWR_F2_H #include /* * This file extends the common STM32 version with definitions only * applicable to the STM32F2 series of devices. */ /* --- PWR_CR values ------------------------------------------------------- */ /* Bits [31:10]: Reserved, always read as 0. */ /* FPDS: Flash power down in stop mode */ #define PWR_CR_FPDS (1 << 9) /* --- PWR_CSR values ------------------------------------------------------ */ /* Bits [31:10]: Reserved, always read as 0. */ /* BRE: Backup regulator enable */ #define PWR_CSR_BRE (1 << 9) /* Bits [7:4]: Reserved, always read as 0. */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/rcc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include /* --- RCC registers ------------------------------------------------------- */ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_PLLCFGR MMIO32(RCC_BASE + 0x04) #define RCC_CFGR MMIO32(RCC_BASE + 0x08) #define RCC_CIR MMIO32(RCC_BASE + 0x0c) #define RCC_AHB1RSTR MMIO32(RCC_BASE + 0x10) #define RCC_AHB2RSTR MMIO32(RCC_BASE + 0x14) #define RCC_AHB3RSTR MMIO32(RCC_BASE + 0x18) /* RCC_BASE + 0x1c Reserved */ #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x20) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x24) /* RCC_BASE + 0x28 Reserved */ /* RCC_BASE + 0x2c Reserved */ #define RCC_AHB1ENR MMIO32(RCC_BASE + 0x30) #define RCC_AHB2ENR MMIO32(RCC_BASE + 0x34) #define RCC_AHB3ENR MMIO32(RCC_BASE + 0x38) /* RCC_BASE + 0x3c Reserved */ #define RCC_APB1ENR MMIO32(RCC_BASE + 0x40) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x44) /* RCC_BASE + 0x48 Reserved */ /* RCC_BASE + 0x4c Reserved */ #define RCC_AHB1LPENR MMIO32(RCC_BASE + 0x50) #define RCC_AHB2LPENR MMIO32(RCC_BASE + 0x54) #define RCC_AHB3LPENR MMIO32(RCC_BASE + 0x58) /* RCC_BASE + 0x5c Reserved */ #define RCC_APB1LPENR MMIO32(RCC_BASE + 0x60) #define RCC_APB2LPENR MMIO32(RCC_BASE + 0x64) /* RCC_BASE + 0x68 Reserved */ /* RCC_BASE + 0x6c Reserved */ #define RCC_BDCR MMIO32(RCC_BASE + 0x70) #define RCC_CSR MMIO32(RCC_BASE + 0x74) /* RCC_BASE + 0x78 Reserved */ /* RCC_BASE + 0x7c Reserved */ #define RCC_SSCGR MMIO32(RCC_BASE + 0x80) #define RCC_PLLI2SCFGR MMIO32(RCC_BASE + 0x84) /* --- RCC_CR values ------------------------------------------------------- */ #define RCC_CR_PLLI2SRDY (1 << 27) #define RCC_CR_PLLI2SON (1 << 26) #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_CSSON (1 << 19) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) /* HSICAL: [15:8] */ /* HSITRIM: [7:3] */ #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) /* --- RCC_PLLCFGR values -------------------------------------------------- */ /* PLLQ: [27:24] */ #define RCC_PLLCFGR_PLLQ_SHIFT 24 #define RCC_PLLCFGR_PLLSRC (1 << 22) /* PLLP: [17:16] */ #define RCC_PLLCFGR_PLLP_SHIFT 16 /* PLLN: [14:6] */ #define RCC_PLLCFGR_PLLN_SHIFT 6 /* PLLM: [5:0] */ #define RCC_PLLCFGR_PLLM_SHIFT 0 /* --- RCC_CFGR values ----------------------------------------------------- */ /* MCO2: Microcontroller clock output 2 */ #define RCC_CFGR_MCO2_SHIFT 30 #define RCC_CFGR_MCO2_SYSCLK 0x0 #define RCC_CFGR_MCO2_PLLI2S 0x1 #define RCC_CFGR_MCO2_HSE 0x2 #define RCC_CFGR_MCO2_PLL 0x3 /* MCO1/2PRE: MCO Prescalers */ #define RCC_CFGR_MCO2PRE_SHIFT 27 #define RCC_CFGR_MCO1PRE_SHIFT 24 #define RCC_CFGR_MCOPRE_DIV_NONE 0x0 #define RCC_CFGR_MCOPRE_DIV_2 0x4 #define RCC_CFGR_MCOPRE_DIV_3 0x5 #define RCC_CFGR_MCOPRE_DIV_4 0x6 #define RCC_CFGR_MCOPRE_DIV_5 0x7 /* I2SSRC: I2S clock selection */ #define RCC_CFGR_I2SSRC (1 << 23) /* MCO1: Microcontroller clock output 1 */ #define RCC_CFGR_MCO1_SHIFT 21 #define RCC_CFGR_MCO1_HSI 0x0 #define RCC_CFGR_MCO1_LSE 0x1 #define RCC_CFGR_MCO1_HSE 0x2 #define RCC_CFGR_MCO1_PLL 0x3 /* RTCPRE: HSE division factor for RTC clock */ #define RCC_CFGR_RTCPRE_SHIFT 21 /* PPRE1/2: APB high-speed prescalers */ #define RCC_CFGR_PPRE2_SHIFT 13 #define RCC_CFGR_PPRE1_SHIFT 10 #define RCC_CFGR_PPRE_DIV_NONE 0x0 #define RCC_CFGR_PPRE_DIV_2 0x4 #define RCC_CFGR_PPRE_DIV_4 0x5 #define RCC_CFGR_PPRE_DIV_8 0x6 #define RCC_CFGR_PPRE_DIV_16 0x7 /* HPRE: AHB high-speed prescaler */ #define RCC_CFGR_HPRE_SHIFT 4 #define RCC_CFGR_HPRE_DIV_NONE 0x0 #define RCC_CFGR_HPRE_DIV_2 (0x8 + 0) #define RCC_CFGR_HPRE_DIV_4 (0x8 + 1) #define RCC_CFGR_HPRE_DIV_8 (0x8 + 2) #define RCC_CFGR_HPRE_DIV_16 (0x8 + 3) #define RCC_CFGR_HPRE_DIV_64 (0x8 + 4) #define RCC_CFGR_HPRE_DIV_128 (0x8 + 5) #define RCC_CFGR_HPRE_DIV_256 (0x8 + 6) #define RCC_CFGR_HPRE_DIV_512 (0x8 + 7) /* SWS: System clock switch status */ #define RCC_CFGR_SWS_SHIFT 2 #define RCC_CFGR_SWS_HSI 0x0 #define RCC_CFGR_SWS_HSE 0x1 #define RCC_CFGR_SWS_PLL 0x2 /* SW: System clock switch */ #define RCC_CFGR_SW_SHIFT 0 #define RCC_CFGR_SW_HSI 0x0 #define RCC_CFGR_SW_HSE 0x1 #define RCC_CFGR_SW_PLL 0x2 /* --- RCC_CIR values ------------------------------------------------------ */ /* Clock security system interrupt clear bit */ #define RCC_CIR_CSSC (1 << 23) /* OSC ready interrupt clear bits */ #define RCC_CIR_PLLI2SRDYC (1 << 21) #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) /* OSC ready interrupt enable bits */ #define RCC_CIR_PLLI2SRDYIE (1 << 13) #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) /* Clock security system interrupt flag bit */ #define RCC_CIR_CSSF (1 << 7) /* OSC ready interrupt flag bits */ #define RCC_CIR_PLLI2SRDYF (1 << 5) #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_AHB1RSTR values ------------------------------------------------- */ #define RCC_AHB1RSTR_OTGHSRST (1 << 29) #define RCC_AHB1RSTR_ETHMACRST (1 << 25) #define RCC_AHB1RSTR_DMA2RST (1 << 22) #define RCC_AHB1RSTR_DMA1RST (1 << 21) #define RCC_AHB1RSTR_CRCRST (1 << 12) #define RCC_AHB1RSTR_IOPIRST (1 << 8) #define RCC_AHB1RSTR_IOPHRST (1 << 7) #define RCC_AHB1RSTR_IOPGRST (1 << 6) #define RCC_AHB1RSTR_IOPFRST (1 << 5) #define RCC_AHB1RSTR_IOPERST (1 << 4) #define RCC_AHB1RSTR_IOPDRST (1 << 3) #define RCC_AHB1RSTR_IOPCRST (1 << 2) #define RCC_AHB1RSTR_IOPBRST (1 << 1) #define RCC_AHB1RSTR_IOPARST (1 << 0) /* --- RCC_AHB2RSTR values ------------------------------------------------- */ #define RCC_AHB2RSTR_OTGFSRST (1 << 7) #define RCC_AHB2RSTR_RNGRST (1 << 6) #define RCC_AHB2RSTR_HASHRST (1 << 5) #define RCC_AHB2RSTR_CRYPRST (1 << 4) #define RCC_AHB2RSTR_DCMIRST (1 << 0) /* --- RCC_AHB3RSTR values ------------------------------------------------- */ #define RCC_AHB3RSTR_FSMCRST (1 << 0) /* --- RCC_APB1RSTR values ------------------------------------------------- */ #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_CAN2RST (1 << 26) #define RCC_APB1RSTR_CAN1RST (1 << 25) #define RCC_APB1RSTR_I2C3RST (1 << 23) #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_UART5RST (1 << 20) #define RCC_APB1RSTR_UART4RST (1 << 19) #define RCC_APB1RSTR_USART3RST (1 << 18) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI3RST (1 << 15) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_TIM14RST (1 << 8) #define RCC_APB1RSTR_TIM13RST (1 << 7) #define RCC_APB1RSTR_TIM12RST (1 << 6) #define RCC_APB1RSTR_TIM7RST (1 << 5) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM5RST (1 << 3) #define RCC_APB1RSTR_TIM4RST (1 << 2) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ #define RCC_APB2RSTR_TIM11RST (1 << 18) #define RCC_APB2RSTR_TIM10RST (1 << 17) #define RCC_APB2RSTR_TIM9RST (1 << 16) #define RCC_APB2RSTR_SYSCFGRST (1 << 14) #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_SDIORST (1 << 11) #define RCC_APB2RSTR_ADCRST (1 << 8) #define RCC_APB2RSTR_USART6RST (1 << 5) #define RCC_APB2RSTR_USART1RST (1 << 4) #define RCC_APB2RSTR_TIM8RST (1 << 1) #define RCC_APB2RSTR_TIM1RST (1 << 0) /* --- RCC_AHB1ENR values ------------------------------------------------- */ #define RCC_AHB1ENR_OTGHSULPIEN (1 << 30) #define RCC_AHB1ENR_OTGHSEN (1 << 29) #define RCC_AHB1ENR_ETHMACPTPEN (1 << 28) #define RCC_AHB1ENR_ETHMACRXEN (1 << 27) #define RCC_AHB1ENR_ETHMACTXEN (1 << 26) #define RCC_AHB1ENR_ETHMACEN (1 << 25) #define RCC_AHB1ENR_DMA2EN (1 << 22) #define RCC_AHB1ENR_DMA1EN (1 << 21) #define RCC_AHB1ENR_BKPSRAMEN (1 << 18) #define RCC_AHB1ENR_CRCEN (1 << 12) #define RCC_AHB1ENR_IOPIEN (1 << 8) #define RCC_AHB1ENR_IOPHEN (1 << 7) #define RCC_AHB1ENR_IOPGEN (1 << 6) #define RCC_AHB1ENR_IOPFEN (1 << 5) #define RCC_AHB1ENR_IOPEEN (1 << 4) #define RCC_AHB1ENR_IOPDEN (1 << 3) #define RCC_AHB1ENR_IOPCEN (1 << 2) #define RCC_AHB1ENR_IOPBEN (1 << 1) #define RCC_AHB1ENR_IOPAEN (1 << 0) /* --- RCC_AHB2ENR values ------------------------------------------------- */ #define RCC_AHB2ENR_OTGFSEN (1 << 7) #define RCC_AHB2ENR_RNGEN (1 << 6) #define RCC_AHB2ENR_HASHEN (1 << 5) #define RCC_AHB2ENR_CRYPEN (1 << 4) #define RCC_AHB2ENR_DCMIEN (1 << 0) /* --- RCC_AHB3ENR values ------------------------------------------------- */ #define RCC_AHB3ENR_FSMCEN (1 << 0) /* --- RCC_APB1ENR values ------------------------------------------------- */ #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_CAN2EN (1 << 26) #define RCC_APB1ENR_CAN1EN (1 << 25) #define RCC_APB1ENR_I2C3EN (1 << 23) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_UART5EN (1 << 20) #define RCC_APB1ENR_UART4EN (1 << 19) #define RCC_APB1ENR_USART3EN (1 << 18) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI3EN (1 << 15) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_TIM14EN (1 << 8) #define RCC_APB1ENR_TIM13EN (1 << 7) #define RCC_APB1ENR_TIM12EN (1 << 6) #define RCC_APB1ENR_TIM7EN (1 << 5) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM5EN (1 << 3) #define RCC_APB1ENR_TIM4EN (1 << 2) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /* --- RCC_APB2ENR values ------------------------------------------------- */ #define RCC_APB2ENR_TIM11EN (1 << 18) #define RCC_APB2ENR_TIM10EN (1 << 17) #define RCC_APB2ENR_TIM9EN (1 << 16) #define RCC_APB2ENR_SYSCFGEN (1 << 14) #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_SDIOEN (1 << 11) #define RCC_APB2ENR_ADC3EN (1 << 10) #define RCC_APB2ENR_ADC2EN (1 << 9) #define RCC_APB2ENR_ADC1EN (1 << 8) #define RCC_APB2ENR_USART6EN (1 << 5) #define RCC_APB2ENR_USART1EN (1 << 4) #define RCC_APB2ENR_TIM8EN (1 << 1) #define RCC_APB2ENR_TIM1EN (1 << 0) /* --- RCC_AHB1LPENR values ------------------------------------------------- */ #define RCC_AHB1LPENR_OTGHSULPILPEN (1 << 30) #define RCC_AHB1LPENR_OTGHSLPEN (1 << 29) #define RCC_AHB1LPENR_ETHMACPTPLPEN (1 << 28) #define RCC_AHB1LPENR_ETHMACRXLPEN (1 << 27) #define RCC_AHB1LPENR_ETHMACTXLPEN (1 << 26) #define RCC_AHB1LPENR_ETHMACLPEN (1 << 25) #define RCC_AHB1LPENR_DMA2LPEN (1 << 22) #define RCC_AHB1LPENR_DMA1LPEN (1 << 21) #define RCC_AHB1LPENR_BKPSRAMLPEN (1 << 18) #define RCC_AHB1LPENR_SRAM2LPEN (1 << 17) #define RCC_AHB1LPENR_SRAM1LPEN (1 << 16) #define RCC_AHB1LPENR_FLITFLPEN (1 << 15) #define RCC_AHB1LPENR_CRCLPEN (1 << 12) #define RCC_AHB1LPENR_IOPILPEN (1 << 8) #define RCC_AHB1LPENR_IOPHLPEN (1 << 7) #define RCC_AHB1LPENR_IOPGLPEN (1 << 6) #define RCC_AHB1LPENR_IOPFLPEN (1 << 5) #define RCC_AHB1LPENR_IOPELPEN (1 << 4) #define RCC_AHB1LPENR_IOPDLPEN (1 << 3) #define RCC_AHB1LPENR_IOPCLPEN (1 << 2) #define RCC_AHB1LPENR_IOPBLPEN (1 << 1) #define RCC_AHB1LPENR_IOPALPEN (1 << 0) /* --- RCC_AHB2LPENR values ------------------------------------------------- */ #define RCC_AHB2LPENR_OTGFSLPEN (1 << 7) #define RCC_AHB2LPENR_RNGLPEN (1 << 6) #define RCC_AHB2LPENR_HASHLPEN (1 << 5) #define RCC_AHB2LPENR_CRYPLPEN (1 << 4) #define RCC_AHB2LPENR_DCMILPEN (1 << 0) /* --- RCC_AHB3LPENR values ------------------------------------------------- */ #define RCC_AHB3LPENR_FSMCLPEN (1 << 0) /* --- RCC_APB1LPENR values ------------------------------------------------- */ #define RCC_APB1LPENR_DACLPEN (1 << 29) #define RCC_APB1LPENR_PWRLPEN (1 << 28) #define RCC_APB1LPENR_CAN2LPEN (1 << 26) #define RCC_APB1LPENR_CAN1LPEN (1 << 25) #define RCC_APB1LPENR_I2C3LPEN (1 << 23) #define RCC_APB1LPENR_I2C2LPEN (1 << 22) #define RCC_APB1LPENR_I2C1LPEN (1 << 21) #define RCC_APB1LPENR_UART5LPEN (1 << 20) #define RCC_APB1LPENR_UART4LPEN (1 << 19) #define RCC_APB1LPENR_USART3LPEN (1 << 18) #define RCC_APB1LPENR_USART2LPEN (1 << 17) #define RCC_APB1LPENR_SPI3LPEN (1 << 15) #define RCC_APB1LPENR_SPI2LPEN (1 << 14) #define RCC_APB1LPENR_WWDGLPEN (1 << 11) #define RCC_APB1LPENR_TIM14LPEN (1 << 8) #define RCC_APB1LPENR_TIM13LPEN (1 << 7) #define RCC_APB1LPENR_TIM12LPEN (1 << 6) #define RCC_APB1LPENR_TIM7LPEN (1 << 5) #define RCC_APB1LPENR_TIM6LPEN (1 << 4) #define RCC_APB1LPENR_TIM5LPEN (1 << 3) #define RCC_APB1LPENR_TIM4LPEN (1 << 2) #define RCC_APB1LPENR_TIM3LPEN (1 << 1) #define RCC_APB1LPENR_TIM2LPEN (1 << 0) /* --- RCC_APB2LPENR values ------------------------------------------------- */ #define RCC_APB2LPENR_TIM11LPEN (1 << 18) #define RCC_APB2LPENR_TIM10LPEN (1 << 17) #define RCC_APB2LPENR_TIM9LPEN (1 << 16) #define RCC_APB2LPENR_SYSCFGLPEN (1 << 14) #define RCC_APB2LPENR_SPI1LPEN (1 << 12) #define RCC_APB2LPENR_SDIOLPEN (1 << 11) #define RCC_APB2LPENR_ADC3LPEN (1 << 10) #define RCC_APB2LPENR_ADC2LPEN (1 << 9) #define RCC_APB2LPENR_ADC1LPEN (1 << 8) #define RCC_APB2LPENR_USART6LPEN (1 << 5) #define RCC_APB2LPENR_USART1LPEN (1 << 4) #define RCC_APB2LPENR_TIM8LPEN (1 << 1) #define RCC_APB2LPENR_TIM1LPEN (1 << 0) /* --- RCC_BDCR values ----------------------------------------------------- */ #define RCC_BDCR_BDRST (1 << 16) #define RCC_BDCR_RTCEN (1 << 15) /* RCC_BDCR[9:8]: RTCSEL */ #define RCC_BDCR_LSEBYP (1 << 2) #define RCC_BDCR_LSERDY (1 << 1) #define RCC_BDCR_LSEON (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_BORRSTF (1 << 25) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) /* --- RCC_SSCGR values ---------------------------------------------------- */ /* PLL spread spectrum clock generation documented in Datasheet. */ #define RCC_SSCGR_SSCGEN (1 << 31) #define RCC_SSCGR_SPREADSEL (1 << 30) /* RCC_SSCGR[27:16]: INCSTEP */ #define RCC_SSCGR_INCSTEP_SHIFT 16 /* RCC_SSCGR[15:0]: MODPER */ #define RCC_SSCGR_MODPER_SHIFT 15 /* --- RCC_PLLI2SCFGR values ----------------------------------------------- */ /* RCC_PLLI2SCFGR[30:28]: PLLI2SR */ #define RCC_PLLI2SCFGR_PLLI2SR_SHIFT 28 /* RCC_PLLI2SCFGR[14:6]: PLLI2SN */ #define RCC_PLLI2SCFGR_PLLI2SN_SHIFT 6 /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_ppre1_frequency; extern uint32_t rcc_ppre2_frequency; /* --- Function prototypes ------------------------------------------------- */ typedef enum { CLOCK_3V3_120MHZ, CLOCK_3V3_END } clock_3v3_t; typedef struct { uint8_t pllm; uint16_t plln; uint8_t pllp; uint8_t pllq; uint32_t flash_config; uint8_t hpre; uint8_t ppre1; uint8_t ppre2; uint32_t apb1_frequency; uint32_t apb2_frequency; } clock_scale_t; extern const clock_scale_t hse_8mhz_3v3[CLOCK_3V3_END]; typedef enum { PLL, HSE, HSI, LSE, LSI } osc_t; BEGIN_DECLS void rcc_osc_ready_int_clear(osc_t osc); void rcc_osc_ready_int_enable(osc_t osc); void rcc_osc_ready_int_disable(osc_t osc); int rcc_osc_ready_int_flag(osc_t osc); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_wait_for_osc_ready(osc_t osc); void rcc_wait_for_sysclk_status(osc_t osc); void rcc_osc_on(osc_t osc); void rcc_osc_off(osc_t osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_osc_bypass_enable(osc_t osc); void rcc_osc_bypass_disable(osc_t osc); void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset); void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset); void rcc_set_sysclk_source(uint32_t clk); void rcc_set_pll_source(uint32_t pllsrc); void rcc_set_ppre2(uint32_t ppre2); void rcc_set_ppre1(uint32_t ppre1); void rcc_set_hpre(uint32_t hpre); void rcc_set_rtcpre(uint32_t rtcpre); void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq); void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq); uint32_t rcc_system_clock_source(void); void rcc_clock_setup_hse_3v3(const clock_scale_t *clock); void rcc_backupdomain_reset(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/rng.h ================================================ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RNG_H #define LIBOPENCM3_RNG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines @brief Defined Constants and Types for the STM32F2xx RTC @ingroup STM32F2xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RTC_H #define LIBOPENCM3_RTC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/spi.h ================================================ /** @defgroup spi_defines SPI Defines @brief Defined Constants and Types for the STM32F2xx SPI @ingroup STM32F2xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/syscfg.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SYSCFG_H #define LIBOPENCM3_SYSCFG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/timer.h ================================================ /** @defgroup timer_defines Timer Defines @brief libopencm3 Defined Constants and Types for the STM32F2xx Timers @ingroup STM32F2xx_defines @version 1.0.0 @date 8 March 2013 @author @htmlonly © @endhtmlonly 2011 Fergus Noble LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TIMER_H #define LIBOPENCM3_TIMER_H #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f2/usart.h ================================================ /** @defgroup usart_defines USART Defines @brief Defined Constants and Types for the STM32F2xx USART @ingroup STM32F2xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/adc.h ================================================ /** @defgroup adc_defines ADC Defines * * @brief Defined Constants and Types for the STM32F3xx Analog to Digital * converter * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 ARCOS-Lab UCR * Copyright (C) 2013 Fernando Cortes * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_ADC_H #define LIBOPENCM3_ADC_H #include #include #define ADC1 ADC1_BASE #define ADC2 ADC2_BASE #define ADC3 ADC3_BASE #define ADC4 ADC4_BASE /* Master and slave ADCs common registers (ADC12 or ADC34) */ /*----------- ADC registers -------------------------------------- */ /* ADC interrupt and status register (ADCx_ISR, x=1..4) */ #define ADC_ISR(adc_base) MMIO32(adc_base + 0x00) #define ADC1_ISR ADC_ISR(ADC1_BASE) #define ADC2_ISR ADC_ISR(ADC2_BASE) #define ADC3_ISR ADC_ISR(ADC3_BASE) #define ADC4_ISR ADC_ISR(ADC4_BASE) /* Interrupt Enable Register (ADCx_IER, x=1..4) IER */ #define ADC_IER(adc_base) MMIO32(adc_base + 0x04) #define ADC1_IER ADC_IER(ADC1_BASE) #define ADC2_IER ADC_IER(ADC2_BASE) #define ADC3_IER ADC_IER(ADC3_BASE) #define ADC4_IER ADC_IER(ADC4_BASE) /* Control Register (ADCx_CR, x=1..4) CR */ #define ADC_CR(adc_base) MMIO32(adc_base + 0x08) #define ADC1_CR ADC_CR(ADC1_BASE) #define ADC2_CR ADC_CR(ADC2_BASE) #define ADC3_CR ADC_CR(ADC3_BASE) #define ADC4_CR ADC_CR(ADC4_BASE) /* Configuration Register (ADCx_CFGR, x=1..4) CFGR */ #define ADC_CFGR(adc_base) MMIO32(adc_base + 0x0C) #define ADC1_CFGR ADC_CFGR(ADC1_BASE) #define ADC2_CFGR ADC_CFGR(ADC2_BASE) #define ADC3_CFGR ADC_CFGR(ADC3_BASE) #define ADC4_CFGR ADC_CFGR(ADC4_BASE) /* Sample Time Register 1 (ADCx_SMPR1, x=1..4) SMPR1 */ #define ADC_SMPR1(adc_base) MMIO32(adc_base + 0x14) #define ADC1_SMPR1 ADC_SMPR1(ADC1_BASE) #define ADC2_SMPR1 ADC_SMPR1(ADC2_BASE) #define ADC3_SMPR1 ADC_SMPR1(ADC3_BASE) #define ADC4_SMPR1 ADC_SMPR1(ADC4_BASE) /* Sample Time Register 2 (ADCx_SMPR2, x=1..4) SMPR2 */ #define ADC_SMPR2(adc_base) MMIO32(adc_base + 0x18) #define ADC1_SMPR2 ADC_SMPR2(ADC1_BASE) #define ADC2_SMPR2 ADC_SMPR2(ADC2_BASE) #define ADC3_SMPR2 ADC_SMPR2(ADC3_BASE) #define ADC4_SMPR2 ADC_SMPR2(ADC4_BASE) /* Watchdog Threshold Register 1 (ADCx_TR1, x=1..4) TR1 */ #define ADC_TR1(adc_base) MMIO32(adc_base + 0x20) #define ADC1_TR1 ADC_TR1(ADC1_BASE) #define ADC2_TR1 ADC_TR1(ADC2_BASE) #define ADC3_TR1 ADC_TR1(ADC3_BASE) #define ADC4_TR1 ADC_TR1(ADC4_BASE) /* Watchdog Threshold Register 2 (ADCx_TR2, x=1..4) TR2 */ #define ADC_TR2(adc_base) MMIO32(adc_base + 0x24) #define ADC1_TR2 ADC_TR2(ADC1_BASE) #define ADC2_TR2 ADC_TR2(ADC2_BASE) #define ADC3_TR2 ADC_TR2(ADC3_BASE) #define ADC4_TR2 ADC_TR2(ADC4_BASE) /* Watchdog Threshold Register 3 (ADCx_TR3, x=1..4) TR3 */ #define ADC_TR3(adc_base) MMIO32(adc_base + 0x28) #define ADC1_TR3 ADC_TR3(ADC1_BASE) #define ADC2_TR3 ADC_TR3(ADC2_BASE) #define ADC3_TR3 ADC_TR3(ADC3_BASE) #define ADC4_TR3 ADC_TR3(ADC4_BASE) /* Regular Sequence Register 1 (ADCx_SQR1, x=1..4) SQR1 */ #define ADC_SQR1(adc_base) MMIO32(adc_base + 0x30) #define ADC1_SQR1 ADC_SQR1(ADC1_BASE) #define ADC2_SQR1 ADC_SQR1(ADC2_BASE) #define ADC3_SQR1 ADC_SQR1(ADC3_BASE) #define ADC4_SQR1 ADC_SQR1(ADC4_BASE) /* Regular Sequence Register 2 (ADCx_SQR2, x=1..4) SQR2 */ #define ADC_SQR2(adc_base) MMIO32(adc_base + 0x34) #define ADC1_SQR2 ADC_SQR2(ADC1_BASE) #define ADC2_SQR2 ADC_SQR2(ADC2_BASE) #define ADC3_SQR2 ADC_SQR2(ADC3_BASE) #define ADC4_SQR2 ADC_SQR2(ADC4_BASE) /* Regular Sequence Register 3 (ADCx_SQR3, x=1..4) SQR3 */ #define ADC_SQR3(adc_base) MMIO32(adc_base + 0x38) #define ADC1_SQR3 ADC_SQR3(ADC1_BASE) #define ADC2_SQR3 ADC_SQR3(ADC2_BASE) #define ADC3_SQR3 ADC_SQR3(ADC3_BASE) #define ADC4_SQR3 ADC_SQR3(ADC4_BASE) /* Regular Sequence Register 4 (ADCx_SQR3, x=1..4) SQR4 */ #define ADC_SQR4(adc_base) MMIO32(adc_base + 0x3C) #define ADC1_SQR4 ADC_SQR4(ADC1_BASE) #define ADC2_SQR4 ADC_SQR4(ADC2_BASE) #define ADC3_SQR4 ADC_SQR4(ADC3_BASE) #define ADC4_SQR4 ADC_SQR4(ADC4_BASE) /* regular Data Register (ADCx_DR, x=1..4) DR */ #define ADC_DR(adc_base) MMIO32(adc_base + 0x40) #define ADC1_DR ADC_DR(ADC1_BASE) #define ADC2_DR ADC_DR(ADC2_BASE) #define ADC3_DR ADC_DR(ADC3_BASE) #define ADC4_DR ADC_DR(ADC4_BASE) /* Injected Sequence Register (ADCx_JSQR, x=1..4) JSQR */ #define ADC_JSQR(adc_base) MMIO32(adc_base + 0x30) #define ADC1_JSQR ADC_JSQR(ADC1_BASE) #define ADC2_JSQR ADC_JSQR(ADC2_BASE) #define ADC3_JSQR ADC_JSQR(ADC3_BASE) #define ADC4_JSQR ADC_JSQR(ADC4_BASE) /* Offset Register x (ADCx_OFRy, x=1..4) (y=1..4) OFRy */ #define ADC_OFR1(adc_base) MMIO32(adc_base + 0x60) #define ADC1_OFR1 ADC_OFR1(ADC1_BASE) #define ADC2_OFR1 ADC_OFR1(ADC2_BASE) #define ADC3_OFR1 ADC_OFR1(ADC3_BASE) #define ADC4_OFR1 ADC_OFR1(ADC4_BASE) #define ADC_OFR2(adc_base) MMIO32(adc_base + 0x64) #define ADC1_OFR2 ADC_OFR2(ADC1_BASE) #define ADC2_OFR2 ADC_OFR2(ADC2_BASE) #define ADC3_OFR2 ADC_OFR2(ADC3_BASE) #define ADC4_OFR2 ADC_OFR2(ADC4_BASE) #define ADC_OFR3(adc_base) MMIO32(adc_base + 0x68) #define ADC1_OFR3 ADC_OFR3(ADC1_BASE) #define ADC2_OFR3 ADC_OFR3(ADC2_BASE) #define ADC3_OFR3 ADC_OFR3(ADC3_BASE) #define ADC4_OFR3 ADC_OFR3(ADC4_BASE) #define ADC_OFR4(adc_base) MMIO32(adc_base + 0x6C) #define ADC1_OFR4 ADC_OFR4(ADC1_BASE) #define ADC2_OFR4 ADC_OFR4(ADC2_BASE) #define ADC3_OFR4 ADC_OFR4(ADC3_BASE) #define ADC4_OFR4 ADC_OFR4(ADC4_BASE) /* Injected Data Register y (ADCx_JDRy, x=1..4, y= 1..4) JDRy */ #define ADC_JDR1(adc_base) MMIO32(adc_base + 0x80) #define ADC1_JDR1 ADC_JDR1(ADC1_BASE) #define ADC2_JDR1 ADC_JDR1(ADC2_BASE) #define ADC3_JDR1 ADC_JDR1(ADC3_BASE) #define ADC4_JDR1 ADC_JDR1(ADC4_BASE) #define ADC_JDR2(adc_base) MMIO32(adc_base + 0x84) #define ADC1_JDR2 ADC_JDR2(ADC1_BASE) #define ADC2_JDR2 ADC_JDR2(ADC2_BASE) #define ADC3_JDR2 ADC_JDR2(ADC3_BASE) #define ADC4_JDR2 ADC_JDR2(ADC4_BASE) #define ADC_JDR3(adc_base) MMIO32(adc_base + 0x88) #define ADC1_JDR3 ADC_JDR3(ADC1_BASE) #define ADC2_JDR3 ADC_JDR3(ADC2_BASE) #define ADC3_JDR3 ADC_JDR3(ADC3_BASE) #define ADC4_JDR3 ADC_JDR3(ADC4_BASE) #define ADC_JDR4(adc_base) MMIO32(adc_base + 0x8C) #define ADC1_JDR4 ADC_JDR4(ADC1_BASE) #define ADC2_JDR4 ADC_JDR4(ADC2_BASE) #define ADC3_JDR4 ADC_JDR4(ADC3_BASE) #define ADC4_JDR4 ADC_JDR4(ADC4_BASE) /* Analog Watchdog 2 Configuration Register (ADCx_AWD2CR, x=1..4) AWD2CR */ #define ADC_AWD2CR(adc_base) MMIO32(adc_base + 0xA0) #define ADC1_AWD2CR ADC_AWD2CR(ADC1_BASE) #define ADC2_AWD2CR ADC_AWD2CR(ADC2_BASE) #define ADC3_AWD2CR ADC_AWD2CR(ADC3_BASE) #define ADC4_AWD2CR ADC_AWD2CR(ADC4_BASE) /* Analog Watchdog 3 Configuration Register (ADCx_AWD3CR, x=1..4) AWD3CR */ #define ADC_AWD3CR(adc_base) MMIO32(adc_base + 0xA4) #define ADC1_AWD3CR ADC_AWD3CR(ADC1_BASE) #define ADC2_AWD3CR ADC_AWD3CR(ADC2_BASE) #define ADC3_AWD3CR ADC_AWD3CR(ADC3_BASE) #define ADC4_AWD3CR ADC_AWD3CR(ADC4_BASE) /* Differential Mode Selection Register 2 (ADCx_DIFSEL, x=1..4) DIFSEL */ #define ADC_DIFSEL(adc_base) MMIO32(adc_base + 0xB0) #define ADC1_DIFSEL ADC_DIFSEL(ADC1_BASE) #define ADC2_DIFSEL ADC_DIFSEL(ADC2_BASE) #define ADC3_DIFSEL ADC_DIFSEL(ADC3_BASE) #define ADC4_DIFSEL ADC_DIFSEL(ADC4_BASE) /* Calibration Factors (ADCx_CALFACT, x=1..4) CALFACT */ #define ADC_CALFACT(adc_base) MMIO32(adc_base + 0xB4) #define ADC1_CALFACT ADC_CALFACT(ADC1_BASE) #define ADC2_CALFACT ADC_CALFACT(ADC2_BASE) #define ADC3_CALFACT ADC_CALFACT(ADC3_BASE) #define ADC4_CALFACT ADC_CALFACT(ADC4_BASE) /* ADC common (shared) registers */ #define ADC_COMMON_REGISTERS_BASE (ADC1_BASE+0x300) #define ADC_CSR MMIO32(ADC_COMMON_REGISTERS_BASE + 0x0) #define ADC_CCR MMIO32(ADC_COMMON_REGISTERS_BASE + 0x8) #define ADC_CDR MMIO32(ADC_COMMON_REGISTERS_BASE + 0xA) /*------- ADC_ISR values ---------*/ /* QOVF: Injected context queue overflow */ #define ADC_ISR_JQOVF (1 << 10) /* AWD3: Analog watchdog 3 flag */ #define ADC_ISR_AWD3 (1 << 9) /* AWD2: Analog watchdog 2 flag */ #define ADC_ISR_AWD2 (1 << 8) /* AWD1: Analog watchdog 1 flag */ #define ADC_ISR_AWD1 (1 << 7) /* JEOS: Injected channel end of sequence flag */ #define ADC_ISR_JEOS (1 << 6) /* JEOC: Injected channel end of conversion flag */ #define ADC_ISR_JEOC (1 << 5) /* OVR: ADC overrun */ #define ADC_ISR_OVR (1 << 4) /* EOS: End of regular sequence flag */ #define ADC_ISR_EOS (1 << 3) /* EOC: End of conversion flag */ #define ADC_ISR_EOC (1 << 2) /* EOSMP: End of sampling flag */ #define ADC_ISR_EOSMP (1 << 1) /* ADRDY: ADC ready */ #define ADC_ISR_ADRDY (1 << 0) /*------- ADC_IER values ---------*/ /* JQOVFIE: Injected context queue overflow interrupt enable */ #define ADC_IER_JQOVFIE (1 << 10) /* AWD3IE: Analog watchdog 3 interrupt enable */ #define ADC_IER_AWD3IE (1 << 9) /* AWD2IE: Analog watchdog 2 interrupt enable */ #define ADC_IER_AWD2IE (1 << 8) /* AWD1IE: Analog watchdog 1 interrupt enable */ #define ADC_IER_AWD1IE (1 << 7) /* JEOSIE: End of injected sequence of conversions interrupt enable */ #define ADC_IER_JEOSIE (1 << 6) /* JEOCIE: End of injected conversion interrupt enable */ #define ADC_IER_JEOCIE (1 << 5) /* OVRIE: Overrun interrupt enable */ #define ADC_IER_OVRIE (1 << 4) /* EOSIE: End of regular sequence of conversions interrupt enable */ #define ADC_IER_EOSIE (1 << 3) /* EOCIE: End of regular conversion interrupt enable */ #define ADC_IER_EOCIE (1 << 2) /* EOSMPIE: End of sampling flag interrupt enable for regular conversions */ #define ADC_IER_EOSMPIE (1 << 1) /* ADRDYIE : ADC ready interrupt enable */ #define ADC_IER_ADRDYIE (1 << 0) /*------- ADC_CR values ---------*/ /* ADCAL: ADC calibration */ #define ADC_CR_ADCAL (1 << 31) /* ADCALDIF: Differential mode for calibration */ #define ADC_CR_ADCALDIF (1 << 30) /* ADVREGEN: ADC voltage regulador enable */ #define ADC_CR_ADVREGEN_INTERMEDIATE (0x0 << 28) #define ADC_CR_ADVREGEN_ENABLE (0x1 << 28) #define ADC_CR_ADVREGEN_DISABLE (0x2 << 28) /* --- Bit 0x3 reserved --- */ /* JADSTP: ADC stop of injected conversion command */ #define ADC_CR_JADSTP (1 << 5) /* ADSTP: ADC stop of regular conversion command */ #define ADC_CR_ADSTP (1 << 4) /* JADSTART: ADC start of injected conversion */ #define ADC_CR_JADSTART (1 << 3) /* ADSTART: ADC start of regular conversion */ #define ADC_CR_ADSTART (1 << 2) /* ADDIS: ADC disable command */ #define ADC_CR_ADDIS (1 << 1) /* ADEN: ADC enable control */ #define ADC_CR_ADEN (1 << 0) /*------- ADC_CFGR values ---------*/ /* AWD1CH[4:0]: Analog watchdog 1 channel selection */ /* Bit 0x0 reserved */ #define ADC_CFGR_AWD1CH_ADC_IN_CH_1 (0x01 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_2 (0x02 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_3 (0x03 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_4 (0x04 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_5 (0x05 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_6 (0x06 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_7 (0x07 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_8 (0x08 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_9 (0x09 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_10 (0x0A << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_11 (0x0B << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_12 (0x0C << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_13 (0x0D << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_14 (0x0E << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_15 (0x0F << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_16 (0x10 << 26) #define ADC_CFGR_AWD1CH_ADC_IN_CH_17 (0x11 << 26) #define ADC_CFGR_AWD1CH_MASK (0x1F << 26) /* Ohters bits reserved, must not be used */ /* JAUTO: Autoamtic injected group conversion */ #define ADC_CFGR_JAUTO (1 << 25) /* JAWD1EN: Analog watchdog 1 enable on injected channels */ #define ADC_CFGR_JAWD1EN (1 << 24) /* AWD1EN: Analog watchdog 1 enable on regular channels */ #define ADC_CFGR_AWD1EN (1 << 23) /* AWD1SGL: Enable the watchdog 1 on a single channel or on all channels */ #define ADC_CFGR_AWD1SGL (1 << 22) /* JQM: JSQR queue mode */ #define ADC_CFGR_JQM (1 << 21) /* JDISCEN: Discontinuous mode on injected channels */ #define ADC_CFGR_JDISCEN (1 << 20) /* DISCNUM[2:0]: Discontinuous mode channel count */ #define ADC_CFGR_DISCNUM_1_CH (0x0 << 17) #define ADC_CFGR_DISCNUM_2_CH (0x1 << 17) #define ADC_CFGR_DISCNUM_3_CH (0x2 << 17) #define ADC_CFGR_DISCNUM_4_CH (0x3 << 17) #define ADC_CFGR_DISCNUM_5_CH (0x4 << 17) #define ADC_CFGR_DISCNUM_6_CH (0x5 << 17) #define ADC_CFGR_DISCNUM_7_CH (0x6 << 17) #define ADC_CFGR_DISCNUM_8_CH (0x7 << 17) #define ADC_CFGR_DISCNUM_SHIFT 17 /* DISCEN: Discontinuous mode for regular channels */ #define ADC_CFGR_DISCEN (1 << 16) /* AUTDLY: Delayed conversion mode */ #define ADC_CFGR_AUTDLY (1 << 14) /* CONT: Single / continuous conversion mode for regular conversions */ #define ADC_CFGR_CONT (1 << 13) /* OVRMOD: Overrun Mode */ #define ADC_CFGR_OVRMOD (1 << 12) /* * EXTEN[1:0]: External trigger enable and polarity selection for regular * channels */ #define ADC_CFGR_EXTEN_DISABLED (0x0 << 10) #define ADC_CFGR_EXTEN_RISING_EDGE (0x1 << 10) #define ADC_CFGR_EXTEN_FALLING_EDGE (0x2 << 10) #define ADC_CFGR_EXTEN_BOTH_EDGES (0x3 << 10) #define ADC_CFGR_EXTEN_MASK (0x3 << 10) /* EXTSEL[3:0]: External trigger selection for regular group */ #define ADC_CFGR_EXTSEL_EVENT_0 (0x0 << 6) #define ADC_CFGR_EXTSEL_EVENT_1 (0x1 << 6) #define ADC_CFGR_EXTSEL_EVENT_2 (0x2 << 6) #define ADC_CFGR_EXTSEL_EVENT_3 (0x3 << 6) #define ADC_CFGR_EXTSEL_EVENT_4 (0x4 << 6) #define ADC_CFGR_EXTSEL_EVENT_5 (0x5 << 6) #define ADC_CFGR_EXTSEL_EVENT_6 (0x6 << 6) #define ADC_CFGR_EXTSEL_EVENT_7 (0x7 << 6) #define ADC_CFGR_EXTSEL_EVENT_8 (0x8 << 6) #define ADC_CFGR_EXTSEL_EVENT_9 (0x9 << 6) #define ADC_CFGR_EXTSEL_EVENT_10 (0xA << 6) #define ADC_CFGR_EXTSEL_EVENT_11 (0xB << 6) #define ADC_CFGR_EXTSEL_EVENT_12 (0xC << 6) #define ADC_CFGR_EXTSEL_EVENT_13 (0xD << 6) #define ADC_CFGR_EXTSEL_EVENT_14 (0xE << 6) #define ADC_CFGR_EXTSEL_EVENT_15 (0xF << 6) #define ADC_CFGR_EXTSEL_MASK (0xF << 6) /* ALIGN: Data alignment */ #define ADC_CFGR_ALIGN (1 << 5) /* RES[1:0]: Data resolution */ #define ADC_CFGR_RES_12_BIT (0x0 << 3) #define ADC_CFGR_RES_10_BIT (0x1 << 3) #define ADC_CFGR_RES_8_BIT (0x2 << 3) #define ADC_CFGR_RES_6_BIT (0x3 << 3) #define ADC_CFGR_RES_MASK (0x3 << 3) /* DMACFG: Direct memory access configuration */ #define ADC_CFGR_DMACFG (1 << 1) /* DMAEN: Direct memory access enable */ #define ADC_CFGR_DMAEN (1 << 0) /*------- ADC_SMPR1 values ---------*/ #define ADC_SMPR1_SMP8_LSB 24 #define ADC_SMPR1_SMP7_LSB 21 #define ADC_SMPR1_SMP6_LSB 18 #define ADC_SMPR1_SMP5_LSB 15 #define ADC_SMPR1_SMP4_LSB 12 #define ADC_SMPR1_SMP3_LSB 9 #define ADC_SMPR1_SMP2_LSB 6 #define ADC_SMPR1_SMP1_LSB 3 #define ADC_SMPR1_SMP8_MSK (0x7 << ADC_SMP8_LSB) #define ADC_SMPR1_SMP7_MSK (0x7 << ADC_SMP7_LSB) #define ADC_SMPR1_SMP6_MSK (0x7 << ADC_SMP6_LSB) #define ADC_SMPR1_SMP5_MSK (0x7 << ADC_SMP5_LSB) #define ADC_SMPR1_SMP4_MSK (0x7 << ADC_SMP4_LSB) #define ADC_SMPR1_SMP3_MSK (0x7 << ADC_SMP3_LSB) #define ADC_SMPR1_SMP2_MSK (0x7 << ADC_SMP2_LSB) #define ADC_SMPR1_SMP1_MSK (0x7 << ADC_SMP1_LSB) /****************************************************************************/ /* ADC_SMPR1 ADC Sample Time Selection for Channels */ /** @defgroup adc_sample_r1 ADC Sample Time Selection for ADC1 @ingroup adc_defines @{*/ #define ADC_SMPR1_SMP_1DOT5CYC 0x0 #define ADC_SMPR1_SMP_2DOT5CYC 0x1 #define ADC_SMPR1_SMP_4DOT5CYC 0x2 #define ADC_SMPR1_SMP_7DOT5CYC 0x3 #define ADC_SMPR1_SMP_19DOT5CYC 0x4 #define ADC_SMPR1_SMP_61DOT5CYC 0x5 #define ADC_SMPR1_SMP_181DOT5CYC 0x6 #define ADC_SMPR1_SMP_601DOT5CYC 0x7 /**@}*/ /* SMPx[2:0]: Channel x sampling time selection */ /*------- ADC_SMPR2 values ---------*/ /* SMPx[2:0]: Channel x sampling time selection */ /*------- ADC_TR1 values ---------*/ /* Bits 27:16 HT1[11:0]: Analog watchdog 1 higher threshold */ /* Bit 11:0 LT1[11:0]: Analog watchdog 1 lower threshold */ /*------- ADC_T2 values ---------*/ /* Bits 23:16 HT2[7:0]: Analog watchdog 2 higher threshold */ /* Bit 7:0 LT2[7:0]: Analog watchdog 2 lower threshold */ /*------- ADC_T3 values ---------*/ /* Bits 23:16 HT3[7:0]: Analog watchdog 3 higher threshold */ /* Bit 7:0 LT3[7:0]: Analog watchdog 3 lower threshold */ /*------- ADC_SQR1 values ---------*/ #define ADC_SQR1_L_LSB 0 #define ADC_SQR1_SQ1_LSB 6 #define ADC_SQR1_SQ2_LSB 12 #define ADC_SQR1_SQ3_LSB 18 #define ADC_SQR1_SQ4_LSB 24 #define ADC_SQR1_L_MSK (0xf << ADC_SQR1_L_LSB) #define ADC_SQR1_SQ1_MSK (0x1f << ADC_SQR1_SQ1_LSB) #define ADC_SQR1_SQ2_MSK (0x1f << ADC_SQR1_SQ2_LSB) #define ADC_SQR1_SQ3_MSK (0x1f << ADC_SQR1_SQ3_LSB) #define ADC_SQR1_SQ4_MSK (0x1f << ADC_SQR1_SQ4_LSB) /* Bits 28:24 SQ4[4:0]: 4th conversion in regular sequence */ /* Bits 22:18 SQ3[4:0]: 3rd conversion in regular sequence */ /* Bits 16:12 SQ2[4:0]: 2nd conversion in regular sequence */ /* Bits 10:6 SQ1[4:0]: 1st conversion in regular sequence */ /* L[3:0]: Regular channel sequence length */ #define ADC_SQR1_L_1_CONVERSION (0x0 << 0) #define ADC_SQR1_L_2_CONVERSION (0x1 << 0) #define ADC_SQR1_L_3_CONVERSION (0x2 << 0) #define ADC_SQR1_L_4_CONVERSION (0x3 << 0) #define ADC_SQR1_L_5_CONVERSION (0x4 << 0) #define ADC_SQR1_L_6_CONVERSION (0x5 << 0) #define ADC_SQR1_L_7_CONVERSION (0x6 << 0) #define ADC_SQR1_L_8_CONVERSION (0x7 << 0) #define ADC_SQR1_L_9_CONVERSION (0x8 << 0) #define ADC_SQR1_L_10_CONVERSION (0x9 << 0) #define ADC_SQR1_L_11_CONVERSION (0xA << 0) #define ADC_SQR1_L_12_CONVERSION (0xB << 0) #define ADC_SQR1_L_13_CONVERSION (0xC << 0) #define ADC_SQR1_L_14_CONVERSION (0xD << 0) #define ADC_SQR1_L_15_CONVERSION (0xE << 0) #define ADC_SQR1_L_16_CONVERSION (0xF << 0) /*------- ADC_SQR2 values ---------*/ /* Bits 28:24 SQ9[4:0]: 9th conversion in regular sequence */ /* Bits 22:18 SQ8[4:0]: 8th conversion in regular sequence */ /* Bits 16:12 SQ7[4:0]: 7th conversion in regular sequence */ /* Bits 10:6 SQ6[4:0]: 6th conversion in regular sequence */ /* Bits 4:0 SQ5[4:0]: 5th conversion in regular sequence */ /*------- ADC_SQR3 values ---------*/ /* Bits 28:24 SQ14[4:0]: 14th conversion in regular sequence */ /* Bits 22:18 SQ13[4:0]: 13th conversion in regular sequence */ /* Bits 16:12 SQ12[4:0]: 12th conversion in regular sequence */ /* Bits 10:6 SQ11[4:0]: 11th conversion in regular sequence */ /* Bits 4:0 SQ10[4:0]: 10th conversion in regular sequence */ /*------- ADC_SQR4 values ---------*/ /* Bits 10:6 SQ16[4:0]: 16th conversion in regular sequence */ /* Bits 4:0 SQ15[4:0]: 15th conversion in regular sequence */ /*------- ADC_DR values ---------*/ /* Bits 15:0 RDATA[15:0]: Regular Data converted */ /*------- ADC_JSQR values ---------*/ #define ADC_JSQR_JL_LSB 0 #define ADC_JSQR_JSQ4_LSB 26 #define ADC_JSQR_JSQ3_LSB 20 #define ADC_JSQR_JSQ2_LSB 14 #define ADC_JSQR_JSQ1_LSB 8 /* Bits 30:26 JSQ4[4:0]: 4th conversion in the injected sequence */ /* Bits 24:20 JSQ3[4:0]: 3rd conversion in the injected sequence */ /* Bits 18:14 JSQ2[4:0]: 2nd conversion in the injected sequence */ /* Bits 12:8 JSQ1[4:0]: 1st conversion in the injected sequence */ /* * JEXTEN[1:0]: External Trigger Enable and Polarity Selection for injected * channels */ #define ADC_JSQR_JEXTEN_DISABLED (0x0 << 6) #define ADC_JSQR_JEXTEN_RISING_EDGE (0x1 << 6) #define ADC_JSQR_JEXTEN_FALLING_EDGE (0x2 << 6) #define ADC_JSQR_JEXTEN_BOTH_EDGES (0x3 << 6) #define ADC_JSQR_JEXTEN_MASK (0x3 << 6) /* JEXTSEL[3:0]: External Trigger Selection for injected group */ #define ADC_JSQR_JEXTSEL_EVENT_0 (0x0 << 2) #define ADC_JSQR_JEXTSEL_EVENT_1 (0x1 << 2) #define ADC_JSQR_JEXTSEL_EVENT_2 (0x2 << 2) #define ADC_JSQR_JEXTSEL_EVENT_3 (0x3 << 2) #define ADC_JSQR_JEXTSEL_EVENT_4 (0x4 << 2) #define ADC_JSQR_JEXTSEL_EVENT_5 (0x5 << 2) #define ADC_JSQR_JEXTSEL_EVENT_6 (0x6 << 2) #define ADC_JSQR_JEXTSEL_EVENT_7 (0x7 << 2) #define ADC_JSQR_JEXTSEL_EVENT_8 (0x8 << 2) #define ADC_JSQR_JEXTSEL_EVENT_9 (0x9 << 2) #define ADC_JSQR_JEXTSEL_EVENT_10 (0xA << 2) #define ADC_JSQR_JEXTSEL_EVENT_11 (0xB << 2) #define ADC_JSQR_JEXTSEL_EVENT_12 (0xC << 2) #define ADC_JSQR_JEXTSEL_EVENT_13 (0xD << 2) #define ADC_JSQR_JEXTSEL_EVENT_14 (0xE << 2) #define ADC_JSQR_JEXTSEL_EVENT_15 (0xF << 2) #define ADC_JSQR_JEXTSEL_MASK (0xF << 2) /* JL[1:0]: Injected channel sequence length */ #define ADC_JSQR_JL_1_CONVERSION (0x0 << 0) #define ADC_JSQR_JL_2_CONVERSIONS (0x1 << 0) #define ADC_JSQR_JL_3_CONVERSIONS (0x2 << 0) #define ADC_JSQR_JL_4_CONVERSIONS (0x3 << 0) /*------- ADC_OFR1 values ---------*/ /* OFFSET1_EN: Offset 1 Enable */ #define ADC_OFR1_OFFSET1_EN (1 << 31) /* Bits 30:26 OFFSET1_CH[4:0]: Channel selection for the Data offset 1 */ /* * Bits 11:0 OFFSET1[11:0]: Data offset y for the channel programmed into bits * OFFSET1_CH[4:0] */ /*------- ADC_OFR2 values ---------*/ /* OFFSET2_EN: Offset 2 Enable */ #define ADC_OFR2_OFFSET2_EN (1 << 31) /* Bits 30:26 OFFSET2_CH[4:0]: Channel selection for the Data offset 2 */ /* * Bits 11:0 OFFSET2[11:0]: Data offset y for the channel programmed into bits * OFFSET2_CH[4:0] */ /*------- ADC_OFR3 values ---------*/ /* OFFSET3_EN: Offset 3 Enable */ #define ADC_OFR3_OFFSET3_EN (1 << 31) /* Bits 30:26 OFFSET3_CH[4:0]: Channel selection for the Data offset 3 */ /* * Bits 11:0 OFFSET3[11:0]: Data offset y for the channel programmed into bits * OFFSET3_CH[4:0] */ /*------- ADC_OFR4 values ---------*/ /* OFFSET4_EN: Offset 4 Enable */ #define ADC_OFR4_OFFSET4_EN (1 << 31) /* Bits 30:26 OFFSET4_CH[4:0]: Channel selection for the Data offset 4 */ /* * Bits 11:0 OFFSET4[11:0]: Data offset y for the channel programmed into bits * OFFSET4_CH[4:0] */ /*------- ADC_JDRy, y= 1..4 values -------*/ /* Bits 15:0 JDATA[15:0]: Injected data */ /*------- ADC_AWD2CR values ---------*/ /* Bits 18:1 AWD2CH[18:1]: Analog watchdog 2 channel selection */ /*------- ADC_AWD3CR values ---------*/ /* Bits 18:1 AWD3CH[18:1]: Analog watchdog 3 channel selection */ /*------- ADC_DIFSEL values ---------*/ /* DIFSEL[18:16]: Differential mode for channels 18 to 16. */ /* Bits 15:1 DIFSEL[15:1]: Differential mode for channels 15 to 1 */ /*------- ADC_CALFACT values ---------*/ /* Bits 22:16 CALFACT_D[6:0]: Calibration Factors in differential mode */ /* Bits 6:0 CALFACT_S[6:0]: Calibration Factors In Single-Ended mode */ /*--------------- ADC_CSR values ------------------------*/ /* Bit 26 JQOVF_SLV: Injected Context Queue Overflow flag of the slave ADC */ #define ADC_CSR_JQOVF_SLV (1 << 26) /* Bit 25 AWD3_SLV: Analog watchdog 3 flag of the slave ADC */ #define ADC_CSR_AWD3_SLV (1 << 25) /* Bit 24 AWD2_SLV: Analog watchdog 2 flag of the slave ADC */ #define ADC_CSR_AWD2_SLV (1 << 24) /* Bit 23 AWD1_SLV: Analog watchdog 1 flag of the slave ADC */ #define ADC_CSR_AWD1_SLV (1 << 23) /* Bit 22 JEOS_SLV: End of injected sequence flag of the slave ADC */ #define ADC_CSR_JEOS_SLV (1 << 22) /* Bit 21 JEOC_SLV: End of injected conversion flag of the slave ADC */ #define ADC_CSR_JEOC_SLV (1 << 21) /* Bit 20 OVR_SLV: Overrun flag of the slave ADC */ #define ADC_CSR_OVR_SLV (1 << 20) /* Bit 19 EOS_SLV: End of regular sequence flag of the slave ADC */ #define ADC_CSR_EOS_SLV (1 << 19) /* Bit 18 EOC_SLV: End of regular conversion of the slave ADC */ #define ADC_CSR_EOC_SLV (1 << 18) /* Bit 17 EOSMP_SLV: End of Sampling phase flag of the slave ADC */ #define ADC_CSR_EOSMP_SLV (1 << 17) /* Bit 16 ADRDY_SLV: Slave ADC ready */ #define ADC_CSR_ADRDY_SLV (1 << 16) /* Bit 10 JQOVF_MST: Injected Context Queue Overflow flag of the master ADC */ #define ADC_CSR_JQOVF_MST (1 << 10) /* Bit 9 AWD3_MST: Analog watchdog 3 flag of the master ADC */ #define ADC_CSR_AWD3_MST (1 << 9) /* Bit 8 AWD2_MST: Analog watchdog 2 flag of the master ADC */ #define ADC_CSR_AWD2_MST (1 << 8) /* Bit 7 AWD1_MST: Analog watchdog 1 flag of the master ADC */ #define ADC_CSR_AWD1_MST (1 << 7) /* Bit 6 JEOS_MST: End of injected sequence flag of the master ADC */ #define ADC_CSR_JEOS_MST (1 << 6) /* Bit 5 JEOC_MST: End of injected conversion flag of the master ADC */ #define ADC_CSR_JEOC_MST (1 << 5) /* Bit 4 OVR_MST: Overrun flag of the master ADC */ #define ADC_CSR_OVR_MST (1 << 4) /* Bit 3 EOS_MST: End of regular sequence flag of the master ADC */ #define ADC_CSR_EOS_MST (1 << 3) /* Bit 2 EOC_MST: End of regular conversion of the master ADC */ #define ADC_CSR_EOC_MST (1 << 2) /* Bit 1 EOSMP_MST: End of Sampling phase flag of the master ADC */ #define ADC_CSR_EOSMP_MST (1 << 1) /* Bit 0 ADRDY_MST: Master ADC ready */ #define ADC_CSR_ADRDY_MST (1 << 0) /*-------- ADC_CCR values ------------*/ /* VBATEN: VBAT enable */ #define ADC_CCR_VBATEN (1 << 24) /* TSEN: Temperature sensor enable */ #define ADC_CCR_TSEN (1 << 23) /* VREFEN: VREFINT enable */ #define ADC_CCR_VREFEN (1 << 22) /* CKMODE[1:0]: ADC clock mode */ #define ADC_CCR_CKMODE_CKX (0x0 << 16) #define ADC_CCR_CKMODE_DIV1 (0x1 << 16) #define ADC_CCR_CKMODE_DIV2 (0x2 << 16) #define ADC_CCR_CKMODE_DIV4 (0x3 << 16) #define ADC_CCR_CKMODE_MASK (0x3 << 16) /* MDMA[1:0]: Direct memory access mode for dual ADC mode */ #define ADC_CCR_MDMA_DISABLE (0x0 << 14) /*#define ADC_CCR_MDMA_RESERVED (0x1 << 14)*/ #define ADC_CCR_MDMA_12_10_BIT (0x2 << 14) #define ADC_CCR_MDMA_8_6_BIT (0x3 << 14) /* DMACFG: DMA configuration (for dual ADC mode) */ #define ADC_CCR_DMACFG (1 << 13) /* DELAY: Delay between 2 sampling phases */ #define ADC_CCR_DELAY_SHIFT 8 /* DUAL[4:0]: Dual ADC mode selection */ #define ADC_CCR_DUAL_SHIFT 0 /*---------------- ADC_CDR values -----------------*/ /* Bits 31:16 RDATA_SLV[15:0]: Regular data of the slave ADC */ /* Bits 15:0 RDATA_MST[15:0]: Regular data of the master ADC. */ BEGIN_DECLS void adc_power_on(uint32_t adc); void adc_off(uint32_t adc); void adc_enable_analog_watchdog_regular(uint32_t adc); void adc_disable_analog_watchdog_regular(uint32_t adc); void adc_enable_analog_watchdog_injected(uint32_t adc); void adc_disable_analog_watchdog_injected(uint32_t adc); void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length); void adc_disable_discontinuous_mode_regular(uint32_t adc); void adc_enable_discontinuous_mode_injected(uint32_t adc); void adc_disable_discontinuous_mode_injected(uint32_t adc); void adc_enable_automatic_injected_group_conversion(uint32_t adc); void adc_disable_automatic_injected_group_conversion(uint32_t adc); void adc_enable_analog_watchdog_on_all_channels(uint32_t adc); void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel); /*void adc_enable_scan_mode(uint32_t adc);*/ /*void adc_disable_scan_mode(uint32_t adc);*/ void adc_enable_eoc_interrupt_injected(uint32_t adc); void adc_disable_eoc_interrupt_injected(uint32_t adc); void adc_enable_all_awd_interrupt(uint32_t adc); void adc_disable_all_awd_interrupt(uint32_t adc); void adc_enable_eoc_interrupt(uint32_t adc); void adc_disable_eoc_interrupt(uint32_t adc); void adc_start_conversion_regular(uint32_t adc); void adc_start_conversion_injected(uint32_t adc); void adc_disable_external_trigger_regular(uint32_t adc); void adc_disable_external_trigger_injected(uint32_t adc); void adc_set_left_aligned(uint32_t adc); void adc_set_right_aligned(uint32_t adc); void adc_enable_dma(uint32_t adc); void adc_disable_dma(uint32_t adc); void adc_set_continuous_conversion_mode(uint32_t adc); void adc_set_single_conversion_mode(uint32_t adc); void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time); void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time); void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold); void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold); void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); bool adc_eoc(uint32_t adc); bool adc_eoc_injected(uint32_t adc); uint32_t adc_read_regular(uint32_t adc); uint32_t adc_read_injected(uint32_t adc, uint8_t reg); void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset); void adc_set_clk_prescale(uint32_t prescaler); void adc_set_multi_mode(uint32_t mode); void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity); void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger, uint32_t polarity); void adc_set_resolution(uint32_t adc, uint16_t resolution); void adc_enable_overrun_interrupt(uint32_t adc); void adc_disable_overrun_interrupt(uint32_t adc); bool adc_get_overrun_flag(uint32_t adc); void adc_clear_overrun_flag(uint32_t adc); bool adc_awd(uint32_t adc); void adc_eoc_after_each(uint32_t adc); void adc_eoc_after_group(uint32_t adc); /*void adc_set_dma_continue(uint32_t adc);*/ /*void adc_set_dma_terminate(uint32_t adc);*/ void adc_enable_temperature_sensor(void); void adc_disable_temperature_sensor(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/crc.h ================================================ /** @defgroup crc_defines CRC Defines * * @brief Defined Constants and Types for the STM32F3xx CRC Generator * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include /* --- CRC registers ------------------------------------------------------- */ /* Initial CRC value (CRC_INIT) */ #define CRC_INIT MMIO32(CRC_BASE + 0x10) /* CRC polynomial (CRC_POL) */ #define CRC_POL MMIO32(CRC_BASE + 0x14) /* --- CRC_CR values ------------------------------------------------------- */ /* REV_OUT: Reverse output data */ #define CRC_CR_REV_OUT (1 << 7) /* REV_IN[1:0]: Reverse input data */ #define CRC_CR_REV_IN_NOT_AFFECTED (0x0 << 5) #define CRC_CR_REV_IN_BYTE (0x1 << 5) #define CRC_CR_REV_IN_HALF_WORD (0x2 << 5) #define CRC_CR_REV_IN_WORD (0x3 << 5) /* POLYSIZE[1:0]: Polynomial size */ #define CRC_CR_POLYSIZE_32 (0x0 << 3) #define CRC_CR_POLYSIZE_16 (0x1 << 3) #define CRC_CR_POLYSIZE_8 (0x2 << 3) #define CRC_CR_POLYSIZE_7 (0x3 << 3) /* --- CRC_INIT values ----------------------------------------------------- */ /* Bits 31:0 CRC_INIT: Programmable initial CRC value */ /* --- CRC_POL values ------------------------------------------------------ */ /* Bits 31:0 POL[31:0]: Programmable polynomial */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/dac.h ================================================ /** @defgroup dac_defines DAC Defines * * @brief Defined Constants and Types for the STM32F3xx DAC * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 5 December 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/dma.h ================================================ /** @defgroup dma_defines DMA Defines * * @ingroup STM32F3xx_defines * * @brief Defined Constants and Types for the STM32F3xx DMA Controller * * @version 1.0.0 * * @date 30 November 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/doc-stm32f3.h ================================================ /** @mainpage libopencm3 STM32F3 * * @version 1.0.0 * * @date 11 July 2013 * * API documentation for ST Microelectronics STM32F3 Cortex M3 series. * * LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F3xx STM32F3xx * Libraries for ST Microelectronics STM32F3xx series. * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F3xx_defines STM32F3xx Defines * * @brief Defined Constants and Types for the STM32F3xx series * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/exti.h ================================================ /** @defgroup exti_defines EXTI Defines * * @brief Defined Constants and Types for the STM32F3xx External Interrupts * * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include /* --- EXTI registers ------------------------------------------------------ */ #define EXTI_IMR2 MMIO32(EXTI_BASE + 0x18) #define EXTI_EMR2 MMIO32(EXTI_BASE + 0x1C) #define EXTI_RTSR2 MMIO32(EXTI_BASE + 0x20) #define EXTI_FTSR2 MMIO32(EXTI_BASE + 0x24) #define EXTI_SWIER2 MMIO32(EXTI_BASE + 0x28) #define EXTI_PR2 MMIO32(EXTI_BASE + 0x2C) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/flash.h ================================================ /** @defgroup flash_defines FLASH Defines * * @brief Defined Constants and Types for the STM32F3xx Flash * controller * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include /* --- FLASH registers ----------------------------------------------------- */ #define FLASH_AR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x14) #define FLASH_OBR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x1C) #define FLASH_WRPR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x20) /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_PRFTBS (1 << 5) #define FLASH_ACR_PRFTBE (1 << 4) #define FLASH_ACR_HLFCYA (1 << 3) /* --- FLASH_SR values ----------------------------------------------------- */ #define FLASH_SR_BSY (1 << 0) #define FLASH_SR_ERLYBSY (1 << 1) #define FLASH_SR_PGPERR (1 << 2) #define FLASH_SR_WRPRTERR (1 << 4) #define FLASH_SR_EOP (1 << 5) /* --- FLASH_CR values ----------------------------------------------------- */ #define FLASH_CR_OBL_LAUNCH (1 << 13) #define FLASH_CR_EOPIE (1 << 12) #define FLASH_CR_ERRIE (1 << 10) #define FLASH_CR_OPTWRE (1 << 9) #define FLASH_CR_LOCK (1 << 7) #define FLASH_CR_STRT (1 << 6) #define FLASH_CR_OPTER (1 << 5) #define FLASH_CR_OPTPG (1 << 4) #define FLASH_CR_MER (1 << 2) #define FLASH_CR_PER (1 << 1) #define FLASH_CR_PG (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines * * @brief Defined Constants and Types for the STM32F3xx General Purpose * I/O * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 1 July 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines * * @brief Defined Constants and Types for the STM32F3xx I2C * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 12 October 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include #include /**@{*/ /* --- Convenience macros -------------------------------------------------- */ /* I2C register base addresses (for convenience) */ /*****************************************************************************/ /** @defgroup i2c_reg_base I2C register base address * @ingroup i2c_defines * @{*/ #define I2C1 I2C1_BASE #define I2C2 I2C2_BASE /**@}*/ /* --- I2C registers ------------------------------------------------------- */ /* Control register 1 (I2Cx_CR1) */ #define I2C_CR1(i2c_base) MMIO32(i2c_base + 0x00) #define I2C1_CR1 I2C_CR1(I2C1) #define I2C2_CR1 I2C_CR1(I2C2) /* Control register 2 (I2Cx_CR2) */ #define I2C_CR2(i2c_base) MMIO32(i2c_base + 0x04) #define I2C1_CR2 I2C_CR2(I2C1) #define I2C2_CR2 I2C_CR2(I2C2) /* Own address register 1 (I2Cx_OAR1) */ #define I2C_OAR1(i2c_base) MMIO32(i2c_base + 0x08) #define I2C1_OAR1 I2C_OAR1(I2C1) #define I2C2_OAR1 I2C_OAR1(I2C2) /* Own address register 2 (I2Cx_OAR2) */ #define I2C_OAR2(i2c_base) MMIO32(i2c_base + 0x0c) #define I2C1_OAR2 I2C_OAR2(I2C1) #define I2C2_OAR2 I2C_OAR2(I2C2) /* Timing register (I2Cx_TIMINGR) */ #define I2C_TIMINGR(i2c_base) MMIO32(i2c_base + 0x10) #define I2C1_TIMINGR I2C_TIMINGR(I2C1) #define I2C2_TIMINGR I2C_TIMINGR(I2C2) /* Timeout register (I2Cx_TIMEOUTR) */ #define I2C_TIMEOUTR(i2c_base) MMIO32(i2c_base + 0x14) #define I2C1_TIMEOUTR I2C_TIMEOUTR(I2C1) #define I2C2_TIMEOUTR I2C_TIMEOUTR(I2C2) /* Interrupt and Status register (I2Cx_ISR) */ #define I2C_ISR(i2c_base) MMIO32(i2c_base + 0x18) #define I2C1_ISR I2C_ISR(I2C1) #define I2C2_ISR I2C_ISR(I2C2) /* Interrupt clear register (I2Cx_ICR) */ #define I2C_ICR(i2c_base) MMIO32(i2c_base + 0x1C) #define I2C1_ICR I2C_ICR(I2C1) #define I2C2_ICR I2C_ICR(I2C2) /* PEC register (I2Cx_PECR) */ #define I2C_PECR(i2c_base) MMIO32(i2c_base + 0x20) #define I2C1_PECR I2C_PECR(I2C1) #define I2C2_PECR I2C_PECR(I2C2) /* Receive data register (I2Cx_RXDR) */ #define I2C_RXDR(i2c_base) MMIO32(i2c_base + 0x24) #define I2C1_RXDR I2C_RXDR(I2C1) #define I2C2_RXDR I2C_RXDR(I2C2) /* Transmit data register (I2Cx_TXDR) */ #define I2C_TXDR(i2c_base) MMIO32(i2c_base + 0x28) #define I2C1_TXDR I2C_TXDR(I2C1) #define I2C2_TXDR I2C_TXDR(I2C2) /* --- I2Cx_CR1 values ----------------------------------------------------- */ /* PECEN: PEC enable */ #define I2C_CR1_PECEN (1 << 23) /* ALERTEN: SMBus alert enable */ #define I2C_CR1_ALERTEN (1 << 22) /* SMBDEN: SMBus Device Default address enable */ #define I2C_CR1_SMBDEN (1 << 21) /* SMBHEN: SMBus Host address enable */ #define I2C_CR1_SMBHEN (1 << 20) /* GCEN: General call enable */ #define I2C_CR1_GCEN (1 << 19) /* WUPEN: Wakeup from STOP enable */ #define I2C_CR1_WUPEN (1 << 18) /* NOSTRETCH: Clock stretching disable */ #define I2C_CR1_NOSTRETCH (1 << 17) /* SBC: Slave byte control */ #define I2C_CR1_SBC (1 << 16) /* RXDMAEN: DMA reception requests enable */ #define I2C_CR1_RXDMAEN (1 << 15) /* TXDMAEN: DMA transmission requests enable */ #define I2C_CR1_TXDMAEN (1 << 14) /* ANFOFF: Analog noise filter OFF */ #define I2C_CR1_ANFOFF (1 << 12) /* DNF[3:0]: Digital noise filter */ #define I2C_CR1_DNF_DISABLED (0x0 << 8) #define I2C_CR1_DNF_UP_1_TI2CCLK (0x1 << 8) #define I2C_CR1_DNF_UP_2_TI2CCLK (0x2 << 8) #define I2C_CR1_DNF_UP_3_TI2CCLK (0x3 << 8) #define I2C_CR1_DNF_UP_4_TI2CCLK (0x4 << 8) #define I2C_CR1_DNF_UP_5_TI2CCLK (0x5 << 8) #define I2C_CR1_DNF_UP_6_TI2CCLK (0x6 << 8) #define I2C_CR1_DNF_UP_7_TI2CCLK (0x7 << 8) #define I2C_CR1_DNF_UP_8_TI2CCLK (0x8 << 8) #define I2C_CR1_DNF_UP_9_TI2CCLK (0x9 << 8) #define I2C_CR1_DNF_UP_10_TI2CCLK (0xA << 8) #define I2C_CR1_DNF_UP_11_TI2CCLK (0xB << 8) #define I2C_CR1_DNF_UP_12_TI2CCLK (0xC << 8) #define I2C_CR1_DNF_UP_13_TI2CCLK (0xD << 8) #define I2C_CR1_DNF_UP_14_TI2CCLK (0xE << 8) #define I2C_CR1_DNF_UP_15_TI2CCLK (0xF << 8) #define I2C_CR1_DNF_MASK (0xF << 8) /* ERRIE: Error interrupts enable */ #define I2C_CR1_ERRIE (1 << 7) /* TCIE: Transfer Complete interrupt enable */ #define I2C_CR1_TCIE (1 << 6) /* STOPIE: STOP detection Interrupt enable */ #define I2C_CR1_STOPIE (1 << 5) /* NACKIE: Not acknowledge received Interrupt enable */ #define I2C_CR1_NACKIE (1 << 4) /* ADDRIE: Address match Interrupt enable (slave only) */ #define I2C_CR1_DDRIE (1 << 3) /* RXIE: RX Interrupt enable */ #define I2C_CR1_RXIE (1 << 2) /* TXIE: TX Interrupt enable */ #define I2C_CR1_TXIE (1 << 1) /* PE: Peripheral enable */ #define I2C_CR1_PE (1 << 0) /* --- I2Cx_CR2 values ----------------------------------------------------- */ /* PECBYTE: Packet error checking byte */ #define I2C_CR2_PECBYTE (1 << 26) /* AUTOEND: Automatic end mode (master mode) */ #define I2C_CR2_AUTOEND (1 << 25) /* RELOAD: NBYTES reload mode */ #define I2C_CR2_RELOAD (1 << 24) /* NBYTES[7:0]: Number of bytes (23,16) */ #define I2C_CR2_NBYTES_SHIFT 16 #define I2C_CR2_NBYTES_MASK (0xFF << I2C_CR2_NBYTES_SHIFT) /* NACK: NACK generation (slave mode) */ #define I2C_CR2_NACK (1 << 15) /* STOP: Stop generation (master mode) */ #define I2C_CR2_STOP (1 << 14) /* START: Start generation */ #define I2C_CR2_START (1 << 13) /* HEAD10R: 10-bit address header only read direction (master receiver mode) */ #define I2C_CR2_HEAD10R (1 << 12) /* ADD10: 10-bit addressing mode (master mode) */ #define I2C_CR2_ADD10 (1 << 11) /* RD_WRN: Transfer direction (master mode) */ #define I2C_CR2_RD_WRN (1 << 10) #define I2C_CR2_SADD_7BIT_SHIFT 1 #define I2C_CR2_SADD_10BIT_SHIFT 0 #define I2C_CR2_SADD_7BIT_MASK (0x7F << I2C_CR2_SADD_7BIT_SHIFT) #define I2C_CR2_SADD_10BIT_MASK 0x3FF /* --- I2Cx_OAR1 values ---------------------------------------------------- */ /* OA1EN: Own Address 1 enable */ #define I2C_OAR1_OA1EN_DISABLE (0x0 << 15) #define I2C_OAR1_OA1EN_ENABLE (0x1 << 15) /* OA1MODE Own Address 1 10-bit mode */ #define I2C_OAR1_OA1MODE (1 << 10) #define I2C_OAR1_OA1MODE_7BIT 0 #define I2C_OAR1_OA1MODE_10BIT 1 /* OA1[9:8]: Interface address */ /* OA1[7:1]: Interface address */ /* OA1[0]: Interface address */ #define I2C_OAR1_OA1 (1 << 10) #define I2C_OAR1_OA1_7BIT 0 #define I2C_OAR1_OA1_10BIT 1 /* --- I2Cx_OAR2 values ---------------------------------------------------- */ /* OA2EN: Own Address 2 enable */ #define I2C_OAR2_OA2EN (1 << 15) /* OA2MSK[2:0]: Own Address 2 masks */ #define I2C_OAR2_OA2MSK_NO_MASK (0x0 << 8) #define I2C_OAR2_OA2MSK_OA2_7_OA2_2 (0x1 << 8) #define I2C_OAR2_OA2MSK_OA2_7_OA2_3 (0x2 << 8) #define I2C_OAR2_OA2MSK_OA2_7_OA2_4 (0x3 << 8) #define I2C_OAR2_OA2MSK_OA2_7_OA2_5 (0x4 << 8) #define I2C_OAR2_OA2MSK_OA2_7_OA2_6 (0x5 << 8) #define I2C_OAR2_OA2MSK_OA2_7 (0x6 << 8) #define I2C_OAR2_OA2MSK_NO_CMP (0x7 << 8) /* OA2[7:1]: Interface address */ /* --- I2Cx_TIMINGR values ------------------------------------------------- */ /* PRESC[3:0]: Timing prescaler (31,28) */ #define I2C_TIMINGR_PRESC_SHIFT 28 #define I2C_TIMINGR_PRESC_MASK (0xF << 28) /* SCLDEL[3:0]: Data setup time (23,20) */ #define I2C_TIMINGR_SCLDEL_SHIFT 20 #define I2C_TIMINGR_SCLDEL_MASK (0xF << I2C_TIMINGR_SCLDEL_SHIFT) /* SDADEL[3:0]: Data hold time (19,16) */ #define I2C_TIMINGR_SDADEL_SHIFT 16 #define I2C_TIMINGR_SDADEL_MASK (0xF << I2C_TIMINGR_SDADEL_SHIFT) /* SCLH[7:0]: SCL high period (master mode) (15,8) */ #define I2C_TIMINGR_SCLH_SHIFT 8 #define I2C_TIMINGR_SCLH_MASK (0xFF << I2C_TIMINGR_SCLH_SHIFT) /* SCLL[7:0]: SCL low period (master mode) (7,0) */ #define I2C_TIMINGR_SCLL_SHIFT 0 #define I2C_TIMINGR_SCLL_MASK (0xFF << I2C_TIMINGR_SCLL_SHIFT) /* --- I2Cx_TIEMOUTR values ------------------------------------------------ */ /* TEXTEN: Extended clock timeout enable */ #define I2C_TIEMOUTR_TEXTEN (1 << 31) /* XXX: Not clear yet. */ /* TIMEOUTB[11:0]: Bus timeout B */ /* TIMOUTEN: Clock timeout enable */ #define I2C_TIEMOUTR_TIMOUTEN (1 << 15) /* TIDLE: Idle clock timeout detection */ #define I2C_TIEMOUTR_TIDLE_SCL_LOW (0x0 << 12) #define I2C_TIEMOUTR_TIDLE_SCL_SDA_HIGH (0x1 << 12) /* XXX: Not clear yet. */ /* TIMEOUTA[11:0]: Bus Timeout A */ /* --- I2Cx_ISR values ----------------------------------------------------- */ /* Bits 31:24 Reserved, must be kept at reset value */ /* XXX: Not clear yet. */ /* ADDCODE[6:0]: Address match code (Slave mode) */ /* DIR: Transfer direction (Slave mode) */ #define I2C_ISR_DIR_READ (0x1 << 16) #define I2C_ISR_DIR_WRITE (0x0 << 16) /* BUSY: Bus busy */ #define I2C_ISR_BUSY (1 << 15) /* ALERT: SMBus alert */ #define I2C_ISR_ALERT (1 << 13) /* TIMEOUT: Timeout or tLOW detection flag */ #define I2C_ISR_TIMEOUT (1 << 12) /* PECERR: PEC Error in reception */ #define I2C_ISR_PECERR (1 << 11) /* OVR: Overrun/Underrun (slave mode) */ #define I2C_ISR_OVR (1 << 10) /* ARLO: Arbitration lost */ #define I2C_ISR_ARLO (1 << 9) /* BERR: Bus error */ #define I2C_ISR_BERR (1 << 8) /* TCR: Transfer Complete Reload */ #define I2C_ISR_TCR (1 << 7) /* TC: Transfer Complete (master mode) */ #define I2C_ISR_TC (1 << 6) /* STOPF: Stop detection flag */ #define I2C_ISR_STOPF (1 << 5) /* NACKF: Not Acknowledge received flag */ #define I2C_ISR_NACKF (1 << 4) /* ADDR: Address matched (slave mode) */ #define I2C_ISR_ADDR (1 << 3) /* RXNE: Receive data register not empty (receivers) */ #define I2C_ISR_RXNE (1 << 2) /* TXIS: Transmit interrupt status (transmitters) */ #define I2C_ISR_TXIS (1 << 1) /* TXE: Transmit data register empty (transmitters) */ #define I2C_ISR_TXE (1 << 0) /* --- I2Cx_ICR values ----------------------------------------------------- */ /* ALERTCF: Alert flag clear */ #define I2C_ICR_ALERTCF (1 << 13) /* TIMOUTCF: Timeout detection flag clear */ #define I2C_ICR_TIMOUTCF (1 << 12) /* PECCF: PEC Error flag clear */ #define I2C_ICR_PECCF (1 << 11) /* OVRCF: Overrun/Underrun flag clear */ #define I2C_ICR_OVRCF (1 << 10) /* ARLOCF: Arbitration Lost flag clear */ #define I2C_ICR_ARLOCF (1 << 9) /* BERRCF: Bus error flag clear */ #define I2C_ICR_BERRCF (1 << 8) /* STOPCF: Stop detection flag clear */ #define I2C_ICR_STOPCF (1 << 5) /* NACKCF: Not Acknowledge flag clear */ #define I2C_ICR_NACKCF (1 << 4) /* ADDRCF: Address Matched flag clear */ #define I2C_ICR_ADDRCF (1 << 3) /* --- I2Cx_PECR values ---------------------------------------------------- */ /* PEC[7:0] Packet error checking register */ /* --- I2C function prototypes---------------------------------------------- */ BEGIN_DECLS void i2c_reset(uint32_t i2c); void i2c_peripheral_enable(uint32_t i2c); void i2c_peripheral_disable(uint32_t i2c); void i2c_send_start(uint32_t i2c); void i2c_send_stop(uint32_t i2c); void i2c_clear_stop(uint32_t i2c); void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave); void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave); void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq); void i2c_send_data(uint32_t i2c, uint8_t data); uint8_t i2c_get_data(uint32_t i2c); void i2c_enable_analog_filter(uint32_t i2c); void i2c_disable_analog_filter(uint32_t i2c); void i2c_set_digital_filter(uint32_t i2c, uint8_t dnf_setting); void i2c_set_prescaler(uint32_t i2c, uint8_t presc); void i2c_set_data_setup_time(uint32_t i2c, uint8_t s_time); void i2c_set_data_hold_time(uint32_t i2c, uint8_t h_time); void i2c_set_scl_high_period(uint32_t i2c, uint8_t period); void i2c_set_scl_low_period(uint32_t i2c, uint8_t period); void i2c_enable_stretching(uint32_t i2c); void i2c_disable_stretching(uint32_t i2c); void i2c_100khz_i2cclk8mhz(uint32_t i2c); void i2c_set_7bit_addr_mode(uint32_t i2c); void i2c_set_10bit_addr_mode(uint32_t i2c); void i2c_set_7bit_address(uint32_t i2c, uint8_t addr); void i2c_set_10bit_address(uint32_t i2c, uint16_t addr); void i2c_set_write_transfer_dir(uint32_t i2c); void i2c_set_read_transfer_dir(uint32_t i2c); void i2c_set_bytes_to_transfer(uint32_t i2c, uint32_t n_bytes); uint8_t i2c_is_start(uint32_t i2c); void i2c_enable_autoend(uint32_t i2c); void i2c_disable_autoend(uint32_t i2c); uint8_t i2c_nack(uint32_t i2c); uint8_t i2c_busy(uint32_t i2c); uint8_t i2c_transmit_int_status(uint32_t i2c); uint8_t i2c_transfer_complete(uint32_t i2c); uint8_t i2c_received_data(uint32_t i2c); void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt); void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt); void i2c_enable_rxdma(uint32_t i2c); void i2c_disable_rxdma(uint32_t i2c); void i2c_enable_txdma(uint32_t i2c); void i2c_disable_txdma(uint32_t i2c); void write_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size, uint8_t *data); void read_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size, uint8_t *data); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_F3_NVIC_H partname_humanreadable: STM32 F3 series partname_doxygen: STM32F3 irqs: - nvic_wwdg - pvd - tamp_stamp - rtc_wkup - flash - rcc - exti0 - exti1 - exti2_tsc - exti3 - exti4 - dma1_ch1 - dma1_ch2 - dma1_ch3 - dma1_ch4 - dma1_ch5 - dma1_ch6 - dma1_ch7 - adc1_2 - usb_hp_can1_tx - usb_lp_can1_rx0 - can1_rx1 - can1_sce - exti9_5 - tim1_brk_tim15 - tim1_up_tim16 - tim1_trg_com_tim17 - tim1_cc - tim2 - tim3 - tim4 - i2c1_ev_exti23 - i2c1_er - i2c2_ev_exti24 - i2c2_er - spi1 - spi2 - usart1_exti25 - usart2_exti26 - usart3_exti28 - exti15_10 - rtc_alarm - usb_wkup_a - tim8_brk - tim8_up - tim8_trg_com - tim8_cc - adc3 - reserved_1 - reserved_2 - reserved_3 - spi3 - uart4_exti34 - uart5_exti35 - tim6_dac - tim7 - dma2_ch1 - dma2_ch2 - dma2_ch3 - dma2_ch4 - dma2_ch5 - eth - reserved_4 - reserved_5 - comp123 - comp456 - comp7 - reserved_6 - reserved_7 - reserved_8 - reserved_9 - reserved_10 - reserved_11 - reserved_12 - usb_hp - usb_lp - usb_wkup - reserved_13 - reserved_14 - reserved_15 - reserved_16 ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines * * @brief Defined Constants and Types for the STM32F3xx Independent Watchdog * Timer * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include /* --- IWDG registers ------------------------------------------------------ */ /* Window register (IWDG_WINR) */ #define IWDG_WINR MMIO32(IWDG_BASE + 0x10) /* --- IWDG_SR values ------------------------------------------------------ */ /* WVU: Watchdog counter window value update */ #define IWGD_SR_WVU (1 << 2) /* --- IWDG_WIN values ----------------------------------------------------- */ /* Bits 11:0 WIN[11:0]: Watchdog counter window value */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Modified by 2013 Fernando Cortes (stm32f3) * Modified by 2013 Guillermo Rivera (stm32f3) * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32F3 specific peripheral definitions ----------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE 0x40000000 #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_AHB1 (PERIPH_BASE + 0x20000) #define PERIPH_BASE_AHB2 0x48000000 #define PERIPH_BASE_AHB3 0x50000000 /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB1 + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB1 + 0x0400) #define TIM4_BASE (PERIPH_BASE_APB1 + 0x0800) /* PERIPH_BASE_APB1 + 0x0C00 (0x4000 0C00 - 0x4000 0FFF): Reserved */ #define TIM6_BASE (PERIPH_BASE_APB1 + 0x1000) #define TIM7_BASE (PERIPH_BASE_APB1 + 0x1400) /* PERIPH_BASE_APB1 + 0x1800 (0x4000 1800 - 0x4000 27FF): Reserved */ #define RTC_BASE (PERIPH_BASE_APB1 + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB1 + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB1 + 0x3000) #define I2S2_EXT_BASE (PERIPH_BASE_APB1 + 0x3400) #define SPI2_I2S_BASE (PERIPH_BASE_APB1 + 0x3800) #define SPI3_I2S_BASE (PERIPH_BASE_APB1 + 0x3c00) #define I2S3_EXT_BASE (PERIPH_BASE_APB1 + 0x4000) #define USART2_BASE (PERIPH_BASE_APB1 + 0x4400) #define USART3_BASE (PERIPH_BASE_APB1 + 0x4800) #define UART4_BASE (PERIPH_BASE_APB1 + 0x4c00) #define UART5_BASE (PERIPH_BASE_APB1 + 0x5000) #define I2C1_BASE (PERIPH_BASE_APB1 + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB1 + 0x5800) #define USB_DEV_FS_BASE (PERIPH_BASE_APB1 + 0x5C00) #define USB_SRAM_BASE (PERIPH_BASE_APB1 + 0x6000) #define BX_CAN_BASE (PERIPH_BASE_APB1 + 0x6400) /* PERIPH_BASE_APB1 + 0x6800 (0x4000 6800 - 0x4000 6BFF): Reserved */ /* PERIPH_BASE_APB1 + 0x6C00 (0x4000 6C00 - 0x4000 6FFF): Reserved */ #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) #define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) /* PERIPH_BASE_APB1 + 0x7800 (0x4000 7800 - 0x4000 7FFF): Reserved */ /* APB2 */ #define TIM17_BASE (PERIPH_BASE_APB2 + 0x4800) #define TIM16_BASE (PERIPH_BASE_APB2 + 0x4400) #define TIM15_BASE (PERIPH_BASE_APB2 + 0x4000) /* PERIPH_BASE_APB2 + 0x3C00 (0x4001 3C00 - 0x4001 3FFF): Reserved */ #define USART1_BASE (PERIPH_BASE_APB2 + 0x1000) #define TIM8_BASE (PERIPH_BASE_APB2 + 0x3400) #define SPI1_BASE (PERIPH_BASE_APB2 + 0x3000) #define TIM1_BASE (PERIPH_BASE_APB2 + 0x2C00) /* PERIPH_BASE_APB2 + 0x0800 (0x4001 0800 - 0x4001 2BFF): Reserved */ #define EXTI_BASE (PERIPH_BASE_APB2 + 0x0400) #define SYSCFG_BASE (PERIPH_BASE_APB2 + 0x0000) #define COMP_BASE (PERIPH_BASE_APB2 + 0x0000) #define OPAMP_BASE (PERIPH_BASE_APB2 + 0x0000) /* AHB2 */ #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB2 + 0x0000) #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB2 + 0x0400) #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB2 + 0x0800) #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB2 + 0x0C00) #define GPIO_PORT_E_BASE (PERIPH_BASE_AHB2 + 0x1000) #define GPIO_PORT_F_BASE (PERIPH_BASE_AHB2 + 0x1400) /* AHB1 */ #define TSC_BASE (PERIPH_BASE_AHB1 + 0x4000) /* PERIPH_BASE_AHB1 + 0x3400 (0x4002 3400 - 0x4002 37FF): Reserved */ #define CRC_BASE (PERIPH_BASE_AHB1 + 0x3000) /* PERIPH_BASE_AHB1 + 0x2400 (0x4002 2400 - 0x4002 2FFF): Reserved */ #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB1 + 0x2000) /* PERIPH_BASE_AHB1 + 0x1400 (0x4002 1400 - 0x4002 1FFF): Reserved */ #define RCC_BASE (PERIPH_BASE_AHB1 + 0x1000) /* PERIPH_BASE_AHB1 + 0x0800 (0x4002 0800 - 0x4002 0FFF): Reserved */ #define DMA1_BASE (PERIPH_BASE_AHB1 + 0x6000) #define DMA2_BASE (PERIPH_BASE_AHB1 + 0x6400) /* AHB3 */ #define ADC3_BASE (PERIPH_BASE_AHB3 + 0x0400) #define ADC4_BASE (PERIPH_BASE_AHB3 + 0x0400) #define ADC1_BASE (PERIPH_BASE_AHB3 + 0x0000) #define ADC2_BASE (PERIPH_BASE_AHB3 + 0x0000) /* PPIB */ #define DBGMCU_BASE (PPBI_BASE + 0x00042000) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines * * @brief Defined Constants and Types for the STM32F3xx Power control * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * Modified by 2013 Fernando Cortes (stm32f3) * Modified by 2013 Guillermo Rivera (stm32f3) * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_F3_H #define LIBOPENCM3_PWR_F3_H #include /* --- PWR_CR values ------------------------------------------------------- */ /* Bits [31:10]: Reserved */ #define PWR_CR_DBP (1 << 8) /* Bits [7:5]: Reserved PLS: PVD level selection. (Power Voltage Detector) */ #define PWR_CR_PVDE (1 << 4) #define PWR_CR_CSBF (1 << 3) #define PWR_CR_CWUF (1 << 2) #define PWR_CR_PDDS (1 << 1) #define PWR_CR_LPDS (1 << 0) /* --- PWR_CSR values ------------------------------------------------------ */ /* Bits [31:10]: Reserved */ #define PWR_CSR_EWUP2 (1 << 9) #define PWR_CSR_EWUP1 (1 << 8) /* Bits [7:3]: Reserved */ #define PWR_CSR_PVDO (1 << 2) #define PWR_CSR_SBF (1 << 1) #define PWR_CSR_WUF (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/rcc.h ================================================ /** @defgroup rcc_defines RCC Defines * * @brief Defined Constants and Types for the STM32F3xx Reset and Clock * control * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2011 Fergus Noble * Copyright (C) 2011 Stephen Caudle * Modified by 2013 Fernando Cortes (stm32f3) * Modified by 2013 Guillermo Rivera (stm32f3) * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include /* --- RCC registers ------------------------------------------------------- */ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_CFGR MMIO32(RCC_BASE + 0x04) #define RCC_CIR MMIO32(RCC_BASE + 0x08) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x0C) #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x10) #define RCC_AHBENR MMIO32(RCC_BASE + 0x14) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x18) #define RCC_APB1ENR MMIO32(RCC_BASE + 0x1C) #define RCC_BDCR MMIO32(RCC_BASE + 0x20) #define RCC_CSR MMIO32(RCC_BASE + 0x24) #define RCC_AHBRSTR MMIO32(RCC_BASE + 0x28) #define RCC_CFGR2 MMIO32(RCC_BASE + 0x2C) #define RCC_CFGR3 MMIO32(RCC_BASE + 0x30) /* --- RCC_CR values ------------------------------------------------------- */ #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_CSSON (1 << 19) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) /* HSICAL: [15:8] */ /* HSITRIM: [7:3] */ #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) /* --- RCC_CFGR values ----------------------------------------------------- */ #define RCC_CFGR_MCOF (1 << 28) #define RCC_CFGR_I2SSRC (1 << 23) #define RCC_CFGR_USBPRES (1 << 22) #define RCC_CFGR_PLLXTPRE (1 << 17) #define RCC_CFGR_PLLSRC (1 << 16) /* MCO: Microcontroller clock output */ #define RCC_CFGR_MCO_SHIFT 24 #define RCC_CFGR_MCO_DISABLED 0x0 /*Reserve RCC_CFGR_MCO 0x1*/ #define RCC_CFGR_MCO_LSI 0x2 #define RCC_CFGR_MCO_LSE 0x3 #define RCC_CFGR_MCO_SYSCLK 0x4 #define RCC_CFGR_MCO_HSI 0x5 #define RCC_CFGR_MCO_HSE 0x6 #define RCC_CFGR_MCO_PLL 0x7 /* PLLSRC: PLL source values */ #define RCC_CFGR_PLLSRC_HSI_DIV2 0 #define RCC_CFGR_PLLSRC_HSE_PREDIV 1 /* PLLMUL: PLL multiplication factor */ #define RCC_CFGR_PLLMUL_SHIFT 18 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X2 0x0 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X3 0x1 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X4 0x2 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X5 0x3 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X6 0x4 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X7 0x5 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X8 0x6 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X9 0x7 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X10 0x8 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X11 0x9 #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X12 0xA #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X13 0xB #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X14 0xC #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X15 0xD #define RCC_CFGR_PLLMUL_PLL_IN_CLK_X16 0xE #define RCC_CFGR_PLLMUL_MASK (0xF << RCC_CFGR_PLLMUL_SHIFT) /* PPRE2: APB high-speed prescaler (APB2) */ #define RCC_CFGR_PPRE2_SHIFT 11 /* 0XX: HCLK not divided */ #define RCC_CFGR_PPRE2_DIV_NONE 0x0 #define RCC_CFGR_PPRE2_DIV_2 0x4 #define RCC_CFGR_PPRE2_DIV_4 0x5 #define RCC_CFGR_PPRE2_DIV_8 0x6 #define RCC_CFGR_PPRE2_DIV_16 0x7 /* PPRE1:APB Low-speed prescaler (APB1) */ #define RCC_CFGR_PPRE1_SHIFT 8 /* 0XX: HCLK not divided */ #define RCC_CFGR_PPRE1_DIV_NONE 0x0 #define RCC_CFGR_PPRE1_DIV_2 0x4 #define RCC_CFGR_PPRE1_DIV_4 0x5 #define RCC_CFGR_PPRE1_DIV_8 0x6 #define RCC_CFGR_PPRE1_DIV_16 0x7 /* HPRE: HLCK prescaler */ #define RCC_CFGR_HPRE_SHIFT 4 /* 0XXX: SYSCLK not divided */ #define RCC_CFGR_HPRE_DIV_NONE 0x0 #define RCC_CFGR_HPRE_DIV_2 0x8 #define RCC_CFGR_HPRE_DIV_4 0x9 #define RCC_CFGR_HPRE_DIV_8 0xA #define RCC_CFGR_HPRE_DIV_16 0xB #define RCC_CFGR_HPRE_DIV_64 0xC #define RCC_CFGR_HPRE_DIV_128 0xD #define RCC_CFGR_HPRE_DIV_256 0xE #define RCC_CFGR_HPRE_DIV_512 0xF /* SWS: System clock switch status */ #define RCC_CFGR_SWS_SHIFT 2 #define RCC_CFGR_SWS_HSI 0x0 #define RCC_CFGR_SWS_HSE 0x1 #define RCC_CFGR_SWS_PLL 0x2 /* SW: System clock switch */ #define RCC_CFGR_SW_SHIFT 0 #define RCC_CFGR_SW_HSI 0x0 #define RCC_CFGR_SW_HSE 0x1 #define RCC_CFGR_SW_PLL 0x2 /* --- RCC_CIR values ------------------------------------------------------ */ /* Clock security system interrupt clear bit */ #define RCC_CIR_CSSC (1 << 23) /* OSC ready interrupt clear bits */ #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) /* OSC ready interrupt enable bits */ #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) /* Clock security system interrupt flag bit */ #define RCC_CIR_CSSF (1 << 7) /* OSC ready interrupt flag bits */ #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ #define RCC_APB2RSTR_TIM17RST (1 << 18) #define RCC_APB2RSTR_TIM16RST (1 << 17) #define RCC_APB2RSTR_TIM15RST (1 << 16) #define RCC_APB2RSTR_USART1RST (1 << 14) #define RCC_APB2RSTR_TIM8RST (1 << 13) #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_TIM1RST (1 << 11) #define RCC_APB2RSTR_SYSCFGRST (1 << 0) /* --- RCC_APB1RSTR values ------------------------------------------------- */ #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_CANRST (1 << 25) #define RCC_APB1RSTR_USBRST (1 << 23) #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_UART5RST (1 << 20) #define RCC_APB1RSTR_UART4RST (1 << 19) #define RCC_APB1RSTR_USART3RST (1 << 18) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI3RST (1 << 15) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_TIM7RST (1 << 5) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM4RST (1 << 2) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /* --- RCC_AHBENR values --------------------------------------------------- */ #define RCC_AHBENR_ADC34EN (1 << 29) #define RCC_AHBENR_ADC12EN (1 << 28) #define RCC_AHBENR_TSCEN (1 << 24) #define RCC_AHBENR_IOPFEN (1 << 22) #define RCC_AHBENR_IOPEEN (1 << 21) #define RCC_AHBENR_IOPDEN (1 << 20) #define RCC_AHBENR_IOPCEN (1 << 19) #define RCC_AHBENR_IOPBEN (1 << 18) #define RCC_AHBENR_IOPAEN (1 << 17) #define RCC_AHBENR_CRCEN (1 << 1) /* --- RCC_APB2ENR values -------------------------------------------------- */ #define RCC_APB2ENR_TIM17EN (1 << 18) #define RCC_APB2ENR_TIM16EN (1 << 17) #define RCC_APB2ENR_TIM15EN (1 << 16) #define RCC_APB2ENR_USART1EN (1 << 14) #define RCC_APB2ENR_TIM8EN (1 << 13) #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_TIM1EN (1 << 11) #define RCC_APB2ENR_SYSCFGEN (1 << 0) /* --- RCC_APB1ENR values -------------------------------------------------- */ #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_CANEN (1 << 25) #define RCC_APB1ENR_USBEN (1 << 23) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI3EN (1 << 15) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_TIM7EN (1 << 5) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM4EN (1 << 2) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /* --- RCC_BDCR values ----------------------------------------------------- */ #define RCC_BDCR_BDRST (1 << 16) #define RCC_BDCR_RTCEN (1 << 15) /* RCC_BDCR[9:8]: RTCSEL */ /* RCC_BDCR[4:3]: LSEDRV */ #define RCC_BDCR_LSEBYP (1 << 2) #define RCC_BDCR_LSERDY (1 << 1) #define RCC_BDCR_LSEON (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_OBLRSTF (1 << 25) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) /* --- RCC_AHBRSTR values -------------------------------------------------- */ #define RCC_AHBRSTR_ADC34RST (1 << 29) #define RCC_AHBRSTR_ADC12RST (1 << 28) #define RCC_AHBRSTR_TSCRST (1 << 24) #define RCC_AHBRSTR_IOPFRST (1 << 22) #define RCC_AHBRSTR_IOPERST (1 << 21) #define RCC_AHBRSTR_IOPDRST (1 << 20) #define RCC_AHBRSTR_IOPCRST (1 << 19) #define RCC_AHBRSTR_IOPBRST (1 << 18) #define RCC_AHBRSTR_IOPARST (1 << 17) /* --- RCC_CFGR2 values ---------------------------------------------------- */ /* ADC34PRES: ADC34 prescaler */ #define RCC_CFGR2_ADC34PRES_SHIFT 9 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_1 0x10 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_2 0x11 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_4 0x12 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_6 0x13 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_8 0x14 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_10 0x15 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_12 0x16 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_16 0x17 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_32 0x18 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_64 0x19 #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_128 0x1A #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV_256 0x1B /* OTHERS */ /* #define RCC_CFGR2_ADC34PRES_PLL_CLK_DIV256 0x */ /* ADC12PRES ADC prescaler */ /* REVISAR DIRECCIONES */ #define RCC_CFGR2_ADC12PRES_SHIFT 4 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_1 0x10 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_2 0x11 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_4 0x12 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_6 0x13 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_8 0x14 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_10 0x15 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_12 0x16 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_16 0x17 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_32 0x18 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_64 0x19 #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_128 0x1A #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV_256 0x1B /* OTHERS */ /* #define RCC_CFGR2_ADC12PRES_PLL_CLK_DIV256 0x */ /* PREDIV[3:0] PREDIV division factor */ /* REVISAR DIRECCIONES */ #define RCC_CFGR2_PREDIV_SHIFT 0 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_NONE 0x0 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_2 0x1 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_3 0x2 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_4 0x3 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_5 0x4 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_6 0x5 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_7 0x6 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_8 0x7 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_9 0x8 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_10 0x9 #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_11 0xA #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_12 0xB #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_13 0xC #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_14 0xD #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_15 0xE #define RCC_CFGR2_PREDIV_HSE_IN_PLL_DIV_16 0xF /* --- RCC_CFGR3 values ---------------------------------------------------- */ #define RCC_CFGR3_TIM8SW (1 << 9) #define RCC_CFGR3_TIM1SW (1 << 8) #define RCC_CFGR3_I2C2SW (1 << 5) #define RCC_CFGR3_I2C1SW (1 << 4) /* UART5SW: UART5 clock source selection */ #define RCC_CFGR3_UART5SW_SHIFT 22 #define RCC_CFGR3_UART5SW_PCLK 0x0 #define RCC_CFGR3_UART5SW_SYSCLK 0x1 #define RCC_CFGR3_UART5SW_LSE 0x2 #define RCC_CFGR3_UART5SW_HSI 0x3 /* UART4SW: UART4 clock source selection */ #define RCC_CFGR3_UART4SW_SHIFT 20 #define RCC_CFGR3_UART4SW_PCLK 0x0 #define RCC_CFGR3_UART4SW_SYSCLK 0x1 #define RCC_CFGR3_UART4SW_LSE 0x2 #define RCC_CFGR3_UART4SW_HSI 0x3 /* UART3SW: UART3 clock source selection */ #define RCC_CFGR3_UART3SW_SHIFT 18 #define RCC_CFGR3_UART3SW_PCLK 0x0 #define RCC_CFGR3_UART3SW_SYSCLK 0x1 #define RCC_CFGR3_UART3SW_LSE 0x2 #define RCC_CFGR3_UART3SW_HSI 0x3 /* UART2SW: UART2 clock source selection */ #define RCC_CFGR3_UART2SW_SHIFT 16 #define RCC_CFGR3_UART2SW_PCLK 0x0 #define RCC_CFGR3_UART2SW_SYSCLK 0x1 #define RCC_CFGR3_UART2SW_LSE 0x2 #define RCC_CFGR3_UART2SW_HSI 0x3 /* UART1SW: UART1 clock source selection */ #define RCC_CFGR3_UART1SW_SHIFT 0 #define RCC_CFGR3_UART1SW_PCLK 0x0 #define RCC_CFGR3_UART1SW_SYSCLK 0x1 #define RCC_CFGR3_UART1SW_LSE 0x2 #define RCC_CFGR3_UART1SW_HSI 0x3 /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_ppre1_frequency; extern uint32_t rcc_ppre2_frequency; /* --- Function prototypes ------------------------------------------------- */ enum rcc_clock { CLOCK_44MHZ, CLOCK_48MHZ, CLOCK_64MHZ, CLOCK_END }; typedef struct { uint8_t pll; uint8_t pllsrc; uint32_t flash_config; uint8_t hpre; uint8_t ppre1; uint8_t ppre2; uint8_t power_save; uint32_t apb1_frequency; uint32_t apb2_frequency; } clock_scale_t; extern const clock_scale_t hsi_8mhz[CLOCK_END]; enum osc { PLL, HSE, HSI, LSE, LSI }; BEGIN_DECLS void rcc_osc_ready_int_clear(enum osc osc); void rcc_osc_ready_int_enable(enum osc osc); void rcc_osc_ready_int_disable(enum osc osc); int rcc_osc_ready_int_flag(enum osc osc); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_wait_for_osc_ready(enum osc osc); void rcc_wait_for_osc_not_ready(enum osc osc); void rcc_wait_for_sysclk_status(enum osc osc); void rcc_osc_on(enum osc osc); void rcc_osc_off(enum osc osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_osc_bypass_enable(enum osc osc); void rcc_osc_bypass_disable(enum osc osc); void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset); void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset); void rcc_set_sysclk_source(uint32_t clk); void rcc_set_pll_source(uint32_t pllsrc); void rcc_set_ppre2(uint32_t ppre2); void rcc_set_ppre1(uint32_t ppre1); void rcc_set_hpre(uint32_t hpre); void rcc_set_main_pll_hsi(uint32_t pll); uint32_t rcc_get_system_clock_source(void); void rcc_backupdomain_reset(void); void rcc_clock_setup_hsi(const clock_scale_t *clock); void rcc_set_i2c_clock_hsi(uint32_t i2c); void rcc_set_i2c_clock_sysclk(uint32_t i2c); uint32_t rcc_get_i2c_clocks(void); void rcc_usb_prescale_1_5(void); void rcc_usb_prescale_1(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/spi.h ================================================ /** @defgroup spi_defines SPI Defines * * @brief Defined Constants and Types for the STM32F3xx SPI * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 5 December 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include /* DFF: Data frame format */ /****************************************************************************/ /** @defgroup spi_dff SPI data frame format * @ingroup spi_defines * * @{*/ #define SPI_DR8(spi_base) MMIO8(spi_base + 0x0c) #define SPI1_DR8 SPI_DR8(SPI1_BASE) #define SPI2_DR8 SPI_DR8(SPI2_I2S_BASE) #define SPI3_DR8 SPI_DR8(SPI3_I2S_BASE) #define SPI_CR1_CRCL_8BIT (0 << 11) #define SPI_CR1_CRCL_16BIT (1 << 11) /**@}*/ #define SPI_CR1_CRCL (1 << 11) /* --- SPI_CR2 values ------------------------------------------------------ */ /* LDMA_TX: Last DMA transfer for transmission */ #define SPI_CR2_LDMA_TX (1 << 14) /* LDMA_RX: Last DMA transfer for reception */ #define SPI_CR2_LDMA_RX (1 << 13) /* FRXTH: FIFO reception threshold */ #define SPI_CR2_FRXTH (1 << 12) /* DS [3:0]: Data size */ /* 0x0 - 0x2 NOT USED */ #define SPI_CR2_DS_4BIT (0x3 << 8) #define SPI_CR2_DS_5BIT (0x4 << 8) #define SPI_CR2_DS_6BIT (0x5 << 8) #define SPI_CR2_DS_7BIT (0x6 << 8) #define SPI_CR2_DS_8BIT (0x7 << 8) #define SPI_CR2_DS_9BIT (0x8 << 8) #define SPI_CR2_DS_10BIT (0x9 << 8) #define SPI_CR2_DS_11BIT (0xA << 8) #define SPI_CR2_DS_12BIT (0xB << 8) #define SPI_CR2_DS_13BIT (0xC << 8) #define SPI_CR2_DS_14BIT (0xD << 8) #define SPI_CR2_DS_15BIT (0xE << 8) #define SPI_CR2_DS_16BIT (0xF << 8) #define SPI_CR2_DS_MASK (0xF << 8) /* NSSP: NSS pulse management */ #define SPI_CR2_NSSP (1 << 3) /* --- SPI_SR values ------------------------------------------------------- */ /* FTLVL[1:0]: FIFO Transmission Level */ #define SPI_SR_FTLVL_FIFO_EMPTY (0x0 << 11) #define SPI_SR_FTLVL_QUARTER_FIFO (0x1 << 11) #define SPI_SR_FTLVL_HALF_FIFO (0x2 << 11) #define SPI_SR_FTLVL_FIFO_FULL (0x3 << 11) /* FRLVL[1:0]: FIFO Reception Level */ #define SPI_SR_FRLVL_FIFO_EMPTY (0x0 << 9) #define SPI_SR_FRLVL_QUARTER_FIFO (0x1 << 9) #define SPI_SR_FRLVL_HALF_FIFO (0x2 << 9) #define SPI_SR_FRLVL_FIFO_FULL (0x3 << 9) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void spi_set_data_size(uint32_t spi, uint16_t data_s); void spi_fifo_reception_threshold_8bit(uint32_t spi); void spi_fifo_reception_threshold_16bit(uint32_t spi); void spi_i2s_mode_spi_mode(uint32_t spi); void spi_send8(uint32_t spi, uint8_t data); uint8_t spi_read8(uint32_t spi); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/syscfg.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SYSCFG_H #define LIBOPENCM3_SYSCFG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/timer.h ================================================ /** @defgroup timer_defines Timer Defines * * @brief Defined Constants and Types for the STM32F3xx Timers * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 8 March 2013 * * @author @htmlonly © @endhtmlonly 2011 Fergus Noble * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TIMER_H #define LIBOPENCM3_TIMER_H #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f3/usart.h ================================================ /** @defgroup usart_defines USART Defines * * @brief Defined Constants and Types for the STM32F3xx USART * * @ingroup STM32F3xx_defines * * @version 1.0.0 * * @date 5 December 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include /* --- USART registers ----------------------------------------------------- */ /* Control register 1 (USARTx_CR1) */ #define USART_CR1(usart_base) MMIO32(usart_base + 0x00) #define USART1_CR1 USART_CR1(USART1_BASE) #define USART2_CR1 USART_CR1(USART2_BASE) #define USART3_CR1 USART_CR1(USART3_BASE) #define UART4_CR1 USART_CR1(UART4_BASE) #define UART5_CR1 USART_CR1(UART5_BASE) /* Control register 2 (USARTx_CR2) */ #define USART_CR2(usart_base) MMIO32(usart_base + 0x04) #define USART1_CR2 USART_CR2(USART1_BASE) #define USART2_CR2 USART_CR2(USART2_BASE) #define USART3_CR2 USART_CR2(USART3_BASE) #define UART4_CR2 USART_CR2(UART4_BASE) #define UART5_CR2 USART_CR2(UART5_BASE) /* Control register 3 (USARTx_CR3) */ #define USART_CR3(usart_base) MMIO32(usart_base + 0x08) #define USART1_CR3 USART_CR3(USART1_BASE) #define USART2_CR3 USART_CR3(USART2_BASE) #define USART3_CR3 USART_CR3(USART3_BASE) #define UART4_CR3 USART_CR3(UART4_BASE) #define UART5_CR3 USART_CR3(UART5_BASE) /* Baud rate register (USARTx_BRR) */ #define USART_BRR(usart_base) MMIO32(usart_base + 0x0C) #define USART1_BRR USART_BRR(USART1_BASE) #define USART2_BRR USART_BRR(USART2_BASE) #define USART3_BRR USART_BRR(USART3_BASE) #define UART4_BRR USART_BRR(UART4_BASE) #define UART5_BRR USART_BRR(UART5_BASE) /* Guard time and prescaler register (USARTx_GTPR) */ #define USART_GTPR(usart_base) MMIO32(usart_base + 0x10) #define USART1_GTPR USART_GTPR(USART1_BASE) #define USART2_GTPR USART_GTPR(USART2_BASE) #define USART3_GTPR USART_GTPR(USART3_BASE) #define UART4_GTPR USART_GTPR(UART4_BASE) #define UART5_GTPR USART_GTPR(UART5_BASE) /* Receiver timeout register (USART_RTOR) */ #define USART_RTOR(usart_base) MMIO32(usart_base + 0x14) #define USART1_RTOR USART_RTOR(USART1_BASE) #define USART2_RTOR USART_RTOR(USART2_BASE) #define USART3_RTOR USART_RTOR(USART3_BASE) #define UART4_RTOR USART_RTOR(UART4_BASE) #define UART5_RTOR USART_RTOR(UART5_BASE) /* Request register (USART_RQR) */ #define USART_RQR(usart_base) MMIO32(usart_base + 0x18) #define USART1_RQR USART_RQR(USART1_BASE) #define USART2_RQR USART_RQR(USART2_BASE) #define USART3_RQR USART_RQR(USART3_BASE) #define UART4_RQR USART_RQR(UART4_BASE) #define UART5_RQR USART_RQR(UART5_BASE) /* Interrupt & status register (USART_ISR) */ #define USART_ISR(usart_base) MMIO32(usart_base + 0x1C) #define USART1_ISR USART_ISR(USART1_BASE) #define USART2_ISR USART_ISR(USART2_BASE) #define USART3_ISR USART_ISR(USART3_BASE) #define UART4_ISR USART_ISR(UART4_BASE) #define UART5_ISR USART_ISR(UART5_BASE) /* Interrupt flag clear register (USART_ICR) */ #define USART_ICR(usart_base) MMIO32(usart_base + 0x20) #define USART1_ICR USART_ICR(USART1_BASE) #define USART2_ICR USART_ICR(USART2_BASE) #define USART3_ICR USART_ICR(USART3_BASE) #define UART4_ICR USART_ICR(UART4_BASE) #define UART5_ICR USART_ICR(UART5_BASE) /* Receive data register (USART_RDR) */ #define USART_RDR(usart_base) MMIO32(usart_base + 0x24) #define USART1_RDR USART_RDR(USART1_BASE) #define USART2_RDR USART_RDR(USART2_BASE) #define USART3_RDR USART_RDR(USART3_BASE) #define UART4_RDR USART_RDR(UART4_BASE) #define UART5_RDR USART_RDR(UART5_BASE) /* Transmit data register (USART_TDR) */ #define USART_TDR(usart_base) MMIO32(usart_base + 0x28) #define USART1_TDR USART_TDR(USART1_BASE) #define USART2_TDR USART_TDR(USART2_BASE) #define USART3_TDR USART_TDR(USART3_BASE) #define UART4_TDR USART_TDR(UART4_BASE) #define UART5_TDR USART_TDR(UART5_BASE) /* --- USART_CR1 values ---------------------------------------------------- */ /* EOBIE: End of Block interrupt enable */ #define USART_CR1_EOBIE (1 << 27) /* RTOIE: Receiver timeout interrupt enable */ #define USART_CR1_RTOIE (1 << 26) /* DEAT[4:0]: Driver Enable assertion time */ /* DEDT[4:0]: Driver Enable deassertion time */ /* OVER8: Oversampling mode */ #define USART_CR1_OVER8 (1 << 15) /* CMIE: Character match interrupt enable */ #define USART_CR1_CMIE (1 << 14) /* MME: Mute mode enable */ #define USART_CR1_MME (1 << 13) /* M: Word length */ #define USART_CR1_M (1 << 12) /* WAKE: Receiver wakeup method */ #define USART_CR1_WAKE (1 << 11) /* PCE: Parity control enable */ #define USART_CR1_PCE (1 << 10) /* PS: Parity selection */ #define USART_CR1_PS (1 << 9) /* PEIE: PE interrupt enable */ #define USART_CR1_PEIE (1 << 8) /* TXEIE: Interrupt enable */ #define USART_CR1_TXEIE (1 << 7) /* TCIE: Transmission complete interrupt enable */ #define USART_CR1_TCIE (1 << 6) /* RXNEIE: RXNE interrupt enable */ #define USART_CR1_RXNEIE (1 << 5) /* IDLEIE: IDLE interrupt enable */ #define USART_CR1_IDLEIE (1 << 4) /* TE: Transmitter enable */ #define USART_CR1_TE (1 << 3) /* RE: Receiver enable */ #define USART_CR1_RE (1 << 2) /* UESM: USART enable in Stop mode */ #define USART_CR1_UESM (1 << 1) /* UE: USART enable */ #define USART_CR1_UE (1 << 0) /* --- USART_CR2 values ---------------------------------------------------- */ /* ADD[7:4]: Address of the USART node (31,28) */ #define USART_CR2_ADD1_MASK (0xF << 28) /* ADD[3:0]: Address of the USART node (27,24) */ #define USART_CR2_ADD2_MASK (0xF << 24) /* RTOEN: Receiver timeout enable */ #define USART_CR2_RTOEN (1 << 23) /* ABRMOD[1:0]: Auto baud rate mode */ #define USART_CR2_ABRMOD_BAUD (0x0 << 21) #define USART_CR2_ABRMOD_FALL_EDGE (0x1 << 21) #define USART_CR2_ABRMOD_FRAME_0x7F (0x2 << 21) #define USART_CR2_ABRMOD_FRAME_0x55 (0x3 << 21) /* ABREN: Auto baud rate enable */ #define USART_CR2_ABREN (1 << 20) /* MSBFIRST: Most significant bit first */ #define USART_CR2_MSBFIRST (1 << 19) /* DATAINV: Binary data inversion */ #define USART_CR2_DATAINV (1 << 18) /* TXINV: TX pin active level inversion */ #define USART_CR2_TXINV (1 << 17) /* RXINV: RX pin active level inversion */ #define USART_CR2_RXINV (1 << 16) /* SWAP: Swap TX/RX pins */ #define USART_CR2_SWAP (1 << 15) /* LINEN: LIN mode enable */ #define USART_CR2_LINEN (1 << 14) /* STOP[13:12]: STOP bits */ #define USART_CR2_STOPBITS_1 (0x00 << 12) /* 1 stop bit */ #define USART_CR2_STOPBITS_0_5 (0x01 << 12) /* 0.5 stop bits */ #define USART_CR2_STOPBITS_2 (0x02 << 12) /* 2 stop bits */ #define USART_CR2_STOPBITS_1_5 (0x03 << 12) /* 1.5 stop bits */ #define USART_CR2_STOPBITS_MASK (0x03 << 12) #define USART_CR2_STOPBITS_SHIFT 12 /* CLKEN: Clock enable */ #define USART_CR2_CLKEN (1 << 11) /* CPOL: Clock polarity */ #define USART_CR2_CPOL (1 << 10) /* CPHA: Clock phase */ #define USART_CR2_CPHA (1 << 9) /* LBCL: Last bit clock pulse */ #define USART_CR2_LBCL (1 << 8) /* LBDIE: LIN break detection interrupt enable */ #define USART_CR2_LBDIE (1 << 6) /* LBDL: LIN break detection length */ #define USART_CR2_LBDL (1 << 5) /* ADDM7:7-bit Address Detection/4-bit Address Detection */ #define USART_CR2_ADDM7 (1 << 4) /* ADD[3:0]: Addres of the usart node #define USART_CR2_ADD_MASK 0xF */ /* --- USART_CR3 values ---------------------------------------------------- */ /* WUFIE: Wakeup from Stop mode interrupt enable */ #define USART_CR3_WUFIE (1 << 22) /* WUS[1:0]: Wakeup from Stop mode interrupt flag selectio */ #define USART_CR3_WUS_ON (0x0 << 20) /* RESERVE #define USART_CR3_WUS (0x1 << 20) */ #define USART_CR3_WUS_START_BIT (0x2 << 20) #define USART_CR3_WUS_RXNE (0x3 << 20) /* SCARCNT[2:0]: Smartcard auto-retry count */ #define USART_CR3_SCARCNT_OFF (0x0 << 17) /* 0x1 to 0x7: number of automatic retransmission attempts */ /* DEP: Driver enable polarity selection */ #define USART_CR3_DEP (1 << 15) /* DEM: Driver enable mode */ #define USART_CR3_DEM (1 << 14) /* DDRE: DMA Disable on Reception Error */ #define USART_CR3_DDRE (1 << 13) /* OVRDIS: Overrun Disable */ #define USART_CR3_OVRDIS (1 << 12) /* ONEBIT: One sample bit method enable */ #define USART_CR3_ONEBIT (1 << 11) /* CTSIE: CTS interrupt enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_CTSIE (1 << 10) /* CTSE: CTS enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_CTSE (1 << 9) /* RTSE: RTS enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_RTSE (1 << 8) /* DMAT: DMA enable transmitter */ /* Note: N/A on UART5 */ #define USART_CR3_DMAT (1 << 7) /* DMAR: DMA enable receiver */ /* Note: N/A on UART5 */ #define USART_CR3_DMAR (1 << 6) /* SCEN: Smartcard mode enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_SCEN (1 << 5) /* NACK: Smartcard NACK enable */ /* Note: N/A on UART4 & UART5 */ #define USART_CR3_NACK (1 << 4) /* HDSEL: Half-duplex selection */ #define USART_CR3_HDSEL (1 << 3) /* IRLP: IrDA low-power */ #define USART_CR3_IRLP (1 << 2) /* IREN: IrDA mode enable */ #define USART_CR3_IREN (1 << 1) /* EIE: Error interrupt enable */ #define USART_CR3_EIE (1 << 0) /* --- USART_BRR values ---------------------------------------------------- */ /* DIV_Mantissa[11:0]: mantissa of USARTDIV */ #define USART_BRR_DIV_MANTISSA_MASK (0xFFF << 4) /* DIV_Fraction[3:0]: fraction of USARTDIV */ #define USART_BRR_DIV_FRACTION_MASK 0xF /* --- USART_GTPR values --------------------------------------------------- */ /* GT[7:0]: Guard time value */ /* Note: N/A on UART4 & UART5 */ #define USART_GTPR_GT_MASK (0xFF << 8) /* PSC[7:0]: Prescaler value */ /* Note: N/A on UART4/5 */ #define USART_GTPR_PSC_MASK 0xFF /* --- USART_RTOR values --------------------------------------------------- */ /* XXX: Preguntar */ /* BLEN[7:0]: Block Length */ #define USART_RTOR_BLEN1_MASK (0xFF << 24) /* RTO[23:0]: Receiver timeout value */ #define USART_RTOR_BLEN2_MASK (0xFFFF << 0) /* --- USART_RQR values --------------------------------------------------- */ /* TXFRQ: Transmit data flush request */ #define USART_RQR_TXFRQ (1 << 4) /* RXFRQ: Receive data flush request */ #define USART_RQR_RXFRQ (1 << 3) /* MMRQ: Mute mode request */ #define USART_RQR_MMRQ (1 << 2) /* SBKRQ: Send break request */ #define USART_RQR_SBKRQ (1 << 1) /* ABRRQ: Auto baud rate request */ #define USART_RQR_ABKRQ (1 << 0) /* --- USART_ISR values --------------------------------------------------- */ /* REACK: Receive enable acknowledge flag */ #define USART_ISR_REACK (1 << 22) /* TEACK: Transmit enable acknowledge flag */ #define USART_ISR_TEACK (1 << 21) /* WUF: Wakeup from Stop mode flag */ #define USART_ISR_WUF (1 << 20) /* RWU: Receiver wakeup from Mute mode */ #define USART_ISR_RWU (1 << 19) /* SBKF: Send break flag */ #define USART_ISR_SBKF (1 << 18) /* CMF: Character match flag */ #define USART_ISR_CMF (1 << 17) /* BUSY: Busy flag */ #define USART_ISR_BUSY (1 << 16) /* ABRF: Auto baud rate flag */ #define USART_ISR_ABRF (1 << 15) /* ABRE: Auto baud rate error */ #define USART_ISR_ABRE (1 << 14) /* EOBF: End of block flag */ #define USART_ISR_EOBF (1 << 12) /* RTOF: Receiver timeout */ #define USART_ISR_RTOF (1 << 11) /* CTS: CTS flag */ #define USART_ISR_CTS (1 << 10) /* CTSIF: CTS interrupt flag */ #define USART_ISR_CTSIF (1 << 9) /* LBDF: LIN break detection flag */ #define USART_ISR_LBDF (1 << 8) /* TXE: Transmit data register empty */ #define USART_ISR_TXE (1 << 7) /* TC: Transmission complete */ #define USART_ISR_TC (1 << 6) /* RXNE: Read data register not empty */ #define USART_ISR_RXNE (1 << 5) /* IDLE: Idle line detected */ #define USART_ISR_IDLE (1 << 4) /* ORE: Overrun error */ #define USART_ISR_ORE (1 << 3) /* NF: Noise detected flag */ #define USART_ISR_NF (1 << 2) /* FE: Framing error */ #define USART_ISR_FE (1 << 1) /* PE: Parity error */ #define USART_ISR_PE (1 << 0) /* --- USART_ICR values --------------------------------------------------- */ /* WUCF: Wakeup from Stop mode clear flag */ #define USART_ICR_WUCF (1 << 20) /* CMCF: Character match clear flag */ #define USART_ICR_CMCF (1 << 17) /* EOBCF: End of timeout clear flag */ #define USART_ICR_EOBCF (1 << 12) /* RTOCF: Receiver timeout clear flag */ #define USART_ICR_RTOCF (1 << 11) /* CTSCF: CTS clear flag */ #define USART_ICR_CTSCF (1 << 9) /* LBDCF: LIN break detection clear flag */ #define USART_ICR_LBDCF (1 << 8) /* TCCF: Transmission complete clear flag */ #define USART_ICR_TCCF (1 << 6) /* IDLECF: Idle line detected clear flag */ #define USART_ICR_IDLECF (1 << 4) /* ORECF: Overrun error clear flag */ #define USART_ICR_ORECF (1 << 3) /* NCF: Noise detected clear flag */ #define USART_ICR_NCF (1 << 2) /* FECF: Framing error clear flag */ #define USART_ICR_FECF (1 << 1) /* PECF: Parity error clear flag */ #define USART_ICR_PECF (1 << 0) /* --- USART_RDR values --------------------------------------------------- */ /* RDR[8:0]: Receive data value */ #define USART_RDR_MASK (0x1FF << 0) /* --- USART_TDR values --------------------------------------------------- */ /* TDR[8:0]: Transmit data value */ #define USART_TDR_MASK (0x1FF << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/adc.h ================================================ /** @defgroup STM32F4xx_adc_defines ADC Defines @brief Defined Constants and Types for the STM32F4xx Analog to Digital Converters @ingroup STM32F4xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Matthew Lai @author @htmlonly © @endhtmlonly 2009 Edward Cheeseman @date 31 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Matthew Lai * Copyright (C) 2009 Edward Cheeseman * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_ADC_H #define LIBOPENCM3_ADC_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* ADC port base addresses (for convenience) */ /****************************************************************************/ /** @defgroup adc_reg_base ADC register base addresses @ingroup STM32F4xx_adc_defines @{*/ #define ADC1 ADC1_BASE #define ADC2 ADC2_BASE #define ADC3 ADC3_BASE /**@}*/ /* --- ADC registers ------------------------------------------------------- */ /* ADC status register (ADC_SR) */ #define ADC_SR(block) MMIO32(block + 0x00) #define ADC1_SR ADC_SR(ADC1) #define ADC2_SR ADC_SR(ADC2) #define ADC3_SR ADC_SR(ADC3) /* ADC control register 1 (ADC_CR1) */ #define ADC_CR1(block) MMIO32(block + 0x04) #define ADC1_CR1 ADC_CR1(ADC1) #define ADC2_CR1 ADC_CR1(ADC2) #define ADC3_CR1 ADC_CR1(ADC3) /* ADC control register 2 (ADC_CR2) */ #define ADC_CR2(block) MMIO32(block + 0x08) #define ADC1_CR2 ADC_CR2(ADC1) #define ADC2_CR2 ADC_CR2(ADC2) #define ADC3_CR2 ADC_CR2(ADC3) /* ADC sample time register 1 (ADC_SMPR1) */ #define ADC_SMPR1(block) MMIO32(block + 0x0c) #define ADC1_SMPR1 ADC_SMPR1(ADC1) #define ADC2_SMPR1 ADC_SMPR1(ADC2) #define ADC3_SMPR1 ADC_SMPR1(ADC3) /* ADC sample time register 2 (ADC_SMPR2) */ #define ADC_SMPR2(block) MMIO32(block + 0x10) #define ADC1_SMPR2 ADC_SMPR2(ADC1) #define ADC2_SMPR2 ADC_SMPR2(ADC2) #define ADC3_SMPR2 ADC_SMPR2(ADC3) /* ADC injected channel data offset register x (ADC_JOFRx) (x=1..4) */ #define ADC_JOFR1(block) MMIO32(block + 0x14) #define ADC_JOFR2(block) MMIO32(block + 0x18) #define ADC_JOFR3(block) MMIO32(block + 0x1c) #define ADC_JOFR4(block) MMIO32(block + 0x20) #define ADC1_JOFR1 ADC_JOFR1(ADC1) #define ADC2_JOFR1 ADC_JOFR1(ADC2) #define ADC3_JOFR1 ADC_JOFR1(ADC3) #define ADC1_JOFR2 ADC_JOFR2(ADC1) #define ADC2_JOFR2 ADC_JOFR2(ADC2) #define ADC3_JOFR2 ADC_JOFR2(ADC3) #define ADC1_JOFR3 ADC_JOFR3(ADC1) #define ADC2_JOFR3 ADC_JOFR3(ADC2) #define ADC3_JOFR3 ADC_JOFR3(ADC3) #define ADC1_JOFR4 ADC_JOFR4(ADC1) #define ADC2_JOFR4 ADC_JOFR4(ADC2) #define ADC3_JOFR4 ADC_JOFR4(ADC3) /* ADC watchdog high threshold register (ADC_HTR) */ #define ADC_HTR(block) MMIO32(block + 0x24) #define ADC1_HTR ADC_HTR(ADC1) #define ADC2_HTR ADC_HTR(ADC2) #define ADC3_HTR ADC_HTR(ADC3) /* ADC watchdog low threshold register (ADC_LTR) */ #define ADC_LTR(block) MMIO32(block + 0x28) #define ADC1_LTR ADC_LTR(ADC1_BASE) #define ADC2_LTR ADC_LTR(ADC2_BASE) #define ADC3_LTR ADC_LTR(ADC3_BASE) /* ADC regular sequence register 1 (ADC_SQR1) */ #define ADC_SQR1(block) MMIO32(block + 0x2c) #define ADC1_SQR1 ADC_SQR1(ADC1) #define ADC2_SQR1 ADC_SQR1(ADC2) #define ADC3_SQR1 ADC_SQR1(ADC3) /* ADC regular sequence register 2 (ADC_SQR2) */ #define ADC_SQR2(block) MMIO32(block + 0x30) #define ADC1_SQR2 ADC_SQR2(ADC1) #define ADC2_SQR2 ADC_SQR2(ADC2) #define ADC3_SQR2 ADC_SQR2(ADC3) /* ADC regular sequence register 3 (ADC_SQR3) */ #define ADC_SQR3(block) MMIO32(block + 0x34) #define ADC1_SQR3 ADC_SQR3(ADC1) #define ADC2_SQR3 ADC_SQR3(ADC2) #define ADC3_SQR3 ADC_SQR3(ADC3) /* ADC injected sequence register (ADC_JSQR) */ #define ADC_JSQR(block) MMIO32(block + 0x38) #define ADC1_JSQR ADC_JSQR(ADC1_BASE) #define ADC2_JSQR ADC_JSQR(ADC2_BASE) #define ADC3_JSQR ADC_JSQR(ADC3_BASE) /* ADC injected data register x (ADC_JDRx) (x=1..4) */ #define ADC_JDR1(block) MMIO32(block + 0x3c) #define ADC_JDR2(block) MMIO32(block + 0x40) #define ADC_JDR3(block) MMIO32(block + 0x44) #define ADC_JDR4(block) MMIO32(block + 0x48) #define ADC1_JDR1 ADC_JDR1(ADC1) #define ADC2_JDR1 ADC_JDR1(ADC2) #define ADC3_JDR1 ADC_JDR1(ADC3) #define ADC1_JDR2 ADC_JDR2(ADC1) #define ADC2_JDR2 ADC_JDR2(ADC2) #define ADC3_JDR2 ADC_JDR2(ADC3) #define ADC1_JDR3 ADC_JDR3(ADC1) #define ADC2_JDR3 ADC_JDR3(ADC2) #define ADC3_JDR3 ADC_JDR3(ADC3) #define ADC1_JDR4 ADC_JDR4(ADC1) #define ADC2_JDR4 ADC_JDR4(ADC2) #define ADC3_JDR4 ADC_JDR4(ADC3) /* ADC regular data register (ADC_DR) */ #define ADC_DR(block) MMIO32(block + 0x4c) #define ADC1_DR ADC_DR(ADC1) #define ADC2_DR ADC_DR(ADC2) #define ADC3_DR ADC_DR(ADC3) /* ADC common (shared) registers */ #define ADC_COMMON_REGISTERS_BASE (ADC1_BASE+0x300) #define ADC_CSR MMIO32(ADC_COMMON_REGISTERS_BASE + 0x0) #define ADC_CCR MMIO32(ADC_COMMON_REGISTERS_BASE + 0x4) #define ADC_CDR MMIO32(ADC_COMMON_REGISTERS_BASE + 0x8) /* --- ADC Channels ------------------------------------------------------- */ /****************************************************************************/ /** @defgroup adc_channel ADC Channel Numbers @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CHANNEL0 0x00 #define ADC_CHANNEL1 0x01 #define ADC_CHANNEL2 0x02 #define ADC_CHANNEL3 0x03 #define ADC_CHANNEL4 0x04 #define ADC_CHANNEL5 0x05 #define ADC_CHANNEL6 0x06 #define ADC_CHANNEL7 0x07 #define ADC_CHANNEL8 0x08 #define ADC_CHANNEL9 0x09 #define ADC_CHANNEL10 0x0A #define ADC_CHANNEL11 0x0B #define ADC_CHANNEL12 0x0C #define ADC_CHANNEL13 0x0D #define ADC_CHANNEL14 0x0E #define ADC_CHANNEL15 0x0F #define ADC_CHANNEL16 0x10 #define ADC_CHANNEL17 0x11 #define ADC_CHANNEL18 0x12 /**@}*/ #define ADC_MASK 0x1F #define ADC_SHIFT 0 /* --- ADC_SR values ------------------------------------------------------- */ #define ADC_SR_OVR (1 << 5) #define ADC_SR_STRT (1 << 4) #define ADC_SR_JSTRT (1 << 3) #define ADC_SR_JEOC (1 << 2) #define ADC_SR_EOC (1 << 1) #define ADC_SR_AWD (1 << 0) /* --- ADC_CR1 values specific to STM32F2,4--------------------------------- */ /* OVRIE: Overrun interrupt enable */ #define ADC_CR1_OVRIE (1 << 26) /* RES[1:0]: Resolution */ /****************************************************************************/ /** @defgroup adc_cr1_res ADC Resolution. @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR1_RES_12BIT (0x0 << 24) #define ADC_CR1_RES_10BIT (0x1 << 24) #define ADC_CR1_RES_8BIT (0x2 << 24) #define ADC_CR1_RES_6BIT (0x3 << 24) /**@}*/ #define ADC_CR1_RES_MASK (0x3 << 24) #define ADC_CR1_RES_SHIFT 24 /* Note: Bits [21:16] are reserved, and must be kept at reset value. */ /* --- ADC_CR1 values (note some of these are defined elsewhere) ----------- */ /* AWDEN: Analog watchdog enable on regular channels */ #define ADC_CR1_AWDEN (1 << 23) /* JAWDEN: Analog watchdog enable on injected channels */ #define ADC_CR1_JAWDEN (1 << 22) /* DISCNUM[2:0]: Discontinuous mode channel count. */ /****************************************************************************/ /** @defgroup adc_cr1_discnum ADC Number of channels in discontinuous mode. @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR1_DISCNUM_1CHANNELS (0x0 << 13) #define ADC_CR1_DISCNUM_2CHANNELS (0x1 << 13) #define ADC_CR1_DISCNUM_3CHANNELS (0x2 << 13) #define ADC_CR1_DISCNUM_4CHANNELS (0x3 << 13) #define ADC_CR1_DISCNUM_5CHANNELS (0x4 << 13) #define ADC_CR1_DISCNUM_6CHANNELS (0x5 << 13) #define ADC_CR1_DISCNUM_7CHANNELS (0x6 << 13) #define ADC_CR1_DISCNUM_8CHANNELS (0x7 << 13) /**@}*/ #define ADC_CR1_DISCNUM_MASK (0x7 << 13) #define ADC_CR1_DISCNUM_SHIFT 13 /* JDISCEN: */ /** Discontinuous mode on injected channels. */ #define ADC_CR1_JDISCEN (1 << 12) /* DISCEN: */ /** Discontinuous mode on regular channels. */ #define ADC_CR1_DISCEN (1 << 11) /* JAUTO: */ /** Automatic Injection Group conversion. */ #define ADC_CR1_JAUTO (1 << 10) /* AWDSGL: */ /** Enable the watchdog on a single channel in scan mode. */ #define ADC_CR1_AWDSGL (1 << 9) /* SCAN: */ /** Scan mode. */ #define ADC_CR1_SCAN (1 << 8) /* JEOCIE: */ /** Interrupt enable for injected channels. */ #define ADC_CR1_JEOCIE (1 << 7) /* AWDIE: */ /** Analog watchdog interrupt enable. */ #define ADC_CR1_AWDIE (1 << 6) /* EOCIE: */ /** Interrupt enable EOC. */ #define ADC_CR1_EOCIE (1 << 5) /* AWDCH[4:0]: Analog watchdog channel bits. (Up to 17 other values reserved) */ /* Notes: * ADC1: Analog channel 16 and 17 are internally connected to the temperature * sensor and V_REFINT, respectively. * ADC2: Analog channel 16 and 17 are internally connected to V_SS. * ADC3: Analog channel 9, 14, 15, 16 and 17 are internally connected to V_SS. */ /****************************************************************************/ /* ADC_CR1 AWDCH[4:0] ADC watchdog channel */ /** @defgroup adc_watchdog_channel ADC watchdog channel @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR1_AWDCH_CHANNEL0 (0x00 << 0) #define ADC_CR1_AWDCH_CHANNEL1 (0x01 << 0) #define ADC_CR1_AWDCH_CHANNEL2 (0x02 << 0) #define ADC_CR1_AWDCH_CHANNEL3 (0x03 << 0) #define ADC_CR1_AWDCH_CHANNEL4 (0x04 << 0) #define ADC_CR1_AWDCH_CHANNEL5 (0x05 << 0) #define ADC_CR1_AWDCH_CHANNEL6 (0x06 << 0) #define ADC_CR1_AWDCH_CHANNEL7 (0x07 << 0) #define ADC_CR1_AWDCH_CHANNEL8 (0x08 << 0) #define ADC_CR1_AWDCH_CHANNEL9 (0x09 << 0) #define ADC_CR1_AWDCH_CHANNEL10 (0x0A << 0) #define ADC_CR1_AWDCH_CHANNEL11 (0x0B << 0) #define ADC_CR1_AWDCH_CHANNEL12 (0x0C << 0) #define ADC_CR1_AWDCH_CHANNEL13 (0x0D << 0) #define ADC_CR1_AWDCH_CHANNEL14 (0x0E << 0) #define ADC_CR1_AWDCH_CHANNEL15 (0x0F << 0) #define ADC_CR1_AWDCH_CHANNEL16 (0x10 << 0) #define ADC_CR1_AWDCH_CHANNEL17 (0x11 << 0) /**@}*/ #define ADC_CR1_AWDCH_MASK (0x1F << 0) #define ADC_CR1_AWDCH_SHIFT 0 /* --- ADC_CR2 values ------------------------------------------------------ */ /* SWSTART: Start conversion of regular channels. */ #define ADC_CR2_SWSTART (1 << 30) /* EXTEN[1:0]: External trigger enable for regular channels. */ /****************************************************************************/ /** @defgroup adc_trigger_polarity_regular ADC Trigger Polarity @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR2_EXTEN_DISABLED (0x0 << 28) #define ADC_CR2_EXTEN_RISING_EDGE (0x1 << 28) #define ADC_CR2_EXTEN_FALLING_EDGE (0x2 << 28) #define ADC_CR2_EXTEN_BOTH_EDGES (0x3 << 28) /**@}*/ #define ADC_CR2_EXTEN_MASK (0x3 << 28) #define ADC_CR2_EXTEN_SHIFT 28 /* EXTSEL[3:0]: External event selection for regular group. */ /****************************************************************************/ /** @defgroup adc_trigger_regular ADC Trigger Identifier for Regular group @ingroup STM32F4xx_adc_defines @{*/ /** Timer 1 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM1_CC1 (0x0 << 24) /** Timer 1 Compare Output 2 */ #define ADC_CR2_EXTSEL_TIM1_CC2 (0x1 << 24) /** Timer 1 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM1_CC3 (0x2 << 24) /** Timer 2 Compare Output 2 */ #define ADC_CR2_EXTSEL_TIM2_CC2 (0x3 << 24) /** Timer 2 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM2_CC3 (0x4 << 24) /** Timer 2 Compare Output 4 */ #define ADC_CR2_EXTSEL_TIM2_CC4 (0x5 << 24) /** Timer 2 TRGO Event */ #define ADC_CR2_EXTSEL_TIM2_TRGO (0x6 << 24) /** Timer 3 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM3_CC1 (0x7 << 24) /** Timer 3 TRGO Event */ #define ADC_CR2_EXTSEL_TIM3_TRGO (0x8 << 24) /** Timer 4 Compare Output 4 */ #define ADC_CR2_EXTSEL_TIM4_CC4 (0x9 << 24) /** Timer 5 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM5_CC1 (0xA << 24) /** Timer 5 Compare Output 2 */ #define ADC_CR2_EXTSEL_TIM5_CC2 (0xB << 24) /** Timer 5 Compare Output 3 */ #define ADC_CR2_EXTSEL_TIM5_CC3 (0xC << 24) /** Timer 8 Compare Output 1 */ #define ADC_CR2_EXTSEL_TIM8_CC1 (0xD << 24) /** Timer 8 TRGO Event */ #define ADC_CR2_EXTSEL_TIM8_TRGO (0xE << 24) /** EXTI Line 11 Event */ #define ADC_CR2_EXTSEL_EXTI_LINE_11 (0xF << 24) /**@}*/ #define ADC_CR2_EXTSEL_MASK (0xF << 24) #define ADC_CR2_EXTSEL_SHIFT 24 /* Bit 23 is reserved */ /* JSWSTART: Start conversion of injected channels. */ #define ADC_CR2_JSWSTART (1 << 22) /* JEXTEN[1:0]: External trigger enable for injected channels. */ /****************************************************************************/ /** @defgroup adc_trigger_polarity_injected ADC Injected Trigger Polarity @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR2_JEXTEN_DISABLED (0x0 << 20) #define ADC_CR2_JEXTEN_RISING_EDGE (0x1 << 20) #define ADC_CR2_JEXTEN_FALLING_EDGE (0x2 << 20) #define ADC_CR2_JEXTEN_BOTH_EDGES (0x3 << 20) /**@}*/ #define ADC_CR2_JEXTEN_MASK (0x3 << 20) #define ADC_CR2_JEXTEN_SHIFT 20 /* JEXTSEL[3:0]: External event selection for injected group. */ /****************************************************************************/ /** @defgroup adc_trigger_injected ADC Trigger Identifier for Injected group @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CR2_JEXTSEL_TIM1_CC4 (0x0 << 16) #define ADC_CR2_JEXTSEL_TIM1_TRGO (0x1 << 16) #define ADC_CR2_JEXTSEL_TIM2_CC1 (0x2 << 16) #define ADC_CR2_JEXTSEL_TIM2_TRGO (0x3 << 16) #define ADC_CR2_JEXTSEL_TIM3_CC2 (0x4 << 16) #define ADC_CR2_JEXTSEL_TIM3_CC4 (0x5 << 16) #define ADC_CR2_JEXTSEL_TIM4_CC1 (0x6 << 16) #define ADC_CR2_JEXTSEL_TIM4_CC2 (0x7 << 16) #define ADC_CR2_JEXTSEL_TIM4_CC3 (0x8 << 16) #define ADC_CR2_JEXTSEL_TIM4_TRGO (0x9 << 16) #define ADC_CR2_JEXTSEL_TIM5_CC4 (0xA << 16) #define ADC_CR2_JEXTSEL_TIM5_TRGO (0xB << 16) #define ADC_CR2_JEXTSEL_TIM8_CC2 (0xC << 16) #define ADC_CR2_JEXTSEL_TIM8_CC3 (0xD << 16) #define ADC_CR2_JEXTSEL_TIM8_CC4 (0xE << 16) #define ADC_CR2_JEXTSEL_EXTI_LINE_15 (0xF << 16) /**@}*/ #define ADC_CR2_JEXTSEL_MASK (0xF << 16) #define ADC_CR2_JEXTSEL_SHIFT 16 /* ALIGN: Data alignement. */ #define ADC_CR2_ALIGN_RIGHT (0 << 11) #define ADC_CR2_ALIGN_LEFT (1 << 11) #define ADC_CR2_ALIGN (1 << 11) /* EOCS: End of conversion selection. */ #define ADC_CR2_EOCS (1 << 10) /* DDS: DMA disable selection */ #define ADC_CR2_DDS (1 << 9) /* DMA: Direct memory access mode. (ADC1 and ADC3 only!) */ #define ADC_CR2_DMA (1 << 8) /* Note: Bits [7:2] are reserved and must be kept at reset value. */ /* CONT: Continous conversion. */ #define ADC_CR2_CONT (1 << 1) /* ADON: A/D converter On/Off. */ /* Note: If any other bit in this register apart from ADON is changed at the * same time, then conversion is not triggered. This is to prevent triggering * an erroneous conversion. * Conclusion: Must be separately written. */ #define ADC_CR2_ADON (1 << 0) /* --- ADC_SMPR1 values ---------------------------------------------------- */ #define ADC_SMPR1_SMP17_LSB 21 #define ADC_SMPR1_SMP16_LSB 18 #define ADC_SMPR1_SMP15_LSB 15 #define ADC_SMPR1_SMP14_LSB 12 #define ADC_SMPR1_SMP13_LSB 9 #define ADC_SMPR1_SMP12_LSB 6 #define ADC_SMPR1_SMP11_LSB 3 #define ADC_SMPR1_SMP10_LSB 0 #define ADC_SMPR1_SMP17_MSK (0x7 << ADC_SMP17_LSB) #define ADC_SMPR1_SMP16_MSK (0x7 << ADC_SMP16_LSB) #define ADC_SMPR1_SMP15_MSK (0x7 << ADC_SMP15_LSB) #define ADC_SMPR1_SMP14_MSK (0x7 << ADC_SMP14_LSB) #define ADC_SMPR1_SMP13_MSK (0x7 << ADC_SMP13_LSB) #define ADC_SMPR1_SMP12_MSK (0x7 << ADC_SMP12_LSB) #define ADC_SMPR1_SMP11_MSK (0x7 << ADC_SMP11_LSB) #define ADC_SMPR1_SMP10_MSK (0x7 << ADC_SMP10_LSB) /* --- ADC_SMPR2 values ---------------------------------------------------- */ #define ADC_SMPR2_SMP9_LSB 27 #define ADC_SMPR2_SMP8_LSB 24 #define ADC_SMPR2_SMP7_LSB 21 #define ADC_SMPR2_SMP6_LSB 18 #define ADC_SMPR2_SMP5_LSB 15 #define ADC_SMPR2_SMP4_LSB 12 #define ADC_SMPR2_SMP3_LSB 9 #define ADC_SMPR2_SMP2_LSB 6 #define ADC_SMPR2_SMP1_LSB 3 #define ADC_SMPR2_SMP0_LSB 0 #define ADC_SMPR2_SMP9_MSK (0x7 << ADC_SMP9_LSB) #define ADC_SMPR2_SMP8_MSK (0x7 << ADC_SMP8_LSB) #define ADC_SMPR2_SMP7_MSK (0x7 << ADC_SMP7_LSB) #define ADC_SMPR2_SMP6_MSK (0x7 << ADC_SMP6_LSB) #define ADC_SMPR2_SMP5_MSK (0x7 << ADC_SMP5_LSB) #define ADC_SMPR2_SMP4_MSK (0x7 << ADC_SMP4_LSB) #define ADC_SMPR2_SMP3_MSK (0x7 << ADC_SMP3_LSB) #define ADC_SMPR2_SMP2_MSK (0x7 << ADC_SMP2_LSB) #define ADC_SMPR2_SMP1_MSK (0x7 << ADC_SMP1_LSB) #define ADC_SMPR2_SMP0_MSK (0x7 << ADC_SMP0_LSB) /* --- ADC_SMPRx values --------------------------------------------------- */ /****************************************************************************/ /* ADC_SMPRG ADC Sample Time Selection for Channels */ /** @defgroup adc_sample_rg ADC Sample Time Selection for All Channels @ingroup STM32F4xx_adc_defines @{*/ #define ADC_SMPR_SMP_3CYC 0x0 #define ADC_SMPR_SMP_15CYC 0x1 #define ADC_SMPR_SMP_28CYC 0x2 #define ADC_SMPR_SMP_56CYC 0x3 #define ADC_SMPR_SMP_84CYC 0x4 #define ADC_SMPR_SMP_112CYC 0x5 #define ADC_SMPR_SMP_144CYC 0x6 #define ADC_SMPR_SMP_480CYC 0x7 /**@}*/ /* --- ADC_JOFRx, ADC_HTR, ADC_LTR values ---------------------------------- */ #define ADC_JOFFSET_LSB 0 #define ADC_JOFFSET_MSK (0x7ff << 0) #define ADC_HT_LSB 0 #define ADC_HT_MSK (0x7ff << 0) #define ADC_LT_LSB 0 #define ADC_LT_MSK (0x7ff << 0) /* --- ADC_SQR1 values ----------------------------------------------------- */ #define ADC_SQR1_L_LSB 20 #define ADC_SQR1_SQ16_LSB 15 #define ADC_SQR1_SQ15_LSB 10 #define ADC_SQR1_SQ14_LSB 5 #define ADC_SQR1_SQ13_LSB 0 #define ADC_SQR1_L_MSK (0xf << ADC_SQR1_L_LSB) #define ADC_SQR1_SQ16_MSK (0x1f << ADC_SQR1_SQ16_LSB) #define ADC_SQR1_SQ15_MSK (0x1f << ADC_SQR1_SQ15_LSB) #define ADC_SQR1_SQ14_MSK (0x1f << ADC_SQR1_SQ14_LSB) #define ADC_SQR1_SQ13_MSK (0x1f << ADC_SQR1_SQ13_LSB) /* --- ADC_SQR2 values ----------------------------------------------------- */ #define ADC_SQR2_SQ12_LSB 25 #define ADC_SQR2_SQ11_LSB 20 #define ADC_SQR2_SQ10_LSB 15 #define ADC_SQR2_SQ9_LSB 10 #define ADC_SQR2_SQ8_LSB 5 #define ADC_SQR2_SQ7_LSB 0 #define ADC_SQR2_SQ12_MSK (0x1f << ADC_SQR2_SQ12_LSB) #define ADC_SQR2_SQ11_MSK (0x1f << ADC_SQR2_SQ11_LSB) #define ADC_SQR2_SQ10_MSK (0x1f << ADC_SQR2_SQ10_LSB) #define ADC_SQR2_SQ9_MSK (0x1f << ADC_SQR2_SQ9_LSB) #define ADC_SQR2_SQ8_MSK (0x1f << ADC_SQR2_SQ8_LSB) #define ADC_SQR2_SQ7_MSK (0x1f << ADC_SQR2_SQ7_LSB) /* --- ADC_SQR3 values ----------------------------------------------------- */ #define ADC_SQR3_SQ6_LSB 25 #define ADC_SQR3_SQ5_LSB 20 #define ADC_SQR3_SQ4_LSB 15 #define ADC_SQR3_SQ3_LSB 10 #define ADC_SQR3_SQ2_LSB 5 #define ADC_SQR3_SQ1_LSB 0 #define ADC_SQR3_SQ6_MSK (0x1f << ADC_SQR3_SQ6_LSB) #define ADC_SQR3_SQ5_MSK (0x1f << ADC_SQR3_SQ5_LSB) #define ADC_SQR3_SQ4_MSK (0x1f << ADC_SQR3_SQ4_LSB) #define ADC_SQR3_SQ3_MSK (0x1f << ADC_SQR3_SQ3_LSB) #define ADC_SQR3_SQ2_MSK (0x1f << ADC_SQR3_SQ2_LSB) #define ADC_SQR3_SQ1_MSK (0x1f << ADC_SQR3_SQ1_LSB) /* --- ADC_JSQR values ----------------------------------------------------- */ #define ADC_JSQR_JL_LSB 20 #define ADC_JSQR_JSQ4_LSB 15 #define ADC_JSQR_JSQ3_LSB 10 #define ADC_JSQR_JSQ2_LSB 5 #define ADC_JSQR_JSQ1_LSB 0 /* JL[2:0]: Discontinous mode channel count injected channels. */ /****************************************************************************/ /** @defgroup adc_jsqr_jl ADC Number of channels in discontinuous mode fro injected channels. @ingroup STM32F4xx_adc_defines @{*/ #define ADC_JSQR_JL_1CHANNELS (0x0 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_2CHANNELS (0x1 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_3CHANNELS (0x2 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JL_4CHANNELS (0x3 << ADC_JSQR_JL_LSB) /**@}*/ #define ADC_JSQR_JL_SHIFT 13 #define ADC_JSQR_JL_MSK (0x2 << ADC_JSQR_JL_LSB) #define ADC_JSQR_JSQ4_MSK (0x1f << ADC_JSQR_JSQ4_LSB) #define ADC_JSQR_JSQ3_MSK (0x1f << ADC_JSQR_JSQ3_LSB) #define ADC_JSQR_JSQ2_MSK (0x1f << ADC_JSQR_JSQ2_LSB) #define ADC_JSQR_JSQ1_MSK (0x1f << ADC_JSQR_JSQ1_LSB) /* --- ADC_JDRx, ADC_DR values --------------------------------------------- */ #define ADC_JDATA_LSB 0 #define ADC_DATA_LSB 0 #define ADC_JDATA_MSK (0xffff << ADC_JDATA_LSB) #define ADC_DATA_MSK (0xffff << ADC_DA) /* --- Common Registers ---------------------------------------------------- */ /* --- ADC_CSR values (read only images) ------------------------------------ */ /* OVR3: Overrun ADC3. */ #define ADC_CSR_OVR3 (1 << 21) /* STRT3: Regular channel start ADC3. */ #define ADC_CSR_STRT3 (1 << 20) /* JSTRT3: Injected channel start ADC3. */ #define ADC_CSR_JSTRT3 (1 << 19) /* JEOC3: Injected channel end of conversion ADC3. */ #define ADC_CSR_JEOC3 (1 << 18) /* EOC3: Regular channel end of conversion ADC3. */ #define ADC_CSR_EOC3 (1 << 17) /* EOC3: Regular channel end of conversion ADC3. */ #define ADC_CSR_AWD3 (1 << 16) /* Bits 15:14 Reserved, must be kept at reset value */ /* OVR2: Overrun ADC2. */ #define ADC_CSR_OVR2 (1 << 13) /* STRT2: Regular channel start ADC2. */ #define ADC_CSR_STRT2 (1 << 12) /* JSTRT2: Injected channel start ADC2. */ #define ADC_CSR_JSTRT2 (1 << 11) /* JEOC2: Injected channel end of conversion ADC2. */ #define ADC_CSR_JEOC2 (1 << 10) /* EOC2: Regular channel end of conversion ADC2. */ #define ADC_CSR_EOC2 (1 << 9) /* EOC2: Regular channel end of conversion ADC2. */ #define ADC_CSR_AWD2 (1 << 8) /* Bits 7:6 Reserved, must be kept at reset value */ /* OVR1: Overrun ADC1. */ #define ADC_CSR_OVR1 (1 << 5) /* STRT1: Regular channel start ADC1. */ #define ADC_CSR_STRT1 (1 << 4) /* JSTRT1: Injected channel start ADC1. */ #define ADC_CSR_JSTRT1 (1 << 3) /* JEOC1: Injected channel end of conversion ADC1. */ #define ADC_CSR_JEOC1 (1 << 2) /* EOC1: Regular channel end of conversion ADC1. */ #define ADC_CSR_EOC1 (1 << 1) /* EOC1: Regular channel end of conversion ADC1. */ #define ADC_CSR_AWD1 (1 << 0) /* --- ADC_CCR values ------------------------------------------------------ */ /* TSVREFE: Temperature sensor and Vrefint enable. */ #define ADC_CCR_TSVREFE (1 << 23) /* VBATE: VBat enable. */ #define ADC_CCR_VBATE (1 << 22) /* Bit 18:21 reserved, must be kept at reset value. */ /* ADCPRE: ADC prescaler. */ /****************************************************************************/ /** @defgroup adc_ccr_adcpre ADC Prescale @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CCR_ADCPRE_BY2 (0x0 << 16) #define ADC_CCR_ADCPRE_BY4 (0x1 << 16) #define ADC_CCR_ADCPRE_BY6 (0x2 << 16) #define ADC_CCR_ADCPRE_BY8 (0x3 << 16) /**@}*/ #define ADC_CCR_ADCPRE_MASK (0x3 << 16) #define ADC_CCR_ADCPRE_SHIFT 16 /* DMA: Direct memory access mode for multi ADC mode. */ /****************************************************************************/ /** @defgroup adc_dma_mode ADC DMA mode for multi ADC mode @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CCR_DMA_DISABLE (0x0 << 14) #define ADC_CCR_DMA_MODE_1 (0x1 << 14) #define ADC_CCR_DMA_MODE_2 (0x2 << 14) #define ADC_CCR_DMA_MODE_3 (0x3 << 14) /**@}*/ #define ADC_CCR_DMA_MASK (0x3 << 14) #define ADC_CCR_DMA_SHIFT 14 /* DDS: DMA disable selection (for multi-ADC mode). */ #define ADC_CCR_DDS (1 << 13) /* Bit 12 reserved, must be kept at reset value */ /* DELAY: Delay between 2 sampling phases. */ /****************************************************************************/ /** @defgroup adc_delay ADC Delay between 2 sampling phases @ingroup STM32F4xx_adc_defines @{*/ #define ADC_CCR_DELAY_5ADCCLK (0x0 << 8) #define ADC_CCR_DELAY_6ADCCLK (0x1 << 8) #define ADC_CCR_DELAY_7ADCCLK (0x2 << 8) #define ADC_CCR_DELAY_8ADCCLK (0x3 << 8) #define ADC_CCR_DELAY_9ADCCLK (0x4 << 8) #define ADC_CCR_DELAY_10ADCCLK (0x5 << 8) #define ADC_CCR_DELAY_11ADCCLK (0x6 << 8) #define ADC_CCR_DELAY_12ADCCLK (0x7 << 8) #define ADC_CCR_DELAY_13ADCCLK (0x8 << 8) #define ADC_CCR_DELAY_14ADCCLK (0x9 << 8) #define ADC_CCR_DELAY_15ADCCLK (0xa << 8) #define ADC_CCR_DELAY_16ADCCLK (0xb << 8) #define ADC_CCR_DELAY_17ADCCLK (0xc << 8) #define ADC_CCR_DELAY_18ADCCLK (0xd << 8) #define ADC_CCR_DELAY_19ADCCLK (0xe << 8) #define ADC_CCR_DELAY_20ADCCLK (0xf << 8) /**@}*/ #define ADC_CCR_DELAY_MASK (0xf << 8) #define ADC_CCR_DELAY_SHIFT 8 /* Bit 7:5 reserved, must be kept at reset value */ /* MULTI: Multi ADC mode selection. */ /****************************************************************************/ /** @defgroup adc_multi_mode ADC Multi mode selection @ingroup STM32F4xx_adc_defines @{*/ /** All ADCs independent */ #define ADC_CCR_MULTI_INDEPENDENT (0x00 << 0) /* Dual modes (ADC1 + ADC2) */ /** * Dual modes (ADC1 + ADC2) Combined regular simultaneous + * injected simultaneous mode. */ #define ADC_CCR_MULTI_DUAL_REG_SIMUL_AND_INJECTED_SIMUL (0x01 << 0) /** * Dual modes (ADC1 + ADC2) Combined regular simultaneous + * alternate trigger mode. */ #define ADC_CCR_MULTI_DUAL_REG_SIMUL_AND_ALTERNATE_TRIG (0x02 << 0) /** Dual modes (ADC1 + ADC2) Injected simultaneous mode only. */ #define ADC_CCR_MULTI_DUAL_INJECTED_SIMUL (0x05 << 0) /** Dual modes (ADC1 + ADC2) Regular simultaneous mode only. */ #define ADC_CCR_MULTI_DUAL_REGULAR_SIMUL (0x06 << 0) /** Dual modes (ADC1 + ADC2) Interleaved mode only. */ #define ADC_CCR_MULTI_DUAL_INTERLEAVED (0x07 << 0) /** Dual modes (ADC1 + ADC2) Alternate trigger mode only. */ #define ADC_CCR_MULTI_DUAL_ALTERNATE_TRIG (0x09 << 0) /* Triple modes (ADC1 + ADC2 + ADC3) */ /** * Triple modes (ADC1 + ADC2 + ADC3) Combined regular simultaneous + * injected simultaneous mode. */ #define ADC_CCR_MULTI_TRIPLE_REG_SIMUL_AND_INJECTED_SIMUL (0x11 << 0) /** * Triple modes (ADC1 + ADC2 + ADC3) Combined regular simultaneous + * alternate trigger mode. */ #define ADC_CCR_MULTI_TRIPLE_REG_SIMUL_AND_ALTERNATE_TRIG (0x12 << 0) /** Triple modes (ADC1 + ADC2 + ADC3) Injected simultaneous mode only. */ #define ADC_CCR_MULTI_TRIPLE_INJECTED_SIMUL (0x15 << 0) /** Triple modes (ADC1 + ADC2 + ADC3) Regular simultaneous mode only. */ #define ADC_CCR_MULTI_TRIPLE_REGULAR_SIMUL (0x16 << 0) /** Triple modes (ADC1 + ADC2 + ADC3) Interleaved mode only. */ #define ADC_CCR_MULTI_TRIPLE_INTERLEAVED (0x17 << 0) /** Triple modes (ADC1 + ADC2 + ADC3) Alternate trigger mode only. */ #define ADC_CCR_MULTI_TRIPLE_ALTERNATE_TRIG (0x19 << 0) /**@}*/ #define ADC_CCR_MULTI_MASK (0x1f << 0) #define ADC_CCR_MULTI_SHIFT 0 /* --- ADC_CDR values ------------------------------------------------------ */ #define ADC_CDR_DATA2_MASK (0xffff << 16) #define ADC_CDR_DATA2_SHIFT 16 #define ADC_CDR_DATA1_MASK (0xffff << 0) #define ADC_CDR_DATA1_SHIFT 0 BEGIN_DECLS void adc_power_on(uint32_t adc); void adc_off(uint32_t adc); void adc_enable_analog_watchdog_regular(uint32_t adc); void adc_disable_analog_watchdog_regular(uint32_t adc); void adc_enable_analog_watchdog_injected(uint32_t adc); void adc_disable_analog_watchdog_injected(uint32_t adc); void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length); void adc_disable_discontinuous_mode_regular(uint32_t adc); void adc_enable_discontinuous_mode_injected(uint32_t adc); void adc_disable_discontinuous_mode_injected(uint32_t adc); void adc_enable_automatic_injected_group_conversion(uint32_t adc); void adc_disable_automatic_injected_group_conversion(uint32_t adc); void adc_enable_analog_watchdog_on_all_channels(uint32_t adc); void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel); void adc_enable_scan_mode(uint32_t adc); void adc_disable_scan_mode(uint32_t adc); void adc_enable_eoc_interrupt_injected(uint32_t adc); void adc_disable_eoc_interrupt_injected(uint32_t adc); void adc_enable_awd_interrupt(uint32_t adc); void adc_disable_awd_interrupt(uint32_t adc); void adc_enable_eoc_interrupt(uint32_t adc); void adc_disable_eoc_interrupt(uint32_t adc); void adc_start_conversion_regular(uint32_t adc); void adc_start_conversion_injected(uint32_t adc); void adc_disable_external_trigger_regular(uint32_t adc); void adc_disable_external_trigger_injected(uint32_t adc); void adc_set_left_aligned(uint32_t adc); void adc_set_right_aligned(uint32_t adc); void adc_enable_dma(uint32_t adc); void adc_disable_dma(uint32_t adc); void adc_set_continuous_conversion_mode(uint32_t adc); void adc_set_single_conversion_mode(uint32_t adc); void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time); void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time); void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold); void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold); void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]); bool adc_eoc(uint32_t adc); bool adc_eoc_injected(uint32_t adc); uint32_t adc_read_regular(uint32_t adc); uint32_t adc_read_injected(uint32_t adc, uint8_t reg); void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset); void adc_set_clk_prescale(uint32_t prescaler); void adc_set_multi_mode(uint32_t mode); void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity); void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger, uint32_t polarity); void adc_set_resolution(uint32_t adc, uint32_t resolution); void adc_enable_overrun_interrupt(uint32_t adc); void adc_disable_overrun_interrupt(uint32_t adc); bool adc_get_overrun_flag(uint32_t adc); void adc_clear_overrun_flag(uint32_t adc); bool adc_awd(uint32_t adc); void adc_eoc_after_each(uint32_t adc); void adc_eoc_after_group(uint32_t adc); void adc_set_dma_continue(uint32_t adc); void adc_set_dma_terminate(uint32_t adc); void adc_enable_temperature_sensor(void); void adc_disable_temperature_sensor(void); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/crc.h ================================================ /** @defgroup crc_defines CRC Defines @brief libopencm3 Defined Constants and Types for the STM32F4xx CRC Generator @ingroup STM32F4xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/crypto.h ================================================ /** @defgroup crypto_defines CRYPTO Defines * * @brief Defined constants and Types for the STM32F4xx Crypto Coprocessor * * @ingroup STM32F4xx_defines * * @version 1.0.0 * * @date 22 Jun 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRYPTO_H #define LIBOPENCM3_CRYPTO_H #include #include /**@{*/ /* --- CRYP registers ------------------------------------------------------ */ /** @defgroup crypto_defines_registers Registers (for F42xx or F43xx only) * * @brief Register access to the CRYP controller. Registers for F42xx and 43xx * * @ingroup crypto_defines */ /**@{*/ /* CRYP_CSGCMCCMxR: Crypto context registers CCM mode, i=0-7*/ #define CRYP_CSGCMCCMR(i) MMIO32(CRYP_BASE + 0x50 + (i) * 4) /* CRYP_CSGCMxR: Crypto context registers all modes, i=0-7*/ #define CRYP_CSGCMR(i) MMIO32(CRYP_BASE + 0x70 + (i) * 4) /* --- CRYP_CR values ------------------------------------------------------ */ /* Only for part STM32F42xx and STM32F43xx: */ /* GCM_CMPH: GCM or CCM phase state */ #define CRYP_CR_GCM_CMPH_SHIFT 16 #define CRYP_CR_GCM_CMPH (3 << CRYP_CR_GCM_CMPH_SHIFT) #define CRYP_CR_GCM_CMPH_INIT (0 << CRYP_CR_GCM_CMPH_SHIFT) #define CRYP_CR_GCM_CMPH_HEADER (1 << CRYP_CR_GCM_CMPH_SHIFT) #define CRYP_CR_GCM_CMPH_PAYLOAD (2 << CRYP_CR_GCM_CMPH_SHIFT) #define CRYP_CR_GCM_CMPH_FINAL (3 << CRYP_CR_GCM_CMPH_SHIFT) /* ALGOMODE3: Algorithm mode, fourth bit */ #define CRYP_CR_ALGOMODE3 (1 << 19) /**@}*/ /** @defgroup crypto_api API (for F42xx or F43xx only) * * @brief API for the CRYP controller. * * @warning Only for F42xx and 43xx * * @ingroup crypto_defines */ /**@{*/ enum crypto_mode_mac { ENCRYPT_GCM = CRYP_CR_ALGOMODE_TDES_ECB | CRYP_CR_ALGOMODE3, ENCRYPT_CCM = CRYP_CR_ALGOMODE_TDES_CBC | CRYP_CR_ALGOMODE3, DECRYPT_GCM = CRYP_CR_ALGOMODE_TDES_ECB | CRYP_CR_ALGOMODE3 | CRYP_CR_ALGODIR, DECRYPT_CCM = CRYP_CR_ALGOMODE_TDES_CBC | CRYP_CR_ALGOMODE3 | CRYP_CR_ALGODIR, }; BEGIN_DECLS void crypto_context_swap(uint32_t *buf); void crypto_set_mac_algorithm(enum crypto_mode_mac mode); END_DECLS /**@}*/ /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/dac.h ================================================ /** @defgroup dac_defines DAC Defines @brief Defined Constants and Types for the STM32F4xx DAC @ingroup STM32F4xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/dma.h ================================================ /** @defgroup dma_defines DMA Defines @ingroup STM32F4xx_defines @brief Defined Constants and Types for the STM32F4xx DMA Controller @version 1.0.0 @date 30 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/doc-stm32f4.h ================================================ /** @mainpage libopencm3 STM32F4 @version 1.0.0 @date 7 September 2012 API documentation for ST Microelectronics STM32F4 Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F4xx STM32F4xx Libraries for ST Microelectronics STM32F4xx series. @version 1.0.0 @date 7 September 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup STM32F4xx_defines STM32F4xx Defines @brief Defined Constants and Types for the STM32F4xx series @version 1.0.0 @date 7 September 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/exti.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/flash.h ================================================ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the STM32F4xx General Purpose I/O @ingroup STM32F4xx_defines @version 1.0.0 @date 1 July 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/hash.h ================================================ /** @defgroup hash_defines HASH Defines @ingroup STM32F4xx_defines @brief Defined Constants and Types for the STM32F4xx HASH Controller @version 1.0.0 @date 31 May 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_HASH_H #define LIBOPENCM3_HASH_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines @brief Defined Constants and Types for the STM32F4xx I2C @ingroup STM32F4xx_defines @version 1.0.0 @date 12 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_F4_NVIC_H partname_humanreadable: STM32 F4 series partname_doxygen: STM32F4 irqs: - nvic_wwdg - pvd - tamp_stamp - rtc_wkup - flash - rcc - exti0 - exti1 - exti2 - exti3 - exti4 - dma1_stream0 - dma1_stream1 - dma1_stream2 - dma1_stream3 - dma1_stream4 - dma1_stream5 - dma1_stream6 - adc - can1_tx - can1_rx0 - can1_rx1 - can1_sce - exti9_5 - tim1_brk_tim9 - tim1_up_tim10 - tim1_trg_com_tim11 - tim1_cc - tim2 - tim3 - tim4 - i2c1_ev - i2c1_er - i2c2_ev - i2c2_er - spi1 - spi2 - usart1 - usart2 - usart3 - exti15_10 - rtc_alarm - usb_fs_wkup - tim8_brk_tim12 - tim8_up_tim13 - tim8_trg_com_tim14 - tim8_cc - dma1_stream7 - fsmc - sdio - tim5 - spi3 - uart4 - uart5 - tim6_dac - tim7 - dma2_stream0 - dma2_stream1 - dma2_stream2 - dma2_stream3 - dma2_stream4 - eth - eth_wkup - can2_tx - can2_rx0 - can2_rx1 - can2_sce - otg_fs - dma2_stream5 - dma2_stream6 - dma2_stream7 - usart6 - i2c3_ev - i2c3_er - otg_hs_ep1_out - otg_hs_ep1_in - otg_hs_wkup - otg_hs - dcmi - cryp - hash_rng ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines @brief Defined Constants and Types for the STM32F4xx Independent Watchdog Timer @ingroup STM32F4xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32F4 specific peripheral definitions ----------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE 0x40000000 #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_AHB1 (PERIPH_BASE + 0x20000) #define PERIPH_BASE_AHB2 0x50000000 #define PERIPH_BASE_AHB3 0x60000000 /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB1 + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB1 + 0x0400) #define TIM4_BASE (PERIPH_BASE_APB1 + 0x0800) #define TIM5_BASE (PERIPH_BASE_APB1 + 0x0c00) #define TIM6_BASE (PERIPH_BASE_APB1 + 0x1000) #define TIM7_BASE (PERIPH_BASE_APB1 + 0x1400) #define TIM12_BASE (PERIPH_BASE_APB1 + 0x1800) #define TIM13_BASE (PERIPH_BASE_APB1 + 0x1c00) #define TIM14_BASE (PERIPH_BASE_APB1 + 0x2000) /* PERIPH_BASE_APB1 + 0x2400 (0x4000 2400 - 0x4000 27FF): Reserved */ #define RTC_BASE (PERIPH_BASE_APB1 + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB1 + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB1 + 0x3000) /* PERIPH_BASE_APB1 + 0x3400 (0x4000 3400 - 0x4000 37FF): Reserved */ #define SPI2_I2S_BASE (PERIPH_BASE_APB1 + 0x3800) #define SPI3_I2S_BASE (PERIPH_BASE_APB1 + 0x3c00) /* PERIPH_BASE_APB1 + 0x4000 (0x4000 4000 - 0x4000 3FFF): Reserved */ #define USART2_BASE (PERIPH_BASE_APB1 + 0x4400) #define USART3_BASE (PERIPH_BASE_APB1 + 0x4800) #define UART4_BASE (PERIPH_BASE_APB1 + 0x4c00) #define UART5_BASE (PERIPH_BASE_APB1 + 0x5000) #define I2C1_BASE (PERIPH_BASE_APB1 + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB1 + 0x5800) #define I2C3_BASE (PERIPH_BASE_APB1 + 0x5C00) /* PERIPH_BASE_APB1 + 0x6000 (0x4000 6000 - 0x4000 63FF): Reserved */ #define BX_CAN1_BASE (PERIPH_BASE_APB1 + 0x6400) #define BX_CAN2_BASE (PERIPH_BASE_APB1 + 0x6800) /* PERIPH_BASE_APB1 + 0x6C00 (0x4000 6C00 - 0x4000 6FFF): Reserved */ #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) #define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) /* PERIPH_BASE_APB1 + 0x7800 (0x4000 7800 - 0x4000 FFFF): Reserved */ /* APB2 */ #define TIM1_BASE (PERIPH_BASE_APB2 + 0x0000) #define TIM8_BASE (PERIPH_BASE_APB2 + 0x0400) /* PERIPH_BASE_APB2 + 0x0800 (0x4001 0800 - 0x4001 0FFF): Reserved */ #define USART1_BASE (PERIPH_BASE_APB2 + 0x1000) #define USART6_BASE (PERIPH_BASE_APB2 + 0x1400) /* PERIPH_BASE_APB2 + 0x1800 (0x4001 1800 - 0x4001 1FFF): Reserved */ #define ADC1_BASE (PERIPH_BASE_APB2 + 0x2000) #define ADC2_BASE (PERIPH_BASE_APB2 + 0x2100) #define ADC3_BASE (PERIPH_BASE_APB2 + 0x2200) #define ADC_COMMON_BASE (PERIPH_BASE_APB2 + 0x2300) /* PERIPH_BASE_APB2 + 0x2400 (0x4001 2400 - 0x4001 27FF): Reserved */ #define SDIO_BASE (PERIPH_BASE_APB2 + 0x2C00) /* PERIPH_BASE_APB2 + 0x2C00 (0x4001 2C00 - 0x4001 2FFF): Reserved */ #define SPI1_BASE (PERIPH_BASE_APB2 + 0x3000) /* PERIPH_BASE_APB2 + 0x3400 (0x4001 3400 - 0x4001 37FF): Reserved */ #define SYSCFG_BASE (PERIPH_BASE_APB2 + 0x3800) #define EXTI_BASE (PERIPH_BASE_APB2 + 0x3C00) #define TIM9_BASE (PERIPH_BASE_APB2 + 0x4000) #define TIM10_BASE (PERIPH_BASE_APB2 + 0x4400) #define TIM11_BASE (PERIPH_BASE_APB2 + 0x4800) /* PERIPH_BASE_APB2 + 0x4C00 (0x4001 4C00 - 0x4001 FFFF): Reserved */ /* AHB1 */ #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB1 + 0x0000) #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB1 + 0x0400) #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB1 + 0x0800) #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB1 + 0x0C00) #define GPIO_PORT_E_BASE (PERIPH_BASE_AHB1 + 0x1000) #define GPIO_PORT_F_BASE (PERIPH_BASE_AHB1 + 0x1400) #define GPIO_PORT_G_BASE (PERIPH_BASE_AHB1 + 0x1800) #define GPIO_PORT_H_BASE (PERIPH_BASE_AHB1 + 0x1C00) #define GPIO_PORT_I_BASE (PERIPH_BASE_AHB1 + 0x2000) /* PERIPH_BASE_AHB1 + 0x2400 (0x4002 2400 - 0x4002 2FFF): Reserved */ #define CRC_BASE (PERIPH_BASE_AHB1 + 0x3000) /* PERIPH_BASE_AHB1 + 0x3400 (0x4002 3400 - 0x4002 37FF): Reserved */ #define RCC_BASE (PERIPH_BASE_AHB1 + 0x3800) #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB1 + 0x3C00) #define BKPSRAM_BASE (PERIPH_BASE_AHB1 + 0x4000) /* PERIPH_BASE_AHB1 + 0x5000 (0x4002 5000 - 0x4002 5FFF): Reserved */ #define DMA1_BASE (PERIPH_BASE_AHB1 + 0x6000) #define DMA2_BASE (PERIPH_BASE_AHB1 + 0x6400) /* PERIPH_BASE_AHB1 + 0x6800 (0x4002 6800 - 0x4002 7FFF): Reserved */ #define ETHERNET_BASE (PERIPH_BASE_AHB1 + 0x8000) /* PERIPH_BASE_AHB1 + 0x9400 (0x4002 9400 - 0x4003 FFFF): Reserved */ #define USB_OTG_HS_BASE (PERIPH_BASE_AHB1 + 0x20000) /* PERIPH_BASE_AHB1 + 0x60000 (0x4008 0000 - 0x4FFF FFFF): Reserved */ /* AHB2 */ #define USB_OTG_FS_BASE (PERIPH_BASE_AHB2 + 0x00000) /* PERIPH_BASE_AHB2 + 0x40000 (0x5004 0000 - 0x5004 FFFF): Reserved */ #define DCMI_BASE (PERIPH_BASE_AHB2 + 0x50000) /* PERIPH_BASE_AHB2 + 0x50400 (0x5005 0400 - 0x5005 FFFF): Reserved */ #define CRYP_BASE (PERIPH_BASE_AHB2 + 0x60000) #define HASH_BASE (PERIPH_BASE_AHB2 + 0x60400) /* PERIPH_BASE_AHB2 + 0x60C00 (0x5006 0C00 - 0x5006 07FF): Reserved */ #define RNG_BASE (PERIPH_BASE_AHB2 + 0x60800) /* PERIPH_BASE_AHB2 + 0x61000 (0x5006 1000 - 0x5FFF FFFF): Reserved */ /* AHB3 */ #define FSMC_BASE (PERIPH_BASE_AHB3 + 0x40000000) /* PPIB */ #define DBGMCU_BASE (PPBI_BASE + 0x00042000) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines @brief Defined Constants and Types for the STM32F4xx Power Control @ingroup STM32F4xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Stephen Caudle @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_H #define LIBOPENCM3_PWR_H #include #include /* * This file extends the common STM32 version with definitions only * applicable to the STM32F4 series of devices. */ /* --- PWR_CR values ------------------------------------------------------- */ /* Bits [31:15]: Reserved */ /* VOS: Regulator voltage scaling output selection */ #define PWR_CR_VOS (1 << 14) /* Bits [13:10]: Reserved */ /* FPDS: Flash power down in stop mode */ #define PWR_CR_FPDS (1 << 9) /* --- PWR_CSR values ------------------------------------------------------ */ /* Bits [31:15]: Reserved */ /* VOSRDY: Regulator voltage scaling output selection ready bit */ #define PWR_CSR_VOSRDY (1 << 14) /* Bits [13:10]: Reserved */ /* BRE: Backup regulator enable */ #define PWR_CSR_BRE (1 << 9) /* Bits [7:4]: Reserved */ /* BRR: Backup regulator ready */ #define PWR_CSR_BRR (1 << 3) /* --- Function prototypes ------------------------------------------------- */ typedef enum { SCALE1, SCALE2, } vos_scale_t; BEGIN_DECLS void pwr_set_vos_scale(vos_scale_t scale); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/rcc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2011 Fergus Noble * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include /* --- RCC registers ------------------------------------------------------- */ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_PLLCFGR MMIO32(RCC_BASE + 0x04) #define RCC_CFGR MMIO32(RCC_BASE + 0x08) #define RCC_CIR MMIO32(RCC_BASE + 0x0c) #define RCC_AHB1RSTR MMIO32(RCC_BASE + 0x10) #define RCC_AHB2RSTR MMIO32(RCC_BASE + 0x14) #define RCC_AHB3RSTR MMIO32(RCC_BASE + 0x18) /* RCC_BASE + 0x1c Reserved */ #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x20) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x24) /* RCC_BASE + 0x28 Reserved */ /* RCC_BASE + 0x2c Reserved */ #define RCC_AHB1ENR MMIO32(RCC_BASE + 0x30) #define RCC_AHB2ENR MMIO32(RCC_BASE + 0x34) #define RCC_AHB3ENR MMIO32(RCC_BASE + 0x38) /* RCC_BASE + 0x3c Reserved */ #define RCC_APB1ENR MMIO32(RCC_BASE + 0x40) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x44) /* RCC_BASE + 0x48 Reserved */ /* RCC_BASE + 0x4c Reserved */ #define RCC_AHB1LPENR MMIO32(RCC_BASE + 0x50) #define RCC_AHB2LPENR MMIO32(RCC_BASE + 0x54) #define RCC_AHB3LPENR MMIO32(RCC_BASE + 0x58) /* RCC_BASE + 0x5c Reserved */ #define RCC_APB1LPENR MMIO32(RCC_BASE + 0x60) #define RCC_APB2LPENR MMIO32(RCC_BASE + 0x64) /* RCC_BASE + 0x68 Reserved */ /* RCC_BASE + 0x6c Reserved */ #define RCC_BDCR MMIO32(RCC_BASE + 0x70) #define RCC_CSR MMIO32(RCC_BASE + 0x74) /* RCC_BASE + 0x78 Reserved */ /* RCC_BASE + 0x7c Reserved */ #define RCC_SSCGR MMIO32(RCC_BASE + 0x80) #define RCC_PLLI2SCFGR MMIO32(RCC_BASE + 0x84) /* --- RCC_CR values ------------------------------------------------------- */ #define RCC_CR_PLLI2SRDY (1 << 27) #define RCC_CR_PLLI2SON (1 << 26) #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_CSSON (1 << 19) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) /* HSICAL: [15:8] */ /* HSITRIM: [7:3] */ #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) /* --- RCC_PLLCFGR values -------------------------------------------------- */ /* PLLQ: [27:24] */ #define RCC_PLLCFGR_PLLQ_SHIFT 24 #define RCC_PLLCFGR_PLLSRC (1 << 22) /* PLLP: [17:16] */ #define RCC_PLLCFGR_PLLP_SHIFT 16 /* PLLN: [14:6] */ #define RCC_PLLCFGR_PLLN_SHIFT 6 /* PLLM: [5:0] */ #define RCC_PLLCFGR_PLLM_SHIFT 0 /* --- RCC_CFGR values ----------------------------------------------------- */ /* MCO2: Microcontroller clock output 2 */ #define RCC_CFGR_MCO2_SHIFT 30 #define RCC_CFGR_MCO2_SYSCLK 0x0 #define RCC_CFGR_MCO2_PLLI2S 0x1 #define RCC_CFGR_MCO2_HSE 0x2 #define RCC_CFGR_MCO2_PLL 0x3 /* MCO1/2PRE: MCO Prescalers */ #define RCC_CFGR_MCO2PRE_SHIFT 27 #define RCC_CFGR_MCO1PRE_SHIFT 24 #define RCC_CFGR_MCOPRE_DIV_NONE 0x0 #define RCC_CFGR_MCOPRE_DIV_2 0x4 #define RCC_CFGR_MCOPRE_DIV_3 0x5 #define RCC_CFGR_MCOPRE_DIV_4 0x6 #define RCC_CFGR_MCOPRE_DIV_5 0x7 /* I2SSRC: I2S clock selection */ #define RCC_CFGR_I2SSRC (1 << 23) /* MCO1: Microcontroller clock output 1 */ #define RCC_CFGR_MCO1_SHIFT 21 #define RCC_CFGR_MCO1_HSI 0x0 #define RCC_CFGR_MCO1_LSE 0x1 #define RCC_CFGR_MCO1_HSE 0x2 #define RCC_CFGR_MCO1_PLL 0x3 /* RTCPRE: HSE division factor for RTC clock */ #define RCC_CFGR_RTCPRE_SHIFT 21 /* PPRE1/2: APB high-speed prescalers */ #define RCC_CFGR_PPRE2_SHIFT 13 #define RCC_CFGR_PPRE1_SHIFT 10 #define RCC_CFGR_PPRE_DIV_NONE 0x0 #define RCC_CFGR_PPRE_DIV_2 0x4 #define RCC_CFGR_PPRE_DIV_4 0x5 #define RCC_CFGR_PPRE_DIV_8 0x6 #define RCC_CFGR_PPRE_DIV_16 0x7 /* HPRE: AHB high-speed prescaler */ #define RCC_CFGR_HPRE_SHIFT 4 #define RCC_CFGR_HPRE_DIV_NONE 0x0 #define RCC_CFGR_HPRE_DIV_2 (0x8 + 0) #define RCC_CFGR_HPRE_DIV_4 (0x8 + 1) #define RCC_CFGR_HPRE_DIV_8 (0x8 + 2) #define RCC_CFGR_HPRE_DIV_16 (0x8 + 3) #define RCC_CFGR_HPRE_DIV_64 (0x8 + 4) #define RCC_CFGR_HPRE_DIV_128 (0x8 + 5) #define RCC_CFGR_HPRE_DIV_256 (0x8 + 6) #define RCC_CFGR_HPRE_DIV_512 (0x8 + 7) /* SWS: System clock switch status */ #define RCC_CFGR_SWS_SHIFT 2 #define RCC_CFGR_SWS_HSI 0x0 #define RCC_CFGR_SWS_HSE 0x1 #define RCC_CFGR_SWS_PLL 0x2 /* SW: System clock switch */ #define RCC_CFGR_SW_SHIFT 0 #define RCC_CFGR_SW_HSI 0x0 #define RCC_CFGR_SW_HSE 0x1 #define RCC_CFGR_SW_PLL 0x2 /* --- RCC_CIR values ------------------------------------------------------ */ /* Clock security system interrupt clear bit */ #define RCC_CIR_CSSC (1 << 23) /* OSC ready interrupt clear bits */ #define RCC_CIR_PLLI2SRDYC (1 << 21) #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) /* OSC ready interrupt enable bits */ #define RCC_CIR_PLLI2SRDYIE (1 << 13) #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) /* Clock security system interrupt flag bit */ #define RCC_CIR_CSSF (1 << 7) /* OSC ready interrupt flag bits */ #define RCC_CIR_PLLI2SRDYF (1 << 5) #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_AHB1RSTR values ------------------------------------------------- */ #define RCC_AHB1RSTR_OTGHSRST (1 << 29) #define RCC_AHB1RSTR_ETHMACRST (1 << 25) #define RCC_AHB1RSTR_DMA2RST (1 << 22) #define RCC_AHB1RSTR_DMA1RST (1 << 21) #define RCC_AHB1RSTR_CRCRST (1 << 12) #define RCC_AHB1RSTR_IOPIRST (1 << 8) #define RCC_AHB1RSTR_IOPHRST (1 << 7) #define RCC_AHB1RSTR_IOPGRST (1 << 6) #define RCC_AHB1RSTR_IOPFRST (1 << 5) #define RCC_AHB1RSTR_IOPERST (1 << 4) #define RCC_AHB1RSTR_IOPDRST (1 << 3) #define RCC_AHB1RSTR_IOPCRST (1 << 2) #define RCC_AHB1RSTR_IOPBRST (1 << 1) #define RCC_AHB1RSTR_IOPARST (1 << 0) /* --- RCC_AHB2RSTR values ------------------------------------------------- */ #define RCC_AHB2RSTR_OTGFSRST (1 << 7) #define RCC_AHB2RSTR_RNGRST (1 << 6) #define RCC_AHB2RSTR_HASHRST (1 << 5) #define RCC_AHB2RSTR_CRYPRST (1 << 4) #define RCC_AHB2RSTR_DCMIRST (1 << 0) /* --- RCC_AHB3RSTR values ------------------------------------------------- */ #define RCC_AHB3RSTR_FSMCRST (1 << 0) /* --- RCC_APB1RSTR values ------------------------------------------------- */ #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_CAN2RST (1 << 26) #define RCC_APB1RSTR_CAN1RST (1 << 25) #define RCC_APB1RSTR_I2C3RST (1 << 23) #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_UART5RST (1 << 20) #define RCC_APB1RSTR_UART4RST (1 << 19) #define RCC_APB1RSTR_USART3RST (1 << 18) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI3RST (1 << 15) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_TIM14RST (1 << 8) #define RCC_APB1RSTR_TIM13RST (1 << 7) #define RCC_APB1RSTR_TIM12RST (1 << 6) #define RCC_APB1RSTR_TIM7RST (1 << 5) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM5RST (1 << 3) #define RCC_APB1RSTR_TIM4RST (1 << 2) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ #define RCC_APB2RSTR_TIM11RST (1 << 18) #define RCC_APB2RSTR_TIM10RST (1 << 17) #define RCC_APB2RSTR_TIM9RST (1 << 16) #define RCC_APB2RSTR_SYSCFGRST (1 << 14) #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_SDIORST (1 << 11) #define RCC_APB2RSTR_ADCRST (1 << 8) #define RCC_APB2RSTR_USART6RST (1 << 5) #define RCC_APB2RSTR_USART1RST (1 << 4) #define RCC_APB2RSTR_TIM8RST (1 << 1) #define RCC_APB2RSTR_TIM1RST (1 << 0) /* --- RCC_AHB1ENR values ------------------------------------------------- */ #define RCC_AHB1ENR_OTGHSULPIEN (1 << 30) #define RCC_AHB1ENR_OTGHSEN (1 << 29) #define RCC_AHB1ENR_ETHMACPTPEN (1 << 28) #define RCC_AHB1ENR_ETHMACRXEN (1 << 27) #define RCC_AHB1ENR_ETHMACTXEN (1 << 26) #define RCC_AHB1ENR_ETHMACEN (1 << 25) #define RCC_AHB1ENR_DMA2EN (1 << 22) #define RCC_AHB1ENR_DMA1EN (1 << 21) #define RCC_AHB1ENR_BKPSRAMEN (1 << 18) #define RCC_AHB1ENR_CRCEN (1 << 12) #define RCC_AHB1ENR_IOPIEN (1 << 8) #define RCC_AHB1ENR_IOPHEN (1 << 7) #define RCC_AHB1ENR_IOPGEN (1 << 6) #define RCC_AHB1ENR_IOPFEN (1 << 5) #define RCC_AHB1ENR_IOPEEN (1 << 4) #define RCC_AHB1ENR_IOPDEN (1 << 3) #define RCC_AHB1ENR_IOPCEN (1 << 2) #define RCC_AHB1ENR_IOPBEN (1 << 1) #define RCC_AHB1ENR_IOPAEN (1 << 0) /* --- RCC_AHB2ENR values ------------------------------------------------- */ #define RCC_AHB2ENR_OTGFSEN (1 << 7) #define RCC_AHB2ENR_RNGEN (1 << 6) #define RCC_AHB2ENR_HASHEN (1 << 5) #define RCC_AHB2ENR_CRYPEN (1 << 4) #define RCC_AHB2ENR_DCMIEN (1 << 0) /* --- RCC_AHB3ENR values ------------------------------------------------- */ #define RCC_AHB3ENR_FSMCEN (1 << 0) /* --- RCC_APB1ENR values ------------------------------------------------- */ #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_CAN2EN (1 << 26) #define RCC_APB1ENR_CAN1EN (1 << 25) #define RCC_APB1ENR_I2C3EN (1 << 23) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_UART5EN (1 << 20) #define RCC_APB1ENR_UART4EN (1 << 19) #define RCC_APB1ENR_USART3EN (1 << 18) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI3EN (1 << 15) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_TIM14EN (1 << 8) #define RCC_APB1ENR_TIM13EN (1 << 7) #define RCC_APB1ENR_TIM12EN (1 << 6) #define RCC_APB1ENR_TIM7EN (1 << 5) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM5EN (1 << 3) #define RCC_APB1ENR_TIM4EN (1 << 2) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /* --- RCC_APB2ENR values ------------------------------------------------- */ #define RCC_APB2ENR_TIM11EN (1 << 18) #define RCC_APB2ENR_TIM10EN (1 << 17) #define RCC_APB2ENR_TIM9EN (1 << 16) #define RCC_APB2ENR_SYSCFGEN (1 << 14) #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_SDIOEN (1 << 11) #define RCC_APB2ENR_ADC3EN (1 << 10) #define RCC_APB2ENR_ADC2EN (1 << 9) #define RCC_APB2ENR_ADC1EN (1 << 8) #define RCC_APB2ENR_USART6EN (1 << 5) #define RCC_APB2ENR_USART1EN (1 << 4) #define RCC_APB2ENR_TIM8EN (1 << 1) #define RCC_APB2ENR_TIM1EN (1 << 0) /* --- RCC_AHB1LPENR values ------------------------------------------------- */ #define RCC_AHB1LPENR_OTGHSULPILPEN (1 << 30) #define RCC_AHB1LPENR_OTGHSLPEN (1 << 29) #define RCC_AHB1LPENR_ETHMACPTPLPEN (1 << 28) #define RCC_AHB1LPENR_ETHMACRXLPEN (1 << 27) #define RCC_AHB1LPENR_ETHMACTXLPEN (1 << 26) #define RCC_AHB1LPENR_ETHMACLPEN (1 << 25) #define RCC_AHB1LPENR_DMA2LPEN (1 << 22) #define RCC_AHB1LPENR_DMA1LPEN (1 << 21) #define RCC_AHB1LPENR_BKPSRAMLPEN (1 << 18) #define RCC_AHB1LPENR_SRAM2LPEN (1 << 17) #define RCC_AHB1LPENR_SRAM1LPEN (1 << 16) #define RCC_AHB1LPENR_FLITFLPEN (1 << 15) #define RCC_AHB1LPENR_CRCLPEN (1 << 12) #define RCC_AHB1LPENR_IOPILPEN (1 << 8) #define RCC_AHB1LPENR_IOPHLPEN (1 << 7) #define RCC_AHB1LPENR_IOPGLPEN (1 << 6) #define RCC_AHB1LPENR_IOPFLPEN (1 << 5) #define RCC_AHB1LPENR_IOPELPEN (1 << 4) #define RCC_AHB1LPENR_IOPDLPEN (1 << 3) #define RCC_AHB1LPENR_IOPCLPEN (1 << 2) #define RCC_AHB1LPENR_IOPBLPEN (1 << 1) #define RCC_AHB1LPENR_IOPALPEN (1 << 0) /* --- RCC_AHB2LPENR values ------------------------------------------------- */ #define RCC_AHB2LPENR_OTGFSLPEN (1 << 7) #define RCC_AHB2LPENR_RNGLPEN (1 << 6) #define RCC_AHB2LPENR_HASHLPEN (1 << 5) #define RCC_AHB2LPENR_CRYPLPEN (1 << 4) #define RCC_AHB2LPENR_DCMILPEN (1 << 0) /* --- RCC_AHB3LPENR values ------------------------------------------------- */ #define RCC_AHB3LPENR_FSMCLPEN (1 << 0) /* --- RCC_APB1LPENR values ------------------------------------------------- */ #define RCC_APB1LPENR_DACLPEN (1 << 29) #define RCC_APB1LPENR_PWRLPEN (1 << 28) #define RCC_APB1LPENR_CAN2LPEN (1 << 26) #define RCC_APB1LPENR_CAN1LPEN (1 << 25) #define RCC_APB1LPENR_I2C3LPEN (1 << 23) #define RCC_APB1LPENR_I2C2LPEN (1 << 22) #define RCC_APB1LPENR_I2C1LPEN (1 << 21) #define RCC_APB1LPENR_UART5LPEN (1 << 20) #define RCC_APB1LPENR_UART4LPEN (1 << 19) #define RCC_APB1LPENR_USART3LPEN (1 << 18) #define RCC_APB1LPENR_USART2LPEN (1 << 17) #define RCC_APB1LPENR_SPI3LPEN (1 << 15) #define RCC_APB1LPENR_SPI2LPEN (1 << 14) #define RCC_APB1LPENR_WWDGLPEN (1 << 11) #define RCC_APB1LPENR_TIM14LPEN (1 << 8) #define RCC_APB1LPENR_TIM13LPEN (1 << 7) #define RCC_APB1LPENR_TIM12LPEN (1 << 6) #define RCC_APB1LPENR_TIM7LPEN (1 << 5) #define RCC_APB1LPENR_TIM6LPEN (1 << 4) #define RCC_APB1LPENR_TIM5LPEN (1 << 3) #define RCC_APB1LPENR_TIM4LPEN (1 << 2) #define RCC_APB1LPENR_TIM3LPEN (1 << 1) #define RCC_APB1LPENR_TIM2LPEN (1 << 0) /* --- RCC_APB2LPENR values ------------------------------------------------- */ #define RCC_APB2LPENR_TIM11LPEN (1 << 18) #define RCC_APB2LPENR_TIM10LPEN (1 << 17) #define RCC_APB2LPENR_TIM9LPEN (1 << 16) #define RCC_APB2LPENR_SYSCFGLPEN (1 << 14) #define RCC_APB2LPENR_SPI1LPEN (1 << 12) #define RCC_APB2LPENR_SDIOLPEN (1 << 11) #define RCC_APB2LPENR_ADC3LPEN (1 << 10) #define RCC_APB2LPENR_ADC2LPEN (1 << 9) #define RCC_APB2LPENR_ADC1LPEN (1 << 8) #define RCC_APB2LPENR_USART6LPEN (1 << 5) #define RCC_APB2LPENR_USART1LPEN (1 << 4) #define RCC_APB2LPENR_TIM8LPEN (1 << 1) #define RCC_APB2LPENR_TIM1LPEN (1 << 0) /* --- RCC_BDCR values ----------------------------------------------------- */ #define RCC_BDCR_BDRST (1 << 16) #define RCC_BDCR_RTCEN (1 << 15) /* RCC_BDCR[9:8]: RTCSEL */ #define RCC_BDCR_LSEBYP (1 << 2) #define RCC_BDCR_LSERDY (1 << 1) #define RCC_BDCR_LSEON (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_BORRSTF (1 << 25) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) /* --- RCC_SSCGR values ---------------------------------------------------- */ /* PLL spread spectrum clock generation documented in Datasheet. */ #define RCC_SSCGR_SSCGEN (1 << 31) #define RCC_SSCGR_SPREADSEL (1 << 30) /* RCC_SSCGR[27:16]: INCSTEP */ #define RCC_SSCGR_INCSTEP_SHIFT 16 /* RCC_SSCGR[15:0]: MODPER */ #define RCC_SSCGR_MODPER_SHIFT 15 /* --- RCC_PLLI2SCFGR values ----------------------------------------------- */ /* RCC_PLLI2SCFGR[30:28]: PLLI2SR */ #define RCC_PLLI2SCFGR_PLLI2SR_SHIFT 28 /* RCC_PLLI2SCFGR[14:6]: PLLI2SN */ #define RCC_PLLI2SCFGR_PLLI2SN_SHIFT 6 /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_ppre1_frequency; extern uint32_t rcc_ppre2_frequency; /* --- Function prototypes ------------------------------------------------- */ typedef enum { CLOCK_3V3_48MHZ, CLOCK_3V3_120MHZ, CLOCK_3V3_168MHZ, CLOCK_3V3_END } clock_3v3_t; typedef struct { uint8_t pllm; uint16_t plln; uint8_t pllp; uint8_t pllq; uint32_t flash_config; uint8_t hpre; uint8_t ppre1; uint8_t ppre2; uint8_t power_save; uint32_t apb1_frequency; uint32_t apb2_frequency; } clock_scale_t; extern const clock_scale_t hse_8mhz_3v3[CLOCK_3V3_END]; extern const clock_scale_t hse_12mhz_3v3[CLOCK_3V3_END]; extern const clock_scale_t hse_16mhz_3v3[CLOCK_3V3_END]; typedef enum { PLL, HSE, HSI, LSE, LSI } osc_t; BEGIN_DECLS void rcc_osc_ready_int_clear(osc_t osc); void rcc_osc_ready_int_enable(osc_t osc); void rcc_osc_ready_int_disable(osc_t osc); int rcc_osc_ready_int_flag(osc_t osc); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_wait_for_osc_ready(osc_t osc); void rcc_wait_for_sysclk_status(osc_t osc); void rcc_osc_on(osc_t osc); void rcc_osc_off(osc_t osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_osc_bypass_enable(osc_t osc); void rcc_osc_bypass_disable(osc_t osc); void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset); void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset); void rcc_set_sysclk_source(uint32_t clk); void rcc_set_pll_source(uint32_t pllsrc); void rcc_set_ppre2(uint32_t ppre2); void rcc_set_ppre1(uint32_t ppre1); void rcc_set_hpre(uint32_t hpre); void rcc_set_rtcpre(uint32_t rtcpre); void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq); void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq); uint32_t rcc_system_clock_source(void); void rcc_clock_setup_hse_3v3(const clock_scale_t *clock); void rcc_backupdomain_reset(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/rng.h ================================================ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RNG_H #define LIBOPENCM3_RNG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines @brief Defined Constants and Types for the STM32F4xx RTC @ingroup STM32F4xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RTC_H #define LIBOPENCM3_RTC_H #include #include BEGIN_DECLS void rtc_enable_wakeup_timer(void); void rtc_disable_wakeup_timer(void); void rtc_enable_wakeup_timer_interrupt(void); void rtc_disable_wakeup_timer_interrupt(void); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/spi.h ================================================ /** @defgroup spi_defines SPI Defines @brief Defined Constants and Types for the STM32F4xx SPI @ingroup STM32F4xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/syscfg.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SYSCFG_H #define LIBOPENCM3_SYSCFG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/timer.h ================================================ /** @defgroup timer_defines Timer Defines @brief libopencm3 Defined Constants and Types for the STM32F4xx Timers @ingroup STM32F4xx_defines @version 1.0.0 @date 8 March 2013 @author @htmlonly © @endhtmlonly 2011 Fergus Noble LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TIMER_H #define LIBOPENCM3_TIMER_H #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/f4/usart.h ================================================ /** @defgroup usart_defines USART Defines @brief Defined Constants and Types for the STM32F4xx USART @ingroup STM32F4xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/flash.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/fsmc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_FSMC_H #define LIBOPENCM3_FSMC_H #include #include /* --- Convenience macros -------------------------------------------------- */ #define FSMC_BANK1_BASE 0x60000000 /* NOR / PSRAM */ #define FSMC_BANK2_BASE 0x70000000 /* NAND flash */ #define FSMC_BANK3_BASE 0x80000000 /* NAND flash */ #define FSMC_BANK4_BASE 0x90000000 /* PC card */ /* --- FSMC registers ------------------------------------------------------ */ /* SRAM/NOR-Flash chip-select control registers 1..4 (FSMC_BCRx) */ #define FSMC_BCR(x) MMIO32(FSMC_BASE + 0x00 + 8 * x) #define FSMC_BCR1 FSMC_BCR(0) #define FSMC_BCR2 FSMC_BCR(1) #define FSMC_BCR3 FSMC_BCR(2) #define FSMC_BCR4 FSMC_BCR(3) /* SRAM/NOR-Flash chip-select timing registers 1..4 (FSMC_BTRx) */ #define FSMC_BTR(x) MMIO32(FSMC_BASE + 0x04 + 8 * x) #define FSMC_BTR1 FSMC_BTR(0) #define FSMC_BTR2 FSMC_BTR(1) #define FSMC_BTR3 FSMC_BTR(2) #define FSMC_BTR4 FSMC_BTR(3) /* SRAM/NOR-Flash write timing registers 1..4 (FSMC_BWTRx) */ #define FSMC_BWTR(x) MMIO32(FSMC_BASE + 0x104 + 8 * x) #define FSMC_BWTR1 FSMC_BWTR(0) #define FSMC_BWTR2 FSMC_BWTR(1) #define FSMC_BWTR3 FSMC_BWTR(2) #define FSMC_BWTR4 FSMC_BWTR(3) /* PC Card/NAND Flash control registers 2..4 (FSMC_PCRx) */ #define FSMC_PCR(x) MMIO32(FSMC_BASE + 0x40 + 0x20 * x) #define FSMC_PCR2 FSMC_PCR(1) #define FSMC_PCR3 FSMC_PCR(2) #define FSMC_PCR4 FSMC_PCR(3) /* FIFO status and interrupt registers 2..4 (FSMC_SRx) */ #define FSMC_SR(x) MMIO32(FSMC_BASE + 0x44 + 0x20 * x) #define FSMC_SR2 FSMC_SR(1) #define FSMC_SR3 FSMC_SR(2) #define FSMC_SR4 FSMC_SR(3) /* Common memory space timing registers 2..4 (FSMC_PMEMx) */ #define FSMC_PMEM(x) MMIO32(FSMC_BASE + 0x48 + 0x20 * x) #define FSMC_PMEM2 FSMC_PMEM(1) #define FSMC_PMEM3 FSMC_PMEM(2) #define FSMC_PMEM4 FSMC_PMEM(3) /* Attribute memory space timing registers 2..4 (FSMC_PATTx) */ #define FSMC_PATT(x) MMIO32(FSMC_BASE + 0x4c + 0x20 * x) #define FSMC_PATT2 FSMC_PATT(1) #define FSMC_PATT3 FSMC_PATT(2) #define FSMC_PATT4 FSMC_PATT(3) /* I/O space timing register 4 (FSMC_PIO4) */ #define FSMC_PIO4 MMIO32(FSMC_BASE + 0xb0) /* ECC result registers 2/3 (FSMC_ECCRx) */ #define FSMC_ECCR(x) MMIO32(FSMC_BASE + 0x54 + 0x20 * x) #define FSMC_ECCR2 FSMC_ECCR(1) #define FSMC_ECCR3 FSMC_ECCR(2) /* --- FSMC_BCRx values ---------------------------------------------------- */ /* Bits [31:20]: Reserved. */ /* CBURSTRW: Write burst enable */ #define FSMC_BCR_CBURSTRW (1 << 19) /* Bits [18:16]: Reserved. */ /* ASYNCWAIT: Wait signal during asynchronous transfers */ #define FSMC_BCR_ASYNCWAIT (1 << 15) /* EXTMOD: Extended mode enable */ #define FSMC_BCR_EXTMOD (1 << 14) /* WAITEN: Wait enable bit */ #define FSMC_BCR_WAITEN (1 << 13) /* WREN: Write enable bit */ #define FSMC_BCR_WREN (1 << 12) /* WAITCFG: Wait timing configuration */ #define FSMC_BCR_WAITCFG (1 << 11) /* WRAPMOD: Wrapped burst mode support */ #define FSMC_BCR_WRAPMOD (1 << 10) /* WAITPOL: Wait signal polarity bit */ #define FSMC_BCR_WAITPOL (1 << 9) /* BURSTEN: Burst enable bit */ #define FSMC_BCR_BURSTEN (1 << 8) /* Bit 7: Reserved. */ /* FACCEN: Flash access enable */ #define FSMC_BCR_FACCEN (1 << 6) /* MWID[5:4]: Memory data bus width */ #define FSMC_BCR_MWID (1 << 4) /* MTYP[3:2]: Memory type */ #define FSMC_BCR_MTYP (1 << 2) /* MUXEN: Address/data multiplexing enable bit */ #define FSMC_BCR_MUXEN (1 << 1) /* MBKEN: Memory bank enable bit */ #define FSMC_BCR_MBKEN (1 << 0) /* --- FSMC_BTRx values ---------------------------------------------------- */ /* Bits [31:30]: Reserved. */ /* Same for read and write */ #define FSMC_BTx_ACCMOD_A (0) #define FSMC_BTx_ACCMOD_B (1) #define FSMC_BTx_ACCMOD_C (2) #define FSMC_BTx_ACCMOD_D (3) /* ACCMOD[29:28]: Access mode */ #define FSMC_BTR_ACCMOD (1 << 28) #define FSMC_BTR_ACCMODx(x) (((x) & 0x03) << 28) /* DATLAT[27:24]: Data latency (for synchronous burst NOR flash) */ #define FSMC_BTR_DATLAT (1 << 24) #define FSMC_BTR_DATLATx(x) (((x) & 0x0f) << 24) /* CLKDIV[23:20]: Clock divide ratio (for CLK signal) */ #define FSMC_BTR_CLKDIV (1 << 20) #define FSMC_BTR_CLKDIVx(x) (((x) & 0x0f) << 20) /* BUSTURN[19:16]: Bus turnaround phase duration */ #define FSMC_BTR_BUSTURN (1 << 16) #define FSMC_BTR_BUSTURNx(x) (((x) & 0x0f) << 16) /* DATAST[15:8]: Data-phase duration */ #define FSMC_BTR_DATAST (1 << 8) #define FSMC_BTR_DATASTx(x) (((x) & 0xff) << 8) /* ADDHLD[7:4]: Address-hold phase duration */ #define FSMC_BTR_ADDHLD (1 << 4) #define FSMC_BTR_ADDHLDx(x) (((x) & 0x0f) << 4) /* ADDSET[3:0]: Address setup phase duration */ #define FSMC_BTR_ADDSET (1 << 0) #define FSMC_BTR_ADDSETx(x) (((x) & 0x0f) << 0) /* --- FSMC_BWTRx values --------------------------------------------------- */ /* Bits [31:30]: Reserved. */ /* ACCMOD[29:28]: Access mode */ #define FSMC_BWTR_ACCMOD (1 << 28) /* DATLAT[27:24]: Data latency (for synchronous burst NOR Flash) */ #define FSMC_BWTR_DATLAT (1 << 24) /* CLKDIV[23:20]: Clock divide ratio (for CLK signal) */ #define FSMC_BWTR_CLKDIV (1 << 20) /* Bits [19..16]: Reserved. */ /* DATAST[15:8]: Data-phase duration */ #define FSMC_BWTR_DATAST (1 << 8) /* ADDHLD[7:4]: Address-hold phase duration */ #define FSMC_BWTR_ADDHLD (1 << 4) /* ADDSET[3:0]: Address setup phase duration */ #define FSMC_BWTR_ADDSET (1 << 0) /* --- FSMC_PCRx values ---------------------------------------------------- */ /* Bits [31:20]: Reserved. */ /* ECCPS[19:17]: ECC page size */ #define FSMC_PCR_ECCPS (1 << 17) /* TAR[16:13]: ALE to RE delay */ #define FSMC_PCR_TAR (1 << 13) /* TCLR[12:9]: CLE to RE delay */ #define FSMC_PCR_TCLR (1 << 9) /* Bits [8..7]: Reserved. */ /* ECCEN: ECC computation logic enable bit */ #define FSMC_PCR_ECCEN (1 << 6) /* PWID[5:4]: Databus width */ #define FSMC_PCR_PWID (1 << 4) /* PTYP: Memory type */ #define FSMC_PCR_PTYP (1 << 3) /* PBKEN: PC Card/NAND Flash memory bank enable bit */ #define FSMC_PCR_PBKEN (1 << 2) /* PWAITEN: Wait feature enable bit */ #define FSMC_PCR_PWAITEN (1 << 1) /* Bit 0: Reserved. */ /* --- FSMC_SRx values ----------------------------------------------------- */ /* Bits [31:7]: Reserved. */ /* FEMPT: FIFO empty */ #define FSMC_SR_FEMPT (1 << 6) /* IFEN: Interrupt falling edge detection enable bit */ #define FSMC_SR_IFEN (1 << 5) /* ILEN: Interrupt high-level detection enable bit */ #define FSMC_SR_ILEN (1 << 4) /* IREN: Interrupt rising edge detection enable bit */ #define FSMC_SR_IREN (1 << 3) /* IFS: Interrupt falling edge status */ #define FSMC_SR_IFS (1 << 2) /* ILS: Interrupt high-level status */ #define FSMC_SR_ILS (1 << 1) /* IRS: Interrupt rising edge status */ #define FSMC_SR_IRS (1 << 0) /* --- FSMC_PMEMx values --------------------------------------------------- */ /* MEMHIZx[31:24]: Common memory x databus HiZ time */ #define FSMC_PMEM_MEMHIZX (1 << 24) /* MEMHOLDx[23:16]: Common memory x hold time */ #define FSMC_PMEM_MEMHOLDX (1 << 16) /* MEMWAITx[15:8]: Common memory x wait time */ #define FSMC_PMEM_MEMWAITX (1 << 8) /* MEMSETx[7:0]: Common memory x setup time */ #define FSMC_PMEM_MEMSETX (1 << 0) /* --- FSMC_PATTx values --------------------------------------------------- */ /* ATTHIZx[31:24]: Attribute memory x databus HiZ time */ #define FSMC_PATT_ATTHIZX (1 << 24) /* ATTHOLDx[23:16]: Attribute memory x hold time */ #define FSMC_PATT_ATTHOLDX (1 << 16) /* ATTWAITx[15:8]: Attribute memory x wait time */ #define FSMC_PATT_ATTWAITX (1 << 8) /* ATTSETx[7:0]: Attribute memory x setup time */ #define FSMC_PATT_ATTSETX (1 << 0) /* --- FSMC_PIO4 values ---------------------------------------------------- */ /* IOHIZx[31:24]: I/O x databus HiZ time */ #define FSMC_PIO4_IOHIZX (1 << 24) /* IOHOLDx[23:16]: I/O x hold time */ #define FSMC_PIO4_IOHOLDX (1 << 16) /* IOWAITx[15:8]: I/O x wait time */ #define FSMC_PIO4_IOWAITX (1 << 8) /* IOSETx[7:0]: I/O x setup time */ #define FSMC_PIO4_IOSETX (1 << 0) /* --- FSMC_ECCRx values --------------------------------------------------- */ /* ECCx[31:0]: ECC result */ #define FSMC_ECCR_ECCX (1 << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/gpio.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/hash.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F2) # include #elif defined(STM32F4) # include #else # error "hash processor is supported only" \ "in stm32f21, stm32f41 and stm32f43 families." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/i2c.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/iwdg.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/crc.h ================================================ /** @defgroup crc_defines CRC Defines @brief libopencm3 Defined Constants and Types for the STM32L1xx CRC Generator @ingroup STM32L1xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_CRC_H #define LIBOPENCM3_CRC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/dac.h ================================================ /** @defgroup dac_defines DAC Defines @brief Defined Constants and Types for the STM32L1xx DAC @ingroup STM32L1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DAC_H #define LIBOPENCM3_DAC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/dma.h ================================================ /** @defgroup STM32L1xx_dma_defines DMA Defines @ingroup STM32L1xx_defines @brief Defined Constants and Types for the STM32L1xx DMA Controller @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Fergus Noble @author @htmlonly © @endhtmlonly 2012 Ken Sarkies @date 18 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_DMA_H #define LIBOPENCM3_DMA_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/doc-stm32l1.h ================================================ /** @mainpage libopencm3 STM32L1 @version 1.0.0 @date 12 November 2012 API documentation for ST Microelectronics STM32L1 Cortex M3 series. LGPL License Terms @ref lgpl_license */ /** @defgroup STM32L1xx STM32L1xx Libraries for ST Microelectronics STM32L1xx series. @version 1.0.0 @date 12 November 2012 LGPL License Terms @ref lgpl_license */ /** @defgroup STM32L1xx_defines STM32L1xx Defines @brief Defined Constants and Types for the STM32L1xx series @version 1.0.0 @date 12 November 2012 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/exti.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_EXTI_H #define LIBOPENCM3_EXTI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/flash.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * All extracted from PM0062 rev2, L15xx and L16xx Flash/EEPROM programming * manual. */ #ifndef LIBOPENCM3_FLASH_H #define LIBOPENCM3_FLASH_H #include #include /* --- FLASH registers ----------------------------------------------------- */ #define FLASH_ACR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x00) #define FLASH_PECR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x04) #define FLASH_PDKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x08) #define FLASH_PEKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x0C) #define FLASH_PRGKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x10) #define FLASH_OPTKEYR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x14) #define FLASH_SR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x18) #define FLASH_OBR MMIO32(FLASH_MEM_INTERFACE_BASE + 0x1c) #define FLASH_WRPR1 MMIO32(FLASH_MEM_INTERFACE_BASE + 0x20) #define FLASH_WRPR2 MMIO32(FLASH_MEM_INTERFACE_BASE + 0x80) #define FLASH_WRPR3 MMIO32(FLASH_MEM_INTERFACE_BASE + 0x84) /* --- FLASH_ACR values ---------------------------------------------------- */ #define FLASH_ACR_RUNPD (1 << 4) #define FLASH_ACR_SLEEPPD (1 << 3) #define FLASH_ACR_ACC64 (1 << 2) #define FLASH_ACR_PRFTEN (1 << 1) #define FLASH_ACR_LATENCY_0WS 0x00 #define FLASH_ACR_LATENCY_1WS 0x01 /* --- FLASH_PECR values. Program/erase control register */ #define FLASH_PECR_OBL_LAUNCH (1 << 18) #define FLASH_PECR_ERRIE (1 << 17) #define FLASH_PECR_EOPIE (1 << 16) #define FLASH_PECR_PARALLBANK (1 << 15) #define FLASH_PECR_FPRG (1 << 10) #define FLASH_PECR_ERASE (1 << 9) #define FLASH_PECR_FTDW (1 << 8) #define FLASH_PECR_FTDW (1 << 8) #define FLASH_PECR_DATA (1 << 4) #define FLASH_PECR_PROG (1 << 3) #define FLASH_PECR_OPTLOCK (1 << 2) #define FLASH_PECR_PRGLOCK (1 << 1) #define FLASH_PECR_PELOCK (1 << 0) /* Power down key register (FLASH_PDKEYR) */ #define FLASH_PDKEYR_PDKEY1 ((uint32_t)0x04152637) #define FLASH_PDKEYR_PDKEY2 ((uint32_t)0xFAFBFCFD) /* Program/erase key register (FLASH_PEKEYR) */ #define FLASH_PEKEYR_PEKEY1 ((uint32_t)0x89ABCDEF) #define FLASH_PEKEYR_PEKEY2 ((uint32_t)0x02030405) /* Program memory key register (FLASH_PRGKEYR) */ #define FLASH_PRGKEYR_PRGKEY1 ((uint32_t)0x8C9DAEBF) #define FLASH_PRGKEYR_PRGKEY2 ((uint32_t)0x13141516) /* Option byte key register (FLASH_OPTKEYR) */ #define FLASH_OPTKEYR_OPTKEY1 ((uint32_t)0xFBEAD9C8) #define FLASH_OPTKEYR_OPTKEY2 ((uint32_t)0x24252627) /* --- FLASH_SR values ----------------------------------------------------- */ #define FLASH_SR_OPTVERRUSR (1 << 12) #define FLASH_SR_OPTVERR (1 << 11) #define FLASH_SR_SIZEERR (1 << 10) #define FLASH_SR_PGAERR (1 << 9) #define FLASH_SR_WRPERR (1 << 8) #define FLASH_SR_READY (1 << 3) #define FLASH_SR_ENDHV (1 << 2) #define FLASH_SR_EOP (1 << 1) #define FLASH_SR_BSY (1 << 0) /* --- FLASH_OBR values ----------------------------------------------------- */ #define FLASH_OBR_BFB2 (1 << 23) #define FLASH_OBR_NRST_STDBY (1 << 22) #define FLASH_OBR_NRST_STOP (1 << 21) #define FLASH_OBR_IWDG_SW (1 << 20) #define FLASH_OBR_BOR_OFF (0x0 << 16) #define FLASH_OBR_BOR_LEVEL_1 (0x8 << 16) #define FLASH_OBR_BOR_LEVEL_2 (0x9 << 16) #define FLASH_OBR_BOR_LEVEL_3 (0xa << 16) #define FLASH_OBR_BOR_LEVEL_4 (0xb << 16) #define FLASH_OBR_BOR_LEVEL_5 (0xc << 16) #define FLASH_OBR_RDPRT_LEVEL_0 (0xaa) #define FLASH_OBR_RDPRT_LEVEL_1 (0x00) #define FLASH_OBR_RDPRT_LEVEL_2 (0xcc) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void flash_64bit_enable(void); void flash_64bit_disable(void); void flash_prefetch_enable(void); void flash_prefetch_disable(void); void flash_set_ws(uint32_t ws); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/gpio.h ================================================ /** @defgroup gpio_defines GPIO Defines @brief Defined Constants and Types for the STM32L1xx General Purpose I/O @ingroup STM32L1xx_defines @version 1.0.0 @date 1 July 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Piotr Esden-Tempski * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_GPIO_H #define LIBOPENCM3_GPIO_H #include #include /* --- Convenience macros -------------------------------------------------- */ /* GPIO port base addresses (for convenience) */ /* GPIO port base addresses (for convenience) */ /** @defgroup gpio_port_id GPIO Port IDs @ingroup gpio_defines @{*/ #define GPIOA GPIO_PORT_A_BASE #define GPIOB GPIO_PORT_B_BASE #define GPIOC GPIO_PORT_C_BASE #define GPIOD GPIO_PORT_D_BASE #define GPIOE GPIO_PORT_E_BASE #define GPIOH GPIO_PORT_H_BASE /**@}*/ /* --- GPIO registers ------------------------------------------------------ */ /* Port mode register (GPIOx_MODER) */ #define GPIO_MODER(port) MMIO32(port + 0x00) #define GPIOA_MODER GPIO_MODER(GPIOA) #define GPIOB_MODER GPIO_MODER(GPIOB) #define GPIOC_MODER GPIO_MODER(GPIOC) #define GPIOD_MODER GPIO_MODER(GPIOD) #define GPIOE_MODER GPIO_MODER(GPIOE) #define GPIOH_MODER GPIO_MODER(GPIOH) /* Port output type register (GPIOx_OTYPER) */ #define GPIO_OTYPER(port) MMIO32(port + 0x04) #define GPIOA_OTYPER GPIO_OTYPER(GPIOA) #define GPIOB_OTYPER GPIO_OTYPER(GPIOB) #define GPIOC_OTYPER GPIO_OTYPER(GPIOC) #define GPIOD_OTYPER GPIO_OTYPER(GPIOD) #define GPIOE_OTYPER GPIO_OTYPER(GPIOE) #define GPIOH_OTYPER GPIO_OTYPER(GPIOH) /* Port output speed register (GPIOx_OSPEEDR) */ #define GPIO_OSPEEDR(port) MMIO32(port + 0x08) #define GPIOA_OSPEEDR GPIO_OSPEEDR(GPIOA) #define GPIOB_OSPEEDR GPIO_OSPEEDR(GPIOB) #define GPIOC_OSPEEDR GPIO_OSPEEDR(GPIOC) #define GPIOD_OSPEEDR GPIO_OSPEEDR(GPIOD) #define GPIOE_OSPEEDR GPIO_OSPEEDR(GPIOE) #define GPIOH_OSPEEDR GPIO_OSPEEDR(GPIOH) /* Port pull-up/pull-down register (GPIOx_PUPDR) */ #define GPIO_PUPDR(port) MMIO32(port + 0x0c) #define GPIOA_PUPDR GPIO_PUPDR(GPIOA) #define GPIOB_PUPDR GPIO_PUPDR(GPIOB) #define GPIOC_PUPDR GPIO_PUPDR(GPIOC) #define GPIOD_PUPDR GPIO_PUPDR(GPIOD) #define GPIOE_PUPDR GPIO_PUPDR(GPIOE) #define GPIOH_PUPDR GPIO_PUPDR(GPIOH) /* Port input data register (GPIOx_IDR) */ #define GPIO_IDR(port) MMIO32(port + 0x10) #define GPIOA_IDR GPIO_IDR(GPIOA) #define GPIOB_IDR GPIO_IDR(GPIOB) #define GPIOC_IDR GPIO_IDR(GPIOC) #define GPIOD_IDR GPIO_IDR(GPIOD) #define GPIOE_IDR GPIO_IDR(GPIOE) #define GPIOH_IDR GPIO_IDR(GPIOH) /* Port output data register (GPIOx_ODR) */ #define GPIO_ODR(port) MMIO32(port + 0x14) #define GPIOA_ODR GPIO_ODR(GPIOA) #define GPIOB_ODR GPIO_ODR(GPIOB) #define GPIOC_ODR GPIO_ODR(GPIOC) #define GPIOD_ODR GPIO_ODR(GPIOD) #define GPIOE_ODR GPIO_ODR(GPIOE) #define GPIOH_ODR GPIO_ODR(GPIOH) /* Port bit set/reset register (GPIOx_BSRR) */ #define GPIO_BSRR(port) MMIO32(port + 0x18) #define GPIOA_BSRR GPIO_BSRR(GPIOA) #define GPIOB_BSRR GPIO_BSRR(GPIOB) #define GPIOC_BSRR GPIO_BSRR(GPIOC) #define GPIOD_BSRR GPIO_BSRR(GPIOD) #define GPIOE_BSRR GPIO_BSRR(GPIOE) #define GPIOH_BSRR GPIO_BSRR(GPIOH) /* Port configuration lock register (GPIOx_LCKR) */ #define GPIO_LCKR(port) MMIO32(port + 0x1C) #define GPIOA_LCKR GPIO_LCKR(GPIOA) #define GPIOB_LCKR GPIO_LCKR(GPIOB) #define GPIOC_LCKR GPIO_LCKR(GPIOC) #define GPIOD_LCKR GPIO_LCKR(GPIOD) #define GPIOE_LCKR GPIO_LCKR(GPIOE) #define GPIOH_LCKR GPIO_LCKR(GPIOH) /* Alternate function low register (GPIOx_AFRL) */ #define GPIO_AFRL(port) MMIO32(port + 0x20) #define GPIOA_AFRL GPIO_AFRL(GPIOA) #define GPIOB_AFRL GPIO_AFRL(GPIOB) #define GPIOC_AFRL GPIO_AFRL(GPIOC) #define GPIOD_AFRL GPIO_AFRL(GPIOD) #define GPIOE_AFRL GPIO_AFRL(GPIOE) #define GPIOH_AFRL GPIO_AFRL(GPIOH) /* Alternate function high register (GPIOx_AFRH) */ #define GPIO_AFRH(port) MMIO32(port + 0x24) #define GPIOA_AFRH GPIO_AFRH(GPIOA) #define GPIOB_AFRH GPIO_AFRH(GPIOB) #define GPIOC_AFRH GPIO_AFRH(GPIOC) #define GPIOD_AFRH GPIO_AFRH(GPIOD) #define GPIOE_AFRH GPIO_AFRH(GPIOE) #define GPIOH_AFRH GPIO_AFRH(GPIOH) /* --- GPIOx_MODER values-------------------------------------------- */ #define GPIO_MODE(n, mode) (mode << (2 * (n))) #define GPIO_MODE_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_mode GPIO Pin Direction and Analog/Digital Mode @ingroup gpio_defines @{*/ #define GPIO_MODE_INPUT 0x00 /* Default */ #define GPIO_MODE_OUTPUT 0x01 #define GPIO_MODE_AF 0x02 #define GPIO_MODE_ANALOG 0x03 /**@}*/ /* --- GPIOx_OTYPER values -------------------------------------------- */ /* Output type (OTx values) */ /** @defgroup gpio_output_type GPIO Output Pin Driver Type @ingroup gpio_defines @list Push Pull @list Open Drain @{*/ #define GPIO_OTYPE_PP 0x0 #define GPIO_OTYPE_OD 0x1 /**@}*/ /* Output speed values */ #define GPIO_OSPEED(n, speed) (speed << (2 * (n))) #define GPIO_OSPEED_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_speed GPIO Output Pin Speed @ingroup gpio_defines @{*/ #define GPIO_OSPEED_400KHZ 0x0 #define GPIO_OSPEED_2MHZ 0x1 #define GPIO_OSPEED_10MHZ 0x2 #define GPIO_OSPEED_40MHZ 0x3 /**@}*/ /* --- GPIOx_PUPDR values ------------------------------------------- */ #define GPIO_PUPD(n, pupd) (pupd << (2 * (n))) #define GPIO_PUPD_MASK(n) (0x3 << (2 * (n))) /** @defgroup gpio_pup GPIO Output Pin Pullup @ingroup gpio_defines @{*/ #define GPIO_PUPD_NONE 0x0 #define GPIO_PUPD_PULLUP 0x1 #define GPIO_PUPD_PULLDOWN 0x2 /**@}*/ /* --- GPIO_IDR values ----------------------------------------------------- */ /* GPIO_IDR[15:0]: IDRy[15:0]: Port input data (y = 0..15) */ /* --- GPIO_ODR values ----------------------------------------------------- */ /* GPIO_ODR[15:0]: ODRy[15:0]: Port output data (y = 0..15) */ /* --- GPIO_BSRR values ---------------------------------------------------- */ /* GPIO_BSRR[31:16]: BRy: Port x reset bit y (y = 0..15) */ /* GPIO_BSRR[15:0]: BSy: Port x set bit y (y = 0..15) */ /* --- GPIO_LCKR values ---------------------------------------------------- */ #define GPIO_LCKK (1 << 16) /* GPIO_LCKR[15:0]: LCKy: Port x lock bit y (y = 0..15) */ /* --- GPIOx_AFRL/H values ------------------------------------------------- */ /* Note: AFRL is used for bits 0..7, AFRH is used for 8..15 */ /* See datasheet table 5, page 35 for the definitions */ #define GPIO_AFR(n, af) (af << ((n) * 4)) #define GPIO_AFR_MASK(n) (0xf << ((n) * 4)) /** @defgroup gpio_af_num Alternate Function Pin Selection @ingroup gpio_defines @{*/ #define GPIO_AF0 0x0 #define GPIO_AF1 0x1 #define GPIO_AF2 0x2 #define GPIO_AF3 0x3 #define GPIO_AF4 0x4 #define GPIO_AF5 0x5 #define GPIO_AF6 0x6 #define GPIO_AF7 0x7 #define GPIO_AF8 0x8 #define GPIO_AF9 0x9 #define GPIO_AF10 0xa #define GPIO_AF11 0xb #define GPIO_AF12 0xc #define GPIO_AF13 0xd #define GPIO_AF14 0xe #define GPIO_AF15 0xf /**@}*/ /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS /* * L1, like F2 and F4, has the "new" GPIO peripheral, so use that style * however the number of ports is reduced and H port naming is different. * TODO: this should all really be moved to a "common" gpio header */ void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down, uint16_t gpios); void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t speed, uint16_t gpios); void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/i2c.h ================================================ /** @defgroup i2c_defines I2C Defines @brief Defined Constants and Types for the STM32L1xx I2C @ingroup STM32L1xx_defines @version 1.0.0 @date 12 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_I2C_H #define LIBOPENCM3_I2C_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/irq.yaml ================================================ includeguard: LIBOPENCM3_STM32_L1_NVIC_H partname_humanreadable: STM32 L1 series partname_doxygen: STM32L1 irqs: - wwdg - pvd - tamper_stamp - rtc_wkup - flash - rcc - exti0 - exti1 - exti2 - exti3 - exti4 - dma1_channel1 - dma1_channel2 - dma1_channel3 - dma1_channel4 - dma1_channel5 - dma1_channel6 - dma1_channel7 - adc1 - usb_hp - usb_lp - dac - comp - exti9_5 - lcd - tim9 - tim10 - tim11 - tim2 - tim3 - tim4 - i2c1_ev - i2c1_er - i2c2_ev - i2c2_er - spi1 - spi2 - usart1 - usart2 - usart3 - exti15_10 - rtc_alarm - usb_fs_wakeup - tim6 - tim7 # below here is medium+/high density - sdio - tim5 - spi3 - uart4 - uart5 - dma2_ch1 - dma2_ch2 - dma2_ch3 - dma2_ch4 - dma2_ch5 - aes - comp_acq ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/iwdg.h ================================================ /** @defgroup iwdg_defines IWDG Defines @brief Defined Constants and Types for the STM32L1xx Independent Watchdog Timer @ingroup STM32L1xx_defines @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_IWDG_H #define LIBOPENCM3_IWDG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_H #define LIBOPENCM3_MEMORYMAP_H #include /* --- STM32 specific peripheral definitions ------------------------------- */ /* Memory map for all busses */ #define PERIPH_BASE ((uint32_t)0x40000000) #define INFO_BASE ((uint32_t)0x1ff00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_AHB (PERIPH_BASE + 0x20000) /* Register boundary addresses */ /* APB1 */ #define TIM2_BASE (PERIPH_BASE_APB1 + 0x0000) #define TIM3_BASE (PERIPH_BASE_APB1 + 0x0400) #define TIM4_BASE (PERIPH_BASE_APB1 + 0x0800) #define TIM5_BASE (PERIPH_BASE_APB1 + 0x0c00) #define TIM6_BASE (PERIPH_BASE_APB1 + 0x1000) #define TIM7_BASE (PERIPH_BASE_APB1 + 0x1400) #define LCD_BASE (PERIPH_BASE_APB1 + 0x2400) #define RTC_BASE (PERIPH_BASE_APB1 + 0x2800) #define WWDG_BASE (PERIPH_BASE_APB1 + 0x2c00) #define IWDG_BASE (PERIPH_BASE_APB1 + 0x3000) /* PERIPH_BASE_APB1 + 0x3400 (0x4000 3400 - 0x4000 37FF): Reserved */ #define SPI2_BASE (PERIPH_BASE_APB1 + 0x3800) #define SPI3_BASE (PERIPH_BASE_APB1 + 0x3c00) /* PERIPH_BASE_APB1 + 0x4000 (0x4000 4000 - 0x4000 3FFF): Reserved */ #define USART2_BASE (PERIPH_BASE_APB1 + 0x4400) #define USART3_BASE (PERIPH_BASE_APB1 + 0x4800) #define USART4_BASE (PERIPH_BASE_APB1 + 0x4c00) #define USART5_BASE (PERIPH_BASE_APB1 + 0x5000) #define I2C1_BASE (PERIPH_BASE_APB1 + 0x5400) #define I2C2_BASE (PERIPH_BASE_APB1 + 0x5800) #define USB_DEV_FS_BASE (PERIPH_BASE_APB1 + 0x5c00) #define USB_SRAM_BASE (PERIPH_BASE_APB1 + 0x6000) /* gap */ #define POWER_CONTROL_BASE (PERIPH_BASE_APB1 + 0x7000) #define DAC_BASE (PERIPH_BASE_APB1 + 0x7400) #define OPAMP_BASE (PERIPH_BASE_APB1 + 0x7c5c) #define COMP_BASE (PERIPH_BASE_APB1 + 0x7c00) #define ROUTING_BASE (PERIPH_BASE_APB1 + 0x7c04) /* APB2 */ #define SYSCFG_BASE (PERIPH_BASE_APB2 + 0x0000) #define EXTI_BASE (PERIPH_BASE_APB2 + 0x0400) #define TIM9_BASE (PERIPH_BASE_APB2 + 0x0800) #define TIM10_BASE (PERIPH_BASE_APB2 + 0x0c00) #define TIM11_BASE (PERIPH_BASE_APB2 + 0x1000) /* gap */ #define ADC_BASE (PERIPH_BASE_APB2 + 0x2400) /* gap */ #define SDIO_BASE (PERIPH_BASE_APB2 + 0x2c00) #define SPI1_BASE (PERIPH_BASE_APB2 + 0x3000) /* gap */ #define USART1_BASE (PERIPH_BASE_APB2 + 0x3800) /* AHB */ #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB + 0x00000) #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB + 0x00400) #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB + 0x00800) #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB + 0x00c00) #define GPIO_PORT_E_BASE (PERIPH_BASE_AHB + 0x01000) #define GPIO_PORT_H_BASE (PERIPH_BASE_AHB + 0x01400) #define GPIO_PORT_F_BASE (PERIPH_BASE_AHB + 0x01800) #define GPIO_PORT_G_BASE (PERIPH_BASE_AHB + 0x01c00) /* gap */ #define CRC_BASE (PERIPH_BASE_AHB + 0x03000) /* gap */ #define RCC_BASE (PERIPH_BASE_AHB + 0x03800) #define FLASH_MEM_INTERFACE_BASE (PERIPH_BASE_AHB + 0x03c00) /* gap */ #define DMA1_BASE (PERIPH_BASE_AHB + 0x06000) #define DMA2_BASE (PERIPH_BASE_AHB + 0x04000) /* PPIB */ #define DBGMCU_BASE (PPBI_BASE + 0x00042000) /* FSMC */ #define FSMC_BASE (PERIPH_BASE + 0x60000000) /* AES */ #define AES_BASE (PERIPH_BASE + 0x10000000) /* Device Electronic Signature */ #define DESIG_FLASH_SIZE_BASE (INFO_BASE + 0x8004C) #define DESIG_UNIQUE_ID_BASE (INFO_BASE + 0x80050) /* Make the map names match those for other families to allow commonality */ #define SPI1_I2S_BASE SPI1_BASE #define SPI2_I2S_BASE SPI2_BASE #define SPI3_I2S_BASE SPI3_BASE #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/pwr.h ================================================ /** @defgroup pwr_defines PWR Defines @brief Defined Constants and Types for the STM32L1xx Power Control @ingroup STM32L1xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Stephen Caudle @author @htmlonly © @endhtmlonly 2012 Karl Palsson @date 1 July 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_PWR_H #define LIBOPENCM3_PWR_H #include #include /* * This file extends the common STM32 version with definitions only * applicable to the STM32L1 series of devices. */ /* --- PWR_CR values ------------------------------------------------------- */ /* Bits [31:15]: Reserved */ /* LPRUN: Low power run mode */ #define PWR_CR_LPRUN (1 << 14) /* VOS[12:11]: Regulator voltage scaling output selection */ #define PWR_CR_VOS_LSB 11 /** @defgroup pwr_vos Voltage Scaling Output level selection @ingroup pwr_defines @{*/ #define PWR_CR_VOS_RANGE1 (0x1 << PWR_CR_VOS_LSB) #define PWR_CR_VOS_RANGE2 (0x2 << PWR_CR_VOS_LSB) #define PWR_CR_VOS_RANGE3 (0x3 << PWR_CR_VOS_LSB) /**@}*/ #define PWR_CR_VOS_MASK (0x3 << PWR_CR_VOS_LSB) /* FWU: Fast wakeup */ #define PWR_CR_FWU (1 << 10) /* ULP: Ultralow power mode */ #define PWR_CR_ULP (1 << 9) /* LPSDSR: Low-power deepsleep/sleep/low power run */ #define PWR_CR_LPSDSR (1 << 0) /* masks common PWR_CR_LPDS */ /* --- PWR_CSR values ------------------------------------------------------- */ /* Bits [31:11]: Reserved */ /* EWUP3: Enable WKUP3 pin */ #define PWR_CSR_EWUP3 (1 << 10) /* EWUP2: Enable WKUP2 pin */ #define PWR_CSR_EWUP2 (1 << 9) /* EWUP1: Enable WKUP1 pin */ #define PWR_CSR_EWUP1 PWR_CSR_EWUP /* REGLPF : Regulator LP flag */ #define PWR_CSR_REGLPF (1 << 5) /* VOSF: Voltage Scaling select flag */ #define PWR_CSR_VOSF (1 << 4) /* VREFINTRDYF: Internal voltage reference (VREFINT) ready flag */ #define PWR_CSR_VREFINTRDYF (1 << 3) /* --- Function prototypes ------------------------------------------------- */ typedef enum { RANGE1, RANGE2, RANGE3, } vos_scale_t; BEGIN_DECLS void pwr_set_vos_scale(vos_scale_t scale); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/rcc.h ================================================ /** @defgroup STM32L1xx_rcc_defines RCC Defines @ingroup STM32L1xx_defines @brief libopencm3 STM32L1xx Reset and Clock Control @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Federico Ruiz-Ugalde \ @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2012 Karl Palsson @date 11 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Originally based on the F1 code, as it seemed most similar to the L1 * TODO: very incomplete still! */ /**@{*/ #ifndef LIBOPENCM3_RCC_H #define LIBOPENCM3_RCC_H #include #include #include /* --- RCC registers ------------------------------------------------------- */ #define RCC_CR MMIO32(RCC_BASE + 0x00) #define RCC_ICSCR MMIO32(RCC_BASE + 0x04) #define RCC_CFGR MMIO32(RCC_BASE + 0x08) #define RCC_CIR MMIO32(RCC_BASE + 0x0c) #define RCC_AHBRSTR MMIO32(RCC_BASE + 0x10) #define RCC_APB2RSTR MMIO32(RCC_BASE + 0x14) #define RCC_APB1RSTR MMIO32(RCC_BASE + 0x18) #define RCC_AHBENR MMIO32(RCC_BASE + 0x1c) #define RCC_APB2ENR MMIO32(RCC_BASE + 0x20) #define RCC_APB1ENR MMIO32(RCC_BASE + 0x24) #define RCC_AHBLPENR MMIO32(RCC_BASE + 0x28) #define RCC_APB2LPENR MMIO32(RCC_BASE + 0x2c) #define RCC_APB1LPENR MMIO32(RCC_BASE + 0x30) #define RCC_CSR MMIO32(RCC_BASE + 0x34) /* --- RCC_CR values ------------------------------------------------------- */ /* RTCPRE[1:0] at 30:29 */ #define RCC_CR_CSSON (1 << 28) #define RCC_CR_PLLRDY (1 << 25) #define RCC_CR_PLLON (1 << 24) #define RCC_CR_HSEBYP (1 << 18) #define RCC_CR_HSERDY (1 << 17) #define RCC_CR_HSEON (1 << 16) #define RCC_CR_MSIRDY (1 << 9) #define RCC_CR_MSION (1 << 8) #define RCC_CR_HSIRDY (1 << 1) #define RCC_CR_HSION (1 << 0) #define RCC_CR_RTCPRE_DIV2 0 #define RCC_CR_RTCPRE_DIV4 1 #define RCC_CR_RTCPRE_DIV8 2 #define RCC_CR_RTCPRE_DIV16 3 #define RCC_CR_RTCPRE_SHIFT 29 #define RCC_CR_RTCPRE_MASK 0x3 /* --- RCC_ICSCR values ---------------------------------------------------- */ #define RCC_ICSCR_MSITRIM_SHIFT 24 #define RCC_ICSCR_MSITRIM_MASK 0xff #define RCC_ICSCR_MSICAL_SHIFT 16 #define RCC_ICSCR_MSICAL_MASK 0xff #define RCC_ICSCR_MSIRANGE_SHIFT 13 #define RCC_ICSCR_MSIRANGE_MASK 0x7 #define RCC_ICSCR_MSIRANGE_65KHZ 0x0 #define RCC_ICSCR_MSIRANGE_131KHZ 0x1 #define RCC_ICSCR_MSIRANGE_262KHZ 0x2 #define RCC_ICSCR_MSIRANGE_524KHZ 0x3 #define RCC_ICSCR_MSIRANGE_1MHZ 0x4 #define RCC_ICSCR_MSIRANGE_2MHZ 0x5 #define RCC_ICSCR_MSIRANGE_4MHZ 0x6 #define RCC_ICSCR_HSITRIM_SHIFT 8 #define RCC_ICSCR_HSITRIM_MASK 0x1f #define RCC_ICSCR_HSICAL_SHIFT 0 #define RCC_ICSCR_HSICAL_MASK 0xff /* --- RCC_CFGR values ----------------------------------------------------- */ /* MCOPRE */ #define RCC_CFGR_MCOPRE_DIV1 0 #define RCC_CFGR_MCOPRE_DIV2 1 #define RCC_CFGR_MCOPRE_DIV4 2 #define RCC_CFGR_MCOPRE_DIV8 3 #define RCC_CFGR_MCOPRE_DIV16 4 /* MCO: Microcontroller clock output */ #define RCC_CFGR_MCO_NOCLK 0x0 #define RCC_CFGR_MCO_SYSCLK 0x1 #define RCC_CFGR_MCO_HSICLK 0x2 #define RCC_CFGR_MCO_MSICLK 0x3 #define RCC_CFGR_MCO_HSECLK 0x4 #define RCC_CFGR_MCO_PLLCLK 0x5 #define RCC_CFGR_MCO_LSICLK 0x6 #define RCC_CFGR_MCO_LSECLK 0x7 /* PLL Output division selection */ #define RCC_CFGR_PLLDIV_DIV2 0x1 #define RCC_CFGR_PLLDIV_DIV3 0x2 #define RCC_CFGR_PLLDIV_DIV4 0x3 #define RCC_CFGR_PLLDIV_SHIFT 22 #define RCC_CFGR_PLLDIV_MASK 0x3 /* PLLMUL: PLL multiplication factor */ #define RCC_CFGR_PLLMUL_MUL3 0x0 #define RCC_CFGR_PLLMUL_MUL4 0x1 #define RCC_CFGR_PLLMUL_MUL6 0x2 #define RCC_CFGR_PLLMUL_MUL8 0x3 #define RCC_CFGR_PLLMUL_MUL12 0x4 #define RCC_CFGR_PLLMUL_MUL16 0x5 #define RCC_CFGR_PLLMUL_MUL24 0x6 #define RCC_CFGR_PLLMUL_MUL32 0x7 #define RCC_CFGR_PLLMUL_MUL48 0x8 #define RCC_CFGR_PLLMUL_SHIFT 18 #define RCC_CFGR_PLLMUL_MASK 0xf /* PLLSRC: PLL entry clock source */ #define RCC_CFGR_PLLSRC_HSI_CLK 0x0 #define RCC_CFGR_PLLSRC_HSE_CLK 0x1 /* PPRE2: APB high-speed prescaler (APB2) */ #define RCC_CFGR_PPRE2_HCLK_NODIV 0x0 #define RCC_CFGR_PPRE2_HCLK_DIV2 0x4 #define RCC_CFGR_PPRE2_HCLK_DIV4 0x5 #define RCC_CFGR_PPRE2_HCLK_DIV8 0x6 #define RCC_CFGR_PPRE2_HCLK_DIV16 0x7 /* PPRE1: APB low-speed prescaler (APB1) */ #define RCC_CFGR_PPRE1_HCLK_NODIV 0x0 #define RCC_CFGR_PPRE1_HCLK_DIV2 0x4 #define RCC_CFGR_PPRE1_HCLK_DIV4 0x5 #define RCC_CFGR_PPRE1_HCLK_DIV8 0x6 #define RCC_CFGR_PPRE1_HCLK_DIV16 0x7 /* HPRE: AHB prescaler */ #define RCC_CFGR_HPRE_SYSCLK_NODIV 0x0 #define RCC_CFGR_HPRE_SYSCLK_DIV2 0x8 #define RCC_CFGR_HPRE_SYSCLK_DIV4 0x9 #define RCC_CFGR_HPRE_SYSCLK_DIV8 0xa #define RCC_CFGR_HPRE_SYSCLK_DIV16 0xb #define RCC_CFGR_HPRE_SYSCLK_DIV64 0xc #define RCC_CFGR_HPRE_SYSCLK_DIV128 0xd #define RCC_CFGR_HPRE_SYSCLK_DIV256 0xe #define RCC_CFGR_HPRE_SYSCLK_DIV512 0xf /* SWS: System clock switch status */ #define RCC_CFGR_SWS_SYSCLKSEL_MSICLK 0x0 #define RCC_CFGR_SWS_SYSCLKSEL_HSICLK 0x1 #define RCC_CFGR_SWS_SYSCLKSEL_HSECLK 0x2 #define RCC_CFGR_SWS_SYSCLKSEL_PLLCLK 0x3 /* SW: System clock switch */ #define RCC_CFGR_SW_SYSCLKSEL_MSICLK 0x0 #define RCC_CFGR_SW_SYSCLKSEL_HSICLK 0x1 #define RCC_CFGR_SW_SYSCLKSEL_HSECLK 0x2 #define RCC_CFGR_SW_SYSCLKSEL_PLLCLK 0x3 /* --- RCC_CIR values ------------------------------------------------------ */ /* Clock security system interrupt clear bit */ #define RCC_CIR_CSSC (1 << 23) /* OSC ready interrupt clear bits */ #define RCC_CIR_MSIRDYC (1 << 21) #define RCC_CIR_PLLRDYC (1 << 20) #define RCC_CIR_HSERDYC (1 << 19) #define RCC_CIR_HSIRDYC (1 << 18) #define RCC_CIR_LSERDYC (1 << 17) #define RCC_CIR_LSIRDYC (1 << 16) /* OSC ready interrupt enable bits */ #define RCC_CIR_MSIRDYIE (1 << 13) #define RCC_CIR_PLLRDYIE (1 << 12) #define RCC_CIR_HSERDYIE (1 << 11) #define RCC_CIR_HSIRDYIE (1 << 10) #define RCC_CIR_LSERDYIE (1 << 9) #define RCC_CIR_LSIRDYIE (1 << 8) /* Clock security system interrupt flag bit */ #define RCC_CIR_CSSF (1 << 7) /* OSC ready interrupt flag bits */ #define RCC_CIR_MSIRDYF (1 << 5) /* (**) */ #define RCC_CIR_PLLRDYF (1 << 4) #define RCC_CIR_HSERDYF (1 << 3) #define RCC_CIR_HSIRDYF (1 << 2) #define RCC_CIR_LSERDYF (1 << 1) #define RCC_CIR_LSIRDYF (1 << 0) /* --- RCC_AHBRSTR values ------------------------------------------------- */ #define RCC_AHBRSTR_DMA1RST (1 << 24) #define RCC_AHBRSTR_FLITFRST (1 << 15) #define RCC_AHBRSTR_CRCRST (1 << 12) #define RCC_AHBRSTR_GPIOHRST (1 << 5) #define RCC_AHBRSTR_GPIOERST (1 << 4) #define RCC_AHBRSTR_GPIODRST (1 << 3) #define RCC_AHBRSTR_GPIOCRST (1 << 2) #define RCC_AHBRSTR_GPIOBRST (1 << 1) #define RCC_AHBRSTR_GPIOARST (1 << 0) /* --- RCC_APB2RSTR values ------------------------------------------------- */ #define RCC_APB2RSTR_USART1RST (1 << 14) #define RCC_APB2RSTR_SPI1RST (1 << 12) #define RCC_APB2RSTR_ADC1RST (1 << 9) #define RCC_APB2RSTR_TIM11RST (1 << 4) #define RCC_APB2RSTR_TIM10RST (1 << 3) #define RCC_APB2RSTR_TIM9RST (1 << 2) #define RCC_APB2RSTR_SYSCFGRST (1 << 0) /* --- RCC_APB1RSTR values ------------------------------------------------- */ #define RCC_APB1RSTR_COMPRST (1 << 31) #define RCC_APB1RSTR_DACRST (1 << 29) #define RCC_APB1RSTR_PWRRST (1 << 28) #define RCC_APB1RSTR_USBRST (1 << 23) #define RCC_APB1RSTR_I2C2RST (1 << 22) #define RCC_APB1RSTR_I2C1RST (1 << 21) #define RCC_APB1RSTR_USART3RST (1 << 18) #define RCC_APB1RSTR_USART2RST (1 << 17) #define RCC_APB1RSTR_SPI2RST (1 << 14) #define RCC_APB1RSTR_WWDGRST (1 << 11) #define RCC_APB1RSTR_LCDRST (1 << 9) #define RCC_APB1RSTR_TIM7RST (1 << 5) #define RCC_APB1RSTR_TIM6RST (1 << 4) #define RCC_APB1RSTR_TIM5RST (1 << 3) #define RCC_APB1RSTR_TIM4RST (1 << 2) #define RCC_APB1RSTR_TIM3RST (1 << 1) #define RCC_APB1RSTR_TIM2RST (1 << 0) /* --- RCC_AHBENR values --------------------------------------------------- */ /** @defgroup rcc_ahbenr_en RCC_AHBENR enable values @ingroup STM32L1xx_rcc_defines @{*/ #define RCC_AHBENR_DMA1EN (1 << 24) #define RCC_AHBENR_FLITFEN (1 << 15) #define RCC_AHBENR_CRCEN (1 << 12) #define RCC_AHBENR_GPIOHEN (1 << 5) #define RCC_AHBENR_GPIOEEN (1 << 4) #define RCC_AHBENR_GPIODEN (1 << 3) #define RCC_AHBENR_GPIOCEN (1 << 2) #define RCC_AHBENR_GPIOBEN (1 << 1) #define RCC_AHBENR_GPIOAEN (1 << 0) /*@}*/ /* --- RCC_APB2ENR values -------------------------------------------------- */ /** @defgroup rcc_apb2enr_en RCC_APB2ENR enable values @ingroup STM32L1xx_rcc_defines @{*/ #define RCC_APB2ENR_USART1EN (1 << 14) #define RCC_APB2ENR_SPI1EN (1 << 12) #define RCC_APB2ENR_ADC1EN (1 << 9) #define RCC_APB2ENR_TIM11EN (1 << 4) #define RCC_APB2ENR_TIM10EN (1 << 3) #define RCC_APB2ENR_TIM9EN (1 << 2) #define RCC_APB2ENR_SYSCFGEN (1 << 0) /*@}*/ /* --- RCC_APB1ENR values -------------------------------------------------- */ /** @defgroup rcc_apb1enr_en RCC_APB1ENR enable values @ingroup STM32L1xx_rcc_defines @{*/ #define RCC_APB1ENR_COMPEN (1 << 31) #define RCC_APB1ENR_DACEN (1 << 29) #define RCC_APB1ENR_PWREN (1 << 28) #define RCC_APB1ENR_USBEN (1 << 23) #define RCC_APB1ENR_I2C2EN (1 << 22) #define RCC_APB1ENR_I2C1EN (1 << 21) #define RCC_APB1ENR_USART3EN (1 << 18) #define RCC_APB1ENR_USART2EN (1 << 17) #define RCC_APB1ENR_SPI2EN (1 << 14) #define RCC_APB1ENR_WWDGEN (1 << 11) #define RCC_APB1ENR_LCDEN (1 << 9) #define RCC_APB1ENR_TIM7EN (1 << 5) #define RCC_APB1ENR_TIM6EN (1 << 4) #define RCC_APB1ENR_TIM4EN (1 << 2) #define RCC_APB1ENR_TIM3EN (1 << 1) #define RCC_APB1ENR_TIM2EN (1 << 0) /*@}*/ /* --- RCC_AHBLPENR -------------------------------------------------------- */ #define RCC_AHBLPENR_DMA1LPEN (1 << 24) #define RCC_AHBLPENR_SRAMLPEN (1 << 16) #define RCC_AHBLPENR_FLITFLPEN (1 << 15) #define RCC_AHBLPENR_CRCLPEN (1 << 12) #define RCC_AHBLPENR_GPIOHLPEN (1 << 5) #define RCC_AHBLPENR_GPIOELPEN (1 << 4) #define RCC_AHBLPENR_GPIODLPEN (1 << 3) #define RCC_AHBLPENR_GPIOCLPEN (1 << 2) #define RCC_AHBLPENR_GPIOBLPEN (1 << 1) #define RCC_AHBLPENR_GPIOALPEN (1 << 0) #define RCC_APB2LPENR_USART1LPEN (1 << 14) #define RCC_APB2LPENR_SPI1LPEN (1 << 12) #define RCC_APB2LPENR_ADC1LPEN (1 << 9) #define RCC_APB2LPENR_TIM11LPEN (1 << 4) #define RCC_APB2LPENR_TIM10LPEN (1 << 3) #define RCC_APB2LPENR_TIM9LPEN (1 << 2) #define RCC_APB2LPENR_SYSCFGLPEN (1 << 0) #define RCC_APB1LPENR_COMPLPEN (1 << 31) #define RCC_APB1LPENR_DACLPEN (1 << 29) #define RCC_APB1LPENR_PWRLPEN (1 << 28) #define RCC_APB1LPENR_USBLPEN (1 << 23) #define RCC_APB1LPENR_I2C2LPEN (1 << 22) #define RCC_APB1LPENR_I2C1LPEN (1 << 21) #define RCC_APB1LPENR_USART3LPEN (1 << 18) #define RCC_APB1LPENR_USART2LPEN (1 << 17) #define RCC_APB1LPENR_SPI2LPEN (1 << 14) #define RCC_APB1LPENR_WWDGLPEN (1 << 11) #define RCC_APB1LPENR_LCDLPEN (1 << 9) #define RCC_APB1LPENR_TIM7LPEN (1 << 5) #define RCC_APB1LPENR_TIM6LPEN (1 << 4) #define RCC_APB1LPENR_TIM4LPEN (1 << 2) #define RCC_APB1LPENR_TIM3LPEN (1 << 1) #define RCC_APB1LPENR_TIM2LPEN (1 << 0) /* --- RCC_CSR values ------------------------------------------------------ */ #define RCC_CSR_LPWRRSTF (1 << 31) #define RCC_CSR_WWDGRSTF (1 << 30) #define RCC_CSR_IWDGRSTF (1 << 29) #define RCC_CSR_SFTRSTF (1 << 28) #define RCC_CSR_PORRSTF (1 << 27) #define RCC_CSR_PINRSTF (1 << 26) #define RCC_CSR_OBLRSTF (1 << 25) #define RCC_CSR_RMVF (1 << 24) #define RCC_CSR_RTCRST (1 << 23) #define RCC_CSR_RTCEN (1 << 22) #define RCC_CSR_RTCSEL_SHIFT (16) #define RCC_CSR_RTCSEL_MASK (0x3) #define RCC_CSR_RTCSEL_NONE (0x0) #define RCC_CSR_RTCSEL_LSE (0x1) #define RCC_CSR_RTCSEL_LSI (0x2) #define RCC_CSR_RTCSEL_HSI (0x3) #define RCC_CSR_LSECSSD (1 << 12) #define RCC_CSR_LSECSSON (1 << 11) #define RCC_CSR_LSEBYP (1 << 10) #define RCC_CSR_LSERDY (1 << 9) #define RCC_CSR_LSEON (1 << 8) #define RCC_CSR_LSIRDY (1 << 1) #define RCC_CSR_LSION (1 << 0) typedef struct { uint8_t pll_mul; uint16_t pll_div; uint8_t pll_source; uint32_t flash_config; uint8_t hpre; uint8_t ppre1; uint8_t ppre2; vos_scale_t voltage_scale; uint32_t apb1_frequency; uint32_t apb2_frequency; uint8_t msi_range; } clock_scale_t; typedef enum { CLOCK_VRANGE1_HSI_PLL_24MHZ, CLOCK_VRANGE1_HSI_PLL_32MHZ, CLOCK_VRANGE1_HSI_RAW_16MHZ, CLOCK_VRANGE1_HSI_RAW_4MHZ, CLOCK_VRANGE1_MSI_RAW_4MHZ, CLOCK_VRANGE1_MSI_RAW_2MHZ, CLOCK_CONFIG_END } clock_config_entry_t; extern const clock_scale_t clock_config[CLOCK_CONFIG_END]; /* --- Variable definitions ------------------------------------------------ */ extern uint32_t rcc_ppre1_frequency; extern uint32_t rcc_ppre2_frequency; /* --- Function prototypes ------------------------------------------------- */ typedef enum { PLL, HSE, HSI, MSI, LSE, LSI } osc_t; BEGIN_DECLS void rcc_osc_ready_int_clear(osc_t osc); void rcc_osc_ready_int_enable(osc_t osc); void rcc_osc_ready_int_disable(osc_t osc); int rcc_osc_ready_int_flag(osc_t osc); void rcc_css_int_clear(void); int rcc_css_int_flag(void); void rcc_wait_for_osc_ready(osc_t osc); void rcc_wait_for_sysclk_status(osc_t osc); void rcc_osc_on(osc_t osc); void rcc_osc_off(osc_t osc); void rcc_css_enable(void); void rcc_css_disable(void); void rcc_osc_bypass_enable(osc_t osc); void rcc_osc_bypass_disable(osc_t osc); void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en); void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset); void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset); void rcc_set_sysclk_source(uint32_t clk); void rcc_set_pll_configuration(uint32_t source, uint32_t multiplier, uint32_t divisor); void rcc_set_pll_source(uint32_t pllsrc); void rcc_set_adcpre(uint32_t adcpre); void rcc_set_ppre2(uint32_t ppre2); void rcc_set_ppre1(uint32_t ppre1); void rcc_set_hpre(uint32_t hpre); void rcc_set_usbpre(uint32_t usbpre); void rcc_set_rtcpre(uint32_t rtcpre); uint32_t rcc_system_clock_source(void); void rcc_rtc_select_clock(uint32_t clock); void rcc_clock_setup_msi(const clock_scale_t *clock); void rcc_clock_setup_hsi(const clock_scale_t *clock); void rcc_clock_setup_pll(const clock_scale_t *clock); void rcc_backupdomain_reset(void); END_DECLS /**@}*/ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/rtc.h ================================================ /** @defgroup rtc_defines RTC Defines @brief Defined Constants and Types for the STM32L1xx RTC @ingroup STM32L1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_RTC_H #define LIBOPENCM3_RTC_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/spi.h ================================================ /** @defgroup spi_defines SPI Defines @brief Defined Constants and Types for the STM32L1xx SPI @ingroup STM32L1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SPI_H #define LIBOPENCM3_SPI_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/syscfg.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SYSCFG_H #define LIBOPENCM3_SYSCFG_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/timer.h ================================================ /** @defgroup timer_defines Timer Defines @brief libopencm3 Defined Constants and Types for the STM32L1xx Timers @ingroup STM32L1xx_defines @version 1.0.0 @date 8 March 2013 @author @htmlonly © @endhtmlonly 2011 Fergus Noble LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TIMER_H #define LIBOPENCM3_TIMER_H #include /* * TIM2 and TIM5 are now 32bit and the following registers are now 32-bit wide: * CNT, ARR, CCR1, CCR2, CCR3, CCR4 */ /* Timer 2/3 option register (TIMx_OR) */ #define TIM_OR(tim_base) MMIO32(tim_base + 0x50) #define TIM2_OR TIM_OR(TIM2) #define TIM3_OR TIM_OR(TIM3) /* --- TIMx_OR values ---------------------------------------------------- */ /* ITR1_RMP */ /****************************************************************************/ /** @defgroup tim2_opt_trigger_remap TIM2_OR Timer 2 Option Register Internal Trigger 1 Remap @ingroup timer_defines @{*/ /** Internal Trigger 1 remapped to timer 10 output compare */ #define TIM2_OR_ITR1_RMP_TIM10_OC (0x0 << 0) /** Internal Trigger 1 remapped to timer 5 TGO */ #define TIM2_OR_ITR1_RMP_TIM5_TGO (0x1 << 0) /**@}*/ #define TIM3_OR_ITR1_RMP_MASK (0x1 << 0) /* --- TIMx_OR values ---------------------------------------------------- */ /* ITR2_RMP */ /****************************************************************************/ /** @defgroup tim3_opt_trigger_remap TIM3_OR Timer 3 Option Register Internal Trigger 2 Remap @ingroup timer_defines @{*/ /** Internal Trigger 1 remapped to timer 11 output compare */ #define TIM3_OR_ITR2_RMP_TIM8_TRGOU (0x0 << 0) /** Internal Trigger 1 remapped to timer 5 TGO */ #define TIM3_OR_ITR2_RMP_PTP (0x1 << 0) /**@}*/ #define TIM3_OR_ITR2_RMP_MASK (0x1 << 0) /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void timer_set_option(uint32_t timer_peripheral, uint32_t option); END_DECLS #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/l1/usart.h ================================================ /** @defgroup usart_defines USART Defines @brief Defined Constants and Types for the STM32L1xx USART @ingroup STM32L1xx_defines @version 1.0.0 @date 5 December 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USART_H #define LIBOPENCM3_USART_H #include #include #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/memorymap.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_MEMORYMAP_COMMON_H #define LIBOPENCM3_MEMORYMAP_COMMON_H #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif #endif /* LIBOPENCM3_MEMORYMAP_COMMON_H */ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/otg_fs.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_OTG_FS_H #define LIBOPENCM3_OTG_FS_H #include #include /* Core Global Control and Status Registers */ #define OTG_FS_GOTGCTL MMIO32(USB_OTG_FS_BASE + 0x000) #define OTG_FS_GOTGINT MMIO32(USB_OTG_FS_BASE + 0x004) #define OTG_FS_GAHBCFG MMIO32(USB_OTG_FS_BASE + 0x008) #define OTG_FS_GUSBCFG MMIO32(USB_OTG_FS_BASE + 0x00C) #define OTG_FS_GRSTCTL MMIO32(USB_OTG_FS_BASE + 0x010) #define OTG_FS_GINTSTS MMIO32(USB_OTG_FS_BASE + 0x014) #define OTG_FS_GINTMSK MMIO32(USB_OTG_FS_BASE + 0x018) #define OTG_FS_GRXSTSR MMIO32(USB_OTG_FS_BASE + 0x01C) #define OTG_FS_GRXSTSP MMIO32(USB_OTG_FS_BASE + 0x020) #define OTG_FS_GRXFSIZ MMIO32(USB_OTG_FS_BASE + 0x024) #define OTG_FS_GNPTXFSIZ MMIO32(USB_OTG_FS_BASE + 0x028) #define OTG_FS_GNPTXSTS MMIO32(USB_OTG_FS_BASE + 0x02C) #define OTG_FS_GCCFG MMIO32(USB_OTG_FS_BASE + 0x038) #define OTG_FS_CID MMIO32(USB_OTG_FS_BASE + 0x03C) #define OTG_FS_HPTXFSIZ MMIO32(USB_OTG_FS_BASE + 0x100) #define OTG_FS_DIEPTXF(x) MMIO32(USB_OTG_FS_BASE + 0x104 \ + 4*(x-1)) /* Host-mode Control and Status Registers */ #define OTG_FS_HCFG MMIO32(USB_OTG_FS_BASE + 0x400) #define OTG_FS_HFIR MMIO32(USB_OTG_FS_BASE + 0x404) #define OTG_FS_HFNUM MMIO32(USB_OTG_FS_BASE + 0x408) #define OTG_FS_HPTXSTS MMIO32(USB_OTG_FS_BASE + 0x410) #define OTG_FS_HAINT MMIO32(USB_OTG_FS_BASE + 0x414) #define OTG_FS_HAINTMSK MMIO32(USB_OTG_FS_BASE + 0x418) #define OTG_FS_HPRT MMIO32(USB_OTG_FS_BASE + 0x440) #define OTG_FS_HCCHARx MMIO32(USB_OTG_FS_BASE + 0x500) #define OTG_FS_HCINTx MMIO32(USB_OTG_FS_BASE + 0x508) #define OTG_FS_HCINTMSKx MMIO32(USB_OTG_FS_BASE + 0x50C) #define OTG_FS_HCTSIZx MMIO32(USB_OTG_FS_BASE + 0x510) /* Device-mode Control and Status Registers */ #define OTG_FS_DCFG MMIO32(USB_OTG_FS_BASE + 0x800) #define OTG_FS_DCTL MMIO32(USB_OTG_FS_BASE + 0x804) #define OTG_FS_DSTS MMIO32(USB_OTG_FS_BASE + 0x808) #define OTG_FS_DIEPMSK MMIO32(USB_OTG_FS_BASE + 0x810) #define OTG_FS_DOEPMSK MMIO32(USB_OTG_FS_BASE + 0x814) #define OTG_FS_DAINT MMIO32(USB_OTG_FS_BASE + 0x818) #define OTG_FS_DAINTMSK MMIO32(USB_OTG_FS_BASE + 0x81C) #define OTG_FS_DVBUSDIS MMIO32(USB_OTG_FS_BASE + 0x828) #define OTG_FS_DVBUSPULSE MMIO32(USB_OTG_FS_BASE + 0x82C) #define OTG_FS_DIEPEMPMSK MMIO32(USB_OTG_FS_BASE + 0x834) #define OTG_FS_DIEPCTL0 MMIO32(USB_OTG_FS_BASE + 0x900) #define OTG_FS_DIEPCTL(x) MMIO32(USB_OTG_FS_BASE + 0x900 + \ 0x20*(x)) #define OTG_FS_DOEPCTL0 MMIO32(USB_OTG_FS_BASE + 0xB00) #define OTG_FS_DOEPCTL(x) MMIO32(USB_OTG_FS_BASE + 0xB00 + \ 0x20*(x)) #define OTG_FS_DIEPINT(x) MMIO32(USB_OTG_FS_BASE + 0x908 + \ 0x20*(x)) #define OTG_FS_DOEPINT(x) MMIO32(USB_OTG_FS_BASE + 0xB08 + \ 0x20*(x)) #define OTG_FS_DIEPTSIZ0 MMIO32(USB_OTG_FS_BASE + 0x910) #define OTG_FS_DOEPTSIZ0 MMIO32(USB_OTG_FS_BASE + 0xB10) #define OTG_FS_DIEPTSIZ(x) MMIO32(USB_OTG_FS_BASE + 0x910 + \ 0x20*(x)) #define OTG_FS_DTXFSTS(x) MMIO32(USB_OTG_FS_BASE + 0x918 + \ 0x20*(x)) #define OTG_FS_DOEPTSIZ(x) MMIO32(USB_OTG_FS_BASE + 0xB10 + \ 0x20*(x)) /* Power and clock gating control and status register */ #define OTG_FS_PCGCCTL MMIO32(USB_OTG_FS_BASE + 0xE00) /* Data FIFO */ #define OTG_FS_FIFO(x) (&MMIO32(USB_OTG_FS_BASE \ + (((x) + 1) \ << 12))) /* Global CSRs */ /* OTG_FS USB control registers (OTG_HS_GOTGCTL) */ #define OTG_FS_GOTGCTL_BSVLD (1 << 19) #define OTG_FS_GOTGCTL_ASVLD (1 << 18) #define OTG_FS_GOTGCTL_DBCT (1 << 17) #define OTG_FS_GOTGCTL_CIDSTS (1 << 16) #define OTG_FS_GOTGCTL_DHNPEN (1 << 11) #define OTG_FS_GOTGCTL_HSHNPEN (1 << 10) #define OTG_FS_GOTGCTL_HNPRQ (1 << 9) #define OTG_FS_GOTGCTL_HNGSCS (1 << 8) #define OTG_FS_GOTGCTL_SRQ (1 << 1) #define OTG_FS_GOTGCTL_SRQSCS (1 << 0) /* OTG_FS AHB configuration register (OTG_FS_GAHBCFG) */ #define OTG_FS_GAHBCFG_GINT 0x0001 #define OTG_FS_GAHBCFG_TXFELVL 0x0080 #define OTG_FS_GAHBCFG_PTXFELVL 0x0100 /* OTG_FS USB configuration register (OTG_FS_GUSBCFG) */ #define OTG_FS_GUSBCFG_TOCAL 0x00000003 #define OTG_FS_GUSBCFG_SRPCAP 0x00000100 #define OTG_FS_GUSBCFG_HNPCAP 0x00000200 #define OTG_FS_GUSBCFG_TRDT_MASK (0xf << 10) #define OTG_FS_GUSBCFG_TRDT_16BIT (0x5 << 10) #define OTG_FS_GUSBCFG_TRDT_8BIT (0x9 << 10) #define OTG_FS_GUSBCFG_NPTXRWEN 0x00004000 #define OTG_FS_GUSBCFG_FHMOD 0x20000000 #define OTG_FS_GUSBCFG_FDMOD 0x40000000 #define OTG_FS_GUSBCFG_CTXPKT 0x80000000 #define OTG_FS_GUSBCFG_PHYSEL (1 << 7) /* OTG_FS reset register (OTG_FS_GRSTCTL) */ #define OTG_FS_GRSTCTL_AHBIDL (1 << 31) /* Bits 30:11 - Reserved */ #define OTG_FS_GRSTCTL_TXFNUM_MASK (0x1f << 6) #define OTG_FS_GRSTCTL_TXFFLSH (1 << 5) #define OTG_FS_GRSTCTL_RXFFLSH (1 << 4) /* Bit 3 - Reserved */ #define OTG_FS_GRSTCTL_FCRST (1 << 2) #define OTG_FS_GRSTCTL_HSRST (1 << 1) #define OTG_FS_GRSTCTL_CSRST (1 << 0) /* OTG_FS interrupt status register (OTG_FS_GINTSTS) */ #define OTG_FS_GINTSTS_WKUPINT (1 << 31) #define OTG_FS_GINTSTS_SRQINT (1 << 30) #define OTG_FS_GINTSTS_DISCINT (1 << 29) #define OTG_FS_GINTSTS_CIDSCHG (1 << 28) /* Bit 27 - Reserved */ #define OTG_FS_GINTSTS_PTXFE (1 << 26) #define OTG_FS_GINTSTS_HCINT (1 << 25) #define OTG_FS_GINTSTS_HPRTINT (1 << 24) /* Bits 23:22 - Reserved */ #define OTG_FS_GINTSTS_IPXFR (1 << 21) #define OTG_FS_GINTSTS_INCOMPISOOUT (1 << 21) #define OTG_FS_GINTSTS_IISOIXFR (1 << 20) #define OTG_FS_GINTSTS_OEPINT (1 << 19) #define OTG_FS_GINTSTS_IEPINT (1 << 18) /* Bits 17:16 - Reserved */ #define OTG_FS_GINTSTS_EOPF (1 << 15) #define OTG_FS_GINTSTS_ISOODRP (1 << 14) #define OTG_FS_GINTSTS_ENUMDNE (1 << 13) #define OTG_FS_GINTSTS_USBRST (1 << 12) #define OTG_FS_GINTSTS_USBSUSP (1 << 11) #define OTG_FS_GINTSTS_ESUSP (1 << 10) /* Bits 9:8 - Reserved */ #define OTG_FS_GINTSTS_GONAKEFF (1 << 7) #define OTG_FS_GINTSTS_GINAKEFF (1 << 6) #define OTG_FS_GINTSTS_NPTXFE (1 << 5) #define OTG_FS_GINTSTS_RXFLVL (1 << 4) #define OTG_FS_GINTSTS_SOF (1 << 3) #define OTG_FS_GINTSTS_OTGINT (1 << 2) #define OTG_FS_GINTSTS_MMIS (1 << 1) #define OTG_FS_GINTSTS_CMOD (1 << 0) /* OTG_FS interrupt mask register (OTG_FS_GINTMSK) */ #define OTG_FS_GINTMSK_MMISM 0x00000002 #define OTG_FS_GINTMSK_OTGINT 0x00000004 #define OTG_FS_GINTMSK_SOFM 0x00000008 #define OTG_FS_GINTMSK_RXFLVLM 0x00000010 #define OTG_FS_GINTMSK_NPTXFEM 0x00000020 #define OTG_FS_GINTMSK_GINAKEFFM 0x00000040 #define OTG_FS_GINTMSK_GONAKEFFM 0x00000080 #define OTG_FS_GINTMSK_ESUSPM 0x00000400 #define OTG_FS_GINTMSK_USBSUSPM 0x00000800 #define OTG_FS_GINTMSK_USBRST 0x00001000 #define OTG_FS_GINTMSK_ENUMDNEM 0x00002000 #define OTG_FS_GINTMSK_ISOODRPM 0x00004000 #define OTG_FS_GINTMSK_EOPFM 0x00008000 #define OTG_FS_GINTMSK_EPMISM 0x00020000 #define OTG_FS_GINTMSK_IEPINT 0x00040000 #define OTG_FS_GINTMSK_OEPINT 0x00080000 #define OTG_FS_GINTMSK_IISOIXFRM 0x00100000 #define OTG_FS_GINTMSK_IISOOXFRM 0x00200000 #define OTG_FS_GINTMSK_IPXFRM 0x00200000 #define OTG_FS_GINTMSK_PRTIM 0x01000000 #define OTG_FS_GINTMSK_HCIM 0x02000000 #define OTG_FS_GINTMSK_PTXFEM 0x04000000 #define OTG_FS_GINTMSK_CIDSCHGM 0x10000000 #define OTG_FS_GINTMSK_DISCINT 0x20000000 #define OTG_FS_GINTMSK_SRQIM 0x40000000 #define OTG_FS_GINTMSK_WUIM 0x80000000 /* OTG_FS Receive Status Pop Register (OTG_FS_GRXSTSP) */ /* Bits 31:25 - Reserved */ #define OTG_FS_GRXSTSP_FRMNUM_MASK (0xf << 21) #define OTG_FS_GRXSTSP_PKTSTS_MASK (0xf << 17) #define OTG_FS_GRXSTSP_PKTSTS_GOUTNAK (0x1 << 17) #define OTG_FS_GRXSTSP_PKTSTS_OUT (0x2 << 17) #define OTG_FS_GRXSTSP_PKTSTS_OUT_COMP (0x3 << 17) #define OTG_FS_GRXSTSP_PKTSTS_SETUP_COMP (0x4 << 17) #define OTG_FS_GRXSTSP_PKTSTS_SETUP (0x6 << 17) #define OTG_FS_GRXSTSP_DPID_MASK (0x3 << 15) #define OTG_FS_GRXSTSP_DPID_DATA0 (0x0 << 15) #define OTG_FS_GRXSTSP_DPID_DATA1 (0x2 << 15) #define OTG_FS_GRXSTSP_DPID_DATA2 (0x1 << 15) #define OTG_FS_GRXSTSP_DPID_MDATA (0x3 << 15) #define OTG_FS_GRXSTSP_BCNT_MASK (0x7ff << 4) #define OTG_FS_GRXSTSP_EPNUM_MASK (0xf << 0) /* OTG_FS general core configuration register (OTG_FS_GCCFG) */ /* Bits 31:21 - Reserved */ #define OTG_FS_GCCFG_SOFOUTEN (1 << 20) #define OTG_FS_GCCFG_VBUSBSEN (1 << 19) #define OTG_FS_GCCFG_VBUSASEN (1 << 18) /* Bit 17 - Reserved */ #define OTG_FS_GCCFG_PWRDWN (1 << 16) /* Bits 15:0 - Reserved */ /* Device-mode CSRs */ /* OTG_FS device control register (OTG_FS_DCTL) */ /* Bits 31:12 - Reserved */ #define OTG_FS_DCTL_POPRGDNE (1 << 11) #define OTG_FS_DCTL_CGONAK (1 << 10) #define OTG_FS_DCTL_SGONAK (1 << 9) #define OTG_FS_DCTL_SGINAK (1 << 8) #define OTG_FS_DCTL_TCTL_MASK (7 << 4) #define OTG_FS_DCTL_GONSTS (1 << 3) #define OTG_FS_DCTL_GINSTS (1 << 2) #define OTG_FS_DCTL_SDIS (1 << 1) #define OTG_FS_DCTL_RWUSIG (1 << 0) /* OTG_FS device configuration register (OTG_FS_DCFG) */ #define OTG_FS_DCFG_DSPD 0x0003 #define OTG_FS_DCFG_NZLSOHSK 0x0004 #define OTG_FS_DCFG_DAD 0x07F0 #define OTG_FS_DCFG_PFIVL 0x1800 /* OTG_FS Device IN Endpoint Common Interrupt Mask Register (OTG_FS_DIEPMSK) */ /* Bits 31:10 - Reserved */ #define OTG_FS_DIEPMSK_BIM (1 << 9) #define OTG_FS_DIEPMSK_TXFURM (1 << 8) /* Bit 7 - Reserved */ #define OTG_FS_DIEPMSK_INEPNEM (1 << 6) #define OTG_FS_DIEPMSK_INEPNMM (1 << 5) #define OTG_FS_DIEPMSK_ITTXFEMSK (1 << 4) #define OTG_FS_DIEPMSK_TOM (1 << 3) /* Bit 2 - Reserved */ #define OTG_FS_DIEPMSK_EPDM (1 << 1) #define OTG_FS_DIEPMSK_XFRCM (1 << 0) /* OTG_FS Device OUT Endpoint Common Interrupt Mask Register (OTG_FS_DOEPMSK) */ /* Bits 31:10 - Reserved */ #define OTG_FS_DOEPMSK_BOIM (1 << 9) #define OTG_FS_DOEPMSK_OPEM (1 << 8) /* Bit 7 - Reserved */ #define OTG_FS_DOEPMSK_B2BSTUP (1 << 6) /* Bit 5 - Reserved */ #define OTG_FS_DOEPMSK_OTEPDM (1 << 4) #define OTG_FS_DOEPMSK_STUPM (1 << 3) /* Bit 2 - Reserved */ #define OTG_FS_DOEPMSK_EPDM (1 << 1) #define OTG_FS_DOEPMSK_XFRCM (1 << 0) /* OTG_FS Device Control IN Endpoint 0 Control Register (OTG_FS_DIEPCTL0) */ #define OTG_FS_DIEPCTL0_EPENA (1 << 31) #define OTG_FS_DIEPCTL0_EPDIS (1 << 30) /* Bits 29:28 - Reserved */ #define OTG_FS_DIEPCTLX_SD0PID (1 << 28) #define OTG_FS_DIEPCTL0_SNAK (1 << 27) #define OTG_FS_DIEPCTL0_CNAK (1 << 26) #define OTG_FS_DIEPCTL0_TXFNUM_MASK (0xf << 22) #define OTG_FS_DIEPCTL0_STALL (1 << 21) /* Bit 20 - Reserved */ #define OTG_FS_DIEPCTL0_EPTYP_MASK (0x3 << 18) #define OTG_FS_DIEPCTL0_NAKSTS (1 << 17) /* Bit 16 - Reserved */ #define OTG_FS_DIEPCTL0_USBAEP (1 << 15) /* Bits 14:2 - Reserved */ #define OTG_FS_DIEPCTL0_MPSIZ_MASK (0x3 << 0) #define OTG_FS_DIEPCTL0_MPSIZ_64 (0x0 << 0) #define OTG_FS_DIEPCTL0_MPSIZ_32 (0x1 << 0) #define OTG_FS_DIEPCTL0_MPSIZ_16 (0x2 << 0) #define OTG_FS_DIEPCTL0_MPSIZ_8 (0x3 << 0) /* OTG_FS Device Control OUT Endpoint 0 Control Register (OTG_FS_DOEPCTL0) */ #define OTG_FS_DOEPCTL0_EPENA (1 << 31) #define OTG_FS_DOEPCTL0_EPDIS (1 << 30) /* Bits 29:28 - Reserved */ #define OTG_FS_DOEPCTLX_SD0PID (1 << 28) #define OTG_FS_DOEPCTL0_SNAK (1 << 27) #define OTG_FS_DOEPCTL0_CNAK (1 << 26) /* Bits 25:22 - Reserved */ #define OTG_FS_DOEPCTL0_STALL (1 << 21) #define OTG_FS_DOEPCTL0_SNPM (1 << 20) #define OTG_FS_DOEPCTL0_EPTYP_MASK (0x3 << 18) #define OTG_FS_DOEPCTL0_NAKSTS (1 << 17) /* Bit 16 - Reserved */ #define OTG_FS_DOEPCTL0_USBAEP (1 << 15) /* Bits 14:2 - Reserved */ #define OTG_FS_DOEPCTL0_MPSIZ_MASK (0x3 << 0) #define OTG_FS_DOEPCTL0_MPSIZ_64 (0x0 << 0) #define OTG_FS_DOEPCTL0_MPSIZ_32 (0x1 << 0) #define OTG_FS_DOEPCTL0_MPSIZ_16 (0x2 << 0) #define OTG_FS_DOEPCTL0_MPSIZ_8 (0x3 << 0) /* OTG_FS Device IN Endpoint Interrupt Register (OTG_FS_DIEPINTx) */ /* Bits 31:8 - Reserved */ #define OTG_FS_DIEPINTX_TXFE (1 << 7) #define OTG_FS_DIEPINTX_INEPNE (1 << 6) /* Bit 5 - Reserved */ #define OTG_FS_DIEPINTX_ITTXFE (1 << 4) #define OTG_FS_DIEPINTX_TOC (1 << 3) /* Bit 2 - Reserved */ #define OTG_FS_DIEPINTX_EPDISD (1 << 1) #define OTG_FS_DIEPINTX_XFRC (1 << 0) /* OTG_FS Device IN Endpoint Interrupt Register (OTG_FS_DOEPINTx) */ /* Bits 31:7 - Reserved */ #define OTG_FS_DOEPINTX_B2BSTUP (1 << 6) /* Bit 5 - Reserved */ #define OTG_FS_DOEPINTX_OTEPDIS (1 << 4) #define OTG_FS_DOEPINTX_STUP (1 << 3) /* Bit 2 - Reserved */ #define OTG_FS_DOEPINTX_EPDISD (1 << 1) #define OTG_FS_DOEPINTX_XFRC (1 << 0) /* OTG_FS Device OUT Endpoint 0 Transfer Size Register (OTG_FS_DOEPTSIZ0) */ /* Bit 31 - Reserved */ #define OTG_FS_DIEPSIZ0_STUPCNT_1 (0x1 << 29) #define OTG_FS_DIEPSIZ0_STUPCNT_2 (0x2 << 29) #define OTG_FS_DIEPSIZ0_STUPCNT_3 (0x3 << 29) #define OTG_FS_DIEPSIZ0_STUPCNT_MASK (0x3 << 29) /* Bits 28:20 - Reserved */ #define OTG_FS_DIEPSIZ0_PKTCNT (1 << 19) /* Bits 18:7 - Reserved */ #define OTG_FS_DIEPSIZ0_XFRSIZ_MASK (0x7f << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/otg_hs.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_OTG_HS_H #define LIBOPENCM3_OTG_HS_H #include #include /* Core Global Control and Status Registers */ #define OTG_GOTGCTL 0x000 #define OTG_GOTGIN 0x004 #define OTG_GAHBCFG 0x008 #define OTG_GUSBCFG 0x00C #define OTG_GRSTCTL 0x010 #define OTG_GINTSTS 0x014 #define OTG_GINTMSK 0x018 #define OTG_GRXSTSR 0x01C #define OTG_GRXSTSP 0x020 #define OTG_GRXFSIZ 0x024 #define OTG_GNPTXFSIZ 0x028 #define OTG_GNPTXSTS 0x02C #define OTG_GCCFG 0x038 #define OTG_CID 0x03C #define OTG_HPTXFSIZ 0x100 #define OTG_DIEPTXF(x) (0x104 + 4*(x-1)) /* Host-mode Control and Status Registers */ #define OTG_HCFG 0x400 #define OTG_HFIR 0x404 #define OTG_HFNUM 0x408 #define OTG_HPTXSTS 0x410 #define OTG_HAINT 0x414 #define OTG_HAINTMSK 0x418 #define OTG_HPRT 0x440 #define OTG_HCCHARx 0x500 #define OTG_HCINTx 0x508 #define OTG_HCINTMSKx 0x50C #define OTG_HCTSIZx 0x510 /* Device-mode Control and Status Registers */ #define OTG_DCFG 0x800 #define OTG_DCTL 0x804 #define OTG_DSTS 0x808 #define OTG_DIEPMSK 0x810 #define OTG_DOEPMSK 0x814 #define OTG_DAINT 0x818 #define OTG_DAINTMSK 0x81C #define OTG_DVBUSDIS 0x828 #define OTG_DVBUSPULSE 0x82C #define OTG_DIEPEMPMSK 0x834 #define OTG_DIEPCTL0 0x900 #define OTG_DIEPCTL(x) (0x900 + 0x20*(x)) #define OTG_DOEPCTL0 0xB00 #define OTG_DOEPCTL(x) (0xB00 + 0x20*(x)) #define OTG_DIEPINT(x) (0x908 + 0x20*(x)) #define OTG_DOEPINT(x) (0xB08 + 0x20*(x)) #define OTG_DIEPTSIZ0 0x910 #define OTG_DOEPTSIZ0 0xB10 #define OTG_DIEPTSIZ(x) (0x910 + 0x20*(x)) #define OTG_DTXFSTS(x) (0x918 + 0x20*(x)) #define OTG_DOEPTSIZ(x) (0xB10 + 0x20*(x)) /* Power and clock gating control and status register */ #define OTG_PCGCCTL 0xE00 /* Data FIFO */ #define OTG_FIFO(x) (((x) + 1) << 12) /***********************************************************************/ /* Core Global Control and Status Registers */ #define OTG_HS_GOTGCTL MMIO32(USB_OTG_HS_BASE + OTG_GOTGCTL) #define OTG_HS_GOTGINT MMIO32(USB_OTG_HS_BASE + OTG_GOTGINT) #define OTG_HS_GAHBCFG MMIO32(USB_OTG_HS_BASE + OTG_GAHBCFG) #define OTG_HS_GUSBCFG MMIO32(USB_OTG_HS_BASE + OTG_GUSBCFG) #define OTG_HS_GRSTCTL MMIO32(USB_OTG_HS_BASE + OTG_GRSTCTL) #define OTG_HS_GINTSTS MMIO32(USB_OTG_HS_BASE + OTG_GINTSTS) #define OTG_HS_GINTMSK MMIO32(USB_OTG_HS_BASE + OTG_GINTMSK) #define OTG_HS_GRXSTSR MMIO32(USB_OTG_HS_BASE + OTG_GRXSTSR) #define OTG_HS_GRXSTSP MMIO32(USB_OTG_HS_BASE + OTG_GRXSTSP) #define OTG_HS_GRXFSIZ MMIO32(USB_OTG_HS_BASE + OTG_GRXFSIZ) #define OTG_HS_GNPTXFSIZ MMIO32(USB_OTG_HS_BASE + OTG_GNPTXFSIZ) #define OTG_HS_GNPTXSTS MMIO32(USB_OTG_HS_BASE + OTG_GNPTXSTS) #define OTG_HS_GCCFG MMIO32(USB_OTG_HS_BASE + OTG_GCCFG) #define OTG_HS_CID MMIO32(USB_OTG_HS_BASE + OTG_CID) #define OTG_HS_HPTXFSIZ MMIO32(USB_OTG_HS_BASE + OTG_HPTXFSIZ) #define OTG_HS_DIEPTXF(x) MMIO32(USB_OTG_HS_BASE + OTG_DIEPTXF(x)) /* Host-mode Control and Status Registers */ #define OTG_HS_HCFG MMIO32(USB_OTG_HS_BASE + OTG_HCFG) #define OTG_HS_HFIR MMIO32(USB_OTG_HS_BASE + OTG_HFIR) #define OTG_HS_HFNUM MMIO32(USB_OTG_HS_BASE + OTG_HFNUM) #define OTG_HS_HPTXSTS MMIO32(USB_OTG_HS_BASE + OTG_HPTXSTS) #define OTG_HS_HAINT MMIO32(USB_OTG_HS_BASE + OTG_HAINT) #define OTG_HS_HAINTMSK MMIO32(USB_OTG_HS_BASE + OTG_HAINTMSK) #define OTG_HS_HPRT MMIO32(USB_OTG_HS_BASE + OTG_HPRT) #define OTG_HS_HCCHARx MMIO32(USB_OTG_HS_BASE + OTG_HCCHARx) #define OTG_HS_HCINTx MMIO32(USB_OTG_HS_BASE + OTG_HCINTx) #define OTG_HS_HCINTMSKx MMIO32(USB_OTG_HS_BASE + OTG_HCINTMSKx) #define OTG_HS_HCTSIZx MMIO32(USB_OTG_HS_BASE + OTG_HCTSIZx) /* Device-mode Control and Status Registers */ #define OTG_HS_DCFG MMIO32(USB_OTG_HS_BASE + OTG_DCFG) #define OTG_HS_DCTL MMIO32(USB_OTG_HS_BASE + OTG_DCTL) #define OTG_HS_DSTS MMIO32(USB_OTG_HS_BASE + OTG_DSTS) #define OTG_HS_DIEPMSK MMIO32(USB_OTG_HS_BASE + OTG_DIEPMSK) #define OTG_HS_DOEPMSK MMIO32(USB_OTG_HS_BASE + OTG_DOEPMSK) #define OTG_HS_DAINT MMIO32(USB_OTG_HS_BASE + OTG_DAINT) #define OTG_HS_DAINTMSK MMIO32(USB_OTG_HS_BASE + OTG_DAINTMSK) #define OTG_HS_DVBUSDIS MMIO32(USB_OTG_HS_BASE + OTG_DVBUSDIS) #define OTG_HS_DVBUSPULSE MMIO32(USB_OTG_HS_BASE + OTG_DVBUSPULSE) #define OTG_HS_DIEPEMPMSK MMIO32(USB_OTG_HS_BASE + OTG_DIEPEMPMSK) #define OTG_HS_DIEPCTL0 MMIO32(USB_OTG_HS_BASE + OTG_DIEPCTL0) #define OTG_HS_DIEPCTL(x) MMIO32(USB_OTG_HS_BASE + OTG_DIEPCTL(x)) #define OTG_HS_DOEPCTL0 MMIO32(USB_OTG_HS_BASE + OTG_DOEPCTL0) #define OTG_HS_DOEPCTL(x) MMIO32(USB_OTG_HS_BASE + OTG_DOEPCTL(x)) #define OTG_HS_DIEPINT(x) MMIO32(USB_OTG_HS_BASE + OTG_DIEPINT(x)) #define OTG_HS_DOEPINT(x) MMIO32(USB_OTG_HS_BASE + OTG_DOEPINT(x)) #define OTG_HS_DIEPTSIZ0 MMIO32(USB_OTG_HS_BASE + OTG_DIEPTSIZ0) #define OTG_HS_DOEPTSIZ0 MMIO32(USB_OTG_HS_BASE + OTG_DOEPTSIZ0) #define OTG_HS_DIEPTSIZ(x) MMIO32(USB_OTG_HS_BASE + \ OTG_DIEPTSIZ(x)) #define OTG_HS_DTXFSTS(x) MMIO32(USB_OTG_HS_BASE + OTG_DTXFSTS(x)) #define OTG_HS_DOEPTSIZ(x) MMIO32(USB_OTG_HS_BASE + \ OTG_DOEPTSIZ(x)) /* Power and clock gating control and status register */ #define OTG_HS_PCGCCTL MMIO32(USB_OTG_HS_BASE + OTG_PCGCCTL) /* Data FIFO */ #define OTG_HS_FIFO(x) (&MMIO32(USB_OTG_HS_BASE + OTG_FIFO(x))) /* Global CSRs */ /* OTG_HS USB control registers (OTG_FS_GOTGCTL) */ #define OTG_HS_GOTGCTL_BSVLD (1 << 19) #define OTG_HS_GOTGCTL_ASVLD (1 << 18) #define OTG_HS_GOTGCTL_DBCT (1 << 17) #define OTG_HS_GOTGCTL_CIDSTS (1 << 16) #define OTG_HS_GOTGCTL_DHNPEN (1 << 11) #define OTG_HS_GOTGCTL_HSHNPEN (1 << 10) #define OTG_HS_GOTGCTL_HNPRQ (1 << 9) #define OTG_HS_GOTGCTL_HNGSCS (1 << 8) #define OTG_HS_GOTGCTL_SRQ (1 << 1) #define OTG_HS_GOTGCTL_SRQSCS (1 << 0) /* OTG_FS AHB configuration register (OTG_HS_GAHBCFG) */ #define OTG_HS_GAHBCFG_GINT 0x0001 #define OTG_HS_GAHBCFG_TXFELVL 0x0080 #define OTG_HS_GAHBCFG_PTXFELVL 0x0100 /* OTG_FS USB configuration register (OTG_HS_GUSBCFG) */ #define OTG_HS_GUSBCFG_TOCAL 0x00000003 #define OTG_HS_GUSBCFG_SRPCAP 0x00000100 #define OTG_HS_GUSBCFG_HNPCAP 0x00000200 #define OTG_HS_GUSBCFG_TRDT_MASK (0xf << 10) #define OTG_HS_GUSBCFG_TRDT_16BIT (0x5 << 10) #define OTG_HS_GUSBCFG_TRDT_8BIT (0x9 << 10) #define OTG_HS_GUSBCFG_NPTXRWEN 0x00004000 #define OTG_HS_GUSBCFG_FHMOD 0x20000000 #define OTG_HS_GUSBCFG_FDMOD 0x40000000 #define OTG_HS_GUSBCFG_CTXPKT 0x80000000 #define OTG_HS_GUSBCFG_PHYSEL (1 << 6) /* OTG_FS reset register (OTG_HS_GRSTCTL) */ #define OTG_HS_GRSTCTL_AHBIDL (1 << 31) /* Bits 30:11 - Reserved */ #define OTG_HS_GRSTCTL_TXFNUM_MASK (0x1f << 6) #define OTG_HS_GRSTCTL_TXFFLSH (1 << 5) #define OTG_HS_GRSTCTL_RXFFLSH (1 << 4) /* Bit 3 - Reserved */ #define OTG_HS_GRSTCTL_FCRST (1 << 2) #define OTG_HS_GRSTCTL_HSRST (1 << 1) #define OTG_HS_GRSTCTL_CSRST (1 << 0) /* OTG_FS interrupt status register (OTG_HS_GINTSTS) */ #define OTG_HS_GINTSTS_WKUPINT (1 << 31) #define OTG_HS_GINTSTS_SRQINT (1 << 30) #define OTG_HS_GINTSTS_DISCINT (1 << 29) #define OTG_HS_GINTSTS_CIDSCHG (1 << 28) /* Bit 27 - Reserved */ #define OTG_HS_GINTSTS_PTXFE (1 << 26) #define OTG_HS_GINTSTS_HCINT (1 << 25) #define OTG_HS_GINTSTS_HPRTINT (1 << 24) /* Bits 23:22 - Reserved */ #define OTG_HS_GINTSTS_IPXFR (1 << 21) #define OTG_HS_GINTSTS_INCOMPISOOUT (1 << 21) #define OTG_HS_GINTSTS_IISOIXFR (1 << 20) #define OTG_HS_GINTSTS_OEPINT (1 << 19) #define OTG_HS_GINTSTS_IEPINT (1 << 18) /* Bits 17:16 - Reserved */ #define OTG_HS_GINTSTS_EOPF (1 << 15) #define OTG_HS_GINTSTS_ISOODRP (1 << 14) #define OTG_HS_GINTSTS_ENUMDNE (1 << 13) #define OTG_HS_GINTSTS_USBRST (1 << 12) #define OTG_HS_GINTSTS_USBSUSP (1 << 11) #define OTG_HS_GINTSTS_ESUSP (1 << 10) /* Bits 9:8 - Reserved */ #define OTG_HS_GINTSTS_GONAKEFF (1 << 7) #define OTG_HS_GINTSTS_GINAKEFF (1 << 6) #define OTG_HS_GINTSTS_NPTXFE (1 << 5) #define OTG_HS_GINTSTS_RXFLVL (1 << 4) #define OTG_HS_GINTSTS_SOF (1 << 3) #define OTG_HS_GINTSTS_OTGINT (1 << 2) #define OTG_HS_GINTSTS_MMIS (1 << 1) #define OTG_HS_GINTSTS_CMOD (1 << 0) /* OTG_FS interrupt mask register (OTG_HS_GINTMSK) */ #define OTG_HS_GINTMSK_MMISM 0x00000002 #define OTG_HS_GINTMSK_OTGINT 0x00000004 #define OTG_HS_GINTMSK_SOFM 0x00000008 #define OTG_HS_GINTMSK_RXFLVLM 0x00000010 #define OTG_HS_GINTMSK_NPTXFEM 0x00000020 #define OTG_HS_GINTMSK_GINAKEFFM 0x00000040 #define OTG_HS_GINTMSK_GONAKEFFM 0x00000080 #define OTG_HS_GINTMSK_ESUSPM 0x00000400 #define OTG_HS_GINTMSK_USBSUSPM 0x00000800 #define OTG_HS_GINTMSK_USBRST 0x00001000 #define OTG_HS_GINTMSK_ENUMDNEM 0x00002000 #define OTG_HS_GINTMSK_ISOODRPM 0x00004000 #define OTG_HS_GINTMSK_EOPFM 0x00008000 #define OTG_HS_GINTMSK_EPMISM 0x00020000 #define OTG_HS_GINTMSK_IEPINT 0x00040000 #define OTG_HS_GINTMSK_OEPINT 0x00080000 #define OTG_HS_GINTMSK_IISOIXFRM 0x00100000 #define OTG_HS_GINTMSK_IISOOXFRM 0x00200000 #define OTG_HS_GINTMSK_IPXFRM 0x00200000 #define OTG_HS_GINTMSK_PRTIM 0x01000000 #define OTG_HS_GINTMSK_HCIM 0x02000000 #define OTG_HS_GINTMSK_PTXFEM 0x04000000 #define OTG_HS_GINTMSK_CIDSCHGM 0x10000000 #define OTG_HS_GINTMSK_DISCINT 0x20000000 #define OTG_HS_GINTMSK_SRQIM 0x40000000 #define OTG_HS_GINTMSK_WUIM 0x80000000 /* OTG_FS Receive Status Pop Register (OTG_HS_GRXSTSP) */ /* Bits 31:25 - Reserved */ #define OTG_HS_GRXSTSP_FRMNUM_MASK (0xf << 21) #define OTG_HS_GRXSTSP_PKTSTS_MASK (0xf << 17) #define OTG_HS_GRXSTSP_PKTSTS_GOUTNAK (0x1 << 17) #define OTG_HS_GRXSTSP_PKTSTS_OUT (0x2 << 17) #define OTG_HS_GRXSTSP_PKTSTS_OUT_COMP (0x3 << 17) #define OTG_HS_GRXSTSP_PKTSTS_SETUP_COMP (0x4 << 17) #define OTG_HS_GRXSTSP_PKTSTS_SETUP (0x6 << 17) #define OTG_HS_GRXSTSP_DPID_MASK (0x3 << 15) #define OTG_HS_GRXSTSP_DPID_DATA0 (0x0 << 15) #define OTG_HS_GRXSTSP_DPID_DATA1 (0x2 << 15) #define OTG_HS_GRXSTSP_DPID_DATA2 (0x1 << 15) #define OTG_HS_GRXSTSP_DPID_MDATA (0x3 << 15) #define OTG_HS_GRXSTSP_BCNT_MASK (0x7ff << 4) #define OTG_HS_GRXSTSP_EPNUM_MASK (0xf << 0) /* OTG_FS general core configuration register (OTG_HS_GCCFG) */ /* Bits 31:21 - Reserved */ #define OTG_HS_GCCFG_SOFOUTEN (1 << 20) #define OTG_HS_GCCFG_VBUSBSEN (1 << 19) #define OTG_HS_GCCFG_VBUSASEN (1 << 18) /* Bit 17 - Reserved */ #define OTG_HS_GCCFG_PWRDWN (1 << 16) /* Bits 15:0 - Reserved */ /* Device-mode CSRs */ /* OTG_FS device control register (OTG_HS_DCTL) */ /* Bits 31:12 - Reserved */ #define OTG_HS_DCTL_POPRGDNE (1 << 11) #define OTG_HS_DCTL_CGONAK (1 << 10) #define OTG_HS_DCTL_SGONAK (1 << 9) #define OTG_HS_DCTL_SGINAK (1 << 8) #define OTG_HS_DCTL_TCTL_MASK (7 << 4) #define OTG_HS_DCTL_GONSTS (1 << 3) #define OTG_HS_DCTL_GINSTS (1 << 2) #define OTG_HS_DCTL_SDIS (1 << 1) #define OTG_HS_DCTL_RWUSIG (1 << 0) /* OTG_FS device configuration register (OTG_HS_DCFG) */ #define OTG_HS_DCFG_DSPD 0x0003 #define OTG_HS_DCFG_NZLSOHSK 0x0004 #define OTG_HS_DCFG_DAD 0x07F0 #define OTG_HS_DCFG_PFIVL 0x1800 /* OTG_FS Device IN Endpoint Common Interrupt Mask Register (OTG_HS_DIEPMSK) */ /* Bits 31:10 - Reserved */ #define OTG_HS_DIEPMSK_BIM (1 << 9) #define OTG_HS_DIEPMSK_TXFURM (1 << 8) /* Bit 7 - Reserved */ #define OTG_HS_DIEPMSK_INEPNEM (1 << 6) #define OTG_HS_DIEPMSK_INEPNMM (1 << 5) #define OTG_HS_DIEPMSK_ITTXFEMSK (1 << 4) #define OTG_HS_DIEPMSK_TOM (1 << 3) /* Bit 2 - Reserved */ #define OTG_HS_DIEPMSK_EPDM (1 << 1) #define OTG_HS_DIEPMSK_XFRCM (1 << 0) /* OTG_FS Device OUT Endpoint Common Interrupt Mask Register (OTG_HS_DOEPMSK) */ /* Bits 31:10 - Reserved */ #define OTG_HS_DOEPMSK_BOIM (1 << 9) #define OTG_HS_DOEPMSK_OPEM (1 << 8) /* Bit 7 - Reserved */ #define OTG_HS_DOEPMSK_B2BSTUP (1 << 6) /* Bit 5 - Reserved */ #define OTG_HS_DOEPMSK_OTEPDM (1 << 4) #define OTG_HS_DOEPMSK_STUPM (1 << 3) /* Bit 2 - Reserved */ #define OTG_HS_DOEPMSK_EPDM (1 << 1) #define OTG_HS_DOEPMSK_XFRCM (1 << 0) /* OTG_FS Device Control IN Endpoint 0 Control Register (OTG_HS_DIEPCTL0) */ #define OTG_HS_DIEPCTL0_EPENA (1 << 31) #define OTG_HS_DIEPCTL0_EPDIS (1 << 30) /* Bits 29:28 - Reserved */ #define OTG_HS_DIEPCTLX_SD0PID (1 << 28) #define OTG_HS_DIEPCTL0_SNAK (1 << 27) #define OTG_HS_DIEPCTL0_CNAK (1 << 26) #define OTG_HS_DIEPCTL0_TXFNUM_MASK (0xf << 22) #define OTG_HS_DIEPCTL0_STALL (1 << 21) /* Bit 20 - Reserved */ #define OTG_HS_DIEPCTL0_EPTYP_MASK (0x3 << 18) #define OTG_HS_DIEPCTL0_NAKSTS (1 << 17) /* Bit 16 - Reserved */ #define OTG_HS_DIEPCTL0_USBAEP (1 << 15) /* Bits 14:2 - Reserved */ #define OTG_HS_DIEPCTL0_MPSIZ_MASK (0x3 << 0) #define OTG_HS_DIEPCTL0_MPSIZ_64 (0x0 << 0) #define OTG_HS_DIEPCTL0_MPSIZ_32 (0x1 << 0) #define OTG_HS_DIEPCTL0_MPSIZ_16 (0x2 << 0) #define OTG_HS_DIEPCTL0_MPSIZ_8 (0x3 << 0) /* OTG_FS Device Control OUT Endpoint 0 Control Register (OTG_HS_DOEPCTL0) */ #define OTG_HS_DOEPCTL0_EPENA (1 << 31) #define OTG_HS_DOEPCTL0_EPDIS (1 << 30) /* Bits 29:28 - Reserved */ #define OTG_HS_DOEPCTLX_SD0PID (1 << 28) #define OTG_HS_DOEPCTL0_SNAK (1 << 27) #define OTG_HS_DOEPCTL0_CNAK (1 << 26) /* Bits 25:22 - Reserved */ #define OTG_HS_DOEPCTL0_STALL (1 << 21) #define OTG_HS_DOEPCTL0_SNPM (1 << 20) #define OTG_HS_DOEPCTL0_EPTYP_MASK (0x3 << 18) #define OTG_HS_DOEPCTL0_NAKSTS (1 << 17) /* Bit 16 - Reserved */ #define OTG_HS_DOEPCTL0_USBAEP (1 << 15) /* Bits 14:2 - Reserved */ #define OTG_HS_DOEPCTL0_MPSIZ_MASK (0x3 << 0) #define OTG_HS_DOEPCTL0_MPSIZ_64 (0x0 << 0) #define OTG_HS_DOEPCTL0_MPSIZ_32 (0x1 << 0) #define OTG_HS_DOEPCTL0_MPSIZ_16 (0x2 << 0) #define OTG_HS_DOEPCTL0_MPSIZ_8 (0x3 << 0) /* OTG_FS Device IN Endpoint Interrupt Register (OTG_HS_DIEPINTx) */ /* Bits 31:8 - Reserved */ #define OTG_HS_DIEPINTX_TXFE (1 << 7) #define OTG_HS_DIEPINTX_INEPNE (1 << 6) /* Bit 5 - Reserved */ #define OTG_HS_DIEPINTX_ITTXFE (1 << 4) #define OTG_HS_DIEPINTX_TOC (1 << 3) /* Bit 2 - Reserved */ #define OTG_HS_DIEPINTX_EPDISD (1 << 1) #define OTG_HS_DIEPINTX_XFRC (1 << 0) /* OTG_FS Device IN Endpoint Interrupt Register (OTG_HS_DOEPINTx) */ /* Bits 31:7 - Reserved */ #define OTG_HS_DOEPINTX_B2BSTUP (1 << 6) /* Bit 5 - Reserved */ #define OTG_HS_DOEPINTX_OTEPDIS (1 << 4) #define OTG_HS_DOEPINTX_STUP (1 << 3) /* Bit 2 - Reserved */ #define OTG_HS_DOEPINTX_EPDISD (1 << 1) #define OTG_HS_DOEPINTX_XFRC (1 << 0) /* OTG_FS Device OUT Endpoint 0 Transfer Size Register (OTG_HS_DOEPTSIZ0) */ /* Bit 31 - Reserved */ #define OTG_HS_DIEPSIZ0_STUPCNT_1 (0x1 << 29) #define OTG_HS_DIEPSIZ0_STUPCNT_2 (0x2 << 29) #define OTG_HS_DIEPSIZ0_STUPCNT_3 (0x3 << 29) #define OTG_HS_DIEPSIZ0_STUPCNT_MASK (0x3 << 29) /* Bits 28:20 - Reserved */ #define OTG_HS_DIEPSIZ0_PKTCNT (1 << 19) /* Bits 18:7 - Reserved */ #define OTG_HS_DIEPSIZ0_XFRSIZ_MASK (0x7f << 0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/pwr.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/rcc.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/rtc.h ================================================ /* This provides unification of code over STM32 subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/sdio.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Felix Held * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_SDIO_H #define LIBOPENCM3_SDIO_H #include #include /* --- SDIO registers ------------------------------------------------------ */ /* SDIO power control register (SDIO_POWER) */ #define SDIO_POWER MMIO32(SDIO_BASE + 0x00) /* SDI clock control register (SDIO_CLKCR) */ #define SDIO_CLKCR MMIO32(SDIO_BASE + 0x04) /* SDIO argument register (SDIO_ARG) */ #define SDIO_ARG MMIO32(SDIO_BASE + 0x08) /* SDIO command register (SDIO_CMD) */ #define SDIO_CMD MMIO32(SDIO_BASE + 0x0C) /* SDIO command response register (SDIO_RESPCMD) */ #define SDIO_RESPCMD MMIO32(SDIO_BASE + 0x10) /* SDIO response 1..4 register (SDIO_RESPx) */ #define SDIO_RESP1 MMIO32(SDIO_BASE + 0x14) #define SDIO_RESP2 MMIO32(SDIO_BASE + 0x18) #define SDIO_RESP3 MMIO32(SDIO_BASE + 0x1C) #define SDIO_RESP4 MMIO32(SDIO_BASE + 0x20) /* SDIO data timer register (SDIO_DTIMER) */ #define SDIO_DTIMER MMIO32(SDIO_BASE + 0x24) /* SDIO data length register (SDIO_DLEN) */ #define SDIO_DLEN MMIO32(SDIO_BASE + 0x28) /* SDIO data control register (SDIO_DCTRL) */ #define SDIO_DCTRL MMIO32(SDIO_BASE + 0x2C) /* SDIO data counter register (SDIO_DCOUNT) */ /* read only, write has no effect */ #define SDIO_DCOUNT MMIO32(SDIO_BASE + 0x30) /* SDIO status register (SDIO_STA) */ #define SDIO_STA MMIO32(SDIO_BASE + 0x34) /* SDIO interrupt clear register (SDIO_ICR) */ #define SDIO_ICR MMIO32(SDIO_BASE + 0x38) /* SDIO mask register (SDIO_MASK) */ #define SDIO_MASK MMIO32(SDIO_BASE + 0x3C) /* SDIO FIFO counter register (SDIO_FIFOCNT) */ #define SDIO_FIFOCNT MMIO32(SDIO_BASE + 0x48) /* SDIO data FIFO register (SDIO_FIFO) */ /* the SDIO data FIFO is 32 32bit words long, beginning at this address */ #define SDIO_FIFO MMIO32(SDIO_BASE + 0x80) /* --- SDIO_POWER values --------------------------------------------------- */ #define SDIO_POWER_PWRCTRL_SHIFT 0 #define SDIO_POWER_PWRCTRL_PWROFF (0x0 << SDIO_POWER_PWRCTRL_SHIFT) /* what does "10: Reserved power-up" mean? */ #define SDIO_POWER_PWRCTRL_RSVPWRUP (0x2 << SDIO_POWER_PWRCTRL_SHIFT) #define SDIO_POWER_PWRCTRL_PWRON (0x3 << SDIO_POWER_PWRCTRL_SHIFT) /* --- SDIO_POWER values --------------------------------------------------- */ /* HWFC_EN: HW Flow Control enable */ #define SDIO_CLKCR_HWFC_EN (1 << 14) /* NEGEDGE: SDIO_CK dephasing selection bit */ #define SDIO_CLKCR_NEGEDGE (1 << 13) /* WIDBUS: Wide bus mode enable bit */ /* set the width of the data bus */ #define SDIO_CLKCR_WIDBUS_SHIFT 11 #define SDIO_CLKCR_WIDBUS_1 (0x0 << SDIO_CLKCR_WIDBUS_SHIFT) #define SDIO_CLKCR_WIDBUS_4 (0x1 << SDIO_CLKCR_WIDBUS_SHIFT) #define SDIO_CLKCR_WIDBUS_8 (0x2 << SDIO_CLKCR_WIDBUS_SHIFT) /* BYPASS: Clock divider bypass enable bit */ #define SDIO_CLKCR_BYPASS (1 << 10) /* PWRSAV: Power saving configuration bit */ #define SDIO_CLKCR_PWRSAV (1 << 9) /* CLKEN: Clock enable bit */ #define SDIO_CLKCR_CLKEN (1 << 8) /* CLKDIV: Clock divide factor */ #define SDIO_CLKCR_CLKDIV_SHIFT 0 #define SDIO_CLKCR_CLKDIV_MSK (0xFF << SDIO_CLKCR_CLKDIV_SHIFT) /* --- SDIO_CMD values ---------------------------------------------------- */ /* ATACMD: CE-ATA command */ #define SDIO_CMD_ATACMD (1 << 14) /* nIEN: not Interrupt Enable */ #define SDIO_CMD_NIEN (1 << 13) /* ENCMDcompl: Enable CMD completion */ #define SDIO_CMD_ENCMDCOMPL (1 << 12) /* SDIOSuspend: SD I/O suspend command */ #define SDIO_CMD_SDIOSUSPEND (1 << 11) /* CPSMEN: Command path state machine (CPSM) Enable bit */ #define SDIO_CMD_CPSMEN (1 << 10) /* WAITPEND: CPSM Waits for ends of data transfer (CmdPend internal signal) */ #define SDIO_CMD_WAITPEND (1 << 9) /* WAITINT: CPSM waits for interrupt request */ #define SDIO_CMD_WAITINT (1 << 8) /* WAITRESP: Wait for response bits */ #define SDIO_CMD_WAITRESP_SHIFT 6 /* 00: No response, expect CMDSENT flag */ #define SDIO_CMD_WAITRESP_NO_0 (0x0 << SDIO_CMD_WAITRESP_SHIFT) /* 01: Short response, expect CMDREND or CCRCFAIL flag */ #define SDIO_CMD_WAITRESP_SHORT (0x1 << SDIO_CMD_WAITRESP_SHIFT) /* 10: No response, expect CMDSENT flag */ #define SDIO_CMD_WAITRESP_NO_2 (0x2 << SDIO_CMD_WAITRESP_SHIFT) /* 11: Long response, expect CMDREND or CCRCFAIL flag */ #define SDIO_CMD_WAITRESP_LONG (0x3 << SDIO_CMD_WAITRESP_SHIFT) /* CMDINDEX: Command index */ #define SDIO_CMD_CMDINDEX_SHIFT 0 #define SDIO_CMD_CMDINDEX_MSK (0x3F << SDIO_CMD_CMDINDEX_SHIFT) /* --- SDIO_RESPCMD values ------------------------------------------------ */ #define SDIO_RESPCMD_SHIFT 0 #define SDIO_RESPCMD_MSK (0x3F << SDIO_RESPCMD_SHIFT) /* --- SDIO_DCTRL values -------------------------------------------------- */ /* SDIOEN: SD I/O enable functions */ #define SDIO_DCTRL_SDIOEN (1 << 11) /* RWMOD: Read wait mode */ /* 0: Read Wait control stopping SDIO_D2 * 1: Read Wait control using SDIO_CK */ #define SDIO_DCTRL_RWMOD (1 << 10) /* RWSTOP: Read wait stop */ /* 0: Read wait in progress if RWSTART bit is set * 1: Enable for read wait stop if RWSTART bit is set */ #define SDIO_DCTRL_RWSTOP (1 << 9) /* RWSTART: Read wait start */ #define SDIO_DCTRL_RWSTART (1 << 8) /* DBLOCKSIZE: Data block size */ /* SDIO_DCTRL_DBLOCKSIZE_n * block size is 2**n bytes with 0<=n<=14 */ #define SDIO_DCTRL_DBLOCKSIZE_SHIFT 4 #define SDIO_DCTRL_DBLOCKSIZE_0 (0x0 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_1 (0x1 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_2 (0x2 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_3 (0x3 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_4 (0x4 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_5 (0x5 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_6 (0x6 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_7 (0x7 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_8 (0x8 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_9 (0x9 << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_10 (0xA << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_11 (0xB << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_12 (0xC << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_13 (0xD << SDIO_DCTRL_DBLOCKSIZE_SHIFT) #define SDIO_DCTRL_DBLOCKSIZE_14 (0xE << SDIO_DCTRL_DBLOCKSIZE_SHIFT) /* DMAEN: DMA enable bit */ #define SDIO_DCTRL_DMAEN (1 << 3) /* DTMODE: Data transfer mode selection 1: Stream or SDIO multi byte transfer */ #define SDIO_DCTRL_DTMODE (1 << 2) /* DTDIR: Data transfer direction selection */ /* 0: From controller to card. * 1: From card to controller. */ #define SDIO_DCTRL_DTDIR (1 << 1) /* DTEN: Data transfer enabled bit */ #define SDIO_DCTRL_DTEN (1 << 0) /* --- SDIO_STA values ---------------------------------------------------- */ /* CEATAEND: CE-ATA command completion signal received for CMD61 */ #define SDIO_STA_CEATAEND (1 << 23) /* SDIOIT: SDIO interrupt received */ #define SDIO_STA_SDIOIT (1 << 22) /* RXDAVL: Data available in receive FIFO */ #define SDIO_STA_RXDAVL (1 << 21) /* TXDAVL: Data available in transmit FIFO */ #define SDIO_STA_TXDAVL (1 << 20) /* RXFIFOE: Receive FIFO empty */ #define SDIO_STA_RXFIFOE (1 << 19) /* TXFIFOE: Transmit FIFO empty */ /* HW Flow Control enabled -> TXFIFOE signals becomes activated when the FIFO * contains 2 words. */ #define SDIO_STA_TXFIFOE (1 << 18) /* RXFIFOF: Receive FIFO full */ /* HW Flow Control enabled => RXFIFOF signals becomes activated 2 words before * the FIFO is full. */ #define SDIO_STA_RXFIFOF (1 << 17) /* TXFIFOF: Transmit FIFO full */ #define SDIO_STA_TXFIFOF (1 << 16) /* RXFIFOHF: Receive FIFO half full: there are at least 8 words in the FIFO */ #define SDIO_STA_RXFIFOHF (1 << 15) /* TXFIFOHE: Transmit FIFO half empty: at least 8 words can be written into * the FIFO */ #define SDIO_STA_TXFIFOHE (1 << 14) /* RXACT: Data receive in progress */ #define SDIO_STA_RXACT (1 << 13) /* TXACT: Data transmit in progress */ #define SDIO_STA_TXACT (1 << 12) /* CMDACT: Command transfer in progress */ #define SDIO_STA_CMDACT (1 << 11) /* DBCKEND: Data block sent/received (CRC check passed) */ #define SDIO_STA_DBCKEND (1 << 10) /* STBITERR: Start bit not detected on all data signals in wide bus mode */ #define SDIO_STA_STBITERR (1 << 9) /* DATAEND: Data end (data counter, SDIDCOUNT, is zero) */ #define SDIO_STA_DATAEND (1 << 8) /* CMDSENT: Command sent (no response required) */ #define SDIO_STA_CMDSENT (1 << 7) /* CMDREND: Command response received (CRC check passed) */ #define SDIO_STA_CMDREND (1 << 6) /* RXOVERR: Received FIFO overrun error */ #define SDIO_STA_RXOVERR (1 << 5) /* TXUNDERR: Transmit FIFO underrun error */ #define SDIO_STA_TXUNDERR (1 << 4) /* DTIMEOUT: Data timeout */ #define SDIO_STA_DTIMEOUT (1 << 3) /* CTIMEOUT: Command response timeout */ #define SDIO_STA_CTIMEOUT (1 << 2) /* DCRCFAIL: Data block sent/received (CRC check failed) */ #define SDIO_STA_DCRCFAIL (1 << 1) /* CCRCFAIL: Command response received (CRC check failed) */ #define SDIO_STA_CCRCFAIL (1 << 0) /* --- SDIO_ICR values ---------------------------------------------------- */ /* CEATAENDC: CEATAEND flag clear bit */ #define SDIO_ICR_CEATAENDC (1 << 23) /* SDIOITC: SDIOIT flag clear bit */ #define SDIO_ICR_SDIOITC (1 << 22) /* DBCKENDC: DBCKEND flag clear bit */ #define SDIO_ICR_DBCKENDC (1 << 10) /* STBITERRC: STBITERR flag clear bit */ #define SDIO_ICR_STBITERRC (1 << 9) /* DATAENDC: DATAEND flag clear bit */ #define SDIO_ICR_DATAENDC (1 << 8) /* CMDSENTC: CMDSENT flag clear bit */ #define SDIO_ICR_CMDSENTC (1 << 7) /* CMDRENDC: CMDREND flag clear bit */ #define SDIO_ICR_CMDRENDC (1 << 6) /* RXOVERRC: RXOVERR flag clear bit */ #define SDIO_ICR_RXOVERRC (1 << 5) /* TXUNDERRC: TXUNDERR flag clear bit */ #define SDIO_ICR_TXUNDERRC (1 << 4) /* DTIMEOUTC: DTIMEOUT flag clear bit */ #define SDIO_ICR_DTIMEOUTC (1 << 3) /* CTIMEOUTC: CTIMEOUT flag clear bit */ #define SDIO_ICR_CTIMEOUTC (1 << 2) /* DCRCFAILC: DCRCFAIL flag clear bit */ #define SDIO_ICR_DCRCFAILC (1 << 1) /* CCRCFAILC: CCRCFAIL flag clear bit */ #define SDIO_ICR_CCRCFAILC (1 << 0) /* --- SDIO_MASK values --------------------------------------------------- */ /* CEATAENDIE: CE-ATA command completion signal received interrupt enable */ #define SDIO_MASK_CEATAENDIE (1 << 23) /* SDIOITIE: SDIO mode interrupt received interrupt enable */ #define SDIO_MASK_SDIOITIE (1 << 22) /* RXDAVLIE: Data available in Rx FIFO interrupt enable */ #define SDIO_MASK_RXDAVLIE (1 << 21) /* TXDAVLIE: Data available in Tx FIFO interrupt enable */ #define SDIO_MASK_TXDAVLIE (1 << 20) /* RXFIFOEIE: Rx FIFO empty interrupt enable */ #define SDIO_MASK_RXFIFOEIE (1 << 19) /* TXFIFOEIE: Tx FIFO empty interrupt enable */ #define SDIO_MASK_TXFIFOEIE (1 << 18) /* RXFIFOFIE: Rx FIFO full interrupt enable */ #define SDIO_MASK_RXFIFOFIE (1 << 17) /* TXFIFOFIE: Tx FIFO full interrupt enable */ #define SDIO_MASK_TXFIFOFIE (1 << 16) /* RXFIFOHFIE: Rx FIFO half full interrupt enable */ #define SDIO_MASK_RXFIFOHFIE (1 << 15) /* TXFIFOHEIE: Tx FIFO half empty interrupt enable */ #define SDIO_MASK_TXFIFOHEIE (1 << 14) /* RXACTIE: Data receive acting interrupt enable */ #define SDIO_MASK_RXACTIE (1 << 13) /* TXACTIE: Data transmit acting interrupt enable */ #define SDIO_MASK_TXACTIE (1 << 12) /* CMDACTIE: Command acting interrupt enable */ #define SDIO_MASK_CMDACTIE (1 << 11) /* DBCKENDIE: Data block end interrupt enable */ #define SDIO_MASK_DBCKENDIE (1 << 10) /* STBITERRIE: Start bit error interrupt enable */ #define SDIO_MASK_STBITERRIE (1 << 9) /* DATAENDIE: Data end interrupt enable */ #define SDIO_MASK_DATAENDIE (1 << 8) /* CMDSENTIE: Command sent interrupt enable */ #define SDIO_MASK_CMDSENTIE (1 << 7) /* CMDRENDIE: Command response received interrupt enable */ #define SDIO_MASK_CMDRENDIE (1 << 6) /* RXOVERRIE: Rx FIFO overrun error interrupt enable */ #define SDIO_MASK_RXOVERRIE (1 << 5) /* TXUNDERRIE: Tx FIFO underrun error interrupt enable */ #define SDIO_MASK_TXUNDERRIE (1 << 4) /* DTIMEOUTIE: Data timeout interrupt enable */ #define SDIO_MASK_DTIMEOUTIE (1 << 3) /* CTIMEOUTIE: Command timeout interrupt enable */ #define SDIO_MASK_CTIMEOUTIE (1 << 2) /* DCRCFAILIE: Data CRC fail interrupt enable */ #define SDIO_MASK_DCRCFAILIE (1 << 1) /* CCRCFAILIE: Command CRC fail interrupt enable */ #define SDIO_MASK_CCRCFAILIE (1 << 0) /* --- Function prototypes ------------------------------------------------- */ /* TODO */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/spi.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/syscfg.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/timer.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/tools.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_TOOLS_H #define LIBOPENCM3_TOOLS_H /* * Register accessors / manipulators */ /* Get register content. */ #define GET_REG(REG) ((uint16_t) *REG) /* Set register content. */ #define SET_REG(REG, VAL) (*REG = (uint16_t)VAL) /* Clear register bit. */ #define CLR_REG_BIT(REG, BIT) SET_REG(REG, (~BIT)) /* Clear register bit masking out some bits that must not be touched. */ #define CLR_REG_BIT_MSK(REG, MSK, BIT) \ SET_REG(REG, (GET_REG(REG) & MSK & (~BIT))) /* Get masked out bit value. */ #define GET_REG_BIT(REG, BIT) (GET_REG(REG) & BIT) /* * Set/reset a bit in a masked window by using toggle mechanism. * * This means that we look at the bits in the bit window designated by * the mask. If the bit in the masked window is not matching the * bit mask BIT then we write 1 and if the bit in the masked window is * matching the bit mask BIT we write 0. * * TODO: We may need a faster implementation of that one? */ #define TOG_SET_REG_BIT_MSK(REG, MSK, BIT) \ do { \ register uint16_t toggle_mask = GET_REG(REG) & (MSK); \ register uint16_t bit_selector; \ for (bit_selector = 1; bit_selector; bit_selector <<= 1) { \ if ((bit_selector & (BIT)) != 0) { \ toggle_mask ^= bit_selector; \ } \ } \ SET_REG(REG, toggle_mask); \ } while (0) #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/tsc.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/usart.h ================================================ /* This provides unification of code over STM32F subfamilies */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #if defined(STM32F0) # include #elif defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F3) # include #elif defined(STM32F4) # include #elif defined(STM32L1) # include #else # error "stm32 family not defined." #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/usb.h ================================================ /** @defgroup adc_defines USB Defines @brief Defined Constants and Types for the STM32F1xx USB Module @ingroup STM32F1xx_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Piotr Esden-Tempski @date 11 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef LIBOPENCM3_USB_H #define LIBOPENCM3_USB_H #include #include #include /* --- USB base addresses -------------------------------------------------- */ /* USB packet buffer memory base address. */ #define USB_PMA_BASE 0x40006000L /* --- USB general registers ----------------------------------------------- */ /* USB Control register */ #define USB_CNTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x40)) /* USB Interrupt status register */ #define USB_ISTR_REG (&MMIO32(USB_DEV_FS_BASE + 0x44)) /* USB Frame number register */ #define USB_FNR_REG (&MMIO32(USB_DEV_FS_BASE + 0x48)) /* USB Device address register */ #define USB_DADDR_REG (&MMIO32(USB_DEV_FS_BASE + 0x4C)) /* USB Buffer table address register */ #define USB_BTABLE_REG (&MMIO32(USB_DEV_FS_BASE + 0x50)) /* USB EP register */ #define USB_EP_REG(EP) (&MMIO32(USB_DEV_FS_BASE) + (EP)) /* --- USB control register masks / bits ----------------------------------- */ /* Interrupt mask bits, set to 1 to enable interrupt generation */ #define USB_CNTR_CTRM 0x8000 #define USB_CNTR_PMAOVRM 0x4000 #define USB_CNTR_ERRM 0x2000 #define USB_CNTR_WKUPM 0x1000 #define USB_CNTR_SUSPM 0x0800 #define USB_CNTR_RESETM 0x0400 #define USB_CNTR_SOFM 0x0200 #define USB_CNTR_ESOFM 0x0100 /* Request/Force bits */ #define USB_CNTR_RESUME 0x0010 /* Resume request */ #define USB_CNTR_FSUSP 0x0008 /* Force suspend */ #define USB_CNTR_LP_MODE 0x0004 /* Low-power mode */ #define USB_CNTR_PWDN 0x0002 /* Power down */ #define USB_CNTR_FRES 0x0001 /* Force reset */ /* --- USB interrupt status register masks / bits -------------------------- */ #define USB_ISTR_CTR 0x8000 /* Correct Transfer */ #define USB_ISTR_PMAOVR 0x4000 /* Packet Memory Area Over / Underrun */ #define USB_ISTR_ERR 0x2000 /* Error */ #define USB_ISTR_WKUP 0x1000 /* Wake up */ #define USB_ISTR_SUSP 0x0800 /* Suspend mode request */ #define USB_ISTR_RESET 0x0400 /* USB RESET request */ #define USB_ISTR_SOF 0x0200 /* Start Of Frame */ #define USB_ISTR_ESOF 0x0100 /* Expected Start Of Frame */ #define USB_ISTR_DIR 0x0010 /* Direction of transaction */ #define USB_ISTR_EP_ID 0x000F /* Endpoint Identifier */ /* --- USB interrupt status register manipulators -------------------------- */ /* Note: CTR is read only! */ #define USB_CLR_ISTR_PMAOVR() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_PMAOVR) #define USB_CLR_ISTR_ERR() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_ERR) #define USB_CLR_ISTR_WKUP() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_WKUP) #define USB_CLR_ISTR_SUSP() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_SUSP) #define USB_CLR_ISTR_RESET() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_RESET) #define USB_CLR_ISTR_SOF() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_SOF) #define USB_CLR_ISTR_ESOF() CLR_REG_BIT(USB_ISTR_REG, USB_ISTR_ESOF) /* --- USB device address register masks / bits ---------------------------- */ #define USB_DADDR_ENABLE 0x0080 #define USB_DADDR_ADDR 0x007F /* --- USB device address register manipulators ---------------------------- */ /* --- USB endpoint register offsets --------------------------------------- */ #define USB_EP0 0 #define USB_EP1 1 #define USB_EP2 2 #define USB_EP3 3 #define USB_EP4 4 #define USB_EP5 5 #define USB_EP6 6 #define USB_EP7 7 /* --- USB endpoint register masks / bits ---------------------------------- */ /* Masks and toggle bits */ #define USB_EP_RX_CTR 0x8000 /* Correct transfer RX */ #define USB_EP_RX_DTOG 0x4000 /* Data toggle RX */ #define USB_EP_RX_STAT 0x3000 /* Endpoint status for RX */ #define USB_EP_SETUP 0x0800 /* Setup transaction completed */ #define USB_EP_TYPE 0x0600 /* Endpoint type */ #define USB_EP_KIND 0x0100 /* Endpoint kind. * When set and type=bulk -> double buffer * When set and type=control -> status out */ #define USB_EP_TX_CTR 0x0080 /* Correct transfer TX */ #define USB_EP_TX_DTOG 0x0040 /* Data toggle TX */ #define USB_EP_TX_STAT 0x0030 /* Endpoint status for TX */ #define USB_EP_ADDR 0x000F /* Endpoint Address */ /* Masking all toggle bits */ #define USB_EP_NTOGGLE_MSK (USB_EP_RX_CTR | \ USB_EP_SETUP | \ USB_EP_TYPE | \ USB_EP_KIND | \ USB_EP_TX_CTR | \ USB_EP_ADDR) /* All non toggle bits plus EP_RX toggle bits */ #define USB_EP_RX_STAT_TOG_MSK (USB_EP_RX_STAT | USB_EP_NTOGGLE_MSK) /* All non toggle bits plus EP_TX toggle bits */ #define USB_EP_TX_STAT_TOG_MSK (USB_EP_TX_STAT | USB_EP_NTOGGLE_MSK) /* Endpoint status bits for USB_EP_RX_STAT bit field */ #define USB_EP_RX_STAT_DISABLED 0x0000 #define USB_EP_RX_STAT_STALL 0x1000 #define USB_EP_RX_STAT_NAK 0x2000 #define USB_EP_RX_STAT_VALID 0x3000 /* Endpoint status bits for USB_EP_TX_STAT bit field */ #define USB_EP_TX_STAT_DISABLED 0x0000 #define USB_EP_TX_STAT_STALL 0x0010 #define USB_EP_TX_STAT_NAK 0x0020 #define USB_EP_TX_STAT_VALID 0x0030 /* Endpoint type bits for USB_EP_TYPE bit field */ #define USB_EP_TYPE_BULK 0x0000 #define USB_EP_TYPE_CONTROL 0x0200 #define USB_EP_TYPE_ISO 0x0400 #define USB_EP_TYPE_INTERRUPT 0x0600 /* --- USB endpoint register manipulators ---------------------------------- */ /* * Set USB endpoint tx/rx status. * * USB status field is changed using an awkward toggle mechanism, that * is why we use some helper macros for that. */ #define USB_SET_EP_RX_STAT(EP, STAT) \ TOG_SET_REG_BIT_MSK(USB_EP_REG(EP), USB_EP_RX_STAT_TOG_MSK, STAT) #define USB_SET_EP_TX_STAT(EP, STAT) \ TOG_SET_REG_BIT_MSK(USB_EP_REG(EP), USB_EP_TX_STAT_TOG_MSK, STAT) /* * Macros for clearing and setting USB endpoint register bits that do * not use the toggle mechanism. * * Because the register contains some bits that use the toggle * mechanism we need a helper macro here. Otherwise the code gets really messy. */ #define USB_CLR_EP_NTOGGLE_BIT(EP, BIT) \ CLR_REG_BIT_MSK(USB_EP_REG(EP), USB_EP_NTOGGLE_MSK, BIT) #define USB_CLR_EP_RX_CTR(EP) \ USB_CLR_EP_NTOGGLE_BIT(EP, USB_EP_RX_CTR) #define USB_CLR_EP_TX_CTR(EP) \ USB_CLR_EP_NTOGGLE_BIT(EP, USB_EP_TX_CTR) #define USB_SET_EP_TYPE(EP, TYPE) \ SET_REG(USB_EP_REG(EP), \ (GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK & \ (~USB_EP_TYPE))) | TYPE) #define USB_SET_EP_KIND(EP) \ SET_REG(USB_EP_REG(EP), \ (GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK & \ (~USB_EP_KIND))) | USB_EP_KIND) #define USB_CLR_EP_KIND(EP) \ SET_REG(USB_EP_REG(EP), \ (GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK & (~USB_EP_KIND)))) #define USB_SET_EP_STAT_OUT(EP) USB_SET_EP_KIND(EP) #define USB_CLR_EP_STAT_OUT(EP) USB_CLR_EP_KIND(EP) #define USB_SET_EP_ADDR(EP, ADDR) \ SET_REG(USB_EP_REG(EP), \ ((GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK & \ (~USB_EP_ADDR))) | ADDR)) /* Macros for clearing DTOG bits */ #define USB_CLR_EP_TX_DTOG(EP) \ SET_REG(USB_EP_REG(EP), \ GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK | USB_EP_TX_DTOG)) #define USB_CLR_EP_RX_DTOG(EP) \ SET_REG(USB_EP_REG(EP), \ GET_REG(USB_EP_REG(EP)) & \ (USB_EP_NTOGGLE_MSK | USB_EP_RX_DTOG)) /* --- USB BTABLE registers ------------------------------------------------ */ #define USB_GET_BTABLE GET_REG(USB_BTABLE_REG) #define USB_EP_TX_ADDR(EP) \ ((uint32_t *)(USB_PMA_BASE + (USB_GET_BTABLE + EP * 8 + 0) * 2)) #define USB_EP_TX_COUNT(EP) \ ((uint32_t *)(USB_PMA_BASE + (USB_GET_BTABLE + EP * 8 + 2) * 2)) #define USB_EP_RX_ADDR(EP) \ ((uint32_t *)(USB_PMA_BASE + (USB_GET_BTABLE + EP * 8 + 4) * 2)) #define USB_EP_RX_COUNT(EP) \ ((uint32_t *)(USB_PMA_BASE + (USB_GET_BTABLE + EP * 8 + 6) * 2)) /* --- USB BTABLE manipulators --------------------------------------------- */ #define USB_GET_EP_TX_ADDR(EP) GET_REG(USB_EP_TX_ADDR(EP)) #define USB_GET_EP_TX_COUNT(EP) GET_REG(USB_EP_TX_COUNT(EP)) #define USB_GET_EP_RX_ADDR(EP) GET_REG(USB_EP_RX_ADDR(EP)) #define USB_GET_EP_RX_COUNT(EP) GET_REG(USB_EP_RX_COUNT(EP)) #define USB_SET_EP_TX_ADDR(EP, ADDR) SET_REG(USB_EP_TX_ADDR(EP), ADDR) #define USB_SET_EP_TX_COUNT(EP, COUNT) SET_REG(USB_EP_TX_COUNT(EP), COUNT) #define USB_SET_EP_RX_ADDR(EP, ADDR) SET_REG(USB_EP_RX_ADDR(EP), ADDR) #define USB_SET_EP_RX_COUNT(EP, COUNT) SET_REG(USB_EP_RX_COUNT(EP), COUNT) #define USB_GET_EP_TX_BUFF(EP) \ (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_TX_ADDR(EP) * 2)) #define USB_GET_EP_RX_BUFF(EP) \ (USB_PMA_BASE + (uint8_t *)(USB_GET_EP_RX_ADDR(EP) * 2)) #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/usb_desc.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_USB_DESC #define LIBOPENCM3_USB_DESC /* Descriptor types */ #define USB_DT_DEVICE 0x01 #define USB_DT_CONF 0x02 #define USB_DT_STRING 0x03 #define USB_DT_INTERFACE 0x04 #define USB_DT_ENDPOINT 0x05 struct usb_desc_head { uint8_t length; /* Descriptor size 0x012 */ uint8_t type; /* Descriptor type ID */ }; struct usb_device_desc { struct usb_desc_head h; /* Size 0x12, ID 0x01 */ uint16_t bcd_usb; /* USB Version */ uint8_t class; /* Device class */ uint8_t sub_class; /* Subclass code */ uint8_t protocol; /* Protocol code */ uint8_t max_psize; /* Maximum packet size -> 64bytes */ uint16_t vendor; /* Vendor number */ uint16_t product; /* Device number */ uint16_t bcd_dev; /* Device version */ uint8_t man_desc; /* Index of manufacturer string desc */ uint8_t prod_desc; /* Index of product string desc */ uint8_t sn_desc; /* Index of serial number string desc */ uint8_t num_conf; /* Number of possible configurations */ }; struct usb_conf_desc_header { struct usb_desc_head h; /* Size 0x09, Id 0x02 */ uint16_t tot_leng; /* Total length of data */ uint8_t num_int; /* Number of interfaces */ uint8_t conf_val; /* Configuration selector */ uint8_t conf_desc; /* Index of conf string desc */ uint8_t attr; /* Attribute bitmap: * 7 : Bus powered * 6 : Self powered * 5 : Remote wakeup * 4..0 : Reserved -> 0000 */ uint8_t max_power; /* Maximum power consumption in 2mA steps */ }; struct usb_int_desc_header { struct usb_desc_head h; /* Size 0x09, Id 0x04 */ uint8_t iface_num; /* Interface id number */ uint8_t alt_setting; /* Alternative setting selector */ uint8_t num_endp; /* Endpoints used */ uint8_t class; /* Interface class */ uint8_t sub_class; /* Subclass code */ uint8_t protocol; /* Protocol code */ uint8_t iface_desc; /* Index of interface string desc */ }; struct usb_ep_desc { struct usb_desc_head h; /* Size 0x07, Id 0x05 */ uint8_t ep_addr; /* Endpoint address: 0..3 : Endpoint Number 4..6 : Reserved -> 0 7 : Direction 0=out 1=in */ uint8_t ep_attr; /* Endpoint attributes */ uint16_t max_psize; /* Maximum packet size -> 64bytes */ uint8_t interval; /* Interval for polling endpoint data. Ignored for bulk & control endpoints. */ }; struct usb_conf_desc { struct usb_conf_desc_header cdh; struct usb_int_desc_header idh; struct usb_ep_desc ep[]; }; struct usb_string_desc { struct usb_desc_head h; /* Size > 0x02, Id 0x03 */ uint16_t string[]; /* String UTF16 encoded */ }; #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/stm32/wwdg.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef LIBOPENCM3_WWDG_H #define LIBOPENCM3_WWDG_H #include #include /* --- WWDG registers ------------------------------------------------------ */ /* Control register (WWDG_CR) */ #define WWDG_CR MMIO32(WWDG_BASE + 0x00) /* Configuration register (WWDG_CFR) */ #define WWDG_CFR MMIO32(WWDG_BASE + 0x04) /* Status register (WWDG_SR) */ #define WWDG_SR MMIO32(WWDG_BASE + 0x08) /* --- WWDG_CR values ------------------------------------------------------ */ /* Bits [31:8]: Reserved */ /* WDGA: Activation bit */ #define WWDG_CR_WDGA (1 << 7) /* T[6:0]: 7-bit counter (MSB to LSB) */ #define WWDG_CR_T_LSB 0 #define WWDG_CR_T0 (1 << 0) #define WWDG_CR_T1 (1 << 1) #define WWDG_CR_T2 (1 << 2) #define WWDG_CR_T3 (1 << 3) #define WWDG_CR_T4 (1 << 4) #define WWDG_CR_T5 (1 << 5) #define WWDG_CR_T6 (1 << 6) /* --- WWDG_CFR values ----------------------------------------------------- */ /* Bits [31:10]: Reserved */ /* EWI: Early wakeup interrupt */ #define WWDG_CFR_EWI (1 << 9) /* WDGTB[8:7]: Timer base */ #define WWDG_CFR_WDGTB_LSB 7 #define WWDG_CFR_WDGTB_CK_DIV1 0x0 #define WWDG_CFR_WDGTB_CK_DIV2 0x1 #define WWDG_CFR_WDGTB_CK_DIV4 0x2 #define WWDG_CFR_WDGTB_CK_DIV8 0x3 /* W[6:0]: 7-bit window value */ #define WWDG_CFG_W_LSB 0 #define WWDG_CFG_W (1 << 0) /* --- WWDG_SR values ------------------------------------------------------ */ /* Bits [31:1]: Reserved */ /* EWIF: Early wakeup interrupt flag */ #define WWDG_SR_EWIF (1 << 0) /* --- WWDG function prototypes---------------------------------------------- */ /* TODO */ #endif ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/cdc.h ================================================ /** @defgroup usb_cdc_defines USB CDC Type Definitions @brief Defined Constants and Types for the USB CDC Type Definitions @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __CDC_H #define __CDC_H /* Definitions of Communications Device Class from * "Universal Serial Bus Class Definitions for Communications Devices * Revision 1.2" */ /* Table 2: Communications Device Class Code */ #define USB_CLASS_CDC 0x02 /* Table 4: Class Subclass Code */ #define USB_CDC_SUBCLASS_DLCM 0x01 #define USB_CDC_SUBCLASS_ACM 0x02 /* ... */ /* Table 5 Communications Interface Class Control Protocol Codes */ #define USB_CDC_PROTOCOL_NONE 0x00 #define USB_CDC_PROTOCOL_AT 0x01 /* ... */ /* Table 6: Data Interface Class Code */ #define USB_CLASS_DATA 0x0A /* Table 12: Type Values for the bDescriptorType Field */ #define CS_INTERFACE 0x24 #define CS_ENDPOINT 0x25 /* Table 13: bDescriptor SubType in Communications Class Functional * Descriptors */ #define USB_CDC_TYPE_HEADER 0x00 #define USB_CDC_TYPE_CALL_MANAGEMENT 0x01 #define USB_CDC_TYPE_ACM 0x02 /* ... */ #define USB_CDC_TYPE_UNION 0x06 /* ... */ /* Table 15: Class-Specific Descriptor Header Format */ struct usb_cdc_header_descriptor { uint8_t bFunctionLength; uint8_t bDescriptorType; uint8_t bDescriptorSubtype; uint16_t bcdCDC; } __attribute__((packed)); /* Table 16: Union Interface Functional Descriptor */ struct usb_cdc_union_descriptor { uint8_t bFunctionLength; uint8_t bDescriptorType; uint8_t bDescriptorSubtype; uint8_t bControlInterface; uint8_t bSubordinateInterface0; /* ... */ } __attribute__((packed)); /* Definitions for Abstract Control Model devices from: * "Universal Serial Bus Communications Class Subclass Specification for * PSTN Devices" */ /* Table 3: Call Management Functional Descriptor */ struct usb_cdc_call_management_descriptor { uint8_t bFunctionLength; uint8_t bDescriptorType; uint8_t bDescriptorSubtype; uint8_t bmCapabilities; uint8_t bDataInterface; } __attribute__((packed)); /* Table 4: Abstract Control Management Functional Descriptor */ struct usb_cdc_acm_descriptor { uint8_t bFunctionLength; uint8_t bDescriptorType; uint8_t bDescriptorSubtype; uint8_t bmCapabilities; } __attribute__((packed)); /* Table 13: Class-Specific Request Codes for PSTN subclasses */ /* ... */ #define USB_CDC_REQ_SET_LINE_CODING 0x20 /* ... */ #define USB_CDC_REQ_SET_CONTROL_LINE_STATE 0x22 /* ... */ /* Table 17: Line Coding Structure */ struct usb_cdc_line_coding { uint32_t dwDTERate; uint8_t bCharFormat; uint8_t bParityType; uint8_t bDataBits; } __attribute__((packed)); /* Table 30: Class-Specific Notification Codes for PSTN subclasses */ /* ... */ #define USB_CDC_NOTIFY_SERIAL_STATE 0x20 /* ... */ /* Notification Structure */ struct usb_cdc_notification { uint8_t bmRequestType; uint8_t bNotification; uint16_t wValue; uint16_t wIndex; uint16_t wLength; } __attribute__((packed)); #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/dfu.h ================================================ /** @defgroup usb_dfu_defines USB DFU Type Definitions @brief Defined Constants and Types for the USB DFU Type Definitions @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __DFU_H #define __DFU_H enum dfu_req { DFU_DETACH, DFU_DNLOAD, DFU_UPLOAD, DFU_GETSTATUS, DFU_CLRSTATUS, DFU_GETSTATE, DFU_ABORT, }; enum dfu_status { DFU_STATUS_OK, DFU_STATUS_ERR_TARGET, DFU_STATUS_ERR_FILE, DFU_STATUS_ERR_WRITE, DFU_STATUS_ERR_ERASE, DFU_STATUS_ERR_CHECK_ERASED, DFU_STATUS_ERR_PROG, DFU_STATUS_ERR_VERIFY, DFU_STATUS_ERR_ADDRESS, DFU_STATUS_ERR_NOTDONE, DFU_STATUS_ERR_FIRMWARE, DFU_STATUS_ERR_VENDOR, DFU_STATUS_ERR_USBR, DFU_STATUS_ERR_POR, DFU_STATUS_ERR_UNKNOWN, DFU_STATUS_ERR_STALLEDPKT, }; enum dfu_state { STATE_APP_IDLE, STATE_APP_DETACH, STATE_DFU_IDLE, STATE_DFU_DNLOAD_SYNC, STATE_DFU_DNBUSY, STATE_DFU_DNLOAD_IDLE, STATE_DFU_MANIFEST_SYNC, STATE_DFU_MANIFEST, STATE_DFU_MANIFEST_WAIT_RESET, STATE_DFU_UPLOAD_IDLE, STATE_DFU_ERROR, }; #define DFU_FUNCTIONAL 0x21 struct usb_dfu_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bmAttributes; #define USB_DFU_CAN_DOWNLOAD 0x01 #define USB_DFU_CAN_UPLOAD 0x02 #define USB_DFU_MANIFEST_TOLERANT 0x04 #define USB_DFU_WILL_DETACH 0x08 uint16_t wDetachTimeout; uint16_t wTransferSize; uint16_t bcdDFUVersion; } __attribute__((packed)); #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/doc-usb.h ================================================ /** @mainpage libopencm3 Generic USB @version 1.0.0 @date 10 March 2013 API documentation for Generic USB. LGPL License Terms @ref lgpl_license */ /** @defgroup USB Generic USB Libraries for Generic USB. @version 1.0.0 @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /** @defgroup USB_defines Generic USB Defines @brief Defined Constants and Types for Generic USB. @version 1.0.0 @date 10 March 2013 LGPL License Terms @ref lgpl_license */ ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/hid.h ================================================ /** @defgroup usb_hid_defines USB HID Type Definitions @brief Defined Constants and Types for the USB HID Type Definitions @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __HID_H #define __HID_H #include #define USB_CLASS_HID 3 #define USB_DT_HID 0x21 #define USB_DT_REPORT 0x22 struct usb_hid_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdHID; uint8_t bCountryCode; uint8_t bNumDescriptors; } __attribute__((packed)); #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/usbd.h ================================================ /** @defgroup usb_driver_defines USB Drivers @brief Defined Constants and Types for the USB Drivers @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __USBD_H #define __USBD_H #include BEGIN_DECLS enum usbd_request_return_codes { USBD_REQ_NOTSUPP = 0, USBD_REQ_HANDLED = 1, USBD_REQ_NEXT_CALLBACK = 2, }; typedef struct _usbd_driver usbd_driver; typedef struct _usbd_device usbd_device; extern const usbd_driver stm32f103_usb_driver; extern const usbd_driver stm32f107_usb_driver; extern const usbd_driver stm32f207_usb_driver; #define otgfs_usb_driver stm32f107_usb_driver #define otghs_usb_driver stm32f207_usb_driver /* */ extern usbd_device * usbd_init(const usbd_driver *driver, const struct usb_device_descriptor *dev, const struct usb_config_descriptor *conf, const char **strings, int num_strings, uint8_t *control_buffer, uint16_t control_buffer_size); extern void usbd_register_reset_callback(usbd_device *usbd_dev, void (*callback)(void)); extern void usbd_register_suspend_callback(usbd_device *usbd_dev, void (*callback)(void)); extern void usbd_register_resume_callback(usbd_device *usbd_dev, void (*callback)(void)); extern void usbd_register_sof_callback(usbd_device *usbd_dev, void (*callback)(void)); typedef int (*usbd_control_callback)(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len, void (**complete)(usbd_device *usbd_dev, struct usb_setup_data *req)); /* */ extern int usbd_register_control_callback(usbd_device *usbd_dev, uint8_t type, uint8_t type_mask, usbd_control_callback callback); /* */ extern void usbd_register_set_config_callback(usbd_device *usbd_dev, void (*callback)(usbd_device *usbd_dev, uint16_t wValue)); /* Functions to be provided by the hardware abstraction layer */ extern void usbd_poll(usbd_device *usbd_dev); extern void usbd_disconnect(usbd_device *usbd_dev, bool disconnected); extern void usbd_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback)(usbd_device *usbd_dev, uint8_t ep)); extern uint16_t usbd_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len); extern uint16_t usbd_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len); extern void usbd_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall); extern uint8_t usbd_ep_stall_get(usbd_device *usbd_dev, uint8_t addr); extern void usbd_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak); /* Optional */ extern void usbd_cable_connect(usbd_device *usbd_dev, uint8_t on); END_DECLS #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencm3/usb/usbstd.h ================================================ /** @defgroup usb_type_defines USB Standard Structure Definitions @brief Defined Constants and Types for the USB Standard Structure Definitions @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 A set of structure definitions for the USB control structures defined in chapter 9 of the "Univeral Serial Bus Specification Revision 2.0" Available from the USB Implementers Forum - http://www.usb.org/ LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __USBSTD_H #define __USBSTD_H #include #include /* * This file contains structure definitions for the USB control structures * defined in chapter 9 of the "Univeral Serial Bus Specification Revision 2.0" * Available from the USB Implementers Forum - http://www.usb.org/ */ /* USB Setup Data structure - Table 9-2 */ struct usb_setup_data { uint8_t bmRequestType; uint8_t bRequest; uint16_t wValue; uint16_t wIndex; uint16_t wLength; } __attribute__((packed)); /* Class Definition */ #define USB_CLASS_VENDOR 0xFF /* bmRequestType bit definitions */ #define USB_REQ_TYPE_IN 0x80 #define USB_REQ_TYPE_STANDARD 0x00 #define USB_REQ_TYPE_CLASS 0x20 #define USB_REQ_TYPE_VENDOR 0x40 #define USB_REQ_TYPE_DEVICE 0x00 #define USB_REQ_TYPE_INTERFACE 0x01 #define USB_REQ_TYPE_ENDPOINT 0x02 #define USB_REQ_TYPE_DIRECTION 0x80 #define USB_REQ_TYPE_TYPE 0x60 #define USB_REQ_TYPE_RECIPIENT 0x1F /* USB Standard Request Codes - Table 9-4 */ #define USB_REQ_GET_STATUS 0 #define USB_REQ_CLEAR_FEATURE 1 /* Reserved for future use: 2 */ #define USB_REQ_SET_FEATURE 3 /* Reserved for future use: 3 */ #define USB_REQ_SET_ADDRESS 5 #define USB_REQ_GET_DESCRIPTOR 6 #define USB_REQ_SET_DESCRIPTOR 7 #define USB_REQ_GET_CONFIGURATION 8 #define USB_REQ_SET_CONFIGURATION 9 #define USB_REQ_GET_INTERFACE 10 #define USB_REQ_SET_INTERFACE 11 #define USB_REQ_SET_SYNCH_FRAME 12 /* USB Descriptor Types - Table 9-5 */ #define USB_DT_DEVICE 1 #define USB_DT_CONFIGURATION 2 #define USB_DT_STRING 3 #define USB_DT_INTERFACE 4 #define USB_DT_ENDPOINT 5 #define USB_DT_DEVICE_QUALIFIER 6 #define USB_DT_OTHER_SPEED_CONFIGURATION 7 #define USB_DT_INTERFACE_POWER 8 /* From ECNs */ #define USB_DT_OTG 9 #define USB_DT_DEBUG 10 #define USB_DT_INTERFACE_ASSOCIATION 11 /* USB Standard Feature Selectors - Table 9-6 */ #define USB_FEAT_ENDPOINT_HALT 0 #define USB_FEAT_DEVICE_REMOTE_WAKEUP 1 #define USB_FEAT_TEST_MODE 2 /* Information Returned by a GetStatus() Request to a Device - Figure 9-4 */ #define USB_DEV_STATUS_SELF_POWERED 0x01 #define USB_DEV_STATUS_REMOTE_WAKEUP 0x02 /* USB Standard Device Descriptor - Table 9-8 */ struct usb_device_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; uint16_t idVendor; uint16_t idProduct; uint16_t bcdDevice; uint8_t iManufacturer; uint8_t iProduct; uint8_t iSerialNumber; uint8_t bNumConfigurations; } __attribute__((packed)); #define USB_DT_DEVICE_SIZE sizeof(struct usb_device_descriptor) /* USB Device_Qualifier Descriptor - Table 9-9 * Not used in this implementation. */ struct usb_device_qualifier_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t bcdUSB; uint8_t bDeviceClass; uint8_t bDeviceSubClass; uint8_t bDeviceProtocol; uint8_t bMaxPacketSize0; uint8_t bNumConfigurations; uint8_t bReserved; } __attribute__((packed)); /* USB Standard Configuration Descriptor - Table 9-10 */ struct usb_config_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t wTotalLength; uint8_t bNumInterfaces; uint8_t bConfigurationValue; uint8_t iConfiguration; uint8_t bmAttributes; uint8_t bMaxPower; /* Descriptor ends here. The following are used internally: */ const struct usb_interface { int num_altsetting; const struct usb_iface_assoc_descriptor *iface_assoc; const struct usb_interface_descriptor *altsetting; } *interface; } __attribute__((packed)); #define USB_DT_CONFIGURATION_SIZE 9 /* USB Configuration Descriptor bmAttributes bit definitions */ #define USB_CONFIG_ATTR_SELF_POWERED 0x40 #define USB_CONFIG_ATTR_REMOTE_WAKEUP 0x20 /* Other Speed Configuration is the same as Configuration Descriptor. * - Table 9-11 */ /* USB Standard Interface Descriptor - Table 9-12 */ struct usb_interface_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bInterfaceNumber; uint8_t bAlternateSetting; uint8_t bNumEndpoints; uint8_t bInterfaceClass; uint8_t bInterfaceSubClass; uint8_t bInterfaceProtocol; uint8_t iInterface; /* Descriptor ends here. The following are used internally: */ const struct usb_endpoint_descriptor *endpoint; const void *extra; int extralen; } __attribute__((packed)); #define USB_DT_INTERFACE_SIZE 9 /* USB Standard Endpoint Descriptor - Table 9-13 */ struct usb_endpoint_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bEndpointAddress; uint8_t bmAttributes; uint16_t wMaxPacketSize; uint8_t bInterval; } __attribute__((packed)); #define USB_DT_ENDPOINT_SIZE sizeof(struct usb_endpoint_descriptor) /* USB Endpoint Descriptor bmAttributes bit definitions */ #define USB_ENDPOINT_ATTR_CONTROL 0x00 #define USB_ENDPOINT_ATTR_ISOCHRONOUS 0x01 #define USB_ENDPOINT_ATTR_BULK 0x02 #define USB_ENDPOINT_ATTR_INTERRUPT 0x03 #define USB_ENDPOINT_ATTR_NOSYNC 0x00 #define USB_ENDPOINT_ATTR_ASYNC 0x04 #define USB_ENDPOINT_ATTR_ADAPTIVE 0x08 #define USB_ENDPOINT_ATTR_SYNC 0x0C #define USB_ENDPOINT_ATTR_DATA 0x00 #define USB_ENDPOINT_ATTR_FEEDBACK 0x10 #define USB_ENDPOINT_ATTR_IMPLICIT_FEEDBACK_DATA 0x20 /* Table 9-15 specifies String Descriptor Zero. * Table 9-16 specified UNICODE String Descriptor. */ struct usb_string_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint16_t wData[]; } __attribute__((packed)); /* From ECN: Interface Association Descriptors, Table 9-Z */ struct usb_iface_assoc_descriptor { uint8_t bLength; uint8_t bDescriptorType; uint8_t bFirstInterface; uint8_t bInterfaceCount; uint8_t bFunctionClass; uint8_t bFunctionSubClass; uint8_t bFunctionProtocol; uint8_t iFunction; } __attribute__((packed)); #define USB_DT_INTERFACE_ASSOCIATION_SIZE \ sizeof(struct usb_iface_assoc_descriptor) enum usb_language_id { USB_LANGID_ENGLISH_US = 0x409, }; #endif /**@}*/ ================================================ FILE: firmware/libopencm3/include/libopencmsis/core_cm3.h ================================================ /* big fat FIXME: this should use a consistent structure, and reference * functionality from libopencm3 instead of copypasting. * * particularly unimplemented features are FIXME'd extra * */ /* the original core_cm3.h is nonfree by arm; this provides libopencm3 variant * of the symbols efm32lib needs of CMSIS. */ #ifndef OPENCMSIS_CORECM3_H #define OPENCMSIS_CORECM3_H #include #include #include #include #include /* needed by system_efm32.h:196, guessing */ #define __INLINE inline /* new since emlib 3.0 */ #define __STATIC_INLINE static inline /* needed around efm32tg840f32.h:229. comparing the efm32lib definitions to the * libopencm3 ones, "volatile" is all that's missing. */ #define __IO volatile #define __O volatile #define __I volatile /* -> style access for what is defined in libopencm3/stm32/f1/scb.h / * cm3/memorymap.h, as it's needed by efm32lib/inc/efm32_emu.h */ /* from cm3/scb.h */ #define SCB_SCR_SLEEPDEEP_Msk SCB_SCR_SLEEPDEEP /* structure as in, for example, * DeviceSupport/EnergyMicro/EFM32/efm32tg840f32.h, data from * libopencm3/cm3/scb.h. FIXME incomplete. */ typedef struct { __IO uint32_t CPUID; __IO uint32_t ICSR; __IO uint32_t VTOR; __IO uint32_t AIRCR; __IO uint32_t SCR; __IO uint32_t CCR; __IO uint8_t SHPR[12]; /* FIXME: how is this properly indexed? */ __IO uint32_t SHCSR; } SCB_TypeDef; #define SCB ((SCB_TypeDef *) SCB_BASE) /* needed by efm32_emu.h, guessing and taking the implementation used in * lightswitch-interrupt.c */ #define __WFI() __asm__("wfi") /* needed by efm32_cmu.h, probably it's just what gcc provides anyway */ #define __CLZ(div) __builtin_clz(div) /* needed by efm32_aes.c. __builtin_bswap32 does the same thing as the rev * instruction according to https://bugzilla.mozilla.org/show_bug.cgi?id=600106 */ #define __REV(x) __builtin_bswap32(x) /* stubs for efm32_dbg.h */ typedef struct { uint32_t DHCSR; uint32_t DEMCR; /* needed by efm32tg stk trace.c */ } CoreDebug_TypeDef; /* FIXME let's just hope writes to flash are protected */ #define CoreDebug ((CoreDebug_TypeDef *) 0) #define CoreDebug_DHCSR_C_DEBUGEN_Msk 0 #define CoreDebug_DEMCR_TRCENA_Msk 0 /* stubs for efm32_dma */ static inline void NVIC_ClearPendingIRQ(uint8_t irqn) { nvic_clear_pending_irq(irqn); } static inline void NVIC_EnableIRQ(uint8_t irqn) { nvic_enable_irq(irqn); } static inline void NVIC_DisableIRQ(uint8_t irqn) { nvic_disable_irq(irqn); } /* stubs for efm32_int. FIXME: how do they do that? nvic documentation in the * efm32 core manual doesn't tell anything of a global on/off switch */ #define __enable_irq() 1 #define __disable_irq() 1 /* stubs for efm32_mpu FIXME */ #define SCB_SHCSR_MEMFAULTENA_Msk 0 typedef struct { uint32_t CTRL; uint32_t RNR; uint32_t RBAR; uint32_t RASR; } MPU_TypeDef; /* FIXME struct at NULL */ #define MPU ((MPU_TypeDef *) 0) #define MPU_CTRL_ENABLE_Msk 0 #define MPU_RASR_XN_Pos 0 #define MPU_RASR_AP_Pos 0 #define MPU_RASR_TEX_Pos 0 #define MPU_RASR_S_Pos 0 #define MPU_RASR_C_Pos 0 #define MPU_RASR_B_Pos 0 #define MPU_RASR_SRD_Pos 0 #define MPU_RASR_SIZE_Pos 0 #define MPU_RASR_ENABLE_Pos 0 /* required for the blink example */ /* if if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1) ; * configures the sys ticks to 1ms, then the argument to SysTick_Config * describes how many cycles to wait between two systicks. * * the endless loop part looks like an "if it returns an error condition, * rather loop here than continue"; every other solution would involve things * that are dark magic to my understanding. * * implementation more or less copypasted from lib/stm32/systick.c, FIXME until * the generic cm3 functionality is moved out from stm32 and can be used here * easily (systick_set_reload, systick_interrupt_enable, systick_counter_enable * and systick_set_clocksource). * * modified for CMSIS style array as the powertest example needs it. * */ /* from d0002_efm32_cortex-m3_reference_manual.pdf section 4.4 */ typedef struct { uint32_t CTRL; uint32_t LOAD; uint32_t VAL; uint32_t CALIB; } SysTick_TypeDef; #define SysTick ((SysTick_TypeDef *) SYS_TICK_BASE) static inline uint32_t SysTick_Config(uint32_t n_ticks) { /* constant from systick_set_reload -- as this returns something that's * not void, this is the only possible error condition */ if (n_ticks & ~0x00FFFFFF) { return 1; } systick_set_reload(n_ticks); systick_set_clocksource(true); systick_interrupt_enable(); systick_counter_enable(); return 0; } /* stubs for efm32tg stk trace.c */ typedef struct { uint32_t LAR; uint32_t TCR; } ITM_TypeDef; /* FIXME struct at NULL */ #define ITM ((ITM_TypeDef *) 0) /* blink.h expects the isr for systicks to be named SysTick_Handler. with this, * its Systick_Handler function gets renamed to the weak symbol exported by * vector.c */ #define SysTick_Handler sys_tick_handler /* FIXME: this needs to be done for all of the 14 hard vectors */ #include #endif ================================================ FILE: firmware/libopencm3/include/libopencmsis/dispatch/irqhandlers.h ================================================ #if defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F4) # include #elif defined(EFM32TG) # include #elif defined(EFM32G) # include #elif defined(EFM32LG) # include #elif defined(EFM32GG) # include #elif defined(LPC43XX) # include #else # warning"no chipset defined; user interrupts are not redirected" #endif ================================================ FILE: firmware/libopencm3/ld/devices.data ================================================ ################################################################################ # # Device chip tree definition file. # # Copyright (c) 2013 Frantisek Burian # Copyright (C) 2013 Werner Almesberger # # Line description: # ( ...) # # : is the pattern for the chip description to be searched for. # The case of the pattern string is ignored. # Pattern match symbols: # ? - matches exactly one character # * - matches none or more characters # + - matches single or more characters # # : is the parent group name, where the search will continue. # There are special parents names that controls traversing: # "END" - Exit traversal. # "+" - Don't change the parent. Use for split long line to two. # # : space-separated list of preprocessor symbols supplied to the linker. # -D option name is automatically prepended to each symbol definition # # All lines starting with # symbol are treated as Comments # # Recommended tree hierarchy: # # # +- # +- # +- END # # You can split the long line into two or more by using "+" in the parent field, # and defining same regex with appropriate parent on the next line. Example: # # device + PARAM1=aaa PARAM2=bbbb PARAM3=ccc PARAM4=dddd PARAM5=eeee # device parent PARAM6=ffff PARAM7=gggg PARAM8=hhhh # parent END # # The order of the lines is important. After the regex match, its parent will # be used for match on the next line. If two regexp lines matches input, only # the first will be evaluated, except special group definition "+" # # The regex matches entire sym ################################################################################ # the STM32 chips stm32f05[01]?4* stm32f0 ROM=16K RAM=4K stm32f05[01]?6* stm32f0 ROM=32K RAM=4K stm32f051?8* stm32f0 ROM=64K RAM=8K stm32f10[012]?4* stm32f1 ROM=16K RAM=4K stm32f103?4* stm32f1 ROM=16K RAM=6K stm32f100?6* stm32f1 ROM=32K RAM=4K stm32f103?6* stm32f1 ROM=32K RAM=10K stm32f10[12]?6* stm32f1 ROM=32K RAM=6K stm32f100?8* stm32f1 ROM=64K RAM=8K stm32f10[12]?8* stm32f1 ROM=64K RAM=10K stm32f103?8* stm32f1 ROM=64K RAM=20K stm32f100?b* stm32f1 ROM=128K RAM=8K stm32f10[12]?b* stm32f1 ROM=128K RAM=16K stm32f103?b* stm32f1 ROM=128K RAM=20K stm32f10[57]?b* stm32f1 ROM=128K RAM=64K stm32f100?c* stm32f1 ROM=256K RAM=24K stm32f101?c* stm32f1 ROM=256K RAM=32K stm32f103?c* stm32f1 ROM=256K RAM=48K stm32f10[57]?c* stm32f1 ROM=256K RAM=64K stm32f100?d* stm32f1 ROM=384K RAM=32K stm32f101?d* stm32f1 ROM=384K RAM=48K stm32f103?d* stm32f1 ROM=384K RAM=64K stm32f100?e* stm32f1 ROM=512K RAM=32K stm32f101?e* stm32f1 ROM=512K RAM=48K stm32f103?e* stm32f1 ROM=512K RAM=64K stm32f100?f* stm32f1 ROM=768K RAM=80K stm32f103?f* stm32f1 ROM=768K RAM=96K stm32f100?g* stm32f1 ROM=1024K RAM=80K stm32f103?g* stm32f1 ROM=1024K RAM=96K stm32f205?b* stm32f2 ROM=128K RAM=64K stm32f205?c* stm32f2 ROM=256K RAM=96K stm32f207?c* stm32f2 ROM=256K RAM=128K stm32f2[01][57]?e* stm32f2 ROM=512K RAM=128K stm32f20[57]?f* stm32f2 ROM=768K RAM=128K stm32f2[01][57]?g* stm32f2 ROM=1024K RAM=128K stm32f302?b* stm32f3ccm ROM=128K RAM=24K CCM=8K stm32f302?c* stm32f3ccm ROM=256K RAM=32K CCM=8K stm32f303?b* stm32f3ccm ROM=128K RAM=40K CCM=8K stm32f3[01]3?c* stm32f3ccm ROM=256K RAM=48K CCM=8K stm32f373?8* stm32f3 ROM=64K RAM=16K stm32f373?b* stm32f3 ROM=128K RAM=24K stm32f3[78]3?8* stm32f3 ROM=256K RAM=32K stm32f401?b* stm32f4 ROM=128K RAM=64K stm32f401?c* stm32f4 ROM=256K RAM=64K stm32f4[01][57]?e* stm32f4ccm ROM=512K RAM=128K CCM=64K stm32f4[01][57]?g* stm32f4ccm ROM=1024K RAM=128K CCM=64K stm32f4[23][79]?g* stm32f4ccm ROM=1024K RAM=192K CCM=64K stm32f4[23][79]?i* stm32f4ccm ROM=2048K RAM=192K CCM=64K stm32l100?6* stm32l1 ROM=32K RAM=4K stm32l100?8* stm32l1 ROM=64K RAM=8K stm32l100?b* stm32l1 ROM=128K RAM=10K stm32l15[12]?6* stm32l1eep ROM=32K RAM=10K EEP=4K stm32l15[12]?8* stm32l1eep ROM=64K RAM=10K EEP=4K stm32l15[12]?b* stm32l1eep ROM=128K RAM=16K EEP=4K stm32l15[12]?c* stm32l1eep ROM=256K RAM=32K EEP=8K stm32l15[12]?d* stm32l1eep ROM=384K RAM=48K EEP=12K stm32ts60 stm32t ROM=32K RAM=10K stm32w108c8 stm32w ROM=64K RAM=8K stm32w108?b stm32w ROM=128K RAM=8K stm32w108cz stm32w ROM=192K RAM=12K stm32w108cc stm32w ROM=256K RAM=16K ################################################################################ # the SAM3 chips sam3a4* sam3a ROM=256K RAM=64K sam3a8* sam3a ROM=512K RAM=96K sam3n00* sam3n ROM=16K RAM=4K sam3n0* sam3n ROM=32K RAM=8K sam3n1* sam3n ROM=64K RAM=8K sam3n2* sam3n ROM=128K RAM=16K sam3n4* sam3n ROM=256K RAM=24K sam3s1* sam3s ROM=64K RAM=16K sam3s2* sam3s ROM=128K RAM=32K sam3s4* sam3s ROM=256K RAM=48K sam3u1* sam3u ROM=64K RAM=20K sam3u2* sam3u ROM=128K RAM=36K sam3u4* sam3u ROM=256K RAM=52K sam3x4* sam3x ROM=256K RAM=64K sam3x8* sam3x ROM=512K RAM=96K ################################################################################ # the lpc chips lpc1311* lpc13 ROM=8K RAM=4K lpc1313* lpc13 ROM=32K RAM=8K lpc1342* lpc13 ROM=16K RAM=4K lpc1343* lpc13 ROM=32K RAM=8K lpc1315* lpc13u ROM=32K RAM=8K lpc1316* lpc13u ROM=48K RAM=8K lpc1317* lpc13u ROM=64K RAM=8K RAM1=2K lpc1345* lpc13u ROM=32K RAM=8K USBRAM=2K lpc1346* lpc13u ROM=48K RAM=8K USBRAM=2K lpc1346* lpc13u ROM=64K RAM=8K USBRAM=2K RAM1=2K lpc1751* lpc175x ROM=32K RAM=8K lpc1752* lpc175x ROM=64K RAM=16K lpc1754* lpc175x ROM=128K RAM=16K RAM1=16K lpc1756* lpc175x ROM=256K RAM=16K RAM1=16K lpc1758* lpc175x ROM=512K RAM=32K RAM1=16K RAM2=16K lpc1759* lpc175x ROM=512K RAM=32K RAM1=16K RAM2=16K lpc1763* lpc176x ROM=256K RAM=32K RAM1=16K RAM2=16K lpc1764* lpc176x ROM=128K RAM=16K RAM1=16K lpc1765* lpc176x ROM=256K RAM=32K RAM1=16K RAM2=16K lpc1766* lpc176x ROM=256K RAM=32K RAM1=16K RAM2=16K lpc1767* lpc176x ROM=512K RAM=32K RAM1=16K RAM2=16K lpc1768* lpc176x ROM=512K RAM=32K RAM1=16K RAM2=16K lpc1769* lpc176x ROM=512K RAM=32K RAM1=16K RAM2=16K lpc1774* lpc177x ROM=128K RAM=32K RAM1=8K lpc1776* lpc177x ROM=256K RAM=64K RAM1=16K lpc1777* lpc177x ROM=512K RAM=64K RAM1=16K RAM2=16K lpc1778* lpc177x ROM=512K RAM=64K RAM1=16K RAM2=16K lpc1785* lpc178x ROM=256K RAM=64K RAM1=16K lpc1786* lpc178x ROM=256K RAM=64K RAM1=16K lpc1787* lpc178x ROM=512K RAM=64K RAM1=16K RAM2=16K lpc1788* lpc178x ROM=512K RAM=64K RAM1=16K RAM2=16K ################################################################################ # the efm32 chips # Zero Gecko efm32zg???f4 efm32zg ROM=4K RAM=2K efm32zg???f8 efm32zg ROM=8K RAM=2K efm32zg???f16 efm32zg ROM=16K RAM=4K efm32zg???f32 efm32zg ROM=32K RAM=4K # Tiny Gecko efm32tg108f4 efm32tg ROM=4K RAM=1K efm32tg110f4 efm32tg ROM=4K RAM=2K efm32tg???f8 efm32tg ROM=8K RAM=2K efm32tg???f16 efm32tg ROM=16K RAM=4K efm32tg???f32 efm32tg ROM=32K RAM=4K # Gecko efm32g200f16 efm32g ROM=16K RAM=8K efm32g???f32 efm32g ROM=32K RAM=8K efm32g???f64 efm32g ROM=64K RAM=16K efm32g???f128 efm32g ROM=128K RAM=16K # Large Gecko efm32lg???f64 efm32lg ROM=64K RAM=32K efm32lg???f128 efm32lg ROM=128K RAM=32K efm32lg???f256 efm32lg ROM=256K RAM=32K # Giant Gecko efm32gg???f512 efm32gg ROM=512K RAM=128K efm32gg???f1024 efm32gg ROM=1024K RAM=128K # Wonder Gecko efm32wg???f64 efm32gg ROM=64K RAM=32K efm32wg???f128 efm32gg ROM=128K RAM=32K efm32wg???f256 efm32gg ROM=256K RAM=32K ################################################################################ # the TI cortex M3 chips lm3s101 lm3sandstorm ROM=8K RAM=2K lm3s102 lm3sandstorm ROM=8K RAM=2K lm3s300 lm3sandstorm ROM=16K RAM=4K lm3s301 lm3sandstorm ROM=16K RAM=2K lm3s308 lm3sandstorm ROM=16K RAM=4K lm3s310 lm3sandstorm ROM=16K RAM=4K lm3s315 lm3sandstorm ROM=16K RAM=4K lm3s316 lm3sandstorm ROM=16K RAM=4K lm3s317 lm3sandstorm ROM=16K RAM=4K lm3s328 lm3sandstorm ROM=16K RAM=4K lm3s600 lm3sandstorm ROM=32K RAM=8K lm3s601 lm3sandstorm ROM=32K RAM=8K lm3s608 lm3sandstorm ROM=32K RAM=8K lm3s610 lm3sandstorm ROM=32K RAM=8K lm3s611 lm3sandstorm ROM=32K RAM=8K lm3s612 lm3sandstorm ROM=32K RAM=8K lm3s613 lm3sandstorm ROM=32K RAM=8K lm3s615 lm3sandstorm ROM=32K RAM=8K lm3s617 lm3sandstorm ROM=32K RAM=8K lm3s618 lm3sandstorm ROM=32K RAM=8K lm3s628 lm3sandstorm ROM=32K RAM=8K lm3s800 lm3sandstorm ROM=64K RAM=8K lm3s801 lm3sandstorm ROM=64K RAM=8K lm3s808 lm3sandstorm ROM=64K RAM=8K lm3s811 lm3sandstorm ROM=64K RAM=8K lm3s812 lm3sandstorm ROM=64K RAM=8K lm3s815 lm3sandstorm ROM=64K RAM=8K lm3s817 lm3sandstorm ROM=64K RAM=8K lm3s818 lm3sandstorm ROM=64K RAM=8K lm3s828 lm3sandstorm ROM=64K RAM=8K lm3s1110 lm3fury ROM=64K RAM=16K lm3s1133 lm3fury ROM=64K RAM=16K lm3s1138 lm3fury ROM=64K RAM=16K lm3s1150 lm3fury ROM=64K RAM=16K lm3s1162 lm3fury ROM=64K RAM=16K lm3s1165 lm3fury ROM=64K RAM=16K lm3s1332 lm3fury ROM=96K RAM=16K lm3s1435 lm3fury ROM=96K RAM=32K lm3s1439 lm3fury ROM=96K RAM=32K lm3s1512 lm3fury ROM=96K RAM=64K lm3s1538 lm3fury ROM=96K RAM=64K lm3s1601 lm3fury ROM=128K RAM=32K lm3s1607 lm3fury ROM=128K RAM=32K lm3s1608 lm3fury ROM=128K RAM=32K lm3s1620 lm3fury ROM=128K RAM=32K lm3s8962 lm3fury ROM=256K RAM=64K ################################################################################ # the TI cortex R4F chips rm46l852* rm46l ROM=1280K RAM=192K ################################################################################ ################################################################################ ################################################################################ # the STM32 family groups stm32f3ccm stm32f3 CCM_OFF=0x10000000 stm32f4ccm stm32f4 CCM_OFF=0x10000000 stm32l1eep stm32l1 EEP_OFF=0x08080000 ################################################################################ # the lpc family groups lpc13u lpc13 USBRAM_OFF=0x20004000 lpc17[56]x lpc17 RAM1_OFF=0x2007C000 RAM2_OFF=0x20080000 lpc17[78]x lpc17 RAM1_OFF=0x20000000 RAM2_OFF=0x20040000 ################################################################################ ################################################################################ ################################################################################ # the STM32 families stm32f0 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32f1 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32f2 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32f3 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32f4 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32l1 stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32w stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 stm32t stm32 ROM_OFF=0x08000000 RAM_OFF=0x20000000 ################################################################################ # the SAM3 families sam3a sam3 ROM_OFF=0x00800000 RAM_OFF=0x20000000 sam3n sam3 ROM_OFF=0x00400000 RAM_OFF=0x20000000 sam3s sam3 ROM_OFF=0x00400000 RAM_OFF=0x20000000 sam3u sam3 ROM_OFF=0x00080000 RAM_OFF=0x20000000 sam3x sam3 ROM_OFF=0x00800000 RAM_OFF=0x20000000 ################################################################################ # the lpc families lpc13 lpc ROM_OFF=0x00000000 RAM_OFF=0x10000000 RAM1_OFF=0x20000000 lpc17 lpc ROM_OFF=0x00000000 RAM_OFF=0x10000000 ################################################################################ # the efm32 Gecko families efm32zg efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 efm32tg efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 efm32g efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 efm32lg efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 efm32gg efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 efm32wg efm32 ROM_OFF=0x00000000 RAM_OFF=0x20000000 RAM1_OFF=0x10000000 ################################################################################ # Cortex LM3 families lm3fury lm3 ROM_OFF=0x00000000 RAM_OFF=0x20000000 lm3sandstorm lm3 ROM_OFF=0x00000000 RAM_OFF=0x20000000 ################################################################################ # Cortex R4F families rm46l rm4 ROM_OFF=0x00000000 RAM_OFF=0x08000000 RAM1_OFF=0x08400000 ################################################################################ ################################################################################ ################################################################################ # the architectures stm32 END sam3 END lpc END efm32 END lm3 END rm4 END ================================================ FILE: firmware/libopencm3/lib/Makefile.include ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 Piotr Esden-Tempski ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) Q := @ endif # common objects OBJS += vector.o systick.o scb.o nvic.o assert.o sync.o all: $(SRCLIBDIR)/$(LIBNAME).a $(SRCLIBDIR)/$(LIBNAME).a: $(SRCLIBDIR)/$(LIBNAME).ld $(OBJS) @printf " AR $(@F)\n" $(Q)$(AR) $(ARFLAGS) $@ $(OBJS) $(SRCLIBDIR)/$(LIBNAME).ld: $(LIBNAME).ld @printf " CP $(@F)\n" $(Q)cp $^ $@ $(Q)if [ -f $(LIBNAME)_rom_to_ram.ld ]; then cp $(LIBNAME)_rom_to_ram.ld $(SRCLIBDIR); fi %.o: %.c @printf " CC $( * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void __attribute__((weak)) cm3_assert_failed(void) { while (1); } void __attribute__((weak)) cm3_assert_failed_verbose( const char *file __attribute__((unused)), int line __attribute__((unused)), const char *func __attribute__((unused)), const char *assert_expr __attribute__((unused))) { cm3_assert_failed(); } ================================================ FILE: firmware/libopencm3/lib/cm3/nvic.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2012 Fergus Noble * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @defgroup CM3_nvic_file NVIC * * @ingroup CM3_files * * @brief libopencm3 Cortex Nested Vectored Interrupt Controller * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2010 Thomas Otto * @author @htmlonly © @endhtmlonly 2012 Fergus Noble * * * @date 18 August 2012 * * Cortex processors provide 14 cortex-defined interrupts (NMI, usage faults, * systicks etc.) and varying numbers of implementation defined interrupts * (typically peripherial interrupts and DMA). * * @see Cortex-M3 Devices Generic User Guide * @see STM32F10xxx Cortex-M3 programming manual * * LGPL License Terms @ref lgpl_license */ /**@{*/ #include #include /*---------------------------------------------------------------------------*/ /** @brief NVIC Enable Interrupt * * Enables a user interrupt. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint */ void nvic_enable_irq(uint8_t irqn) { NVIC_ISER(irqn / 32) = (1 << (irqn % 32)); } /*---------------------------------------------------------------------------*/ /** @brief NVIC Disable Interrupt * * Disables a user interrupt. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint */ void nvic_disable_irq(uint8_t irqn) { NVIC_ICER(irqn / 32) = (1 << (irqn % 32)); } /*---------------------------------------------------------------------------*/ /** @brief NVIC Return Pending Interrupt * * True if the interrupt has occurred and is waiting for service. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint * @return Boolean. Interrupt pending. */ uint8_t nvic_get_pending_irq(uint8_t irqn) { return NVIC_ISPR(irqn / 32) & (1 << (irqn % 32)) ? 1 : 0; } /*---------------------------------------------------------------------------*/ /** @brief NVIC Set Pending Interrupt * * Force a user interrupt to a pending state. This has no effect if the * interrupt is already pending. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint */ void nvic_set_pending_irq(uint8_t irqn) { NVIC_ISPR(irqn / 32) = (1 << (irqn % 32)); } /*---------------------------------------------------------------------------*/ /** @brief NVIC Clear Pending Interrupt * * Force remove a user interrupt from a pending state. This has no effect if * the interrupt is actively being serviced. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint */ void nvic_clear_pending_irq(uint8_t irqn) { NVIC_ICPR(irqn / 32) = (1 << (irqn % 32)); } /*---------------------------------------------------------------------------*/ /** @brief NVIC Return Enabled Interrupt * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint * @return Boolean. Interrupt enabled. */ uint8_t nvic_get_irq_enabled(uint8_t irqn) { return NVIC_ISER(irqn / 32) & (1 << (irqn % 32)) ? 1 : 0; } /*---------------------------------------------------------------------------*/ /** @brief NVIC Set Interrupt Priority * * CM3, CM4: * * There are 16 priority levels only, given by the upper four bits of the * priority byte, as required by ARM standards. The priority levels are * interpreted according to the pre-emptive priority grouping set in the * SCB Application Interrupt and Reset Control Register (SCB_AIRCR), as done * in @ref scb_set_priority_grouping. * * CM0: * * There are 4 priority levels only, given by the upper two bits of the * priority byte, as required by ARM standards. No grouping available. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint * @param[in] priority Unsigned int8. Interrupt priority (0 ... 255 in steps of * 16) */ void nvic_set_priority(uint8_t irqn, uint8_t priority) { /* code from lpc43xx/nvic.c -- this is quite a hack and alludes to the * negative interrupt numbers assigned to the system interrupts. better * handling would mean signed integers. */ if (irqn >= NVIC_IRQ_COUNT) { /* Cortex-M system interrupts */ SCS_SHPR((irqn & 0xF) - 4) = priority; } else { /* Device specific interrupts */ NVIC_IPR(irqn) = priority; } } /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) /*---------------------------------------------------------------------------*/ /** @brief NVIC Return Active Interrupt * * Interrupt has occurred and is currently being serviced. * * @param[in] irqn Unsigned int8. Interrupt number @ref nvic_stm32f1_userint * @return Boolean. Interrupt active. */ uint8_t nvic_get_active_irq(uint8_t irqn) { return NVIC_IABR(irqn / 32) & (1 << (irqn % 32)) ? 1 : 0; } /*---------------------------------------------------------------------------*/ /** @brief NVIC Software Trigger Interrupt * * Generate an interrupt from software. This has no effect for unprivileged * access unless the privilege level has been elevated through the System * Control Registers. * * @param[in] irqn Unsigned int16. Interrupt number (0 ... 239) */ void nvic_generate_software_interrupt(uint16_t irqn) { if (irqn <= 239) { NVIC_STIR |= irqn; } } #endif /**@}*/ ================================================ FILE: firmware/libopencm3/lib/cm3/scb.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) void scb_reset_core(void) { SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_VECTRESET; while (1); } #endif void scb_reset_system(void) { SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ; while (1); } /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) void scb_set_priority_grouping(uint32_t prigroup) { SCB_AIRCR = SCB_AIRCR_VECTKEY | prigroup; } #endif ================================================ FILE: firmware/libopencm3/lib/cm3/sync.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /* DMB is supported on CM0 */ void __dmb() { __asm__ volatile ("dmb"); } /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_6M__) #warning "sync not supported on ARMv6-M arch" #else uint32_t __ldrex(volatile uint32_t *addr) { uint32_t res; __asm__ volatile ("ldrex %0, [%1]" : "=r" (res) : "r" (addr)); return res; } uint32_t __strex(uint32_t val, volatile uint32_t *addr) { uint32_t res; __asm__ volatile ("strex %0, %2, [%1]" : "=&r" (res) : "r" (addr), "r" (val)); return res; } void mutex_lock(mutex_t *m) { uint32_t status = 0; do { /* Wait until the mutex is unlocked. */ while (__ldrex(m) != MUTEX_UNLOCKED); /* Try to acquire it. */ status = __strex(MUTEX_LOCKED, m); /* Did we get it? If not then try again. */ } while (status != 0); /* Execute the mysterious Data Memory Barrier instruction! */ __dmb(); } void mutex_unlock(mutex_t *m) { /* Ensure accesses to protected resource are finished */ __dmb(); /* Free the lock. */ *m = MUTEX_UNLOCKED; } #endif ================================================ FILE: firmware/libopencm3/lib/cm3/systick.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @defgroup CM3_systick_file SysTick * * @ingroup CM3_files * * @brief libopencm3 Cortex System Tick Timer * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2010 Thomas Otto * * @date 19 August 2012 * * This library supports the System Tick timer in ARM Cortex Microcontrollers. * * The System Tick timer is part of the ARM Cortex core. It is a 24 bit * down counter that can be configured with an automatical reload value. * * LGPL License Terms @ref lgpl_license */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief SysTick Set the Automatic Reload Value. * * The counter is set to the reload value when the counter starts and after it * reaches zero. * * @param[in] value uint32_t. 24 bit reload value. */ void systick_set_reload(uint32_t value) { STK_RVR = (value & STK_RVR_RELOAD); } /*---------------------------------------------------------------------------*/ /** @brief SysTick Read the Automatic Reload Value. * * @returns 24 bit reload value as uint32_t. */ uint32_t systick_get_reload(void) { return STK_RVR & STK_RVR_RELOAD; } /*---------------------------------------------------------------------------*/ /** @brief Get the current SysTick counter value. * * @returns 24 bit current value as uint32_t. */ uint32_t systick_get_value(void) { return STK_CVR & STK_CVR_CURRENT; } /*---------------------------------------------------------------------------*/ /** @brief Set the SysTick Clock Source. * * The clock source can be either the AHB clock or the same clock divided by 8. * * @param[in] clocksource uint8_t. Clock source from @ref systick_clksource. */ void systick_set_clocksource(uint8_t clocksource) { STK_CSR = (STK_CSR & (~STK_CSR_CLKSOURCE)) | (clocksource << STK_CSR_CLKSOURCE_LSB); } /*---------------------------------------------------------------------------*/ /** @brief Enable SysTick Interrupt. * */ void systick_interrupt_enable(void) { STK_CSR |= STK_CSR_TICKINT; } /*---------------------------------------------------------------------------*/ /** @brief Disable SysTick Interrupt. * */ void systick_interrupt_disable(void) { STK_CSR &= ~STK_CSR_TICKINT; } /*---------------------------------------------------------------------------*/ /** @brief Enable SysTick Counter. * */ void systick_counter_enable(void) { STK_CSR |= STK_CSR_ENABLE; } /*---------------------------------------------------------------------------*/ /** @brief Disable SysTick Counter. * */ void systick_counter_disable(void) { STK_CSR &= ~STK_CSR_ENABLE; } /*---------------------------------------------------------------------------*/ /** @brief SysTick Read the Counter Flag. * * The count flag is set when the timer count becomes zero, and is cleared when * the flag is read. * * @returns Boolean if flag set. */ uint8_t systick_get_countflag(void) { return (STK_CSR & STK_CSR_COUNTFLAG) ? 1 : 0; } /*---------------------------------------------------------------------------*/ /** @brief SysTick Get Calibration Value * * @returns Current calibration value */ uint32_t systick_get_calib(void) { return STK_CALIB & STK_CALIB_TENMS; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/cm3/vector.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski , * Copyright (C) 2012 chrysn * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /* load optional platform dependent initialization routines */ #include "../dispatch/vector_chipset.c" /* load the weak symbols for IRQ_HANDLERS */ #include "../dispatch/vector_nvic.c" /* Symbols exported by the linker script(s): */ extern unsigned _data_loadaddr, _data, _edata, _bss, _ebss, _stack; typedef void (*funcp_t) (void); extern funcp_t __preinit_array_start, __preinit_array_end; extern funcp_t __init_array_start, __init_array_end; extern funcp_t __fini_array_start, __fini_array_end; void main(void); void blocking_handler(void); void null_handler(void); __attribute__ ((section(".vectors"))) vector_table_t vector_table = { .initial_sp_value = &_stack, .reset = reset_handler, .nmi = nmi_handler, .hard_fault = hard_fault_handler, /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) .memory_manage_fault = mem_manage_handler, .bus_fault = bus_fault_handler, .usage_fault = usage_fault_handler, .debug_monitor = debug_monitor_handler, #endif .sv_call = sv_call_handler, .pend_sv = pend_sv_handler, .systick = sys_tick_handler, .irq = { IRQ_HANDLERS } }; void WEAK __attribute__ ((naked)) reset_handler(void) { volatile unsigned *src, *dest; funcp_t *fp; for (src = &_data_loadaddr, dest = &_data; dest < &_edata; src++, dest++) { *dest = *src; } for (dest = &_bss; dest < &_ebss; ) { *dest++ = 0; } /* Constructors. */ for (fp = &__preinit_array_start; fp < &__preinit_array_end; fp++) { (*fp)(); } for (fp = &__init_array_start; fp < &__init_array_end; fp++) { (*fp)(); } /* might be provided by platform specific vector.c */ pre_main(); /* Call the application's entry point. */ main(); /* Destructors. */ for (fp = &__fini_array_start; fp < &__fini_array_end; fp++) { (*fp)(); } } void blocking_handler(void) { while (1); } void null_handler(void) { /* Do nothing. */ } #pragma weak nmi_handler = null_handler #pragma weak hard_fault_handler = blocking_handler #pragma weak sv_call_handler = null_handler #pragma weak pend_sv_handler = null_handler #pragma weak sys_tick_handler = null_handler /* Those are defined only on CM3 or CM4 */ #if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) #pragma weak mem_manage_handler = blocking_handler #pragma weak bus_fault_handler = blocking_handler #pragma weak usage_fault_handler = blocking_handler #pragma weak debug_monitor_handler = null_handler #endif ================================================ FILE: firmware/libopencm3/lib/dispatch/vector_chipset.c ================================================ #if defined(STM32F4) # include "../stm32/f4/vector_chipset.c" #elif defined(LPC43XX_M4) # include "../lpc43xx/m4/vector_chipset.c" #else static void pre_main(void) {} #endif ================================================ FILE: firmware/libopencm3/lib/efm32/efm32g/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 chrysn ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_efm32g FAMILY = EFM32G PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv ARFLAGS = rcs OBJS = VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/efm32/efm32g/libopencm3_efm32g.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for EFM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/efm32/efm32g/libopencm3_efm32g880f128.ld ================================================ /* lengths from d011_efm32tg840_datasheet.pdf table 1.1, offset from * d0034_efm32tg_reference_manual.pdf figure 5.2. * * the origins and memory structure are constant over all tinygeckos, but the * MEMORY section requires the use of constants, and has thus to be duplicated * over the chip variants. * */ MEMORY { rom (rx) : ORIGIN = 0, LENGTH = 128k ram (rwx) : ORIGIN = 0x20000000, LENGTH = 16k } INCLUDE libopencm3_efm32g.ld; ================================================ FILE: firmware/libopencm3/lib/efm32/efm32gg/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 chrysn ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_efm32gg FAMILY = EFM32GG PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv ARFLAGS = rcs OBJS = VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/efm32/efm32gg/libopencm3_efm32gg.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for EFM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/efm32/efm32gg/libopencm3_efm32gg990f1024.ld ================================================ /* lengths from d046_efm32gg990_datasheet.pdf table 1.1, offset from * d0034_efm32tg_reference_manual.pdf figure 5.2. * * the origins and memory structure are constant over all giantgeckos, but the * MEMORY section requires the use of constants, and has thus to be duplicated * over the chip variants. * */ MEMORY { rom (rx) : ORIGIN = 0, LENGTH = 1024k ram (rwx) : ORIGIN = 0x20000000, LENGTH = 128k } INCLUDE libopencm3_efm32gg.ld; ================================================ FILE: firmware/libopencm3/lib/efm32/efm32lg/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 chrysn ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_efm32lg FAMILY = EFM32LG PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv ARFLAGS = rcs OBJS = VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/efm32/efm32lg/libopencm3_efm32lg.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for EFM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/efm32/efm32tg/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 chrysn ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_efm32tg FAMILY = EFM32TG PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -D$(FAMILY) # ARFLAGS = rcsv ARFLAGS = rcs OBJS = VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/efm32/efm32tg/libopencm3_efm32tg.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for EFM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/efm32/efm32tg/libopencm3_efm32tg840f32.ld ================================================ /* lengths from d011_efm32tg840_datasheet.pdf table 1.1, offset from * d0034_efm32tg_reference_manual.pdf figure 5.2. * * the origins and memory structure are constant over all tinygeckos, but the * MEMORY section requires the use of constants, and has thus to be duplicated * over the chip variants. * */ MEMORY { rom (rx) : ORIGIN = 0, LENGTH = 32k ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4k } INCLUDE libopencm3_efm32tg.ld; ================================================ FILE: firmware/libopencm3/lib/linker.ld.S ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for all targets using libopencm3. */ /* Enforce emmition of the vector table. */ EXTERN(vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define memory regions. */ MEMORY { /* RAM is always used */ ram (rwx) : ORIGIN = RAM_OFF, LENGTH = RAM #if defined(ROM) rom (rx) : ORIGIN = ROM_OFF, LENGTH = ROM #endif #if defined(ROM2) rom2 (rx) : ORIGIN = ROM2_OFF, LENGTH = ROM2 #endif #if defined(RAM1) ram1 (rwx) : ORIGIN = RAM1_OFF, LENGTH = RAM1 #endif #if defined(RAM2) ram2 (rwx) : ORIGIN = RAM2_OFF, LENGTH = RAM2 #endif #if defined(CCM) ccm (rwx) : ORIGIN = CCM_OFF, LENGTH = CCM #endif #if defined(EEP) eep (r) : ORIGIN = EEP_OFF, LENGTH = EEP #endif #if defined(XSRAM) xsram (rw) : ORIGIN = XSRAM_OFF, LENGTH = XSRAM #endif #if defined(XDRAM) xdram (rw) : ORIGIN = XDRAM_OFF, LENGTH = XDRAM #endif } /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for * __attribute__((constructor)) and the likes. */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram #if defined(EEP) .eep : { *(.eeprom*) . = ALIGN(4); } >eep #endif #if defined(CCM) .ccm : { *(.ccmram*) . = ALIGN(4); } >ccm #endif #if defined(RAM1) .ram1 : { *(.ram1*) . = ALIGN(4); } >ram1 #endif #if defined(RAM2) .ram2 : { *(.ram2*) . = ALIGN(4); } >ram2 #endif #if defined(XSRAM) .xsram : { *(.xsram*) . = ALIGN(4); } >xsram #endif #if defined(XDRAM) .xdram : { *(.xdram*) . = ALIGN(4); } >xdram #endif /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/lm3s/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lm3s PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLM3S # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o vector.o assert.o VPATH += ../cm3 include ../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lm3s/gpio.c ================================================ /** @defgroup gpio_file General Purpose I/O @brief LM3S General Purpose I/O @ingroup LM3Sxx @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include void gpio_set(uint32_t gpioport, uint8_t gpios) { /* ipaddr[9:2] mask the bits to be set, hence the array index */ GPIO_DATA(gpioport)[gpios] = 0xff; } void gpio_clear(uint32_t gpioport, uint8_t gpios) { GPIO_DATA(gpioport)[gpios] = 0; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lm3s/libopencm3_lm3s.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LM3S targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/lm4f/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2013 Alexandru Gagniuc ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lm4f FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../include -fno-common \ -mcpu=cortex-m4 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLM4F # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o vector.o assert.o systemcontrol.o rcc.o uart.o \ usb_lm4f.o usb.o usb_control.o usb_standard.o VPATH += ../usb:../cm3 include ../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lm4f/gpio.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * Copyright (C) 2013 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** @defgroup gpio_file GPIO * * * @ingroup LM4Fxx * * @version 1.0.0 * * @author @htmlonly © @endhtmlonly 2011 * Gareth McMullin * @author @htmlonly © @endhtmlonly 2013 * Alexandru Gagniuc * * @date 16 March 2013 * * LGPL License Terms @ref lgpl_license * * @brief libopencm3 LM4F General Purpose I/O * * The LM4F GPIO API provides functionality for accessing the GPIO pins of the * LM4F. * * @attention @code An important aspect to consider is that libopencm3 uses the * AHB aperture for accessing the GPIO registers on the LM4F. The AHB must be * explicitly enabled with a call to gpio_enable_ahb_aperture() before accessing * any GPIO functionality. * @endcode * * Please see the individual GPIO modules for more details. To use the GPIO, the * gpio.h header needs to be included: * @code{.c} * #include * @endcode */ /**@{*/ #include #include /* Value we need to write to unlock the GPIO commit register */ #define GPIO_LOCK_UNLOCK_CODE 0x4C4F434B /** @defgroup gpio_config GPIO pin configuration * @ingroup gpio_file * * \brief Enabling and configuring GPIO pins * * @section gpio_api_enable Enabling GPIO ports * @attention * Before accessing GPIO functionality through this API, the AHB aperture for * GPIO ports must be enabled via a call to @ref gpio_enable_ahb_aperture(). * Failing to do so will cause a hard fault. * * @note * Once the AHB aperture is enabled, GPIO registers can no longer be accessed * via the APB aperture. The two apertures are mutually exclusive. * * Enabling the AHB aperture only needs to be done once. However, in order to * access a certain GPIO port, its clock must also be enabled. Enabling the * GPIO clock needs to be done for every port that will be used. * * For example, to enable GPIOA and GPIOD: * @code{.c} * // Make sure we can access the GPIO via the AHB aperture * gpio_enable_ahb_aperture(); * ... * // Enable GPIO ports A and D * periph_clock_enable(RCC_GPIOA); * periph_clock_enable(RCC_GPIOD); * @endcode * * On reset all ports are configured as digital floating inputs (no pull-up or * pull-down), except for special function pins. * * * @section gpio_api_in Configuring pins as inputs * * Configuring GPIO pins as inputs is done with @ref gpio_mode_setup(), with * @ref GPIO_MODE_INPUT for the mode parameter. The direction of the pull-up * must be specified with the same call * * For example, PA2, PA3, and PA4 as inputs, with pull-up on PA4: * @code{.c} * gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO2 | GPIO3); * gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, GPIO4); * @endcode * * * @section gpio_api_out Configuring pins as outputs * * Output pins have more configuration options than input pins. LM4F pins can be * configured as either push-pull, or open drain. The drive strength of each pin * can be adjusted between 2mA, 4mA, or 8mA. Slew-rate control is available when * the pins are configured to drive 8mA. These extra options can be specified * with @ref gpio_set_output_config(). * The default is push-pull configuration with 2mA drive capability. * * @note * @ref gpio_set_output_config() controls different capabilities than the * similar sounding gpio_set_output_options() from the STM GPIO API. They are * intentionally named differently to prevent confusion between the two. They * are API incompatible. * * For example, to set PA2 to output push-pull with a drive strength of 8mA: * @code{.c} * gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO2); * gpio_set_output_config(GPIOA, GPIO_OTYPE_PP, GPIO_DRIVE_8MA, GPIO2); * @endcode * * * @section gpio_api_analog Configuring pins as analog function * * Configuring GPIO pins to their analog function is done with * @ref gpio_mode_setup(), with @ref GPIO_MODE_ANALOG for the mode parameter. * * Suppose PD4 and PD5 are the USB pins. To enable their analog functionality * (USB D+ and D- in this case), use: * @code * // Mux USB pins to their analog function * gpio_mode_setup(GPIOD, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO4 | GPIO5); * @endcode * * @section gpio_api_alf_func Configuring pins as alternate functions * * Most pins have alternate functions associated with them. When a pin is set to * an alternate function, it is multiplexed to one of the dedicated hardware * peripheral in the chip. The alternate function mapping can be found in the * part's datasheet, and usually varies between arts of the same family. * * Multiplexing a pin, or group of pins to an alternate function is done with * @ref gpio_set_af(). Because AF0 is not used on the LM4F, passing 0 as the * alt_func_num parameter will disable the alternate function of the given pins. * * @code * // Mux PB0 and PB1 to AF1 (UART1 TX/RX in this case) * gpio_set_af(GPIOB, 1, GPIO0 | GPIO1); * @endcode * * @section gpio_api_sfpins Changing configuration of special function pins * * On the LM4F, the NMI and JTAG/SWD default to their alternate function. These * pins cannot normally be committed to GPIO usage. To enable these special * function pins to be used as GPIO, they must be unlocked. This may be achieved * via @ref gpio_unlock_commit. Once a special function pin is unlocked, its * settings may be altered in the usual way. * * For example, to unlock the PF0 pin (NMI on the LM4F120): * @code * // PF0 is an NMI pin, and needs to be unlocked * gpio_unlock_commit(GPIOF, GPIO0); * // Now the pin can be configured * gpio_mode_setup(RGB_PORT, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, btnpins); * @endcode */ /**@{*/ /** * \brief Enable access to GPIO registers via the AHB aperture * * All GPIO registers are accessed in libopencm3 via the AHB aperture. It * provides faster control over the older APB aperture. This aperture must be * enabled before calling any other gpio_*() function. * */ void gpio_enable_ahb_aperture(void) { SYSCTL_GPIOHBCTL = 0xffffffff; } /** * \brief Configure a group of pins * * Sets the Pin direction, analog/digital mode, and pull-up configuration of * or a set of GPIO pins on a given GPIO port. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] mode Pin mode (@ref gpio_mode) \n * - GPIO_MODE_OUTPUT -- Configure pin as output \n * - GPIO_MODE_INPUT -- Configure pin as input \n * - GPIO_MODE_ANALOG -- Configure pin as analog function * @param[in] pullup Pin pullup/pulldown configuration (@ref gpio_pullup) \n * - GPIO_PUPD_NONE -- Do not pull the pin high or low \n * - GPIO_PUPD_PULLUP -- Pull the pin high \n * - GPIO_PUPD_PULLDOWN -- Pull the pin low * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together */ void gpio_mode_setup(uint32_t gpioport, enum gpio_mode mode, enum gpio_pullup pullup, uint8_t gpios) { switch (mode) { case GPIO_MODE_OUTPUT: GPIO_DIR(gpioport) |= gpios; GPIO_DEN(gpioport) |= gpios; GPIO_AMSEL(gpioport) &= ~gpios; break; case GPIO_MODE_INPUT: GPIO_DIR(gpioport) &= ~gpios; GPIO_DEN(gpioport) |= gpios; GPIO_AMSEL(gpioport) &= ~gpios; break; case GPIO_MODE_ANALOG: GPIO_DEN(gpioport) &= ~gpios; GPIO_AMSEL(gpioport) |= gpios; break; default: /* Don't do anything */ break; } /* * Setting a bit in the GPIO_PDR register clears the corresponding bit * in the GPIO_PUR register, and vice-versa. */ switch (pullup) { case GPIO_PUPD_PULLUP: GPIO_PUR(gpioport) |= gpios; break; case GPIO_PUPD_PULLDOWN: GPIO_PDR(gpioport) |= gpios; break; case GPIO_PUPD_NONE: /* Fall through */ default: GPIO_PUR(gpioport) &= ~gpios; GPIO_PDR(gpioport) &= ~gpios; break; } } /** * \brief Configure output parameters of a group of pins * * Sets the output configuration and drive strength, of or a set of GPIO pins * for a set of GPIO pins in output mode. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] otype Output driver configuration (@ref gpio_output_type) \n * - GPIO_OTYPE_PP -- Configure pin driver as push-pull \n * - GPIO_OTYPE_OD -- Configure pin driver as open drain * @param[in] drive Pin drive strength (@ref gpio_drive_strength) \n * - GPIO_DRIVE_2MA -- 2mA drive \n * - GPIO_DRIVE_4MA -- 4mA drive \n * - GPIO_DRIVE_8MA -- 8mA drive \n * - GPIO_DRIVE_8MA_SLEW_CTL -- 8mA drive with slew rate * control * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together */ void gpio_set_output_config(uint32_t gpioport, enum gpio_output_type otype, enum gpio_drive_strength drive, uint8_t gpios) { if (otype == GPIO_OTYPE_OD) { GPIO_ODR(gpioport) |= gpios; } else { GPIO_ODR(gpioport) &= ~gpios; } /* * Setting a bit in the GPIO_DRxR register clears the corresponding bit * in the other GPIO_DRyR registers, and vice-versa. */ switch (drive) { case GPIO_DRIVE_8MA_SLEW_CTL: GPIO_DR8R(gpioport) |= gpios; GPIO_SLR(gpioport) |= gpios; break; case GPIO_DRIVE_8MA: GPIO_DR8R(gpioport) |= gpios; GPIO_SLR(gpioport) &= ~gpios; break; case GPIO_DRIVE_4MA: GPIO_DR4R(gpioport) |= gpios; break; case GPIO_DRIVE_2MA: /* Fall through */ default: GPIO_DR2R(gpioport) |= gpios; break; } } #define PCTL_AF(pin, af) (af << (pin << 2)) #define PCTL_MASK(pin) PCTL_AF(pin, 0xf) /** * \brief Multiplex group of pins to the given alternate function * * Mux the pin or group of pins to the given alternate function. Note that a * number of pins may be set but only with a single AF number. This is useful * when one or more of a peripheral's pins are assigned to the same alternate * function. * * Because AF0 is not used on the LM4F, passing 0 as the alt_func_num parameter * will disable the alternate function of the given pins. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] alt_func_num Pin alternate function number or 0 to disable the * alternate function multiplexing. * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together */ void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint8_t gpios) { uint32_t pctl32; uint8_t pin_mask; int i; /* Did we mean to disable the alternate function? */ if (alt_func_num == 0) { GPIO_AFSEL(gpioport) &= ~gpios; return; } /* Enable the alternate function */ GPIO_AFSEL(gpioport) |= gpios; /* Alternate functions are digital */ GPIO_DEN(gpioport) |= gpios; /* Now take care of the actual multiplexing */ pctl32 = GPIO_PCTL(gpioport); for (i = 0; i < 8; i++) { pin_mask = (1 << i); if (!(gpios & pin_mask)) { continue; } pctl32 &= ~PCTL_MASK(i); pctl32 |= PCTL_AF(i, (alt_func_num & 0xf)); } GPIO_PCTL(gpioport) = pctl32; } /** * \brief Unlock the commit control of a special function pin * * Unlocks the commit control of the given pin or group of pins. If a pin is a * JTAG/SWD or NMI, the pin may then be reconfigured as a GPIO pin. If the pin * is not locked by default, this has no effect. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together. */ void gpio_unlock_commit(uint32_t gpioport, uint8_t gpios) { /* Unlock the GPIO_CR register */ GPIO_LOCK(gpioport) = GPIO_LOCK_UNLOCK_CODE; /* Enable committing changes */ GPIO_CR(gpioport) |= gpios; /* Lock the GPIO_CR register */ GPIO_LOCK(gpioport) = ~GPIO_LOCK_UNLOCK_CODE; } /**@}*/ /** @defgroup gpio_control GPIO pin control * @ingroup gpio_file * * \brief Controlling GPIO pins * * Each I/O port has 8 individually configurable bits. When reading and writing * data to the GPIO ports, address bits [9:2] mask the pins to be read or * written. This mechanism makes all GPIO port reads and writes on the LM4F * atomic operations. The GPIO API takes full advantage of this fact to preserve * the atomicity of these operations. * * Setting or clearing a group of bits can be accomplished with @ref gpio_set() * and @ref gpio_clear() respectively. These operation use the masking mechanism * described above to only affect the specified pins. * * Sometimes it is more appropriate to read or set the level of a group of pins * on a port, in one atomic operation. Reading the status can be accomplished * with @ref gpio_read(). The result is equivalent to reading all the pins, then * masking only the desired pins; however, the masking is done in hardware, and * does not require an extra hardware operation. * * Writing a group of pins can be accomplished with @ref gpio_write(). The mask * ('gpios' parameter) is applied in hardware, and the masked pins are not * affected, regardless of the value of the respective bits written to the GPIO * port. * * Two extra functions are provided, @ref gpio_port_read() and * @ref gpio_port_write(). They are functionally identical to * @ref gpio_read (port, GPIO_ALL) and @ref gpio_write (port, GPIO_ALL, val) * respectively. Hence, they are also atomic. * * GPIO pins may be toggled with @ref gpio_toggle(). This function does not * translate to an atomic operation. * * @note * The @ref gpio_toggle() operation is the only GPIO port operation which is not * atomic. It involves a read-modify-write cycle. * * Suppose PA0, PA1, PA2, and PA3 are to be modified without affecting the other * pins on port A. This is common when controlling, for example, a 4-bit bus: * @code{.c} * // Pins 4,5,6, and 7 are unaffected, regardless of the bits in val * gpio_write(GPIOA, GPIO0 | GPIO1 | GPIO2 | GPIO3, val); * // Wait a bit then send the other 4 bits * wait_a_bit(); * gpio_write(GPIOA, GPIO0 | GPIO1 | GPIO2 | GPIO3, val >> 4); * @endcode * * Suppose a LED is connected to PD4, and we want to flash the LED for a brief * period of time: * @code * gpio_set(GPIOD, GPIO4); * wait_a_bit(); * gpio_set(GPIOD, GPIO4); * @endcode */ /**@{*/ /** * \brief Toggle a Group of Pins * * Toggle one or more pins of the given GPIO port. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios Pin identifiers. @ref gpio_pin_id */ void gpio_toggle(uint32_t gpioport, uint8_t gpios) { /* The mask makes sure we only toggle the GPIOs we want to */ GPIO_DATA(gpioport)[gpios] ^= GPIO_ALL; } /**@}*/ /** @defgroup gpio_irq GPIO Interrupt control * @ingroup gpio_file * * \brief Configuring interrupts from GPIO pins * * GPIO pins can trigger interrupts on either edges or levels. The type of * trigger can be configured with @ref gpio_configure_int_trigger(). To have an * event on the given pin generate an interrupt, its interrupt source must be * unmasked. This can be achieved with @ref gpio_enable_interrupts(). Interrupts * which are no longer needed can be disabled through * @ref gpio_disable_interrupts(). * * In order for the interrupt to generate an IRQ and a call to the interrupt * service routine, the interrupt for the GPIO port must be routed through the * NVIC with @ref nvic_enable_irq(). For this last step, the nvic.h header is * needed: * @code{.c} * #include * @endcode * * Enabling an interrupt is as simple as configuring the desired trigger, * unmasking the desired interrupt, and routing the desired GPIO port's * interrupt through the NVIC. * @code{.c} * // Trigger interrupt on each rising edge * gpio_configure_trigger(GPIOF, GPIO_TRIG_EDGE_RISE, GPIO0 | GPIO4); * // Unmask the interrupt on those pins * gpio_enable_interrupts(GPIOF, GPIO0 | GPIO4); * // Enable the interrupt in the NVIC as well * nvic_enable_irq(NVIC_GPIOF_IRQ); * @endcode * * After interrupts are properly enabled and routed through the NVIC, when an * event occurs, the appropriate IRQ flag is set by hardware, and execution * jumps to the GPIO ISR. The ISR should query the IRQ flags to determine which * event caused the interrupt. For this, use @ref gpio_is_interrupt_source(), * with the desired GPIO flag. After one or more interrupt sources are * serviced, the IRQ flags must be cleared by the ISR. This can be done with * @ref gpio_clear_interrupt_flag(). * * A typical GPIO ISR may look like the following: * @code{.c} * void gpiof_isr(void) * { * uint8_t serviced_irqs = 0; * * // Process individual IRQs * if (gpio_is_interrupt_source(GPIOF, GPIO0)) { * process_gpio0_event(); * serviced_irq |= GPIO0; * } * if (gpio_is_interrupt_source(GPIOF, GPIO4)) { * process_gpio4_event(); * serviced_irq |= GPIO4; * } * * // Clear the interupt flag for the processed IRQs * gpio_clear_interrupt_flag(GPIOF, serviced_irqs); * } * @endcode */ /**@{*/ /** * \brief Configure the interrupt trigger on the given GPIO pins * * Sets the Pin direction, analog/digital mode, and pull-up configuration of * or a set of GPIO pins on a given GPIO port. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] trigger Trigger configuration (@ref gpio_trigger) \n * - GPIO_TRIG_LVL_LOW -- Trigger on low level \n * - GPIO_TRIG_LVL_HIGH -- Trigger on high level \n * - GPIO_TRIG_EDGE_FALL -- Trigger on falling edges \n * - GPIO_TRIG_EDGE_RISE -- Trigger on rising edges \n * - GPIO_TRIG_EDGE_BOTH -- Trigger on all edges * @param[in] gpios @ref gpio_pin_id. Any combination of pins may be specified * by OR'ing then together */ void gpio_configure_trigger(uint32_t gpioport, enum gpio_trigger trigger, uint8_t gpios) { switch (trigger) { case GPIO_TRIG_LVL_LOW: GPIO_IS(gpioport) |= gpios; GPIO_IEV(gpioport) &= ~gpios; break; case GPIO_TRIG_LVL_HIGH: GPIO_IS(gpioport) |= gpios; GPIO_IEV(gpioport) |= gpios; break; case GPIO_TRIG_EDGE_FALL: GPIO_IS(gpioport) &= ~gpios; GPIO_IBE(gpioport) &= ~gpios; GPIO_IEV(gpioport) &= ~gpios; break; case GPIO_TRIG_EDGE_RISE: GPIO_IS(gpioport) &= ~gpios; GPIO_IBE(gpioport) &= ~gpios; GPIO_IEV(gpioport) |= gpios; break; case GPIO_TRIG_EDGE_BOTH: GPIO_IS(gpioport) &= ~gpios; GPIO_IBE(gpioport) |= gpios; break; default: /* Don't do anything */ break; } } /** * \brief Enable interrupts on specified GPIO pins * * Enable interrupts on the specified GPIO pins * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Pins whose interrupts to enable. Any * combination of pins may be specified by OR'ing them * together. */ void gpio_enable_interrupts(uint32_t gpioport, uint8_t gpios) { GPIO_IM(gpioport) |= gpios; } /** * \brief Disable interrupts on specified GPIO pins * * Disable interrupts on the specified GPIO pins * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] gpioport GPIO block register address base @ref gpio_reg_base * @param[in] gpios @ref gpio_pin_id. Pins whose interrupts to disable. Any * combination of pins may be specified by OR'ing them * together. */ void gpio_disable_interrupts(uint32_t gpioport, uint8_t gpios) { GPIO_IM(gpioport) |= gpios; } /**@}*/ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lm4f/libopencm3_lm4f.ld ================================================ /* Yes, we can simply use the lm3s linker script */ INCLUDE "libopencm3_lm3s.ld" ================================================ FILE: firmware/libopencm3/lib/lm4f/rcc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * */ /** * @defgroup rcc_file RCC * * @ingroup LM4Fxx * @author @htmlonly © @endhtmlonly 2012 Alexandru Gagniuc * \brief libopencm3 LM4F Clock control API * * The LM$F clock API provides functionaliity for manipulating the system clock, * oscillator, and PLL. Functions are provided for fine-grained control of clock * control registers, while also providing higher level functionality to easily * configure the main system clock source. * * The following code snippet uses fine-grained mechanisms to configures the * chip to run off an external 16MHz crystal, and use the PLL to derive a clock * frequency of 80MHz. * @code{.c} * // A divisor of 5 gives us a clock of 400/5 = 80MHz * #define PLLDIV_80MHZ 5 * * // Enable the main oscillator * rcc_enable_main_osc(); * * // Make RCC2 override RCC * rcc_enable_rcc2(); * * // Set XTAL value to 16MHz * rcc_configure_xtal(XTAL_16M); * // Set the oscillator source as the main oscillator * rcc_set_osc_source(OSCSRC_MOSC); * // Enable the PLL * rcc_pll_on(); * * // Change the clock divisor * rcc_set_pll_divisor(PLLDIV_80MHZ); * * // We cannot use the PLL as a clock source until it locks * rcc_wait_for_pll_ready(); * // Disable PLL bypass to derive the system clock from the PLL clock * rcc_pll_bypass_disable(); * * // Keep track of frequency * lm4f_rcc_sysclk_freq = 80E6; * @endcode * * The same can be achieved by a simple call to high-level routines: * @code * // A divisor of 5 gives us a clock of 400/5 = 80MHz * #define PLLDIV_80MHZ 5 * * rcc_sysclk_config(OSCSRC_MOSC, XTAL_16M, PLLDIV_80MHZ); * @endcode * * @{ */ #include /** * @defgroup rcc_low_level Low-level clock control API @ingroup rcc_file * @{ */ /** * \brief System clock frequency * * This variable is provided to keep track of the system clock frequency. It * should be updated every time the system clock is changed via the fine-grained * mechanisms. The initial value is 16MHz, which corresponds to the clock of the * internal 16MHz oscillator. * * High-level routines update the system clock automatically. * For read access, it is recommended to acces this variable via * @code * rcc_get_system_clock_frequency(); * @endcode * * If write access is desired (i.e. when changing the system clock via the * fine-grained mechanisms), then include the following line in your code: * @code * extern uint32_t lm4f_rcc_sysclk_freq; * @endcode */ uint32_t lm4f_rcc_sysclk_freq = 16000000; /** * \brief Configure the crystal type connected to the device. * * Configure the crystal type connected between the OSCO and OSCI pins by * writing the appropriate value to the XTAL field in SYSCTL_RCC. The PLL * parameters are automatically adjusted in hardware to provide a PLL clock of * 400MHz. * * @param[in] xtal predefined crystal type @see xtal_t */ void rcc_configure_xtal(enum xtal_t xtal) { uint32_t reg32; reg32 = SYSCTL_RCC; reg32 &= ~SYSCTL_RCC_XTAL_MASK; reg32 |= (xtal & SYSCTL_RCC_XTAL_MASK); SYSCTL_RCC = reg32; } /** * \brief Disable the main oscillator * * Sets the IOSCDIS bit in SYSCTL_RCC, disabling the main oscillator. */ void rcc_disable_main_osc(void) { SYSCTL_RCC |= SYSCTL_RCC_MOSCDIS; } /** * \brief Disable the internal oscillator * * Sets the IOSCDIS bit in SYSCTL_RCC, disabling the internal oscillator. */ void rcc_disable_interal_osc(void) { SYSCTL_RCC |= SYSCTL_RCC_IOSCDIS; } /** * \brief Enable the main oscillator * * Clears the MOSCDIS bit in SYSCTL_RCC, enabling the main oscillator. */ void rcc_enable_main_osc(void) { SYSCTL_RCC &= ~SYSCTL_RCC_MOSCDIS; } /** * \brief Enable the internal oscillator * * Clears the IOSCDIS bit in SYSCTL_RCC, enabling the internal oscillator. */ void rcc_enable_interal_osc(void) { SYSCTL_RCC &= ~SYSCTL_RCC_IOSCDIS; } /** * \brief Enable the use of SYSCTL_RCC2 register for clock control * * Enables the USERCC2 bit in SYSCTTL_RCC2. Settings in SYSCTL_RCC2 will * override settings in SYSCTL_RCC. * This function must be called before other calls to manipulate the clock, as * libopencm3 uses the SYSCTL_RCC2 register. */ void rcc_enable_rcc2(void) { SYSCTL_RCC2 |= SYSCTL_RCC2_USERCC2; } /** * \brief Power down the main PLL * * Sets the SYSCTL_RCC2_PWRDN2 in SYSCTL_RCC2 to power down the PLL. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_pll_off(void) { SYSCTL_RCC2 |= SYSCTL_RCC2_PWRDN2; } /** * \brief Power up the main PLL * * Clears the PWRDN2 in SYSCTL_RCC2 to power on the PLL. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_pll_on(void) { SYSCTL_RCC2 &= ~SYSCTL_RCC2_PWRDN2; } /** * \brief Set the oscillator source to be used by the system clock * * Set the clock source for the system clock. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_set_osc_source(enum osc_src src) { uint32_t reg32; reg32 = SYSCTL_RCC2; reg32 &= ~SYSCTL_RCC2_OSCSRC2_MASK; reg32 |= (src & SYSCTL_RCC2_OSCSRC2_MASK); SYSCTL_RCC2 = reg32; } /** * \brief Disable the PLL bypass and use the PLL clock * * Clear BYPASS2 in SYSCTL_RCC2. The system clock is derived from the PLL * clock divided by the divisor specified in SYSDIV2. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_pll_bypass_disable(void) { SYSCTL_RCC2 &= ~SYSCTL_RCC2_BYPASS2; } /** * \brief Enable the PLL bypass and use the oscillator clock * * Set BYPASS2 in SYSCTL_RCC2. The system clock is derived from the oscillator * clock divided by the divisor specified in SYSDIV2. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_pll_bypass_enable(void) { SYSCTL_RCC2 |= SYSCTL_RCC2_BYPASS2; } /** * \brief Set the PLL clock divisor (from 400MHz) * * Set the binary divisor used to predivide the system clock down for use as the * timing reference for the PWM module. The divisor is expected to be a divisor * from 400MHz, not 200MHz. The DIV400 is also set. * * Specifies the divisor that used to generate the system clock from either the * PLL output or the oscillator source (depending on the BYPASS2 bit in * SYSCTL_RCC2). SYSDIV2 is used for the divisor when both the USESYSDIV bit in * SYSCTL_RCC is set. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. * * @param[in] div clock divisor to apply to the 400MHz PLL clock. It is the * caller's responsibility to ensure that the divisor will not create * a system clock that is out of spec. */ void rcc_set_pll_divisor(uint8_t div400) { uint32_t reg32; SYSCTL_RCC |= SYSCTL_RCC_USESYSDIV; reg32 = SYSCTL_RCC2; reg32 &= ~SYSCTL_RCC2_SYSDIV400_MASK; reg32 |= ((div400 - 1) << 22) & SYSCTL_RCC2_SYSDIV400_MASK; /* We are expecting a divider from 400MHz */ reg32 |= SYSCTL_RCC2_DIV400; SYSCTL_RCC2 = reg32; } /** * \brief Set the PWM unit clock divisor * * Set the binary divisor used to predivide the system clock down for use as the * timing reference for the PWM module. * * @param[in] div clock divisor to use @see pwm_clkdiv_t */ void rcc_set_pwm_divisor(enum pwm_clkdiv div) { uint32_t reg32; reg32 = SYSCTL_RCC; reg32 &= ~SYSCTL_RCC_PWMDIV_MASK; reg32 |= (div & SYSCTL_RCC_PWMDIV_MASK); SYSCTL_RCC = reg32; } /** * \brief Power down the USB PLL * * Sets the USBPWRDN in SYSCTL_RCC2 to power down the USB PLL. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_usb_pll_off(void) { SYSCTL_RCC2 |= SYSCTL_RCC2_USBPWRDN; } /** * \brief Power up the USB PLL * * Clears the USBPWRDN in SYSCTL_RCC2 to power on the USB PLL. * * USERCC2 must have been set by a call to rcc_enable_rcc2() before calling this * function. */ void rcc_usb_pll_on(void) { SYSCTL_RCC2 &= ~SYSCTL_RCC2_USBPWRDN; } /** * \brief Wait for main PLL to lock * * Waits until the LOCK bit in SYSCTL_PLLSTAT is set. This guarantees that the * PLL is locked, and ready to use. */ void rcc_wait_for_pll_ready(void) { while (!(SYSCTL_PLLSTAT & SYSCTL_PLLSTAT_LOCK)); } /** * @} */ /** * @defgroup rcc_high_level High-level clock control API @ingroup rcc_file * @{ */ /** * \brief Change the PLL divisor * * Changes the divisor applied to the 400MHz PLL clock. The PLL must have * previously been configured by selecting an appropriate XTAL value, and * turning on the PLL. This function does not reconfigure the XTAL value or * oscillator source. It only changes the PLL divisor. * * The PLL is bypassed before modifying the divisor, and the function blocks * until the PLL is locked, then the bypass is disabled, before returning. * * @param [in] pll_div400 The clock divisor to apply to the 400MHz PLL clock. */ void rcc_change_pll_divisor(uint8_t pll_div400) { /* Bypass the PLL while its settings are modified */ rcc_pll_bypass_enable(); /* Change the clock divisor */ rcc_set_pll_divisor(pll_div400); /* We cannot use the PLL as a clock source until it locks */ rcc_wait_for_pll_ready(); /* Disable PLL bypass to derive the system clock from the PLL clock */ rcc_pll_bypass_disable(); /* Update the system clock frequency for housekeeping */ lm4f_rcc_sysclk_freq = (uint32_t)400E6 / pll_div400; } /** * \brief Get the system clock frequency * * @return System clock frequency in Hz */ uint32_t rcc_get_system_clock_frequency(void) { return lm4f_rcc_sysclk_freq; } /* Get the clock frequency corresponding to a given XTAL value */ static uint32_t xtal_to_freq(enum xtal_t xtal) { const uint32_t freqs[] = { 4000000, /* XTAL_4M */ 4096000, /* XTAL_4M_096 */ 4915200, /* XTAL_4M_9152 */ 5000000, /* ,XTAL_5M */ 5120000, /* XTAL_5M_12 */ 6000000, /* XTAL_6M */ 6144000, /* XTAL_6M_144 */ 7372800, /* XTAL_7M_3728 */ 8000000, /* XTAL_8M */ 8192000, /* XTAL_8M_192 */ 10000000, /* XTAL_10M */ 12000000, /* XTAL_12M */ 12288000, /* XTAL_12M_288 */ 13560000, /* XTAL_13M_56 */ 14318180, /* XTAL_14M_31818 */ 16000000, /* XTAL_16M */ 16384000, /* XTAL_16M_384 */ 18000000, /* XTAL_18M */ 20000000, /* XTAL_20M */ 24000000, /* XTAL_24M */ 25000000, /* XTAL_25M */ }; return freqs[xtal - XTAL_4M]; } /** * \brief Configure the system clock source * * Sets up the system clock, including configuring the oscillator source, and * PLL to acheve the desired system clock frequency. Where applicable, The LM4F * clock API uses the new RCC2 register to configure clock parameters. * * Enables the main oscillator if the clock source is OSCSRC_MOSC. If the main * oscillator was previously enabled, it will not be disabled. If desired, it * can be separately disabled by a call to rcc_disable_main_osc(). * * Configures the system clock to run from the 400MHz PLL with a divisor of * pll_div400 applied. If pll_div400 is 0, then the PLL is disabled, and the * system clock is configured to run off a "raw" clock. If the PLL was * previously powered on, it will not be disabled. If desired, it can de powered * off by a call to rcc_pll_off(). * * @param [in] osc_src Oscillator from where to derive the system clock. * @param [in] xtal Type of crystal connected to the OSCO/OSCI pins * @param [in] pll_div400 The clock divisor to apply to the 400MHz PLL clock. * If 0, then the PLL is disabled, and the system runs * off a "raw" clock. * * @return System clock frequency in Hz */ void rcc_sysclk_config(enum osc_src src, enum xtal_t xtal, uint8_t pll_div400) { /* * We could be using the PLL at this point, or we could be running of a * raw clock. Either way, it is safer to bypass the PLL now. */ rcc_pll_bypass_enable(); /* Enable the main oscillator, if needed */ if (src == OSCSRC_MOSC) { rcc_enable_main_osc(); } /* Make RCC2 override RCC */ rcc_enable_rcc2(); /* Set XTAL value to 16MHz */ rcc_configure_xtal(xtal); /* Set the oscillator source */ rcc_set_osc_source(src); if (pll_div400) { /* Enable the PLL */ rcc_pll_on(); /* Configure the PLL to the divisor we want */ rcc_change_pll_divisor(pll_div400); } else { /* We are running off a raw clock */ switch (src) { case OSCSRC_PIOSC: lm4f_rcc_sysclk_freq = 16000000; break; case OSCSRC_PIOSC_D4: lm4f_rcc_sysclk_freq = 4000000; break; case OSCSRC_MOSC: lm4f_rcc_sysclk_freq = xtal_to_freq(xtal); break; case OSCSRC_32K_EXT: lm4f_rcc_sysclk_freq = 32768; break; case OSCSRC_30K_INT: /* Fall through. */ default: /* * We either are running off the internal 30KHz * oscillator, which is +- 50% imprecise, or we got a * bad osc_src parameter. */ lm4f_rcc_sysclk_freq = 0; } } } /** * @} * @} */ ================================================ FILE: firmware/libopencm3/lib/lm4f/systemcontrol.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /** * \brief Enable the clock source for the peripheral * * @param[in] periph peripheral and clock type to enable @see lm4f_clken */ void periph_clock_enable(enum lm4f_clken periph) { MMIO32(SYSCTL_BASE + (periph >> 5)) |= 1 << (periph & 0x1f); } /** * \brief Disable the clock source for the peripheral * * @param[in] periph peripheral and clock type to enable @see lm4f_clken */ void periph_clock_disable(enum lm4f_clken periph) { MMIO32(SYSCTL_BASE + (periph >> 5)) &= ~(1 << (periph & 0x1f)); } ================================================ FILE: firmware/libopencm3/lib/lm4f/uart.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** * @defgroup uart_file UART * * @ingroup LM4Fxx * * @author @htmlonly © @endhtmlonly 2013 Alexandru Gagniuc * * \brief libopencm3 LM4F Universal Asynchronous Receiver Transmitter * * The LM4F UART API provides functionality for accessing the UART hardware of * the LM4F. * * Please see the individual UART modules for more details. To use the UART, the * uart.h header needs to be included: * @code{.c} * #include * @endcode * * @{ */ #include #include #include /** @defgroup uart_config UART configuration * @ingroup uart_file * * \brief Enabling and configuring the UART * * Enabling the UART is a two step process. The GPIO on which the UART resides * must be enabled, and the UART pins must be configured as alternate function, * digital pins. Pins must also be muxed to the appropriate alternate function. * This is done with the GPIO API. * * The second step involves enabling and the UART itself. The UART should be * disabled while it is being configured. * -# The UART clock must be enabled with @ref periph_clock_enable(). * -# The UART must be disabled with @ref uart_disable(). * -# The UART clock source should be chosen before setting the baudrate. * -# Baudrate, data bits, stop bit length, and parity can be configured. * -# If needed, enable CTS or RTS lines via the @ref uart_set_flow_control(). * -# The UART can now be enabled with @ref uart_enable(). * * For example, to enable UART1 at 115200 8n1 with hardware flow control: * @code{.c} * // Enable the UART clock * periph_clock_enable(RCC_UART1); * // We need a brief delay before we can access UART config registers * __asm__("nop"); __asm__("nop"); __asm__("nop"); * // Disable the UART while we mess with its settings * uart_disable(UART1); * // Configure the UART clock source as precision internal oscillator * uart_clock_from_piosc(); * // Set communication parameters * uart_set_baudrate(UART1, 115200); * uart_set_databits(UART1, 8); * uart_set_parity(UART1, UART_PARITY_NONE); * uart_set_stopbits(UART1, 1); * // Enable RTC and CTS lines * uart_set_flow_control(UART1, UART_FLOWCTL_HARD_RTS_CTS); * // Now that we're done messing with the settings, enable the UART * uart_enable(UART1); * @endcode */ /**@{*/ /** * \brief Enable the UART * * Enable the UART. The Rx and Tx lines are also enabled. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable(uint32_t uart) { UART_CTL(uart) |= (UART_CTL_UARTEN | UART_CTL_RXE | UART_CTL_TXE); } /** * \brief Disable the UART * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable(uint32_t uart) { UART_CTL(uart) &= ~UART_CTL_UARTEN; } /** * \brief Set UART baudrate * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] baud Baud rate in bits per second (bps).* */ void uart_set_baudrate(uint32_t uart, uint32_t baud) { uint32_t clock; /* Are we running off the internal clock or system clock? */ if (UART_CC(uart) == UART_CC_CS_PIOSC) { clock = 16000000; } else { clock = rcc_get_system_clock_frequency(); } /* Find the baudrate divisor */ uint32_t div = (((clock * 8) / baud) + 1) / 2; /* Set the baudrate divisors */ UART_IBRD(uart) = div / 64; UART_FBRD(uart) = div % 64; } /** * \brief Set UART databits * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] databits number of data bits per transmission. */ void uart_set_databits(uint32_t uart, uint8_t databits) { uint32_t reg32, bitint32_t; /* This has the same effect as using UART_LCRH_WLEN_5/6/7/8 directly */ bitint32_t = (databits - 5) << 5; /* TODO: What about 9 data bits? */ reg32 = UART_LCRH(uart); reg32 &= ~UART_LCRH_WLEN_MASK; reg32 |= bitint32_t; UART_LCRH(uart) = reg32; } /** * \brief Set UART stopbits * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] bits the requested number of stopbits, either 1 or 2. */ void uart_set_stopbits(uint32_t uart, uint8_t stopbits) { if (stopbits == 2) { UART_LCRH(uart) |= UART_LCRH_STP2; } else { UART_LCRH(uart) &= ~UART_LCRH_STP2; } } /** * \brief Set UART parity * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] bits the requested parity scheme. */ void uart_set_parity(uint32_t uart, enum uart_parity parity) { uint32_t reg32; reg32 = UART_LCRH(uart); reg32 |= UART_LCRH_PEN; reg32 &= ~(UART_LCRH_SPS | UART_LCRH_EPS); switch (parity) { case UART_PARITY_NONE: /* Once we disable parity the other bits are meaningless */ UART_LCRH(uart) &= ~UART_LCRH_PEN; return; case UART_PARITY_ODD: break; case UART_PARITY_EVEN: reg32 |= UART_LCRH_EPS; break; case UART_PARITY_STICK_0: reg32 |= (UART_LCRH_SPS | UART_LCRH_EPS); break; case UART_PARITY_STICK_1: reg32 |= UART_LCRH_SPS; break; } UART_LCRH(uart) = reg32; } /** * \brief Set the flow control scheme * * Set the flow control scheme by enabling or disabling RTS and CTS lines. This * will only have effect if the given UART supports the RTS and CTS lines. * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] flow The flow control scheme to use (none, RTS, CTS or both) \n * UART_FLOWCTL_RTS -- enable the RTS line \n * UART_FLOWCTL_CTS -- enable the CTS line \n * UART_FLOWCTL_RTS_CTS -- enable both RTS and CTS lines */ void uart_set_flow_control(uint32_t uart, enum uart_flowctl flow) { uint32_t reg32 = UART_CTL(uart); reg32 &= ~(UART_CTL_RTSEN | UART_CTL_CTSEN); if (flow == UART_FLOWCTL_RTS) { reg32 |= UART_CTL_RTSEN; } else if (flow == UART_FLOWCTL_CTS) { reg32 |= UART_CTL_CTSEN; } else if (flow == UART_FLOWCTL_RTS_CTS) { reg32 |= (UART_CTL_RTSEN | UART_CTL_CTSEN); } UART_CTL(uart) = reg32; } /** * \brief Clock the UART module from the internal oscillator * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_clock_from_piosc(uint32_t uart) { UART_CC(uart) = UART_CC_CS_PIOSC; } /** * \brief Clock the UART module from the system clock * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_clock_from_sysclk(uint32_t uart) { UART_CC(uart) = UART_CC_CS_SYSCLK; } /**@}*/ /** @defgroup uart_send_recv UART transmission and reception * @ingroup uart_file * * \brief Sending and receiving data through the UART * * Primitives for sending and recieving data are provided, @ref uart_send() and * @ref uart_recv(). These primitives do not check if data can be transmitted * or wait for data. If waiting until data is available or can be transmitted is * desired, blocking primitives are also available, @ref uart_send_blocking() * and @ref uart_recv_blocking(). * * These primitives only handle one byte at at time, and thus may be unsuited * for some applications. You may also consider using @ref uart_dma. */ /**@{*/ /** * \brief UART Send a Data Word. * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] data data to send. */ void uart_send(uint32_t uart, uint16_t data) { data &= 0xFF; UART_DR(uart) = data; } /** * \brief UART Read a Received Data Word. * * @param[in] uart UART block register address base @ref uart_reg_base * @return data from the Rx FIFO. */ uint16_t uart_recv(uint32_t uart) { return UART_DR(uart) & UART_DR_DATA_MASK; } /** * \brief UART Wait for Transmit Data Buffer Not Full * * Blocks until the transmit data FIFO is not empty and can accept the next data * word. * \n * Even if the FIFO is not empty, this function will return as long as there is * room for at least one more word. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_wait_send_ready(uint32_t uart) { /* Wait until the Tx FIFO is no longer full */ while (UART_FR(uart) & UART_FR_TXFF); } /** * \brief UART Wait for Received Data Available * * Blocks until the receive data FIFO holds a at least valid received data word. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_wait_recv_ready(uint32_t uart) { /* Wait until the Tx FIFO is no longer empty */ while (UART_FR(uart) & UART_FR_RXFE); } /** * \brief UART Send Data Word with Blocking * * Blocks until the transmit data FIFO can accept the next data word for * transmission. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_send_blocking(uint32_t uart, uint16_t data) { uart_wait_send_ready(uart); uart_send(uart, data); } /** * \brief UART Read a Received Data Word with Blocking. * * Wait until a data word has been received then return the word. * * @param[in] uart UART block register address base @ref uart_reg_base * @return data from the Rx FIFO. */ uint16_t uart_recv_blocking(uint32_t uart) { uart_wait_recv_ready(uart); return uart_recv(uart); } /**@}*/ /** @defgroup uart_irq UART Interrupt control * @ingroup uart_file * * \brief Configuring interrupts from the UART * * To have an event generate an interrupt, its interrupt source must be * unmasked. This can be achieved with @ref uart_enable_interrupts(). Interrupts * which are no longer needed can be disabled through * @ref uart_disable_interrupts(). * * In order for the interrupt to generate an IRQ and a call to the interrupt * service routine, the interrupt for the target UART must be routed through the * NVIC with @ref nvic_enable_irq(). For this last step, the nvic.h header is * needed: * @code{.c} * #include * @endcode * * Enabling an interrupt is as simple as unmasking the desired interrupt, and * routing the desired UART's interrupt through the NVIC. * @code{.c} * // Unmask receive interrupt * uart_enable_rx_interrupt(UART0); * // Make sure the interrupt is routed through the NVIC * nvic_enable_irq(NVIC_UART0_IRQ); * @endcode * * If a more than one interrupt is to be enabled at one time, the interrupts * can be enabled by a single call to @ref uart_enable_interrupts(). * For example: * @code{.c} * // Unmask receive, CTS, and RI, interrupts * uart_enable_interrupts(UART0, UART_INT_RX | UART_INT_RI | UART_INT_CTS); * @endcode * * After interrupts are properly enabled and routed through the NVIC, when an * event occurs, the appropriate IRQ flag is set by hardware, and execution * jumps to the UART ISR. The ISR should query the IRQ flags to determine which * event caused the interrupt. For this, use @ref uart_is_interrupt_source(), * with the desired UART_INT flag. After one or more interrupt sources are * serviced, the IRQ flags must be cleared by the ISR. This can be done with * @ref uart_clear_interrupt_flag(). * * A typical UART ISR may look like the following: * @code{.c} * void uart0_isr(void) * { * uint32_t serviced_irqs = 0; * * // Process individual IRQs * if (uart_is_interrupt_source(UART0, UART_INT_RX)) { * process_rx_event(); * serviced_irq |= UART_INT_RX; * } * if (uart_is_interrupt_source(UART0, UART_INT_CTS)) { * process_cts_event(); * serviced_irq |= UART_INT_CTS; * } * * // Clear the interupt flag for the processed IRQs * uart_clear_interrupt_flag(UART0, serviced_irqs); * } * @endcode */ /**@{*/ /** * \brief Enable Specific UART Interrupts * * Enable any combination of interrupts. Interrupts may be OR'ed together to * enable them with one call. For example, to enable both the RX and CTS * interrupts, pass (UART_INT_RX | UART_INT_CTS) * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] ints Interrupts which to enable. Any combination of interrupts may * be specified by OR'ing then together */ void uart_enable_interrupts(uint32_t uart, enum uart_interrupt_flag ints) { UART_IM(uart) |= ints; } /** * \brief Enable Specific UART Interrupts * * Disabe any combination of interrupts. Interrupts may be OR'ed together to * disable them with one call. For example, to disable both the RX and CTS * interrupts, pass (UART_INT_RX | UART_INT_CTS) * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] ints Interrupts which to disable. Any combination of interrupts * may be specified by OR'ing then together */ void uart_disable_interrupts(uint32_t uart, enum uart_interrupt_flag ints) { UART_IM(uart) &= ~ints; } /** * \brief Enable the UART Receive Interrupt. * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable_rx_interrupt(uint32_t uart) { uart_enable_interrupts(uart, UART_INT_RX); } /** * \brief Disable the UART Receive Interrupt. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable_rx_interrupt(uint32_t uart) { uart_disable_interrupts(uart, UART_INT_RX); } /** * \brief Enable the UART Transmit Interrupt. * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable_tx_interrupt(uint32_t uart) { uart_enable_interrupts(uart, UART_INT_TX); } /** * \brief Disable the UART Transmit Interrupt. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable_tx_interrupt(uint32_t uart) { uart_disable_interrupts(uart, UART_INT_TX); } /** * \brief Mark interrupt as serviced * * After an interrupt is services, its flag must be cleared. If the flag is not * cleared, then execution will jump back to the start of the ISR after the ISR * returns. * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] ints Interrupts which to clear. Any combination of interrupts may * be specified by OR'ing then together */ void uart_clear_interrupt_flag(uint32_t uart, enum uart_interrupt_flag ints) { UART_ICR(uart) |= ints; } /**@}*/ /** @defgroup uart_dma UART DMA control * @ingroup uart_file * * \brief Enabling Direct Memory Access transfers for the UART * */ /**@{*/ /** * \brief Enable the UART Receive DMA. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable_rx_dma(uint32_t uart) { UART_DMACTL(uart) |= UART_DMACTL_RXDMAE; } /** * \brief Disable the UART Receive DMA. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable_rx_dma(uint32_t uart) { UART_DMACTL(uart) &= ~UART_DMACTL_RXDMAE; } /** * \brief Enable the UART Transmit DMA. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable_tx_dma(uint32_t uart) { UART_DMACTL(uart) |= UART_DMACTL_TXDMAE; } /** * \brief Disable the UART Transmit DMA. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable_tx_dma(uint32_t uart) { UART_DMACTL(uart) &= ~UART_DMACTL_TXDMAE; } /**@}*/ /** @defgroup uart_fifo UART FIFO control * @ingroup uart_file * * \brief Enabling and controlling UART FIFO * * The UART on the LM4F can either be used with a single character TX and RX * buffer, or with a 8 character TX and RX FIFO. In order to use the FIFO it * must be enabled, this is done with uart_enable_fifo() and can be disabled * again with uart_disable_fifo(). On reset the FIFO is disabled, and it must * be explicitly be enabled. * * When enabling the UART FIFOs, RX and TX interrupts are triggered according * to the amount of data in the FIFOs. For the RX FIFO the trigger level is * defined by how full the FIFO is. The TX FIFO trigger level is defined by * how empty the FIFO is instead. * * For example, to enable the FIFOs and trigger interrupts for a single * received and single transmitted character: * @code{.c} * uart_enable_fifo(UART0); * uart_set_fifo_trigger_levels(UART0, UART_FIFO_RX_TRIG_1_8, * UART_FIFO_TX_TRIG_7_8); * @endcode */ /**@{*/ /** * \brief Enable FIFO for the UART. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_enable_fifo(uint32_t uart) { UART_LCRH(uart) |= UART_LCRH_FEN; } /** * \brief Disable FIFO for the UART. * * @param[in] uart UART block register address base @ref uart_reg_base */ void uart_disable_fifo(uint32_t uart) { UART_LCRH(uart) &= ~UART_LCRH_FEN; } /** * \brief Set the FIFO trigger levels. * * @param[in] uart UART block register address base @ref uart_reg_base * @param[in] rx_level Trigger level for RX FIFO * @param[in] tx_level Trigger level for TX FIFO */ void uart_set_fifo_trigger_levels(uint32_t uart, enum uart_fifo_rx_trigger_level rx_level, enum uart_fifo_tx_trigger_level tx_level) { UART_IFLS(uart) = rx_level | tx_level; } /**@}*/ /** * @} */ ================================================ FILE: firmware/libopencm3/lib/lm4f/usb_lm4f.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Alexandru Gagniuc * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /** * @defgroup usb_file USB * * @ingroup LM4Fxx * * @author @htmlonly © @endhtmlonly 2013 * Alexandru Gagniuc * * \brief libopencm3 LM4F Universal Serial Bus controller * * The LM4F USB driver is integrated with the libopencm3 USB stack. You should * use the generic stack. * * To use this driver, tell the linker to look for it: * @code{.c} * extern usbd_driver lm4f_usb_driver; * @endcode * * And pass this driver as an argument when initializing the USB stack: * @code{.c} * usbd_device *usbd_dev; * usbd_dev = usbd_init(&lm4f_usb_driver, ...); * @endcode * * Polling or interrupt-driven? * * The LM4F USB driver will work fine regardless of whether it is called from an * interrupt service routine, or from the main program loop. * * Polling USB from the main loop requires calling @ref usbd_poll() from the * main program loop. * For example: * @code{.c} * // Main program loop * while(1) { * usbd_poll(usb_dev); * do_other_stuff(); * ... * @endcode * * Running @ref usbd_poll() from an interrupt has the advantage that it is only * called when needed, saving CPU cycles for the main program. * * RESET, DISCON, RESUME, and SUSPEND interrupts must be enabled, along with the * interrupts for any endpoint that is used. The EP0_TX interrupt must be * enabled for the control endpoint to function correctly. * For example, if EP1IN and EP2OUT are used, then the EP0_TX, EP1_TX, and * EP2_RX interrupts should be enabled: * @code{.c} * // Enable USB interrupts for EP0, EP1IN, and EP2OUT * ints = USB_INT_RESET | USB_INT_DISCON | USB_INT_RESUME | * USB_INT_SUSPEND; * usb_enable_interrupts(ints, USB_EP2_INT, USB_EP0_INT | USB_EP1_INT); * // Route the interrupts through the NVIC * nvic_enable_irq(NVIC_USB0_IRQ); * @endcode * * The USB ISR only has to call @ref usbd_poll(). * * @code{.c} * void usb0_isr(void) * { * usbd_poll(usb_dev); * } * @endcode * @{ */ /* * TODO list: * * 1) Driver works by reading and writing to the FIFOs one byte at a time. It * has no knowledge of DMA. * 2) Double-buffering is supported. How can we take advantage of it to speed * up endpoint transfers. * 3) No benchmarks as to the endpoint's performance has been done. */ /* * The following are resources referenced in comments: * [1] http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/238784.aspx */ #include #include #include #include #include "../../lib/usb/usb_private.h" #include #define MAX_FIFO_RAM (4 * 1024) const struct _usbd_driver lm4f_usb_driver; /** * \brief Enable Specific USB Interrupts * * Enable any combination of interrupts. Interrupts may be OR'ed together to * enable them with one call. For example, to enable both the RESUME and RESET * interrupts, pass (USB_INT_RESUME | USB_INT_RESET) * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] ints Interrupts which to enable. Any combination of interrupts may * be specified by OR'ing then together * @param[in] rx_ints Endpoints for which to generate an interrupt when a packet * packet is received. * @param[in] tx_ints Endpoints for which to generate an interrupt when a packet * packet is finished transmitting. */ void usb_enable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints) { USB_IE |= ints; USB_RXIE |= rx_ints; USB_TXIE |= tx_ints; } /** * \brief Disable Specific USB Interrupts * * Disable any combination of interrupts. Interrupts may be OR'ed together to * enable them with one call. For example, to disable both the RESUME and RESET * interrupts, pass (USB_INT_RESUME | USB_INT_RESET) * * Note that the NVIC must be enabled and properly configured for the interrupt * to be routed to the CPU. * * @param[in] ints Interrupts which to disable. Any combination of interrupts * may be specified by OR'ing then together * @param[in] rx_ints Endpoints for which to stop generating an interrupt when a * packet packet is received. * @param[in] tx_ints Endpoints for which to stop generating an interrupt when a * packet packet is finished transmitting. */ void usb_disable_interrupts(enum usb_interrupt ints, enum usb_ep_interrupt rx_ints, enum usb_ep_interrupt tx_ints) { USB_IE &= ~ints; USB_RXIE &= ~rx_ints; USB_TXIE &= ~tx_ints; } /** * @cond private */ static inline void lm4f_usb_soft_disconnect(void) { USB_POWER &= ~USB_POWER_SOFTCONN; } static inline void lm4f_usb_soft_connect(void) { USB_POWER |= USB_POWER_SOFTCONN; } static void lm4f_set_address(usbd_device *usbd_dev, uint8_t addr) { (void)usbd_dev; USB_FADDR = addr & USB_FADDR_FUNCADDR_MASK; } static void lm4f_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback) (usbd_device *usbd_dev, uint8_t ep)) { (void)usbd_dev; (void)type; uint8_t reg8; uint16_t fifo_size; const bool dir_tx = addr & 0x80; const uint8_t ep = addr & 0x0f; /* * We do not mess with the maximum packet size, but we can only allocate * the FIFO in power-of-two increments. */ if (max_size > 1024) { fifo_size = 2048; reg8 = USB_FIFOSZ_SIZE_2048; } else if (max_size > 512) { fifo_size = 1024; reg8 = USB_FIFOSZ_SIZE_1024; } else if (max_size > 256) { fifo_size = 512; reg8 = USB_FIFOSZ_SIZE_512; } else if (max_size > 128) { fifo_size = 256; reg8 = USB_FIFOSZ_SIZE_256; } else if (max_size > 64) { fifo_size = 128; reg8 = USB_FIFOSZ_SIZE_128; } else if (max_size > 32) { fifo_size = 64; reg8 = USB_FIFOSZ_SIZE_64; } else if (max_size > 16) { fifo_size = 32; reg8 = USB_FIFOSZ_SIZE_32; } else if (max_size > 8) { fifo_size = 16; reg8 = USB_FIFOSZ_SIZE_16; } else { fifo_size = 8; reg8 = USB_FIFOSZ_SIZE_8; } /* Endpoint 0 is more special */ if (addr == 0) { USB_EPIDX = 0; if (reg8 > USB_FIFOSZ_SIZE_64) { reg8 = USB_FIFOSZ_SIZE_64; } /* The RX and TX FIFOs are shared for EP0 */ USB_RXFIFOSZ = reg8; USB_TXFIFOSZ = reg8; /* * Regardless of how much we allocate, the first 64 bytes * are always reserved for EP0. */ usbd_dev->fifo_mem_top_ep0 = 64; return; } /* Are we out of FIFO space? */ if (usbd_dev->fifo_mem_top + fifo_size > MAX_FIFO_RAM) { return; } USB_EPIDX = addr & USB_EPIDX_MASK; /* FIXME: What about double buffering? */ if (dir_tx) { USB_TXMAXP(ep) = max_size; USB_TXFIFOSZ = reg8; USB_TXFIFOADD = ((usbd_dev->fifo_mem_top) >> 3); if (callback) { usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_IN] = (void *)callback; } if (type == USB_ENDPOINT_ATTR_ISOCHRONOUS) { USB_TXCSRH(ep) |= USB_TXCSRH_ISO; } else { USB_TXCSRH(ep) &= ~USB_TXCSRH_ISO; } } else { USB_RXMAXP(ep) = max_size; USB_RXFIFOSZ = reg8; USB_RXFIFOADD = ((usbd_dev->fifo_mem_top) >> 3); if (callback) { usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_OUT] = (void *)callback; } if (type == USB_ENDPOINT_ATTR_ISOCHRONOUS) { USB_RXCSRH(ep) |= USB_RXCSRH_ISO; } else { USB_RXCSRH(ep) &= ~USB_RXCSRH_ISO; } } usbd_dev->fifo_mem_top += fifo_size; } static void lm4f_endpoints_reset(usbd_device *usbd_dev) { /* * The core resets the endpoints automatically on reset. * The first 64 bytes are always reserved for EP0 */ usbd_dev->fifo_mem_top = 64; } static void lm4f_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall) { (void)usbd_dev; const uint8_t ep = addr & 0x0f; const bool dir_tx = addr & 0x80; if (ep == 0) { if (stall) { USB_CSRL0 |= USB_CSRL0_STALL; } else { USB_CSRL0 &= ~USB_CSRL0_STALL; } return; } if (dir_tx) { if (stall) { (USB_TXCSRL(ep)) |= USB_TXCSRL_STALL; } else { (USB_TXCSRL(ep)) &= ~USB_TXCSRL_STALL; } } else { if (stall) { (USB_RXCSRL(ep)) |= USB_RXCSRL_STALL; } else { (USB_RXCSRL(ep)) &= ~USB_RXCSRL_STALL; } } } static uint8_t lm4f_ep_stall_get(usbd_device *usbd_dev, uint8_t addr) { (void)usbd_dev; const uint8_t ep = addr & 0x0f; const bool dir_tx = addr & 0x80; if (ep == 0) { return USB_CSRL0 & USB_CSRL0_STALLED; } if (dir_tx) { return USB_TXCSRL(ep) & USB_TXCSRL_STALLED; } else { return USB_RXCSRL(ep) & USB_RXCSRL_STALLED; } } static void lm4f_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak) { (void)usbd_dev; (void)addr; (void)nak; /* NAK's are handled automatically by hardware. Move along. */ } static uint16_t lm4f_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len) { const uint8_t ep = addr & 0xf; uint16_t i; (void)usbd_dev; /* Don't touch the FIFO if there is still a packet being transmitted */ if (ep == 0 && (USB_CSRL0 & USB_CSRL0_TXRDY)) { return 0; } else if (USB_TXCSRL(ep) & USB_TXCSRL_TXRDY) { return 0; } /* * We don't need to worry about buf not being aligned. If it's not, * the reads are downgraded to 8-bit in hardware. We lose a bit of * performance, but we don't crash. */ for (i = 0; i < (len & ~0x3); i += 4) { USB_FIFO32(ep) = *((uint32_t *)(buf + i)); } if (len & 0x2) { USB_FIFO16(ep) = *((uint16_t *)(buf + i)); i += 2; } if (len & 0x1) { USB_FIFO8(ep) = *((uint8_t *)(buf + i)); i += 1; } if (ep == 0) { /* * EP0 is very special. We should only set DATAEND when we * transmit the last packet in the transaction. A transaction * that is a multiple of 64 bytes will end with a zero-length * packet, so our check is sane. */ if (len != 64) { USB_CSRL0 |= USB_CSRL0_TXRDY | USB_CSRL0_DATAEND; } else { USB_CSRL0 |= USB_CSRL0_TXRDY; } } else { USB_TXCSRL(ep) |= USB_TXCSRL_TXRDY; } return i; } static uint16_t lm4f_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len) { (void)usbd_dev; uint16_t rlen; uint8_t ep = addr & 0xf; uint16_t fifoin = USB_RXCOUNT(ep); rlen = (fifoin > len) ? len : fifoin; /* * We don't need to worry about buf not being aligned. If it's not, * the writes are downgraded to 8-bit in hardware. We lose a bit of * performance, but we don't crash. */ for (len = 0; len < (rlen & ~0x3); len += 4) { *((uint32_t *)(buf + len)) = USB_FIFO32(ep); } if (rlen & 0x2) { *((uint16_t *)(buf + len)) = USB_FIFO16(ep); len += 2; } if (rlen & 0x1) { *((uint8_t *)(buf + len)) = USB_FIFO8(ep); } if (ep == 0) { /* * Clear RXRDY * Datasheet says that DATAEND must also be set when clearing * RXRDY. We don't do that. If did this when transmitting a * packet larger than 64 bytes, only the first 64 bytes would * be transmitted, followed by a handshake. The host would only * get 64 bytes, seeing it as a malformed packet. Usually, we * would not get past enumeration. */ USB_CSRL0 |= USB_CSRL0_RXRDYC; } else { USB_RXCSRL(ep) &= ~USB_RXCSRL_RXRDY; } return rlen; } static void lm4f_poll(usbd_device *usbd_dev) { void (*tx_cb)(usbd_device *usbd_dev, uint8_t ea); void (*rx_cb)(usbd_device *usbd_dev, uint8_t ea); int i; /* * The initial state of these registers might change, as we process the * interrupt, but we need the initial state in order to decide how to * handle events. */ const uint8_t usb_is = USB_IS; const uint8_t usb_rxis = USB_RXIS; const uint8_t usb_txis = USB_TXIS; const uint8_t usb_csrl0 = USB_CSRL0; if ((usb_is & USB_IM_SUSPEND) && (usbd_dev->user_callback_suspend)) { usbd_dev->user_callback_suspend(); } if ((usb_is & USB_IM_RESUME) && (usbd_dev->user_callback_resume)) { usbd_dev->user_callback_resume(); } if (usb_is & USB_IM_RESET) { _usbd_reset(usbd_dev); } if ((usb_is & USB_IM_SOF) && (usbd_dev->user_callback_sof)) { usbd_dev->user_callback_sof(); } if (usb_txis & USB_EP0) { /* * The EP0 bit in USB_TXIS is special. It tells us that * something happened on EP0, but does not tell us what. This * bit does not necessarily tell us that a packet was * transmitted, so we have to go through all the possibilities * to figure out exactly what did. Only after we've exhausted * all other possibilities, can we assume this is a EPO * "transmit complete" interrupt. */ if (usb_csrl0 & USB_CSRL0_RXRDY) { enum _usbd_transaction type; type = (usbd_dev->control_state.state != DATA_OUT && usbd_dev->control_state.state != LAST_DATA_OUT) ? USB_TRANSACTION_SETUP : USB_TRANSACTION_OUT; if (usbd_dev->user_callback_ctr[0][type]) { usbd_dev-> user_callback_ctr[0][type](usbd_dev, 0); } } else { tx_cb = usbd_dev->user_callback_ctr[0] [USB_TRANSACTION_IN]; /* * EP0 bit in TXIS is set not only when a packet is * finished transmitting, but also when RXRDY is set, or * when we set TXRDY to transmit a packet. If any of * those are the case, then we do not want to call our * IN callback, since the state machine will be in the * wrong state, and we'll just stall our control * endpoint. * In fact, the only way to know if it's time to call * our TX callback is to know what to expect. The * hardware does not tell us what sort of transaction * this is. We need to work with the state machine to * figure it all out. See [1] for details. */ if ((usbd_dev->control_state.state != DATA_IN) && (usbd_dev->control_state.state != LAST_DATA_IN) && (usbd_dev->control_state.state != STATUS_IN)) { return; } if (tx_cb) { tx_cb(usbd_dev, 0); } } } /* See which interrupt occurred */ for (i = 1; i < 8; i++) { tx_cb = usbd_dev->user_callback_ctr[i][USB_TRANSACTION_IN]; rx_cb = usbd_dev->user_callback_ctr[i][USB_TRANSACTION_OUT]; if ((usb_txis & (1 << i)) && tx_cb) { tx_cb(usbd_dev, i); } if ((usb_rxis & (1 << i)) && rx_cb) { rx_cb(usbd_dev, i); } } } static void lm4f_disconnect(usbd_device *usbd_dev, bool disconnected) { (void)usbd_dev; /* * This is all it takes: * usbd_disconnect(dev, 1) followed by usbd_disconnect(dev, 0) * causes the device to re-enumerate and re-configure properly. */ if (disconnected) { lm4f_usb_soft_disconnect(); } else { lm4f_usb_soft_connect(); } } /* * A static struct works as long as we have only one USB peripheral. If we * meet LM4Fs with more than one USB, then we need to rework this approach. */ static struct _usbd_device usbd_dev; /** Initialize the USB device controller hardware of the LM4F. */ static usbd_device *lm4f_usbd_init(void) { int i; /* Start the USB clock */ periph_clock_enable(RCC_USB0); /* Enable the USB PLL interrupts - used to assert PLL lock */ SYSCTL_IMC |= (SYSCTL_IMC_USBPLLLIM | SYSCTL_IMC_PLLLIM); rcc_usb_pll_on(); /* Make sure we're disconnected. We'll reconnect later */ lm4f_usb_soft_disconnect(); /* Software reset USB */ SYSCTL_SRUSB = 1; for (i = 0; i < 1000; i++) { __asm__("nop"); } SYSCTL_SRUSB = 0; /* * Wait for the PLL to lock before soft connecting * This will result in a deadlock if the system clock is not setup * correctly (clock from main oscillator). */ /* Wait for it */ i = 0; while ((SYSCTL_RIS & SYSCTL_RIS_USBPLLLRIS) == 0) { i++; if (i > 0xffff) { return 0; } } /* Now connect to USB */ lm4f_usb_soft_connect(); /* No FIFO allocated yet, but the first 64 bytes are still reserved */ usbd_dev.fifo_mem_top = 64; return &usbd_dev; } /* What is this thing even good for */ #define RX_FIFO_SIZE 512 const struct _usbd_driver lm4f_usb_driver = { .init = lm4f_usbd_init, .set_address = lm4f_set_address, .ep_setup = lm4f_ep_setup, .ep_reset = lm4f_endpoints_reset, .ep_stall_set = lm4f_ep_stall_set, .ep_stall_get = lm4f_ep_stall_get, .ep_nak_set = lm4f_ep_nak_set, .ep_write_packet = lm4f_ep_write_packet, .ep_read_packet = lm4f_ep_read_packet, .poll = lm4f_poll, .disconnect = lm4f_disconnect, .base_address = USB_BASE, .set_address_before_status = false, .rx_fifo_size = RX_FIFO_SIZE, }; /** * @endcond */ /** * @} */ ================================================ FILE: firmware/libopencm3/lib/lpc13xx/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lpc13xx PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLPC13XX # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o VPATH += ../cm3 include ../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lpc13xx/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup LPC13xx @brief libopencm3 LPC13xx General Purpose I/O @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include void gpio_set(uint32_t gpioport, uint16_t gpios) { GPIO_DATA(gpioport) = gpios; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc13xx/libopencm3_lpc13xx.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC13XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/lpc17xx/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lpc17xx PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -O0 -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLPC17XX # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o VPATH += ../cm3 include ../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lpc17xx/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup LPC17xx @brief libopencm3 LPC17xx General Purpose I/O @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include void gpio_set(uint32_t gpioport, uint32_t gpios) { GPIO_SET(gpioport) = gpios; } void gpio_clear(uint32_t gpioport, uint32_t gpios) { GPIO_CLR(gpioport) = gpios; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc17xx/libopencm3_lpc17xx.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC13XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/lpc43xx/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup LPC43xx @brief libopencm3 LPC43xx General Purpose I/O @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include void gpio_set(uint32_t gpioport, uint32_t gpios) { GPIO_SET(gpioport) = gpios; } void gpio_clear(uint32_t gpioport, uint32_t gpios) { GPIO_CLR(gpioport) = gpios; } void gpio_toggle(uint32_t gpioport, uint32_t gpios) { GPIO_NOT(gpioport) = gpios; } uint32_t gpio_get(uint32_t gpioport, uint32_t gpios) { return (GPIO_PIN(gpioport) & gpios) != 0; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc43xx/i2c.c ================================================ /** @defgroup i2c_file I2C @ingroup LPC43xx @brief libopencm3 LPC43xx I2C @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Michael Ossmann LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * This is a very minimal I2C driver just to make sure we can get the * peripheral working. */ /**@{*/ #include #include #include void i2c0_init(const uint16_t duty_cycle_count) { /* enable input on SCL and SDA pins */ SCU_SFSI2C0 = SCU_I2C0_NOMINAL; I2C0_SCLH = duty_cycle_count; I2C0_SCLL = duty_cycle_count; /* clear the control bits */ I2C0_CONCLR = (I2C_CONCLR_AAC | I2C_CONCLR_SIC | I2C_CONCLR_STAC | I2C_CONCLR_I2ENC); /* enable I2C0 */ I2C0_CONSET = I2C_CONSET_I2EN; } /* transmit start bit */ void i2c0_tx_start(void) { I2C0_CONCLR = I2C_CONCLR_SIC; I2C0_CONSET = I2C_CONSET_STA; while (!(I2C0_CONSET & I2C_CONSET_SI)); I2C0_CONCLR = I2C_CONCLR_STAC; } /* transmit data byte */ void i2c0_tx_byte(uint8_t byte) { if (I2C0_CONSET & I2C_CONSET_STA) { I2C0_CONCLR = I2C_CONCLR_STAC; } I2C0_DAT = byte; I2C0_CONCLR = I2C_CONCLR_SIC; while (!(I2C0_CONSET & I2C_CONSET_SI)); } /* receive data byte */ uint8_t i2c0_rx_byte(void) { if (I2C0_CONSET & I2C_CONSET_STA) { I2C0_CONCLR = I2C_CONCLR_STAC; } I2C0_CONCLR = I2C_CONCLR_SIC; while (!(I2C0_CONSET & I2C_CONSET_SI)); return I2C0_DAT; } /* transmit stop bit */ void i2c0_stop(void) { if (I2C0_CONSET & I2C_CONSET_STA) { I2C0_CONCLR = I2C_CONCLR_STAC; } I2C0_CONSET = I2C_CONSET_STO; I2C0_CONCLR = I2C_CONCLR_SIC; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc43xx/ipc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include /* Set M0 in reset mode */ void ipc_halt_m0(void) { volatile uint32_t rst_active_status1; /* Check if M0 is reset by reading status */ rst_active_status1 = RESET_ACTIVE_STATUS1; /* If the M0 has reset not asserted, halt it... */ while (rst_active_status1 & RESET_CTRL1_M0APP_RST) { RESET_CTRL1 = ((~rst_active_status1) | RESET_CTRL1_M0APP_RST); rst_active_status1 = RESET_ACTIVE_STATUS1; } } void ipc_start_m0(uint32_t cm0_baseaddr) { volatile uint32_t rst_active_status1; /* Set M0 memory mapping to point to start of M0 image */ CREG_M0APPMEMMAP = cm0_baseaddr; /* Start/run M0 core */ /* Release Slave from reset, first read status */ rst_active_status1 = RESET_ACTIVE_STATUS1; /* If the M0 is being held in reset, release it */ /* 1 = no reset, 0 = reset */ while (!(rst_active_status1 & RESET_CTRL1_M0APP_RST)) { RESET_CTRL1 = ((~rst_active_status1) & ~RESET_CTRL1_M0APP_RST); rst_active_status1 = RESET_ACTIVE_STATUS1; } } void ipc_m0apptxevent_clear(void) { CREG_M0TXEVENT &= ~CREG_M0TXEVENT_TXEVCLR; } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m0/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 Michael Ossmann ## Copyright (C) 2012/2013 Benjamin Vernoux ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lpc43xx_m0 PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -O2 -g3 -Wall -Wextra -I../../../include -fno-common \ -mcpu=cortex-m0 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DLPC43XX -DLPC43XX_M0 # ARFLAGS = rcsv ARFLAGS = rcs # LPC43xx common files for M4 / M0 OBJ_LPC43XX = gpio.o scu.o i2c.o ssp.o uart.o timer.o #LPC43xx M0 specific file + Generic LPC43xx M4/M0 files OBJS = $(OBJ_LPC43XX) VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m0/libopencm3_lpc43xx_m0.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Benjamin Vernoux * Copyright (C) 2012 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC43XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { . = ORIGIN(ram); .text : { . = ALIGN(0x400); *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >ram /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >ram .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >ram .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >ram /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >ram /* exception index - required due to libgcc.a issuing /0 exceptions */ .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >ram . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram _data_loadaddr = _data; /* Force src and dest equal (no-op) */ _edata = _data; /* Prevent copying data */ .bss : { _bss = .; *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* exception unwind data - required due to libgcc.a issuing /0 exceptions */ .ARM.extab : { *(.ARM.extab*) } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; __StackTop = ORIGIN(ram) + LENGTH(ram); PROVIDE(_stack = __StackTop); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m4/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 Michael Ossmann ## Copyright (C) 2012 Benjamin Vernoux ## Copyright (C) 2013 Alexandru Gagniuc ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lpc43xx FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -O2 -g3 \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m4 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD \ $(FP_FLAGS) -DLPC43XX -DLPC43XX_M4 ARFLAGS = rcs # LPC43xx common files for M4 / M0 OBJ_LPC43XX = gpio.o scu.o i2c.o ssp.o uart.o timer.o #LPC43xx M4 specific file + Generic LPC43xx M4/M0 files OBJS = $(OBJ_LPC43XX) ipc.o VPATH += ../:../../cm3 include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m4/libopencm3_lpc43xx.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Benjamin Vernoux * Copyright (C) 2012 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC43XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { . = ALIGN(0x400); _text_ram = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom /* exception index - required due to libgcc.a issuing /0 exceptions */ .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; _etext_ram = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ _etext_rom = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ . = ORIGIN(ram_local2); .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram_local2 AT >rom _data_loadaddr = LOADADDR(.data); _data_rom = LOADADDR (.data) + ORIGIN(rom); _edata_rom = _data_rom + SIZEOF (.data); .bss : { _bss = .; *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram_local2 /* exception unwind data - required due to libgcc.a issuing /0 exceptions */ .ARM.extab : { *(.ARM.extab*) } >ram_local2 /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; /* Leave room above stack for IAP to run. */ __StackTop = ORIGIN(ram_local2) + LENGTH(ram_local2) - 32; PROVIDE(_stack = __StackTop); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m4/libopencm3_lpc43xx_ram_only.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Benjamin Vernoux * Copyright (C) 2012 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC43XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { . = ORIGIN(ram_local1); .text : { . = ALIGN(0x400); _text_ram = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >ram_local1 /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >ram_local1 .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >ram_local1 .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >ram_local1 /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >ram_local1 /* exception index - required due to libgcc.a issuing /0 exceptions */ __exidx_start = .; .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } > ram_local1 . = ALIGN(4); _etext = .; _etext_ram = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ _etext_rom = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */ . = ORIGIN(ram_local2); .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram_local2 _data_loadaddr = LOADADDR(.data); /* Running from RAM only, loading the .elf will initialize data for us. */ _data_rom = .; _edata_rom = .; _data = .; _edata = .; .bss : { _bss = .; *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram_local2 /* exception unwind data - required due to libgcc.a issuing /0 exceptions */ .ARM.extab : { *(.ARM.extab*) } >ram_local2 /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support - discard it for now. */ /DISCARD/ : { *(.ARM.exidx) } end = .; /* Leave room above stack for IAP to run. */ __StackTop = ORIGIN(ram_local2) + LENGTH(ram_local2) - 32; PROVIDE(_stack = __StackTop); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2012 Michael Ossmann * Copyright (C) 2012 Benjamin Vernoux * Copyright (C) 2012 Jared Boone * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for LPC43XX targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { . = ALIGN(0x400); _text_ram = (. - ORIGIN(rom)) + ORIGIN(ram_local1); /* Start of Code in RAM */ *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom /* exception index - required due to libgcc.a issuing /0 exceptions */ .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; _etext_ram = (. - ORIGIN(rom)) + ORIGIN(ram_local1); _etext_rom = (. - ORIGIN(rom)) + ORIGIN(rom_flash); . = ORIGIN(ram_local2); .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram_local2 AT >rom _data_loadaddr = LOADADDR(.data); _data_rom = LOADADDR (.data) + ORIGIN(rom_flash); _edata_rom = _data_rom + SIZEOF (.data); .bss : { _bss = .; *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram_local2 /* exception unwind data - required due to libgcc.a issuing /0 exceptions */ .ARM.extab : { *(.ARM.extab*) } >ram_local2 /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; /* Leave room above stack for IAP to run. */ __StackTop = ORIGIN(ram_local2) + LENGTH(ram_local2) - 32; PROVIDE(_stack = __StackTop); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/m4/vector_chipset.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * Copyright (C) 2012 Michael Ossmann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include extern unsigned _etext_ram, _text_ram, _etext_rom; #define CREG_M4MEMMAP MMIO32((0x40043000 + 0x100)) static void pre_main(void) { volatile unsigned *src, *dest; /* Copy the code from ROM to Real RAM (if enabled) */ if ((&_etext_ram-&_text_ram) > 0) { src = &_etext_rom-(&_etext_ram-&_text_ram); /* Change Shadow memory to ROM (for Debug Purpose in case Boot * has not set correctly the M4MEMMAP because of debug) */ CREG_M4MEMMAP = (unsigned long)src; for (dest = &_text_ram; dest < &_etext_ram; ) { *dest++ = *src++; } /* Change Shadow memory to Real RAM */ CREG_M4MEMMAP = (unsigned long)&_text_ram; /* Continue Execution in RAM */ } /* Enable access to Floating-Point coprocessor. */ SCB_CPACR |= SCB_CPACR_FULL * (SCB_CPACR_CP10 | SCB_CPACR_CP11); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/scu.c ================================================ /** @defgroup scu_file System Control Unit @ingroup LPC43xx @brief libopencm3 LPC43xx System Control Unit @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Benjamin Vernoux LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /* For pin_conf_normal value see scu.h define SCU_CONF_XXX or Configuration for * different I/O pins types */ void scu_pinmux(scu_grp_pin_t group_pin, uint32_t scu_conf) { MMIO32(group_pin) = scu_conf; } /* For other special SCU register USB1, I2C0, ADC0/1, DAC, EMC clock delay See * scu.h */ /* For Pin interrupt select register see scu.h SCU_PINTSEL0 & SCU_PINTSEL1 */ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc43xx/ssp.c ================================================ /** @defgroup ssp_file SSP @ingroup LPC43xx @brief libopencm3 LPC43xx SSP @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Benjamin Vernoux LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include /* Disable SSP */ void ssp_disable(ssp_num_t ssp_num) { uint32_t ssp_port; if (ssp_num == SSP0_NUM) { ssp_port = SSP0; } else { ssp_port = SSP1; } /* Disable SSP */ SSP_CR1(ssp_port) = 0x0; } /* * SSP Init function */ void ssp_init(ssp_num_t ssp_num, ssp_datasize_t data_size, ssp_frame_format_t frame_format, ssp_cpol_cpha_t cpol_cpha_format, uint8_t serial_clock_rate, uint8_t clk_prescale, ssp_mode_t mode, ssp_master_slave_t master_slave, ssp_slave_option_t slave_option) { uint32_t ssp_port; uint32_t clock; if (ssp_num == SSP0_NUM) { ssp_port = SSP0; } else { ssp_port = SSP1; } /* use PLL1 as clock source for SSP1 */ CGU_BASE_SSP1_CLK = CGU_BASE_SSP1_CLK_CLK_SEL(CGU_SRC_PLL1) | CGU_BASE_SSP1_CLK_AUTOBLOCK(1); /* Disable SSP before to configure it */ SSP_CR1(ssp_port) = 0x0; /* Configure SSP */ clock = serial_clock_rate; SSP_CPSR(ssp_port) = clk_prescale; SSP_CR0(ssp_port) = (data_size | frame_format | cpol_cpha_format | (clock<<8)); /* Enable SSP */ SSP_CR1(ssp_port) = (SSP_ENABLE | mode | master_slave | slave_option); } static void ssp_wait_until_not_busy(ssp_num_t ssp_num) { uint32_t ssp_port; if (ssp_num == SSP0_NUM) { ssp_port = SSP0; } else { ssp_port = SSP1; } while ((SSP_SR(ssp_port) & SSP_SR_BSY)); } /* This Function Wait Data TX Ready, and Write Data to SSP */ uint16_t ssp_transfer(ssp_num_t ssp_num, uint16_t data) { uint32_t ssp_port; if (ssp_num == SSP0_NUM) { ssp_port = SSP0; } else { ssp_port = SSP1; } /* Wait Until FIFO not full */ while ((SSP_SR(ssp_port) & SSP_SR_TNF) == 0); SSP_DR(ssp_port) = data; /* Wait for not busy, since we're controlling CS# of * devices manually and need to wait for the data to * be sent. It may also be important to wait here * in case we're configuring devices via SPI and also * with GPIO control -- we need to know when SPI * commands are effective before altering a device's * state with GPIO. I'm thinking the MAX2837, for * example... */ ssp_wait_until_not_busy(ssp_num); /* Wait Until Data Received (Rx FIFO not Empty) */ while ((SSP_SR(ssp_port) & SSP_SR_RNE) == 0); return SSP_DR(ssp_port); } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/lpc43xx/timer.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Ben Gamari * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * This provides the code for the "next gen" EXTI block provided in F2/F4/L1 * devices. (differences only in the source selection) */ #include void timer_reset(uint32_t timer_peripheral) { TIMER_TCR(timer_peripheral) |= TIMER_TCR_CRST; TIMER_TCR(timer_peripheral) &= ~TIMER_TCR_CRST; } void timer_enable_counter(uint32_t timer_peripheral) { TIMER_TCR(timer_peripheral) |= TIMER_TCR_CEN; } void timer_disable_counter(uint32_t timer_peripheral) { TIMER_TCR(timer_peripheral) &= ~TIMER_TCR_CEN; } void timer_set_counter(uint32_t timer_peripheral, uint32_t count) { TIMER_TC(timer_peripheral) = count; } uint32_t timer_get_counter(uint32_t timer_peripheral) { return TIMER_TC(timer_peripheral); } uint32_t timer_get_prescaler(uint32_t timer_peripheral) { return TIMER_PR(timer_peripheral); } void timer_set_prescaler(uint32_t timer_peripheral, uint32_t prescaler) { TIMER_PR(timer_peripheral) = prescaler; } void timer_set_mode(uint32_t timer_peripheral, uint32_t mode) { TIMER_CTCR(timer_peripheral) = mode | (TIMER_CTCR(timer_peripheral) & TIMER_CTCR_MODE_MASK); } void timer_set_count_input(uint32_t timer_peripheral, uint32_t input) { TIMER_CTCR(timer_peripheral) = input | (TIMER_CTCR(timer_peripheral) & TIMER_CTCR_CINSEL_MASK); } ================================================ FILE: firmware/libopencm3/lib/lpc43xx/uart.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #define UART_SRC_32K 0x00 #define UART_SRC_IRC 0x01 #define UART_SRC_ENET_RX 0x02 #define UART_SRC_ENET_TX 0x03 #define UART_SRC_GP_CLKIN 0x04 #define UART_SRC_XTAL 0x06 #define UART_SRC_PLL0USB 0x07 #define UART_SRC_PLL0AUDIO 0x08 #define UART_SRC_PLL1 0x09 #define UART_SRC_IDIVA 0x0C #define UART_SRC_IDIVB 0x0D #define UART_SRC_IDIVC 0x0E #define UART_SRC_IDIVD 0x0F #define UART_SRC_IDIVE 0x10 #define UART_CGU_AUTOBLOCK_CLOCK_BIT 11 /* clock source selection (5 bits) */ #define UART_CGU_BASE_CLK_SEL_SHIFT 24 uint32_t dummy_read; /* * UART Init function */ void uart_init(uart_num_t uart_num, uart_databit_t data_nb_bits, uart_stopbit_t data_nb_stop, uart_parity_t data_parity, uint16_t uart_divisor, uint8_t uart_divaddval, uint8_t uart_mulval) { uint32_t lcr_config; uint32_t uart_port; uart_port = uart_num; switch (uart_num) { case UART0_NUM: /* use PLL1 as clock source for UART0 */ CGU_BASE_UART0_CLK = (1< 0) { counter++; if (counter >= rx_timeout_nb_cycles) { *error = UART_TIMEOUT_ERROR; return 0; } } } uart_val = (UART_RBR(uart_port) & UART_RBR_MASKBIT); /* Clear error */ *error = UART_NO_ERROR; return uart_val; } /* This Function Wait Data TX Ready, and Write Data to UART if rx_timeout_nb_cycles = 0 Infinite wait */ void uart_write(uart_num_t uart_num, uint8_t data) { uint32_t uart_port; uart_port = uart_num; /* Wait Until FIFO not full */ while ((UART_LSR(uart_port) & UART_LSR_THRE) == 0); UART_THR(uart_port) = data; } ================================================ FILE: firmware/libopencm3/lib/lpc43xx_m0/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2012 Michael Ossmann ## Copyright (C) 2012/2013 Benjamin Vernoux ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_lpc43xx_m0 PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -O2 -g3 -Wall -Wextra -I../../include -fno-common \ -mcpu=cortex-m0 -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD # ARFLAGS = rcsv ARFLAGS = rcs # LPC43xx common files for M4 / M0 OBJ_LPC43XX = gpio.o scu.o i2c.o ssp.o nvic.o uart.o #LPC43xx M0 specific file + Generic LPC43xx M4/M0 files OBJS = vector.o $(OBJ_LPC43XX) # VPATH += ../usb # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) Q := @ endif all: $(LIBNAME).a $(LIBNAME).a: $(OBJS) @printf " AR $(subst $(shell pwd)/,,$(@))\n" $(Q)$(AR) $(ARFLAGS) $@ $^ %.o: %.c @printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(CFLAGS) -o $@ -c $< %.o: ../lpc43xx/%.c @printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(CFLAGS) -o $@ -c $< clean: @printf " CLEAN lib/lpc43xx_m0\n" $(Q)rm -f *.o *.d $(Q)rm -f $(LIBNAME).a .PHONY: clean -include $(OBJS:.o=.d) ================================================ FILE: firmware/libopencm3/lib/lpc43xx_m0/vector.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski , * Copyright (C) 2012 chrysn * Copyright (C) 2012 Benjamin Vernoux * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #define WEAK __attribute__ ((weak)) /* Symbols exported by the linker script(s): */ extern unsigned _bss, _ebss, _stack; void main(void); void blocking_handler(void); void null_handler(void); void WEAK reset_handler(void); void WEAK nmi_handler(void); void WEAK hard_fault_handler(void); void WEAK mem_manage_handler(void); void WEAK bus_fault_handler(void); void WEAK usage_fault_handler(void); void WEAK sv_call_handler(void); void WEAK debug_monitor_handler(void); void WEAK pend_sv_handler(void); void WEAK m0_rtc_isr(void); void WEAK m0_m4core_isr(void); void WEAK m0_dma_isr(void); void WEAK m0_ethernet_isr(void); void WEAK m0_flasheepromat_isr(void); void WEAK m0_sdio_isr(void); void WEAK m0_lcd_isr(void); void WEAK m0_usb0_isr(void); void WEAK m0_usb1_isr(void); void WEAK m0_sct_isr(void); void WEAK m0_ritimer_or_wwdt_isr(void); void WEAK m0_timer0_isr(void); void WEAK m0_gint1_isr(void); void WEAK m0_pin_int4_isr(void); void WEAK m0_timer3_isr(void); void WEAK m0_mcpwm_isr(void); void WEAK m0_adc0_isr(void); void WEAK m0_i2c0_or_i2c1_isr(void); void WEAK m0_sgpio_isr(void); void WEAK m0_spi_or_dac_isr(void); void WEAK m0_adc1_isr(void); void WEAK m0_ssp0_or_ssp1_isr(void); void WEAK m0_eventrouter_isr(void); void WEAK m0_usart0_isr(void); void WEAK m0_uart1_isr(void); void WEAK m0_usart2_or_c_can1_isr(void); void WEAK m0_usart3_isr(void); void WEAK m0_i2s0_or_i2s1_isr(void); void WEAK m0_c_can0_isr(void); /* Initialization template for the interrupt vector table. This definition is * used by the startup code generator (vector.c) to set the initial values for * the interrupt handling routines to the chip family specific _isr weak * symbols. */ /* See UserManual LPC43xx rev1_4 UM10503 Table 26. Connection of interrupt sources to the Cortex-M0 NVIC */ __attribute__ ((section(".vectors"))) void (*const vector_table[]) (void) = { /* Cortex-M4 interrupts */ (void*)&_stack, reset_handler, nmi_handler, hard_fault_handler, mem_manage_handler, bus_fault_handler, usage_fault_handler, 0, 0, 0, 0, /* reserved */ sv_call_handler, debug_monitor_handler, 0, /* reserved */ pend_sv_handler, 0, /* sys_tick_handler not supported on LPC4330 M0 */ /* IrqID 0 , ExcNo 16 */ m0_rtc_isr, /* IrqID 1 , ExcNo 17 */ m0_m4core_isr, /* IrqID 2 , ExcNo 18 */ m0_dma_isr, /* IrqID 3 , ExcNo 19 */ 0, /* IrqID 4 , ExcNo 20 */ m0_flasheepromat_isr, /* IrqID 5 , ExcNo 21 */ m0_ethernet_isr, /* IrqID 6 , ExcNo 22 */ m0_sdio_isr, /* IrqID 7 , ExcNo 23 */ m0_lcd_isr, /* IrqID 8 , ExcNo 24 */ m0_usb0_isr, /* IrqID 9 , ExcNo 25 */ m0_usb1_isr, /* IrqID 10, ExcNo 26 */ m0_sct_isr, /* IrqID 11, ExcNo 27 */ m0_ritimer_or_wwdt_isr, /* IrqID 12, ExcNo 28 */ m0_timer0_isr, /* IrqID 13, ExcNo 29 */ m0_gint1_isr, /* IrqID 14, ExcNo 30 */ m0_pin_int4_isr, /* IrqID 15, ExcNo 31 */ m0_timer3_isr, /* IrqID 16, ExcNo 32 */ m0_mcpwm_isr, /* IrqID 17, ExcNo 33 */ m0_adc0_isr, /* IrqID 18, ExcNo 34 */ m0_i2c0_or_i2c1_isr, /* IrqID 19, ExcNo 35 */ m0_sgpio_isr, /* IrqID 20, ExcNo 36 */ m0_spi_or_dac_isr, /* IrqID 21, ExcNo 37 */ m0_adc1_isr, /* IrqID 22, ExcNo 38 */ m0_ssp0_or_ssp1_isr, /* IrqID 23, ExcNo 39 */ m0_eventrouter_isr, /* IrqID 24, ExcNo 40 */ m0_usart0_isr, /* IrqID 25, ExcNo 41 */ m0_uart1_isr, /* IrqID 26, ExcNo 42 */ m0_usart2_or_c_can1_isr, /* IrqID 27, ExcNo 43 */ m0_usart3_isr, /* IrqID 28, ExcNo 44 */ m0_i2s0_or_i2s1_isr, /* IrqID 29, ExcNo 45 */ m0_c_can0_isr, /* IrqID 30, ExcNo 46 */ 0, /* IrqID 31, ExcNo 47 */ 0 }; void WEAK reset_handler(void) { volatile unsigned long *dest; __asm__("MSR msp, %0" : : "r"(&_stack)); /* Data does not need to be copied as M4 have already copied the whole bin including code+data */ /* Set BSS */ for (dest = (unsigned long*)(&_bss); dest < (unsigned long*)(&_ebss); ) *dest++ = 0; /* Call the application's entry point. */ main(); } void blocking_handler(void) { while (1) ; } void null_handler(void) { /* Do nothing. */ } #pragma weak nmi_handler = null_handler #pragma weak hard_fault_handler = blocking_handler #pragma weak mem_manage_handler = blocking_handler #pragma weak bus_fault_handler = blocking_handler #pragma weak usage_fault_handler = blocking_handler #pragma weak sv_call_handler = null_handler #pragma weak debug_monitor_handler = null_handler #pragma weak pend_sv_handler = null_handler /* M0 */ #pragma weak m0_rtc_isr = blocking_handler #pragma weak m0_m4core_isr = blocking_handler #pragma weak m0_dma_isr = blocking_handler #pragma weak m0_flasheepromat_isr = blocking_handler #pragma weak m0_ethernet_isr = blocking_handler #pragma weak m0_sdio_isr = blocking_handler #pragma weak m0_lcd_isr = blocking_handler #pragma weak m0_usb0_isr = blocking_handler #pragma weak m0_usb1_isr = blocking_handler #pragma weak m0_sct_isr = blocking_handler #pragma weak m0_ritimer_or_wwdt_isr = blocking_handler #pragma weak m0_timer0_isr = blocking_handler #pragma weak m0_gint1_isr = blocking_handler #pragma weak m0_pin_int4_isr = blocking_handler #pragma weak m0_timer3_isr = blocking_handler #pragma weak m0_mcpwm_isr = blocking_handler #pragma weak m0_adc0_isr = blocking_handler #pragma weak m0_i2c0_or_i2c1_isr = blocking_handler #pragma weak m0_sgpio_isr = blocking_handler #pragma weak m0_spi_or_dac_isr = blocking_handler #pragma weak m0_adc1_isr = blocking_handler #pragma weak m0_ssp0_or_ssp1_isr = blocking_handler #pragma weak m0_eventrouter_isr = blocking_handler #pragma weak m0_usart0_isr = blocking_handler #pragma weak m0_uart1_isr = blocking_handler #pragma weak m0_usart2_or_c_can1_isr = blocking_handler #pragma weak m0_usart3_isr = blocking_handler #pragma weak m0_i2s0_or_i2s1_isr = blocking_handler #pragma weak m0_c_can0_isr = blocking_handler ================================================ FILE: firmware/libopencm3/lib/sam/3n/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_sam3n PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSAM3N # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o pmc.o usart.o VPATH += ../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/sam/3n/libopencm3_sam3n.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/sam/3x/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_sam3x PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g -Wall -Wextra -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSAM3X # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o pmc.o usart.o VPATH += ../../usb:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/sam/3x/libopencm3_sam3x.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/sam/common/gpio.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void gpio_init(uint32_t port, uint32_t pins, enum gpio_flags flags) { switch (flags & 3) { case GPIO_FLAG_GPINPUT: /* input mode doesn't really exist, so we make a high * output in open-drain mode */ PIO_SODR(port) = pins; flags |= GPIO_FLAG_OPEN_DRAIN; /* fall through */ case GPIO_FLAG_GPOUTPUT: PIO_OER(port) = pins; PIO_PER(port) = pins; break; case GPIO_FLAG_PERIPHA: PIO_ABSR(port) &= ~pins; PIO_PDR(port) = pins; break; case GPIO_FLAG_PERIPHB: PIO_ABSR(port) |= pins; PIO_PDR(port) = pins; } if (flags & GPIO_FLAG_OPEN_DRAIN) { PIO_MDER(port) = pins; } else { PIO_MDDR(port) = pins; } if (flags & GPIO_FLAG_PULL_UP) { PIO_PUER(port) = pins; } else { PIO_PUDR(port) = pins; } } void gpio_toggle(uint32_t gpioport, uint32_t gpios) { uint32_t odsr = PIO_ODSR(gpioport); PIO_CODR(gpioport) = odsr & gpios; PIO_SODR(gpioport) = ~odsr & gpios; } ================================================ FILE: firmware/libopencm3/lib/sam/common/pmc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /** Default peripheral clock frequency after reset. */ uint32_t pmc_mck_frequency = 4000000; void pmc_xtal_enable(bool en, uint8_t startup_time) { if (en) { CKGR_MOR = (CKGR_MOR & ~CKGR_MOR_MOSCXTST_MASK) | CKGR_MOR_KEY | CKGR_MOR_MOSCXTEN | (startup_time << 8); while (!(PMC_SR & PMC_SR_MOSCXTS)); } else { CKGR_MOR = CKGR_MOR_KEY | (CKGR_MOR & ~CKGR_MOR_MOSCXTEN); } } void pmc_plla_config(uint8_t mul, uint8_t div) { CKGR_PLLAR = CKGR_PLLAR_ONE | ((mul - 1) << 16) | CKGR_PLLAR_PLLACOUNT_MASK | div; while (!(PMC_SR & PMC_SR_LOCKA)); } void pmc_peripheral_clock_enable(uint8_t pid) { if (pid < 32) { PMC_PCER0 = 1 << pid; } else { PMC_PCER1 = 1 << (pid & 31); } } void pmc_peripheral_clock_disable(uint8_t pid) { if (pid < 32) { PMC_PCDR0 = 1 << pid; } else { PMC_PCDR1 = 1 << (pid & 31); } } void pmc_mck_set_source(enum mck_src src) { PMC_MCKR = (PMC_MCKR & ~PMC_MCKR_CSS_MASK) | src; while (!(PMC_SR & PMC_SR_MCKRDY)); } void pmc_clock_setup_in_xtal_12mhz_out_84mhz(void) { eefc_set_latency(4); /* 12MHz external xtal, maximum possible startup time */ pmc_xtal_enable(true, 0xff); /* Select as main oscillator */ CKGR_MOR |= CKGR_MOR_KEY | CKGR_MOR_MOSCSEL; /* Multiply by 7 for 84MHz */ pmc_plla_config(7, 1); pmc_mck_set_source(MCK_SRC_PLLA); pmc_mck_frequency = 84000000; } void pmc_clock_setup_in_rc_4mhz_out_84mhz(void) { eefc_set_latency(4); /* Select as main oscillator */ CKGR_MOR = CKGR_MOR_KEY | (CKGR_MOR & ~(CKGR_MOR_MOSCSEL | CKGR_MOR_MOSCRCF_MASK)); /* Multiply by 21 for 84MHz */ pmc_plla_config(21, 1); pmc_mck_set_source(MCK_SRC_PLLA); pmc_mck_frequency = 84000000; } ================================================ FILE: firmware/libopencm3/lib/sam/common/usart.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include void usart_set_baudrate(uint32_t usart, uint32_t baud) { USART_BRGR(usart) = pmc_mck_frequency / (16 * baud); } void usart_set_databits(uint32_t usart, int bits) { USART_MR(usart) = (USART_MR(usart) & ~USART_MR_CHRL_MASK) | ((bits - 5) << 6); } void usart_set_stopbits(uint32_t usart, enum usart_stopbits sb) { USART_MR(usart) = (USART_MR(usart) & ~USART_MR_NBSTOP_MASK) | (sb << 12); } void usart_set_parity(uint32_t usart, enum usart_parity par) { USART_MR(usart) = (USART_MR(usart) & ~USART_MR_PAR_MASK) | (par << 9); } void usart_set_mode(uint32_t usart, enum usart_mode mode) { USART_CR(usart) = (mode & USART_MODE_RX) ? USART_CR_RXEN : USART_CR_RXDIS; USART_CR(usart) = (mode & USART_MODE_TX) ? USART_CR_TXEN : USART_CR_TXDIS; } void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol fc) { USART_MR(usart) = (USART_MR(usart) & ~USART_MR_MODE_MASK) | (fc ? USART_MR_MODE_HW_HANDSHAKING : 0); } void usart_enable(uint32_t usart) { } void usart_disable(uint32_t usart) { } void usart_send(uint32_t usart, uint16_t data) { USART_THR(usart) = data; } uint16_t usart_recv(uint32_t usart) { return USART_RHR(usart) & 0x1f; } void usart_wait_send_ready(uint32_t usart) { while ((USART_CSR(usart) & USART_CSR_TXRDY) == 0); } void usart_wait_recv_ready(uint32_t usart) { while ((USART_CSR(usart) & USART_CSR_RXRDY) == 0); } void usart_send_blocking(uint32_t usart, uint16_t data) { usart_wait_send_ready(usart); usart_send(usart, data); } uint16_t usart_recv_blocking(uint32_t usart) { usart_wait_recv_ready(usart); return usart_recv(usart); } void usart_enable_rx_interrupt(uint32_t usart) { USART_IER(usart) = USART_CSR_RXRDY; } void usart_disable_rx_interrupt(uint32_t usart) { USART_IDR(usart) = USART_CSR_RXRDY; } ================================================ FILE: firmware/libopencm3/lib/stm32/can.c ================================================ /** @defgroup can_file CAN @ingroup STM32F_files @brief libopencm3 STM32Fxxx CAN @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Piotr Esden-Tempski @date 12 November 2012 Devices can have up to two CAN peripherals. The peripherals support up to 1MBit transmission rate. The peripheral has several filters for incoming messages that can be distributed between two FIFOs and three transmit mailboxes. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #if defined(STM32F1) # include #elif defined(STM32F2) # include #elif defined(STM32F4) # include #else # error "stm32 family not defined." #endif /* Timeout for CAN INIT acknowledge * this value is difficult to define. * INIT is set latest after finishing the current transfer. * Assuming the lowest CAN speed of 100kbps one CAN frame may take about 1.6ms * WAIT loop timeout varies on compiler switches, optimization, CPU architecture * and CPU speed * * The same timeout value is used for leaving INIT where the longest time is * 11 bits(110 us on 100 kbps). */ #define CAN_MSR_INAK_TIMEOUT 0x0000FFFF /*---------------------------------------------------------------------------*/ /** @brief CAN Reset The CAN peripheral and all its associated configuration registers are placed in the reset condition. The reset is effective via the RCC peripheral reset system. @param[in] canport Unsigned int32. CAN block register address base @ref can_reg_base. */ void can_reset(uint32_t canport) { if (canport == CAN1) { rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_CAN1RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_CAN1RST); } else { rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_CAN2RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_CAN2RST); } } /*---------------------------------------------------------------------------*/ /** @brief CAN Init Initialize the selected CAN peripheral block. @param[in] canport Unsigend int32. CAN register base address @ref can_reg_base. @param[in] ttcm bool. Time triggered communication mode. @param[in] abom bool. Automatic bus-off management. @param[in] awum bool. Automatic wakeup mode. @param[in] nart bool. No automatic retransmission. @param[in] rflm bool. Receive FIFO locked mode. @param[in] txfp bool. Transmit FIFO priority. @param[in] sjw Unsigned int32. Resynchronization time quanta jump width. @param[in] ts1 Unsigned int32. Time segment 1 time quanta width. @param[in] ts2 Unsigned int32. Time segment 2 time quanta width. @param[in] brp Unsigned int32. Baud rate prescaler. @returns int 0 on success, 1 on initialization failure. */ int can_init(uint32_t canport, bool ttcm, bool abom, bool awum, bool nart, bool rflm, bool txfp, uint32_t sjw, uint32_t ts1, uint32_t ts2, uint32_t brp, bool loopback, bool silent) { volatile uint32_t wait_ack; int ret = 0; /* Exit from sleep mode. */ CAN_MCR(canport) &= ~CAN_MCR_SLEEP; /* Request initialization "enter". */ CAN_MCR(canport) |= CAN_MCR_INRQ; /* Wait for acknowledge. */ wait_ack = CAN_MSR_INAK_TIMEOUT; while ((--wait_ack) && ((CAN_MSR(canport) & CAN_MSR_INAK) != CAN_MSR_INAK)); /* Check the acknowledge. */ if ((CAN_MSR(canport) & CAN_MSR_INAK) != CAN_MSR_INAK) { return 1; } /* clear can timing bits */ CAN_BTR(canport) = 0; /* Set the automatic bus-off management. */ if (ttcm) { CAN_MCR(canport) |= CAN_MCR_TTCM; } else { CAN_MCR(canport) &= ~CAN_MCR_TTCM; } if (abom) { CAN_MCR(canport) |= CAN_MCR_ABOM; } else { CAN_MCR(canport) &= ~CAN_MCR_ABOM; } if (awum) { CAN_MCR(canport) |= CAN_MCR_AWUM; } else { CAN_MCR(canport) &= ~CAN_MCR_AWUM; } if (nart) { CAN_MCR(canport) |= CAN_MCR_NART; } else { CAN_MCR(canport) &= ~CAN_MCR_NART; } if (rflm) { CAN_MCR(canport) |= CAN_MCR_RFLM; } else { CAN_MCR(canport) &= ~CAN_MCR_RFLM; } if (txfp) { CAN_MCR(canport) |= CAN_MCR_TXFP; } else { CAN_MCR(canport) &= ~CAN_MCR_TXFP; } if (silent) { CAN_BTR(canport) |= CAN_BTR_SILM; } else { CAN_BTR(canport) &= ~CAN_BTR_SILM; } if (loopback) { CAN_BTR(canport) |= CAN_BTR_LBKM; } else { CAN_BTR(canport) &= ~CAN_BTR_LBKM; } /* Set bit timings. */ CAN_BTR(canport) |= sjw | ts2 | ts1 | ((brp - 1ul) & CAN_BTR_BRP_MASK); /* Request initialization "leave". */ CAN_MCR(canport) &= ~CAN_MCR_INRQ; /* Wait for acknowledge. */ wait_ack = CAN_MSR_INAK_TIMEOUT; while ((--wait_ack) && ((CAN_MSR(canport) & CAN_MSR_INAK) == CAN_MSR_INAK)); if ((CAN_MSR(canport) & CAN_MSR_INAK) == CAN_MSR_INAK) { ret = 1; } return ret; } /*---------------------------------------------------------------------------*/ /** @brief CAN Filter Init Initialize incoming message filter and assign to FIFO. @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] nr Unsigned int32. ID number of the filter. @param[in] scale_32bit bool. 32-bit scale for the filter? @param[in] id_list_mode bool. ID list filter mode? @param[in] fr1 Unsigned int32. First filter register content. @param[in] fr2 Unsigned int32. Second filter register content. @param[in] fifo Unsigned int32. FIFO id. @param[in] enable bool. Enable filter? */ void can_filter_init(uint32_t canport, uint32_t nr, bool scale_32bit, bool id_list_mode, uint32_t fr1, uint32_t fr2, uint32_t fifo, bool enable) { uint32_t filter_select_bit = 0x00000001 << nr; /* Request initialization "enter". */ CAN_FMR(canport) |= CAN_FMR_FINIT; /* Deactivate the filter. */ CAN_FA1R(canport) &= ~filter_select_bit; if (scale_32bit) { /* Set 32-bit scale for the filter. */ CAN_FS1R(canport) |= filter_select_bit; } else { /* Set 16-bit scale for the filter. */ CAN_FS1R(canport) &= ~filter_select_bit; } if (id_list_mode) { /* Set filter mode to ID list mode. */ CAN_FM1R(canport) |= filter_select_bit; } else { /* Set filter mode to id/mask mode. */ CAN_FM1R(canport) &= ~filter_select_bit; } /* Set the first filter register. */ CAN_FiR1(canport, nr) = fr1; /* Set the second filter register. */ CAN_FiR2(canport, nr) = fr2; /* Select FIFO0 or FIFO1 as filter assignement. */ if (fifo) { CAN_FFA1R(canport) |= filter_select_bit; /* FIFO1 */ } else { CAN_FFA1R(canport) &= ~filter_select_bit; /* FIFO0 */ } if (enable) { CAN_FA1R(canport) |= filter_select_bit; /* Activate filter. */ } /* Request initialization "leave". */ CAN_FMR(canport) &= ~CAN_FMR_FINIT; } /*---------------------------------------------------------------------------*/ /** @brief CAN Initialize a 16bit Message ID Mask Filter @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] nr Unsigned int32. ID number of the filter. @param[in] id1 Unsigned int16. First message ID to filter. @param[in] mask1 Unsigned int16. First message ID bit mask. @param[in] id2 Unsigned int16. Second message ID to filter. @param[in] mask2 Unsigned int16. Second message ID bit mask. @param[in] fifo Unsigned int32. FIFO id. @param[in] enable bool. Enable filter? */ void can_filter_id_mask_16bit_init(uint32_t canport, uint32_t nr, uint16_t id1, uint16_t mask1, uint16_t id2, uint16_t mask2, uint32_t fifo, bool enable) { can_filter_init(canport, nr, false, false, ((uint32_t)id1 << 16) | (uint32_t)mask1, ((uint32_t)id2 << 16) | (uint32_t)mask2, fifo, enable); } /*---------------------------------------------------------------------------*/ /** @brief CAN Initialize a 32bit Message ID Mask Filter @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] nr Unsigned int32. ID number of the filter. @param[in] id Unsigned int32. Message ID to filter. @param[in] mask Unsigned int32. Message ID bit mask. @param[in] fifo Unsigned int32. FIFO id. @param[in] enable bool. Enable filter? */ void can_filter_id_mask_32bit_init(uint32_t canport, uint32_t nr, uint32_t id, uint32_t mask, uint32_t fifo, bool enable) { can_filter_init(canport, nr, true, false, id, mask, fifo, enable); } /*---------------------------------------------------------------------------*/ /** @brief CAN Initialize a 16bit Message ID List Filter @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] nr Unsigned int32. ID number of the filter. @param[in] id1 Unsigned int16. First message ID to match. @param[in] id2 Unsigned int16. Second message ID to match. @param[in] id3 Unsigned int16. Third message ID to match. @param[in] id4 Unsigned int16. Fourth message ID to match. @param[in] fifo Unsigned int32. FIFO id. @param[in] enable bool. Enable filter? */ void can_filter_id_list_16bit_init(uint32_t canport, uint32_t nr, uint16_t id1, uint16_t id2, uint16_t id3, uint16_t id4, uint32_t fifo, bool enable) { can_filter_init(canport, nr, false, true, ((uint32_t)id1 << 16) | (uint32_t)id2, ((uint32_t)id3 << 16) | (uint32_t)id4, fifo, enable); } /*---------------------------------------------------------------------------*/ /** @brief CAN Initialize a 32bit Message ID List Filter @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] nr Unsigned int32. ID number of the filter. @param[in] id1 Unsigned int32. First message ID to match. @param[in] id2 Unsigned int32. Second message ID to match. @param[in] fifo Unsigned int32. FIFO id. @param[in] enable bool. Enable filter? */ void can_filter_id_list_32bit_init(uint32_t canport, uint32_t nr, uint32_t id1, uint32_t id2, uint32_t fifo, bool enable) { can_filter_init(canport, nr, true, true, id1, id2, fifo, enable); } /*---------------------------------------------------------------------------*/ /** @brief CAN Enable IRQ @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] irq Unsigned int32. IRQ bit(s). */ void can_enable_irq(uint32_t canport, uint32_t irq) { CAN_IER(canport) |= irq; } /*---------------------------------------------------------------------------*/ /** @brief CAN Disable IRQ @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] irq Unsigned int32. IRQ bit(s). */ void can_disable_irq(uint32_t canport, uint32_t irq) { CAN_IER(canport) &= ~irq; } /*---------------------------------------------------------------------------*/ /** @brief CAN Transmit Message @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] id Unsigned int32. Message ID. @param[in] ext bool. Extended message ID? @param[in] rtr bool. Request transmit? @param[in] length Unsigned int8. Message payload length. @param[in] data Unsigned int8[]. Message payload data. @returns int 0, 1 or 2 on success and depending on which outgoing mailbox got selected. -1 if no mailbox was available and no transmission got queued. */ int can_transmit(uint32_t canport, uint32_t id, bool ext, bool rtr, uint8_t length, uint8_t *data) { int ret = 0; uint32_t mailbox = 0; union { uint8_t data8[4]; uint32_t data32; } tdlxr, tdhxr; /* Check which transmit mailbox is empty if any. */ if ((CAN_TSR(canport) & CAN_TSR_TME0) == CAN_TSR_TME0) { ret = 0; mailbox = CAN_MBOX0; } else if ((CAN_TSR(canport) & CAN_TSR_TME1) == CAN_TSR_TME1) { ret = 1; mailbox = CAN_MBOX1; } else if ((CAN_TSR(canport) & CAN_TSR_TME2) == CAN_TSR_TME2) { ret = 2; mailbox = CAN_MBOX2; } else { ret = -1; } /* If we have no empty mailbox return with an error. */ if (ret == -1) { return ret; } if (ext) { /* Set extended ID. */ CAN_TIxR(canport, mailbox) = (id << CAN_TIxR_EXID_SHIFT) | CAN_TIxR_IDE; } else { /* Set standard ID. */ CAN_TIxR(canport, mailbox) = id << CAN_TIxR_STID_SHIFT; } /* Set/clear remote transmission request bit. */ if (rtr) { CAN_TIxR(canport, mailbox) |= CAN_TIxR_RTR; /* Set */ } /* Set the DLC. */ CAN_TDTxR(canport, mailbox) &= ~CAN_TDTxR_DLC_MASK; CAN_TDTxR(canport, mailbox) |= (length & CAN_TDTxR_DLC_MASK); switch (length) { case 8: tdhxr.data8[3] = data[7]; /* no break */ case 7: tdhxr.data8[2] = data[6]; /* no break */ case 6: tdhxr.data8[1] = data[5]; /* no break */ case 5: tdhxr.data8[0] = data[4]; /* no break */ case 4: tdlxr.data8[3] = data[3]; /* no break */ case 3: tdlxr.data8[2] = data[2]; /* no break */ case 2: tdlxr.data8[1] = data[1]; /* no break */ case 1: tdlxr.data8[0] = data[0]; /* no break */ default: break; } /* Set the data. */ CAN_TDLxR(canport, mailbox) = tdlxr.data32; CAN_TDHxR(canport, mailbox) = tdhxr.data32; /* Request transmission. */ CAN_TIxR(canport, mailbox) |= CAN_TIxR_TXRQ; return ret; } /*---------------------------------------------------------------------------*/ /** @brief CAN Release FIFO @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] fifo Unsigned int8. FIFO id. */ void can_fifo_release(uint32_t canport, uint8_t fifo) { if (fifo == 0) { CAN_RF0R(canport) |= CAN_RF1R_RFOM1; } else { CAN_RF1R(canport) |= CAN_RF1R_RFOM1; } } /*---------------------------------------------------------------------------*/ /** @brief CAN Receive Message @param[in] canport Unsigned int32. CAN block register base @ref can_reg_base. @param[in] fifo Unsigned int8. FIFO id. @param[in] release bool. Release the FIFO automatically after coping data out. @param[out] id Unsigned int32 pointer. Message ID. @param[out] ext bool pointer. The message ID is extended? @param[out] rtr bool pointer. Request of transmission? @param[out] fmi Unsigned int32 pointer. ID of the matched filter. @param[out] length Unsigned int8 pointer. Length of message payload. @param[out] data Unsigned int8[]. Message payload data. */ void can_receive(uint32_t canport, uint8_t fifo, bool release, uint32_t *id, bool *ext, bool *rtr, uint32_t *fmi, uint8_t *length, uint8_t *data) { uint32_t fifo_id = 0; union { uint8_t data8[4]; uint32_t data32; } rdlxr, rdhxr; const uint32_t fifoid_array[2] = {CAN_FIFO0, CAN_FIFO1}; fifo_id = fifoid_array[fifo]; /* Get type of CAN ID and CAN ID. */ if (CAN_RIxR(canport, fifo_id) & CAN_RIxR_IDE) { *ext = true; /* Get extended CAN ID. */ *id = (CAN_RIxR(canport, fifo_id) >> CAN_RIxR_EXID_SHIFT) & CAN_RIxR_EXID_MASK; } else { *ext = false; /* Get standard CAN ID. */ *id = (CAN_RIxR(canport, fifo_id) >> CAN_RIxR_STID_SHIFT) & CAN_RIxR_STID_MASK; } /* Get remote transmit flag. */ if (CAN_RIxR(canport, fifo_id) & CAN_RIxR_RTR) { *rtr = true; } else { *rtr = false; } /* Get filter match ID. */ *fmi = ((CAN_RDTxR(canport, fifo_id) & CAN_RDTxR_FMI_MASK) >> CAN_RDTxR_FMI_SHIFT); /* Get data length. */ *length = CAN_RDTxR(canport, fifo_id) & CAN_RDTxR_DLC_MASK; /* accelerate reception by copying the CAN data from the controller * memory to the fast internal RAM */ rdlxr.data32 = CAN_RDLxR(canport, fifo_id); rdhxr.data32 = CAN_RDHxR(canport, fifo_id); /* */ /* Get data. * Byte wise copy is needed because we do not know the alignment * of the input buffer. * Here copying 8 bytes unconditionally is faster than using loop * * It is OK to copy all 8 bytes because the upper layer must be * prepared for data length bigger expected. * In contrary the driver has no information about the intended size. * This could be different if the max length would be handed over * to the function, but it is not the case */ data[0] = rdlxr.data8[0]; data[1] = rdlxr.data8[1]; data[2] = rdlxr.data8[2]; data[3] = rdlxr.data8[3]; data[4] = rdhxr.data8[0]; data[5] = rdhxr.data8[1]; data[6] = rdhxr.data8[2]; data[7] = rdhxr.data8[3]; /* Release the FIFO. */ if (release) { can_fifo_release(canport, fifo); } } bool can_available_mailbox(uint32_t canport) { return CAN_TSR(canport) & (CAN_TSR_TME0 | CAN_TSR_TME1 | CAN_TSR_TME2); } ================================================ FILE: firmware/libopencm3/lib/stm32/common/crc_common_all.c ================================================ /** @addtogroup crc_file @author @htmlonly © @endhtmlonly 2012 Karl Palsson */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief CRC Reset. Reset the CRC unit and forces the data register to all 1s. */ void crc_reset(void) { CRC_CR |= CRC_CR_RESET; } /*---------------------------------------------------------------------------*/ /** @brief CRC Calculate. Writes a data word to the register, the write operation stalling until the computation is complete. @param[in] data Unsigned int32. @returns int32 Computed CRC result */ uint32_t crc_calculate(uint32_t data) { CRC_DR = data; /* Data sheet says this blocks until it's ready.... */ return CRC_DR; } /*---------------------------------------------------------------------------*/ /** @brief CRC Calculate of a Block of Data. Writes data words consecutively to the register, the write operation stalling until the computation of each word is complete. @param[in] datap Unsigned int32. pointer to an array of 32 bit data words. @param[in] size int. Size of the array. @returns int32 Final computed CRC result */ uint32_t crc_calculate_block(uint32_t *datap, int size) { int i; for (i = 0; i < size; i++) { CRC_DR = datap[i]; } return CRC_DR; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/crypto_common_f24.c ================================================ /** @addtogroup crypto_file * * @brief libopencm3 STM32 Cryptographic controller * * @version 1.0.0 * * @date 17 Jun 2013 * * This library supports the cryptographic coprocessor system for the * STM32 series of ARM Cortex Microcontrollers * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #define CRYP_CR_ALGOMODE_MASK ((1 << 19) | CRYP_CR_ALGOMODE) /** * @brief Wait, if the Controller is busy */ void crypto_wait_busy(void) { while (CRYP_SR & CRYP_SR_BUSY); } /** * @brief Set key value to the controller * @param[in] keysize enum crypto_keysize Specified size of the key. * @param[in] key uint64_t[] Key value (array of 4 items) */ void crypto_set_key(enum crypto_keysize keysize, uint64_t key[]) { int i; crypto_wait_busy(); CRYP_CR = (CRYP_CR & ~CRYP_CR_KEYSIZE) | (keysize << CRYP_CR_KEYSIZE_SHIFT); for (i = 0; i < 4; i++) { CRYP_KR(i) = key[i]; } } /** * @brief Set Initialization Vector * * @param[in] iv uint64_t[] Initialization vector (array of 4 items) * @note Cryptographic controller must be in disabled state */ void crypto_set_iv(uint64_t iv[]) { int i; crypto_wait_busy(); for (i = 0; i < 4; i++) { CRYP_IVR(i) = iv[i]; } } /** * @brief Set the order of the data to be crypted * * @param[in] datatype enum crypto_datatype Specified datatype of the key. */ void crypto_set_datatype(enum crypto_datatype datatype) { CRYP_CR = (CRYP_CR & ~CRYP_CR_DATATYPE) | (datatype << CRYP_CR_DATATYPE_SHIFT); } /** * @brief Set the algoritm for Encryption/decryption * *@param[in] mode enum crypto_mode Mode of execution */ void crypto_set_algorithm(enum crypto_mode mode) { mode &= ~CRYP_CR_ALGOMODE_MASK; if ((mode == DECRYPT_AES_ECB) || (mode == DECRYPT_AES_CBC)) { /* Unroll keys for the AES encoder for the user automatically */ CRYP_CR = (CRYP_CR & ~CRYP_CR_ALGOMODE_MASK) | CRYP_CR_ALGOMODE_AES_PREP; crypto_start(); crypto_wait_busy(); /* module switches to DISABLE automatically */ } /* set algo mode */ CRYP_CR = (CRYP_CR & ~CRYP_CR_ALGOMODE_MASK) | mode; /* flush buffers */ CRYP_CR |= CRYP_CR_FFLUSH; } /** * @brief Enable the cryptographic controller and start processing */ void crypto_start(void) { CRYP_CR |= CRYP_CR_CRYPEN; } /** * @brief Disable the cryptographic controller and stop processing */ void crypto_stop(void) { CRYP_CR &= ~CRYP_CR_CRYPEN; } /** * @brief Start of encryption or decryption on data buffers * * This blocking method transfers input buffer of specified length to the * cryptographic coprocessor, and instructs him to begin of ciphering or * deciphering. It waits for data to be ready, and then fills the processed * data to output buffer. * * @param[in] inp uint32_t* Input array to crypt/decrypt. * @param[in] outp uint32_t* Output array with crypted/encrypted data. * @param[in] length uint32_t Length of the arrays * * @returns uint32_t Number of written words */ uint32_t crypto_process_block(uint32_t *inp, uint32_t *outp, uint32_t length) { uint32_t rd = 0, wr = 0; /* Transfer the data */ while (rd != length) { if ((wr < length) && (CRYP_SR & CRYP_SR_IFNF)) { CRYP_DIN = *inp++; wr++; } if (CRYP_SR & CRYP_SR_OFNE) { *outp++ = CRYP_DOUT; rd++; } } /* Wait to finish - Not needed ? */ crypto_wait_busy(); return wr; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/dac_common_all.c ================================================ /** @addtogroup dac_file @author @htmlonly © @endhtmlonly 2012 Ken Sarkies ksarkies@internode.on.net This library supports the Digital to Analog Conversion System in the STM32F series of ARM Cortex Microcontrollers by ST Microelectronics. The DAC is present only in a limited set of devices, notably some of the connection line, high density and XL devices. Two DAC channels are available, however unlike the ADC channels these are separate DAC devices controlled by the same register block. The DAC is on APB1. Its clock must be enabled in RCC and the GPIO ports set to alternate function output before it can be used. The digital output driver is disabled so the output driver mode (push-pull/open drain) is arbitrary. The DAC has a holding (buffer) register and an output register from which the analog output is derived. The holding register must be loaded first. If triggering is enabled the output register is loaded from the holding register after a trigger occurs. If triggering is not enabled the holding register contents are transferred directly to the output register. @note To avoid nonlinearities, do not allow outputs to range close to zero or V_analog. @section dac_api_dual Dual Channel Conversion There are dual modes in which both DACs are used to output data simultaneously or independently on both channels. The data must be presented according to the formats described in the datasheets. A convenience function @ref dac_load_data_buffer_dual is provided for software controlled use. A variety of modes are available depending on whether independent or simultaneous output is desired, and whether waveforms are to be superimposed. Refer to the datasheets. If DMA is used, only enable it for one of the channels. The DMA requests will then serve data in dual format to the data register dedicated to dual mode. The data will then be split and loaded to the appropriate DAC following the next trigger. There are three registers available, one for each of the formats: 12 bit right-aligned, 12 bit left-aligned and 8 bit right-aligned. The desired format is determined by specifying the appropriate register to the DMA controller. @section dac_api_basic_ex Basic DAC handling API. Set the DAC's GPIO port to any alternate function output mode. Enable the DAC clock. Enable the DAC, set a trigger source and load the buffer with the first value. After the DAC is triggered, load the buffer with the next value. This example uses software triggering and added noise. The trigger and further buffer load calls are made when data is to be sent out. @code gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO4); rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_DACEN); dac_disable(CHANNEL_1); dac_set_waveform_characteristics(DAC_CR_MAMP1_8); dac_set_waveform_generation(DAC_CR_WAVE1_NOISE); dac_enable(CHANNEL_1); dac_set_trigger_source(DAC_CR_TSEL1_SW); dac_load_data_buffer_single(0, RIGHT12, CHANNEL_1); .... dac_software_trigger(CHANNEL_1); dac_load_data_buffer_single(value, RIGHT12, CHANNEL_1); @endcode @section dac_api_dma_ex Simultaneous Dual DAC with DMA. This example in part sets up the DAC channel 1 DMA (DMA2 channel 3) to read 16 bit data from memory into the right-aligned 8 bit dual register DAC_DHR8RD. Both DAC channels are enabled, and both triggers are set to the same timer 2 input as required for simultaneous operation. DMA is enabled for DAC channel 1 only to ensure that only one DMA request is generated. @code dma_set_memory_size(DMA2,DMA_CHANNEL3,DMA_CCR_MSIZE_16BIT); dma_set_peripheral_size(DMA2,DMA_CHANNEL3,DMA_CCR_PSIZE_16BIT); dma_set_read_from_memory(DMA2,DMA_CHANNEL3); dma_set_peripheral_address(DMA2,DMA_CHANNEL3,(uint32_t) &DAC_DHR8RD); dma_enable_channel(DMA2,DMA_CHANNEL3); ... dac_trigger_enable(CHANNEL_D); dac_set_trigger_source(DAC_CR_TSEL1_T2 | DAC_CR_TSEL2_T2); dac_dma_enable(CHANNEL_1); dac_enable(CHANNEL_D); @endcode LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #define MASK8 0xFF #define MASK12 0xFFF /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Enable. Enable a digital to analog converter channel. After setting this enable, the DAC requires a twakeup time typically around 10 microseconds before it actually wakes up. @param[in] dac_channel enum ::data_channel. */ void dac_enable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR |= DAC_CR_EN1; break; case CHANNEL_2: DAC_CR |= DAC_CR_EN2; break; case CHANNEL_D: DAC_CR |= (DAC_CR_EN1 | DAC_CR_EN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Disable. Disable a digital to analog converter channel. @param[in] dac_channel enum ::data_channel. */ void dac_disable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR &= ~DAC_CR_EN1; break; case CHANNEL_2: DAC_CR &= ~DAC_CR_EN2; break; case CHANNEL_D: DAC_CR &= ~(DAC_CR_EN1 | DAC_CR_EN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Output Buffer Enable. Enable a digital to analog converter channel output drive buffer. This is an optional amplifying buffer that provides additional drive for the output signal. The buffer is enabled by default after a reset and needs to be explicitly disabled if required. @param[in] dac_channel enum ::data_channel. */ void dac_buffer_enable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR |= DAC_CR_BOFF1; break; case CHANNEL_2: DAC_CR |= DAC_CR_BOFF2; break; case CHANNEL_D: DAC_CR |= (DAC_CR_BOFF1 | DAC_CR_BOFF2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Output Buffer Disable. Disable a digital to analog converter channel output drive buffer. Disabling this will reduce power consumption slightly and will increase the output impedance of the DAC. The buffers are enabled by default after a reset. @param[in] dac_channel enum ::data_channel. */ void dac_buffer_disable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR &= ~DAC_CR_BOFF1; break; case CHANNEL_2: DAC_CR &= ~DAC_CR_BOFF2; break; case CHANNEL_D: DAC_CR &= ~(DAC_CR_BOFF1 | DAC_CR_BOFF2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel DMA Enable. Enable a digital to analog converter channel DMA mode (connected to DMA2 channel 3 for DAC channel 1 and DMA2 channel 4 for DAC channel 2). A DMA request is generated following an external trigger. @param[in] dac_channel enum ::data_channel. */ void dac_dma_enable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR |= DAC_CR_DMAEN1; break; case CHANNEL_2: DAC_CR |= DAC_CR_DMAEN2; break; case CHANNEL_D: DAC_CR |= (DAC_CR_DMAEN1 | DAC_CR_DMAEN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel DMA Disable. Disable a digital to analog converter channel DMA mode. @param[in] dac_channel enum ::data_channel. */ void dac_dma_disable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR &= ~DAC_CR_DMAEN1; break; case CHANNEL_2: DAC_CR &= ~DAC_CR_DMAEN2; break; case CHANNEL_D: DAC_CR &= ~(DAC_CR_DMAEN1 | DAC_CR_DMAEN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Trigger Enable. Enable a digital to analog converter channel external trigger mode. This allows an external trigger to initiate register transfers from the buffer register to the DAC output register, followed by a DMA transfer to the buffer register if DMA is enabled. The trigger source must also be selected. @param[in] dac_channel enum ::data_channel. */ void dac_trigger_enable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR |= DAC_CR_TEN1; break; case CHANNEL_2: DAC_CR |= DAC_CR_TEN2; break; case CHANNEL_D: DAC_CR |= (DAC_CR_TEN1 | DAC_CR_TEN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief DAC Channel Trigger Disable. Disable a digital to analog converter channel external trigger. @param[in] dac_channel enum ::data_channel. */ void dac_trigger_disable(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR &= ~DAC_CR_TEN1; break; case CHANNEL_2: DAC_CR &= ~DAC_CR_TEN2; break; case CHANNEL_D: DAC_CR &= ~(DAC_CR_TEN1 | DAC_CR_TEN2); break; } } /*---------------------------------------------------------------------------*/ /** @brief Set DAC Channel Trigger Source. Sets the digital to analog converter trigger source, which can be taken from various timers, an external trigger or a software trigger. @param[in] dac_trig_src uint32_t. Taken from @ref dac_trig2_sel or @ref dac_trig1_sel or a logical OR of one of each of these to set both channels simultaneously. */ void dac_set_trigger_source(uint32_t dac_trig_src) { DAC_CR |= dac_trig_src; } /*---------------------------------------------------------------------------*/ /** @brief Enable and Set DAC Channel Waveform Generation. Enable the digital to analog converter waveform generation as either pseudo-random noise or triangular wave. These signals are superimposed on existing output values in the DAC output registers. @note The DAC trigger must be enabled for this to work. @param[in] dac_wave_ens uint32_t. Taken from @ref dac_wave1_en or @ref dac_wave2_en or a logical OR of one of each of these to set both channels simultaneously. */ void dac_set_waveform_generation(uint32_t dac_wave_ens) { DAC_CR |= dac_wave_ens; } /*---------------------------------------------------------------------------*/ /** @brief Disable DAC Channel Waveform Generation. Disable a digital to analog converter channel superimposed waveform generation. @param[in] dac_channel enum ::data_channel. */ void dac_disable_waveform_generation(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_CR &= ~DAC_CR_WAVE1_DIS; break; case CHANNEL_2: DAC_CR &= ~DAC_CR_WAVE2_DIS; break; case CHANNEL_D: DAC_CR &= ~(DAC_CR_WAVE1_DIS | DAC_CR_WAVE2_DIS); break; } } /*---------------------------------------------------------------------------*/ /** @brief Set DAC Channel LFSR Mask or Triangle Wave Amplitude. Sets the digital to analog converter superimposed waveform generation characteristics. @li If the noise generation mode is set, this sets the length of the PRBS sequence and hence the amplitude of the output noise signal. Default setting is length 1. @li If the triangle wave generation mode is set, this sets the amplitude of the output signal as 2^(n)-1 where n is the parameter value. Default setting is 1. @note High amplitude levels of these waveforms can overload the DAC and distort the signal output. @note This must be called before enabling the DAC as the settings will then become read-only. @note The DAC trigger must be enabled for this to work. @param[in] dac_mamp uint32_t. Taken from @ref dac_mamp2 or @ref dac_mamp1 or a logical OR of one of each of these to set both channels simultaneously. */ void dac_set_waveform_characteristics(uint32_t dac_mamp) { DAC_CR |= dac_mamp; } /*---------------------------------------------------------------------------*/ /** @brief Load DAC Data Register. Loads the appropriate digital to analog converter data register with 12 or 8 bit data to be converted on a channel. The data can be aligned as follows: @li right-aligned 8 bit data in bits 0-7 @li right-aligned 12 bit data in bits 0-11 @li left aligned 12 bit data in bits 4-15 @param[in] dac_data uint16_t with appropriate alignment. @param[in] dac_data_format enum ::data_align. Alignment and size. @param[in] dac_channel enum ::data_channel. */ void dac_load_data_buffer_single(uint16_t dac_data, data_align dac_data_format, data_channel dac_channel) { if (dac_channel == CHANNEL_1) { switch (dac_data_format) { case RIGHT8: DAC_DHR8R1 = dac_data; break; case RIGHT12: DAC_DHR12R1 = dac_data; break; case LEFT12: DAC_DHR12L1 = dac_data; break; } } else if (dac_channel == CHANNEL_2) { switch (dac_data_format) { case RIGHT8: DAC_DHR8R2 = dac_data; break; case RIGHT12: DAC_DHR12R2 = dac_data; break; case LEFT12: DAC_DHR12L2 = dac_data; break; } } } /*---------------------------------------------------------------------------*/ /** @brief Load DAC Dual Data Register. Loads the appropriate digital to analog converter dual data register with 12 or 8 bit data to be converted for both channels. This allows high bandwidth simultaneous or independent analog output. The data in both channels are aligned identically. @param[in] dac_data1 uint16_t for channel 1 with appropriate alignment. @param[in] dac_data2 uint16_t for channel 2 with appropriate alignment. @param[in] dac_data_format enum ::data_align. Right or left aligned, and 8 or 12 bit. */ void dac_load_data_buffer_dual(uint16_t dac_data1, uint16_t dac_data2, data_align dac_data_format) { switch (dac_data_format) { case RIGHT8: DAC_DHR8RD = ((dac_data1 & MASK8) | ((dac_data2 & MASK8) << 8)); break; case RIGHT12: DAC_DHR12RD = ((dac_data1 & MASK12) | ((dac_data2 & MASK12) << 16)); break; case LEFT12: DAC_DHR12LD = ((dac_data1 & MASK12) | ((dac_data2 & MASK12) << 16)); break; } } /*---------------------------------------------------------------------------*/ /** @brief Trigger the DAC by a Software Trigger. If the trigger source is set to be a software trigger, cause a trigger to occur. The trigger is cleared by hardware after conversion. @param[in] dac_channel enum ::data_channel. */ void dac_software_trigger(data_channel dac_channel) { switch (dac_channel) { case CHANNEL_1: DAC_SWTRIGR |= DAC_SWTRIGR_SWTRIG1; break; case CHANNEL_2: DAC_SWTRIGR |= DAC_SWTRIGR_SWTRIG2; break; case CHANNEL_D: DAC_SWTRIGR |= (DAC_SWTRIGR_SWTRIG1 | DAC_SWTRIGR_SWTRIG2); break; } } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/dma_common_f24.c ================================================ /** @addtogroup dma_file @author @htmlonly © @endhtmlonly 2012 Ken Sarkies This library supports the DMA Control System in the STM32F2 and STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics. Up to two DMA controllers are supported each with 8 streams, and each stream having up to 8 channels hardware dedicated to various peripheral DMA signals. DMA transfers can be configured to occur between peripheral and memory in either direction, and memory to memory. Peripheral to peripheral transfer is not supported. Circular mode transfers are also supported in transfers involving a peripheral. An arbiter is provided to resolve priority DMA requests. Transfers can be made with 8, 16 or 32 bit words. Each stream has access to a 4 word deep FIFO and can use double buffering by means of two memory pointers. When using the FIFO it is possible to configure transfers to occur in indivisible bursts. It is also possible to select a peripheral instead of the DMA controller to control the flow of data. This limits the functionality but is useful when the number of transfers is unknown. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Reset The specified stream is disabled and configuration registers are cleared. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_stream_reset(uint32_t dma, uint8_t stream) { /* Disable stream (must be done before register is otherwise changed). */ DMA_SCR(dma, stream) &= ~DMA_SxCR_EN; /* Reset all config bits. */ DMA_SCR(dma, stream) = 0; /* Reset data transfer number. */ DMA_SNDTR(dma, stream) = 0; /* Reset peripheral and memory addresses. */ DMA_SPAR(dma, stream) = 0; DMA_SM0AR(dma, stream) = 0; DMA_SM1AR(dma, stream) = 0; /* This is the default setting */ DMA_SFCR(dma, stream) = 0x21; /* Reset all stream interrupt flags using the interrupt flag clear register. */ uint32_t mask = DMA_ISR_MASK(stream); if (stream < 4) { DMA_LIFCR(dma) |= mask; } else { DMA_HIFCR(dma) |= mask; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Clear Interrupt Flag The interrupt flag for the stream is cleared. More than one interrupt for the same stream may be cleared by using the bitwise OR of the interrupt flags. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] interrupts unsigned int32. Bitwise OR of interrupt numbers: @ref dma_if_offset */ void dma_clear_interrupt_flags(uint32_t dma, uint8_t stream, uint32_t interrupts) { /* Get offset to interrupt flag location in stream field */ uint32_t flags = (interrupts << DMA_ISR_OFFSET(stream)); /* First four streams are in low register. Flag clear must be set then * reset. */ if (stream < 4) { DMA_LIFCR(dma) = flags; } else { DMA_HIFCR(dma) = flags; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Read Interrupt Flag The interrupt flag for the stream is returned. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] interrupt unsigned int32. Interrupt number: @ref dma_if_offset @returns bool interrupt flag is set. */ bool dma_get_interrupt_flag(uint32_t dma, uint8_t stream, uint32_t interrupt) { /* get offset to interrupt flag location in stream field. Assumes * stream and interrupt parameters are integers. */ uint32_t flag = (interrupt << DMA_ISR_OFFSET(stream)); /* First four streams are in low register */ if (stream < 4) { return ((DMA_LISR(dma) & flag) > 0); } else { return ((DMA_HISR(dma) & flag) > 0); } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Transfer Direction Set peripheral to memory, memory to peripheral or memory to memory. If memory to memory mode is selected, circular mode and double buffer modes are disabled. Ensure that these modes are not enabled at a later time. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] direction unsigned int32. Data transfer direction @ref dma_st_dir */ void dma_set_transfer_mode(uint32_t dma, uint8_t stream, uint32_t direction) { uint32_t reg32 = (DMA_SCR(dma, stream) & ~DMA_SxCR_DIR_MASK); /* Disable circular and double buffer modes if memory to memory * transfers are in effect. (Direct Mode is automatically disabled by * hardware) */ if (direction == DMA_SxCR_DIR_MEM_TO_MEM) { reg32 &= ~(DMA_SxCR_CIRC | DMA_SxCR_DBM); } DMA_SCR(dma, stream) = (reg32 | direction); } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Priority Stream Priority has four levels: low to very high. This has precedence over the hardware priority. In the event of equal software priority the lower numbered stream has priority. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] prio unsigned int32. Priority level @ref dma_st_pri. */ void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio) { DMA_SCR(dma, stream) &= ~(DMA_SxCR_PL_MASK); DMA_SCR(dma, stream) |= prio; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Memory Word Width Set the memory word width 8 bits, 16 bits, or 32 bits. Refer to datasheet for alignment information if the source and destination widths do not match. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] mem_size unsigned int32. Memory word width @ref dma_st_memwidth. */ void dma_set_memory_size(uint32_t dma, uint8_t stream, uint32_t mem_size) { DMA_SCR(dma, stream) &= ~(DMA_SxCR_MSIZE_MASK); DMA_SCR(dma, stream) |= mem_size; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Peripheral Word Width Set the peripheral word width 8 bits, 16 bits, or 32 bits. Refer to datasheet for alignment information if the source and destination widths do not match, or if the peripheral does not support byte or half-word writes. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] peripheral_size unsigned int32. Peripheral word width @ref dma_st_perwidth. */ void dma_set_peripheral_size(uint32_t dma, uint8_t stream, uint32_t peripheral_size) { DMA_SCR(dma, stream) &= ~(DMA_SxCR_PSIZE_MASK); DMA_SCR(dma, stream) |= peripheral_size; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Memory Increment after Transfer Following each transfer the current memory address is incremented by 1, 2 or 4 depending on the data size set in @ref dma_set_memory_size. The value held by the base memory address register is unchanged. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_memory_increment_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= DMA_SxCR_MINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Memory Increment after Transfer Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_memory_increment_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_MINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Variable Sized Peripheral Increment after Transfer Following each transfer the current peripheral address is incremented by 1, 2 or 4 depending on the data size set in @ref dma_set_peripheral_size. The value held by the base peripheral address register is unchanged. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t stream) { uint32_t reg32 = (DMA_SCR(dma, stream) | DMA_SxCR_PINC); DMA_SCR(dma, stream) = (reg32 & ~DMA_SxCR_PINCOS); } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Peripheral Increment after Transfer Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_PINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Fixed Sized Peripheral Increment after Transfer Following each transfer the current peripheral address is incremented by 4 regardless of the data size. The value held by the base peripheral address register is unchanged. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_fixed_peripheral_increment_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= (DMA_SxCR_PINC | DMA_SxCR_PINCOS); } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Memory Circular Mode After the number of bytes/words to be transferred has been completed, the original transfer block size, memory and peripheral base addresses are reloaded and the process repeats. Ensure that the stream is disabled otherwise the setting will not be changed. @note This cannot be used with memory to memory mode. It is disabled automatically if the peripheral is selected as the flow controller. It is enabled automatically if double buffered mode is selected. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_circular_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= DMA_SxCR_CIRC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Channel Select Associate an input channel to the stream. Not every channel is allocated to a hardware DMA request signal. The allocations for each stream are given in the STM32F4 Reference Manual. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] channel unsigned int8. Channel selection @ref dma_ch_sel */ void dma_channel_select(uint32_t dma, uint8_t stream, uint32_t channel) { DMA_SCR(dma, stream) |= channel; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Memory Burst Configuration Set the memory burst type to none, 4 8 or 16 word length. This is forced to none if direct mode is used. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] burst unsigned int8. Memory Burst selection @ref dma_mburst */ void dma_set_memory_burst(uint32_t dma, uint8_t stream, uint32_t burst) { uint32_t reg32 = (DMA_SCR(dma, stream) & ~DMA_SxCR_MBURST_MASK); DMA_SCR(dma, stream) = (reg32 | burst); } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Peripheral Burst Configuration Set the memory burst type to none, 4 8 or 16 word length. This is forced to none if direct mode is used. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] burst unsigned int8. Peripheral Burst selection @ref dma_pburst */ void dma_set_peripheral_burst(uint32_t dma, uint8_t stream, uint32_t burst) { uint32_t reg32 = (DMA_SCR(dma, stream) & ~DMA_SxCR_PBURST_MASK); DMA_SCR(dma, stream) = (reg32 | burst); } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Initial Target Memory In double buffered mode, set the target memory (M0 or M1) to be used for the first transfer. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] memory unsigned int8. Initial memory pointer to use: 0 or 1 */ void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory) { uint32_t reg32 = (DMA_SCR(dma, stream) & ~DMA_SxCR_CT); if (memory == 1) { reg32 |= DMA_SxCR_CT; } DMA_SCR(dma, stream) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Read Current Memory Target In double buffer mode, return the current memory target (M0 or M1). It is possible to update the memory pointer in the register that is not currently in use. An attempt to change the register currently in use will cause the stream to be disabled and the transfer error flag to be set. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @returns unsigned int8. Memory buffer in use: 0 or 1 */ uint8_t dma_get_target(uint32_t dma, uint8_t stream) { if (DMA_SCR(dma, stream) & DMA_SxCR_CT) { return 1; } return 0; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Double Buffer Mode Double buffer mode is used for memory to/from peripheral transfers only, and in circular mode which is automatically enabled. Two memory buffers must be established with pointers stored in the memory pointer registers. Ensure that the stream is disabled otherwise the setting will not be changed. @note This cannot be used with memory to memory mode. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_double_buffer_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= DMA_SxCR_DBM; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable Double Buffer Mode @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_double_buffer_mode(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_DBM; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set Peripheral Flow Control Set the peripheral to control DMA flow. Useful when the number of transfers is unknown. This is forced off when memory to memory mode is selected. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_set_peripheral_flow_control(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= DMA_SxCR_PFCTRL; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set DMA Flow Control Set the DMA controller to control DMA flow. This is the default. Ensure that the stream is disabled otherwise the setting will not be changed. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_set_dma_flow_control(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_PFCTRL; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Interrupt on Transfer Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t stream) { dma_clear_interrupt_flags(dma, stream, DMA_TEIF); DMA_SCR(dma, stream) |= DMA_SxCR_TEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable Interrupt on Transfer Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_TEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Interrupt on Transfer Half Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t stream) { dma_clear_interrupt_flags(dma, stream, DMA_HTIF); DMA_SCR(dma, stream) |= DMA_SxCR_HTIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable Interrupt on Transfer Half Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_HTIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Interrupt on Transfer Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t stream) { dma_clear_interrupt_flags(dma, stream, DMA_TCIF); DMA_SCR(dma, stream) |= DMA_SxCR_TCIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable Interrupt on Transfer Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_TCIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable Interrupt on Direct Mode Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream) { dma_clear_interrupt_flags(dma, stream, DMA_DMEIF); DMA_SCR(dma, stream) |= DMA_SxCR_DMEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable Interrupt on Direct Mode Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_direct_mode_error_interrupt(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_DMEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Enable Interrupt on FIFO Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_fifo_error_interrupt(uint32_t dma, uint8_t stream) { dma_clear_interrupt_flags(dma, stream, DMA_FEIF); DMA_SFCR(dma, stream) |= DMA_SxFCR_FEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Disable Interrupt on FIFO Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_fifo_error_interrupt(uint32_t dma, uint8_t stream) { DMA_SFCR(dma, stream) &= ~DMA_SxFCR_FEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Get FIFO Status Status of FIFO (empty. full or partial filled states) is returned. This has no meaning if direct mode is enabled (as the FIFO is not used). @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @returns uint32_t FIFO Status @ref dma_fifo_status */ uint32_t dma_fifo_status(uint32_t dma, uint8_t stream) { return DMA_SFCR(dma, stream) & DMA_SxFCR_FS_MASK; } /*---------------------------------------------------------------------------*/ /** @brief DMA Enable Direct Mode Direct mode is the default. Data is transferred as soon as a DMA request is received. The FIFO is not used. This must not be set when memory to memory mode is selected. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_direct_mode(uint32_t dma, uint8_t stream) { DMA_SFCR(dma, stream) &= ~DMA_SxFCR_DMDIS; } /*---------------------------------------------------------------------------*/ /** @brief DMA Enable FIFO Mode Data is transferred via a FIFO. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_fifo_mode(uint32_t dma, uint8_t stream) { DMA_SFCR(dma, stream) |= DMA_SxFCR_DMDIS; } /*---------------------------------------------------------------------------*/ /** @brief DMA Set FIFO Threshold This is the filled level at which data is transferred out of the FIFO to the destination. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] threshold unsigned int8. Threshold setting @ref dma_fifo_thresh */ void dma_set_fifo_threshold(uint32_t dma, uint8_t stream, uint32_t threshold) { uint32_t reg32 = (DMA_SFCR(dma, stream) & ~DMA_SxFCR_FTH_MASK); DMA_SFCR(dma, stream) = (reg32 | threshold); } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Enable @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_enable_stream(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) |= DMA_SxCR_EN; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Disable @note The DMA stream registers retain their values when the stream is disabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number */ void dma_disable_stream(uint32_t dma, uint8_t stream) { DMA_SCR(dma, stream) &= ~DMA_SxCR_EN; } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set the Peripheral Address Set the address of the peripheral register to or from which data is to be transferred. Refer to the documentation for the specific peripheral. @note The DMA stream must be disabled before setting this address. This function has no effect if the stream is enabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] address unsigned int32. Peripheral Address. */ void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t address) { if (!(DMA_SCR(dma, stream) & DMA_SxCR_EN)) { DMA_SPAR(dma, stream) = (uint32_t *) address; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set the Base Memory Address 0 Set the address pointer to the memory location for DMA transfers. The DMA stream must normally be disabled before setting this address, however it is possible to change this in double buffer mode when the current target is memory area 1 (see @ref dma_get_target). This is the default base memory address used in direct mode. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] address unsigned int32. Memory Initial Address. */ void dma_set_memory_address(uint32_t dma, uint8_t stream, uint32_t address) { uint32_t reg32 = DMA_SCR(dma, stream); if (!(reg32 & DMA_SxCR_EN) || ((reg32 & DMA_SxCR_CT) && (reg32 & DMA_SxCR_DBM))) { DMA_SM0AR(dma, stream) = (uint32_t *) address; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set the Base Memory Address 1 Set the address pointer to the memory location for DMA transfers. The DMA stream must normally be disabled before setting this address, however it is possible to change this in double buffer mode when the current target is memory area 0 (see @ref dma_get_target). @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] address unsigned int32. Memory Initial Address. */ void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address) { uint32_t reg32 = DMA_SCR(dma, stream); if (!(reg32 & DMA_SxCR_EN) || (!(reg32 & DMA_SxCR_CT) && (reg32 & DMA_SxCR_DBM))) { DMA_SM1AR(dma, stream) = (uint32_t *) address; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Stream Set the Transfer Block Size @note The DMA stream must be disabled before setting this count value. The count is not changed if the stream is enabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number @param[in] number unsigned int16. Number of data words to transfer (65535 maximum). */ void dma_set_number_of_data(uint32_t dma, uint8_t stream, uint16_t number) { DMA_SNDTR(dma, stream) = number; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/dma_common_l1f013.c ================================================ /** @addtogroup dma_file @author @htmlonly © @endhtmlonly 2010 Thomas Otto This library supports the DMA Control System in the STM32 series of ARM Cortex Microcontrollers by ST Microelectronics. Up to two DMA controllers are supported. 12 DMA channels are allocated 7 to the first DMA controller and 5 to the second. Each channel is connected to between 3 and 6 hardware peripheral DMA signals in a logical OR arrangement. DMA transfers can be configured to occur between peripheral and memory in any combination including memory to memory. Circular mode transfers are also supported in transfers involving a peripheral. An arbiter is provided to resolve priority DMA requests. Transfers can be made with 8, 16 or 32 bit words. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Reset The channel is disabled and configuration registers are cleared. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_channel_reset(uint32_t dma, uint8_t channel) { /* Disable channel and reset config bits. */ DMA_CCR(dma, channel) = 0; /* Reset data transfer number. */ DMA_CNDTR(dma, channel) = 0; /* Reset peripheral address. */ DMA_CPAR(dma, channel) = 0; /* Reset memory address. */ DMA_CMAR(dma, channel) = 0; /* Reset interrupt flags. */ DMA_IFCR(dma) |= DMA_IFCR_CIF(channel); } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Clear Interrupt Flag The interrupt flag for the channel is cleared. More than one interrupt for the same channel may be cleared by using the logical OR of the interrupt flags. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: @ref dma_ch @param[in] interrupts unsigned int32. Logical OR of interrupt numbers: @ref dma_if_offset */ void dma_clear_interrupt_flags(uint32_t dma, uint8_t channel, uint32_t interrupts) { /* Get offset to interrupt flag location in channel field */ uint32_t flags = (interrupts << DMA_FLAG_OFFSET(channel)); DMA_IFCR(dma) = flags; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Read Interrupt Flag The interrupt flag for the channel is returned. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: @ref dma_ch @param[in] interrupt unsigned int32. Interrupt number: @ref dma_if_offset @returns bool interrupt flag is set. */ bool dma_get_interrupt_flag(uint32_t dma, uint8_t channel, uint32_t interrupt) { /* get offset to interrupt flag location in channel field. */ uint32_t flag = (interrupt << DMA_FLAG_OFFSET(channel)); return ((DMA_ISR(dma) & flag) > 0); } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Memory to Memory Transfers Memory to memory transfers do not require a trigger to activate each transfer. Transfers begin immediately the channel has been enabled, and proceed without intervention. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_mem2mem_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_MEM2MEM; DMA_CCR(dma, channel) &= ~DMA_CCR_CIRC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set Priority Channel Priority has four levels: low to very high. This has precedence over the hardware priority. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] prio unsigned int32. Priority level @ref dma_ch_pri. */ void dma_set_priority(uint32_t dma, uint8_t channel, uint32_t prio) { DMA_CCR(dma, channel) &= ~(DMA_CCR_PL_MASK); DMA_CCR(dma, channel) |= prio; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set Memory Word Width Set the memory word width 8 bits, 16 bits, or 32 bits. Refer to datasheet for alignment information if the source and destination widths do not match. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] mem_size unsigned int32. Memory word width @ref dma_ch_memwidth. */ void dma_set_memory_size(uint32_t dma, uint8_t channel, uint32_t mem_size) { DMA_CCR(dma, channel) &= ~(DMA_CCR_MSIZE_MASK); DMA_CCR(dma, channel) |= mem_size; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set Peripheral Word Width Set the peripheral word width 8 bits, 16 bits, or 32 bits. Refer to datasheet for alignment information if the source and destination widths do not match, or if the peripheral does not support byte or half-word writes. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] peripheral_size unsigned int32. Peripheral word width @ref dma_ch_perwidth. */ void dma_set_peripheral_size(uint32_t dma, uint8_t channel, uint32_t peripheral_size) { DMA_CCR(dma, channel) &= ~(DMA_CCR_PSIZE_MASK); DMA_CCR(dma, channel) |= peripheral_size; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Memory Increment after Transfer Following each transfer the current memory address is incremented by 1, 2 or 4 depending on the data size set in @ref dma_set_memory_size. The value held by the base memory address register is unchanged. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_memory_increment_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_MINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Memory Increment after Transfer @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_MINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Peripheral Increment after Transfer Following each transfer the current peripheral address is incremented by 1, 2 or 4 depending on the data size set in @ref dma_set_peripheral_size. The value held by the base peripheral address register is unchanged. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_PINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Peripheral Increment after Transfer @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_PINC; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Memory Circular Mode After the number of bytes/words to be transferred has been completed, the original transfer block size, memory and peripheral base addresses are reloaded and the process repeats. @note This cannot be used with memory to memory mode, which is explictly disabled here. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_circular_mode(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_CIRC; DMA_CCR(dma, channel) &= ~DMA_CCR_MEM2MEM; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Transfers from a Peripheral The data direction is set to read from a peripheral. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_set_read_from_peripheral(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_DIR; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Transfers from Memory The data direction is set to read from memory. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_set_read_from_memory(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_DIR; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Interrupt on Transfer Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_TEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Interrupt on Transfer Error @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_TEIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Interrupt on Transfer Half Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_HTIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Interrupt on Transfer Half Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_HTIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable Interrupt on Transfer Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_TCIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable Interrupt on Transfer Complete @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_TCIE; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Enable @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_enable_channel(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) |= DMA_CCR_EN; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Disable @note The DMA channel registers retain their values when the channel is disabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 */ void dma_disable_channel(uint32_t dma, uint8_t channel) { DMA_CCR(dma, channel) &= ~DMA_CCR_EN; } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set the Peripheral Address Set the address of the peripheral register to or from which data is to be transferred. Refer to the documentation for the specific peripheral. @note The DMA channel must be disabled before setting this address. This function has no effect if the channel is enabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] address unsigned int32. Peripheral Address. */ void dma_set_peripheral_address(uint32_t dma, uint8_t channel, uint32_t address) { if (!(DMA_CCR(dma, channel) & DMA_CCR_EN)) { DMA_CPAR(dma, channel) = (uint32_t) address; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set the Base Memory Address @note The DMA channel must be disabled before setting this address. This function has no effect if the channel is enabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] address unsigned int32. Memory Initial Address. */ void dma_set_memory_address(uint32_t dma, uint8_t channel, uint32_t address) { if (!(DMA_CCR(dma, channel) & DMA_CCR_EN)) { DMA_CMAR(dma, channel) = (uint32_t) address; } } /*---------------------------------------------------------------------------*/ /** @brief DMA Channel Set the Transfer Block Size @note The DMA channel must be disabled before setting this count value. The count is not changed if the channel is enabled. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] channel unsigned int8. Channel number: 1-7 for DMA1 or 1-5 for DMA2 @param[in] number unsigned int16. Number of data words to transfer (65535 maximum). */ void dma_set_number_of_data(uint32_t dma, uint8_t channel, uint16_t number) { DMA_CNDTR(dma, channel) = number; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/exti_common_all.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Mark Butler * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * This provides the code for the "next gen" EXTI block provided in F2/F4/L1 * devices. (differences only in the source selection) */ #include #include #include #if !defined(AFIO_BASE) # include #endif void exti_set_trigger(uint32_t extis, enum exti_trigger_type trig) { switch (trig) { case EXTI_TRIGGER_RISING: EXTI_RTSR |= extis; EXTI_FTSR &= ~extis; break; case EXTI_TRIGGER_FALLING: EXTI_RTSR &= ~extis; EXTI_FTSR |= extis; break; case EXTI_TRIGGER_BOTH: EXTI_RTSR |= extis; EXTI_FTSR |= extis; break; } } void exti_enable_request(uint32_t extis) { /* Enable interrupts. */ EXTI_IMR |= extis; /* Enable events. */ EXTI_EMR |= extis; } void exti_disable_request(uint32_t extis) { /* Disable interrupts. */ EXTI_IMR &= ~extis; /* Disable events. */ EXTI_EMR &= ~extis; } /* * Reset the interrupt request by writing a 1 to the corresponding * pending bit register. */ void exti_reset_request(uint32_t extis) { EXTI_PR = extis; } /* * Check the flag of a given EXTI interrupt. * */ uint32_t exti_get_flag_status(uint32_t exti) { return EXTI_PR & exti; } /* * Remap an external interrupt line to the corresponding pin on the * specified GPIO port. * * TODO: This could be rewritten in fewer lines of code. */ void exti_select_source(uint32_t exti, uint32_t gpioport) { uint32_t line; for (line = 0; line < 16; line++) { if (!(exti & (1 << line))) { continue; } uint32_t bits = 0, mask = 0x0F; switch (gpioport) { case GPIOA: bits = 0; break; case GPIOB: bits = 1; break; case GPIOC: bits = 2; break; case GPIOD: bits = 3; break; #if defined(GPIOE) && defined(GPIO_PORT_E_BASE) case GPIOE: bits = 4; break; #endif #if defined(GPIOF) && defined(GPIO_PORT_F_BASE) case GPIOF: bits = 5; break; #endif #if defined(GPIOG) && defined(GPIO_PORT_G_BASE) case GPIOG: bits = 6; break; #endif #if defined(GPIOH) && defined(GPIO_PORT_H_BASE) case GPIOH: bits = 7; break; #endif #if defined(GPIOI) && defined(GPIO_PORT_I_BASE) case GPIOI: bits = 8; break; #endif } uint8_t shift = (uint8_t)(4 * (line % 4)); uint32_t reg = line / 4; bits <<= shift; mask <<= shift; #if defined(AFIO_BASE) AFIO_EXTICR(reg) = (AFIO_EXTICR(reg) & ~mask) | bits; #else SYSCFG_EXTICR(reg) = (SYSCFG_EXTICR(reg) & ~mask) | bits; #endif }; } ================================================ FILE: firmware/libopencm3/lib/stm32/common/flash_common_f234.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void flash_set_ws(uint32_t ws) { uint32_t reg32; reg32 = FLASH_ACR; reg32 &= ~((1 << 0) | (1 << 1) | (1 << 2)); reg32 |= ws; FLASH_ACR = reg32; } void flash_unlock(void) { /* Clear the unlock sequence state. */ FLASH_CR |= FLASH_CR_LOCK; /* Authorize the FPEC access. */ FLASH_KEYR = FLASH_KEYR_KEY1; FLASH_KEYR = FLASH_KEYR_KEY2; } void flash_lock(void) { FLASH_CR |= FLASH_CR_LOCK; } void flash_clear_pgperr_flag(void) { FLASH_SR |= FLASH_SR_PGPERR; } void flash_clear_eop_flag(void) { FLASH_SR |= FLASH_SR_EOP; } void flash_clear_bsy_flag(void) { FLASH_SR &= ~FLASH_SR_BSY; } void flash_wait_for_last_operation(void) { while ((FLASH_SR & FLASH_SR_BSY) == FLASH_SR_BSY); } ================================================ FILE: firmware/libopencm3/lib/stm32/common/flash_common_f24.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include static inline void flash_set_program_size(uint32_t psize) { FLASH_CR &= ~(((1 << 0) | (1 << 1)) << 8); FLASH_CR |= psize; } void flash_dcache_enable(void) { FLASH_ACR |= FLASH_ACR_DCE; } void flash_dcache_disable(void) { FLASH_ACR &= ~FLASH_ACR_DCE; } void flash_icache_enable(void) { FLASH_ACR |= FLASH_ACR_ICE; } void flash_icache_disable(void) { FLASH_ACR &= ~FLASH_ACR_ICE; } void flash_prefetch_enable(void) { FLASH_ACR |= FLASH_ACR_PRFTEN; } void flash_prefetch_disable(void) { FLASH_ACR &= ~FLASH_ACR_PRFTEN; } void flash_dcache_reset(void) { FLASH_ACR |= FLASH_ACR_DCRST; } void flash_icache_reset(void) { FLASH_ACR |= FLASH_ACR_ICRST; } void flash_clear_pgserr_flag(void) { FLASH_SR |= FLASH_SR_PGSERR; } void flash_clear_pgaerr_flag(void) { FLASH_SR |= FLASH_SR_PGAERR; } void flash_clear_wrperr_flag(void) { FLASH_SR |= FLASH_SR_WRPERR; } void flash_clear_status_flags(void) { flash_clear_pgserr_flag(); flash_clear_pgaerr_flag(); flash_clear_wrperr_flag(); flash_clear_pgperr_flag(); flash_clear_eop_flag(); flash_clear_bsy_flag(); } void flash_unlock_option_bytes(void) { /* Clear the unlock state. */ FLASH_OPTCR |= FLASH_OPTCR_OPTLOCK; /* Unlock option bytes. */ FLASH_OPTKEYR = FLASH_OPTKEYR_KEY1; FLASH_OPTKEYR = FLASH_OPTKEYR_KEY2; } void flash_lock_option_bytes(void) { FLASH_OPTCR |= FLASH_OPTCR_OPTLOCK; } void flash_program_double_word(uint32_t address, uint64_t data) { /* Ensure that all flash operations are complete. */ flash_wait_for_last_operation(); flash_set_program_size(FLASH_CR_PROGRAM_X64); /* Enable writes to flash. */ FLASH_CR |= FLASH_CR_PG; /* Program the first half of the word. */ MMIO64(address) = data; /* Wait for the write to complete. */ flash_wait_for_last_operation(); /* Disable writes to flash. */ FLASH_CR &= ~FLASH_CR_PG; } void flash_program_word(uint32_t address, uint32_t data) { /* Ensure that all flash operations are complete. */ flash_wait_for_last_operation(); flash_set_program_size(FLASH_CR_PROGRAM_X32); /* Enable writes to flash. */ FLASH_CR |= FLASH_CR_PG; /* Program the first half of the word. */ MMIO32(address) = data; /* Wait for the write to complete. */ flash_wait_for_last_operation(); /* Disable writes to flash. */ FLASH_CR &= ~FLASH_CR_PG; } void flash_program_half_word(uint32_t address, uint16_t data) { flash_wait_for_last_operation(); flash_set_program_size(FLASH_CR_PROGRAM_X16); FLASH_CR |= FLASH_CR_PG; MMIO16(address) = data; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_PG; /* Disable the PG bit. */ } void flash_program_byte(uint32_t address, uint8_t data) { flash_wait_for_last_operation(); flash_set_program_size(FLASH_CR_PROGRAM_X8); FLASH_CR |= FLASH_CR_PG; MMIO8(address) = data; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_PG; /* Disable the PG bit. */ } void flash_program(uint32_t address, uint8_t *data, uint32_t len) { /* TODO: Use dword and word size program operations where possible for * turbo speed. */ uint32_t i; for (i = 0; i < len; i++) { flash_program_byte(address+i, data[i]); } } void flash_erase_sector(uint8_t sector, uint32_t program_size) { flash_wait_for_last_operation(); flash_set_program_size(program_size); FLASH_CR &= ~(0xF << 3); FLASH_CR |= (sector << 3) & 0x78; FLASH_CR |= FLASH_CR_SER; FLASH_CR |= FLASH_CR_STRT; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_SER; FLASH_CR &= ~(0xF << 3); } void flash_erase_all_sectors(uint32_t program_size) { flash_wait_for_last_operation(); flash_set_program_size(program_size); FLASH_CR |= FLASH_CR_MER; /* Enable mass erase. */ FLASH_CR |= FLASH_CR_STRT; /* Trigger the erase. */ flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_MER; /* Disable mass erase. */ } void flash_program_option_bytes(uint32_t data) { flash_wait_for_last_operation(); if (FLASH_OPTCR & FLASH_OPTCR_OPTLOCK) { flash_unlock_option_bytes(); } FLASH_OPTCR = data & ~0x3; FLASH_OPTCR |= FLASH_OPTCR_OPTSTRT; /* Enable option byte prog. */ flash_wait_for_last_operation(); } ================================================ FILE: firmware/libopencm3/lib/stm32/common/gpio_common_all.c ================================================ /** @addtogroup gpio_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #define WEAK __attribute__((weak)) #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief Set a Group of Pins Atomic Set one or more pins of the given GPIO port to 1 in an atomic operation. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be changed, use logical OR '|' to separate them. */ void gpio_set(uint32_t gpioport, uint16_t gpios) { GPIO_BSRR(gpioport) = gpios; } /*---------------------------------------------------------------------------*/ /** @brief Clear a Group of Pins Atomic Clear one or more pins of the given GPIO port to 0 in an atomic operation. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be changed, use logical OR '|' to separate them. */ void gpio_clear(uint32_t gpioport, uint16_t gpios) { GPIO_BSRR(gpioport) = (gpios << 16); } /*---------------------------------------------------------------------------*/ /** @brief Read a Group of Pins. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be read, use logical OR '|' to separate them. @return Unsigned int16 value of the pin values. The bit position of the pin value returned corresponds to the pin number. */ uint16_t gpio_get(uint32_t gpioport, uint16_t gpios) { return gpio_port_read(gpioport) & gpios; } /*---------------------------------------------------------------------------*/ /** @brief Toggle a Group of Pins Toggle one or more pins of the given GPIO port. This is not an atomic operation. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be changed, use logical OR '|' to separate them. */ void gpio_toggle(uint32_t gpioport, uint16_t gpios) { GPIO_ODR(gpioport) ^= gpios; } /*---------------------------------------------------------------------------*/ /** @brief Read from a Port Read the current value of the given GPIO port. Only the lower 16 bits contain valid pin data. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @return Unsigned int16. The value held in the specified GPIO port. */ uint16_t gpio_port_read(uint32_t gpioport) { return (uint16_t)GPIO_IDR(gpioport); } /*---------------------------------------------------------------------------*/ /** @brief Write to a Port Write a value to the given GPIO port. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] data Unsigned int16. The value to be written to the GPIO port. */ void gpio_port_write(uint32_t gpioport, uint16_t data) { GPIO_ODR(gpioport) = data; } /*---------------------------------------------------------------------------*/ /** @brief Lock the Configuration of a Group of Pins The configuration of one or more pins of the given GPIO port is locked. There is no mechanism to unlock these via software. Unlocking occurs at the next reset. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be locked, use logical OR '|' to separate them. */ void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios) { uint32_t reg32; /* Special "Lock Key Writing Sequence", see datasheet. */ GPIO_LCKR(gpioport) = GPIO_LCKK | gpios; /* Set LCKK. */ GPIO_LCKR(gpioport) = ~GPIO_LCKK & gpios; /* Clear LCKK. */ GPIO_LCKR(gpioport) = GPIO_LCKK | gpios; /* Set LCKK. */ reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */ reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */ /* Tell the compiler the variable is actually used. It will get * optimized out anyways. */ reg32 = reg32; /* If (reg32 & GPIO_LCKK) is true, the lock is now active. */ } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/gpio_common_f0234.c ================================================ /** @addtogroup gpio_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2012 Ken Sarkies Each I/O port has 16 individually configurable bits. Many I/O pins share GPIO functionality with a number of alternate functions and must be configured to the alternate function mode if these are to be accessed. A feature is available to remap alternative functions to a limited set of alternative pins in the event of a clash of requirements. The data registers associated with each port for input and output are 32 bit with the upper 16 bits unused. The output buffer must be written as a 32 bit word, but individual bits may be set or reset separately in atomic operations to avoid race conditions during interrupts. Bits may also be individually locked to prevent accidental configuration changes. Once locked the configuration cannot be changed until after the next reset. Each port bit can be configured as analog or digital input, the latter can be floating or pulled up or down. As outputs they can be configured as either push-pull or open drain, digital I/O or alternate function, and with maximum output speeds of 2MHz, 10MHz, or 50MHz. On reset all ports are configured as digital floating input. @section gpio_api_ex Basic GPIO Handling API. Example 1: Push-pull digital output actions with pullup on ports C2 and C9 @code gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLUP, GPIO2 | GPIO9); gpio_output_options(GPIOC, GPIO_OTYPE_PP, GPIO_OSPEED_25MHZ, GPIO2 | GPIO9); gpio_set(GPIOC, GPIO2 | GPIO9); gpio_clear(GPIOC, GPIO2); gpio_toggle(GPIOC, GPIO2 | GPIO9); gpio_port_write(GPIOC, 0x204); @endcode Example 2: Digital input on port C12 with pullup @code gpio_mode_setup(GPIOC, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP, GPIO12); reg16 = gpio_port_read(GPIOC); @endcode */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief Set GPIO Pin Mode Sets the Pin Direction and Analog/Digital Mode, and Output Pin Pullup, for a set of GPIO pins on a given GPIO port. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] mode Unsigned int8. Pin mode @ref gpio_mode @param[in] pull_up_down Unsigned int8. Pin pullup/pulldown configuration @ref gpio_pup @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be set, use bitwise OR '|' to separate them. */ void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down, uint16_t gpios) { uint16_t i; uint32_t moder, pupd; /* * We want to set the config only for the pins mentioned in gpios, * but keeping the others, so read out the actual config first. */ moder = GPIO_MODER(gpioport); pupd = GPIO_PUPDR(gpioport); for (i = 0; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } moder &= ~GPIO_MODE_MASK(i); moder |= GPIO_MODE(i, mode); pupd &= ~GPIO_PUPD_MASK(i); pupd |= GPIO_PUPD(i, pull_up_down); } /* Set mode and pull up/down control registers. */ GPIO_MODER(gpioport) = moder; GPIO_PUPDR(gpioport) = pupd; } /*---------------------------------------------------------------------------*/ /** @brief Set GPIO Output Options When the pin is set to output mode, this sets the configuration (analog/digital and open drain/push pull) and speed, for a set of GPIO pins on a given GPIO port. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] otype Unsigned int8. Pin output type @ref gpio_output_type @param[in] speed Unsigned int8. Pin speed @ref gpio_speed @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be set, use bitwise OR '|' to separate them. */ void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t speed, uint16_t gpios) { uint16_t i; uint32_t ospeedr; if (otype == 0x1) { GPIO_OTYPER(gpioport) |= gpios; } else { GPIO_OTYPER(gpioport) &= ~gpios; } ospeedr = GPIO_OSPEEDR(gpioport); for (i = 0; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } ospeedr &= ~GPIO_OSPEED_MASK(i); ospeedr |= GPIO_OSPEED(i, speed); } GPIO_OSPEEDR(gpioport) = ospeedr; } /*---------------------------------------------------------------------------*/ /** @brief Set GPIO Alternate Function Selection Set the alternate function mapping number for each pin. Most pins have alternate functions associated with them. When set to AF mode, a pin may be used for one of its allocated alternate functions selected by the number given here. To determine the number to be used for the desired function refer to the individual datasheet for the particular device. A table is given under the Pin Selection chapter. Note that a number of pins may be set but only with a single AF number. In practice this would rarely be useful as each pin is likely to require a different number. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] alt_func_num Unsigned int8. Pin alternate function number @ref gpio_af_num @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be set, use bitwise OR '|' to separate them. */ void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios) { uint16_t i; uint32_t afrl, afrh; afrl = GPIO_AFRL(gpioport); afrh = GPIO_AFRH(gpioport); for (i = 0; i < 8; i++) { if (!((1 << i) & gpios)) { continue; } afrl &= ~GPIO_AFR_MASK(i); afrl |= GPIO_AFR(i, alt_func_num); } for (i = 8; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } afrh &= ~GPIO_AFR_MASK(i - 8); afrh |= GPIO_AFR(i - 8, alt_func_num); } GPIO_AFRL(gpioport) = afrl; GPIO_AFRH(gpioport) = afrh; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/hash_common_f24.c ================================================ /** @addtogroup hash_file @author @htmlonly © @endhtmlonly 2013 Mikhail Avkhimenia This library supports the HASH processor in the STM32F2 and STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Mikhail Avkhimenia * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief HASH Set Mode Sets up the specified mode - either HASH or HMAC. @param[in] mode unsigned int8. Hash processor mode: @ref hash_mode */ void hash_set_mode(uint8_t mode) { HASH_CR &= ~HASH_CR_MODE; HASH_CR |= mode; } /*---------------------------------------------------------------------------*/ /** @brief HASH Set Algorithm Sets up the specified algorithm - either MD5 or SHA1. @param[in] algorithm unsigned int8. Hash algorithm: @ref hash_algorithm */ void hash_set_algorithm(uint8_t algorithm) { HASH_CR &= ~HASH_CR_ALGO; HASH_CR |= algorithm; } /*---------------------------------------------------------------------------*/ /** @brief HASH Set Data Type Sets up the specified data type: 32Bit, 16Bit, 8Bit, Bitstring. @param[in] datatype unsigned int8. Hash data type: @ref hash_data_type */ void hash_set_data_type(uint8_t datatype) { HASH_CR &= ~HASH_CR_DATATYPE; HASH_CR |= datatype; } /*---------------------------------------------------------------------------*/ /** @brief HASH Set Key Length Sets up the specified key length: Long, Short. @param[in] keylength unsigned int8. Hash data type: @ref hash_key_length */ void hash_set_key_length(uint8_t keylength) { HASH_CR &= ~HASH_CR_LKEY; HASH_CR |= keylength; } /*---------------------------------------------------------------------------*/ /** @brief HASH Set Last Word Valid Bits Specifies the number of valid bits in the last word. @param[in] validbits unsigned int8. Number of valid bits. */ void hash_set_last_word_valid_bits(uint8_t validbits) { HASH_STR &= ~(HASH_STR_NBW); HASH_STR |= 32 - validbits; } /*---------------------------------------------------------------------------*/ /** @brief HASH Init Initializes the HASH processor. */ void hash_init() { HASH_CR |= HASH_CR_INIT; } /*---------------------------------------------------------------------------*/ /** @brief HASH Add data Puts data into the HASH processor's queue. @param[in] data unsigned int32. Hash input data. */ void hash_add_data(uint32_t data) { HASH_DIN = data; } /*---------------------------------------------------------------------------*/ /** @brief HASH Digest Starts the processing of the last data block. */ void hash_digest() { HASH_STR |= HASH_STR_DCAL; } /*---------------------------------------------------------------------------*/ /** @brief HASH Get Hash Result Makes a copy of the resulting hash. @param[out] data unsigned int32. Hash 4\5 words long depending on the algorithm. @param[in] algorithm unsigned int8. Hash algorithm: @ref hash_algorithm */ void hash_get_result(uint32_t *data) { data[0] = HASH_HR[0]; data[1] = HASH_HR[1]; data[2] = HASH_HR[2]; data[3] = HASH_HR[3]; if ((HASH_CR & HASH_CR_ALGO) == HASH_ALGO_SHA1) { data[4] = HASH_HR[4]; } } ================================================ FILE: firmware/libopencm3/lib/stm32/common/i2c_common_all.c ================================================ /** @addtogroup i2c_file @author @htmlonly © @endhtmlonly 2010 Thomas Otto @author @htmlonly © @endhtmlonly 2012 Ken Sarkies Devices can have up to two I2C peripherals. The peripherals support SMBus and PMBus variants. A peripheral begins after reset in Slave mode. To become a Master a start condition must be generated. The peripheral will remain in Master mode unless a multimaster contention is lost or a stop condition is generated. @todo all sorts of lovely stuff like DMA, Interrupts, SMBus variant, Status register access, Error conditions */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief I2C Reset. The I2C peripheral and all its associated configuration registers are placed in the reset condition. The reset is effected via the RCC peripheral reset system. @param[in] i2c Unsigned int32. I2C peripheral identifier @ref i2c_reg_base. */ void i2c_reset(uint32_t i2c) { switch (i2c) { case I2C1: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C1RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C1RST); break; case I2C2: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C2RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C2RST); break; } } /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Enable. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_peripheral_enable(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_PE; } /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Disable. This must not be reset while in Master mode until a communication has finished. In Slave mode, the peripheral is disabled only after communication has ended. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_peripheral_disable(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_PE; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Start Condition. If in Master mode this will cause a restart condition to occur at the end of the current transmission. If in Slave mode, this will initiate a start condition when the current bus activity is completed. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_send_start(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_START; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Stop Condition. After the current byte transfer this will initiate a stop condition if in Master mode, or simply release the bus if in Slave mode. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_send_stop(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_STOP; } /*---------------------------------------------------------------------------*/ /** @brief I2C Clear Stop Flag. Clear the "Send Stop" flag in the I2C config register @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_clear_stop(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_STOP; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set the 7 bit Slave Address for the Peripheral. This sets an address for Slave mode operation, in 7 bit form. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] slave Unsigned int8. Slave address 0...127. */ void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave) { I2C_OAR1(i2c) = (uint16_t)(slave << 1); I2C_OAR1(i2c) &= ~I2C_OAR1_ADDMODE; I2C_OAR1(i2c) |= (1 << 14); /* Datasheet: always keep 1 by software. */ } /*---------------------------------------------------------------------------*/ /** @brief I2C Set the 10 bit Slave Address for the Peripheral. This sets an address for Slave mode operation, in 10 bit form. @todo add "I2C_OAR1(i2c) |= (1 << 14);" as above @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] slave Unsigned int16. Slave address 0...1023. */ void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave) { I2C_OAR1(i2c) = (uint16_t)(I2C_OAR1_ADDMODE | slave); } /*---------------------------------------------------------------------------*/ /** @brief I2C Set Peripheral Clock Frequency. Set the peripheral clock frequency: 2MHz to 36MHz (the APB frequency). Note that this is not the I2C bus clock. This is set in conjunction with the Clock Control register to generate the Master bus clock, see @ref i2c_set_ccr @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] freq Unsigned int8. Clock Frequency Setting @ref i2c_clock. */ void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq) { uint16_t reg16; reg16 = I2C_CR2(i2c) & 0xffc0; /* Clear bits [5:0]. */ reg16 |= freq; I2C_CR2(i2c) = reg16; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Data. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] data Unsigned int8. Byte to send. */ void i2c_send_data(uint32_t i2c, uint8_t data) { I2C_DR(i2c) = data; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set Fast Mode. Set the clock frequency to the high clock rate mode (up to 400kHz). The actual clock frequency must be set with @ref i2c_set_clock_frequency @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_set_fast_mode(uint32_t i2c) { I2C_CCR(i2c) |= I2C_CCR_FS; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set Standard Mode. Set the clock frequency to the standard clock rate mode (up to 100kHz). The actual clock frequency must be set with @ref i2c_set_clock_frequency @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_set_standard_mode(uint32_t i2c) { I2C_CCR(i2c) &= ~I2C_CCR_FS; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set Bus Clock Frequency. Set the bus clock frequency. This is a 12 bit number (0...4095) calculated from the formulae given in the STM32F1 reference manual in the description of the CCR field. It is a divisor of the peripheral clock frequency @ref i2c_set_clock_frequency modified by the fast mode setting @ref i2c_set_fast_mode @todo provide additional API assitance to set the clock, eg macros @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] freq Unsigned int16. Bus Clock Frequency Setting 0...4095. */ void i2c_set_ccr(uint32_t i2c, uint16_t freq) { uint16_t reg16; reg16 = I2C_CCR(i2c) & 0xf000; /* Clear bits [11:0]. */ reg16 |= freq; I2C_CCR(i2c) = reg16; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set the Rise Time. Set the maximum rise time on the bus according to the I2C specification, as 1 more than the specified rise time in peripheral clock cycles. This is a 6 bit number. @todo provide additional APIP assistance. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] trise Unsigned int16. Rise Time Setting 0...63. */ void i2c_set_trise(uint32_t i2c, uint16_t trise) { I2C_TRISE(i2c) = trise; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send the 7-bit Slave Address. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] slave Unsigned int16. Slave address 0...1023. @param[in] readwrite Unsigned int8. Single bit to instruct slave to receive or send @ref i2c_rw. */ void i2c_send_7bit_address(uint32_t i2c, uint8_t slave, uint8_t readwrite) { I2C_DR(i2c) = (uint8_t)((slave << 1) | readwrite); } /*---------------------------------------------------------------------------*/ /** @brief I2C Get Data. @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ uint8_t i2c_get_data(uint32_t i2c) { return I2C_DR(i2c) & 0xff; } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable Interrupt @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] interrupt Unsigned int32. Interrupt to enable. */ void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt) { I2C_CR2(i2c) |= interrupt; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable Interrupt @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] interrupt Unsigned int32. Interrupt to disable. */ void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt) { I2C_CR2(i2c) &= ~interrupt; } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable ACK Enables acking of own 7/10 bit address @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_enable_ack(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_ACK; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable ACK Disables acking of own 7/10 bit address @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_disable_ack(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_ACK; } /*---------------------------------------------------------------------------*/ /** @brief I2C NACK Next Byte Causes the I2C controller to NACK the reception of the next byte @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_nack_next(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_POS; } /*---------------------------------------------------------------------------*/ /** @brief I2C NACK Next Byte Causes the I2C controller to NACK the reception of the current byte @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_nack_current(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_POS; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set clock duty cycle @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. @param[in] dutycycle Unsigned int32. I2C duty cycle @ref i2c_duty_cycle. */ void i2c_set_dutycycle(uint32_t i2c, uint32_t dutycycle) { if (dutycycle == I2C_CCR_DUTY_DIV2) { I2C_CCR(i2c) &= ~I2C_CCR_DUTY; } else { I2C_CCR(i2c) |= I2C_CCR_DUTY; } } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable DMA @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_enable_dma(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable DMA @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_disable_dma(uint32_t i2c) { I2C_CR2(i2c) &= ~I2C_CR2_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set DMA last transfer @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_set_dma_last_transfer(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_LAST; } /*---------------------------------------------------------------------------*/ /** @brief I2C Clear DMA last transfer @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_clear_dma_last_transfer(uint32_t i2c) { I2C_CR2(i2c) &= ~I2C_CR2_LAST; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/iwdg_common_all.c ================================================ /** @addtogroup iwdg_file @author @htmlonly © @endhtmlonly 2012 Ken Sarkies ksarkies@internode.on.net This library supports the Independent Watchdog Timer System in the STM32F1xx series of ARM Cortex Microcontrollers by ST Microelectronics. The watchdog timer uses the LSI (low speed internal) clock which is low power and continues to operate during stop and standby modes. Its frequency is nominally 32kHz (40kHz for the STM32F1xx series) but can vary from as low as 17kHz up to 60kHz (refer to datasheet electrical characteristics). Note that the User Configuration option byte provides a means of automatically enabling the IWDG timer at power on (with counter value 0xFFF). If the relevant bit is not set, the IWDG timer must be enabled by software. @note: Tested: CPU STM32F103RET6, Board ET-ARM Stamp STM32 */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #define LSI_FREQUENCY 32000 #define COUNT_LENGTH 12 #define COUNT_MASK ((1 << COUNT_LENGTH)-1) /*---------------------------------------------------------------------------*/ /** @brief IWDG Enable Watchdog Timer The watchdog timer is started. The timeout period defaults to 512 milliseconds unless it has been previously defined. */ void iwdg_start(void) { IWDG_KR = IWDG_KR_START; } /*---------------------------------------------------------------------------*/ /** @brief IWDG Set Period in Milliseconds The countdown period is converted into count and prescale values. The maximum period is 32.76 seconds; values above this are truncated. Periods less than 1ms are not supported by this library. A delay of up to 5 clock cycles of the LSI clock (about 156 microseconds) can occasionally occur if the prescale or preload registers are currently busy loading a previous value. @param[in] period uint32_t Period in milliseconds (< 32760) from a watchdog reset until a system reset is issued. */ void iwdg_set_period_ms(uint32_t period) { uint32_t count, prescale, reload, exponent; /* Set the count to represent ticks of the 32kHz LSI clock */ count = (period << 5); /* Strip off the first 12 bits to get the prescale value required */ prescale = (count >> 12); if (prescale > 256) { exponent = IWDG_PR_DIV256; reload = COUNT_MASK; } else if (prescale > 128) { exponent = IWDG_PR_DIV256; reload = (count >> 8); } else if (prescale > 64) { exponent = IWDG_PR_DIV128; reload = (count >> 7); } else if (prescale > 32) { exponent = IWDG_PR_DIV64; reload = (count >> 6); } else if (prescale > 16) { exponent = IWDG_PR_DIV32; reload = (count >> 5); } else if (prescale > 8) { exponent = IWDG_PR_DIV16; reload = (count >> 4); } else if (prescale > 4) { exponent = IWDG_PR_DIV8; reload = (count >> 3); } else { exponent = IWDG_PR_DIV4; reload = (count >> 2); } /* Avoid the undefined situation of a zero count */ if (count == 0) { count = 1; } while (iwdg_prescaler_busy()); IWDG_KR = IWDG_KR_UNLOCK; IWDG_PR = exponent; while (iwdg_reload_busy()); IWDG_KR = IWDG_KR_UNLOCK; IWDG_RLR = (reload & COUNT_MASK); } /*---------------------------------------------------------------------------*/ /** @brief IWDG Get Reload Register Status @returns boolean: TRUE if the reload register is busy and unavailable for loading a new count value. */ bool iwdg_reload_busy(void) { return IWDG_SR & IWDG_SR_RVU; } /*---------------------------------------------------------------------------*/ /** @brief IWDG Get Prescaler Register Status @returns boolean: TRUE if the prescaler register is busy and unavailable for loading a new period value. */ bool iwdg_prescaler_busy(void) { return IWDG_SR & IWDG_SR_PVU; } /*---------------------------------------------------------------------------*/ /** @brief IWDG reset Watchdog Timer The watchdog timer is reset. The counter restarts from the value in the reload register. */ void iwdg_reset(void) { IWDG_KR = IWDG_KR_RESET; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/pwr_common_all.c ================================================ /** @addtogroup pwr_file PWR @author @htmlonly © @endhtmlonly 2012 Ken Sarkies */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief Disable Backup Domain Write Protection. This allows backup domain registers to be changed. These registers are write protected after a reset. */ void pwr_disable_backup_domain_write_protect(void) { PWR_CR |= PWR_CR_DBP; } /*---------------------------------------------------------------------------*/ /** @brief Re-enable Backup Domain Write Protection. This protects backup domain registers from inadvertent change. */ void pwr_enable_backup_domain_write_protect(void) { PWR_CR &= ~PWR_CR_DBP; } /*---------------------------------------------------------------------------*/ /** @brief Enable Power Voltage Detector. This provides voltage level threshold detection. The result of detection is provided in the power voltage detector output flag (see @ref pwr_voltage_high) or by setting the EXTI16 interrupt (see datasheet for configuration details). @param[in] pvd_level uint32_t. Taken from @ref pwr_pls. */ void pwr_enable_power_voltage_detect(uint32_t pvd_level) { PWR_CR &= ~PWR_CR_PLS_MASK; PWR_CR |= (PWR_CR_PVDE | pvd_level); } /*---------------------------------------------------------------------------*/ /** @brief Disable Power Voltage Detector. */ void pwr_disable_power_voltage_detect(void) { PWR_CR &= ~PWR_CR_PVDE; } /*---------------------------------------------------------------------------*/ /** @brief Clear the Standby Flag. This is set when the processor returns from a standby mode. */ void pwr_clear_standby_flag(void) { PWR_CR |= PWR_CR_CSBF; } /*---------------------------------------------------------------------------*/ /** @brief Clear the Wakeup Flag. This is set when the processor receives a wakeup signal. */ void pwr_clear_wakeup_flag(void) { PWR_CR |= PWR_CR_CWUF; } /*---------------------------------------------------------------------------*/ /** @brief Set Standby Mode in Deep Sleep. */ void pwr_set_standby_mode(void) { PWR_CR |= PWR_CR_PDDS; } /*---------------------------------------------------------------------------*/ /** @brief Set Stop Mode in Deep Sleep. */ void pwr_set_stop_mode(void) { PWR_CR &= ~PWR_CR_PDDS; } /*---------------------------------------------------------------------------*/ /** @brief Voltage Regulator On in Stop Mode. */ void pwr_voltage_regulator_on_in_stop(void) { PWR_CR &= ~PWR_CR_LPDS; } /*---------------------------------------------------------------------------*/ /** @brief Voltage Regulator Low Power in Stop Mode. */ void pwr_voltage_regulator_low_power_in_stop(void) { PWR_CR |= PWR_CR_LPDS; } /*---------------------------------------------------------------------------*/ /** @brief Enable Wakeup Pin. The wakeup pin is used for waking the processor from standby mode. */ void pwr_enable_wakeup_pin(void) { PWR_CSR |= PWR_CSR_EWUP; } /*---------------------------------------------------------------------------*/ /** @brief Release Wakeup Pin. The wakeup pin is used for general purpose I/O. */ void pwr_disable_wakeup_pin(void) { PWR_CSR &= ~PWR_CSR_EWUP; } /*---------------------------------------------------------------------------*/ /** @brief Get Voltage Detector Output. The voltage detector threshold must be set when the power voltage detector is enabled, see @ref pwr_enable_power_voltage_detect. @returns boolean: TRUE if the power voltage is above the preset voltage threshold. */ bool pwr_voltage_high(void) { return PWR_CSR & PWR_CSR_PVDO; } /*---------------------------------------------------------------------------*/ /** @brief Get Standby Flag. The standby flag is set when the processor returns from a standby state. It is cleared by software (see @ref pwr_clear_standby_flag). @returns boolean: TRUE if the processor was in standby state. */ bool pwr_get_standby_flag(void) { return PWR_CSR & PWR_CSR_SBF; } /*---------------------------------------------------------------------------*/ /** @brief Get Wakeup Flag. The wakeup flag is set when a wakeup event has been received. It is cleared by software (see @ref pwr_clear_wakeup_flag). @returns boolean: TRUE if a wakeup event was received. */ bool pwr_get_wakeup_flag(void) { return PWR_CSR & PWR_CSR_WUF; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/rtc_common_l1f024.c ================================================ /** @addtogroup rtc_file @author @htmlonly © @endhtmlonly 2012 Karl Palsson */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief Set RTC prescalars. This sets the RTC synchronous and asynchronous prescalars. */ void rtc_set_prescaler(uint32_t sync, uint32_t async) { /* * Even if only one of the two fields needs to be changed, * 2 separate write accesses must be performed to the RTC_PRER register. */ RTC_PRER = (sync & RTC_PRER_PREDIV_S_MASK); RTC_PRER |= (async << RTC_PRER_PREDIV_A_SHIFT); } /*---------------------------------------------------------------------------*/ /** @brief Wait for RTC registers to be synchronised with the APB1 bus Time and Date are accessed through shadow registers which must be synchronized */ void rtc_wait_for_synchro(void) { /* Unlock RTC registers */ RTC_WPR = 0xca; RTC_WPR = 0x53; RTC_ISR &= ~(RTC_ISR_RSF); while (!(RTC_ISR & RTC_ISR_RSF)); /* disable write protection again */ RTC_WPR = 0xff; } /*---------------------------------------------------------------------------*/ /** @brief Unlock write access to the RTC registers */ void rtc_unlock(void) { RTC_WPR = 0xca; RTC_WPR = 0x53; } /*---------------------------------------------------------------------------*/ /** @brief Lock write access to the RTC registers */ void rtc_lock(void) { RTC_WPR = 0xff; } /*---------------------------------------------------------------------------*/ /** @brief Sets the wakeup time auto-reload value */ void rtc_set_wakeup_time(uint16_t wkup_time, uint8_t rtc_cr_wucksel) { /* FTFM: * The following sequence is required to configure or change the wakeup * timer auto-reload value (WUT[15:0] in RTC_WUTR): * 1. Clear WUTE in RTC_CR to disable the wakeup timer. */ RTC_CR &= ~RTC_CR_WUTE; /* 2. Poll WUTWF until it is set in RTC_ISR to make sure the access to * wakeup auto-reload counter and to WUCKSEL[2:0] bits is allowed. * It takes around 2 RTCCLK clock cycles (due to clock * synchronization). */ while (!((RTC_ISR) & (RTC_ISR_WUTWF))); /* 3. Program the wakeup auto-reload value WUT[15:0], and the wakeup * clock selection (WUCKSEL[2:0] bits in RTC_CR).Set WUTE in RTC_CR * to enable the timer again. The wakeup timer restarts * down-counting. */ RTC_WUTR = wkup_time; RTC_CR |= (rtc_cr_wucksel << RTC_CR_WUCLKSEL_SHIFT); RTC_CR |= RTC_CR_WUTE; } /*---------------------------------------------------------------------------*/ /** @brief Clears the wakeup flag @details This function should be called first in the rtc_wkup_isr() */ void rtc_clear_wakeup_flag(void) { RTC_ISR &= ~RTC_ISR_WUTF; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/spi_common_all.c ================================================ /** @addtogroup spi_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2012 Ken Sarkies Devices can have up to three SPI peripherals. The common 4-wire full-duplex mode of operation is supported, along with 3-wire variants using unidirectional communication modes or half-duplex bidirectional communication. A variety of options allows many of the SPI variants to be supported. Multimaster operation is also supported. A CRC can be generated and checked in hardware. @note Some JTAG pins need to be remapped if SPI is to be used. @note The I2S protocol shares the SPI hardware so the two protocols cannot be used at the same time on the same peripheral. Example: 1Mbps, positive clock polarity, leading edge trigger, 8-bit words, LSB first. @code spi_init_master(SPI1, 1000000, SPI_CR1_CPOL_CLK_TO_0_WHEN_IDLE, SPI_CR1_CPHA_CLK_TRANSITION_1, SPI_CR1_DFF_8BIT, SPI_CR1_LSBFIRST); spi_write(SPI1, 0x55); // 8-bit write spi_write(SPI1, 0xaa88); // 16-bit write reg8 = spi_read(SPI1); // 8-bit read reg16 = spi_read(SPI1); // 16-bit read @endcode @todo need additional functions to aid ISRs in retrieving status */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /* * SPI and I2S code. * * Examples: * spi_init_master(SPI1, 1000000, SPI_CR1_CPOL_CLK_TO_0_WHEN_IDLE, * SPI_CR1_CPHA_CLK_TRANSITION_1, SPI_CR1_DFF_8BIT, * SPI_CR1_LSBFIRST); * spi_write(SPI1, 0x55); // 8-bit write * spi_write(SPI1, 0xaa88); // 16-bit write * reg8 = spi_read(SPI1); // 8-bit read * reg16 = spi_read(SPI1); // 16-bit read */ /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief SPI Reset. The SPI peripheral and all its associated configuration registers are placed in the reset condition. The reset is effected via the RCC peripheral reset system. @param[in] spi_peripheral Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_reset(uint32_t spi_peripheral) { /* there is another way of resetting mechanism on F0. It will be extended to all families of stm32 and this function will be deprecated and deleted in the future.*/ #if !defined(STM32F0) switch (spi_peripheral) { case SPI1: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_SPI1RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_SPI1RST); break; case SPI2: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_SPI2RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_SPI2RST); break; #if defined(STM32F1) || defined(STM32F2) || defined(STM32F3) || defined(STM32F4) case SPI3: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_SPI3RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_SPI3RST); break; #endif } #endif } /* TODO: Error handling? */ /*---------------------------------------------------------------------------*/ /** @brief SPI Enable. The SPI peripheral is enabled. @todo Error handling? @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_SPE; /* Enable SPI. */ } /* TODO: Error handling? */ /*---------------------------------------------------------------------------*/ /** @brief SPI Disable. The SPI peripheral is disabled. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable(uint32_t spi) { uint32_t reg32; reg32 = SPI_CR1(spi); reg32 &= ~(SPI_CR1_SPE); /* Disable SPI. */ SPI_CR1(spi) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief SPI Clean Disable. Disable the SPI peripheral according to the procedure in section 23.3.8 of the reference manual. This prevents corruption of any ongoing transfers and prevents the BSY flag from becoming unreliable. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @returns data Unsigned int16. 8 or 16 bit data from final read. */ uint16_t spi_clean_disable(uint32_t spi) { /* Wait to receive last data */ while (!(SPI_SR(spi) & SPI_SR_RXNE)); uint16_t data = SPI_DR(spi); /* Wait to transmit last data */ while (!(SPI_SR(spi) & SPI_SR_TXE)); /* Wait until not busy */ while (SPI_SR(spi) & SPI_SR_BSY); SPI_CR1(spi) &= ~SPI_CR1_SPE; return data; } /*---------------------------------------------------------------------------*/ /** @brief SPI Data Write. Data is written to the SPI interface. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @param[in] data Unsigned int16. 8 or 16 bit data to be written. */ void spi_write(uint32_t spi, uint16_t data) { /* Write data (8 or 16 bits, depending on DFF) into DR. */ SPI_DR(spi) = data; } /*---------------------------------------------------------------------------*/ /** @brief SPI Data Write with Blocking. Data is written to the SPI interface after the previous write transfer has finished. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @param[in] data Unsigned int16. 8 or 16 bit data to be written. */ void spi_send(uint32_t spi, uint16_t data) { /* Wait for transfer finished. */ while (!(SPI_SR(spi) & SPI_SR_TXE)); /* Write data (8 or 16 bits, depending on DFF) into DR. */ SPI_DR(spi) = data; } /*---------------------------------------------------------------------------*/ /** @brief SPI Data Read. Data is read from the SPI interface after the incoming transfer has finished. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @returns data Unsigned int16. 8 or 16 bit data. */ uint16_t spi_read(uint32_t spi) { /* Wait for transfer finished. */ while (!(SPI_SR(spi) & SPI_SR_RXNE)); /* Read the data (8 or 16 bits, depending on DFF bit) from DR. */ return SPI_DR(spi); } /*---------------------------------------------------------------------------*/ /** @brief SPI Data Write and Read Exchange. Data is written to the SPI interface, then a read is done after the incoming transfer has finished. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @param[in] data Unsigned int16. 8 or 16 bit data to be written. @returns data Unsigned int16. 8 or 16 bit data. */ uint16_t spi_xfer(uint32_t spi, uint16_t data) { spi_write(spi, data); /* Wait for transfer finished. */ while (!(SPI_SR(spi) & SPI_SR_RXNE)); /* Read the data (8 or 16 bits, depending on DFF bit) from DR. */ return SPI_DR(spi); } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Bidirectional Simplex Mode. The SPI peripheral is set for bidirectional transfers in two-wire simplex mode (using a clock wire and a bidirectional data wire). @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_bidirectional_mode(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_BIDIMODE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Unidirectional Mode. The SPI peripheral is set for unidirectional transfers. This is used in full duplex mode or when the SPI is placed in two-wire simplex mode that uses a clock wire and a unidirectional data wire. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_unidirectional_mode(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_BIDIMODE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Bidirectional Simplex Receive Only Mode. The SPI peripheral is set for bidirectional transfers in two-wire simplex mode (using a clock wire and a bidirectional data wire), and is placed in a receive state. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_bidirectional_receive_only_mode(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_BIDIMODE; SPI_CR1(spi) &= ~SPI_CR1_BIDIOE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Bidirectional Simplex Receive Only Mode. The SPI peripheral is set for bidirectional transfers in two-wire simplex mode (using a clock wire and a bidirectional data wire), and is placed in a transmit state. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_bidirectional_transmit_only_mode(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_BIDIMODE; SPI_CR1(spi) |= SPI_CR1_BIDIOE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable the CRC. The SPI peripheral is set to use a CRC field for transmit and receive. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_crc(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_CRCEN; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable the CRC. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_crc(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_CRCEN; } /*---------------------------------------------------------------------------*/ /** @brief SPI Next Transmit is a Data Word The next transmission to take place is a data word from the transmit buffer. This must be called before transmission to distinguish between sending of a data or CRC word. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_next_tx_from_buffer(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_CRCNEXT; } /*---------------------------------------------------------------------------*/ /** @brief SPI Next Transmit is a CRC Word The next transmission to take place is a crc word from the hardware crc unit. This must be called before transmission to distinguish between sending of a data or CRC word. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_next_tx_from_crc(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_CRCNEXT; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Full Duplex (3-wire) Mode @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_full_duplex_mode(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_RXONLY; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Receive Only Mode for Simplex (2-wire) Unidirectional Transfers @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_receive_only_mode(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_RXONLY; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable Slave Management by Hardware In slave mode the NSS hardware input is used as a select enable for the slave. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_software_slave_management(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_SSM; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable Slave Management by Software In slave mode the NSS hardware input is replaced by an internal software enable/disable of the slave (@ref spi_set_nss_high). @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_software_slave_management(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_SSM; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Software NSS Signal High In slave mode, and only when software slave management is used, this replaces the NSS signal with a slave select enable signal. @todo these should perhaps be combined with an SSM enable as it is meaningless otherwise @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_nss_high(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_SSI; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Software NSS Signal Low In slave mode, and only when software slave management is used, this replaces the NSS signal with a slave select disable signal. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_nss_low(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_SSI; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set to Send LSB First @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_send_lsb_first(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_LSBFIRST; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set to Send MSB First @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_send_msb_first(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_LSBFIRST; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Baudrate Prescaler @todo Why is this specification different to the spi_init_master baudrate values? @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @param[in] baudrate Unsigned int8. Baudrate prescale value @ref spi_br_pre. */ void spi_set_baudrate_prescaler(uint32_t spi, uint8_t baudrate) { uint32_t reg32; if (baudrate > 7) { return; } reg32 = (SPI_CR1(spi) & 0xffc7); /* Clear bits [5:3]. */ reg32 |= (baudrate << 3); SPI_CR1(spi) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set to Master Mode @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_master_mode(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_MSTR; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set to Slave Mode @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_slave_mode(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_MSTR; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Clock Polarity to High when Idle @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_clock_polarity_1(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_CPOL; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Clock Polarity to Low when Idle @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_clock_polarity_0(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_CPOL; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Clock Phase to Capture on Trailing Edge @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_clock_phase_1(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_CPHA; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the Clock Phase to Capture on Leading Edge @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_clock_phase_0(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_CPHA; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable the Transmit Buffer Empty Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_tx_buffer_empty_interrupt(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable the Transmit Buffer Empty Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_tx_buffer_empty_interrupt(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable the Receive Buffer Ready Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_rx_buffer_not_empty_interrupt(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable the Receive Buffer Ready Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_rx_buffer_not_empty_interrupt(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable the Error Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_error_interrupt(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_ERRIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable the Error Interrupt @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_error_interrupt(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_ERRIE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the NSS Pin as an Output Normally used in master mode to allows the master to place all devices on the SPI bus into slave mode. Multimaster mode is not possible. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_ss_output(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_SSOE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set the NSS Pin as an Input In master mode this allows the master to sense the presence of other masters. If NSS is then pulled low the master is placed into slave mode. In slave mode NSS becomes a slave enable. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_ss_output(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_SSOE; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable Transmit Transfers via DMA This allows transmissions to proceed unattended using DMA to move data to the transmit buffer as it becomes available. The DMA channels provided for each SPI peripheral are given in the Technical Manual DMA section. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_tx_dma(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_TXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable Transmit Transfers via DMA @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_tx_dma(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_TXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief SPI Enable Receive Transfers via DMA This allows received data streams to proceed unattended using DMA to move data from the receive buffer as data becomes available. The DMA channels provided for each SPI peripheral are given in the Technical Manual DMA section. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_enable_rx_dma(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_RXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief SPI Disable Receive Transfers via DMA @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_disable_rx_dma(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_RXDMAEN; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/spi_common_f124.c ================================================ /** @addtogroup spi_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2012 Ken Sarkies Devices can have up to three SPI peripherals. The common 4-wire full-duplex mode of operation is supported, along with 3-wire variants using unidirectional communication modes or half-duplex bidirectional communication. A variety of options allows many of the SPI variants to be supported. Multimaster operation is also supported. A CRC can be generated and checked in hardware. @note Some JTAG pins need to be remapped if SPI is to be used. @note The I2S protocol shares the SPI hardware so the two protocols cannot be used at the same time on the same peripheral. Example: 1Mbps, positive clock polarity, leading edge trigger, 8-bit words, LSB first. @code spi_init_master(SPI1, 1000000, SPI_CR1_CPOL_CLK_TO_0_WHEN_IDLE, SPI_CR1_CPHA_CLK_TRANSITION_1, SPI_CR1_DFF_8BIT, SPI_CR1_LSBFIRST); spi_write(SPI1, 0x55); // 8-bit write spi_write(SPI1, 0xaa88); // 16-bit write reg8 = spi_read(SPI1); // 8-bit read reg16 = spi_read(SPI1); // 16-bit read @endcode @todo need additional functions to aid ISRs in retrieving status */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /* * SPI and I2S code. * * Examples: * spi_init_master(SPI1, 1000000, SPI_CR1_CPOL_CLK_TO_0_WHEN_IDLE, * SPI_CR1_CPHA_CLK_TRANSITION_1, SPI_CR1_DFF_8BIT, * SPI_CR1_LSBFIRST); * spi_write(SPI1, 0x55); // 8-bit write * spi_write(SPI1, 0xaa88); // 16-bit write * reg8 = spi_read(SPI1); // 8-bit read * reg16 = spi_read(SPI1); // 16-bit read */ /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief Configure the SPI as Master. The SPI peripheral is configured as a master with communication parameters baudrate, data format 8/16 bits, frame format lsb/msb first, clock polarity and phase. The SPI enable, CRC enable and CRC next controls are not affected. These must be controlled separately. @todo NSS pin handling. @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. @param[in] br Unsigned int32. Baudrate @ref spi_baudrate. @param[in] cpol Unsigned int32. Clock polarity @ref spi_cpol. @param[in] cpha Unsigned int32. Clock Phase @ref spi_cpha. @param[in] dff Unsigned int32. Data frame format 8/16 bits @ref spi_dff. @param[in] lsbfirst Unsigned int32. Frame format lsb/msb first @ref spi_lsbfirst. @returns int. Error code. */ int spi_init_master(uint32_t spi, uint32_t br, uint32_t cpol, uint32_t cpha, uint32_t dff, uint32_t lsbfirst) { uint32_t reg32 = SPI_CR1(spi); /* Reset all bits omitting SPE, CRCEN and CRCNEXT bits. */ reg32 &= SPI_CR1_SPE | SPI_CR1_CRCEN | SPI_CR1_CRCNEXT; reg32 |= SPI_CR1_MSTR; /* Configure SPI as master. */ reg32 |= br; /* Set baud rate bits. */ reg32 |= cpol; /* Set CPOL value. */ reg32 |= cpha; /* Set CPHA value. */ reg32 |= dff; /* Set data format (8 or 16 bits). */ reg32 |= lsbfirst; /* Set frame format (LSB- or MSB-first). */ /* TODO: NSS pin handling. */ SPI_CR1(spi) = reg32; return 0; /* TODO */ } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Data Frame Format to 8 bits @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_dff_8bit(uint32_t spi) { SPI_CR1(spi) &= ~SPI_CR1_DFF; } /*---------------------------------------------------------------------------*/ /** @brief SPI Set Data Frame Format to 16 bits @param[in] spi Unsigned int32. SPI peripheral identifier @ref spi_reg_base. */ void spi_set_dff_16bit(uint32_t spi) { SPI_CR1(spi) |= SPI_CR1_DFF; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/timer_common_all.c ================================================ /** @addtogroup timer_file @author @htmlonly © @endhtmlonly 2010 Edward Cheeseman @author @htmlonly © @endhtmlonly 2011 Stephen Caudle @section tim_common Notes for All Timers This library supports the General Purpose and Advanced Control Timers for the STM32 series of ARM Cortex Microcontrollers by ST Microelectronics. The STM32 series have four general purpose timers (2-5), while some have an additional two advanced timers (1,8), and some have two basic timers (6,7). Some of the larger devices have additional general purpose timers (9-14). @todo Add timer DMA burst settings @section tim_api_ex Basic TIMER handling API. Enable the timer clock first. The timer mode sets the clock division ratio, the count alignment (edge or centred) and count direction. Finally enable the timer. The timer output compare block produces a signal that can be configured for output to a pin or passed to other peripherals for use as a trigger. In all cases the output compare mode must be set to define how the output responds to a compare match, and the output must be enabled. If output to a pin is required, enable the appropriate GPIO clock and set the pin to alternate output mode. Example: Timer 2 with 2x clock divide, edge aligned and up counting. @code rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_TIM2EN); timer_reset(TIM2); timer_set_mode(TIM2, TIM_CR1_CKD_CK_INT_MUL_2, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP); ... timer_set_period(TIM2, 1000); timer_enable_counter(TIM2); @endcode Example: Timer 1 with PWM output, no clock divide and centre alignment. Set the Output Compare mode to PWM and enable the output of channel 1. Note that for the advanced timers the break functionality must be enabled before the signal will appear at the output, even though break is not being used. This is in addition to the normal output enable. Enable the alternate function clock (APB2 only) and port A clock. Set ports A8 and A9 (timer 1 channel 1 compare outputs) to alternate function push-pull outputs where the PWM output will appear. @code rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN | RCC_APB2ENR_AFIOEN); gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO8 | GPIO9); rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_TIM1EN); timer_reset(TIM1); timer_set_mode(TIM1, TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_CENTER_1, TIM_CR1_DIR_UP); timer_set_oc_mode(TIM1, TIM_OC1, TIM_OCM_PWM2); timer_enable_oc_output(TIM1, TIM_OC1); timer_enable_break_main_output(TIM1); timer_set_oc_value(TIM1, TIM_OC1, 200); timer_set_period(TIM1, 1000); timer_enable_counter(TIM1); @endcode @todo input capture example */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * Basic TIMER handling API. * * Examples: * timer_set_mode(TIM1, TIM_CR1_CKD_CK_INT_MUL_2, * TIM_CR1_CMS_CENTRE_3, TIM_CR1_DIR_UP); */ /**@{*/ #include #include #define ADVANCED_TIMERS (defined(TIM1_BASE) || defined(TIM8_BASE)) /*---------------------------------------------------------------------------*/ /** @brief Reset a Timer. The counter and all its associated configuration registers are placed in the reset condition. The reset is effected via the RCC peripheral reset system. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base (TIM9 .. TIM14 not yet supported here). */ void timer_reset(uint32_t timer_peripheral) { switch (timer_peripheral) { #if defined(TIM1_BASE) case TIM1: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM1RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM1RST); break; #endif case TIM2: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM2RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM2RST); break; case TIM3: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM3RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM3RST); break; case TIM4: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM4RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM4RST); break; #if defined(TIM5_BASE) case TIM5: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM5RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM5RST); break; #endif case TIM6: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM6RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM6RST); break; case TIM7: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM7RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM7RST); break; #if defined(TIM8_BASE) case TIM8: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM8RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM8RST); break; #endif /* These timers are not supported in libopencm3 yet */ /* case TIM9: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM9RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM9RST); break; case TIM10: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM10RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM10RST); break; case TIM11: rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM11RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM11RST); break; case TIM12: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM12RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM12RST); break; case TIM13: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM13RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM13RST); break; case TIM14: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM14RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_TIM14RST); break; */ } } /*---------------------------------------------------------------------------*/ /** @brief Enable Interrupts for a Timer @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] irq Unsigned int32. @ref tim_irq_enable. Logical OR of all interrupt enable bits to be set */ void timer_enable_irq(uint32_t timer_peripheral, uint32_t irq) { TIM_DIER(timer_peripheral) |= irq; } /*---------------------------------------------------------------------------*/ /** @brief Disable Interrupts for a Timer. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] irq Unsigned int32. @ref tim_irq_enable. Logical OR of all interrupt enable bits to be cleared */ void timer_disable_irq(uint32_t timer_peripheral, uint32_t irq) { TIM_DIER(timer_peripheral) &= ~irq; } /*---------------------------------------------------------------------------*/ /** @brief Return Interrupt Source. Returns true if the specified interrupt flag (UIF, TIF or CCxIF, with BIF or COMIF for advanced timers) was set and the interrupt was enabled. If the specified flag is not an interrupt flag, the function returns false. @todo Timers 6-7, 9-14 have fewer interrupts, but invalid flags are not caught here. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] flag Unsigned int32. Status register flag @ref tim_sr_values. @returns boolean: flag set. */ bool timer_interrupt_source(uint32_t timer_peripheral, uint32_t flag) { /* flag not set or interrupt disabled or not an interrupt source */ if (((TIM_SR(timer_peripheral) & TIM_DIER(timer_peripheral) & flag) == 0) || (flag > TIM_SR_BIF)) { return false; } /* Only an interrupt source for advanced timers */ #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((flag == TIM_SR_BIF) || (flag == TIM_SR_COMIF)) { return (timer_peripheral == TIM1) || (timer_peripheral == TIM8); } #endif return true; } /*---------------------------------------------------------------------------*/ /** @brief Read a Status Flag. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] flag Unsigned int32. Status register flag @ref tim_sr_values. @returns boolean: flag set. */ bool timer_get_flag(uint32_t timer_peripheral, uint32_t flag) { if ((TIM_SR(timer_peripheral) & flag) != 0) { return true; } return false; } /*---------------------------------------------------------------------------*/ /** @brief Clear a Status Flag. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] flag Unsigned int32. @ref tim_sr_values. Status register flag. */ void timer_clear_flag(uint32_t timer_peripheral, uint32_t flag) { TIM_SR(timer_peripheral) &= ~flag; } /*---------------------------------------------------------------------------*/ /** @brief Set the Timer Mode. The modes are: @li Clock divider ratio (to form the sampling clock for the input filters, and the dead-time clock in the advanced timers 1 and 8) @li Edge/centre alignment @li Count direction The alignment and count direction are effective only for timers 1 to 5 and 8 while the clock divider ratio is effective for all timers except 6,7 The remaining timers are limited hardware timers which do not support these mode settings. @note: When center alignment mode is selected, count direction is controlled by hardware and cannot be written. The count direction setting has no effect in this case. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base (TIM1, TIM2 ... TIM5, TIM8) @param[in] clock_div Unsigned int32. Clock Divider Ratio in bits 8,9: @ref tim_x_cr1_cdr @param[in] alignment Unsigned int32. Alignment bits in 5,6: @ref tim_x_cr1_cms @param[in] direction Unsigned int32. Count direction in bit 4,: @ref tim_x_cr1_dir */ void timer_set_mode(uint32_t timer_peripheral, uint32_t clock_div, uint32_t alignment, uint32_t direction) { uint32_t cr1; cr1 = TIM_CR1(timer_peripheral); cr1 &= ~(TIM_CR1_CKD_CK_INT_MASK | TIM_CR1_CMS_MASK | TIM_CR1_DIR_DOWN); cr1 |= clock_div | alignment | direction; TIM_CR1(timer_peripheral) = cr1; } /*---------------------------------------------------------------------------*/ /** @brief Set Input Filter and Dead-time Clock Divider Ratio. This forms the sampling clock for the input filters and the dead-time clock in the advanced timers 1 and 8, by division from the timer clock. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] clock_div Unsigned int32. Clock Divider Ratio in bits 8,9: @ref tim_x_cr1_cdr */ void timer_set_clock_division(uint32_t timer_peripheral, uint32_t clock_div) { clock_div &= TIM_CR1_CKD_CK_INT_MASK; TIM_CR1(timer_peripheral) &= ~TIM_CR1_CKD_CK_INT_MASK; TIM_CR1(timer_peripheral) |= clock_div; } /*---------------------------------------------------------------------------*/ /** @brief Enable Auto-Reload Buffering. During counter operation this causes the counter to be loaded from its auto-reload register only at the next update event. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_enable_preload(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_ARPE; } /*---------------------------------------------------------------------------*/ /** @brief Disable Auto-Reload Buffering. This causes the counter to be loaded immediately with a new count value when the auto-reload register is written, so that the new value becomes effective for the current count cycle rather than for the cycle following an update event. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_disable_preload(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_ARPE; } /*---------------------------------------------------------------------------*/ /** @brief Specify the counter alignment mode. The mode can be edge aligned or centered. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] alignment Unsigned int32. Alignment bits in 5,6: @ref tim_x_cr1_cms */ void timer_set_alignment(uint32_t timer_peripheral, uint32_t alignment) { alignment &= TIM_CR1_CMS_MASK; TIM_CR1(timer_peripheral) &= ~TIM_CR1_CMS_MASK; TIM_CR1(timer_peripheral) |= alignment; } /*---------------------------------------------------------------------------*/ /** @brief Set the Timer to Count Up. This has no effect if the timer is set to center aligned. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_direction_up(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_DIR_DOWN; } /*---------------------------------------------------------------------------*/ /** @brief Set the Timer to Count Down. This has no effect if the timer is set to center aligned. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_direction_down(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_DIR_DOWN; } /*---------------------------------------------------------------------------*/ /** @brief Enable the Timer for One Cycle and Stop. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_one_shot_mode(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_OPM; } /*---------------------------------------------------------------------------*/ /** @brief Enable the Timer to Run Continuously. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_continuous_mode(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_OPM; } /*---------------------------------------------------------------------------*/ /** @brief Set the Timer to Generate Update IRQ or DMA on any Event. The events which will generate an interrupt or DMA request can be @li a counter underflow/overflow, @li a forced update, @li an event from the slave mode controller. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_update_on_any(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_URS; } /*---------------------------------------------------------------------------*/ /** @brief Set the Timer to Generate Update IRQ or DMA only from Under/Overflow Events. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_update_on_overflow(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_URS; } /*---------------------------------------------------------------------------*/ /** @brief Enable Timer Update Events. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_enable_update_event(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_UDIS; } /*---------------------------------------------------------------------------*/ /** @brief Disable Timer Update Events. Update events are not generated and the shadow registers keep their values. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_disable_update_event(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_UDIS; } /*---------------------------------------------------------------------------*/ /** @brief Enable the timer to start counting. This should be called after the timer initial configuration has been completed. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_enable_counter(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) |= TIM_CR1_CEN; } /*---------------------------------------------------------------------------*/ /** @brief Stop the timer from counting. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_disable_counter(uint32_t timer_peripheral) { TIM_CR1(timer_peripheral) &= ~TIM_CR1_CEN; } /*---------------------------------------------------------------------------*/ /** @brief Set Timer Output Idle States High. This determines the value of the timer output compare when it enters idle state. @sa @ref timer_set_oc_idle_state_set @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] outputs Unsigned int32. Timer Output Idle State Controls @ref tim_x_cr2_ois. If several settings are to be made, use the logical OR of the output control values. */ void timer_set_output_idle_state(uint32_t timer_peripheral, uint32_t outputs) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) |= outputs & TIM_CR2_OIS_MASK; } #else (void)timer_peripheral; (void)outputs; #endif } /*---------------------------------------------------------------------------*/ /** @brief Set Timer Output Idle States Low. This determines the value of the timer output compare when it enters idle state. @sa @ref timer_set_oc_idle_state_unset @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] outputs Unsigned int32. Timer Output Idle State Controls @ref tim_x_cr2_ois */ void timer_reset_output_idle_state(uint32_t timer_peripheral, uint32_t outputs) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) &= ~(outputs & TIM_CR2_OIS_MASK); } #else (void)timer_peripheral; (void)outputs; #endif } /*---------------------------------------------------------------------------*/ /** @brief Set Timer 1 Input to XOR of Three Channels. The first timer capture input is formed from the XOR of the first three timer input channels 1, 2, 3. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_set_ti1_ch123_xor(uint32_t timer_peripheral) { TIM_CR2(timer_peripheral) |= TIM_CR2_TI1S; } /*---------------------------------------------------------------------------*/ /** @brief Set Timer 1 Input to Channel 1. The first timer capture input is taken from the timer input channel 1 only. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_set_ti1_ch1(uint32_t timer_peripheral) { TIM_CR2(timer_peripheral) &= ~TIM_CR2_TI1S; } /*---------------------------------------------------------------------------*/ /** @brief Set the Master Mode This sets the Trigger Output TRGO for synchronizing with slave timers or passing as an internal trigger to the ADC or DAC. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] mode Unsigned int32. Master Mode @ref tim_mastermode */ void timer_set_master_mode(uint32_t timer_peripheral, uint32_t mode) { TIM_CR2(timer_peripheral) &= ~TIM_CR2_MMS_MASK; TIM_CR2(timer_peripheral) |= mode; } /*---------------------------------------------------------------------------*/ /** @brief Set Timer DMA Requests on Capture/Compare Events. Capture/compare events will cause DMA requests to be generated. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_set_dma_on_compare_event(uint32_t timer_peripheral) { TIM_CR2(timer_peripheral) &= ~TIM_CR2_CCDS; } /*---------------------------------------------------------------------------*/ /** @brief Set Timer DMA Requests on Update Events. Update events will cause DMA requests to be generated. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_set_dma_on_update_event(uint32_t timer_peripheral) { TIM_CR2(timer_peripheral) |= TIM_CR2_CCDS; } /*---------------------------------------------------------------------------*/ /** @brief Enable Timer Capture/Compare Control Update with Trigger. If the capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded, they are updated by software generating the COMG event (@ref timer_generate_event) or when a rising edge occurs on the trigger input TRGI. @note This setting is only valid for the advanced timer channels with complementary outputs. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_enable_compare_control_update_on_trigger(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) |= TIM_CR2_CCUS; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Timer Capture/Compare Control Update with Trigger. If the capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded, they are updated by software generating the COMG event (@ref timer_generate_event). @note This setting is only valid for the advanced timer channels with complementary outputs. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_disable_compare_control_update_on_trigger(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) &= ~TIM_CR2_CCUS; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Enable Timer Capture/Compare Control Preload. The capture/compare control bits CCxE, CCxNE and OCxM are set to be preloaded when a COM event occurs. @note This setting is only valid for the advanced timer channels with complementary outputs. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_enable_preload_complementry_enable_bits(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) |= TIM_CR2_CCPC; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Timer Capture/Compare Control Preload. The capture/compare control bits CCxE, CCxNE and OCxM preload is disabled. @note This setting is only valid for the advanced timer channels with complementary outputs. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base */ void timer_disable_preload_complementry_enable_bits(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_CR2(timer_peripheral) &= ~TIM_CR2_CCPC; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Set the Value for the Timer Prescaler. The timer clock is prescaled by the 16 bit scale value plus 1. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] value Unsigned int32. Prescaler values 0...0xFFFF. */ void timer_set_prescaler(uint32_t timer_peripheral, uint32_t value) { TIM_PSC(timer_peripheral) = value; } /*---------------------------------------------------------------------------*/ /** @brief Set the Value for the Timer Repetition Counter. A timer update event is generated only after the specified number of repeat count cycles have been completed. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] value Unsigned int32. Repetition values 0...0xFF. */ void timer_set_repetition_counter(uint32_t timer_peripheral, uint32_t value) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_RCR(timer_peripheral) = value; } #else (void)timer_peripheral; (void)value; #endif } /*---------------------------------------------------------------------------*/ /** @brief Timer Set Period Specify the timer period in the auto-reload register. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] period Unsigned int32. Period in counter clock ticks. */ void timer_set_period(uint32_t timer_peripheral, uint32_t period) { TIM_ARR(timer_peripheral) = period; } /*---------------------------------------------------------------------------*/ /** @brief Timer Enable the Output Compare Clear Function When this is enabled, the output compare signal is cleared when a high is detected on the external trigger input. This works in the output compare and PWM modes only (not forced mode). The output compare signal remains off until the next update event. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) */ void timer_enable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1CE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2CE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3CE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4CE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as oc clear enable only applies to the whole * channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Disable the Output Compare Clear Function @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) */ void timer_disable_oc_clear(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC1CE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC2CE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC3CE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC4CE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as oc clear enable only applies to the whole * channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Enable the Output Compare Fast Mode When this is enabled, the output compare signal is forced to the compare state by a trigger input, independently of the compare match. This speeds up the setting of the output compare to 3 clock cycles as opposed to at least 5 in the slow mode. This works in the PWM1 and PWM2 modes only. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) */ void timer_set_oc_fast_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1FE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2FE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3FE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4FE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as fast enable only applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Enable the Output Compare Slow Mode This disables the fast compare mode and the output compare depends on the counter and compare register values. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) */ void timer_set_oc_slow_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC1FE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC2FE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC3FE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC4FE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Set Output Compare Mode Specifies how the comparator output will respond to a compare match. The mode can be: @li Frozen - the output does not respond to a match. @li Active - the output assumes the active state on the first match. @li Inactive - the output assumes the inactive state on the first match. @li Toggle - The output switches between active and inactive states on each match. @li Force inactive. The output is forced low regardless of the compare state. @li Force active. The output is forced high regardless of the compare state. @li PWM1 - The output is active when the counter is less than the compare register contents and inactive otherwise. @li PWM2 - The output is inactive when the counter is less than the compare register contents and active otherwise. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) @param[in] oc_mode enum ::tim_oc_mode. OC mode designators. TIM_OCM_FROZEN, TIM_OCM_ACTIVE, TIM_OCM_INACTIVE, TIM_OCM_TOGGLE, TIM_OCM_FORCE_LOW, TIM_OCM_FORCE_HIGH, TIM_OCM_PWM1, TIM_OCM_PWM2 */ void timer_set_oc_mode(uint32_t timer_peripheral, enum tim_oc_id oc_id, enum tim_oc_mode oc_mode) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_CC1S_MASK; TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_CC1S_OUT; TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC1M_MASK; switch (oc_mode) { case TIM_OCM_FROZEN: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_FROZEN; break; case TIM_OCM_ACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_ACTIVE; break; case TIM_OCM_INACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_INACTIVE; break; case TIM_OCM_TOGGLE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_TOGGLE; break; case TIM_OCM_FORCE_LOW: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_FORCE_LOW; break; case TIM_OCM_FORCE_HIGH: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_FORCE_HIGH; break; case TIM_OCM_PWM1: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_PWM1; break; case TIM_OCM_PWM2: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1M_PWM2; break; } break; case TIM_OC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_CC2S_MASK; TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_CC2S_OUT; TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC2M_MASK; switch (oc_mode) { case TIM_OCM_FROZEN: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_FROZEN; break; case TIM_OCM_ACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_ACTIVE; break; case TIM_OCM_INACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_INACTIVE; break; case TIM_OCM_TOGGLE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_TOGGLE; break; case TIM_OCM_FORCE_LOW: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_FORCE_LOW; break; case TIM_OCM_FORCE_HIGH: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_FORCE_HIGH; break; case TIM_OCM_PWM1: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_PWM1; break; case TIM_OCM_PWM2: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2M_PWM2; break; } break; case TIM_OC3: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR2_CC3S_MASK; TIM_CCMR1(timer_peripheral) |= TIM_CCMR2_CC3S_OUT; TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC3M_MASK; switch (oc_mode) { case TIM_OCM_FROZEN: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_FROZEN; break; case TIM_OCM_ACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR2_OC3M_ACTIVE; break; case TIM_OCM_INACTIVE: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_INACTIVE; break; case TIM_OCM_TOGGLE: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_TOGGLE; break; case TIM_OCM_FORCE_LOW: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_FORCE_LOW; break; case TIM_OCM_FORCE_HIGH: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_FORCE_HIGH; break; case TIM_OCM_PWM1: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_PWM1; break; case TIM_OCM_PWM2: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3M_PWM2; break; } break; case TIM_OC4: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR2_CC4S_MASK; TIM_CCMR1(timer_peripheral) |= TIM_CCMR2_CC4S_OUT; TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC4M_MASK; switch (oc_mode) { case TIM_OCM_FROZEN: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_FROZEN; break; case TIM_OCM_ACTIVE: TIM_CCMR1(timer_peripheral) |= TIM_CCMR2_OC4M_ACTIVE; break; case TIM_OCM_INACTIVE: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_INACTIVE; break; case TIM_OCM_TOGGLE: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_TOGGLE; break; case TIM_OCM_FORCE_LOW: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_FORCE_LOW; break; case TIM_OCM_FORCE_HIGH: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_FORCE_HIGH; break; case TIM_OCM_PWM1: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_PWM1; break; case TIM_OCM_PWM2: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4M_PWM2; break; } break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Enable the Output Compare Preload Register @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) */ void timer_enable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC1PE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) |= TIM_CCMR1_OC2PE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC3PE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) |= TIM_CCMR2_OC4PE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Disable the Output Compare Preload Register @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action) */ void timer_disable_oc_preload(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC1PE; break; case TIM_OC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_OC2PE; break; case TIM_OC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC3PE; break; case TIM_OC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_OC4PE; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Set the Output Polarity High The polarity of the channel output is set active high. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_set_oc_polarity_high(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC1P; break; case TIM_OC2: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC2P; break; case TIM_OC3: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC3P; break; case TIM_OC4: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC4P; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to TIM1 and TIM8 only. */ break; } /* Acting for TIM1 and TIM8 only from here onwards. */ #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } #else return; #endif switch (oc_id) { case TIM_OC1N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC1NP; break; case TIM_OC2N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC2NP; break; case TIM_OC3N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC3NP; break; case TIM_OC1: case TIM_OC2: case TIM_OC3: case TIM_OC4: /* Ignoring as this option was already set above. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Set the Output Polarity Low The polarity of the channel output is set active low. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_set_oc_polarity_low(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCER(timer_peripheral) |= TIM_CCER_CC1P; break; case TIM_OC2: TIM_CCER(timer_peripheral) |= TIM_CCER_CC2P; break; case TIM_OC3: TIM_CCER(timer_peripheral) |= TIM_CCER_CC3P; break; case TIM_OC4: TIM_CCER(timer_peripheral) |= TIM_CCER_CC4P; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to TIM1 and TIM8 only. */ break; } /* Acting for TIM1 and TIM8 only from here onwards. */ #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } #else return; #endif switch (oc_id) { case TIM_OC1N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC1NP; break; case TIM_OC2N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC2NP; break; case TIM_OC3N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC3NP; break; case TIM_OC1: case TIM_OC2: case TIM_OC3: case TIM_OC4: /* Ignoring as this option was already set above. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Enable the Output Compare The channel output compare functionality is enabled. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_enable_oc_output(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCER(timer_peripheral) |= TIM_CCER_CC1E; break; case TIM_OC2: TIM_CCER(timer_peripheral) |= TIM_CCER_CC2E; break; case TIM_OC3: TIM_CCER(timer_peripheral) |= TIM_CCER_CC3E; break; case TIM_OC4: TIM_CCER(timer_peripheral) |= TIM_CCER_CC4E; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to TIM1 and TIM8 only. */ break; } /* Acting for TIM1 and TIM8 only from here onwards. */ #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } #else return; #endif switch (oc_id) { case TIM_OC1N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC1NE; break; case TIM_OC2N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC2NE; break; case TIM_OC3N: TIM_CCER(timer_peripheral) |= TIM_CCER_CC3NE; break; case TIM_OC1: case TIM_OC2: case TIM_OC3: case TIM_OC4: /* Ignoring as this option was already set above. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer Disable the Output Compare The channel output compare functionality is disabled. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_disable_oc_output(uint32_t timer_peripheral, enum tim_oc_id oc_id) { switch (oc_id) { case TIM_OC1: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC1E; break; case TIM_OC2: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC2E; break; case TIM_OC3: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC3E; break; case TIM_OC4: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC4E; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to TIM1 and TIM8 only. */ break; } /* Acting for TIM1 and TIM8 only from here onwards. */ #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } #else return; #endif switch (oc_id) { case TIM_OC1N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC1NE; break; case TIM_OC2N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC2NE; break; case TIM_OC3N: TIM_CCER(timer_peripheral) &= ~TIM_CCER_CC3NE; break; case TIM_OC1: case TIM_OC2: case TIM_OC3: case TIM_OC4: /* Ignoring as this option was already set above. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Timer set Output Compare Idle State High @sa Similar function suitable for multiple OC idle state settings @ref timer_set_output_idle_state @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_set_oc_idle_state_set(uint32_t timer_peripheral, enum tim_oc_id oc_id) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) /* Acting for TIM1 and TIM8 only. */ if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } switch (oc_id) { case TIM_OC1: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS1; break; case TIM_OC1N: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS1N; break; case TIM_OC2: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS2; break; case TIM_OC2N: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS2N; break; case TIM_OC3: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS3; break; case TIM_OC3N: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS3N; break; case TIM_OC4: TIM_CR2(timer_peripheral) |= TIM_CR2_OIS4; break; } #else (void)timer_peripheral; (void)oc_id; #endif } /*---------------------------------------------------------------------------*/ /** @brief Timer Set Output Compare Idle State Low @sa Similar function suitable for multiple OC idle state settings @ref timer_reset_output_idle_state @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (only for advanced timers 1 and 8) */ void timer_set_oc_idle_state_unset(uint32_t timer_peripheral, enum tim_oc_id oc_id) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) /* Acting for TIM1 and TIM8 only. */ if ((timer_peripheral != TIM1) && (timer_peripheral != TIM8)) { return; } switch (oc_id) { case TIM_OC1: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS1; break; case TIM_OC1N: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS1N; break; case TIM_OC2: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS2; break; case TIM_OC2N: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS2N; break; case TIM_OC3: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS3; break; case TIM_OC3N: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS3N; break; case TIM_OC4: TIM_CR2(timer_peripheral) &= ~TIM_CR2_OIS4; break; } #else (void)timer_peripheral; (void)oc_id; #endif } /*---------------------------------------------------------------------------*/ /** @brief Timer Set Output Compare Value This is a convenience function to set the OC preload register value for loading to the compare register. @param[in] timer_peripheral Unsigned int32. Timer register address base @ref tim_reg_base (TIM9 .. TIM14 not yet supported here). @param[in] oc_id enum ::tim_oc_id OC channel designators TIM_OCx where x=1..4, TIM_OCxN where x=1..3 (no action taken) @param[in] value Unsigned int32. Compare value. */ void timer_set_oc_value(uint32_t timer_peripheral, enum tim_oc_id oc_id, uint32_t value) { switch (oc_id) { case TIM_OC1: TIM_CCR1(timer_peripheral) = value; break; case TIM_OC2: TIM_CCR2(timer_peripheral) = value; break; case TIM_OC3: TIM_CCR3(timer_peripheral) = value; break; case TIM_OC4: TIM_CCR4(timer_peripheral) = value; break; case TIM_OC1N: case TIM_OC2N: case TIM_OC3N: /* Ignoring as this option applies to the whole channel. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief Enable Output in Break Enables the output in the Break feature of an advanced timer. This does not enable the break functionality itself but only sets the Master Output Enable in the Break and Deadtime Register. @note This setting is only valid for the advanced timers. @note It is necessary to call this function to enable the output on an advanced timer even if break or deadtime features are not being used. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_enable_break_main_output(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_MOE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Output in Break Disables the output in the Break feature of an advanced timer. This clears the Master Output Enable in the Break and Deadtime Register. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_disable_break_main_output(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_MOE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Enable Automatic Output in Break Enables the automatic output feature of the Break function of an advanced timer so that the output is re-enabled at the next update event following a break event. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_enable_break_automatic_output(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_AOE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Automatic Output in Break Disables the automatic output feature of the Break function of an advanced timer so that the output is re-enabled at the next update event following a break event. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_disable_break_automatic_output(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_AOE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Activate Break when Input High Sets the break function to activate when the break input becomes high. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_break_polarity_high(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_BKP; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Activate Break when Input Low Sets the break function to activate when the break input becomes low. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_break_polarity_low(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_BKP; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Enable Break Enables the break function of an advanced timer. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_enable_break(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_BKE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Break Disables the break function of an advanced timer. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_disable_break(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_BKE; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Enable Off-State in Run Mode Enables the off-state in run mode for the break function of an advanced timer in which the complementary outputs have been configured. It has no effect if no complementary output is present. When the capture-compare output is disabled while the complementary output is enabled, the output is set to its inactive level as defined by the output polarity. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_enabled_off_state_in_run_mode(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_OSSR; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Off-State in Run Mode Disables the off-state in run mode for the break function of an advanced timer in which the complementary outputs have been configured. It has no effect if no complementary output is present. When the capture-compare output is disabled, the output is also disabled. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_disabled_off_state_in_run_mode(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_OSSR; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Enable Off-State in Idle Mode Enables the off-state in idle mode for the break function of an advanced timer. When the master output is disabled the output is set to its inactive level as defined by the output polarity. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_enabled_off_state_in_idle_mode(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= TIM_BDTR_OSSI; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Disable Off-State in Idle Mode Disables the off-state in idle mode for the break function of an advanced timer. When the master output is disabled the output is also disabled. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 */ void timer_set_disabled_off_state_in_idle_mode(uint32_t timer_peripheral) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) &= ~TIM_BDTR_OSSI; } #else (void)timer_peripheral; #endif } /*---------------------------------------------------------------------------*/ /** @brief Set Lock Bits Set the lock bits for an advanced timer. Three levels of lock providing protection against software errors. Once written they cannot be changed until a timer reset has occurred. @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 @param[in] lock Unsigned int32. Lock specification @ref tim_lock */ void timer_set_break_lock(uint32_t timer_peripheral, uint32_t lock) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= lock; } #else (void)timer_peripheral; (void)lock; #endif } /*---------------------------------------------------------------------------*/ /** @brief Set Deadtime The deadtime and sampling clock (DTSC) is set in the clock division ratio part of the timer mode settings. The deadtime count is an 8 bit value defined in terms of the number of DTSC cycles: @li Bit 7 = 0, deadtime = bits(6:0) @li Bits 7:6 = 10, deadtime = 2x(64+bits(5:0)) @li Bits 7:5 = 110, deadtime = 8x(32+bits(5:0)) @li Bits 7:5 = 111, deadtime = 16x(32+bits(5:0)) @note This setting is only valid for the advanced timers. @param[in] timer_peripheral Unsigned int32. Timer register address base TIM1 or TIM8 @param[in] deadtime Unsigned int32. Deadtime count specification as defined above. */ void timer_set_deadtime(uint32_t timer_peripheral, uint32_t deadtime) { #if (defined(TIM1_BASE) || defined(TIM8_BASE)) if ((timer_peripheral == TIM1) || (timer_peripheral == TIM8)) { TIM_BDTR(timer_peripheral) |= deadtime; } #else (void)timer_peripheral; (void)deadtime; #endif } /*---------------------------------------------------------------------------*/ /** @brief Force generate a timer event. The event specification consists of 8 possible events that can be forced on the timer. The forced events are automatically cleared by hardware. The UG event is useful to cause shadow registers to be preloaded before the timer is started to avoid uncertainties in the first cycle in case an update event may never be generated. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] event Unsigned int32. Event specification @ref tim_event_gen */ void timer_generate_event(uint32_t timer_peripheral, uint32_t event) { TIM_EGR(timer_peripheral) |= event; } /*---------------------------------------------------------------------------*/ /** @brief Read Counter Read back the value of a timer's counter register contents @param[in] timer_peripheral Unsigned int32. Timer register address base @returns Unsigned int32. Counter value. */ uint32_t timer_get_counter(uint32_t timer_peripheral) { return TIM_CNT(timer_peripheral); } /*---------------------------------------------------------------------------*/ /** @brief Set Counter Set the value of a timer's counter register contents. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] count Unsigned int32. Counter value. */ void timer_set_counter(uint32_t timer_peripheral, uint32_t count) { TIM_CNT(timer_peripheral) = count; } /*---------------------------------------------------------------------------*/ /** @brief Set Input Capture Filter Parameters Set the input filter parameters for an input channel, specifying: @li the frequency of sampling from the Deadtime and Sampling clock (@see @ref timer_set_clock_division) @li the number of events that must occur before a transition is considered valid. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. @param[in] flt ::tim_ic_filter. Input Capture Filter identifier. */ void timer_ic_set_filter(uint32_t timer_peripheral, enum tim_ic_id ic, enum tim_ic_filter flt) { switch (ic) { case TIM_IC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_IC1F_MASK; TIM_CCMR1(timer_peripheral) |= flt << 4; break; case TIM_IC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_IC2F_MASK; TIM_CCMR1(timer_peripheral) |= flt << 12; break; case TIM_IC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC3F_MASK; TIM_CCMR2(timer_peripheral) |= flt << 4; break; case TIM_IC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC4F_MASK; TIM_CCMR2(timer_peripheral) |= flt << 12; break; } } /*---------------------------------------------------------------------------*/ /** @brief Set Input Capture Prescaler Set the number of events between each capture. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. @param[in] psc ::tim_ic_psc. Input Capture sample clock prescaler. */ void timer_ic_set_prescaler(uint32_t timer_peripheral, enum tim_ic_id ic, enum tim_ic_psc psc) { switch (ic) { case TIM_IC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_IC1PSC_MASK; TIM_CCMR1(timer_peripheral) |= psc << 2; break; case TIM_IC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_IC2PSC_MASK; TIM_CCMR1(timer_peripheral) |= psc << 10; break; case TIM_IC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC3PSC_MASK; TIM_CCMR2(timer_peripheral) |= psc << 4; break; case TIM_IC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC4PSC_MASK; TIM_CCMR2(timer_peripheral) |= psc << 10; break; } } /*---------------------------------------------------------------------------*/ /** @brief Set Capture/Compare Channel Direction/Input The Capture/Compare channel is defined as output (compare) or input with the input mapping specified: @li channel is configured as output @li channel is configured as input and mapped on corresponding input @li channel is configured as input and mapped on alternate input (TI2 for channel 1, TI1 for channel 2, TI4 for channel 3, TI3 for channel 4) @li channel is configured as input and is mapped on TRC (requires an internal trigger input selected through TS bit @note not all combinations of the input and channel are valid, see datasheets. @note these parameters are writable only when the channel is off. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. @param[in] in ::tim_ic_input. Input Capture channel direction and source input. */ void timer_ic_set_input(uint32_t timer_peripheral, enum tim_ic_id ic, enum tim_ic_input in) { in &= 3; if (((ic == TIM_IC2) || (ic == TIM_IC4)) && ((in == TIM_IC_IN_TI1) || (in == TIM_IC_IN_TI2))) { /* Input select bits are flipped for these combinations */ in ^= 3; } switch (ic) { case TIM_IC1: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_CC1S_MASK; TIM_CCMR1(timer_peripheral) |= in; break; case TIM_IC2: TIM_CCMR1(timer_peripheral) &= ~TIM_CCMR1_CC2S_MASK; TIM_CCMR1(timer_peripheral) |= in << 8; break; case TIM_IC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_CC3S_MASK; TIM_CCMR2(timer_peripheral) |= in; break; case TIM_IC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_CC4S_MASK; TIM_CCMR2(timer_peripheral) |= in << 8; break; } } /*---------------------------------------------------------------------------*/ /** @brief Enable Timer Input Capture @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. */ void timer_ic_enable(uint32_t timer_peripheral, enum tim_ic_id ic) { TIM_CCER(timer_peripheral) |= (0x1 << (ic * 4)); } /*---------------------------------------------------------------------------*/ /** @brief Disable Timer Input Capture @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. */ void timer_ic_disable(uint32_t timer_peripheral, enum tim_ic_id ic) { TIM_CCER(timer_peripheral) &= ~(0x1 << (ic * 4)); } /*---------------------------------------------------------------------------*/ /** @brief Set External Trigger Filter Parameters for Slave Set the input filter parameters for the external trigger, specifying: @li the frequency of sampling from the Deadtime and Sampling clock (@see @ref timer_set_clock_division) @li the number of events that must occur before a transition is considered valid. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] flt ::tim_ic_filter. Input Capture Filter identifier. */ void timer_slave_set_filter(uint32_t timer_peripheral, enum tim_ic_filter flt) { TIM_SMCR(timer_peripheral) &= ~TIM_SMCR_ETF_MASK; TIM_SMCR(timer_peripheral) |= flt << 8; } /*---------------------------------------------------------------------------*/ /** @brief Set External Trigger Prescaler for Slave Set the external trigger frequency division ratio. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] psc ::tim_ic_psc. Input Capture sample clock prescaler. */ void timer_slave_set_prescaler(uint32_t timer_peripheral, enum tim_ic_psc psc) { TIM_SMCR(timer_peripheral) &= ~TIM_SMCR_ETPS_MASK; TIM_SMCR(timer_peripheral) |= psc << 12; } /*---------------------------------------------------------------------------*/ /** @brief Set External Trigger Polarity for Slave @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] pol ::tim_et_pol. Slave External Trigger polarity. */ void timer_slave_set_polarity(uint32_t timer_peripheral, enum tim_et_pol pol) { if (pol) { TIM_SMCR(timer_peripheral) |= TIM_SMCR_ETP; } else { TIM_SMCR(timer_peripheral) &= ~TIM_SMCR_ETP; } } /*---------------------------------------------------------------------------*/ /** @brief Set Slave Mode @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] mode Unsigned int8. Slave mode @ref tim_sms */ void timer_slave_set_mode(uint32_t timer_peripheral, uint8_t mode) { TIM_SMCR(timer_peripheral) &= ~TIM_SMCR_SMS_MASK; TIM_SMCR(timer_peripheral) |= mode; } /*---------------------------------------------------------------------------*/ /** @brief Set Slave Trigger Source @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] trigger Unsigned int8. Slave trigger source @ref tim_ts */ void timer_slave_set_trigger(uint32_t timer_peripheral, uint8_t trigger) { TIM_SMCR(timer_peripheral) &= ~TIM_SMCR_TS_MASK; TIM_SMCR(timer_peripheral) |= trigger; } /* TODO Timer DMA burst */ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/timer_common_f234.c ================================================ /** @addtogroup timer_file */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief Set Input Polarity The timer channel must be set to input capture mode. @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. @param[in] pol ::tim_ic_pol. Input Capture polarity control. */ void timer_ic_set_polarity(uint32_t timer_peripheral, enum tim_ic_id ic, enum tim_ic_pol pol) { /* Clear CCxP and CCxNP to zero. For both edge trigger both fields are * set. Case 10 is invalid. */ TIM_CCER(timer_peripheral) &= ~(0x6 << (ic * 4)); switch (pol) { case TIM_IC_RISING: /* 00 */ break; case TIM_IC_BOTH: /* 11 */ TIM_CCER(timer_peripheral) |= (0x6 << (ic * 4)); break; case TIM_IC_FALLING: /* 01 */ TIM_CCER(timer_peripheral) |= (0x2 << (ic * 4)); } } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/timer_common_f24.c ================================================ /** @addtogroup timer_file */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief Set Timer Option Set timer options register on TIM2 or TIM5, used for trigger remapping on TIM2, and similarly for TIM5 for oscillator calibration purposes. @param[in] timer_peripheral Unsigned int32. Timer register address base @returns Unsigned int32. Option flags TIM2: @ref tim2_opt_trigger_remap, TIM5: @ref tim5_opt_trigger_remap. */ void timer_set_option(uint32_t timer_peripheral, uint32_t option) { if (timer_peripheral == TIM2) { TIM_OR(timer_peripheral) &= ~TIM2_OR_ITR1_RMP_MASK; TIM_OR(timer_peripheral) |= option; } else if (timer_peripheral == TIM5) { TIM_OR(timer_peripheral) &= ~TIM5_OR_TI4_RMP_MASK; TIM_OR(timer_peripheral) |= option; } } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/usart_common_all.c ================================================ /** @addtogroup usart_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann This library supports the USART/UART in the STM32F series of ARM Cortex Microcontrollers by ST Microelectronics. Devices can have up to 3 USARTs and 2 UARTs. */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include /*---------------------------------------------------------------------------*/ /** @brief USART Set Baudrate. The baud rate is computed from the APB high-speed prescaler clock (for USART1/6) or the APB low-speed prescaler clock (for other USARTs). These values must be correctly set before calling this function (refer to the rcc_clock_setup-* functions in RCC). @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] baud unsigned 32 bit. Baud rate specified in Hz. */ void usart_set_baudrate(uint32_t usart, uint32_t baud) { uint32_t clock = rcc_ppre1_frequency; #if defined STM32F2 || defined STM32F4 if ((usart == USART1) || (usart == USART6)) { clock = rcc_ppre2_frequency; } #else if (usart == USART1) { clock = rcc_ppre2_frequency; } #endif /* * Yes it is as simple as that. The reference manual is * talking about fractional calculation but it seems to be only * marketting babble to sound awesome. It is nothing else but a * simple divider to generate the correct baudrate. * * Note: We round() the value rather than floor()ing it, for more * accurate divisor selection. */ USART_BRR(usart) = ((2 * clock) + baud) / (2 * baud); } /*---------------------------------------------------------------------------*/ /** @brief USART Set Word Length. The word length is set to 8 or 9 bits. Note that the last bit will be a parity bit if parity is enabled, in which case the data length will be 7 or 8 bits respectively. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] bits unsigned 32 bit. Word length in bits 8 or 9. */ void usart_set_databits(uint32_t usart, uint32_t bits) { if (bits == 8) { USART_CR1(usart) &= ~USART_CR1_M; /* 8 data bits */ } else { USART_CR1(usart) |= USART_CR1_M; /* 9 data bits */ } } /*---------------------------------------------------------------------------*/ /** @brief USART Set Stop Bit(s). The stop bits are specified as 0.5, 1, 1.5 or 2. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] stopbits unsigned 32 bit. Stop bits @ref usart_cr2_stopbits. */ void usart_set_stopbits(uint32_t usart, uint32_t stopbits) { uint32_t reg32; reg32 = USART_CR2(usart); reg32 = (reg32 & ~USART_CR2_STOPBITS_MASK) | stopbits; USART_CR2(usart) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Parity. The parity bit can be selected as none, even or odd. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] parity unsigned 32 bit. Parity @ref usart_cr1_parity. */ void usart_set_parity(uint32_t usart, uint32_t parity) { uint32_t reg32; reg32 = USART_CR1(usart); reg32 = (reg32 & ~USART_PARITY_MASK) | parity; USART_CR1(usart) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Rx/Tx Mode. The mode can be selected as Rx only, Tx only or Rx+Tx. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] mode unsigned 32 bit. Mode @ref usart_cr1_mode. */ void usart_set_mode(uint32_t usart, uint32_t mode) { uint32_t reg32; reg32 = USART_CR1(usart); reg32 = (reg32 & ~USART_MODE_MASK) | mode; USART_CR1(usart) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Hardware Flow Control. The flow control bit can be selected as none, RTS, CTS or RTS+CTS. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] flowcontrol unsigned 32 bit. Flowcontrol @ref usart_cr3_flowcontrol. */ void usart_set_flow_control(uint32_t usart, uint32_t flowcontrol) { uint32_t reg32; reg32 = USART_CR3(usart); reg32 = (reg32 & ~USART_FLOWCONTROL_MASK) | flowcontrol; USART_CR3(usart) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief USART Enable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable(uint32_t usart) { USART_CR1(usart) |= USART_CR1_UE; } /*---------------------------------------------------------------------------*/ /** @brief USART Disable. At the end of the current frame, the USART is disabled to reduce power. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_UE; } /*---------------------------------------------------------------------------*/ /** @brief USART Send Data Word with Blocking Blocks until the transmit data buffer becomes empty then writes the next data word for transmission. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] data unsigned 16 bit. */ void usart_send_blocking(uint32_t usart, uint16_t data) { usart_wait_send_ready(usart); usart_send(usart, data); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Received Data Word with Blocking. Wait until a data word has been received then return the word. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @returns unsigned 16 bit data word. */ uint16_t usart_recv_blocking(uint32_t usart) { usart_wait_recv_ready(usart); return usart_recv(usart); } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver DMA Enable. DMA is available on: @li USART1 Rx DMA1 channel 5. @li USART2 Rx DMA1 channel 6. @li USART3 Rx DMA1 channel 3. @li UART4 Rx DMA2 channel 3. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_rx_dma(uint32_t usart) { USART_CR3(usart) |= USART_CR3_DMAR; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver DMA Disable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable_rx_dma(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_DMAR; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter DMA Enable. DMA is available on: @li USART1 Tx DMA1 channel 4. @li USART2 Tx DMA1 channel 7. @li USART3 Tx DMA1 channel 2. @li UART4 Tx DMA2 channel 5. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_tx_dma(uint32_t usart) { USART_CR3(usart) |= USART_CR3_DMAT; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter DMA Disable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable_tx_dma(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_DMAT; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver Interrupt Enable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_rx_interrupt(uint32_t usart) { USART_CR1(usart) |= USART_CR1_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver Interrupt Disable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable_rx_interrupt(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter Interrupt Enable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_tx_interrupt(uint32_t usart) { USART_CR1(usart) |= USART_CR1_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter Interrupt Disable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable_tx_interrupt(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Error Interrupt Enable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_error_interrupt(uint32_t usart) { USART_CR3(usart) |= USART_CR3_EIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Error Interrupt Disable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_disable_error_interrupt(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_EIE; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/common/usart_common_f124.c ================================================ /** @addtogroup usart_file @author @htmlonly © @endhtmlonly 2009 Uwe Hermann This library supports the USART/UART in the STM32F series of ARM Cortex Microcontrollers by ST Microelectronics. Devices can have up to 3 USARTs and 2 UARTs. */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include /*---------------------------------------------------------------------------*/ /** @brief USART Send a Data Word. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] data unsigned 16 bit. */ void usart_send(uint32_t usart, uint16_t data) { /* Send data. */ USART_DR(usart) = (data & USART_DR_MASK); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Received Data Word. If parity is enabled the MSB (bit 7 or 8 depending on the word length) is the parity bit. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @returns unsigned 16 bit data word. */ uint16_t usart_recv(uint32_t usart) { /* Receive data. */ return USART_DR(usart) & USART_DR_MASK; } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Transmit Data Buffer Empty Blocks until the transmit data buffer becomes empty and is ready to accept the next data word. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_wait_send_ready(uint32_t usart) { /* Wait until the data has been transferred into the shift register. */ while ((USART_SR(usart) & USART_SR_TXE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Received Data Available Blocks until the receive data buffer holds a valid received data word. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_wait_recv_ready(uint32_t usart) { /* Wait until the data is ready to be received. */ while ((USART_SR(usart) & USART_SR_RXNE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Status Flag. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. @returns boolean: flag set. */ bool usart_get_flag(uint32_t usart, uint32_t flag) { return ((USART_SR(usart) & flag) != 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Return Interrupt Source. Returns true if the specified interrupt flag (IDLE, RXNE, TC, TXE or OE) was set and the interrupt was enabled. If the specified flag is not an interrupt flag, the function returns false. @todo These are the most important interrupts likely to be used. Others relating to LIN break, and error conditions in multibuffer communication, need to be added for completeness. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. @returns boolean: flag and interrupt enable both set. */ bool usart_get_interrupt_source(uint32_t usart, uint32_t flag) { uint32_t flag_set = (USART_SR(usart) & flag); /* IDLE, RXNE, TC, TXE interrupts */ if ((flag >= USART_SR_IDLE) && (flag <= USART_SR_TXE)) { return ((flag_set & USART_CR1(usart)) != 0); /* Overrun error */ } else if (flag == USART_SR_ORE) { return flag_set && (USART_CR3(usart) & USART_CR3_CTSIE); } return false; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/desig.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include uint16_t desig_get_flash_size(void) { return DESIG_FLASH_SIZE; } void desig_get_unique_id(uint32_t result[]) { /* Could also just return a pointer to the start? read it as they wish? */ uint16_t bits15_0 = DESIG_UID_15_0; uint32_t bits31_16 = DESIG_UID_31_16; uint32_t bits63_32 = DESIG_UID_63_32; uint32_t bits95_64 = DESIG_UID_95_64; result[0] = bits95_64; result[1] = bits63_32; result[2] = bits31_16 << 16 | bits15_0; } void desig_get_unique_id_as_string(char *string, unsigned int string_len) { int i, len; uint8_t device_id[12]; static const char chars[] = "0123456789ABCDEF"; desig_get_unique_id((uint32_t *)device_id); /* Each byte produces two characters */ len = (2 * sizeof(device_id) < string_len) ? 2 * sizeof(device_id) : string_len - 1; for (i = 0; i < len; i += 2) { string[i] = chars[(device_id[i / 2] >> 0) & 0x0F]; string[i + 1] = chars[(device_id[i / 2] >> 4) & 0x0F]; } string[len] = '\0'; } ================================================ FILE: firmware/libopencm3/lib/stm32/f0/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2013 Frantisek Burian ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32f0 PREFIX ?= arm-none-eabi #PREFIX ?= arm-elf CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m0 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F0 ARFLAGS = rcs OBJS = flash.o rcc.o usart.o dma.o rtc.o comparator.o spi.o crc.o \ dac.o i2c.o iwdg.o pwr.o gpio.o timer.o adc.o OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o \ pwr_common_all.o iwdg_common_all.o rtc_common_l1f024.o \ dma_common_l1f013.o exti_common_all.o spi_common_all.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/adc.c ================================================ /** @defgroup adc_file ADC * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Analog to Digital Converters * * based on F3 file * * @date 14 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /**@{*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_opmode ADC Operation mode API * @ingroup adc_file * * @brief ADC Result API * *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Continuous Conversion Mode * * In this mode the ADC starts a new conversion of a single channel or a channel * group immediately following completion of the previous channel group * conversion. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_set_continuous_conversion_mode(uint32_t adc) { ADC_CFGR1(adc) |= ADC_CFGR1_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Single Conversion Mode * * In this mode the ADC performs a conversion of one channel or a channel group * and stops. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_set_single_conversion_mode(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Regular Conversions * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_discontinuous_mode(uint32_t adc) { ADC_CFGR1(adc) |= ADC_CFGR1_DISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Regular Conversions * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_discontinuous_mode(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_DISCEN; } /*---------------------------------------------------------------------------*/ /** ADC Set operation mode * * There are some operation modes, common for entire stm32 branch. In the text * the braces are describing result to single trigger event. The trigger event * is described by character T in the description. The ADC is configured to * convert list of inputs [0, 1, 2, 3]. In Grouped modes, there is used group * size of 2 conversions in the examples * * @li @c ADC_MODE_SEQUENTIAL: T(0) T(1) T(2) T(3)[EOSEQ] T(0) T(1) T(2) ... * * In this mode, after the trigger event a single channel is converted and the * next channel in the list is prepared to convert on next trigger edge. * * @note This mode can be emulated by ADC_MODE_GROUPED with group size * of 1. @par * * @li @c ADC_MODE_SCAN: T(0123)[EOSEQ] T(0123)[EOSEQ] T(0123)[EOSEQ] * * In this mode, after the trigger event, all channels will be converted once, * storing results sequentially. * * @note The DMA must be configured properly for more than single channel to * convert. @par * * @li @c ADC_MODE_SCAN_INFINITE: T(0123[EOSEQ]0123[EOSEQ]0123[EOSEQ]...) * * In this mode, after the trigger event, all channels from the list are * converted. At the end of list, the conversion continues from the beginning. * * @note The DMA must be configured properly to operate in this mode.@par * * @li @c ADC_MODE_GROUPED: T(12) T(34)[EOSEQ] T(12) T(34)[EOSEQ] T(12) * * In this mode, after the trigger event, a specified group size of channels * are converted. If the end of channel list occurs, the EOSEQ is generated * and on the next trigger it wraps to the beginning. * * @note The DMA must be configured properly to operate on more than single * channel conversion groups.@par * * @warning not all families supports all modes of operation of ADC. * * @par * */ /*---------------------------------------------------------------------------*/ /** @brief ADC Set conversion operation mode * * @note on SEQUENTIAL mode, the trigger event is neccesary to start conversion. * @par * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] adc ::adc_opmode. ADC operation mode (@ref adc_opmode) */ void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode) { switch (opmode) { case ADC_MODE_SEQUENTIAL: ADC_CFGR1(adc) &= ~ADC_CFGR1_CONT; ADC_CFGR1(adc) |= ADC_CFGR1_DISCEN; break; case ADC_MODE_SCAN: ADC_CFGR1(adc) &= ~(ADC_CFGR1_CONT | ADC_CFGR1_DISCEN); break; case ADC_MODE_SCAN_INFINITE: ADC_CFGR1(adc) &= ~ADC_CFGR1_DISCEN; ADC_CFGR1(adc) |= ADC_CFGR1_CONT; break; } } /**@}*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_result ADC Result API * @ingroup adc_file * * @brief ADC Result API * *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Regular Channels * * This starts conversion on a set of defined regular channels. It is cleared * by hardware once conversion starts. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_start_conversion_regular(uint32_t adc) { /* Start conversion on regular channels. */ ADC_CR(adc) |= ADC_CR_ADSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR(adc) & ADC_CR_ADSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag * * This flag is set after all channels of a regular or injected group have been * converted. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @returns bool. End of conversion flag. */ bool adc_eoc(uint32_t adc) { return ((ADC_ISR(adc) & ADC_ISR_EOC) != 0); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from the Regular Conversion Result Register * * The result read back is 12 bits, right or left aligned within the first * 16 bits. For ADC1 only, the higher 16 bits will hold the result from ADC2 if * an appropriate dual mode has been set @see adc_set_dual_mode. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @returns Unsigned int32 conversion result. */ uint32_t adc_read_regular(uint32_t adc) { return ADC_DR(adc); } /**@}*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_trigger ADC Trigger API * @ingroup adc_file * * @brief ADC Trigger API * *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Regular Channels * * This enables an external trigger for set of defined regular channels, and * sets the polarity of the trigger event: rising or falling edge or both. Note * that if the trigger polarity is zero, triggering is disabled. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] trigger Unsigned int32. Trigger identifier * @ref adc_trigger_regular * @param[in] polarity Unsigned int32. Trigger polarity @ref * adc_trigger_polarity_regular */ void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity) { ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_EXTSEL) | trigger; ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_EXTEN) | polarity; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Regular Channels * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_external_trigger_regular(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_EXTEN; } /**@}*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_interrupts ADC Interrupt configuration API * @ingroup adc_file * * @brief ADC Interrupt configuration API * *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_watchdog_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_watchdog_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Analog Watchdog Flag * * This flag is set when the converted voltage crosses the high or low * thresholds. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @returns bool true, if the signal is out of defined analog range. */ bool adc_get_watchdog_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_AWD; } /*---------------------------------------------------------------------------*/ /** @brief ADC Clear Analog Watchdog Flag * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_clear_watchdog_flag(uint32_t adc) { ADC_ISR(adc) = ADC_ISR_AWD; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable the Overrun Interrupt * * The overrun interrupt is generated when data is not read from a result * register before the next conversion is written. If DMA is enabled, all * transfers are terminated and any conversion sequence is aborted. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_overrun_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable the Overrun Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_overrun_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Overrun Flag * * The overrun flag is set when data is not read from a result register before * the next conversion is written. If DMA is enabled, all transfers are * terminated and any conversion sequence is aborted. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ bool adc_get_overrun_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Clear Overrun Flags * * The overrun flag is cleared. Note that if an overrun occurs, DMA is * terminated. * The flag must be cleared and the DMA stream and ADC reinitialised to resume * conversions (see the reference manual). * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_clear_overrun_flag(uint32_t adc) { ADC_ISR(adc) = ADC_ISR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Regular End-Of-Conversion Sequence Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_eoc_sequence_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_EOSEQIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Sequence Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_eoc_sequence_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_EOSEQIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Regular End-Of-Conversion Sequence Flag * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ bool adc_get_eoc_sequence_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_EOSEQ; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Regular End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_eoc_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_eoc_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_EOCIE; } /**@}*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_config ADC Basic configuration API * @ingroup adc_file * * @brief ADC Basic configuration API * *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Power Off * * Turn off the ADC to reduce power consumption to a few microamps. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_power_off(uint32_t adc) { ADC_CR(adc) &= ~ADC_CR_ADEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Power On * * If the ADC is in power-down mode then it is powered up. The application * needs to wait a time of about 3 microseconds for stabilization before using * the ADC. If the ADC is already on this function call will have no effect. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_power_on(uint32_t adc) { ADC_CR(adc) |= ADC_CR_ADEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Clock Prescale * * The ADC clock taken from the many sources. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] prescale Unsigned int32. Prescale value (@ref adc_api_clksource) */ void adc_set_clk_source(uint32_t adc, uint32_t source) { ADC_CFGR2(adc) = ((ADC_CFGR2(adc) & ~ADC_CFGR2_CKMODE) | source); } /*---------------------------------------------------------------------------*/ /** @brief ADC Set a Regular Channel Conversion Sequence * * Define a sequence of channels to be converted as a regular group with a * length from 1 to 18 channels. If this is called during conversion, the * current conversion is reset and conversion begins again with the newly * defined group. * * @warning This core doesn't support the random order of ADC conversions. * The channel list must be ordered by channel number. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] length Unsigned int8. Number of channels in the group. * @param[in] channel Unsigned int8[]. Set of channels to convert, integers * 0..18. */ void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32 = 0; uint8_t i = 0; bool stepup = false, stepdn = false; if (length == 0) { ADC_CHSELR(adc) = 0; return; } reg32 |= (1 << channel[0]); for (i = 1; i < length; i++) { reg32 |= (1 << channel[i]); stepup |= channel[i-1] < channel[i]; stepdn |= channel[i-1] > channel[i]; } /* Check, if the channel list is in order */ if (stepup && stepdn) { cm3_assert_not_reached(); } /* Update the scan direction flag */ if (stepdn) { ADC_CFGR1(adc) |= ADC_CFGR1_SCANDIR; } else { ADC_CFGR1(adc) &= ~ADC_CFGR1_SCANDIR; } ADC_CHSELR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for All Channels * * The sampling time can be selected in ADC clock cycles from 1.5 to 239.5, * same for all channels. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] time Unsigned int8. Sampling time selection (@ref adc_api_smptime) */ void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time) { ADC_SMPR(adc) = time & ADC_SMPR_SMP; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Resolution * * ADC Resolution can be reduced from 12 bits to 10, 8 or 6 bits for a * corresponding reduction in conversion time. * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] resolution Unsigned int16. Resolution value (@ref adc_api_res) */ void adc_set_resolution(uint32_t adc, uint16_t resolution) { ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_RES) | resolution; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Left Aligned * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_set_left_aligned(uint32_t adc) { ADC_CFGR1(adc) |= ADC_CFGR1_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Right Aligned * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_set_right_aligned(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable DMA Transfers * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_dma(uint32_t adc) { ADC_CFGR1(adc) |= ADC_CFGR1_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable DMA Transfers * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_dma(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The Temperature Sensor * * This enables the sensor on channel 16 */ void adc_enable_temperature_sensor(void) { ADC_CCR |= ADC_CCR_TSEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The Temperature Sensor * * Disabling this will reduce power consumption from the temperature sensor * measurement. */ void adc_disable_temperature_sensor(void) { ADC_CCR &= ~ADC_CCR_TSEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The VRef Sensor * * This enables the reference voltage measurements on channel 17. */ void adc_enable_vref_sensor(void) { ADC_CCR |= ADC_CCR_VREFEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The VRef Sensor * * Disabling this will reduce power consumption from the reference voltage * measurement. */ void adc_disable_vref_sensor(void) { ADC_CCR &= ~ADC_CCR_VREFEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The VBat Sensor * * This enables the battery voltage measurements on channel 17. */ void adc_enable_vbat_sensor(void) { ADC_CCR |= ADC_CCR_VBATEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The VBat Sensor * * Disabling this will reduce power consumption from the battery voltage * measurement. */ void adc_disable_vbat_sensor(void) { ADC_CCR &= ~ADC_CCR_VBATEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Start the calibration procedure * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_calibrate_start(uint32_t adc) { ADC_CR(adc) = ADC_CR_ADCAL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Wait to finish the ADC calibration procedure * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_calibrate_wait_finish(uint32_t adc) { while (ADC_CR(adc) & ADC_CR_ADCAL); } /**@}*/ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ /** * @defgroup adc_api_wdg ADC Analog watchdog API * @ingroup adc_file * * @brief ADC analog watchdog API definitions. * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Analog watchdog is disabled * by default. * * @warning Comparison is done before data alignment takes place, so the * thresholds are left-aligned. * * Example 1: Enable watchdog checking on all channels * * @code * // in configuration * adc_enable_analog_watchdog_on_all_channels(ADC1); * adc_set_watchdog_high_threshold(ADC1, 0xE00); * adc_set_watchdog_low_threshold(ADC1, 0x200); * * // in the main application thread * if (adc_get_watchdog_flag(ADC1)) { * // the converted signal is out of AWD ranges * adc_clear_watchdog_flag(ADC1); * } * @endcode * * Example 2: Enable watchdog checking on channel 5 * * @code * // in configuration * adc_enable_analog_watchdog_on_selected_channel(ADC1,5); * adc_set_watchdog_high_threshold(ADC1, 0xE00); * adc_set_watchdog_low_threshold(ADC1, 0x200); * * // in the main application thread * if (adc_get_watchdog_flag(ADC1)) { * // the converted signal is out of AWD ranges * adc_clear_watchdog_flag(ADC1); * } * @endcode *@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for All Channels * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc) { ADC_CFGR1(adc) |= ADC_CFGR1_AWDEN; ADC_CFGR1(adc) &= ~ADC_CFGR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for a Selected Channel * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] chan Unsigned int8. ADC channel number @ref adc_api_channel */ void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t chan) { ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_AWDCH) | \ ADC_CFGR1_AWDCH_VAL(chan); ADC_CFGR1(adc) |= ADC_CFGR1_AWDEN | ADC_CFGR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) */ void adc_disable_analog_watchdog(uint32_t adc) { ADC_CFGR1(adc) &= ~ADC_CFGR1_AWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Upper Threshold * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] threshold Unsigned int8. Upper threshold value */ void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold) { ADC_TR(adc) = (ADC_TR(adc) & ~ADC_TR_HT) | ADC_TR_HT_VAL(threshold); } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Lower Threshold * * @param[in] adc Unsigned int32. ADC base address (@ref adc_reg_base) * @param[in] threshold Unsigned int8. Lower threshold value */ void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold) { ADC_TR(adc) = (ADC_TR(adc) & ~ADC_TR_LT) | ADC_TR_LT_VAL(threshold); } /**@}*/ /*---------------------------------------------------------------------------*/ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f0/comparator.c ================================================ /** @defgroup comp_file COMP * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx COMP * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void comp_enable(uint8_t id) { COMP_CSR(id) |= COMP_CSR_EN; } void comp_disable(uint8_t id) { COMP_CSR(id) &= ~COMP_CSR_EN; } void comp_select_input(uint8_t id, uint32_t input) { COMP_CSR(id) = (COMP_CSR(id) & ~COMP_CSR_INSEL) | input; } void comp_select_output(uint8_t id, uint32_t output) { COMP_CSR(id) = (COMP_CSR(id) & ~COMP_CSR_OUTSEL) | output; } void comp_select_hyst(uint8_t id, uint32_t hyst) { COMP_CSR(id) = (COMP_CSR(id) & ~COMP_CSR_HYST) | hyst; } void comp_select_speed(uint8_t id, uint32_t speed) { COMP_CSR(id) = (COMP_CSR(id) & ~COMP_CSR_SPEED) | speed; } ================================================ FILE: firmware/libopencm3/lib/stm32/f0/crc.c ================================================ /** @defgroup crc_file CRC * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx CRC * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/dac.c ================================================ /** @defgroup dac_file DAC * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx DAC * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/dma.c ================================================ /** @defgroup dma_file DMA * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx DMA * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/flash.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Frantisek Burian * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void flash_prefetch_buffer_enable(void) { FLASH_ACR |= FLASH_ACR_PRFTBE; } void flash_prefetch_buffer_disable(void) { FLASH_ACR &= ~FLASH_ACR_PRFTBE; } void flash_set_ws(uint32_t ws) { FLASH_ACR = (FLASH_ACR & ~FLASH_ACR_LATENCY) | ws; } void flash_wait_busy(void) { while ((FLASH_SR & FLASH_SR_BSY) != 0); } void flash_program_u32(uint32_t address, uint32_t data) { flash_wait_busy(); FLASH_CR |= FLASH_CR_PG; MMIO16(address) = (uint16_t)data; flash_wait_busy(); MMIO16(address + 2) = data >> 16; flash_wait_busy(); FLASH_CR &= ~FLASH_CR_PG; } void flash_program_u16(uint32_t address, uint16_t data) { flash_wait_busy(); FLASH_CR |= FLASH_CR_PG; MMIO16(address) = data; flash_wait_busy(); FLASH_CR &= ~FLASH_CR_PG; } void flash_erase_page(uint32_t page_address) { flash_wait_busy(); FLASH_CR |= FLASH_CR_PER; FLASH_AR = page_address; FLASH_CR |= FLASH_CR_STRT; flash_wait_busy(); FLASH_CR &= ~FLASH_CR_PER; } void flash_erase_all_pages(void) { flash_wait_busy(); FLASH_CR |= FLASH_CR_MER; /* Enable mass erase. */ FLASH_CR |= FLASH_CR_STRT; /* Trigger the erase. */ flash_wait_busy(); FLASH_CR &= ~FLASH_CR_MER; /* Disable mass erase. */ } ================================================ FILE: firmware/libopencm3/lib/stm32/f0/gpio.c ================================================ /** @defgroup gpio_file GPIO * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx General Purpose I/O * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/i2c.c ================================================ /** @defgroup i2c_file I2C * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx I2C * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/iwdg.c ================================================ /** @defgroup iwdg_file IWDG * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Independent Watchdog Timer * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/libopencm3_stm32f0.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/f0/pwr.c ================================================ /** @defgroup pwr-file PWR * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Power Control * * @version 1.0.0 * * @date 11 July 2013 * * This library supports the power control system for the * STM32F0 series of ARM Cortex Microcontrollers by ST Microelectronics. * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f0/rcc.c ================================================ /** @defgroup STM32F0xx-rcc-file RCC * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Reset and Clock Control * * @version 1.0.0 * * @date 29 Jun 2013 * * This library supports the Reset and Clock Control System in the STM32F0xx * series of ARM Cortex Microcontrollers by ST Microelectronics. * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include #include uint32_t rcc_core_frequency = 8000000; /* 8MHz after reset */ uint32_t rcc_ppre_frequency = 8000000; /* 8MHz after reset */ /*---------------------------------------------------------------------------*/ /** @brief RCC Clear the Oscillator Ready Interrupt Flag * * Clear the interrupt flag that was set when a clock oscillator became ready * to use. * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_clear(enum rcc_osc osc) { switch (osc) { case HSI14: RCC_CIR |= RCC_CIR_HSI14RDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable the Oscillator Ready Interrupt * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_enable(enum rcc_osc osc) { switch (osc) { case HSI14: RCC_CIR |= RCC_CIR_HSI14RDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable the Oscillator Ready Interrupt * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_disable(enum rcc_osc osc) { switch (osc) { case HSI14: RCC_CIR &= ~RCC_CIR_HSI14RDYC; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYC; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYC; break; case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYC; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYC; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYC; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Read the Oscillator Ready Interrupt Flag * * @param[in] osc enum ::osc_t. Oscillator ID * @returns int. Boolean value for flag set. */ int rcc_osc_ready_int_flag(enum rcc_osc osc) { switch (osc) { case HSI14: return (RCC_CIR & RCC_CIR_HSI14RDYF) != 0; break; case HSI: return (RCC_CIR & RCC_CIR_HSIRDYF) != 0; break; case HSE: return (RCC_CIR & RCC_CIR_HSERDYF) != 0; break; case PLL: return (RCC_CIR & RCC_CIR_PLLRDYF) != 0; break; case LSE: return (RCC_CIR & RCC_CIR_LSERDYF) != 0; break; case LSI: return (RCC_CIR & RCC_CIR_LSIRDYF) != 0; break; } cm3_assert_not_reached(); } /*---------------------------------------------------------------------------*/ /** @brief RCC Clear the Clock Security System Interrupt Flag */ void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } /*---------------------------------------------------------------------------*/ /** @brief RCC Read the Clock Security System Interrupt Flag * * @returns int. Boolean value for flag set. */ int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } /*---------------------------------------------------------------------------*/ /** @brief RCC Wait for Oscillator Ready. * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_wait_for_osc_ready(enum rcc_osc osc) { switch (osc) { case HSI14: while ((RCC_CIR & RCC_CIR_HSI14RDYF) != 0); break; case HSI: while ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case HSE: while ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case PLL: while ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case LSE: while ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: while ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Turn on an Oscillator. * * Enable an oscillator and power on. Each oscillator requires an amount of * time to settle to a usable state. Refer to datasheets for time delay * information. A status flag is available to indicate when the oscillator * becomes ready (see @ref rcc_osc_ready_int_flag and @ref * rcc_wait_for_osc_ready). * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_on(enum rcc_osc osc) { switch (osc) { case HSI14: RCC_CR2 |= RCC_CR2_HSI14ON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; case PLL: /* don't do anything */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Turn off an Oscillator. * * Disable an oscillator and power off. * * @note An oscillator cannot be turned off if it is selected as the system * clock. * * @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_off(enum rcc_osc osc) { switch (osc) { case HSI14: RCC_CR2 &= ~RCC_CR2_HSI14ON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; case PLL: /* don't do anything */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable the Clock Security System. */ void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable the Clock Security System. */ void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable Bypass. * * Enable an external clock to bypass the internal clock (high speed and low * speed clocks only). The external clock must be enabled (see @ref rcc_osc_on) * and the internal clock must be disabled (see @ref rcc_osc_off) for this to * have effect. * * @param[in] osc enum ::osc_t. Oscillator ID. Only HSE and LSE have effect. */ void rcc_osc_bypass_enable(enum rcc_osc osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEBYP; break; case HSI14: case HSI: case LSI: case PLL: /* Do nothing */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable Bypass. * * Re-enable the internal clock (high speed and low speed clocks only). The * internal clock must be disabled (see @ref rcc_osc_off) for this to have * effect. * * * @param[in] osc enum ::osc_t. Oscillator ID. Only HSE and LSE have effect. */ void rcc_osc_bypass_disable(enum rcc_osc osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEBYP; break; case HSI14: case PLL: case HSI: case LSI: /* Do nothing */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the Source for the System Clock. * * @param[in] osc enum ::osc_t. Oscillator ID. Only HSE, LSE and PLL have * effect. */ void rcc_set_sysclk_source(enum rcc_osc clk) { switch (clk) { case HSI: RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_SW) | RCC_CFGR_SW_HSI; break; case HSE: RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_SW) | RCC_CFGR_SW_HSE; break; case PLL: RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_SW) | RCC_CFGR_SW_PLL; break; case LSI: case LSE: case HSI14: /* do nothing */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the PLL Multiplication Factor. * * @note This only has effect when the PLL is disabled. * * @param[in] mul Unsigned int32. PLL multiplication factor @ref rcc_cfgr_pmf */ void rcc_set_pll_multiplication_factor(uint32_t mul) { RCC_CFGR = (RCC_CFGR & RCC_CFGR_PLLMUL) | mul; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the APB Prescale Factor. * * @note The APB1 clock frequency must not exceed 36MHz. * * @param[in] ppre1 Unsigned int32. APB prescale factor @ref rcc_cfgr_apb1pre */ void rcc_set_ppre(uint32_t ppre) { RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_PPRE) | ppre; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the AHB Prescale Factor. * * @param[in] hpre Unsigned int32. AHB prescale factor @ref rcc_cfgr_ahbpre */ void rcc_set_hpre(uint32_t hpre) { RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_HPRE) | hpre; } void rcc_set_prediv(uint32_t prediv) { RCC_CFGR2 = (RCC_CFGR2 & ~RCC_CFGR2_PREDIV) | prediv; } void rcc_set_mco(uint32_t mcosrc) { RCC_CFGR = (RCC_CFGR & ~RCC_CFGR_MCO) | mcosrc; } /*---------------------------------------------------------------------------*/ /** @brief RCC Get the System Clock Source. * * @returns ::osc_t System clock source: */ enum rcc_osc rcc_system_clock_source(void) { /* Return the clock source which is used as system clock. */ switch (RCC_CFGR & RCC_CFGR_SWS) { case RCC_CFGR_SWS_HSI: return HSI; case RCC_CFGR_SWS_HSE: return HSE; case RCC_CFGR_SWS_PLL: return PLL; } cm3_assert_not_reached(); } void rcc_clock_setup_in_hsi_out_8mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_000_024MHZ); rcc_ppre_frequency = 8000000; rcc_core_frequency = 8000000; } void rcc_clock_setup_in_hsi_out_16mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_000_024MHZ); /* 8MHz * 4 / 2 = 16MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_MUL4); RCC_CFGR &= RCC_CFGR_PLLSRC; rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); rcc_set_sysclk_source(PLL); rcc_ppre_frequency = 16000000; rcc_core_frequency = 16000000; } void rcc_clock_setup_in_hsi_out_24mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_000_024MHZ); /* 8MHz * 6 / 2 = 24MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_MUL6); RCC_CFGR &= RCC_CFGR_PLLSRC; rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); rcc_set_sysclk_source(PLL); rcc_ppre_frequency = 24000000; rcc_core_frequency = 24000000; } void rcc_clock_setup_in_hsi_out_32mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ); /* 8MHz * 8 / 2 = 32MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_MUL8); RCC_CFGR &= RCC_CFGR_PLLSRC; rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); rcc_set_sysclk_source(PLL); rcc_ppre_frequency = 32000000; rcc_core_frequency = 32000000; } void rcc_clock_setup_in_hsi_out_40mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ); /* 8MHz * 10 / 2 = 40MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_MUL10); RCC_CFGR &= RCC_CFGR_PLLSRC; rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); rcc_set_sysclk_source(PLL); rcc_ppre_frequency = 32000000; rcc_core_frequency = 32000000; } void rcc_clock_setup_in_hsi_out_48mhz(void) { rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); rcc_set_sysclk_source(HSI); rcc_set_hpre(RCC_CFGR_HPRE_NODIV); rcc_set_ppre(RCC_CFGR_PPRE_NODIV); flash_set_ws(FLASH_ACR_LATENCY_024_048MHZ); /* 8MHz * 12 / 2 = 24MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_MUL16); RCC_CFGR &= RCC_CFGR_PLLSRC; rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); rcc_set_sysclk_source(PLL); rcc_ppre_frequency = 48000000; rcc_core_frequency = 48000000; } #define _RCC_REG(i) MMIO32(RCC_BASE + ((i) >> 5)) #define _RCC_BIT(i) (1 << ((i) & 0x1f)) void rcc_periph_clock_enable(enum rcc_periph_clken periph) { _RCC_REG(periph) |= _RCC_BIT(periph); } void rcc_periph_clock_disable(enum rcc_periph_clken periph) { _RCC_REG(periph) &= ~_RCC_BIT(periph); } void rcc_periph_reset_pulse(enum rcc_periph_rst periph) { _RCC_REG(periph) |= _RCC_BIT(periph); _RCC_REG(periph) &= ~_RCC_BIT(periph); } void rcc_periph_reset_hold(enum rcc_periph_rst periph) { _RCC_REG(periph) |= _RCC_BIT(periph); } void rcc_periph_reset_release(enum rcc_periph_rst periph) { _RCC_REG(periph) &= ~_RCC_BIT(periph); } #undef _RCC_REG #undef _RCC_BIT /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f0/rtc.c ================================================ /** @defgroup rtc_file RTC * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx RTC * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/spi.c ================================================ /** @defgroup spi_file SPI * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Serial Peripheral Interface * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include void spi_set_data_size(uint32_t spi, uint16_t data_s) { SPI_CR2(spi) = (SPI_CR2(spi) & ~SPI_CR2_DS_MASK) | (data_s & SPI_CR2_DS_MASK); } void spi_fifo_reception_threshold_8bit(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_FRXTH; } void spi_fifo_reception_threshold_16bit(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_FRXTH; } void spi_i2s_mode_spi_mode(uint32_t spi) { SPI_I2SCFGR(spi) &= ~SPI_I2SCFGR_I2SMOD; } ================================================ FILE: firmware/libopencm3/lib/stm32/f0/syscfg.c ================================================ /** @defgroup syscfg_file SYSCFG * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx SYSCFG * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/timer.c ================================================ /** @defgroup timer_file Timers * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx Timers * * @version 1.0.0 * * @date 11 July 2013 * */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f0/usart.c ================================================ /** @defgroup usart_file USART * * @ingroup STM32F0xx * * @brief libopencm3 STM32F0xx USART * * @version 1.0.0 * * @date 7 Jul 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /*---------------------------------------------------------------------------*/ /** @brief USART Set Baudrate. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] baud unsigned 32 bit. Baud rate specified in Hz. */ void usart_set_baudrate(uint32_t usart, uint32_t baud) { uint32_t clock = rcc_ppre_frequency; if (usart == USART1) { clock = rcc_ppre_frequency; /* TODO selective PCLK, SYSCLK, HSI or LSE */ } /* TODO check oversampling 16 */ USART_BRR(usart) = ((2 * clock) + baud) / (2 * baud); } /*---------------------------------------------------------------------------*/ /** @brief USART Set Word Length. * * The word length is set to 8 or 9 bits. Note that the last bit will be a * parity bit if parity is enabled, in which case the data length will be 7 * or 8 bits respectively. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] bits unsigned 32 bit. Word length in bits 8 or 9. */ void usart_set_databits(uint32_t usart, uint32_t bits) { if (bits == 8) { USART_CR1(usart) &= ~USART_CR1_M; /* 8 data bits */ } else { USART_CR1(usart) |= USART_CR1_M; /* 9 data bits */ } } /*---------------------------------------------------------------------------*/ /** @brief USART Set Stop Bit(s). * * The stop bits are specified as 0.5, 1, 1.5 or 2. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] stopbits unsigned 32 bit. Stop bits @ref usart_cr2_stopbits. */ void usart_set_stopbits(uint32_t usart, uint32_t stopbits) { USART_CR2(usart) = (USART_CR2(usart) & ~USART_CR2_STOP) | stopbits; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Parity. * * The parity bit can be selected as none, even or odd. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] parity unsigned 32 bit. Parity @ref usart_cr1_parity. */ void usart_set_parity(uint32_t usart, uint32_t parity) { USART_CR1(usart) = (USART_CR1(usart) & ~USART_PARITY) | parity; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Rx/Tx Mode. * * The mode can be selected as Rx only, Tx only or Rx+Tx. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] mode unsigned 32 bit. Mode @ref usart_cr1_mode. */ void usart_set_mode(uint32_t usart, uint32_t mode) { USART_CR1(usart) = (USART_CR1(usart) & ~USART_MODE) | mode; } /*---------------------------------------------------------------------------*/ /** @brief USART Set Hardware Flow Control. * * The flow control bit can be selected as none, RTS, CTS or RTS+CTS. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] flowcontrol unsigned 32 bit. Flowcontrol @ref * usart_cr3_flowcontrol. */ void usart_set_flow_control(uint32_t usart, uint32_t flowctrl) { USART_CR3(usart) = (USART_CR3(usart) & ~USART_FLOWCONTROL) | flowctrl; } /*---------------------------------------------------------------------------*/ /** @brief USART Enable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_enable(uint32_t usart) { USART_CR1(usart) |= USART_CR1_UE; } /*---------------------------------------------------------------------------*/ /** @brief USART Disable. * * At the end of the current frame, the USART is disabled to reduce power. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_UE; } /*---------------------------------------------------------------------------*/ /** @brief USART Send a Data Word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] data unsigned 16 bit. */ void usart_send(uint32_t usart, uint8_t data) { USART_TDR(usart) = data; } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Received Data Word. * * If parity is enabled the MSB (bit 7 or 8 depending on the word length) is * the parity bit. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @returns unsigned 16 bit data word. */ uint8_t usart_recv(uint32_t usart) { /* Receive data. */ return USART_RDR(usart); } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Transmit Data Buffer Empty * * Blocks until the transmit data buffer becomes empty and is ready to accept * the next data word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_wait_send_ready(uint32_t usart) { /* Wait until the data has been transferred into the shift register. */ while ((USART_ISR(usart) & USART_ISR_TXE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Received Data Available * * Blocks until the receive data buffer holds a valid received data word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_wait_recv_ready(uint32_t usart) { /* Wait until the data is ready to be received. */ while ((USART_ISR(usart) & USART_ISR_RXNE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Send Data Word with Blocking * * Blocks until the transmit data buffer becomes empty then writes the next * data word for transmission. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] data unsigned 16 bit. */ void usart_send_blocking(uint32_t usart, uint8_t data) { usart_wait_send_ready(usart); usart_send(usart, data); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Received Data Word with Blocking. * * Wait until a data word has been received then return the word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @returns unsigned 16 bit data word. */ uint8_t usart_recv_blocking(uint32_t usart) { usart_wait_recv_ready(usart); return usart_recv(usart); } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver DMA Enable. * * DMA is available on: * @li USART1 Rx DMA1 channel 3 or 5. * @li USART2 Rx DMA1 channel 5. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_enable_rx_dma(uint32_t usart) { USART_CR3(usart) |= USART_CR3_DMAR; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver DMA Disable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable_rx_dma(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_DMAR; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter DMA Enable. * * DMA is available on: * @li USART1 Tx DMA1 channel 2 or 4. * @li USART2 Tx DMA1 channel 4. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_enable_tx_dma(uint32_t usart) { USART_CR3(usart) |= USART_CR3_DMAT; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter DMA Disable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable_tx_dma(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_DMAT; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver Interrupt Enable. @param[in] usart unsigned 32 bit. USART block register address base @ref usart_reg_base */ void usart_enable_rx_interrupt(uint32_t usart) { USART_CR1(usart) |= USART_CR1_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Receiver Interrupt Disable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable_rx_interrupt(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_RXNEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter Interrupt Enable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_enable_tx_interrupt(uint32_t usart) { USART_CR1(usart) |= USART_CR1_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Transmitter Interrupt Disable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable_tx_interrupt(uint32_t usart) { USART_CR1(usart) &= ~USART_CR1_TXEIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Error Interrupt Enable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_enable_error_interrupt(uint32_t usart) { USART_CR3(usart) |= USART_CR3_EIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Error Interrupt Disable. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_disable_error_interrupt(uint32_t usart) { USART_CR3(usart) &= ~USART_CR3_EIE; } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Status Flag. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. * @returns boolean: flag set. */ bool usart_get_flag(uint32_t usart, uint32_t flag) { return ((USART_ISR(usart) & flag) != 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Return Interrupt Source. * * Returns true if the specified interrupt flag (IDLE, RXNE, TC, TXE or OE) was * set and the interrupt was enabled. If the specified flag is not an interrupt * flag, the function returns false. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. * @returns boolean: flag and interrupt enable both set. */ bool usart_get_interrupt_source(uint32_t usart, uint32_t flag) { uint32_t flag_set = (USART_ISR(usart) & flag); /* IDLE, RXNE, TC, TXE interrupts */ if ((flag >= USART_ISR_IDLE) && (flag <= USART_ISR_TXE)) { return ((flag_set & USART_CR1(usart)) != 0); /* Overrun error */ } else if (flag == USART_ISR_ORE) { return flag_set && (USART_CR3(usart) & USART_CR3_CTSIE); } return false; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f1/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32f1 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F1 # ARFLAGS = rcsv ARFLAGS = rcs OBJS = adc.o can.o desig.o ethernet.o flash.o gpio.o \ rcc.o rtc.o timer.o OBJS += crc_common_all.o dac_common_all.o dma_common_l1f013.o \ gpio_common_all.o i2c_common_all.o iwdg_common_all.o \ pwr_common_all.o spi_common_all.o spi_common_f124.o \ timer_common_all.o usart_common_all.o usart_common_f124.o \ exti_common_all.o OBJS += usb.o usb_control.o usb_standard.o usb_f103.o usb_f107.o \ usb_fx07_common.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/adc.c ================================================ /** @defgroup STM32F1xx_adc_file ADC @ingroup STM32F1xx @brief libopencm3 STM32F1xx Analog to Digital Converters @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Edward Cheeseman @author @htmlonly © @endhtmlonly 2012 Ken Sarkies @date 18 August 2012 This library supports the A/D Converter Control System in the STM32F1xx series of ARM Cortex Microcontrollers by ST Microelectronics. Devices can have up to three A/D converters each with their own set of registers. However all the A/D converters share a common clock which is prescaled from the APB2 clock by default by a minimum factor of 2 to a maximum of 8. Each A/D converter has up to 18 channels: @li On ADC1 the analog channels 16 and 17 are internally connected to the temperature sensor and VREFINT, respectively. @li On ADC2 the analog channels 16 and 17 are internally connected to VSS. @li On ADC3 the analog channels 9, 14, 15, 16 and 17 are internally connected to VSS. The conversions can occur as a one-off conversion whereby the process stops once conversion is complete. The conversions can also be continuous wherein a new conversion starts immediately the previous conversion has ended. Conversion can occur as a single channel conversion or a scan of a group of channels in either continuous or one-off mode. If more than one channel is converted in a scan group, DMA must be used to transfer the data as there is only one result register available. An interrupt can be set to occur at the end of conversion, which occurs after all channels have been scanned. A discontinuous mode allows a subgroup of group of a channels to be converted in bursts of a given length. Injected conversions allow a second group of channels to be converted separately from the regular group. An interrupt can be set to occur at the end of conversion, which occurs after all channels have been scanned. @section adc_api_ex Basic ADC Handling API. Example 1: Simple single channel conversion polled. Enable the peripheral clock and ADC, reset ADC and set the prescaler divider. Set dual mode to independent (default). Enable triggering for a software trigger. @code rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN); adc_off(ADC1); rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST); rcc_peripheral_clear_reset(&RCC_APB2RSTR, RCC_APB2RSTR_ADC1RST); rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV2); adc_set_dual_mode(ADC_CR1_DUALMOD_IND); adc_disable_scan_mode(ADC1); adc_set_single_conversion_mode(ADC1); adc_set_sample_time(ADC1, ADC_CHANNEL0, ADC_SMPR1_SMP_1DOT5CYC); adc_set_single_channel(ADC1, ADC_CHANNEL0); adc_enable_trigger(ADC1, ADC_CR2_EXTSEL_SWSTART); adc_power_on(ADC1); adc_reset_calibration(ADC1); adc_calibration(ADC1); adc_start_conversion_regular(ADC1); while (! adc_eoc(ADC1)); reg16 = adc_read_regular(ADC1); @endcode LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Edward Cheeseman * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* * Basic ADC handling API. * * Examples: * rcc_peripheral_enable_clock(&RCC_APB2ENR, ADC1EN); * rcc_peripheral_disable_clock(&RCC_APB2ENR, ADC1EN); * rcc_peripheral_reset(&RCC_APB2RSTR, ADC1RST); * rcc_peripheral_clear_reset(&RCC_APB2RSTR, ADC1RST); * * rcc_set_adc_clk(ADC_PRE_PLCK2_DIV2); * adc_set_dual_mode(ADC1, TODO); * reg16 = adc_read(ADC1, ADC_CH_0); */ /**@{*/ #include /*---------------------------------------------------------------------------*/ /** @brief ADC Power On If the ADC is in power-down mode then it is powered up. The application needs to wait a time of about 3 microseconds for stabilization before using the ADC. If the ADC is already on this function call has no effect. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_power_on(uint32_t adc) { if (!(ADC_CR2(adc) & ADC_CR2_ADON)) { ADC_CR2(adc) |= ADC_CR2_ADON; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Start a Conversion Without Trigger This initiates a conversion by software without a trigger. The ADC needs to be powered on before this is called, otherwise this function has no effect. Note that this is not available in other STM32F families. To ensure code compatibility, enable triggering and use a software trigger source @see adc_start_conversion_regular. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_start_conversion_direct(uint32_t adc) { if (ADC_CR2(adc) & ADC_CR2_ADON) { ADC_CR2(adc) |= ADC_CR2_ADON; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Dual A/D Mode The dual mode uses ADC1 as master and ADC2 in a slave arrangement. This setting is applied to ADC1 only. Start of conversion when triggered can cause simultaneous conversion with ADC2, or alternate conversion. Regular and injected conversions can be configured, each one being separately simultaneous or alternate. Fast interleaved mode starts ADC1 immediately on trigger, and ADC2 seven clock cycles later. Slow interleaved mode starts ADC1 immediately on trigger, and ADC2 fourteen clock cycles later, followed by ADC1 fourteen cycles later again. This can only be used on a single channel. Alternate trigger mode must occur on an injected channel group, and alternates between the ADCs on each trigger. Note that sampling must not overlap between ADCs on the same channel. Dual A/D converter modes possible: @li IND: Independent mode. @li CRSISM: Combined regular simultaneous + injected simultaneous mode. @li CRSATM: Combined regular simultaneous + alternate trigger mode. @li CISFIM: Combined injected simultaneous + fast interleaved mode. @li CISSIM: Combined injected simultaneous + slow interleaved mode. @li ISM: Injected simultaneous mode only. @li RSM: Regular simultaneous mode only. @li FIM: Fast interleaved mode only. @li SIM: Slow interleaved mode only. @li ATM: Alternate trigger mode only. @param[in] mode Unsigned int32. Dual mode selection from @ref adc_cr1_dualmod */ void adc_set_dual_mode(uint32_t mode) { ADC1_CR1 |= mode; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag This flag is set after all channels of a regular or injected group have been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @returns bool. End of conversion flag. */ bool adc_eoc(uint32_t adc) { return ((ADC_SR(adc) & ADC_SR_EOC) != 0); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag for Injected Conversion This flag is set after all channels of an injected group have been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @returns bool. End of conversion flag. */ bool adc_eoc_injected(uint32_t adc) { return ((ADC_SR(adc) & ADC_SR_JEOC) != 0); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from the Regular Conversion Result Register The result read back is 12 bits, right or left aligned within the first 16 bits. For ADC1 only, the higher 16 bits will hold the result from ADC2 if an appropriate dual mode has been set @see adc_set_dual_mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @returns Unsigned int32 conversion result. */ uint32_t adc_read_regular(uint32_t adc) { return ADC_DR(adc); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from an Injected Conversion Result Register The result read back from the selected injected result register (one of four) is 12 bits, right or left aligned within the first 16 bits. The result can have a negative value if the injected channel offset has been set @see adc_set_injected_offset. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] reg Unsigned int8. Register number (1 ... 4). @returns Unsigned int32 conversion result. */ uint32_t adc_read_injected(uint32_t adc, uint8_t reg) { switch (reg) { case 1: return ADC_JDR1(adc); case 2: return ADC_JDR2(adc); case 3: return ADC_JDR3(adc); case 4: return ADC_JDR4(adc); } return 0; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Injected Channel Data Offset This value is subtracted from the injected channel results after conversion is complete, and can result in negative results. A separate value can be specified for each injected data register. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] reg Unsigned int8. Register number (1 ... 4). @param[in] offset Unsigned int32. */ void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset) { switch (reg) { case 1: ADC_JOFR1(adc) = offset; break; case 2: ADC_JOFR2(adc) = offset; break; case 3: ADC_JOFR3(adc) = offset; break; case 4: ADC_JOFR4(adc) = offset; break; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Regular Conversions The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_analog_watchdog_regular(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_AWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog for Regular Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_analog_watchdog_regular(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Injected Conversions The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_analog_watchdog_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JAWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog for Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_analog_watchdog_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JAWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Regular Conversions In this mode the ADC converts, on each trigger, a subgroup of up to 8 of the defined regular channel group. The subgroup is defined by the number of consecutive channels to be converted. After a subgroup has been converted the next trigger will start conversion of the immediately following subgroup of the same length or until the whole group has all been converted. When the the whole group has been converted, the next trigger will restart conversion of the subgroup at the beginning of the whole group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] length Unsigned int8. Number of channels in the group @ref adc_cr1_discnum. */ void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length) { if ((length-1) > 7) { return; } ADC_CR1(adc) |= ADC_CR1_DISCEN; ADC_CR1(adc) |= ((length-1) << ADC_CR1_DISCNUM_SHIFT); } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Regular Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_discontinuous_mode_regular(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_DISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Injected Conversions In this mode the ADC converts sequentially one channel of the defined group of injected channels, cycling back to the first channel in the group once the entire group has been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_discontinuous_mode_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_discontinuous_mode_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Automatic Injected Conversions The ADC converts a defined injected group of channels immediately after the regular channels have been converted. The external trigger on the injected channels is disabled as required. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_automatic_injected_group_conversion(uint32_t adc) { adc_disable_external_trigger_injected(adc); ADC_CR1(adc) |= ADC_CR1_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Automatic Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_automatic_injected_group_conversion(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for All Regular and/or Injected Channels The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @note The analog watchdog must be enabled for either or both of the regular or injected channels. If neither are enabled, the analog watchdog feature will be disabled. @ref adc_enable_analog_watchdog_injected, @ref adc_enable_analog_watchdog_regular. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for a Selected Channel The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @note The analog watchdog must be enabled for either or both of the regular or injected channels. If neither are enabled, the analog watchdog feature will be disabled. If both are enabled, the same channel number is monitored. @ref adc_enable_analog_watchdog_injected, @ref adc_enable_analog_watchdog_regular. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] channel Unsigned int8. ADC channel number @ref adc_watchdog_channel. */ void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel) { uint32_t reg32; reg32 = (ADC_CR1(adc) & 0xffffffe0); /* Clear bits [4:0]. */ if (channel < 18) { reg32 |= channel; } ADC_CR1(adc) = reg32; ADC_CR1(adc) |= ADC_CR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Scan Mode In this mode a conversion consists of a scan of the predefined set of channels, regular and injected, each channel conversion immediately following the previous one. It can use single, continuous or discontinuous mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_scan_mode(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_SCAN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Scan Mode @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_scan_mode(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_SCAN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Injected End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_eoc_interrupt_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Injected End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_eoc_interrupt_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_awd_interrupt(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_awd_interrupt(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Regular End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_eoc_interrupt(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_eoc_interrupt(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The Temperature Sensor This enables both the sensor and the reference voltage measurements on channels 16 and 17. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_temperature_sensor(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_TSVREFE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The Temperature Sensor Disabling this will reduce power consumption from the sensor and the reference voltage measurements. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_temperature_sensor(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_TSVREFE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Regular Channels This starts conversion on a set of defined regular channels if the ADC trigger is set to be a software trigger. It is cleared by hardware once conversion starts. Note this is a software trigger and requires triggering to be enabled and the trigger source to be set appropriately otherwise conversion will not start. This is not the same as the ADC start conversion operation. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_start_conversion_regular(uint32_t adc) { /* Start conversion on regular channels. */ ADC_CR2(adc) |= ADC_CR2_SWSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR2(adc) & ADC_CR2_SWSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Injected Channels This starts conversion on a set of defined injected channels if the ADC trigger is set to be a software trigger. It is cleared by hardware once conversion starts. Note this is a software trigger and requires triggering to be enabled and the trigger source to be set appropriately otherwise conversion will not start. This is not the same as the ADC start conversion operation. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_start_conversion_injected(uint32_t adc) { /* Start conversion on injected channels. */ ADC_CR2(adc) |= ADC_CR2_JSWSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR2(adc) & ADC_CR2_JSWSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Regular Channels This enables an external trigger for set of defined regular channels. For ADC1 and ADC2 @li Timer 1 CC1 event @li Timer 1 CC2 event @li Timer 1 CC3 event @li Timer 2 CC2 event @li Timer 3 TRGO event @li Timer 4 CC4 event @li EXTI (TIM8_TRGO is also possible on some devices, see datasheet) @li Software Start For ADC3 @li Timer 3 CC1 event @li Timer 2 CC3 event @li Timer 1 CC3 event @li Timer 8 CC1 event @li Timer 8 TRGO event @li Timer 5 CC1 event @li Timer 5 CC3 event @li Software Start @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] trigger Unsigned int8. Trigger identifier @ref adc_trigger_regular_12 for ADC1 and ADC2, or @ref adc_trigger_regular_3 for ADC3. */ void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger) { uint32_t reg32; reg32 = (ADC_CR2(adc) & ~(ADC_CR2_EXTSEL_MASK)); reg32 |= (trigger); ADC_CR2(adc) = reg32; ADC_CR2(adc) |= ADC_CR2_EXTTRIG; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Regular Channels @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_external_trigger_regular(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_EXTTRIG; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Injected Channels This enables an external trigger for set of defined injected channels. For ADC1 and ADC2 @li Timer 1 TRGO event @li Timer 1 CC4 event @li Timer 2 TRGO event @li Timer 2 CC1 event @li Timer 3 CC4 event @li Timer 4 TRGO event @li EXTI (TIM8 CC4 is also possible on some devices, see datasheet) @li Software Start For ADC3 @li Timer 1 TRGO event @li Timer 1 CC4 event @li Timer 4 CC3 event @li Timer 8 CC2 event @li Timer 8 CC4 event @li Timer 5 TRGO event @li Timer 5 CC4 event @li Software Start @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] trigger Unsigned int8. Trigger identifier @ref adc_trigger_injected_12 for ADC1 and ADC2, or @ref adc_trigger_injected_3 for ADC3. */ void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger) { uint32_t reg32; reg32 = (ADC_CR2(adc) & ~(ADC_CR2_JEXTSEL_MASK)); /* Clear bits [12:14] */ reg32 |= (trigger); ADC_CR2(adc) = reg32; ADC_CR2(adc) |= ADC_CR2_JEXTTRIG; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Injected Channels @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_external_trigger_injected(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_JEXTTRIG; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Left Aligned @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_set_left_aligned(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Right Aligned @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_set_right_aligned(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable DMA Transfers Only available for ADC1 through DMA1 channel1, and ADC3 through DMA2 channel5. ADC2 will use DMA if it is set as slave in dual mode with ADC1 in DMA transfer mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_enable_dma(uint32_t adc) { if ((adc == ADC1) | (adc == ADC3)) { ADC_CR2(adc) |= ADC_CR2_DMA; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable DMA Transfers @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_disable_dma(uint32_t adc) { if ((adc == ADC1) | (adc == ADC3)) { ADC_CR2(adc) &= ~ADC_CR2_DMA; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Initialize Calibration Registers This resets the calibration registers. It is not clear if this is required to be done before every calibration operation. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_reset_calibration(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_RSTCAL; while (ADC_CR2(adc) & ADC_CR2_RSTCAL); } /*---------------------------------------------------------------------------*/ /** @brief ADC Calibration The calibration data for the ADC is recomputed. The hardware clears the calibration status flag when calibration is complete. This function does not return until this happens and the ADC is ready for use. The ADC must have been powered down for at least 2 ADC clock cycles, then powered on. before calibration starts @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_calibration(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_CAL; while (ADC_CR2(adc) & ADC_CR2_CAL); } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Continuous Conversion Mode In this mode the ADC starts a new conversion of a single channel or a channel group immediately following completion of the previous channel group conversion. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_set_continuous_conversion_mode(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Single Conversion Mode In this mode the ADC performs a conversion of one channel or a channel group and stops. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_set_single_conversion_mode(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Power On If the ADC is in power-down mode then it is powered up. The application needs to wait a time of about 3 microseconds for stabilization before using the ADC. If the ADC is already on this function call will initiate a conversion. @deprecated to be removed in a later release @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_on(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_ADON; } /*---------------------------------------------------------------------------*/ /** @brief ADC Off Turn off the ADC to reduce power consumption to a few microamps. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. */ void adc_off(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_ADON; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for a Single Channel The sampling time can be selected in ADC clock cycles from 1.5 to 239.5. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] channel Unsigned int8. ADC Channel integer 0..18 or from @ref adc_channel. @param[in] time Unsigned int8. Sampling time selection from @ref adc_sample_rg. */ void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time) { uint32_t reg32; if (channel < 10) { reg32 = ADC_SMPR2(adc); reg32 &= ~(0x7 << (channel * 3)); reg32 |= (time << (channel * 3)); ADC_SMPR2(adc) = reg32; } else { reg32 = ADC_SMPR1(adc); reg32 &= ~(0x7 << ((channel - 10) * 3)); reg32 |= (time << ((channel - 10) * 3)); ADC_SMPR1(adc) = reg32; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for All Channels The sampling time can be selected in ADC clock cycles from 1.5 to 239.5, same for all channels. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] time Unsigned int8. Sampling time selection from @ref adc_sample_rg. */ void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time) { uint8_t i; uint32_t reg32 = 0; for (i = 0; i <= 9; i++) { reg32 |= (time << (i * 3)); } ADC_SMPR2(adc) = reg32; for (i = 10; i <= 17; i++) { reg32 |= (time << ((i - 10) * 3)); } ADC_SMPR1(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Upper Threshold @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] threshold Unsigned int8. Upper threshold value. */ void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold) { uint32_t reg32 = 0; reg32 = (uint32_t)threshold; reg32 &= ~0xfffff000; /* Clear all bits above 11. */ ADC_HTR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Lower Threshold @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] threshold Unsigned int8. Lower threshold value. */ void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold) { uint32_t reg32 = 0; reg32 = (uint32_t)threshold; reg32 &= ~0xfffff000; /* Clear all bits above 11. */ ADC_LTR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set a Regular Channel Conversion Sequence Define a sequence of channels to be converted as a regular group with a length from 1 to 16 channels. If this is called during conversion, the current conversion is reset and conversion begins again with the newly defined group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] length Unsigned int8. Number of channels in the group. @param[in] channel Unsigned int8[]. Set of channels in sequence, integers 0..18. */ void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32_1 = 0, reg32_2 = 0, reg32_3 = 0; uint8_t i = 0; /* Maximum sequence length is 16 channels. */ if (length > 16) { return; } for (i = 1; i <= length; i++) { if (i <= 6) { reg32_3 |= (channel[i - 1] << ((i - 1) * 5)); } if ((i > 6) & (i <= 12)) { reg32_2 |= (channel[i - 1] << ((i - 6 - 1) * 5)); } if ((i > 12) & (i <= 16)) { reg32_1 |= (channel[i - 1] << ((i - 12 - 1) * 5)); } } reg32_1 |= ((length - 1) << ADC_SQR1_L_LSB); ADC_SQR1(adc) = reg32_1; ADC_SQR2(adc) = reg32_2; ADC_SQR3(adc) = reg32_3; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set an Injected Channel Conversion Sequence Defines a sequence of channels to be converted as an injected group with a length from 1 to 4 channels. If this is called during conversion, the current conversion is reset and conversion begins again with the newly defined group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base. @param[in] length Unsigned int8. Number of channels in the group. @param[in] channel Unsigned int8[]. Set of channels in sequence, integers 0..18. */ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32 = 0; uint8_t i = 0; /* Maximum sequence length is 4 channels. */ if (length > 4) { return; } for (i = 1; i <= length; i++) { reg32 |= (channel[4 - i] << ((4 - i) * 5)); } reg32 |= ((length - 1) << ADC_JSQR_JL_LSB); ADC_JSQR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /* Aliases */ #ifdef __GNUC__ void adc_set_continous_conversion_mode(uint32_t adc) __attribute__((alias("adc_set_continuous_conversion_mode"))); void adc_set_conversion_time(uint32_t adc, uint8_t channel, uint8_t time) __attribute__((alias("adc_set_sample_time"))); void adc_set_conversion_time_on_all_channels(uint32_t adc, uint8_t time) __attribute__((alias("adc_set_sample_time_on_all_channels"))); void adc_enable_jeoc_interrupt(uint32_t adc) __attribute__((alias("adc_enable_eoc_interrupt_injected"))); void adc_disable_jeoc_interrupt(uint32_t adc) __attribute__((alias("adc_disable_eoc_interrupt_injected"))); #endif /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f1/crc.c ================================================ /** @defgroup crc_file CRC @ingroup STM32F1xx @brief libopencm3 STM32F1xx CRC @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/dac.c ================================================ /** @defgroup dac_file DAC @ingroup STM32F1xx @brief libopencm3 STM32F1xx DAC @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/dma.c ================================================ /** @defgroup dma_file DMA @ingroup STM32F1xx @brief libopencm3 STM32F1xx DMA @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/ethernet.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void eth_smi_write(uint8_t phy, uint8_t reg, uint16_t data) { /* Set PHY and register addresses for write access. */ ETH_MACMIIAR &= ~(ETH_MACMIIAR_MR | ETH_MACMIIAR_PA); ETH_MACMIIAR |= (phy << 11) | (reg << 6) | ETH_MACMIIAR_MW; /* Set register value. */ ETH_MACMIIDR = data; /* Begin transaction. */ ETH_MACMIIAR |= ETH_MACMIIAR_MB; /* Wait for not busy. */ while (ETH_MACMIIAR & ETH_MACMIIAR_MB); } uint16_t eth_smi_read(uint8_t phy, uint8_t reg) { /* Set PHY and register addresses for write access. */ ETH_MACMIIAR &= ~(ETH_MACMIIAR_MR | ETH_MACMIIAR_PA | ETH_MACMIIAR_MW); ETH_MACMIIAR |= (phy << 11) | (reg << 6); /* Begin transaction. */ ETH_MACMIIAR |= ETH_MACMIIAR_MB; /* Wait for not busy. */ while (ETH_MACMIIAR & ETH_MACMIIAR_MB); /* Set register value. */ return (uint16_t)(ETH_MACMIIDR); } ================================================ FILE: firmware/libopencm3/lib/stm32/f1/flash.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void flash_prefetch_buffer_enable(void) { FLASH_ACR |= FLASH_ACR_PRFTBE; } void flash_prefetch_buffer_disable(void) { FLASH_ACR &= ~FLASH_ACR_PRFTBE; } void flash_halfcycle_enable(void) { FLASH_ACR |= FLASH_ACR_HLFCYA; } void flash_halfcycle_disable(void) { FLASH_ACR &= ~FLASH_ACR_HLFCYA; } void flash_set_ws(uint32_t ws) { uint32_t reg32; reg32 = FLASH_ACR; reg32 &= ~((1 << 0) | (1 << 1) | (1 << 2)); reg32 |= ws; FLASH_ACR = reg32; } void flash_unlock(void) { /* Clear the unlock state. */ FLASH_CR |= FLASH_CR_LOCK; /* Authorize the FPEC access. */ FLASH_KEYR = FLASH_KEYR_KEY1; FLASH_KEYR = FLASH_KEYR_KEY2; } void flash_lock(void) { FLASH_CR |= FLASH_CR_LOCK; } void flash_clear_pgerr_flag(void) { FLASH_SR |= FLASH_SR_PGERR; } void flash_clear_eop_flag(void) { FLASH_SR |= FLASH_SR_EOP; } void flash_clear_wrprterr_flag(void) { FLASH_SR |= FLASH_SR_WRPRTERR; } void flash_clear_bsy_flag(void) { FLASH_SR &= ~FLASH_SR_BSY; } void flash_clear_status_flags(void) { flash_clear_pgerr_flag(); flash_clear_eop_flag(); flash_clear_wrprterr_flag(); flash_clear_bsy_flag(); } uint32_t flash_get_status_flags(void) { return FLASH_SR &= (FLASH_SR_PGERR | FLASH_SR_EOP | FLASH_SR_WRPRTERR | FLASH_SR_BSY); } void flash_unlock_option_bytes(void) { /* F1 uses same keys for flash and option */ FLASH_OPTKEYR = FLASH_KEYR_KEY1; FLASH_OPTKEYR = FLASH_KEYR_KEY2; } void flash_wait_for_last_operation(void) { while ((FLASH_SR & FLASH_SR_BSY) == FLASH_SR_BSY); } void flash_program_word(uint32_t address, uint32_t data) { /* Ensure that all flash operations are complete. */ flash_wait_for_last_operation(); /* Enable writes to flash. */ FLASH_CR |= FLASH_CR_PG; /* Program the first half of the word. */ MMIO16(address) = (uint16_t)data; /* Wait for the write to complete. */ flash_wait_for_last_operation(); /* Program the second half of the word. */ MMIO16(address + 2) = data >> 16; /* Wait for the write to complete. */ flash_wait_for_last_operation(); /* Disable writes to flash. */ FLASH_CR &= ~FLASH_CR_PG; } void flash_program_half_word(uint32_t address, uint16_t data) { flash_wait_for_last_operation(); FLASH_CR |= FLASH_CR_PG; MMIO16(address) = data; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_PG; /* Disable the PG bit. */ } void flash_erase_page(uint32_t page_address) { flash_wait_for_last_operation(); FLASH_CR |= FLASH_CR_PER; FLASH_AR = page_address; FLASH_CR |= FLASH_CR_STRT; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_PER; } void flash_erase_all_pages(void) { flash_wait_for_last_operation(); FLASH_CR |= FLASH_CR_MER; /* Enable mass erase. */ FLASH_CR |= FLASH_CR_STRT; /* Trigger the erase. */ flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_MER; /* Disable mass erase. */ } void flash_erase_option_bytes(void) { flash_wait_for_last_operation(); if ((FLASH_CR & FLASH_CR_OPTWRE) == 0) { flash_unlock_option_bytes(); } FLASH_CR |= FLASH_CR_OPTER; /* Enable option byte erase. */ FLASH_CR |= FLASH_CR_STRT; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_OPTER; /* Disable option byte erase. */ } void flash_program_option_bytes(uint32_t address, uint16_t data) { flash_wait_for_last_operation(); if ((FLASH_CR & FLASH_CR_OPTWRE) == 0) { flash_unlock_option_bytes(); } FLASH_CR |= FLASH_CR_OPTPG; /* Enable option byte programming. */ MMIO16(address) = data; flash_wait_for_last_operation(); FLASH_CR &= ~FLASH_CR_OPTPG; /* Disable option byte programming. */ } ================================================ FILE: firmware/libopencm3/lib/stm32/f1/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup STM32F1xx @brief libopencm3 STM32F1xx General Purpose I/O @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2012 Ken Sarkies @date 18 August 2012 Each I/O port has 16 individually configurable bits. Many I/O pins share GPIO functionality with a number of alternate functions and must be configured to the alternate function mode if these are to be accessed. A feature is available to remap alternative functions to a limited set of alternative pins in the event of a clash of requirements. The data registers associated with each port for input and output are 32 bit with the upper 16 bits unused. The output buffer must be written as a 32 bit word, but individual bits may be set or reset separately in atomic operations to avoid race conditions during interrupts. Bits may also be individually locked to prevent accidental configuration changes. Once locked the configuration cannot be changed until after the next reset. Each port bit can be configured as analog or digital input, the latter can be floating or pulled up or down. As outputs they can be configured as either push-pull or open drain, digital I/O or alternate function, and with maximum output speeds of 2MHz, 10MHz, or 50MHz. On reset all ports are configured as digital floating input. @section gpio_api_ex Basic GPIO Handling API. Example 1: Push-pull digital output actions on ports C2 and C9 @code gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO2 | GPIO9); gpio_set(GPIOC, GPIO2 | GPIO9); gpio_clear(GPIOC, GPIO2); gpio_toggle(GPIOC, GPIO2 | GPIO9); gpio_port_write(GPIOC, 0x204); @endcode Example 1: Digital input on port C12 @code gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT, GPIO12); reg16 = gpio_port_read(GPIOC); @endcode LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief Set GPIO Pin Mode Sets the mode (input/output) and configuration (analog/digitial and open drain/push pull), for a set of GPIO pins on a given GPIO port. @param[in] gpioport Unsigned int32. Port identifier @ref gpio_port_id @param[in] mode Unsigned int8. Pin mode @ref gpio_mode @param[in] cnf Unsigned int8. Pin configuration @ref gpio_cnf @param[in] gpios Unsigned int16. Pin identifiers @ref gpio_pin_id If multiple pins are to be set, use logical OR '|' to separate them. */ void gpio_set_mode(uint32_t gpioport, uint8_t mode, uint8_t cnf, uint16_t gpios) { uint16_t i, offset = 0; uint32_t crl = 0, crh = 0, tmp32 = 0; /* * We want to set the config only for the pins mentioned in gpios, * but keeping the others, so read out the actual config first. */ crl = GPIO_CRL(gpioport); crh = GPIO_CRH(gpioport); /* Iterate over all bits, use i as the bitnumber. */ for (i = 0; i < 16; i++) { /* Only set the config if the bit is set in gpios. */ if (!((1 << i) & gpios)) { continue; } /* Calculate bit offset. */ offset = (i < 8) ? (i * 4) : ((i - 8) * 4); /* Use tmp32 to either modify crl or crh. */ tmp32 = (i < 8) ? crl : crh; /* Modify bits are needed. */ tmp32 &= ~(0xf << offset); /* Clear the bits first. */ tmp32 |= (mode << offset) | (cnf << (offset + 2)); /* Write tmp32 into crl or crh, leave the other unchanged. */ crl = (i < 8) ? tmp32 : crl; crh = (i >= 8) ? tmp32 : crh; } GPIO_CRL(gpioport) = crl; GPIO_CRH(gpioport) = crh; } /*---------------------------------------------------------------------------*/ /** @brief Map the EVENTOUT signal Enable the EVENTOUT signal and select the port and pin to be used. @param[in] evoutport Unsigned int8. Port for EVENTOUT signal @ref afio_evcr_port @param[in] evoutpin Unsigned int8. Pin for EVENTOUT signal @ref afio_evcr_pin */ void gpio_set_eventout(uint8_t evoutport, uint8_t evoutpin) { AFIO_EVCR = AFIO_EVCR_EVOE | evoutport | evoutpin; } /*---------------------------------------------------------------------------*/ /** @brief Map Alternate Function Port Bits (Main Set) A number of alternate function ports can be remapped to defined alternative port bits to avoid clashes in cases where multiple alternate functions are present. Refer to the datasheets for the particular mapping desired. This provides the main set of remap functionality. See @ref gpio_secondary_remap for a number of lesser used remaps. The AFIO remapping feature is used only with the STM32F10x series. @note The Serial Wire JTAG disable controls allow certain GPIO ports to become available in place of some of the SWJ signals. Full SWJ capability is obtained by setting this to zero. The value of this must be specified for every call to this function as its current value cannot be ascertained from the hardware. @param[in] swjdisable Unsigned int8. Disable parts of the SWJ capability @ref afio_swj_disable. @param[in] maps Unsigned int32. Logical OR of map enable controls from @ref afio_remap, @ref afio_remap_can1, @ref afio_remap_tim3, @ref afio_remap_tim2, @ref afio_remap_tim1, @ref afio_remap_usart3. For connectivity line devices only @ref afio_remap_cld are also available. */ void gpio_primary_remap(uint32_t swjdisable, uint32_t maps) { AFIO_MAPR |= (swjdisable & AFIO_MAPR_SWJ_MASK) | (maps & 0x1FFFFF); } /*---------------------------------------------------------------------------*/ /** @brief Map Alternate Function Port Bits (Secondary Set) A number of alternate function ports can be remapped to defined alternative port bits to avoid clashes in cases where multiple alternate functions are present. Refer to the datasheets for the particular mapping desired. This provides the second smaller and less used set of remap functionality. See @ref gpio_primary_remap for the main set of remaps. The AFIO remapping feature is used only with the STM32F10x series. @param[in] maps Unsigned int32. Logical OR of map enable controls from @ref afio_remap2 */ void gpio_secondary_remap(uint32_t maps) { AFIO_MAPR2 |= maps; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f1/i2c.c ================================================ /** @defgroup i2c_file I2C @ingroup STM32F1xx @brief libopencm3 STM32F1xx I2C @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/iwdg.c ================================================ /** @defgroup iwdg_file IWDG @ingroup STM32F1xx @brief libopencm3 STM32F1xx Independent Watchdog Timer @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/libopencm3_stm32f1.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/f1/pwr.c ================================================ /** @defgroup pwr-file PWR @ingroup STM32F1xx @brief libopencm3 STM32F1xx Power Control @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Ken Sarkies @date 18 August 2012 This library supports the power control system for the STM32F1 series of ARM Cortex Microcontrollers by ST Microelectronics. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f1/rcc.c ================================================ /** @defgroup STM32F1xx-rcc-file RCC @ingroup STM32F1xx @brief libopencm3 STM32F1xx Reset and Clock Control @version 1.0.0 @author @htmlonly © @endhtmlonly 2009 Federico Ruiz-Ugalde \ @author @htmlonly © @endhtmlonly 2009 Uwe Hermann @author @htmlonly © @endhtmlonly 2010 Thomas Otto @date 18 August 2012 This library supports the Reset and Clock Control System in the STM32F1xx series of ARM Cortex Microcontrollers by ST Microelectronics. @note Full support for connection line devices is not yet provided. Clock settings and resets for many peripherals are given here rather than in the corresponding peripheral library. The library also provides a number of common configurations for the processor system clock. Not all possible configurations are included. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include #include /** Default ppre1 peripheral clock frequency after reset. */ uint32_t rcc_ppre1_frequency = 8000000; /** Default ppre2 peripheral clock frequency after reset. */ uint32_t rcc_ppre2_frequency = 8000000; /*---------------------------------------------------------------------------*/ /** @brief RCC Clear the Oscillator Ready Interrupt Flag Clear the interrupt flag that was set when a clock oscillator became ready to use. @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_clear(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case PLL2: RCC_CIR |= RCC_CIR_PLL2RDYC; break; case PLL3: RCC_CIR |= RCC_CIR_PLL3RDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable the Oscillator Ready Interrupt @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_enable(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case PLL2: RCC_CIR |= RCC_CIR_PLL2RDYIE; break; case PLL3: RCC_CIR |= RCC_CIR_PLL3RDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable the Oscillator Ready Interrupt @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_ready_int_disable(osc_t osc) { switch (osc) { case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYIE; break; case PLL2: RCC_CIR &= ~RCC_CIR_PLL2RDYIE; break; case PLL3: RCC_CIR &= ~RCC_CIR_PLL3RDYIE; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYIE; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Read the Oscillator Ready Interrupt Flag @param[in] osc enum ::osc_t. Oscillator ID @returns int. Boolean value for flag set. */ int rcc_osc_ready_int_flag(osc_t osc) { switch (osc) { case PLL: return ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case PLL2: return ((RCC_CIR & RCC_CIR_PLL2RDYF) != 0); break; case PLL3: return ((RCC_CIR & RCC_CIR_PLL3RDYF) != 0); break; case HSE: return ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case HSI: return ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case LSE: return ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: return ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; } cm3_assert_not_reached(); } /*---------------------------------------------------------------------------*/ /** @brief RCC Clear the Clock Security System Interrupt Flag */ void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } /*---------------------------------------------------------------------------*/ /** @brief RCC Read the Clock Security System Interrupt Flag @returns int. Boolean value for flag set. */ int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } /*---------------------------------------------------------------------------*/ /** @brief RCC Wait for Oscillator Ready. @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_wait_for_osc_ready(osc_t osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) == 0); break; case PLL2: while ((RCC_CR & RCC_CR_PLL2RDY) == 0); break; case PLL3: while ((RCC_CR & RCC_CR_PLL3RDY) == 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) == 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) == 0); break; case LSE: while ((RCC_BDCR & RCC_BDCR_LSERDY) == 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) == 0); break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Turn on an Oscillator. Enable an oscillator and power on. Each oscillator requires an amount of time to settle to a usable state. Refer to datasheets for time delay information. A status flag is available to indicate when the oscillator becomes ready (see @ref rcc_osc_ready_int_flag and @ref rcc_wait_for_osc_ready). @note The LSE clock is in the backup domain and cannot be enabled until the backup domain write protection has been removed (see @ref pwr_disable_backup_domain_write_protect). @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_on(osc_t osc) { switch (osc) { case PLL: RCC_CR |= RCC_CR_PLLON; break; case PLL2: RCC_CR |= RCC_CR_PLL2ON; break; case PLL3: RCC_CR |= RCC_CR_PLL3ON; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Turn off an Oscillator. Disable an oscillator and power off. @note An oscillator cannot be turned off if it is selected as the system clock. @note The LSE clock is in the backup domain and cannot be disabled until the backup domain write protection has been removed (see @ref pwr_disable_backup_domain_write_protect) or the backup domain has been (see reset @ref rcc_backupdomain_reset). @param[in] osc enum ::osc_t. Oscillator ID */ void rcc_osc_off(osc_t osc) { switch (osc) { case PLL: RCC_CR &= ~RCC_CR_PLLON; break; case PLL2: RCC_CR &= ~RCC_CR_PLL2ON; break; case PLL3: RCC_CR &= ~RCC_CR_PLL3ON; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable the Clock Security System. */ void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable the Clock Security System. */ void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable Bypass. Enable an external clock to bypass the internal clock (high speed and low speed clocks only). The external clock must be enabled (see @ref rcc_osc_on) and the internal clock must be disabled (see @ref rcc_osc_off) for this to have effect. @note The LSE clock is in the backup domain and cannot be bypassed until the backup domain write protection has been removed (see @ref pwr_disable_backup_domain_write_protect). @param[in] osc enum ::osc_t. Oscillator ID. Only HSE and LSE have effect. */ void rcc_osc_bypass_enable(osc_t osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEBYP; break; case PLL: case PLL2: case PLL3: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable Bypass. Re-enable the internal clock (high speed and low speed clocks only). The internal clock must be disabled (see @ref rcc_osc_off) for this to have effect. @note The LSE clock is in the backup domain and cannot have bypass removed until the backup domain write protection has been removed (see @ref pwr_disable_backup_domain_write_protect) or the backup domain has been reset (see @ref rcc_backupdomain_reset). @param[in] osc enum ::osc_t. Oscillator ID. Only HSE and LSE have effect. */ void rcc_osc_bypass_disable(osc_t osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEBYP; break; case PLL: case PLL2: case PLL3: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } /*---------------------------------------------------------------------------*/ /** @brief RCC Enable Peripheral Clocks. Enable the clock on particular peripherals. There are three registers involved, each one controlling the enabling of clocks associated with the AHB, APB1 and APB2 respectively. Several peripherals could be enabled simultaneously only if they are controlled by the same register. @param[in] *reg Unsigned int32. Pointer to a Clock Enable Register (either RCC_AHBENR, RCC_APB1ENR or RCC_APB2ENR) @param[in] en Unsigned int32. Logical OR of all enables to be set @li If register is RCC_AHBER, from @ref rcc_ahbenr_en @li If register is RCC_APB1ENR, from @ref rcc_apb1enr_en @li If register is RCC_APB2ENR, from @ref rcc_apb2enr_en */ void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en) { *reg |= en; } /*---------------------------------------------------------------------------*/ /** @brief RCC Disable Peripheral Clocks. Enable the clock on particular peripherals. There are three registers involved, each one controlling the enabling of clocks associated with the AHB, APB1 and APB2 respectively. Several peripherals could be disabled simultaneously only if they are controlled by the same register. @param[in] *reg Unsigned int32. Pointer to a Clock Enable Register (either RCC_AHBENR, RCC_APB1ENR or RCC_APB2ENR) @param[in] en Unsigned int32. Logical OR of all enables to be used for disabling. @li If register is RCC_AHBER, from @ref rcc_ahbenr_en @li If register is RCC_APB1ENR, from @ref rcc_apb1enr_en @li If register is RCC_APB2ENR, from @ref rcc_apb2enr_en */ void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en) { *reg &= ~en; } /*---------------------------------------------------------------------------*/ /** @brief RCC Reset Peripherals. Reset particular peripherals. There are three registers involved, each one controlling reset of peripherals associated with the AHB, APB1 and APB2 respectively. Several peripherals could be reset simultaneously only if they are controlled by the same register. @param[in] *reg Unsigned int32. Pointer to a Reset Register (either RCC_AHBENR, RCC_APB1ENR or RCC_APB2ENR) @param[in] reset Unsigned int32. Logical OR of all resets. @li If register is RCC_AHBRSTR, from @ref rcc_ahbrstr_rst @li If register is RCC_APB1RSTR, from @ref rcc_apb1rstr_rst @li If register is RCC_APB2RSTR, from @ref rcc_apb2rstr_rst */ void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset) { *reg |= reset; } /*---------------------------------------------------------------------------*/ /** @brief RCC Remove Reset on Peripherals. Remove the reset on particular peripherals. There are three registers involved, each one controlling reset of peripherals associated with the AHB, APB1 and APB2 respectively. Several peripherals could have the reset removed simultaneously only if they are controlled by the same register. @param[in] *reg Unsigned int32. Pointer to a Reset Register (either RCC_AHBENR, RCC_APB1ENR or RCC_APB2ENR) @param[in] clear_reset Unsigned int32. Logical OR of all resets to be removed: @li If register is RCC_AHBRSTR, from @ref rcc_ahbrstr_rst @li If register is RCC_APB1RSTR, from @ref rcc_apb1rstr_rst @li If register is RCC_APB2RSTR, from @ref rcc_apb2rstr_rst */ void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset) { *reg &= ~clear_reset; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the Source for the System Clock. @param[in] clk Unsigned int32. System Clock Selection @ref rcc_cfgr_scs */ void rcc_set_sysclk_source(uint32_t clk) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 1) | (1 << 0)); RCC_CFGR = (reg32 | clk); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the PLL Multiplication Factor. @note This only has effect when the PLL is disabled. @param[in] mul Unsigned int32. PLL multiplication factor @ref rcc_cfgr_pmf */ void rcc_set_pll_multiplication_factor(uint32_t mul) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 21) | (1 << 20) | (1 << 19) | (1 << 18)); RCC_CFGR = (reg32 | (mul << 18)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the PLL2 Multiplication Factor. @note This only has effect when the PLL is disabled. @param[in] mul Unsigned int32. PLL multiplication factor @ref rcc_cfgr_pmf */ void rcc_set_pll2_multiplication_factor(uint32_t mul) { uint32_t reg32; reg32 = RCC_CFGR2; reg32 &= ~((1 << 11) | (1 << 10) | (1 << 9) | (1 << 8)); RCC_CFGR2 = (reg32 | (mul << 8)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the PLL3 Multiplication Factor. @note This only has effect when the PLL is disabled. @param[in] mul Unsigned int32. PLL multiplication factor @ref rcc_cfgr_pmf */ void rcc_set_pll3_multiplication_factor(uint32_t mul) { uint32_t reg32; reg32 = RCC_CFGR2; reg32 &= ~((1 << 15) | (1 << 14) | (1 << 13) | (1 << 12)); RCC_CFGR2 = (reg32 | (mul << 12)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the PLL Clock Source. @note This only has effect when the PLL is disabled. @param[in] pllsrc Unsigned int32. PLL clock source @ref rcc_cfgr_pcs */ void rcc_set_pll_source(uint32_t pllsrc) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~(1 << 16); RCC_CFGR = (reg32 | (pllsrc << 16)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the HSE Frequency Divider used as PLL Clock Source. @note This only has effect when the PLL is disabled. @param[in] pllxtpre Unsigned int32. HSE division factor @ref rcc_cfgr_hsepre */ void rcc_set_pllxtpre(uint32_t pllxtpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~(1 << 17); RCC_CFGR = (reg32 | (pllxtpre << 17)); } /*---------------------------------------------------------------------------*/ /** @brief ADC Setup the A/D Clock The ADC's have a common clock prescale setting. @param[in] adcpre uint32_t. Prescale divider taken from @ref rcc_cfgr_adcpre */ void rcc_set_adcpre(uint32_t adcpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 14) | (1 << 15)); RCC_CFGR = (reg32 | (adcpre << 14)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the APB2 Prescale Factor. @param[in] ppre2 Unsigned int32. APB2 prescale factor @ref rcc_cfgr_apb2pre */ void rcc_set_ppre2(uint32_t ppre2) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 11) | (1 << 12) | (1 << 13)); RCC_CFGR = (reg32 | (ppre2 << 11)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the APB1 Prescale Factor. @note The APB1 clock frequency must not exceed 36MHz. @param[in] ppre1 Unsigned int32. APB1 prescale factor @ref rcc_cfgr_apb1pre */ void rcc_set_ppre1(uint32_t ppre1) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 8) | (1 << 9) | (1 << 10)); RCC_CFGR = (reg32 | (ppre1 << 8)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the AHB Prescale Factor. @param[in] hpre Unsigned int32. AHB prescale factor @ref rcc_cfgr_ahbpre */ void rcc_set_hpre(uint32_t hpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); RCC_CFGR = (reg32 | (hpre << 4)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Set the USB Prescale Factor. The prescale factor can be set to 1 (no prescale) for use when the PLL clock is 48MHz, or 1.5 to generate the 48MHz USB clock from a 64MHz PLL clock. @note This bit cannot be reset while the USB clock is enabled. @param[in] usbpre Unsigned int32. USB prescale factor @ref rcc_cfgr_usbpre */ void rcc_set_usbpre(uint32_t usbpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~(1 << 22); RCC_CFGR = (reg32 | (usbpre << 22)); } void rcc_set_prediv1(uint32_t prediv) { uint32_t reg32; reg32 = RCC_CFGR2; reg32 &= ~(1 << 3) | (1 << 2) | (1 << 1) | (1 << 0); RCC_CFGR2 |= (reg32 | prediv); } void rcc_set_prediv2(uint32_t prediv) { uint32_t reg32; reg32 = RCC_CFGR2; reg32 &= ~(1 << 7) | (1 << 6) | (1 << 5) | (1 << 4); RCC_CFGR2 |= (reg32 | (prediv << 4)); } void rcc_set_prediv1_source(uint32_t rccsrc) { RCC_CFGR2 &= ~(1 << 16); RCC_CFGR2 |= (rccsrc << 16); } void rcc_set_mco(uint32_t mcosrc) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 27) | (1 << 26) | (1 << 25) | (1 << 24)); RCC_CFGR |= (reg32 | (mcosrc << 24)); } /*---------------------------------------------------------------------------*/ /** @brief RCC Get the System Clock Source. @returns Unsigned int32. System clock source: @li 00 indicates HSE @li 01 indicates LSE @li 02 indicates PLL */ uint32_t rcc_system_clock_source(void) { /* Return the clock source which is used as system clock. */ return (RCC_CFGR & 0x000c) >> 2; } /*---------------------------------------------------------------------------*/ /* * These functions are setting up the whole clock system for the most common * input clock and output clock configurations. */ /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 64MHz from HSI */ void rcc_clock_setup_in_hsi_out_64mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 64MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV8); /* Set. 8MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /* Set. 32MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 64MHz Max. 72MHz */ /* * Sysclk is running with 64MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_2WS); /* * Set the PLL multiplication factor to 16. * 8MHz (internal) * 16 (multiplier) / 2 (PLLSRC_HSI_CLK_DIV2) = 64MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL16); /* Select HSI/2 as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSI_CLK_DIV2); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 32000000; rcc_ppre2_frequency = 64000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 48MHz from HSI */ void rcc_clock_setup_in_hsi_out_48mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /*Set.48MHz Max.72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV8); /*Set. 6MHz Max.14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /*Set.24MHz Max.36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /*Set.48MHz Max.72MHz */ rcc_set_usbpre(RCC_CFGR_USBPRE_PLL_CLK_NODIV); /*Set.48MHz Max.48MHz */ /* * Sysclk runs with 48MHz -> 1 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_1WS); /* * Set the PLL multiplication factor to 12. * 8MHz (internal) * 12 (multiplier) / 2 (PLLSRC_HSI_CLK_DIV2) = 48MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL12); /* Select HSI/2 as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSI_CLK_DIV2); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 24000000; rcc_ppre2_frequency = 48000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 24MHz from HSI */ void rcc_clock_setup_in_hsi_out_24mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 24MHz Max. 24MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV2); /* Set. 12MHz Max. 12MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_NODIV); /* Set. 24MHz Max. 24MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 24MHz Max. 24MHz */ /* * Sysclk is (will be) running with 24MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_0WS); /* * Set the PLL multiplication factor to 6. * 8MHz (internal) * 6 (multiplier) / 2 (PLLSRC_HSI_CLK_DIV2) = 24MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL6); /* Select HSI/2 as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSI_CLK_DIV2); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 24000000; rcc_ppre2_frequency = 24000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 24MHz from HSE at 8MHz */ void rcc_clock_setup_in_hse_8mhz_out_24mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* Enable external high-speed oscillator 8MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSECLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 24MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV2); /* Set. 12MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_NODIV); /* Set. 24MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 24MHz Max. 72MHz */ /* * Sysclk runs with 24MHz -> 0 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_0WS); /* * Set the PLL multiplication factor to 3. * 8MHz (external) * 3 (multiplier) = 24MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL3); /* Select HSE as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSE_CLK); /* * External frequency undivided before entering PLL * (only valid/needed for HSE). */ rcc_set_pllxtpre(RCC_CFGR_PLLXTPRE_HSE_CLK); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 24000000; rcc_ppre2_frequency = 24000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 72MHz from HSE at 8MHz */ void rcc_clock_setup_in_hse_8mhz_out_72mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* Enable external high-speed oscillator 8MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSECLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 72MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV8); /* Set. 9MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /* Set. 36MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 72MHz Max. 72MHz */ /* * Sysclk runs with 72MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_2WS); /* * Set the PLL multiplication factor to 9. * 8MHz (external) * 9 (multiplier) = 72MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL9); /* Select HSE as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSE_CLK); /* * External frequency undivided before entering PLL * (only valid/needed for HSE). */ rcc_set_pllxtpre(RCC_CFGR_PLLXTPRE_HSE_CLK); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 36000000; rcc_ppre2_frequency = 72000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 24MHz from HSE at 12MHz */ void rcc_clock_setup_in_hse_12mhz_out_72mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* Enable external high-speed oscillator 16MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSECLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 72MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV6); /* Set. 12MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /* Set. 36MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 72MHz Max. 72MHz */ /* * Sysclk runs with 72MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_2WS); /* * Set the PLL multiplication factor to 9. * 12MHz (external) * 6 (multiplier) / 1 (PLLXTPRE_HSE_CLK) = 72MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL6); /* Select HSI as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSE_CLK); /* * Divide external frequency by 2 before entering PLL * (only valid/needed for HSE). */ rcc_set_pllxtpre(RCC_CFGR_PLLXTPRE_HSE_CLK); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 36000000; rcc_ppre2_frequency = 72000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 24MHz from HSE at 16MHz */ void rcc_clock_setup_in_hse_16mhz_out_72mhz(void) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* Enable external high-speed oscillator 16MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSECLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 72MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV6); /* Set. 12MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /* Set. 36MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 72MHz Max. 72MHz */ /* * Sysclk runs with 72MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_2WS); /* * Set the PLL multiplication factor to 9. * 16MHz (external) * 9 (multiplier) / 2 (PLLXTPRE_HSE_CLK_DIV2) = 72MHz */ rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL9); /* Select HSI as PLL source. */ rcc_set_pll_source(RCC_CFGR_PLLSRC_HSE_CLK); /* * Divide external frequency by 2 before entering PLL * (only valid/needed for HSE). */ rcc_set_pllxtpre(RCC_CFGR_PLLXTPRE_HSE_CLK_DIV2); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 36000000; rcc_ppre2_frequency = 72000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Set System Clock PLL at 72MHz from HSE at 25MHz */ void rcc_clock_setup_in_hse_25mhz_out_72mhz(void) { /* Enable external high-speed oscillator 25MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSECLK); /* * Sysclk runs with 72MHz -> 2 waitstates. * 0WS from 0-24MHz * 1WS from 24-48MHz * 2WS from 48-72MHz */ flash_set_ws(FLASH_ACR_LATENCY_2WS); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(RCC_CFGR_HPRE_SYSCLK_NODIV); /* Set. 72MHz Max. 72MHz */ rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV6); /* Set. 12MHz Max. 14MHz */ rcc_set_ppre1(RCC_CFGR_PPRE1_HCLK_DIV2); /* Set. 36MHz Max. 36MHz */ rcc_set_ppre2(RCC_CFGR_PPRE2_HCLK_NODIV); /* Set. 72MHz Max. 72MHz */ /* Set pll2 prediv and multiplier */ rcc_set_prediv2(RCC_CFGR2_PREDIV2_DIV5); rcc_set_pll2_multiplication_factor(RCC_CFGR2_PLL2MUL_PLL2_CLK_MUL8); /* Enable PLL2 oscillator and wait for it to stabilize */ rcc_osc_on(PLL2); rcc_wait_for_osc_ready(PLL2); /* Set pll1 prediv/multiplier, prediv1 src, and usb predivider */ rcc_set_pllxtpre(RCC_CFGR_PLLXTPRE_HSE_CLK); rcc_set_prediv1_source(RCC_CFGR2_PREDIV1SRC_PLL2_CLK); rcc_set_prediv1(RCC_CFGR2_PREDIV_DIV5); rcc_set_pll_multiplication_factor(RCC_CFGR_PLLMUL_PLL_CLK_MUL9); rcc_set_pll_source(RCC_CFGR_PLLSRC_PREDIV1_CLK); rcc_set_usbpre(RCC_CFGR_USBPRE_PLL_VCO_CLK_DIV3); /* enable PLL1 and wait for it to stabilize */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used */ rcc_ppre1_frequency = 36000000; rcc_ppre2_frequency = 72000000; } /*---------------------------------------------------------------------------*/ /** @brief RCC Reset the backup domain The backup domain register is reset to disable all controls. */ void rcc_backupdomain_reset(void) { /* Set the backup domain software reset. */ RCC_BDCR |= RCC_BDCR_BDRST; /* Clear the backup domain software reset. */ RCC_BDCR &= ~RCC_BDCR_BDRST; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f1/rtc.c ================================================ /** @defgroup rtc_file RTC @ingroup STM32F1xx @brief libopencm3 STM32F1xx RTC @author @htmlonly © @endhtmlonly 2010 Uwe Hermann @author @htmlonly © @endhtmlonly 2010 Lord James @version 1.0.0 @date 4 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Uwe Hermann * Copyright (C) 2010 Lord James * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include void rtc_awake_from_off(osc_t clock_source) { uint32_t reg32; /* Enable power and backup interface clocks. */ RCC_APB1ENR |= (RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN); /* Enable access to the backup registers and the RTC. */ PWR_CR |= PWR_CR_DBP; /* * Reset the backup domain, clears everything RTC related. * If not wanted use the rtc_awake_from_standby() function. */ rcc_backupdomain_reset(); switch (clock_source) { case LSE: /* Turn the LSE on and wait while it stabilises. */ RCC_BDCR |= RCC_BDCR_LSEON; while ((reg32 = (RCC_BDCR & RCC_BDCR_LSERDY)) == 0); /* Choose LSE as the RTC clock source. */ RCC_BDCR &= ~((1 << 8) | (1 << 9)); RCC_BDCR |= (1 << 8); break; case LSI: /* Turn the LSI on and wait while it stabilises. */ RCC_CSR |= RCC_CSR_LSION; while ((reg32 = (RCC_CSR & RCC_CSR_LSIRDY)) == 0); /* Choose LSI as the RTC clock source. */ RCC_BDCR &= ~((1 << 8) | (1 << 9)); RCC_BDCR |= (1 << 9); break; case HSE: /* Turn the HSE on and wait while it stabilises. */ RCC_CR |= RCC_CR_HSEON; while ((reg32 = (RCC_CR & RCC_CR_HSERDY)) == 0); /* Choose HSE as the RTC clock source. */ RCC_BDCR &= ~((1 << 8) | (1 << 9)); RCC_BDCR |= (1 << 9) | (1 << 8); break; case PLL: case PLL2: case PLL3: case HSI: /* Unusable clock source, here to prevent warnings. */ /* Turn off clock sources to RTC. */ RCC_BDCR &= ~((1 << 8) | (1 << 9)); break; } /* Enable the RTC. */ RCC_BDCR |= RCC_BDCR_RTCEN; /* Wait for the RSF bit in RTC_CRL to be set by hardware. */ RTC_CRL &= ~RTC_CRL_RSF; while ((reg32 = (RTC_CRL & RTC_CRL_RSF)) == 0); /* Wait for the last write operation to finish. */ /* TODO: Necessary? */ while ((reg32 = (RTC_CRL & RTC_CRL_RTOFF)) == 0); } void rtc_enter_config_mode(void) { uint32_t reg32; /* Wait until the RTOFF bit is 1 (no RTC register writes ongoing). */ while ((reg32 = (RTC_CRL & RTC_CRL_RTOFF)) == 0); /* Enter configuration mode. */ RTC_CRL |= RTC_CRL_CNF; } void rtc_exit_config_mode(void) { uint32_t reg32; /* Exit configuration mode. */ RTC_CRL &= ~RTC_CRL_CNF; /* Wait until the RTOFF bit is 1 (our RTC register write finished). */ while ((reg32 = (RTC_CRL & RTC_CRL_RTOFF)) == 0); } void rtc_set_alarm_time(uint32_t alarm_time) { rtc_enter_config_mode(); RTC_ALRL = (alarm_time & 0x0000ffff); RTC_ALRH = (alarm_time & 0xffff0000) >> 16; rtc_exit_config_mode(); } void rtc_enable_alarm(void) { rtc_enter_config_mode(); RTC_CRH |= RTC_CRH_ALRIE; rtc_exit_config_mode(); } void rtc_disable_alarm(void) { rtc_enter_config_mode(); RTC_CRH &= ~RTC_CRH_ALRIE; rtc_exit_config_mode(); } void rtc_set_prescale_val(uint32_t prescale_val) { rtc_enter_config_mode(); RTC_PRLL = prescale_val & 0x0000ffff; /* PRL[15:0] */ RTC_PRLH = (prescale_val & 0x000f0000) >> 16; /* PRL[19:16] */ rtc_exit_config_mode(); } uint32_t rtc_get_counter_val(void) { return (RTC_CNTH << 16) | RTC_CNTL; } uint32_t rtc_get_prescale_div_val(void) { return (RTC_DIVH << 16) | RTC_DIVL; } uint32_t rtc_get_alarm_val(void) { return (RTC_ALRH << 16) | RTC_ALRL; } void rtc_set_counter_val(uint32_t counter_val) { rtc_enter_config_mode(); RTC_CNTH = (counter_val & 0xffff0000) >> 16; /* CNT[31:16] */ RTC_CNTL = counter_val & 0x0000ffff; /* CNT[15:0] */ rtc_exit_config_mode(); } void rtc_interrupt_enable(rtcflag_t flag_val) { rtc_enter_config_mode(); /* Set the correct interrupt enable. */ switch (flag_val) { case RTC_SEC: RTC_CRH |= RTC_CRH_SECIE; break; case RTC_ALR: RTC_CRH |= RTC_CRH_ALRIE; break; case RTC_OW: RTC_CRH |= RTC_CRH_OWIE; break; } rtc_exit_config_mode(); } void rtc_interrupt_disable(rtcflag_t flag_val) { rtc_enter_config_mode(); /* Disable the correct interrupt enable. */ switch (flag_val) { case RTC_SEC: RTC_CRH &= ~RTC_CRH_SECIE; break; case RTC_ALR: RTC_CRH &= ~RTC_CRH_ALRIE; break; case RTC_OW: RTC_CRH &= ~RTC_CRH_OWIE; break; } rtc_exit_config_mode(); } void rtc_clear_flag(rtcflag_t flag_val) { /* Configuration mode not needed. */ /* Clear the correct flag. */ switch (flag_val) { case RTC_SEC: RTC_CRL &= ~RTC_CRL_SECF; break; case RTC_ALR: RTC_CRL &= ~RTC_CRL_ALRF; break; case RTC_OW: RTC_CRL &= ~RTC_CRL_OWF; break; } } uint32_t rtc_check_flag(rtcflag_t flag_val) { uint32_t reg32; /* Read correct flag. */ switch (flag_val) { case RTC_SEC: reg32 = RTC_CRL & RTC_CRL_SECF; break; case RTC_ALR: reg32 = RTC_CRL & RTC_CRL_ALRF; break; case RTC_OW: reg32 = RTC_CRL & RTC_CRL_OWF; break; default: reg32 = 0; break; } return reg32; } void rtc_awake_from_standby(void) { uint32_t reg32; /* Enable power and backup interface clocks. */ RCC_APB1ENR |= (RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN); /* Enable access to the backup registers and the RTC. */ PWR_CR |= PWR_CR_DBP; /* Wait for the RSF bit in RTC_CRL to be set by hardware. */ RTC_CRL &= ~RTC_CRL_RSF; while ((reg32 = (RTC_CRL & RTC_CRL_RSF)) == 0); /* Wait for the last write operation to finish. */ /* TODO: Necessary? */ while ((reg32 = (RTC_CRL & RTC_CRL_RTOFF)) == 0); } void rtc_auto_awake(osc_t clock_source, uint32_t prescale_val) { uint32_t reg32; /* Enable power and backup interface clocks. */ RCC_APB1ENR |= (RCC_APB1ENR_PWREN | RCC_APB1ENR_BKPEN); /* Enable access to the backup registers and the RTC. */ /* TODO: Not sure if this is necessary to just read the flag. */ PWR_CR |= PWR_CR_DBP; reg32 = RCC_BDCR & RCC_BDCR_RTCEN; if (reg32 != 0) { rtc_awake_from_standby(); } else { rtc_awake_from_off(clock_source); rtc_set_prescale_val(prescale_val); } } ================================================ FILE: firmware/libopencm3/lib/stm32/f1/spi.c ================================================ /** @defgroup spi_file SPI @ingroup STM32F1xx @brief libopencm3 STM32F1xx SPI @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100x4.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100x4, 16K flash, 4K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 16K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100x6.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100x6, 32K flash, 4K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 4K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100x8.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100x8, 64K flash, 8K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100xb.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100xB, 128K flash, 8K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 8K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100xc.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100xC, 256K flash, 24K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 24K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100xd.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100xD, 384K flash, 32K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 384K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 32K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/stm32f100xe.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32F100xE, 512K flash, 32K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 512K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 32K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f1/timer.c ================================================ /* This file is used for documentation purposes. It does not need to be compiled. All source code is in the common area. If there is any device specific code required it can be included here, in which case this file must be added to the compile list. */ /** @defgroup timer_file Timers @ingroup STM32F1xx @brief libopencm3 STM32F1xx Timers @version 1.0.0 @date 18 August 2012 */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /*---------------------------------------------------------------------------*/ /** @brief Set Input Polarity @param[in] timer_peripheral Unsigned int32. Timer register address base @param[in] ic ::tim_ic_id. Input Capture channel designator. @param[in] pol ::tim_ic_pol. Input Capture polarity. */ void timer_ic_set_polarity(uint32_t timer_peripheral, enum tim_ic_id ic, enum tim_ic_pol pol) { if (pol) { TIM_CCER(timer_peripheral) |= (0x2 << (ic * 4)); } else { TIM_CCER(timer_peripheral) &= ~(0x2 << (ic * 4)); } } ================================================ FILE: firmware/libopencm3/lib/stm32/f1/usart.c ================================================ /** @defgroup usart_file USART @ingroup STM32F1xx @brief libopencm3 STM32F1xx USART @version 1.0.0 @date 30 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32f2 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F2 # ARFLAGS = rcsv ARFLAGS = rcs OBJS = gpio.o rcc.o OBJS += crc_common_all.o dac_common_all.o dma_common_f24.o \ gpio_common_all.o gpio_common_f0234.o i2c_common_all.o \ iwdg_common_all.o rtc_common_l1f024.o spi_common_all.o \ spi_common_f124.o timer_common_all.o timer_common_f234.o \ timer_common_f24.o usart_common_all.o usart_common_f124.o \ flash_common_f234.o flash_common_f24.o hash_common_f24.o \ crypto_common_f24.o exti_common_all.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/crc.c ================================================ /** @defgroup crc_file CRC @ingroup STM32F2xx @brief libopencm3 STM32F2xx CRC @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/dac.c ================================================ /** @defgroup dac_file DAC @ingroup STM32F2xx @brief libopencm3 STM32F2xx DAC @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/dma.c ================================================ /** @defgroup dma_file DMA @ingroup STM32F2xx @brief libopencm3 STM32F2xx DMA @version 1.0.0 @date 30 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup STM32F2xx @brief libopencm3 STM32F2xx General Purpose I/O @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/i2c.c ================================================ /** @defgroup i2c_file I2C @ingroup STM32F2xx @brief libopencm3 STM32F2xx I2C @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/iwdg.c ================================================ /** @defgroup iwdg_file IWDG @ingroup STM32F2xx @brief libopencm3 STM32F2xx Independent Watchdog Timer @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/libopencm3_stm32f2.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/f2/rcc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include /* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */ uint32_t rcc_ppre1_frequency = 16000000; uint32_t rcc_ppre2_frequency = 16000000; const clock_scale_t hse_8mhz_3v3[CLOCK_3V3_END] = { { /* 120MHz */ .pllm = 8, .plln = 240, .pllp = 2, .pllq = 5, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 30000000, .apb2_frequency = 60000000, }, }; void rcc_osc_ready_int_clear(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; } } void rcc_osc_ready_int_enable(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; } } void rcc_osc_ready_int_disable(osc_t osc) { switch (osc) { case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYIE; break; } } int rcc_osc_ready_int_flag(osc_t osc) { switch (osc) { case PLL: return ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case HSE: return ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case HSI: return ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case LSE: return ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: return ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; } cm3_assert_not_reached(); } void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } void rcc_wait_for_osc_ready(osc_t osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) == 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) == 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) == 0); break; case LSE: while ((RCC_BDCR & RCC_BDCR_LSERDY) == 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) == 0); break; } } void rcc_wait_for_sysclk_status(osc_t osc) { switch (osc) { case PLL: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_PLL); break; case HSE: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSE); break; case HSI: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSI); break; default: /* Shouldn't be reached. */ break; } } void rcc_osc_on(osc_t osc) { switch (osc) { case PLL: RCC_CR |= RCC_CR_PLLON; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; } } void rcc_osc_off(osc_t osc) { switch (osc) { case PLL: RCC_CR &= ~RCC_CR_PLLON; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; } } void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } void rcc_osc_bypass_enable(osc_t osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_osc_bypass_disable(osc_t osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en) { *reg |= en; } void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en) { *reg &= ~en; } void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset) { *reg |= reset; } void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset) { *reg &= ~clear_reset; } void rcc_set_sysclk_source(uint32_t clk) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 1) | (1 << 0)); RCC_CFGR = (reg32 | clk); } void rcc_set_pll_source(uint32_t pllsrc) { uint32_t reg32; reg32 = RCC_PLLCFGR; reg32 &= ~(1 << 22); RCC_PLLCFGR = (reg32 | (pllsrc << 22)); } void rcc_set_ppre2(uint32_t ppre2) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 13) | (1 << 14) | (1 << 15)); RCC_CFGR = (reg32 | (ppre2 << 13)); } void rcc_set_ppre1(uint32_t ppre1) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 10) | (1 << 11) | (1 << 12)); RCC_CFGR = (reg32 | (ppre1 << 10)); } void rcc_set_hpre(uint32_t hpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); RCC_CFGR = (reg32 | (hpre << 4)); } void rcc_set_rtcpre(uint32_t rtcpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19) | (1 << 20)); RCC_CFGR = (reg32 | (rtcpre << 16)); } void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq) { RCC_PLLCFGR = (pllm << RCC_PLLCFGR_PLLM_SHIFT) | (plln << RCC_PLLCFGR_PLLN_SHIFT) | (((pllp >> 1) - 1) << RCC_PLLCFGR_PLLP_SHIFT) | (pllq << RCC_PLLCFGR_PLLQ_SHIFT); } void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq) { RCC_PLLCFGR = (pllm << RCC_PLLCFGR_PLLM_SHIFT) | (plln << RCC_PLLCFGR_PLLN_SHIFT) | (((pllp >> 1) - 1) << RCC_PLLCFGR_PLLP_SHIFT) | RCC_PLLCFGR_PLLSRC | (pllq << RCC_PLLCFGR_PLLQ_SHIFT); } uint32_t rcc_system_clock_source(void) { /* Return the clock source which is used as system clock. */ return (RCC_CFGR & 0x000c) >> 2; } void rcc_clock_setup_hse_3v3(const clock_scale_t *clock) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_HSI); /* Enable external high-speed oscillator 8MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre1(clock->ppre1); rcc_set_ppre2(clock->ppre2); rcc_set_main_pll_hse(clock->pllm, clock->plln, clock->pllp, clock->pllq); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Configure flash settings. */ flash_set_ws(clock->flash_config); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_PLL); /* Wait for PLL clock to be selected. */ rcc_wait_for_sysclk_status(PLL); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; } void rcc_backupdomain_reset(void) { /* Set the backup domain software reset. */ RCC_BDCR |= RCC_BDCR_BDRST; /* Clear the backup domain software reset. */ RCC_BDCR &= ~RCC_BDCR_BDRST; } ================================================ FILE: firmware/libopencm3/lib/stm32/f2/rtc.c ================================================ /** @defgroup rtc_file RTC * * @ingroup STM32F2xx * * @brief libopencm3 STM32F2xx RTC * * @version 1.0.0 * * @date 4 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/spi.c ================================================ /** @defgroup spi_file SPI @ingroup STM32F2xx @brief libopencm3 STM32F2xx SPI @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/timer.c ================================================ /* This file is used for documentation purposes. It does not need to be compiled. All source code is in the common area. If there is any device specific code required it can be included here, in which case this file must be added to the compile list. */ /** @defgroup timer_file Timers @ingroup STM32F2xx @brief libopencm3 STM32F2xx Timers @version 1.0.0 @date 18 August 2012 */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f2/usart.c ================================================ /** @defgroup usart_file USART @ingroup STM32F2xx @brief libopencm3 STM32F2xx USART @version 1.0.0 @date 30 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32f3 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m4 -mthumb $(FP_FLAGS) -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F3 ARFLAGS = rcs OBJS = rcc.o gpio.o adc.o i2c.o spi.o usart.o dma.o OBJS += gpio_common_all.o gpio_common_f0234.o \ dac_common_all.o usart_common_all.o crc_common_all.o\ iwdg_common_all.o spi_common_all.o dma_common_l1f013.o\ timer_common_all.o timer_common_f234.o flash_common_f234.o \ flash.o exti_common_all.o OBJS += usb.o usb_control.o usb_standard.o usb_f103.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/adc.c ================================================ /** @defgroup adc_file ADC * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Analog to Digital Converters * * @author @htmlonly © @endhtmlonly 2012 * Ken Sarkies * * @date 30 August 2012 * * This library supports the A/D Converter Control System in the STM32 series * of ARM Cortex Microcontrollers by ST Microelectronics. * * Devices can have up to three A/D converters each with their own set of * registers. However all the A/D converters share a common clock which is * prescaled from the APB2 clock by default by a minimum factor of 2 to a * maximum of 8. The ADC resolution can be set to 12, 10, 8 or 6 bits. * * Each A/D converter has up to 19 channels: * @li On ADC1 the analog channels 16 is internally connected to the * temperature sensor, channel 17 to VREFINT, and channel 18 * to VBATT. * @li On ADC2 and ADC3 the analog channels 16 - 18 are not used. * * The conversions can occur as a one-off conversion whereby the process stops * once conversion is complete. The conversions can also be continuous wherein * a new conversion starts immediately the previous conversion has ended. * * Conversion can occur as a single channel conversion or a scan of a group of * channels in either continuous or one-off mode. If more than one channel is * converted in a scan group, DMA must be used to transfer the data as there is * only one result register available. An interrupt can be set to occur at the * end* * of conversion, which occurs after all channels have been scanned. * * A discontinuous mode allows a subgroup of group of a channels to be * converted in bursts of a given length. * * Injected conversions allow a second group of channels to be converted * separately from the regular group. An interrupt can be set to occur at the * end of conversion, which occurs after all channels have been scanned. * * @section adc_f3_api_ex Basic ADC Handling API. * * Example 1: Simple single channel conversion polled. Enable the peripheral * clock and ADC, reset ADC and set the prescaler divider. Set multiple mode to * independent. * * @code * gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO1); * rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN); * adc_set_clk_prescale(RCC_CFGR_ADCPRE_BY2); * adc_disable_scan_mode(ADC1); * adc_set_single_conversion_mode(ADC1); * adc_set_sample_time(ADC1, ADC_CHANNEL0, ADC_SMPR1_SMP_1DOT5CYC); * uint8_t channels[] = ADC_CHANNEL0; * adc_set_regular_sequence(ADC1, 1, channels); * adc_set_multi_mode(ADC_CCR_MULTI_INDEPENDENT); * adc_power_on(ADC1); * adc_start_conversion_regular(ADC1); * while (! adc_eoc(ADC1)); * reg16 = adc_read_regular(ADC1); * @endcode * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Off * * Turn off the ADC to reduce power consumption to a few microamps. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_off(uint32_t adc) { ADC_CR(adc) &= ~ADC_CR_ADEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Regular Conversions * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Comparison is done before * data alignment takes place, so the thresholds are left-aligned. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_analog_watchdog_regular(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_AWD1EN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Regular Conversions * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Comparison is done before * data alignment takes place, so the thresholds are left-aligned. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_analog_watchdog_regular(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_AWD1EN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Injected Conversions * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Comparison is done before * data alignment takes place, so the thresholds are left-aligned. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_analog_watchdog_injected(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_JAWD1EN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog for Injected Conversions * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_analog_watchdog_injected(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_JAWD1EN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Regular Conversions * * In this mode the ADC converts, on each trigger, a subgroup of up to 8 of the * defined regular channel group. The subgroup is defined by the number of * consecutive channels to be converted. After a subgroup has been converted * the next trigger will start conversion of the immediately following subgroup * of the same length or until the whole group has all been converted. When the * whole group has been converted, the next trigger will restart conversion of * the subgroup at the beginning of the whole group. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base @param[in] length Unsigned int8. Number of channels in the * group @ref adc_cr1_discnum */ void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length) { if ((length-1) > 7) { return; } ADC_CFGR(adc) |= ADC_CFGR_DISCEN; ADC_CFGR(adc) |= ((length-1) << ADC_CFGR_DISCNUM_SHIFT); } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Regular Conversions * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_discontinuous_mode_regular(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_DISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Injected Conversions * * In this mode the ADC converts sequentially one channel of the defined group * of injected channels, cycling back to the first channel in the group once * the entire group has been converted. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_discontinuous_mode_injected(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Injected Conversions * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_discontinuous_mode_injected(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Automatic Injected Conversions * * The ADC converts a defined injected group of channels immediately after the * regular channels have been converted. The external trigger on the injected * channels is disabled as required. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_automatic_injected_group_conversion(uint32_t adc) { adc_disable_external_trigger_injected(adc); ADC_CFGR(adc) |= ADC_CFGR_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Automatic Injected Conversions * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_automatic_injected_group_conversion(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for All Regular and/or Injected Channels * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Comparison is done before * data alignment takes place, so the thresholds are left-aligned. * * @note The analog watchdog must be enabled for either or both of the regular * or injected channels. If neither are enabled, the analog watchdog feature * will be disabled. * * @ref adc_enable_analog_watchdog_injected, @ref * adc_enable_analog_watchdog_regular. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_AWD1SGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for a Selected Channel * * The analog watchdog allows the monitoring of an analog signal between two * threshold levels. The thresholds must be preset. Comparison is done before * data alignment takes place, so the thresholds are left-aligned. * * @note The analog watchdog must be enabled for either or both of the regular * or injected channels. If neither are enabled, the analog watchdog feature * will be disabled. If both are enabled, the same channel number is monitored * @ref adc_enable_analog_watchdog_injected, @ref * adc_enable_analog_watchdog_regular. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base * @param[in] channel Unsigned int8. ADC channel numbe * @ref adc_watchdog_channel */ void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel) { uint32_t reg32; reg32 = (ADC_CFGR(adc) & ~ADC_CFGR_AWD1CH_MASK); /* Clear bit [4:0]. */ if (channel < 18) { reg32 |= channel; } ADC_CFGR(adc) = reg32; ADC_CFGR(adc) |= ADC_CFGR_AWD1SGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Scan Mode * * In this mode a conversion consists of a scan of the predefined set of * channels, regular and injected, each channel conversion immediately * following the previous one. It can use single, continuous or discontinuous * mode. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ /* void adc_enable_scan_mode(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_SCAN; } */ /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Scan Mode * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ /* void adc_disable_scan_mode(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_SCAN; } */ /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Injected End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_eoc_interrupt_injected(uint32_t adc) { ADC_IER(adc) |= ADC_IER_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Injected End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_eoc_interrupt_injected(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_all_awd_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_AWD1IE; ADC_IER(adc) |= ADC_IER_AWD2IE; ADC_IER(adc) |= ADC_IER_AWD3IE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_all_awd_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_AWD1IE; ADC_IER(adc) &= ~ADC_IER_AWD2IE; ADC_IER(adc) &= ~ADC_IER_AWD3IE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Regular End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_eoc_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_eoc_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Regular Channels * * This starts conversion on a set of defined regular channels. It is cleared * by hardware once conversion starts. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_start_conversion_regular(uint32_t adc) { /* Start conversion on regular channels. */ ADC_CR(adc) |= ADC_CR_ADSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR(adc) & ADC_CR_ADSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Injected Channels * * This starts conversion on a set of defined injected channels. It is cleared * by hardware once conversion starts. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_start_conversion_injected(uint32_t adc) { /* Start conversion on injected channels. */ ADC_CR(adc) |= ADC_CR_JADSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR(adc) & ADC_CR_JADSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Left Aligned * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_set_left_aligned(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Right Aligned * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_set_right_aligned(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable DMA Transfers * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_enable_dma(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable DMA Transfers * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_disable_dma(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_DMAEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Continuous Conversion Mode * * In this mode the ADC starts a new conversion of a single channel or a channel * group immediately following completion of the previous channel group * conversion. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_set_continuous_conversion_mode(uint32_t adc) { ADC_CFGR(adc) |= ADC_CFGR_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Single Conversion Mode * * In this mode the ADC performs a conversion of one channel or a channel group * and stops. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_set_single_conversion_mode(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for a Single Channel * * The sampling time can be selected in ADC clock cycles from 1.5 to 239.5. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] channel Unsigned int8. ADC Channel integer 0..18 or from * @ref adc_channel * @param[in] time Unsigned int8. Sampling time selection from * @ref adc_sample_rg */ void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time) { uint32_t reg32; if (channel < 10) { reg32 = ADC_SMPR2(adc); reg32 &= ~(0x7 << (channel * 3)); reg32 |= (time << (channel * 3)); ADC_SMPR2(adc) = reg32; } else { reg32 = ADC_SMPR1(adc); reg32 &= ~(0x7 << ((channel - 10) * 3)); reg32 |= (time << ((channel - 10) * 3)); ADC_SMPR1(adc) = reg32; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for All Channels * * The sampling time can be selected in ADC clock cycles from 1.5 to 239.5, * same for all channels. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] time Unsigned int8. Sampling time selection from * @ref adc_sample_rg */ void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time) { uint8_t i; uint32_t reg32 = 0; for (i = 0; i <= 9; i++) { reg32 |= (time << (i * 3)); } ADC_SMPR2(adc) = reg32; for (i = 10; i <= 17; i++) { reg32 |= (time << ((i - 10) * 3)); } ADC_SMPR1(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Upper Threshold * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] threshold Unsigned int8. Upper threshold value */ void adc_set_watchdog_high_threshold(uint32_t adc, uint8_t threshold) { uint32_t reg32 = 0; reg32 |= (threshold << 16); reg32 &= ~0xff00ffff; /* Clear all bits above 8. */ ADC_TR1(adc) = reg32; ADC_TR2(adc) = reg32; ADC_TR3(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Lower Threshold * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] threshold Unsigned int8. Lower threshold value */ void adc_set_watchdog_low_threshold(uint32_t adc, uint8_t threshold) { uint32_t reg32 = 0; reg32 = (uint32_t)threshold; reg32 &= ~0xffffff00; /* Clear all bits above 8. */ ADC_TR1(adc) = reg32; ADC_TR2(adc) = reg32; ADC_TR3(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set a Regular Channel Conversion Sequence * * Define a sequence of channels to be converted as a regular group with a * length from 1 to 16 channels. If this is called during conversion, the * current conversion is reset and conversion begins again with the newly * defined group. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] length Unsigned int8. Number of channels in the group. * @param[in] channel Unsigned int8[]. Set of channels in sequence, integers * 0..18. */ void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32_1 = 0, reg32_2 = 0, reg32_3 = 0, reg32_4 = 0; uint8_t i = 0; /* Maximum sequence length is 16 channels. */ if (length > 16) { return; } for (i = 1; i <= length; i++) { if (i <= 4) { reg32_1 |= (channel[i - 1] << (i * 6)); } if ((i > 4) & (i <= 9)) { reg32_2 |= (channel[i - 1] << ((i - 4 - 1) * 6)); } if ((i > 9) & (i <= 14)) { reg32_3 |= (channel[i - 1] << ((i - 9 - 1) * 6)); } if ((i > 14) & (i <= 16)) { reg32_4 |= (channel[i - 1] << ((i - 14 - 1) * 6)); } } reg32_1 |= ((length - 1) << ADC_SQR1_L_LSB); ADC_SQR1(adc) = reg32_1; ADC_SQR2(adc) = reg32_2; ADC_SQR3(adc) = reg32_3; ADC_SQR4(adc) = reg32_4; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set an Injected Channel Conversion Sequence * * Defines a sequence of channels to be converted as an injected group with a * length from 1 to 4 channels. If this is called during conversion, the current * conversion is reset and conversion begins again with the newly defined group. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] length Unsigned int8. Number of channels in the group. * @param[in] channel Unsigned int8[]. Set of channels in sequence, integers * 0..18 */ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32 = 0; uint8_t i = 0; /* Maximum sequence length is 4 channels. */ if ((length-1) > 3) { return; } for (i = 1; i <= length; i++) { reg32 |= (channel[4 - i] << ((4 - i) * 5)); } reg32 |= ((length - 1) << ADC_JSQR_JL_LSB); ADC_JSQR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag * * This flag is set after all channels of a regular or injected group have been * converted. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @returns bool. End of conversion flag. */ bool adc_eoc(uint32_t adc) { return ((ADC_ISR(adc) & ADC_ISR_EOC) != 0); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag for Injected Conversion * * This flag is set after all channels of an injected group have been * converted. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @returns bool. End of conversion flag. */ bool adc_eoc_injected(uint32_t adc) { return ((ADC_ISR(adc) & ADC_ISR_JEOC) != 0); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from the Regular Conversion Result Register * * The result read back is 12 bits, right or left aligned within the first * 16 bits. For ADC1 only, the higher 16 bits will hold the result from ADC2 if * an appropriate dual mode has been set @see adc_set_dual_mode. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @returns Unsigned int32 conversion result. */ uint32_t adc_read_regular(uint32_t adc) { return ADC_DR(adc); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from an Injected Conversion Result Register * * The result read back from the selected injected result register (one of four) * is 12 bits, right or left aligned within the first 16 bits. The result can * have a negative value if the injected channel offset has been set @see * adc_set_injected_offset. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base * @param[in] reg Unsigned int8. Register number (1 ... 4). * @returns Unsigned int32 conversion result. */ uint32_t adc_read_injected(uint32_t adc, uint8_t reg) { switch (reg) { case 1: return ADC_JDR1(adc); case 2: return ADC_JDR2(adc); case 3: return ADC_JDR3(adc); case 4: return ADC_JDR4(adc); } return 0; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Injected Channel Data Offset * * This value is subtracted from the injected channel results after conversion * is complete, and can result in negative results. A separate value can be * specified for each injected data register. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] reg Unsigned int8. Register number (1 ... 4). * @param[in] offset Unsigned int32. */ void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset) { switch (reg) { case 1: ADC_OFR1(adc) |= ADC_OFR1_OFFSET1_EN; ADC_OFR1(adc) |= offset; break; case 2: ADC_OFR2(adc) |= ADC_OFR2_OFFSET2_EN; ADC_OFR2(adc) |= offset; break; case 3: ADC_OFR3(adc) |= ADC_OFR3_OFFSET3_EN; ADC_OFR3(adc) |= offset; break; case 4: ADC_OFR4(adc) |= ADC_OFR4_OFFSET4_EN; ADC_OFR4(adc) |= offset; break; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Power On * * If the ADC is in power-down mode then it is powered up. The application * needs to wait a time of about 3 microseconds for stabilization before using * the ADC. If the ADC is already on this function call will have no effect. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_power_on(uint32_t adc) { ADC_CR(adc) |= ADC_CR_ADEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Clock Prescale * * The ADC clock taken from the APB2 clock can be scaled down by 2, 4, 6 or 8. * * @param[in] prescale Unsigned int32. Prescale value for ADC Clock @ref * adc_ccr_adcpre */ void adc_set_clk_prescale(uint32_t prescale) { uint32_t reg32 = ((ADC_CCR & ~ADC_CCR_CKMODE_MASK) | prescale); ADC_CCR = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Dual/Triple Mode * * The multiple mode uses ADC1 as master, ADC2 and optionally ADC3 in a slave * arrangement. This setting is applied to ADC1 only. * * The various modes possible are described in the reference manual. * * @param[in] mode Unsigned int32. Multiple mode selection from @ref * adc_multi_mode */ void adc_set_multi_mode(uint32_t mode) { ADC_CCR |= mode; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Regular Channels * * This enables an external trigger for set of defined regular channels, and * sets the polarity of the trigger event: rising or falling edge or both. Note * that if the trigger polarity is zero, triggering is disabled. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base * @param[in] trigger Unsigned int32. Trigger identifier * @ref adc_trigger_regular * @param[in] polarity Unsigned int32. Trigger polarity @ref * adc_trigger_polarity_regular */ void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity) { uint32_t reg32 = ADC_CFGR(adc); reg32 &= ~(ADC_CFGR_EXTSEL_MASK | ADC_CFGR_EXTEN_MASK); reg32 |= (trigger | polarity); ADC_CFGR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Regular Channels * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_disable_external_trigger_regular(uint32_t adc) { ADC_CFGR(adc) &= ~ADC_CFGR_EXTEN_MASK; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Injected Channels * * This enables an external trigger for set of defined injected channels, and * sets the polarity of the trigger event: rising or falling edge or both. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @param[in] trigger Unsigned int8. Trigger identifier * @ref adc_trigger_injected * @param[in] polarity Unsigned int32. Trigger polarity * @ref adc_trigger_polarity_injected */ void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger, uint32_t polarity) { uint32_t reg32 = ADC_JSQR(adc); reg32 &= ~(ADC_JSQR_JEXTSEL_MASK | ADC_JSQR_JEXTEN_MASK); reg32 |= (trigger | polarity); ADC_JSQR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Injected Channels * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_external_trigger_injected(uint32_t adc) { ADC_JSQR(adc) &= ~ADC_JSQR_JEXTEN_MASK; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Resolution * * ADC Resolution can be reduced from 12 bits to 10, 8 or 6 bits for a * corresponding reduction in conversion time (resolution + 3 ADC clock cycles). * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base * @param[in] resolution Unsigned int8. Resolution value @ref adc_cr1_res */ void adc_set_resolution(uint32_t adc, uint16_t resolution) { uint32_t reg32 = ADC_CFGR(adc); reg32 &= ~ADC_CFGR_RES_MASK; reg32 |= resolution; ADC_CFGR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable the Overrun Interrupt * * The overrun interrupt is generated when data is not read from a result * register before the next conversion is written. If DMA is enabled, all * transfers are terminated and any conversion sequence is aborted. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_overrun_interrupt(uint32_t adc) { ADC_IER(adc) |= ADC_IER_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable the Overrun Interrupt * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_overrun_interrupt(uint32_t adc) { ADC_IER(adc) &= ~ADC_IER_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Overrun Flag * * The overrun flag is set when data is not read from a result register before * the next conversion is written. If DMA is enabled, all transfers are * terminated and any conversion sequence is aborted. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base * @returns Unsigned int32 conversion result. */ bool adc_get_overrun_flag(uint32_t adc) { return ADC_ISR(adc) & ADC_ISR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Clear Overrun Flags * * The overrun flag is cleared. Note that if an overrun occurs, DMA is * terminated. * The flag must be cleared and the DMA stream and ADC reinitialised to resume * conversions (see the reference manual). * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @returns Unsigned int32 conversion result. */ void adc_clear_overrun_flag(uint32_t adc) { /* need to write zero to clear this */ ADC_ISR(adc) &= ~ADC_ISR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an EOC for Each Conversion * * The EOC is set after each conversion in a sequence rather than at the end of * the sequence. Overrun detection is enabled only if DMA is enabled. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ void adc_eoc_after_each(uint32_t adc) { ADC_ISR(adc) |= ADC_ISR_EOS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable the EOC for Each Conversion * * The EOC is set at the end of each sequence rather than after each conversion * in the sequence. Overrun detection is enabled always. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_eoc_after_group(uint32_t adc) { ADC_ISR(adc) &= ~ADC_ISR_EOS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set DMA to Continue * * This must be set to allow DMA to continue to operate after the last * conversion in the DMA sequence. This allows DMA to be used in continuous * circular mode. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ /* void adc_set_dma_continue(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_DDS; } */ /*---------------------------------------------------------------------------*/ /** @brief ADC Set DMA to Terminate * * This must be set to allow DMA to terminate after the last conversion in the * DMA sequence. This can avoid overrun errors. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base */ /* void adc_set_dma_terminate(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_DDS; } */ /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Analog Watchdog Flag * * This flag is set when the converted voltage crosses the high or low * thresholds. * * @param[in] adc Unsigned int32. ADC block register address base * @ref adc_reg_base * @returns bool. AWD flag. */ bool adc_awd(uint32_t adc) { return (ADC_ISR(adc) & ADC_ISR_AWD1) && (ADC_ISR(adc) & ADC_ISR_AWD2) && (ADC_ISR(adc) & ADC_ISR_AWD3); } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The Temperature Sensor * * This enables both the sensor and the reference voltage measurements on * channels * 16 and 17. These are only available on ADC1 channel 16 and 17 respectively. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_enable_temperature_sensor() { ADC_CCR |= ADC_CCR_TSEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The Temperature Sensor * * Disabling this will reduce power consumption from the sensor and the * reference voltage measurements. * * @param[in] adc Unsigned int32. ADC block register address base @ref * adc_reg_base */ void adc_disable_temperature_sensor() { ADC_CCR &= ~ADC_CCR_TSEN; } /*---------------------------------------------------------------------------*/ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f3/crc.c ================================================ /** @defgroup crc_file CRC * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx CRC * * @version 1.0.0 * * @date 15 October 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/dac.c ================================================ /** @defgroup dac_file DAC * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx DAC * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/dma.c ================================================ /** @defgroup dma_file DMA * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Direct Memory Access * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/flash.c ================================================ /** @defgroup flash_file FLASH * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx FLASH * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void flash_clear_status_flags(void) { flash_clear_pgperr_flag(); flash_clear_eop_flag(); flash_clear_bsy_flag(); } ================================================ FILE: firmware/libopencm3/lib/stm32/f3/gpio.c ================================================ /** @defgroup gpio_file GPIO * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx General Purpose I/O * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Fergus Noble * Modified by 2013 Fernando Cortes (stm32f3) * Modified by 2013 Guillermo Rivera (stm32f3) * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void gpio_mode_setup(uint32_t gpioport, uint8_t mode, uint8_t pull_up_down, uint16_t gpios) { uint16_t i; uint32_t moder, pupd; /* * We want to set the config only for the pins mentioned in gpios, * but keeping the others, so read out the actual config first. */ moder = GPIO_MODER(gpioport); pupd = GPIO_PUPDR(gpioport); for (i = 0; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } moder &= ~GPIO_MODE_MASK(i); moder |= GPIO_MODE(i, mode); pupd &= ~GPIO_PUPD_MASK(i); pupd |= GPIO_PUPD(i, pull_up_down); } /* Set mode and pull up/down control registers. */ GPIO_MODER(gpioport) = moder; GPIO_PUPDR(gpioport) = pupd; } void gpio_set_output_options(uint32_t gpioport, uint8_t otype, uint8_t speed, uint16_t gpios) { uint16_t i; uint32_t ospeedr; if (otype == 0x1) { GPIO_OTYPER(gpioport) |= gpios; } else { GPIO_OTYPER(gpioport) &= ~gpios; } ospeedr = GPIO_OSPEEDR(gpioport); for (i = 0; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } ospeedr &= ~GPIO_OSPEED_MASK(i); ospeedr |= GPIO_OSPEED(i, speed); } GPIO_OSPEEDR(gpioport) = ospeedr; } void gpio_set_af(uint32_t gpioport, uint8_t alt_func_num, uint16_t gpios) { uint16_t i; uint32_t afrl, afrh; afrl = GPIO_AFRL(gpioport); afrh = GPIO_AFRH(gpioport); for (i = 0; i < 8; i++) { if (!((1 << i) & gpios)) { continue; } afrl &= ~GPIO_AFR_MASK(i); afrl |= GPIO_AFR(i, alt_func_num); } for (i = 8; i < 16; i++) { if (!((1 << i) & gpios)) { continue; } afrl &= ~GPIO_AFR_MASK(i - 8); afrh |= GPIO_AFR(i - 8, alt_func_num); } GPIO_AFRL(gpioport) = afrl; GPIO_AFRH(gpioport) = afrh; } void gpio_set(uint32_t gpioport, uint16_t gpios) { GPIO_BSRR(gpioport) = gpios; } void gpio_clear(uint32_t gpioport, uint16_t gpios) { GPIO_BSRR(gpioport) = gpios << 16; } uint16_t gpio_get(uint32_t gpioport, uint16_t gpios) { return gpio_port_read(gpioport) & gpios; } void gpio_toggle(uint32_t gpioport, uint16_t gpios) { GPIO_ODR(gpioport) ^= gpios; } uint16_t gpio_port_read(uint32_t gpioport) { return (uint16_t)GPIO_IDR(gpioport); } void gpio_port_write(uint32_t gpioport, uint16_t data) { GPIO_ODR(gpioport) = data; } void gpio_port_config_lock(uint32_t gpioport, uint16_t gpios) { uint32_t reg32; /* Special "Lock Key Writing Sequence", see datasheet. */ GPIO_LCKR(gpioport) = GPIO_LCKK | gpios; /* Set LCKK. */ GPIO_LCKR(gpioport) = ~GPIO_LCKK & gpios; /* Clear LCKK. */ GPIO_LCKR(gpioport) = GPIO_LCKK | gpios; /* Set LCKK. */ reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */ reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */ /* * Tell the compiler the variable is actually used. * It will get optimized out anyways. */ reg32 = reg32; /* If (reg32 & GPIO_LCKK) is true, the lock is now active. */ } ================================================ FILE: firmware/libopencm3/lib/stm32/f3/i2c.c ================================================ /** @defgroup i2c_file I2C * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx I2C * * @version 1.0.0 * * @date 15 October 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief I2C Reset. * * The I2C peripheral and all its associated configuration registers are placed * in the reset condition. The reset is effected via the RCC peripheral reset * system. * * @param[in] i2c Unsigned int32. I2C peripheral identifier @ref i2c_reg_base. */ void i2c_reset(uint32_t i2c) { switch (i2c) { case I2C1: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C1RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C1RST); break; case I2C2: rcc_peripheral_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C2RST); rcc_peripheral_clear_reset(&RCC_APB1RSTR, RCC_APB1RSTR_I2C2RST); break; } } /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Enable. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_peripheral_enable(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_PE; } /*---------------------------------------------------------------------------*/ /** @brief I2C Peripheral Disable. * * This must not be reset while in Master mode until a communication has * finished. In Slave mode, the peripheral is disabled only after communication * has ended. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_peripheral_disable(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_PE; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Start Condition. * * If in Master mode this will cause a restart condition to occur at the end of * the current transmission. If in Slave mode, this will initiate a start * condition when the current bus activity is completed. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_send_start(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_START; } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Stop Condition. * * After the current byte transfer this will initiate a stop condition if in * Master mode, or simply release the bus if in Slave mode. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_send_stop(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_STOP; } /*---------------------------------------------------------------------------*/ /** @brief I2C Clear Stop Flag. * * Clear the "Send Stop" flag in the I2C config register * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_clear_stop(uint32_t i2c) { I2C_ICR(i2c) |= I2C_ICR_STOPCF; } /*---------------------------------------------------------------------------*/ /** @brief I2C Set the 7 bit Slave Address for the Peripheral. * * This sets an address for Slave mode operation, in 7 bit form. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. * @param[in] slave Unsigned int8. Slave address 0...127. */ void i2c_set_own_7bit_slave_address(uint32_t i2c, uint8_t slave) { I2C_OAR1(i2c) = (uint16_t)(slave << 1); I2C_OAR1(i2c) &= ~I2C_OAR1_OA1MODE; I2C_OAR1(i2c) |= (1 << 14); /* Datasheet: always keep 1 by software. */ } /*---------------------------------------------------------------------------*/ /** @brief I2C Set the 10 bit Slave Address for the Peripheral. * * This sets an address for Slave mode operation, in 10 bit form. * * @todo add "I2C_OAR1(i2c) |= (1 << 14);" as above * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. * @param[in] slave Unsigned int16. Slave address 0...1023. */ void i2c_set_own_10bit_slave_address(uint32_t i2c, uint16_t slave) { I2C_OAR1(i2c) = (uint16_t)(I2C_OAR1_OA1MODE | slave); } /*---------------------------------------------------------------------------*/ /** @brief I2C Send Data. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. * @param[in] data Unsigned int8. Byte to send. */ void i2c_send_data(uint32_t i2c, uint8_t data) { I2C_TXDR(i2c) = data; } /*---------------------------------------------------------------------------*/ /** @brief I2C Get Data. * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ uint8_t i2c_get_data(uint32_t i2c) { return I2C_RXDR(i2c) & 0xff; } void i2c_enable_analog_filter(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_ANFOFF; } void i2c_disable_analog_filter(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_ANFOFF; } void i2c_set_digital_filter(uint32_t i2c, uint8_t dnf_setting) { I2C_CR1(i2c) = (I2C_CR1(i2c) & ~I2C_CR1_DNF_MASK) | dnf_setting; } /* t_presc= (presc+1)*t_i2cclk */ void i2c_set_prescaler(uint32_t i2c, uint8_t presc) { I2C_TIMINGR(i2c) = (I2C_TIMINGR(i2c) & ~I2C_TIMINGR_PRESC_MASK) | (presc << I2C_TIMINGR_PRESC_SHIFT); } void i2c_set_data_setup_time(uint32_t i2c, uint8_t s_time) { I2C_TIMINGR(i2c) = (I2C_TIMINGR(i2c) & ~I2C_TIMINGR_SCLDEL_MASK) | (s_time << I2C_TIMINGR_SCLDEL_SHIFT); } void i2c_set_data_hold_time(uint32_t i2c, uint8_t h_time) { I2C_TIMINGR(i2c) = (I2C_TIMINGR(i2c) & ~I2C_TIMINGR_SDADEL_MASK) | (h_time << I2C_TIMINGR_SDADEL_SHIFT); } void i2c_set_scl_high_period(uint32_t i2c, uint8_t period) { I2C_TIMINGR(i2c) = (I2C_TIMINGR(i2c) & ~I2C_TIMINGR_SCLH_MASK) | (period << I2C_TIMINGR_SCLH_SHIFT); } void i2c_set_scl_low_period(uint32_t i2c, uint8_t period) { I2C_TIMINGR(i2c) = (I2C_TIMINGR(i2c) & ~I2C_TIMINGR_SCLL_MASK) | (period << I2C_TIMINGR_SCLL_SHIFT); } void i2c_enable_stretching(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_NOSTRETCH; } void i2c_disable_stretching(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_NOSTRETCH; } void i2c_100khz_i2cclk8mhz(uint32_t i2c) { i2c_set_prescaler(i2c, 1); i2c_set_scl_low_period(i2c, 0x13); i2c_set_scl_high_period(i2c, 0xF); i2c_set_data_hold_time(i2c, 0x2); i2c_set_data_setup_time(i2c, 0x4); } void i2c_set_7bit_addr_mode(uint32_t i2c) { I2C_CR2(i2c) &= ~I2C_CR2_ADD10; } void i2c_set_10bit_addr_mode(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_ADD10; } void i2c_set_7bit_address(uint32_t i2c, uint8_t addr) { I2C_CR2(i2c) = (I2C_CR2(i2c) & ~I2C_CR2_SADD_7BIT_MASK) | ((addr & 0x7F) << I2C_CR2_SADD_7BIT_SHIFT); } void i2c_set_10bit_address(uint32_t i2c, uint16_t addr) { I2C_CR2(i2c) = (I2C_CR2(i2c) & ~I2C_CR2_SADD_10BIT_MASK) | ((addr & 0x3FF) << I2C_CR2_SADD_10BIT_SHIFT); } void i2c_set_write_transfer_dir(uint32_t i2c) { I2C_CR2(i2c) &= ~I2C_CR2_RD_WRN; } void i2c_set_read_transfer_dir(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_RD_WRN; } void i2c_set_bytes_to_transfer(uint32_t i2c, uint32_t n_bytes) { I2C_CR2(i2c) = (I2C_CR2(i2c) & ~I2C_CR2_NBYTES_MASK) | (n_bytes << I2C_CR2_NBYTES_SHIFT); } uint8_t i2c_is_start(uint32_t i2c) { if ((I2C_CR2(i2c) & I2C_CR2_START) != 0) { return 1; } return 0; } void i2c_enable_autoend(uint32_t i2c) { I2C_CR2(i2c) |= I2C_CR2_AUTOEND; } void i2c_disable_autoend(uint32_t i2c) { I2C_CR2(i2c) &= ~I2C_CR2_AUTOEND; } uint8_t i2c_nack(uint32_t i2c) { if ((I2C_ISR(i2c) & I2C_ISR_NACKF) != 0) { return 1; } return 0; } uint8_t i2c_busy(uint32_t i2c) { if ((I2C_ISR(i2c) & I2C_ISR_BUSY) != 0) { return 1; } return 0; } uint8_t i2c_transmit_int_status(uint32_t i2c) { if ((I2C_ISR(i2c) & I2C_ISR_TXIS) != 0) { return 1; } return 0; } uint8_t i2c_transfer_complete(uint32_t i2c) { if ((I2C_ISR(i2c) & I2C_ISR_TC) != 0) { return 1; } return 0; } uint8_t i2c_received_data(uint32_t i2c) { if ((I2C_ISR(i2c) & I2C_ISR_RXNE) != 0) { return 1; } return 0; } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable Interrupt * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. * @param[in] interrupt Unsigned int32. Interrupt to enable. */ void i2c_enable_interrupt(uint32_t i2c, uint32_t interrupt) { I2C_CR1(i2c) |= interrupt; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable Interrupt * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. * @param[in] interrupt Unsigned int32. Interrupt to disable. */ void i2c_disable_interrupt(uint32_t i2c, uint32_t interrupt) { I2C_CR1(i2c) &= ~interrupt; } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable reception DMA * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_enable_rxdma(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_RXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable reception DMA * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_disable_rxdma(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_RXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief I2C Enable transmission DMA * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_enable_txdma(uint32_t i2c) { I2C_CR1(i2c) |= I2C_CR1_TXDMAEN; } /*---------------------------------------------------------------------------*/ /** @brief I2C Disable transmission DMA * * @param[in] i2c Unsigned int32. I2C register base address @ref i2c_reg_base. */ void i2c_disable_txdma(uint32_t i2c) { I2C_CR1(i2c) &= ~I2C_CR1_TXDMAEN; } void write_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size, uint8_t *data) { int wait; int i; while (i2c_busy(i2c) == 1); while (i2c_is_start(i2c) == 1); /*Setting transfer properties*/ i2c_set_bytes_to_transfer(i2c, size + 1); i2c_set_7bit_address(i2c, (i2c_addr & 0x7F)); i2c_set_write_transfer_dir(i2c); i2c_enable_autoend(i2c); /*start transfer*/ i2c_send_start(i2c); wait = true; while (wait) { if (i2c_transmit_int_status(i2c)) { wait = false; } while (i2c_nack(i2c)); } i2c_send_data(i2c, reg); for (i = 0; i < size; i++) { wait = true; while (wait) { if (i2c_transmit_int_status(i2c)) { wait = false; } while (i2c_nack(i2c)); } i2c_send_data(i2c, data[i]); } } void read_i2c(uint32_t i2c, uint8_t i2c_addr, uint8_t reg, uint8_t size, uint8_t *data) { int wait; int i; while (i2c_busy(i2c) == 1); while (i2c_is_start(i2c) == 1); /*Setting transfer properties*/ i2c_set_bytes_to_transfer(i2c, 1); i2c_set_7bit_address(i2c, i2c_addr); i2c_set_write_transfer_dir(i2c); i2c_disable_autoend(i2c); /*start transfer*/ i2c_send_start(i2c); wait = true; while (wait) { if (i2c_transmit_int_status(i2c)) { wait = false; } while (i2c_nack(i2c)); /* Some error */ } i2c_send_data(i2c, reg); while (i2c_is_start(i2c) == 1); /*Setting transfer properties*/ i2c_set_bytes_to_transfer(i2c, size); i2c_set_7bit_address(i2c, i2c_addr); i2c_set_read_transfer_dir(i2c); i2c_enable_autoend(i2c); /*start transfer*/ i2c_send_start(i2c); for (i = 0; i < size; i++) { while (i2c_received_data(i2c) == 0); data[i] = i2c_get_data(i2c); } } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f3/iwdg.c ================================================ /** @defgroup iwdg_file IWDG * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Independent Watchdog Timer * * @version 1.0.0 * * @date 18 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/libopencm3_stm32f3.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/f3/pwr.c ================================================ /** @defgroup pwr_file PWR * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Power control * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/rcc.c ================================================ /** @defgroup rcc_file RCC * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Reset and Clock Control * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * Modified by 2013 Fernando Cortes (stm32f3) * Modified by 2013 Guillermo Rivera (stm32f3) * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include /* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */ uint32_t rcc_ppre1_frequency = 8000000; uint32_t rcc_ppre2_frequency = 8000000; const clock_scale_t hsi_8mhz[CLOCK_END] = { { /* 44MHz */ .pll = RCC_CFGR_PLLMUL_PLL_IN_CLK_X11, .pllsrc = RCC_CFGR_PLLSRC_HSI_DIV2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE1_DIV_2, .ppre2 = RCC_CFGR_PPRE2_DIV_NONE, .power_save = 1, .flash_config = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY_1WS, .apb1_frequency = 22000000, .apb2_frequency = 44000000, }, { /* 48MHz */ .pll = RCC_CFGR_PLLMUL_PLL_IN_CLK_X12, .pllsrc = RCC_CFGR_PLLSRC_HSI_DIV2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE1_DIV_2, .ppre2 = RCC_CFGR_PPRE2_DIV_NONE, .power_save = 1, .flash_config = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY_1WS, .apb1_frequency = 24000000, .apb2_frequency = 48000000, }, { /* 64MHz */ .pll = RCC_CFGR_PLLMUL_PLL_IN_CLK_X16, .pllsrc = RCC_CFGR_PLLSRC_HSI_DIV2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE1_DIV_2, .ppre2 = RCC_CFGR_PPRE2_DIV_NONE, .power_save = 1, .flash_config = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY_2WS, .apb1_frequency = 32000000, .apb2_frequency = 64000000, } }; void rcc_osc_ready_int_clear(enum osc osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; } } void rcc_osc_ready_int_enable(enum osc osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; } } void rcc_osc_ready_int_disable(enum osc osc) { switch (osc) { case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYIE; break; } } int rcc_osc_ready_int_flag(enum osc osc) { switch (osc) { case PLL: return ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case HSE: return ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case HSI: return ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case LSE: return ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: return ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; } cm3_assert_not_reached(); } void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } void rcc_wait_for_osc_ready(enum osc osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) == 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) == 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) == 0); break; case LSE: while ((RCC_BDCR & RCC_BDCR_LSERDY) == 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) == 0); break; } } void rcc_wait_for_osc_not_ready(enum osc osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) != 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) != 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) != 0); break; case LSE: while ((RCC_BDCR & RCC_BDCR_LSERDY) != 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) != 0); break; } } void rcc_wait_for_sysclk_status(enum osc osc) { switch (osc) { case PLL: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_PLL); break; case HSE: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSE); break; case HSI: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSI); break; default: /* Shouldn't be reached. */ break; } } void rcc_osc_on(enum osc osc) { switch (osc) { case PLL: RCC_CR |= RCC_CR_PLLON; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; } } void rcc_osc_off(enum osc osc) { switch (osc) { case PLL: RCC_CR &= ~RCC_CR_PLLON; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; } } void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } void rcc_osc_bypass_enable(enum osc osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_osc_bypass_disable(enum osc osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en) { *reg |= en; } void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en) { *reg &= ~en; } void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset) { *reg |= reset; } void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset) { *reg &= ~clear_reset; } void rcc_set_sysclk_source(uint32_t clk) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 1) | (1 << 0)); RCC_CFGR = (reg32 | clk); } void rcc_set_pll_source(uint32_t pllsrc) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~RCC_CFGR_PLLSRC; RCC_CFGR = (reg32 | (pllsrc << 16)); } void rcc_set_ppre2(uint32_t ppre2) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 13) | (1 << 14) | (1 << 15)); RCC_CFGR = (reg32 | (ppre2 << 11)); } void rcc_set_ppre1(uint32_t ppre1) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 10) | (1 << 11) | (1 << 12)); RCC_CFGR = (reg32 | (ppre1 << 8)); } void rcc_set_hpre(uint32_t hpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); RCC_CFGR = (reg32 | (hpre << 4)); } void rcc_set_main_pll_hsi(uint32_t pll) { RCC_CFGR = (~RCC_CFGR_PLLMUL_MASK & RCC_CFGR) | (pll << RCC_CFGR_PLLMUL_SHIFT); } uint32_t rcc_get_system_clock_source(void) { /* Return the clock source which is used as system clock. */ return (RCC_CFGR & 0x000c) >> 2; } void rcc_clock_setup_hsi(const clock_scale_t *clock) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_HSI); /* XXX: se cayo */ rcc_wait_for_sysclk_status(HSI); rcc_osc_off(PLL); rcc_wait_for_osc_not_ready(PLL); rcc_set_pll_source(clock->pllsrc); rcc_set_main_pll_hsi(clock->pll); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre2(clock->ppre2); rcc_set_ppre1(clock->ppre1); /* Configure flash settings. */ flash_set_ws(clock->flash_config); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_PLL); /* XXX: se cayo */ /* Wait for PLL clock to be selected. */ rcc_wait_for_sysclk_status(PLL); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; } void rcc_backupdomain_reset(void) { /* Set the backup domain software reset. */ RCC_BDCR |= RCC_BDCR_BDRST; /* Clear the backup domain software reset. */ RCC_BDCR &= ~RCC_BDCR_BDRST; } void rcc_set_i2c_clock_hsi(uint32_t i2c) { if (i2c == I2C1) { RCC_CFGR3 &= ~RCC_CFGR3_I2C1SW; } if (i2c == I2C2) { RCC_CFGR3 &= ~RCC_CFGR3_I2C2SW; } } void rcc_set_i2c_clock_sysclk(uint32_t i2c) { if (i2c == I2C1) { RCC_CFGR3 |= RCC_CFGR3_I2C1SW; } if (i2c == I2C2) { RCC_CFGR3 |= RCC_CFGR3_I2C2SW; } } uint32_t rcc_get_i2c_clocks(void) { return RCC_CFGR3 & (RCC_CFGR3_I2C1SW | RCC_CFGR3_I2C2SW); } void rcc_usb_prescale_1_5(void) { RCC_CFGR &= ~RCC_CFGR_USBPRES; } void rcc_usb_prescale_1(void) { RCC_CFGR |= RCC_CFGR_USBPRES; } ================================================ FILE: firmware/libopencm3/lib/stm32/f3/spi.c ================================================ /** @defgroup spi_file SPI * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Serial Peripheral Interface * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include void spi_send8(uint32_t spi, uint8_t data) { /* Wait for transfer finished. */ while (!(SPI_SR(spi) & SPI_SR_TXE)); /* Write data (8 or 16 bits, depending on DFF) into DR. */ SPI_DR8(spi) = data; } uint8_t spi_read8(uint32_t spi) { /* Wait for transfer finished. */ while (!(SPI_SR(spi) & SPI_SR_RXNE)); /* Read the data (8 or 16 bits, depending on DFF bit) from DR. */ return SPI_DR8(spi); } void spi_set_data_size(uint32_t spi, uint16_t data_s) { SPI_CR2(spi) = (SPI_CR2(spi) & ~SPI_CR2_DS_MASK) | (data_s & SPI_CR2_DS_MASK); } void spi_fifo_reception_threshold_8bit(uint32_t spi) { SPI_CR2(spi) |= SPI_CR2_FRXTH; } void spi_fifo_reception_threshold_16bit(uint32_t spi) { SPI_CR2(spi) &= ~SPI_CR2_FRXTH; } void spi_i2s_mode_spi_mode(uint32_t spi) { SPI_I2SCFGR(spi) &= ~SPI_I2SCFGR_I2SMOD; } ================================================ FILE: firmware/libopencm3/lib/stm32/f3/timer.c ================================================ /** @defgroup timer_file TIMER * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx Timers * * @version 1.0.0 * * @date 11 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f3/usart.c ================================================ /** @defgroup usart_file USART * * @ingroup STM32F3xx * * @brief libopencm3 STM32F3xx USART * * @version 1.0.0 * * @date 30 August 2012 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include /*---------------------------------------------------------------------------*/ /** @brief USART Send a Data Word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] data unsigned 16 bit. */ void usart_send(uint32_t usart, uint16_t data) { /* Send data. */ USART_TDR(usart) = (data & USART_TDR_MASK); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Received Data Word. * * If parity is enabled the MSB (bit 7 or 8 depending on the word length) is * the parity bit. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @returns unsigned 16 bit data word. */ uint16_t usart_recv(uint32_t usart) { /* Receive data. */ return USART_RDR(usart) & USART_RDR_MASK; } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Transmit Data Buffer Empty * * Blocks until the transmit data buffer becomes empty and is ready to accept * the next data word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_wait_send_ready(uint32_t usart) { /* Wait until the data has been transferred into the shift register. */ while ((USART_ISR(usart) & USART_ISR_TXE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Wait for Received Data Available * * Blocks until the receive data buffer holds a valid received data word. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base */ void usart_wait_recv_ready(uint32_t usart) { /* Wait until the data is ready to be received. */ while ((USART_ISR(usart) & USART_ISR_RXNE) == 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Read a Status Flag. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. * @returns boolean: flag set. */ bool usart_get_flag(uint32_t usart, uint32_t flag) { return ((USART_ISR(usart) & flag) != 0); } /*---------------------------------------------------------------------------*/ /** @brief USART Return Interrupt Source. * * Returns true if the specified interrupt flag (IDLE, RXNE, TC, TXE or OE) was * set and the interrupt was enabled. If the specified flag is not an interrupt * flag, the function returns false. * * @todo These are the most important interrupts likely to be used. Others * relating to LIN break, and error conditions in multibuffer communication, * need to be added for completeness. * * @param[in] usart unsigned 32 bit. USART block register address base @ref * usart_reg_base * @param[in] flag Unsigned int32. Status register flag @ref usart_sr_flags. * @returns boolean: flag and interrupt enable both set. */ bool usart_get_interrupt_source(uint32_t usart, uint32_t flag) { uint32_t flag_set = (USART_ISR(usart) & flag); /* IDLE, RXNE, TC, TXE interrupts */ if ((flag >= USART_ISR_IDLE) && (flag <= USART_ISR_TXE)) { return ((flag_set & USART_CR1(usart)) != 0); /* Overrun error */ } else if (flag == USART_ISR_ORE) { return flag_set && (USART_CR3(usart) & USART_CR3_CTSIE); } return false; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f3/vector_chipset.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include static void pre_main(void) { /* Enable access to Floating-Point coprocessor. */ SCB_CPACR |= SCB_CPACR_FULL * (SCB_CPACR_CP10 | SCB_CPACR_CP11); } ================================================ FILE: firmware/libopencm3/lib/stm32/f4/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## Copyright (C) 2013 Alexandru Gagniuc ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32f4 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m4 -mthumb $(FP_FLAGS) \ -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32F4 # ARFLAGS = rcsv ARFLAGS = rcs OBJS = adc.o can.o gpio.o pwr.o rcc.o rtc.o crypto.o OBJS += crc_common_all.o dac_common_all.o dma_common_f24.o \ gpio_common_all.o gpio_common_f0234.o i2c_common_all.o \ iwdg_common_all.o pwr_common_all.o rtc_common_l1f024.o \ spi_common_all.o spi_common_f124.o timer_common_all.o \ timer_common_f234.o timer_common_f24.o usart_common_all.o \ usart_common_f124.o flash_common_f234.o flash_common_f24.o \ hash_common_f24.o crypto_common_f24.o exti_common_all.o OBJS += usb.o usb_standard.o usb_control.o usb_fx07_common.o \ usb_f107.o usb_f207.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/adc.c ================================================ /** @defgroup STM32F4xx_adc_file ADC @ingroup STM32F4xx @brief libopencm3 STM32F4xx Analog to Digital Converters @author @htmlonly © @endhtmlonly 2012 Ken Sarkies @date 30 August 2012 This library supports the A/D Converter Control System in the STM32 series of ARM Cortex Microcontrollers by ST Microelectronics. Devices can have up to three A/D converters each with their own set of registers. However all the A/D converters share a common clock which is prescaled from the APB2 clock by default by a minimum factor of 2 to a maximum of 8. The ADC resolution can be set to 12, 10, 8 or 6 bits. Each A/D converter has up to 19 channels: @li On ADC1 the analog channels 16 is internally connected to the temperature sensor, channel 17 to VREFINT, and channel 18 to VBATT. @li On ADC2 and ADC3 the analog channels 16 - 18 are not used. The conversions can occur as a one-off conversion whereby the process stops once conversion is complete. The conversions can also be continuous wherein a new conversion starts immediately the previous conversion has ended. Conversion can occur as a single channel conversion or a scan of a group of channels in either continuous or one-off mode. If more than one channel is converted in a scan group, DMA must be used to transfer the data as there is only one result register available. An interrupt can be set to occur at the end of conversion, which occurs after all channels have been scanned. A discontinuous mode allows a subgroup of group of a channels to be converted in bursts of a given length. Injected conversions allow a second group of channels to be converted separately from the regular group. An interrupt can be set to occur at the end of conversion, which occurs after all channels have been scanned. @section adc_f4_api_ex Basic ADC Handling API. Example 1: Simple single channel conversion polled. Enable the peripheral clock and ADC, reset ADC and set the prescaler divider. Set multiple mode to independent. @code gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO1); rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN); adc_set_clk_prescale(RCC_CFGR_ADCPRE_BY2); adc_disable_scan_mode(ADC1); adc_set_single_conversion_mode(ADC1); adc_set_sample_time(ADC1, ADC_CHANNEL0, ADC_SMPR1_SMP_1DOT5CYC); uint8_t channels[] = ADC_CHANNEL0; adc_set_regular_sequence(ADC1, 1, channels); adc_set_multi_mode(ADC_CCR_MULTI_INDEPENDENT); adc_power_on(ADC1); adc_start_conversion_regular(ADC1); while (! adc_eoc(ADC1)); reg16 = adc_read_regular(ADC1); @endcode LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Ken Sarkies * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief ADC Off Turn off the ADC to reduce power consumption to a few microamps. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_off(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_ADON; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Regular Conversions The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_analog_watchdog_regular(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_AWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog for Regular Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_analog_watchdog_regular(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for Injected Conversions The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_analog_watchdog_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JAWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog for Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_analog_watchdog_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JAWDEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Regular Conversions In this mode the ADC converts, on each trigger, a subgroup of up to 8 of the defined regular channel group. The subgroup is defined by the number of consecutive channels to be converted. After a subgroup has been converted the next trigger will start conversion of the immediately following subgroup of the same length or until the whole group has all been converted. When the the whole group has been converted, the next trigger will restart conversion of the subgroup at the beginning of the whole group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] length Unsigned int8. Number of channels in the group @ref adc_cr1_discnum */ void adc_enable_discontinuous_mode_regular(uint32_t adc, uint8_t length) { if ((length-1) > 7) { return; } ADC_CR1(adc) |= ADC_CR1_DISCEN; ADC_CR1(adc) |= ((length-1) << ADC_CR1_DISCNUM_SHIFT); } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Regular Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_discontinuous_mode_regular(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_DISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Discontinuous Mode for Injected Conversions In this mode the ADC converts sequentially one channel of the defined group of injected channels, cycling back to the first channel in the group once the entire group has been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_discontinuous_mode_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Discontinuous Mode for Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_discontinuous_mode_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JDISCEN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Automatic Injected Conversions The ADC converts a defined injected group of channels immediately after the regular channels have been converted. The external trigger on the injected channels is disabled as required. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_automatic_injected_group_conversion(uint32_t adc) { adc_disable_external_trigger_injected(adc); ADC_CR1(adc) |= ADC_CR1_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Automatic Injected Conversions @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_automatic_injected_group_conversion(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JAUTO; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for All Regular and/or Injected Channels The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @note The analog watchdog must be enabled for either or both of the regular or injected channels. If neither are enabled, the analog watchdog feature will be disabled. @ref adc_enable_analog_watchdog_injected, @ref adc_enable_analog_watchdog_regular. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog for a Selected Channel The analog watchdog allows the monitoring of an analog signal between two threshold levels. The thresholds must be preset. Comparison is done before data alignment takes place, so the thresholds are left-aligned. @note The analog watchdog must be enabled for either or both of the regular or injected channels. If neither are enabled, the analog watchdog feature will be disabled. If both are enabled, the same channel number is monitored. @ref adc_enable_analog_watchdog_injected, @ref adc_enable_analog_watchdog_regular. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] channel Unsigned int8. ADC channel number @ref adc_watchdog_channel */ void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t channel) { uint32_t reg32; reg32 = (ADC_CR1(adc) & ~ADC_CR1_AWDCH_MASK); /* Clear bits [4:0]. */ if (channel < 18) { reg32 |= channel; } ADC_CR1(adc) = reg32; ADC_CR1(adc) |= ADC_CR1_AWDSGL; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Scan Mode In this mode a conversion consists of a scan of the predefined set of channels, regular and injected, each channel conversion immediately following the previous one. It can use single, continuous or discontinuous mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_scan_mode(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_SCAN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Scan Mode @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_scan_mode(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_SCAN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Injected End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_eoc_interrupt_injected(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Injected End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_eoc_interrupt_injected(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_JEOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Analog Watchdog Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_awd_interrupt(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Analog Watchdog Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_awd_interrupt(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_AWDIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Regular End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_eoc_interrupt(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable Regular End-Of-Conversion Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_eoc_interrupt(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_EOCIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Regular Channels This starts conversion on a set of defined regular channels. It is cleared by hardware once conversion starts. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_start_conversion_regular(uint32_t adc) { /* Start conversion on regular channels. */ ADC_CR2(adc) |= ADC_CR2_SWSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR2(adc) & ADC_CR2_SWSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Software Triggered Conversion on Injected Channels This starts conversion on a set of defined injected channels. It is cleared by hardware once conversion starts. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_start_conversion_injected(uint32_t adc) { /* Start conversion on injected channels. */ ADC_CR2(adc) |= ADC_CR2_JSWSTART; /* Wait until the ADC starts the conversion. */ while (ADC_CR2(adc) & ADC_CR2_JSWSTART); } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Left Aligned @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_left_aligned(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Data as Right Aligned @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_right_aligned(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_ALIGN; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable DMA Transfers @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_dma(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_DMA; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable DMA Transfers @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_dma(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_DMA; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Continuous Conversion Mode In this mode the ADC starts a new conversion of a single channel or a channel group immediately following completion of the previous channel group conversion. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_continuous_conversion_mode(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable Single Conversion Mode In this mode the ADC performs a conversion of one channel or a channel group and stops. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_single_conversion_mode(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_CONT; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for a Single Channel The sampling time can be selected in ADC clock cycles from 1.5 to 239.5. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] channel Unsigned int8. ADC Channel integer 0..18 or from @ref adc_channel @param[in] time Unsigned int8. Sampling time selection from @ref adc_sample_rg */ void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time) { uint32_t reg32; if (channel < 10) { reg32 = ADC_SMPR2(adc); reg32 &= ~(0x7 << (channel * 3)); reg32 |= (time << (channel * 3)); ADC_SMPR2(adc) = reg32; } else { reg32 = ADC_SMPR1(adc); reg32 &= ~(0x7 << ((channel - 10) * 3)); reg32 |= (time << ((channel - 10) * 3)); ADC_SMPR1(adc) = reg32; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Set the Sample Time for All Channels The sampling time can be selected in ADC clock cycles from 1.5 to 239.5, same for all channels. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] time Unsigned int8. Sampling time selection from @ref adc_sample_rg */ void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time) { uint8_t i; uint32_t reg32 = 0; for (i = 0; i <= 9; i++) { reg32 |= (time << (i * 3)); } ADC_SMPR2(adc) = reg32; for (i = 10; i <= 17; i++) { reg32 |= (time << ((i - 10) * 3)); } ADC_SMPR1(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Upper Threshold @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] threshold Unsigned int8. Upper threshold value */ void adc_set_watchdog_high_threshold(uint32_t adc, uint16_t threshold) { uint32_t reg32 = 0; reg32 = (uint32_t)threshold; reg32 &= ~0xfffff000; /* Clear all bits above 11. */ ADC_HTR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Analog Watchdog Lower Threshold @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] threshold Unsigned int8. Lower threshold value */ void adc_set_watchdog_low_threshold(uint32_t adc, uint16_t threshold) { uint32_t reg32 = 0; reg32 = (uint32_t)threshold; reg32 &= ~0xfffff000; /* Clear all bits above 11. */ ADC_LTR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set a Regular Channel Conversion Sequence Define a sequence of channels to be converted as a regular group with a length from 1 to 16 channels. If this is called during conversion, the current conversion is reset and conversion begins again with the newly defined group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] length Unsigned int8. Number of channels in the group. @param[in] channel Unsigned int8[]. Set of channels in sequence, integers 0..18. */ void adc_set_regular_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32_1 = 0, reg32_2 = 0, reg32_3 = 0; uint8_t i = 0; /* Maximum sequence length is 16 channels. */ if (length > 16) { return; } for (i = 1; i <= length; i++) { if (i <= 6) { reg32_3 |= (channel[i - 1] << ((i - 1) * 5)); } if ((i > 6) & (i <= 12)) { reg32_2 |= (channel[i - 1] << ((i - 6 - 1) * 5)); } if ((i > 12) & (i <= 16)) { reg32_1 |= (channel[i - 1] << ((i - 12 - 1) * 5)); } } reg32_1 |= ((length - 1) << ADC_SQR1_L_LSB); ADC_SQR1(adc) = reg32_1; ADC_SQR2(adc) = reg32_2; ADC_SQR3(adc) = reg32_3; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set an Injected Channel Conversion Sequence Defines a sequence of channels to be converted as an injected group with a length from 1 to 4 channels. If this is called during conversion, the current conversion is reset and conversion begins again with the newly defined group. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] length Unsigned int8. Number of channels in the group. @param[in] channel Unsigned int8[]. Set of channels in sequence, integers 0..18 */ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[]) { uint32_t reg32 = 0; uint8_t i = 0; /* Maximum sequence length is 4 channels. */ if ((length-1) > 3) { return; } for (i = 1; i <= length; i++) { reg32 |= (channel[4 - i] << ((4 - i) * 5)); } reg32 |= ((length - 1) << ADC_JSQR_JL_LSB); ADC_JSQR(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag This flag is set after all channels of a regular or injected group have been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns bool. End of conversion flag. */ bool adc_eoc(uint32_t adc) { return (ADC_SR(adc) & ADC_SR_EOC) != 0; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the End-of-Conversion Flag for Injected Conversion This flag is set after all channels of an injected group have been converted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns bool. End of conversion flag. */ bool adc_eoc_injected(uint32_t adc) { return (ADC_SR(adc) & ADC_SR_JEOC) != 0; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from the Regular Conversion Result Register The result read back is 12 bits, right or left aligned within the first 16 bits. For ADC1 only, the higher 16 bits will hold the result from ADC2 if an appropriate dual mode has been set @see adc_set_dual_mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns Unsigned int32 conversion result. */ uint32_t adc_read_regular(uint32_t adc) { return ADC_DR(adc); } /*---------------------------------------------------------------------------*/ /** @brief ADC Read from an Injected Conversion Result Register The result read back from the selected injected result register (one of four) is 12 bits, right or left aligned within the first 16 bits. The result can have a negative value if the injected channel offset has been set @see adc_set_injected_offset. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] reg Unsigned int8. Register number (1 ... 4). @returns Unsigned int32 conversion result. */ uint32_t adc_read_injected(uint32_t adc, uint8_t reg) { switch (reg) { case 1: return ADC_JDR1(adc); case 2: return ADC_JDR2(adc); case 3: return ADC_JDR3(adc); case 4: return ADC_JDR4(adc); } return 0; } /*----------------------------------------------------------------------------*/ /** @brief ADC Set the Injected Channel Data Offset This value is subtracted from the injected channel results after conversion is complete, and can result in negative results. A separate value can be specified for each injected data register. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] reg Unsigned int8. Register number (1 ... 4). @param[in] offset Unsigned int32. */ void adc_set_injected_offset(uint32_t adc, uint8_t reg, uint32_t offset) { switch (reg) { case 1: ADC_JOFR1(adc) = offset; break; case 2: ADC_JOFR2(adc) = offset; break; case 3: ADC_JOFR3(adc) = offset; break; case 4: ADC_JOFR4(adc) = offset; break; } } /*---------------------------------------------------------------------------*/ /** @brief ADC Power On If the ADC is in power-down mode then it is powered up. The application needs to wait a time of about 3 microseconds for stabilization before using the ADC. If the ADC is already on this function call will have no effect. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_power_on(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_ADON; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Clock Prescale The ADC clock taken from the APB2 clock can be scaled down by 2, 4, 6 or 8. @param[in] prescale Unsigned int32. Prescale value for ADC Clock @ref adc_ccr_adcpre */ void adc_set_clk_prescale(uint32_t prescale) { uint32_t reg32 = ((ADC_CCR & ~ADC_CCR_ADCPRE_MASK) | prescale); ADC_CCR = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Dual/Triple Mode The multiple mode uses ADC1 as master, ADC2 and optionally ADC3 in a slave arrangement. This setting is applied to ADC1 only. The various modes possible are described in the reference manual. @param[in] mode Unsigned int32. Multiple mode selection from @ref adc_multi_mode */ void adc_set_multi_mode(uint32_t mode) { ADC_CCR |= mode; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Regular Channels This enables an external trigger for set of defined regular channels, and sets the polarity of the trigger event: rising or falling edge or both. Note that if the trigger polarity is zero, triggering is disabled. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] trigger Unsigned int32. Trigger identifier @ref adc_trigger_regular @param[in] polarity Unsigned int32. Trigger polarity @ref adc_trigger_polarity_regular */ void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger, uint32_t polarity) { uint32_t reg32 = ADC_CR2(adc); reg32 &= ~(ADC_CR2_EXTSEL_MASK | ADC_CR2_EXTEN_MASK); reg32 |= (trigger | polarity); ADC_CR2(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Regular Channels @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_external_trigger_regular(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_EXTEN_MASK; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an External Trigger for Injected Channels This enables an external trigger for set of defined injected channels, and sets the polarity of the trigger event: rising or falling edge or both. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] trigger Unsigned int8. Trigger identifier @ref adc_trigger_injected @param[in] polarity Unsigned int32. Trigger polarity @ref adc_trigger_polarity_injected */ void adc_enable_external_trigger_injected(uint32_t adc, uint32_t trigger, uint32_t polarity) { uint32_t reg32 = ADC_CR2(adc); reg32 &= ~(ADC_CR2_JEXTSEL_MASK | ADC_CR2_JEXTEN_MASK); reg32 |= (trigger | polarity); ADC_CR2(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable an External Trigger for Injected Channels @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_external_trigger_injected(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_JEXTEN_MASK; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set Resolution ADC Resolution can be reduced from 12 bits to 10, 8 or 6 bits for a corresponding reduction in conversion time (resolution + 3 ADC clock cycles). @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @param[in] resolution Unsigned int32. Resolution value @ref adc_cr1_res */ void adc_set_resolution(uint32_t adc, uint32_t resolution) { uint32_t reg32 = ADC_CR1(adc); reg32 &= ~ADC_CR1_RES_MASK; reg32 |= resolution; ADC_CR1(adc) = reg32; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable the Overrun Interrupt The overrun interrupt is generated when data is not read from a result register before the next conversion is written. If DMA is enabled, all transfers are terminated and any conversion sequence is aborted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_overrun_interrupt(uint32_t adc) { ADC_CR1(adc) |= ADC_CR1_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable the Overrun Interrupt @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_overrun_interrupt(uint32_t adc) { ADC_CR1(adc) &= ~ADC_CR1_OVRIE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Overrun Flag The overrun flag is set when data is not read from a result register before the next conversion is written. If DMA is enabled, all transfers are terminated and any conversion sequence is aborted. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns Unsigned int32 conversion result. */ bool adc_get_overrun_flag(uint32_t adc) { return ADC_SR(adc) & ADC_SR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Clear Overrun Flags The overrun flag is cleared. Note that if an overrun occurs, DMA is terminated. The flag must be cleared and the DMA stream and ADC reinitialised to resume conversions (see the reference manual). @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns Unsigned int32 conversion result. */ void adc_clear_overrun_flag(uint32_t adc) { /* need to write zero to clear this */ ADC_SR(adc) &= ~ADC_SR_OVR; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable an EOC for Each Conversion The EOC is set after each conversion in a sequence rather than at the end of the sequence. Overrun detection is enabled only if DMA is enabled. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_eoc_after_each(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_EOCS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable the EOC for Each Conversion The EOC is set at the end of each sequence rather than after each conversion in the sequence. Overrun detection is enabled always. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_eoc_after_group(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_EOCS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set DMA to Continue This must be set to allow DMA to continue to operate after the last conversion in the DMA sequence. This allows DMA to be used in continuous circular mode. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_dma_continue(uint32_t adc) { ADC_CR2(adc) |= ADC_CR2_DDS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Set DMA to Terminate This must be set to allow DMA to terminate after the last conversion in the DMA sequence. This can avoid overrun errors. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_set_dma_terminate(uint32_t adc) { ADC_CR2(adc) &= ~ADC_CR2_DDS; } /*---------------------------------------------------------------------------*/ /** @brief ADC Read the Analog Watchdog Flag This flag is set when the converted voltage crosses the high or low thresholds. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base @returns bool. AWD flag. */ bool adc_awd(uint32_t adc) { return ADC_SR(adc) & ADC_SR_AWD; } /*---------------------------------------------------------------------------*/ /** @brief ADC Enable The Temperature Sensor This enables both the sensor and the reference voltage measurements on channels 16 and 17. These are only available on ADC1 channel 16 and 17 respectively. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_enable_temperature_sensor() { ADC_CCR |= ADC_CCR_TSVREFE; } /*---------------------------------------------------------------------------*/ /** @brief ADC Disable The Temperature Sensor Disabling this will reduce power consumption from the sensor and the reference voltage measurements. @param[in] adc Unsigned int32. ADC block register address base @ref adc_reg_base */ void adc_disable_temperature_sensor() { ADC_CCR &= ~ADC_CCR_TSVREFE; } /*---------------------------------------------------------------------------*/ /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f4/crc.c ================================================ /** @defgroup crc_file CRC @ingroup STM32F4xx @brief libopencm3 STM32F4xx CRC @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/crypto.c ================================================ /** @defgroup crypto_file CRYPTO * * @ingroup STM32F4xx * * @brief libopencm3 STM32F4xx CRYPTO * * @version 1.0.0 * * @date 18 Jun 2013 * */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include /**@{*/ /*---------------------------------------------------------------------------*/ /** @brief Set the MAC algorithm */ void crypto_set_mac_algorithm(enum crypto_mode_mac mode) { crypto_set_algorithm((enum crypto_mode) mode); } /** * @brief Swap context * *@param[in] buf uint32_t Memory space for swap (16 items length) */ void crypto_context_swap(uint32_t *buf) { int i; /* Apply exact order of ? */ for (i = 0; i < 8; i++) { uint32_t save = *buf; *buf++ = CRYP_CSGCMCCMR(i); CRYP_CSGCMCCMR(i) = save; }; for (i = 0; i < 8; i++) { uint32_t save = *buf; *buf++ = CRYP_CSGCMR(i); CRYP_CSGCMCCMR(i) = save; }; } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/f4/dac.c ================================================ /** @defgroup dac_file DAC @ingroup STM32F4xx @brief libopencm3 STM32F4xx DAC @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/dma.c ================================================ /** @defgroup dma_file DMA @ingroup STM32F4xx @brief libopencm3 STM32F4xx DMA @version 1.0.0 @date 30 November 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup STM32F4xx @brief libopencm3 STM32F4xx General Purpose I/O @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/i2c.c ================================================ /** @defgroup i2c_file I2C @ingroup STM32F4xx @brief libopencm3 STM32F4xx I2C @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/iwdg.c ================================================ /** @defgroup iwdg_file IWDG @ingroup STM32F4xx @brief libopencm3 STM32F4xx Independent Watchdog Timer @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/libopencm3_stm32f4.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/f4/pwr.c ================================================ /** @defgroup pwr-file PWR @ingroup STM32F4xx @brief libopencm3 STM32F4xx Power Control @version 1.0.0 @author @htmlonly © @endhtmlonly 2011 Stephen Caudle @date 4 March 2013 This library supports the power control system for the STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void pwr_set_vos_scale(vos_scale_t scale) { if (scale == SCALE1) { PWR_CR |= PWR_CR_VOS; } else if (scale == SCALE2) { PWR_CR &= PWR_CR_VOS; } } ================================================ FILE: firmware/libopencm3/lib/stm32/f4/rcc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include /* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */ uint32_t rcc_ppre1_frequency = 16000000; uint32_t rcc_ppre2_frequency = 16000000; const clock_scale_t hse_8mhz_3v3[CLOCK_3V3_END] = { { /* 48MHz */ .pllm = 8, .plln = 96, .pllp = 2, .pllq = 2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 12000000, .apb2_frequency = 24000000, }, { /* 120MHz */ .pllm = 8, .plln = 240, .pllp = 2, .pllq = 5, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 30000000, .apb2_frequency = 60000000, }, { /* 168MHz */ .pllm = 8, .plln = 336, .pllp = 2, .pllq = 7, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_5WS, .apb1_frequency = 42000000, .apb2_frequency = 84000000, }, }; const clock_scale_t hse_12mhz_3v3[CLOCK_3V3_END] = { { /* 48MHz */ .pllm = 12, .plln = 96, .pllp = 2, .pllq = 2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 12000000, .apb2_frequency = 24000000, }, { /* 120MHz */ .pllm = 12, .plln = 240, .pllp = 2, .pllq = 5, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 30000000, .apb2_frequency = 60000000, }, { /* 168MHz */ .pllm = 12, .plln = 336, .pllp = 2, .pllq = 7, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_5WS, .apb1_frequency = 42000000, .apb2_frequency = 84000000, }, }; const clock_scale_t hse_16mhz_3v3[CLOCK_3V3_END] = { { /* 48MHz */ .pllm = 16, .plln = 96, .pllp = 2, .pllq = 2, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 12000000, .apb2_frequency = 24000000, }, { /* 120MHz */ .pllm = 16, .plln = 240, .pllp = 2, .pllq = 5, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .power_save = 1, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_3WS, .apb1_frequency = 30000000, .apb2_frequency = 60000000, }, { /* 168MHz */ .pllm = 16, .plln = 336, .pllp = 2, .pllq = 7, .hpre = RCC_CFGR_HPRE_DIV_NONE, .ppre1 = RCC_CFGR_PPRE_DIV_4, .ppre2 = RCC_CFGR_PPRE_DIV_2, .flash_config = FLASH_ACR_ICE | FLASH_ACR_DCE | FLASH_ACR_LATENCY_5WS, .apb1_frequency = 42000000, .apb2_frequency = 84000000, }, }; void rcc_osc_ready_int_clear(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; } } void rcc_osc_ready_int_enable(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; } } void rcc_osc_ready_int_disable(osc_t osc) { switch (osc) { case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYIE; break; } } int rcc_osc_ready_int_flag(osc_t osc) { switch (osc) { case PLL: return ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case HSE: return ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case HSI: return ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case LSE: return ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: return ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; } cm3_assert_not_reached(); } void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } void rcc_wait_for_osc_ready(osc_t osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) == 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) == 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) == 0); break; case LSE: while ((RCC_BDCR & RCC_BDCR_LSERDY) == 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) == 0); break; } } void rcc_wait_for_sysclk_status(osc_t osc) { switch (osc) { case PLL: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_PLL); break; case HSE: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSE); break; case HSI: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_HSI); break; default: /* Shouldn't be reached. */ break; } } void rcc_osc_on(osc_t osc) { switch (osc) { case PLL: RCC_CR |= RCC_CR_PLLON; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; } } void rcc_osc_off(osc_t osc) { switch (osc) { case PLL: RCC_CR &= ~RCC_CR_PLLON; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; } } void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } void rcc_osc_bypass_enable(osc_t osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_BDCR |= RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_osc_bypass_disable(osc_t osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_BDCR &= ~RCC_BDCR_LSEBYP; break; case PLL: case HSI: case LSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en) { *reg |= en; } void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en) { *reg &= ~en; } void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset) { *reg |= reset; } void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset) { *reg &= ~clear_reset; } void rcc_set_sysclk_source(uint32_t clk) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 1) | (1 << 0)); RCC_CFGR = (reg32 | clk); } void rcc_set_pll_source(uint32_t pllsrc) { uint32_t reg32; reg32 = RCC_PLLCFGR; reg32 &= ~(1 << 22); RCC_PLLCFGR = (reg32 | (pllsrc << 22)); } void rcc_set_ppre2(uint32_t ppre2) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 13) | (1 << 14) | (1 << 15)); RCC_CFGR = (reg32 | (ppre2 << 13)); } void rcc_set_ppre1(uint32_t ppre1) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 10) | (1 << 11) | (1 << 12)); RCC_CFGR = (reg32 | (ppre1 << 10)); } void rcc_set_hpre(uint32_t hpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); RCC_CFGR = (reg32 | (hpre << 4)); } void rcc_set_rtcpre(uint32_t rtcpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19) | (1 << 20)); RCC_CFGR = (reg32 | (rtcpre << 16)); } void rcc_set_main_pll_hsi(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq) { RCC_PLLCFGR = (pllm << RCC_PLLCFGR_PLLM_SHIFT) | (plln << RCC_PLLCFGR_PLLN_SHIFT) | (((pllp >> 1) - 1) << RCC_PLLCFGR_PLLP_SHIFT) | (pllq << RCC_PLLCFGR_PLLQ_SHIFT); } void rcc_set_main_pll_hse(uint32_t pllm, uint32_t plln, uint32_t pllp, uint32_t pllq) { RCC_PLLCFGR = (pllm << RCC_PLLCFGR_PLLM_SHIFT) | (plln << RCC_PLLCFGR_PLLN_SHIFT) | (((pllp >> 1) - 1) << RCC_PLLCFGR_PLLP_SHIFT) | RCC_PLLCFGR_PLLSRC | (pllq << RCC_PLLCFGR_PLLQ_SHIFT); } uint32_t rcc_system_clock_source(void) { /* Return the clock source which is used as system clock. */ return (RCC_CFGR & 0x000c) >> 2; } void rcc_clock_setup_hse_3v3(const clock_scale_t *clock) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_HSI); /* Enable external high-speed oscillator 8MHz. */ rcc_osc_on(HSE); rcc_wait_for_osc_ready(HSE); /* Enable/disable high performance mode */ if (!clock->power_save) { pwr_set_vos_scale(SCALE1); } else { pwr_set_vos_scale(SCALE2); } /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre1(clock->ppre1); rcc_set_ppre2(clock->ppre2); rcc_set_main_pll_hse(clock->pllm, clock->plln, clock->pllp, clock->pllq); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Configure flash settings. */ flash_set_ws(clock->flash_config); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_PLL); /* Wait for PLL clock to be selected. */ rcc_wait_for_sysclk_status(PLL); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; /* Disable internal high-speed oscillator. */ rcc_osc_off(HSI); } void rcc_backupdomain_reset(void) { /* Set the backup domain software reset. */ RCC_BDCR |= RCC_BDCR_BDRST; /* Clear the backup domain software reset. */ RCC_BDCR &= ~RCC_BDCR_BDRST; } ================================================ FILE: firmware/libopencm3/lib/stm32/f4/rtc.c ================================================ /** @defgroup rtc_file RTC * * @ingroup STM32F4xx * * @brief libopencm3 STM32F4xx RTC * * @version 1.0.0 * * @date 4 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include /*---------------------------------------------------------------------------*/ /** @brief Enable the wakeup timer @warning You must unlock the registers before using this function */ void rtc_enable_wakeup_timer(void) { RTC_CR |= RTC_CR_WUTE | (RTC_CR_OSEL_WAKEUP << RTC_CR_OSEL_SHIFT); rtc_enable_wakeup_timer_interrupt(); } /*---------------------------------------------------------------------------*/ /** @brief Disable the wakeup timer @warning You must unlock the registers before using this function */ void rtc_disable_wakeup_timer(void) { RTC_CR &= ~RTC_CR_WUTE; rtc_disable_wakeup_timer_interrupt(); } /*---------------------------------------------------------------------------*/ /** @brief Enable the wakeup timer interrupt @warning You must unlock the registers before using this function */ void rtc_enable_wakeup_timer_interrupt(void) { /* FTFM: * To enable the RTC Wakeup interrupt, the following sequence is * required: * 1. Configure and enable the EXTI Line 22 in interrupt mode and * select the rising edge sensitivity. */ exti_enable_request(EXTI22); exti_set_trigger(EXTI22, EXTI_TRIGGER_RISING); /* 2. Configure and enable the RTC_WKUP IRQ channel in the NVIC. */ nvic_enable_irq(NVIC_RTC_WKUP_IRQ); nvic_set_priority(NVIC_RTC_WKUP_IRQ, 1); /* 3. Configure the RTC to generate the RTC wakeup timer event. */ RTC_CR |= RTC_CR_WUTIE; /* Enable the interrupt */ } /*---------------------------------------------------------------------------*/ /** @brief Disable the wakeup timer interrupt @warning You must unlock the registers before using this function */ void rtc_disable_wakeup_timer_interrupt(void) { /* 1. Disable EXTI Line 22 */ exti_disable_request(EXTI22); /* 2. Disable RTC_WKUP IRQ channel in the NVIC. */ nvic_disable_irq(NVIC_RTC_WKUP_IRQ); /* 3. Disable RTC wakeup timer event. */ RTC_CR &= ~RTC_CR_WUTIE; } ================================================ FILE: firmware/libopencm3/lib/stm32/f4/spi.c ================================================ /** @defgroup spi_file SPI @ingroup STM32F4xx @brief libopencm3 STM32F4xx SPI @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/stm32f405x6.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2011 Stephen Caudle * Copyright (C) 2013 Sergey Krukowski * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for the STM32F405RGT6 chip (1024K flash, 128K RAM). */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 1024K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K } /* Include the common ld script. */ INCLUDE libopencm3_stm32f4.ld ================================================ FILE: firmware/libopencm3/lib/stm32/f4/timer.c ================================================ /* This file is used for documentation purposes. It does not need to be compiled. All source code is in the common area. If there is any device specific code required it can be included here, in which case this file must be added to the compile list. */ /** @defgroup timer_file Timers @ingroup STM32F4xx @brief libopencm3 STM32F4xx Timers @version 1.0.0 @date 18 August 2012 */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/usart.c ================================================ /** @defgroup usart_file USART @ingroup STM32F4xx @brief libopencm3 STM32F4xx USART @version 1.0.0 @date 30 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/f4/vector_chipset.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Piotr Esden-Tempski * Copyright (C) 2011 Fergus Noble * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include static void pre_main(void) { /* Enable access to Floating-Point coprocessor. */ SCB_CPACR |= SCB_CPACR_FULL * (SCB_CPACR_CP10 | SCB_CPACR_CP11); } ================================================ FILE: firmware/libopencm3/lib/stm32/l1/Makefile ================================================ ## ## This file is part of the libopencm3 project. ## ## Copyright (C) 2009 Uwe Hermann ## ## This library is free software: you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at your option) any later version. ## ## This library 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 Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . ## LIBNAME = libopencm3_stm32l1 PREFIX ?= arm-none-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-ar CFLAGS = -Os -g \ -Wall -Wextra -Wimplicit-function-declaration \ -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \ -Wundef -Wshadow \ -I../../../include -fno-common \ -mcpu=cortex-m3 $(FP_FLAGS) -mthumb -Wstrict-prototypes \ -ffunction-sections -fdata-sections -MD -DSTM32L1 # ARFLAGS = rcsv ARFLAGS = rcs OBJS = crc.o desig.o flash.o rcc.o usart.o dma.o OBJS += crc_common_all.o dac_common_all.o OBJS += dma_common_l1f013.o OBJS += gpio_common_all.o gpio_common_f0234.o OBJS += i2c_common_all.o iwdg_common_all.o OBJS += pwr_common_all.o pwr.o rtc_common_l1f024.o OBJS += spi_common_all.o timer_common_all.o OBJS += usart_common_all.o usart_common_f124.o OBJS += exti_common_all.o VPATH += ../../usb:../:../../cm3:../common include ../../Makefile.include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/crc.c ================================================ /** @defgroup crc_file CRC @ingroup STM32L1xx @brief libopencm3 STM32L1xx CRC @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/dac.c ================================================ /** @defgroup dac_file DAC @ingroup STM32L1xx @brief libopencm3 STM32L1xx DAC @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/dma.c ================================================ /** @defgroup dma_file DMA * * @ingroup STM32L1xx * * @brief libopencm3 STM32L1xx DMA * * @version 1.0.0 * * @date 10 July 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/flash.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Thomas Otto * Copyright (C) 2010 Mark Butler * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include void flash_64bit_enable(void) { FLASH_ACR |= FLASH_ACR_ACC64; } void flash_64bit_disable(void) { FLASH_ACR &= ~FLASH_ACR_ACC64; } void flash_prefetch_enable(void) { FLASH_ACR |= FLASH_ACR_PRFTEN; } void flash_prefetch_disable(void) { FLASH_ACR &= ~FLASH_ACR_PRFTEN; } void flash_set_ws(uint32_t ws) { uint32_t reg32; reg32 = FLASH_ACR; reg32 &= ~(1 << 0); reg32 |= ws; FLASH_ACR = reg32; } ================================================ FILE: firmware/libopencm3/lib/stm32/l1/gpio.c ================================================ /** @defgroup gpio_file GPIO @ingroup STM32L1xx @brief libopencm3 STM32L1xx General Purpose I/O @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/i2c.c ================================================ /** @defgroup i2c_file I2C @ingroup STM32L1xx @brief libopencm3 STM32L1xx I2C @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/iwdg.c ================================================ /** @defgroup iwdg_file IWDG @ingroup STM32L1xx @brief libopencm3 STM32L1xx Independent Watchdog Timer @version 1.0.0 @date 18 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/libopencm3_stm32l1.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Uwe Hermann * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Generic linker script for STM32 targets using libopencm3. */ /* Memory regions must be defined in the ld script which includes this one. */ /* Enforce emmition of the vector table. */ EXTERN (vector_table) /* Define the entry point of the output file. */ ENTRY(reset_handler) /* Define sections. */ SECTIONS { .text : { *(.vectors) /* Vector table */ *(.text*) /* Program code */ . = ALIGN(4); *(.rodata*) /* Read-only data */ . = ALIGN(4); } >rom /* C++ Static constructors/destructors, also used for __attribute__ * ((constructor)) and the likes */ .preinit_array : { . = ALIGN(4); __preinit_array_start = .; KEEP (*(.preinit_array)) __preinit_array_end = .; } >rom .init_array : { . = ALIGN(4); __init_array_start = .; KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array)) __init_array_end = .; } >rom .fini_array : { . = ALIGN(4); __fini_array_start = .; KEEP (*(.fini_array)) KEEP (*(SORT(.fini_array.*))) __fini_array_end = .; } >rom /* * Another section used by C++ stuff, appears when using newlib with * 64bit (long long) printf support */ .ARM.extab : { *(.ARM.extab*) } >rom .ARM.exidx : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } >rom . = ALIGN(4); _etext = .; .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram AT >rom _data_loadaddr = LOADADDR(.data); .bss : { *(.bss*) /* Read-write zero initialized data */ *(COMMON) . = ALIGN(4); _ebss = .; } >ram /* * The .eh_frame section appears to be used for C++ exception handling. * You may need to fix this if you're using C++. */ /DISCARD/ : { *(.eh_frame) } . = ALIGN(4); end = .; } PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); ================================================ FILE: firmware/libopencm3/lib/stm32/l1/pwr.c ================================================ /** @defgroup pwr-file PWR @ingroup STM32L1xx @brief libopencm3 STM32L1xx Power Control @version 1.0.0 @author @htmlonly © @endhtmlonly 2012 Karl Palsson @date 4 March 2013 This library supports the power control system for the STM32L1 series of ARM Cortex Microcontrollers by ST Microelectronics. LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include void pwr_set_vos_scale(vos_scale_t scale) { /* You are not allowed to write zeros here, don't try and optimize! */ uint32_t reg = PWR_CR; reg &= ~(PWR_CR_VOS_MASK); switch (scale) { case RANGE1: reg |= PWR_CR_VOS_RANGE1; break; case RANGE2: reg |= PWR_CR_VOS_RANGE2; break; case RANGE3: reg |= PWR_CR_VOS_RANGE3; break; } PWR_CR = reg; } ================================================ FILE: firmware/libopencm3/lib/stm32/l1/rcc.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2009 Federico Ruiz-Ugalde * Copyright (C) 2009 Uwe Hermann * Copyright (C) 2010 Thomas Otto * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * Based on the F4 code... */ #include #include #include /* Set the default ppre1 and ppre2 peripheral clock frequencies after reset. */ uint32_t rcc_ppre1_frequency = 2097000; uint32_t rcc_ppre2_frequency = 2097000; const clock_scale_t clock_config[CLOCK_CONFIG_END] = { { /* 24MHz PLL from HSI */ .pll_source = RCC_CFGR_PLLSRC_HSI_CLK, .pll_mul = RCC_CFGR_PLLMUL_MUL3, .pll_div = RCC_CFGR_PLLDIV_DIV2, .hpre = RCC_CFGR_HPRE_SYSCLK_NODIV, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_1WS, .apb1_frequency = 24000000, .apb2_frequency = 24000000, }, { /* 32MHz PLL from HSI */ .pll_source = RCC_CFGR_PLLSRC_HSI_CLK, .pll_mul = RCC_CFGR_PLLMUL_MUL6, .pll_div = RCC_CFGR_PLLDIV_DIV3, .hpre = RCC_CFGR_HPRE_SYSCLK_NODIV, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_1WS, .apb1_frequency = 32000000, .apb2_frequency = 32000000, }, { /* 16MHz HSI raw */ .hpre = RCC_CFGR_HPRE_SYSCLK_NODIV, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_0WS, .apb1_frequency = 16000000, .apb2_frequency = 16000000, }, { /* 4MHz HSI raw */ .hpre = RCC_CFGR_HPRE_SYSCLK_DIV4, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_0WS, .apb1_frequency = 4000000, .apb2_frequency = 4000000, }, { /* 4MHz MSI raw */ .hpre = RCC_CFGR_HPRE_SYSCLK_NODIV, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_0WS, .apb1_frequency = 4194000, .apb2_frequency = 4194000, .msi_range = RCC_ICSCR_MSIRANGE_4MHZ, }, { /* 2MHz MSI raw */ .hpre = RCC_CFGR_HPRE_SYSCLK_NODIV, .ppre1 = RCC_CFGR_PPRE1_HCLK_NODIV, .ppre2 = RCC_CFGR_PPRE2_HCLK_NODIV, .voltage_scale = RANGE1, .flash_config = FLASH_ACR_LATENCY_0WS, .apb1_frequency = 2097000, .apb2_frequency = 2097000, .msi_range = RCC_ICSCR_MSIRANGE_2MHZ, }, }; void rcc_osc_ready_int_clear(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYC; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYC; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYC; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYC; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYC; break; case MSI: RCC_CIR |= RCC_CIR_MSIRDYC; break; } } void rcc_osc_ready_int_enable(osc_t osc) { switch (osc) { case PLL: RCC_CIR |= RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR |= RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR |= RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR |= RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR |= RCC_CIR_LSIRDYIE; break; case MSI: RCC_CIR |= RCC_CIR_MSIRDYIE; break; } } void rcc_osc_ready_int_disable(osc_t osc) { switch (osc) { case PLL: RCC_CIR &= ~RCC_CIR_PLLRDYIE; break; case HSE: RCC_CIR &= ~RCC_CIR_HSERDYIE; break; case HSI: RCC_CIR &= ~RCC_CIR_HSIRDYIE; break; case LSE: RCC_CIR &= ~RCC_CIR_LSERDYIE; break; case LSI: RCC_CIR &= ~RCC_CIR_LSIRDYIE; break; case MSI: RCC_CIR &= ~RCC_CIR_MSIRDYIE; break; } } int rcc_osc_ready_int_flag(osc_t osc) { switch (osc) { case PLL: return ((RCC_CIR & RCC_CIR_PLLRDYF) != 0); break; case HSE: return ((RCC_CIR & RCC_CIR_HSERDYF) != 0); break; case HSI: return ((RCC_CIR & RCC_CIR_HSIRDYF) != 0); break; case LSE: return ((RCC_CIR & RCC_CIR_LSERDYF) != 0); break; case LSI: return ((RCC_CIR & RCC_CIR_LSIRDYF) != 0); break; case MSI: return ((RCC_CIR & RCC_CIR_MSIRDYF) != 0); break; } /* Shouldn't be reached. */ return -1; } void rcc_css_int_clear(void) { RCC_CIR |= RCC_CIR_CSSC; } int rcc_css_int_flag(void) { return ((RCC_CIR & RCC_CIR_CSSF) != 0); } void rcc_wait_for_osc_ready(osc_t osc) { switch (osc) { case PLL: while ((RCC_CR & RCC_CR_PLLRDY) == 0); break; case HSE: while ((RCC_CR & RCC_CR_HSERDY) == 0); break; case HSI: while ((RCC_CR & RCC_CR_HSIRDY) == 0); break; case MSI: while ((RCC_CR & RCC_CR_MSIRDY) == 0); break; case LSE: while ((RCC_CSR & RCC_CSR_LSERDY) == 0); break; case LSI: while ((RCC_CSR & RCC_CSR_LSIRDY) == 0); break; } } void rcc_wait_for_sysclk_status(osc_t osc) { switch (osc) { case PLL: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_SYSCLKSEL_PLLCLK); break; case HSE: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_SYSCLKSEL_HSECLK); break; case HSI: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_SYSCLKSEL_HSICLK); break; case MSI: while ((RCC_CFGR & ((1 << 1) | (1 << 0))) != RCC_CFGR_SWS_SYSCLKSEL_MSICLK); break; default: /* Shouldn't be reached. */ break; } } void rcc_osc_on(osc_t osc) { switch (osc) { case PLL: RCC_CR |= RCC_CR_PLLON; break; case MSI: RCC_CR |= RCC_CR_MSION; break; case HSE: RCC_CR |= RCC_CR_HSEON; break; case HSI: RCC_CR |= RCC_CR_HSION; break; case LSE: RCC_CSR |= RCC_CSR_LSEON; break; case LSI: RCC_CSR |= RCC_CSR_LSION; break; } } void rcc_osc_off(osc_t osc) { switch (osc) { case PLL: RCC_CR &= ~RCC_CR_PLLON; break; case MSI: RCC_CR &= ~RCC_CR_MSION; break; case HSE: RCC_CR &= ~RCC_CR_HSEON; break; case HSI: RCC_CR &= ~RCC_CR_HSION; break; case LSE: RCC_CSR &= ~RCC_CSR_LSEON; break; case LSI: RCC_CSR &= ~RCC_CSR_LSION; break; } } void rcc_css_enable(void) { RCC_CR |= RCC_CR_CSSON; } void rcc_css_disable(void) { RCC_CR &= ~RCC_CR_CSSON; } void rcc_osc_bypass_enable(osc_t osc) { switch (osc) { case HSE: RCC_CR |= RCC_CR_HSEBYP; break; case LSE: RCC_CSR |= RCC_CSR_LSEBYP; break; case PLL: case HSI: case LSI: case MSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_osc_bypass_disable(osc_t osc) { switch (osc) { case HSE: RCC_CR &= ~RCC_CR_HSEBYP; break; case LSE: RCC_CSR &= ~RCC_CSR_LSEBYP; break; case PLL: case HSI: case LSI: case MSI: /* Do nothing, only HSE/LSE allowed here. */ break; } } void rcc_peripheral_enable_clock(volatile uint32_t *reg, uint32_t en) { *reg |= en; } void rcc_peripheral_disable_clock(volatile uint32_t *reg, uint32_t en) { *reg &= ~en; } void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset) { *reg |= reset; } void rcc_peripheral_clear_reset(volatile uint32_t *reg, uint32_t clear_reset) { *reg &= ~clear_reset; } void rcc_set_sysclk_source(uint32_t clk) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 1) | (1 << 0)); RCC_CFGR = (reg32 | clk); } void rcc_set_pll_configuration(uint32_t source, uint32_t multiplier, uint32_t divisor) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~(RCC_CFGR_PLLDIV_MASK << RCC_CFGR_PLLDIV_SHIFT); reg32 &= ~(RCC_CFGR_PLLMUL_MASK << RCC_CFGR_PLLMUL_SHIFT); reg32 &= ~(1 << 16); reg32 |= (source << 16); reg32 |= (multiplier << RCC_CFGR_PLLMUL_SHIFT); reg32 |= (divisor << RCC_CFGR_PLLDIV_SHIFT); RCC_CFGR = reg32; } void rcc_set_pll_source(uint32_t pllsrc) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~(1 << 16); RCC_CFGR = (reg32 | (pllsrc << 16)); } void rcc_set_ppre2(uint32_t ppre2) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 13) | (1 << 12) | (1 << 11)); RCC_CFGR = (reg32 | (ppre2 << 11)); } void rcc_set_ppre1(uint32_t ppre1) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 10) | (1 << 9) | (1 << 8)); RCC_CFGR = (reg32 | (ppre1 << 8)); } void rcc_set_hpre(uint32_t hpre) { uint32_t reg32; reg32 = RCC_CFGR; reg32 &= ~((1 << 4) | (1 << 5) | (1 << 6) | (1 << 7)); RCC_CFGR = (reg32 | (hpre << 4)); } void rcc_set_rtcpre(uint32_t rtcpre) { uint32_t reg32; reg32 = RCC_CR; reg32 &= ~((1 << 30) | (1 << 29)); RCC_CR = (reg32 | (rtcpre << 29)); } uint32_t rcc_system_clock_source(void) { /* Return the clock source which is used as system clock. */ return (RCC_CFGR & 0x000c) >> 2; } void rcc_rtc_select_clock(uint32_t clock) { RCC_CSR &= ~(RCC_CSR_RTCSEL_MASK << RCC_CSR_RTCSEL_SHIFT); RCC_CSR |= (clock << RCC_CSR_RTCSEL_SHIFT); } void rcc_clock_setup_msi(const clock_scale_t *clock) { /* Enable internal multi-speed oscillator. */ uint32_t reg = RCC_ICSCR; reg &= ~(RCC_ICSCR_MSIRANGE_MASK << RCC_ICSCR_MSIRANGE_SHIFT); reg |= (clock->msi_range << RCC_ICSCR_MSIRANGE_SHIFT); RCC_ICSCR = reg; rcc_osc_on(MSI); rcc_wait_for_osc_ready(MSI); /* Select MSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_MSICLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre1(clock->ppre1); rcc_set_ppre2(clock->ppre2); rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_PWREN); pwr_set_vos_scale(clock->voltage_scale); /* I guess this should be in the settings? */ flash_64bit_enable(); flash_prefetch_enable(); /* Configure flash settings. */ flash_set_ws(clock->flash_config); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; } void rcc_clock_setup_hsi(const clock_scale_t *clock) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* Select HSI as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_HSICLK); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre1(clock->ppre1); rcc_set_ppre2(clock->ppre2); rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_PWREN); pwr_set_vos_scale(clock->voltage_scale); /* I guess this should be in the settings? */ flash_64bit_enable(); flash_prefetch_enable(); /* Configure flash settings. */ flash_set_ws(clock->flash_config); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; } void rcc_clock_setup_pll(const clock_scale_t *clock) { /* Enable internal high-speed oscillator. */ rcc_osc_on(HSI); rcc_wait_for_osc_ready(HSI); /* * Set prescalers for AHB, ADC, ABP1, ABP2. * Do this before touching the PLL (TODO: why?). */ rcc_set_hpre(clock->hpre); rcc_set_ppre1(clock->ppre1); rcc_set_ppre2(clock->ppre2); rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_PWREN); pwr_set_vos_scale(clock->voltage_scale); /* I guess this should be in the settings? */ flash_64bit_enable(); flash_prefetch_enable(); /* Configure flash settings. */ flash_set_ws(clock->flash_config); rcc_set_pll_configuration(clock->pll_source, clock->pll_mul, clock->pll_div); /* Enable PLL oscillator and wait for it to stabilize. */ rcc_osc_on(PLL); rcc_wait_for_osc_ready(PLL); /* Select PLL as SYSCLK source. */ rcc_set_sysclk_source(RCC_CFGR_SW_SYSCLKSEL_PLLCLK); /* Set the peripheral clock frequencies used. */ rcc_ppre1_frequency = clock->apb1_frequency; rcc_ppre2_frequency = clock->apb2_frequency; } ================================================ FILE: firmware/libopencm3/lib/stm32/l1/rtc.c ================================================ /** @defgroup rtc_file RTC * * @ingroup STM32L1xx * * @brief libopencm3 STM32L1xx RTC * * @version 1.0.0 * * @date 4 March 2013 * * LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/spi.c ================================================ /** @defgroup spi_file SPI @ingroup STM32L1xx @brief libopencm3 STM32L1xx SPI @version 1.0.0 @date 15 October 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/stm32/l1/stm32l15xx6.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32L15xx6, 32K flash, 10K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 32K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 10K eep (r) : ORIGIN = 0x08080000, LENGTH = 4K } /* Include the common ld script. */ INCLUDE libopencm3_stm32l1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/l1/stm32l15xx8.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32L15xx8, 64K flash, 10K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 10K eep (r) : ORIGIN = 0x08080000, LENGTH = 4K } /* Include the common ld script. */ INCLUDE libopencm3_stm32l1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/l1/stm32l15xxb.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2012 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32L15xxB, 128K flash, 16K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 16K eep (r) : ORIGIN = 0x08080000, LENGTH = 4K } /* Include the common ld script. */ INCLUDE libopencm3_stm32l1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/l1/stm32l15xxc.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32L15xxC, 256k flash, 32K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 32K eep (r) : ORIGIN = 0x08080000, LENGTH = 8K } /* Include the common ld script. */ INCLUDE libopencm3_stm32l1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/l1/stm32l15xxd.ld ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2013 Karl Palsson * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /* Linker script for STM32L15xxD, 384K flash, 38K RAM. */ /* Define memory regions. */ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 384K ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K eep (r) : ORIGIN = 0x08080000, LENGTH = 12K } /* Include the common ld script. */ INCLUDE libopencm3_stm32l1.ld ================================================ FILE: firmware/libopencm3/lib/stm32/l1/timer.c ================================================ /** @defgroup timer_file Timers @ingroup STM32L1xx @brief libopencm3 STM32L1xx Timers @version 1.0.0 @date 18 August 2012 */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Edward Cheeseman * Copyright (C) 2011 Stephen Caudle * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include /*---------------------------------------------------------------------------*/ /** @brief Set Timer Option Set timer options register on TIM2 or TIM3, used for trigger remapping. @param[in] timer_peripheral Unsigned int32. Timer register address base @returns Unsigned int32. Option flags TIM2: @ref tim2_opt_trigger_remap, TIM3: @ref tim3_opt_trigger_remap. */ void timer_set_option(uint32_t timer_peripheral, uint32_t option) { if (timer_peripheral == TIM2) { TIM_OR(timer_peripheral) &= ~TIM2_OR_ITR1_RMP_MASK; TIM_OR(timer_peripheral) |= option; } else if (timer_peripheral == TIM3) { TIM_OR(timer_peripheral) &= ~TIM3_OR_ITR2_RMP_MASK; TIM_OR(timer_peripheral) |= option; } } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/stm32/l1/usart.c ================================================ /** @defgroup usart_file USART @ingroup STM32L1xx @brief libopencm3 STM32L1xx USART @version 1.0.0 @date 30 August 2012 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include ================================================ FILE: firmware/libopencm3/lib/usb/usb.c ================================================ /** @defgroup usb_drivers_file Generic USB Drivers @ingroup USB @brief Generic USB Drivers @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include #include "usb_private.h" /** * Main initialization entry point. * * Initialize the USB firmware library to implement the USB device described * by the descriptors provided. * * It is required that the 48MHz USB clock is already available. * * @param driver TODO * @param dev Pointer to USB device descriptor. This must not be changed while * the device is in use. * @param conf Pointer to array of USB configuration descriptors. These must * not be changed while the device is in use. The length of this * array is determined by the bNumConfigurations field in the * device descriptor. * @param strings TODO * @param control_buffer Pointer to array that would hold the data * received during control requests with DATA * stage * @param control_buffer_size Size of control_buffer * @return Zero on success (currently cannot fail). */ usbd_device *usbd_init(const usbd_driver *driver, const struct usb_device_descriptor *dev, const struct usb_config_descriptor *conf, const char **strings, int num_strings, uint8_t *control_buffer, uint16_t control_buffer_size) { usbd_device *usbd_dev; usbd_dev = driver->init(); usbd_dev->driver = driver; usbd_dev->desc = dev; usbd_dev->config = conf; usbd_dev->strings = strings; usbd_dev->num_strings = num_strings; usbd_dev->ctrl_buf = control_buffer; usbd_dev->ctrl_buf_len = control_buffer_size; usbd_dev->user_callback_ctr[0][USB_TRANSACTION_SETUP] = _usbd_control_setup; usbd_dev->user_callback_ctr[0][USB_TRANSACTION_OUT] = _usbd_control_out; usbd_dev->user_callback_ctr[0][USB_TRANSACTION_IN] = _usbd_control_in; return usbd_dev; } void usbd_register_reset_callback(usbd_device *usbd_dev, void (*callback)(void)) { usbd_dev->user_callback_reset = callback; } void usbd_register_suspend_callback(usbd_device *usbd_dev, void (*callback)(void)) { usbd_dev->user_callback_suspend = callback; } void usbd_register_resume_callback(usbd_device *usbd_dev, void (*callback)(void)) { usbd_dev->user_callback_resume = callback; } void usbd_register_sof_callback(usbd_device *usbd_dev, void (*callback)(void)) { usbd_dev->user_callback_sof = callback; } void _usbd_reset(usbd_device *usbd_dev) { usbd_dev->current_address = 0; usbd_dev->current_config = 0; usbd_ep_setup(usbd_dev, 0, USB_ENDPOINT_ATTR_CONTROL, 64, NULL); usbd_dev->driver->set_address(usbd_dev, 0); if (usbd_dev->user_callback_reset) { usbd_dev->user_callback_reset(); } } /* Functions to wrap the low-level driver */ void usbd_poll(usbd_device *usbd_dev) { usbd_dev->driver->poll(usbd_dev); } void usbd_disconnect(usbd_device *usbd_dev, bool disconnected) { /* not all drivers support disconnection */ if (usbd_dev->driver->disconnect) { usbd_dev->driver->disconnect(usbd_dev, disconnected); } } void usbd_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback)(usbd_device *usbd_dev, uint8_t ep)) { usbd_dev->driver->ep_setup(usbd_dev, addr, type, max_size, callback); } uint16_t usbd_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len) { return usbd_dev->driver->ep_write_packet(usbd_dev, addr, buf, len); } uint16_t usbd_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len) { return usbd_dev->driver->ep_read_packet(usbd_dev, addr, buf, len); } void usbd_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall) { usbd_dev->driver->ep_stall_set(usbd_dev, addr, stall); } uint8_t usbd_ep_stall_get(usbd_device *usbd_dev, uint8_t addr) { return usbd_dev->driver->ep_stall_get(usbd_dev, addr); } void usbd_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak) { usbd_dev->driver->ep_nak_set(usbd_dev, addr, nak); } /**@}*/ ================================================ FILE: firmware/libopencm3/lib/usb/usb_control.c ================================================ /** @defgroup usb_control_file Generic USB Control Requests @ingroup USB @brief Generic USB Control Requests @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include #include "usb_private.h" /* * According to the USB 2.0 specification, section 8.5.3, when a control * transfer is stalled, the pipe becomes idle. We provide one utility to stall * a transaction to reduce boilerplate code. */ static void stall_transaction(usbd_device *usbd_dev) { usbd_ep_stall_set(usbd_dev, 0, 1); usbd_dev->control_state.state = IDLE; } /* Register application callback function for handling USB control requests. */ int usbd_register_control_callback(usbd_device *usbd_dev, uint8_t type, uint8_t type_mask, usbd_control_callback callback) { int i; for (i = 0; i < MAX_USER_CONTROL_CALLBACK; i++) { if (usbd_dev->user_control_callback[i].cb) { continue; } usbd_dev->user_control_callback[i].type = type; usbd_dev->user_control_callback[i].type_mask = type_mask; usbd_dev->user_control_callback[i].cb = callback; return 0; } return -1; } static void usb_control_send_chunk(usbd_device *usbd_dev) { if (usbd_dev->desc->bMaxPacketSize0 < usbd_dev->control_state.ctrl_len) { /* Data stage, normal transmission */ usbd_ep_write_packet(usbd_dev, 0, usbd_dev->control_state.ctrl_buf, usbd_dev->desc->bMaxPacketSize0); usbd_dev->control_state.state = DATA_IN; usbd_dev->control_state.ctrl_buf += usbd_dev->desc->bMaxPacketSize0; usbd_dev->control_state.ctrl_len -= usbd_dev->desc->bMaxPacketSize0; } else { /* Data stage, end of transmission */ usbd_ep_write_packet(usbd_dev, 0, usbd_dev->control_state.ctrl_buf, usbd_dev->control_state.ctrl_len); usbd_dev->control_state.state = LAST_DATA_IN; usbd_dev->control_state.ctrl_len = 0; usbd_dev->control_state.ctrl_buf = NULL; } } static int usb_control_recv_chunk(usbd_device *usbd_dev) { uint16_t packetsize = MIN(usbd_dev->desc->bMaxPacketSize0, usbd_dev->control_state.req.wLength - usbd_dev->control_state.ctrl_len); uint16_t size = usbd_ep_read_packet(usbd_dev, 0, usbd_dev->control_state.ctrl_buf + usbd_dev->control_state.ctrl_len, packetsize); if (size != packetsize) { stall_transaction(usbd_dev); return -1; } usbd_dev->control_state.ctrl_len += size; return packetsize; } static int usb_control_request_dispatch(usbd_device *usbd_dev, struct usb_setup_data *req) { int i, result = 0; struct user_control_callback *cb = usbd_dev->user_control_callback; /* Call user command hook function. */ for (i = 0; i < MAX_USER_CONTROL_CALLBACK; i++) { if (cb[i].cb == NULL) { break; } if ((req->bmRequestType & cb[i].type_mask) == cb[i].type) { result = cb[i].cb(usbd_dev, req, &(usbd_dev->control_state.ctrl_buf), &(usbd_dev->control_state.ctrl_len), &(usbd_dev->control_state.complete)); if (result == USBD_REQ_HANDLED || result == USBD_REQ_NOTSUPP) { return result; } } } /* Try standard request if not already handled. */ return _usbd_standard_request(usbd_dev, req, &(usbd_dev->control_state.ctrl_buf), &(usbd_dev->control_state.ctrl_len)); } /* Handle commands and read requests. */ static void usb_control_setup_read(usbd_device *usbd_dev, struct usb_setup_data *req) { usbd_dev->control_state.ctrl_buf = usbd_dev->ctrl_buf; usbd_dev->control_state.ctrl_len = req->wLength; if (usb_control_request_dispatch(usbd_dev, req)) { if (usbd_dev->control_state.ctrl_len) { /* Go to data out stage if handled. */ usb_control_send_chunk(usbd_dev); } else { /* Go to status stage if handled. */ usbd_ep_write_packet(usbd_dev, 0, NULL, 0); usbd_dev->control_state.state = STATUS_IN; } } else { /* Stall endpoint on failure. */ stall_transaction(usbd_dev); } } static void usb_control_setup_write(usbd_device *usbd_dev, struct usb_setup_data *req) { if (req->wLength > usbd_dev->ctrl_buf_len) { stall_transaction(usbd_dev); return; } /* Buffer into which to write received data. */ usbd_dev->control_state.ctrl_buf = usbd_dev->ctrl_buf; usbd_dev->control_state.ctrl_len = 0; /* Wait for DATA OUT stage. */ if (req->wLength > usbd_dev->desc->bMaxPacketSize0) { usbd_dev->control_state.state = DATA_OUT; } else { usbd_dev->control_state.state = LAST_DATA_OUT; } } /* Do not appear to belong to the API, so are omitted from docs */ /**@}*/ void _usbd_control_setup(usbd_device *usbd_dev, uint8_t ea) { struct usb_setup_data *req = &usbd_dev->control_state.req; (void)ea; usbd_dev->control_state.complete = NULL; if (usbd_ep_read_packet(usbd_dev, 0, req, 8) != 8) { stall_transaction(usbd_dev); return; } if (req->wLength == 0) { usb_control_setup_read(usbd_dev, req); } else if (req->bmRequestType & 0x80) { usb_control_setup_read(usbd_dev, req); } else { usb_control_setup_write(usbd_dev, req); } } void _usbd_control_out(usbd_device *usbd_dev, uint8_t ea) { (void)ea; switch (usbd_dev->control_state.state) { case DATA_OUT: if (usb_control_recv_chunk(usbd_dev) < 0) { break; } if ((usbd_dev->control_state.req.wLength - usbd_dev->control_state.ctrl_len) <= usbd_dev->desc->bMaxPacketSize0) { usbd_dev->control_state.state = LAST_DATA_OUT; } break; case LAST_DATA_OUT: if (usb_control_recv_chunk(usbd_dev) < 0) { break; } /* * We have now received the full data payload. * Invoke callback to process. */ if (usb_control_request_dispatch(usbd_dev, &(usbd_dev->control_state.req))) { /* Got to status stage on success. */ usbd_ep_write_packet(usbd_dev, 0, NULL, 0); usbd_dev->control_state.state = STATUS_IN; } else { stall_transaction(usbd_dev); } break; case STATUS_OUT: usbd_ep_read_packet(usbd_dev, 0, NULL, 0); usbd_dev->control_state.state = IDLE; if (usbd_dev->control_state.complete) { usbd_dev->control_state.complete(usbd_dev, &(usbd_dev->control_state.req)); } usbd_dev->control_state.complete = NULL; break; default: stall_transaction(usbd_dev); } } void _usbd_control_in(usbd_device *usbd_dev, uint8_t ea) { (void)ea; struct usb_setup_data *req = &(usbd_dev->control_state.req); switch (usbd_dev->control_state.state) { case DATA_IN: usb_control_send_chunk(usbd_dev); break; case LAST_DATA_IN: usbd_dev->control_state.state = STATUS_OUT; break; case STATUS_IN: if (usbd_dev->control_state.complete) { usbd_dev->control_state.complete(usbd_dev, &(usbd_dev->control_state.req)); } /* Exception: Handle SET ADDRESS function here... */ if ((req->bmRequestType == 0) && (req->bRequest == USB_REQ_SET_ADDRESS)) { usbd_dev->driver->set_address(usbd_dev, req->wValue); } usbd_dev->control_state.state = IDLE; break; default: stall_transaction(usbd_dev); } } ================================================ FILE: firmware/libopencm3/lib/usb/usb_f103.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include #include #include "usb_private.h" static usbd_device *stm32f103_usbd_init(void); static void stm32f103_set_address(usbd_device *usbd_dev, uint8_t addr); static void stm32f103_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback) (usbd_device *usbd_dev, uint8_t ep)); static void stm32f103_endpoints_reset(usbd_device *usbd_dev); static void stm32f103_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall); static uint8_t stm32f103_ep_stall_get(usbd_device *usbd_dev, uint8_t addr); static void stm32f103_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak); static uint16_t stm32f103_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len); static uint16_t stm32f103_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len); static void stm32f103_poll(usbd_device *usbd_dev); static uint8_t force_nak[8]; static struct _usbd_device usbd_dev; const struct _usbd_driver stm32f103_usb_driver = { .init = stm32f103_usbd_init, .set_address = stm32f103_set_address, .ep_setup = stm32f103_ep_setup, .ep_reset = stm32f103_endpoints_reset, .ep_stall_set = stm32f103_ep_stall_set, .ep_stall_get = stm32f103_ep_stall_get, .ep_nak_set = stm32f103_ep_nak_set, .ep_write_packet = stm32f103_ep_write_packet, .ep_read_packet = stm32f103_ep_read_packet, .poll = stm32f103_poll, }; /** Initialize the USB device controller hardware of the STM32. */ static usbd_device *stm32f103_usbd_init(void) { rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_USBEN); SET_REG(USB_CNTR_REG, 0); SET_REG(USB_BTABLE_REG, 0); SET_REG(USB_ISTR_REG, 0); /* Enable RESET, SUSPEND, RESUME and CTR interrupts. */ SET_REG(USB_CNTR_REG, USB_CNTR_RESETM | USB_CNTR_CTRM | USB_CNTR_SUSPM | USB_CNTR_WKUPM); return &usbd_dev; } static void stm32f103_set_address(usbd_device *dev, uint8_t addr) { (void)dev; /* Set device address and enable. */ SET_REG(USB_DADDR_REG, (addr & USB_DADDR_ADDR) | USB_DADDR_ENABLE); } /** * Set the receive buffer size for a given USB endpoint. * * @param ep Index of endpoint to configure. * @param size Size in bytes of the RX buffer. */ static void usb_set_ep_rx_bufsize(usbd_device *dev, uint8_t ep, uint32_t size) { (void)dev; if (size > 62) { if (size & 0x1f) { size -= 32; } USB_SET_EP_RX_COUNT(ep, (size << 5) | 0x8000); } else { if (size & 1) { size++; } USB_SET_EP_RX_COUNT(ep, size << 10); } } static void stm32f103_ep_setup(usbd_device *dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback) (usbd_device *usbd_dev, uint8_t ep)) { /* Translate USB standard type codes to STM32. */ const uint16_t typelookup[] = { [USB_ENDPOINT_ATTR_CONTROL] = USB_EP_TYPE_CONTROL, [USB_ENDPOINT_ATTR_ISOCHRONOUS] = USB_EP_TYPE_ISO, [USB_ENDPOINT_ATTR_BULK] = USB_EP_TYPE_BULK, [USB_ENDPOINT_ATTR_INTERRUPT] = USB_EP_TYPE_INTERRUPT, }; uint8_t dir = addr & 0x80; addr &= 0x7f; /* Assign address. */ USB_SET_EP_ADDR(addr, addr); USB_SET_EP_TYPE(addr, typelookup[type]); if (dir || (addr == 0)) { USB_SET_EP_TX_ADDR(addr, dev->pm_top); if (callback) { dev->user_callback_ctr[addr][USB_TRANSACTION_IN] = (void *)callback; } USB_CLR_EP_TX_DTOG(addr); USB_SET_EP_TX_STAT(addr, USB_EP_TX_STAT_NAK); dev->pm_top += max_size; } if (!dir) { USB_SET_EP_RX_ADDR(addr, dev->pm_top); usb_set_ep_rx_bufsize(dev, addr, max_size); if (callback) { dev->user_callback_ctr[addr][USB_TRANSACTION_OUT] = (void *)callback; } USB_CLR_EP_RX_DTOG(addr); USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_VALID); dev->pm_top += max_size; } } static void stm32f103_endpoints_reset(usbd_device *dev) { int i; /* Reset all endpoints. */ for (i = 1; i < 8; i++) { USB_SET_EP_TX_STAT(i, USB_EP_TX_STAT_DISABLED); USB_SET_EP_RX_STAT(i, USB_EP_RX_STAT_DISABLED); } dev->pm_top = 0x40 + (2 * dev->desc->bMaxPacketSize0); } static void stm32f103_ep_stall_set(usbd_device *dev, uint8_t addr, uint8_t stall) { (void)dev; if (addr == 0) { USB_SET_EP_TX_STAT(addr, stall ? USB_EP_TX_STAT_STALL : USB_EP_TX_STAT_NAK); } if (addr & 0x80) { addr &= 0x7F; USB_SET_EP_TX_STAT(addr, stall ? USB_EP_TX_STAT_STALL : USB_EP_TX_STAT_NAK); /* Reset to DATA0 if clearing stall condition. */ if (!stall) { USB_CLR_EP_TX_DTOG(addr); } } else { /* Reset to DATA0 if clearing stall condition. */ if (!stall) { USB_CLR_EP_RX_DTOG(addr); } USB_SET_EP_RX_STAT(addr, stall ? USB_EP_RX_STAT_STALL : USB_EP_RX_STAT_VALID); } } static uint8_t stm32f103_ep_stall_get(usbd_device *dev, uint8_t addr) { (void)dev; if (addr & 0x80) { if ((*USB_EP_REG(addr & 0x7F) & USB_EP_TX_STAT) == USB_EP_TX_STAT_STALL) { return 1; } } else { if ((*USB_EP_REG(addr) & USB_EP_RX_STAT) == USB_EP_RX_STAT_STALL) { return 1; } } return 0; } static void stm32f103_ep_nak_set(usbd_device *dev, uint8_t addr, uint8_t nak) { (void)dev; /* It does not make sence to force NAK on IN endpoints. */ if (addr & 0x80) { return; } force_nak[addr] = nak; if (nak) { USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_NAK); } else { USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_VALID); } } /** * Copy a data buffer to packet memory. * * @param vPM Destination pointer into packet memory. * @param buf Source pointer to data buffer. * @param len Number of bytes to copy. */ static void usb_copy_to_pm(volatile void *vPM, const void *buf, uint16_t len) { const uint16_t *lbuf = buf; volatile uint16_t *PM = vPM; for (len = (len + 1) >> 1; len; PM += 2, lbuf++, len--) { *PM = *lbuf; } } static uint16_t stm32f103_ep_write_packet(usbd_device *dev, uint8_t addr, const void *buf, uint16_t len) { (void)dev; addr &= 0x7F; if ((*USB_EP_REG(addr) & USB_EP_TX_STAT) == USB_EP_TX_STAT_VALID) { return 0; } usb_copy_to_pm(USB_GET_EP_TX_BUFF(addr), buf, len); USB_SET_EP_TX_COUNT(addr, len); USB_SET_EP_TX_STAT(addr, USB_EP_TX_STAT_VALID); return len; } /** * Copy a data buffer from packet memory. * * @param buf Source pointer to data buffer. * @param vPM Destination pointer into packet memory. * @param len Number of bytes to copy. */ static void usb_copy_from_pm(void *buf, const volatile void *vPM, uint16_t len) { uint16_t *lbuf = buf; const volatile uint16_t *PM = vPM; uint8_t odd = len & 1; for (len >>= 1; len; PM += 2, lbuf++, len--) { *lbuf = *PM; } if (odd) { *(uint8_t *) lbuf = *(uint8_t *) PM; } } static uint16_t stm32f103_ep_read_packet(usbd_device *dev, uint8_t addr, void *buf, uint16_t len) { (void)dev; if ((*USB_EP_REG(addr) & USB_EP_RX_STAT) == USB_EP_RX_STAT_VALID) { return 0; } len = MIN(USB_GET_EP_RX_COUNT(addr) & 0x3ff, len); usb_copy_from_pm(buf, USB_GET_EP_RX_BUFF(addr), len); USB_CLR_EP_RX_CTR(addr); if (!force_nak[addr]) { USB_SET_EP_RX_STAT(addr, USB_EP_RX_STAT_VALID); } return len; } static void stm32f103_poll(usbd_device *dev) { uint16_t istr = *USB_ISTR_REG; if (istr & USB_ISTR_RESET) { dev->pm_top = 0x40; _usbd_reset(dev); USB_CLR_ISTR_RESET(); return; } if (istr & USB_ISTR_CTR) { uint8_t ep = istr & USB_ISTR_EP_ID; uint8_t type = (istr & USB_ISTR_DIR) ? 1 : 0; if (type) { /* OUT or SETUP transaction */ type += (*USB_EP_REG(ep) & USB_EP_SETUP) ? 1 : 0; } else { /* IN transaction */ USB_CLR_EP_TX_CTR(ep); } if (dev->user_callback_ctr[ep][type]) { dev->user_callback_ctr[ep][type] (dev, ep); } else { USB_CLR_EP_RX_CTR(ep); } } if (istr & USB_ISTR_SUSP) { USB_CLR_ISTR_SUSP(); if (dev->user_callback_suspend) { dev->user_callback_suspend(); } } if (istr & USB_ISTR_WKUP) { USB_CLR_ISTR_WKUP(); if (dev->user_callback_resume) { dev->user_callback_resume(); } } if (istr & USB_ISTR_SOF) { if (dev->user_callback_sof) { dev->user_callback_sof(); } USB_CLR_ISTR_SOF(); } } ================================================ FILE: firmware/libopencm3/lib/usb/usb_f107.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include #include #include "usb_private.h" #include "usb_fx07_common.h" /* Receive FIFO size in 32-bit words. */ #define RX_FIFO_SIZE 128 static usbd_device *stm32f107_usbd_init(void); static struct _usbd_device usbd_dev; const struct _usbd_driver stm32f107_usb_driver = { .init = stm32f107_usbd_init, .set_address = stm32fx07_set_address, .ep_setup = stm32fx07_ep_setup, .ep_reset = stm32fx07_endpoints_reset, .ep_stall_set = stm32fx07_ep_stall_set, .ep_stall_get = stm32fx07_ep_stall_get, .ep_nak_set = stm32fx07_ep_nak_set, .ep_write_packet = stm32fx07_ep_write_packet, .ep_read_packet = stm32fx07_ep_read_packet, .poll = stm32fx07_poll, .disconnect = stm32fx07_disconnect, .base_address = USB_OTG_FS_BASE, .set_address_before_status = 1, .rx_fifo_size = RX_FIFO_SIZE, }; /** Initialize the USB device controller hardware of the STM32. */ static usbd_device *stm32f107_usbd_init(void) { OTG_FS_GINTSTS = OTG_FS_GINTSTS_MMIS; OTG_FS_GUSBCFG |= OTG_FS_GUSBCFG_PHYSEL; /* Enable VBUS sensing in device mode and power down the PHY. */ OTG_FS_GCCFG |= OTG_FS_GCCFG_VBUSBSEN | OTG_FS_GCCFG_PWRDWN; /* Wait for AHB idle. */ while (!(OTG_FS_GRSTCTL & OTG_FS_GRSTCTL_AHBIDL)); /* Do core soft reset. */ OTG_FS_GRSTCTL |= OTG_FS_GRSTCTL_CSRST; while (OTG_FS_GRSTCTL & OTG_FS_GRSTCTL_CSRST); /* Force peripheral only mode. */ OTG_FS_GUSBCFG |= OTG_FS_GUSBCFG_FDMOD | OTG_FS_GUSBCFG_TRDT_MASK; /* Full speed device. */ OTG_FS_DCFG |= OTG_FS_DCFG_DSPD; /* Restart the PHY clock. */ OTG_FS_PCGCCTL = 0; OTG_FS_GRXFSIZ = stm32f107_usb_driver.rx_fifo_size; usbd_dev.fifo_mem_top = stm32f107_usb_driver.rx_fifo_size; /* Unmask interrupts for TX and RX. */ OTG_FS_GAHBCFG |= OTG_FS_GAHBCFG_GINT; OTG_FS_GINTMSK = OTG_FS_GINTMSK_ENUMDNEM | OTG_FS_GINTMSK_RXFLVLM | OTG_FS_GINTMSK_IEPINT | OTG_FS_GINTMSK_USBSUSPM | OTG_FS_GINTMSK_WUIM | OTG_FS_GINTMSK_SOFM; OTG_FS_DAINTMSK = 0xF; OTG_FS_DIEPMSK = OTG_FS_DIEPMSK_XFRCM; return &usbd_dev; } ================================================ FILE: firmware/libopencm3/lib/usb/usb_f207.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include #include #include "usb_private.h" #include "usb_fx07_common.h" /* Receive FIFO size in 32-bit words. */ #define RX_FIFO_SIZE 512 static usbd_device *stm32f207_usbd_init(void); static struct _usbd_device usbd_dev; const struct _usbd_driver stm32f207_usb_driver = { .init = stm32f207_usbd_init, .set_address = stm32fx07_set_address, .ep_setup = stm32fx07_ep_setup, .ep_reset = stm32fx07_endpoints_reset, .ep_stall_set = stm32fx07_ep_stall_set, .ep_stall_get = stm32fx07_ep_stall_get, .ep_nak_set = stm32fx07_ep_nak_set, .ep_write_packet = stm32fx07_ep_write_packet, .ep_read_packet = stm32fx07_ep_read_packet, .poll = stm32fx07_poll, .disconnect = stm32fx07_disconnect, .base_address = USB_OTG_HS_BASE, .set_address_before_status = 1, .rx_fifo_size = RX_FIFO_SIZE, }; /** Initialize the USB device controller hardware of the STM32. */ static usbd_device *stm32f207_usbd_init(void) { OTG_HS_GINTSTS = OTG_HS_GINTSTS_MMIS; OTG_HS_GUSBCFG |= OTG_HS_GUSBCFG_PHYSEL; /* Enable VBUS sensing in device mode and power down the PHY. */ OTG_HS_GCCFG |= OTG_HS_GCCFG_VBUSBSEN | OTG_HS_GCCFG_PWRDWN; /* Wait for AHB idle. */ while (!(OTG_HS_GRSTCTL & OTG_HS_GRSTCTL_AHBIDL)); /* Do core soft reset. */ OTG_HS_GRSTCTL |= OTG_HS_GRSTCTL_CSRST; while (OTG_HS_GRSTCTL & OTG_HS_GRSTCTL_CSRST); /* Force peripheral only mode. */ OTG_HS_GUSBCFG |= OTG_HS_GUSBCFG_FDMOD | OTG_HS_GUSBCFG_TRDT_MASK; /* Full speed device. */ OTG_HS_DCFG |= OTG_HS_DCFG_DSPD; /* Restart the PHY clock. */ OTG_HS_PCGCCTL = 0; OTG_HS_GRXFSIZ = stm32f207_usb_driver.rx_fifo_size; usbd_dev.fifo_mem_top = stm32f207_usb_driver.rx_fifo_size; /* Unmask interrupts for TX and RX. */ OTG_HS_GAHBCFG |= OTG_HS_GAHBCFG_GINT; OTG_HS_GINTMSK = OTG_HS_GINTMSK_ENUMDNEM | OTG_HS_GINTMSK_RXFLVLM | OTG_HS_GINTMSK_IEPINT | OTG_HS_GINTMSK_USBSUSPM | OTG_HS_GINTMSK_WUIM | OTG_HS_GINTMSK_SOFM; OTG_HS_DAINTMSK = 0xF; OTG_HS_DIEPMSK = OTG_HS_DIEPMSK_XFRCM; return &usbd_dev; } ================================================ FILE: firmware/libopencm3/lib/usb/usb_fx07_common.c ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #include #include #include #include #include #include #include "usb_private.h" #include "usb_fx07_common.h" /* The FS core and the HS core have the same register layout. * As the code can be used on both cores, the registers offset is modified * according to the selected cores base address. */ #define dev_base_address (usbd_dev->driver->base_address) #define REBASE(x) MMIO32((x) + (dev_base_address)) #define REBASE_FIFO(x) (&MMIO32((dev_base_address) + (OTG_FIFO(x)))) void stm32fx07_set_address(usbd_device *usbd_dev, uint8_t addr) { REBASE(OTG_DCFG) = (REBASE(OTG_DCFG) & ~OTG_FS_DCFG_DAD) | (addr << 4); } void stm32fx07_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback) (usbd_device *usbd_dev, uint8_t ep)) { /* * Configure endpoint address and type. Allocate FIFO memory for * endpoint. Install callback funciton. */ uint8_t dir = addr & 0x80; addr &= 0x7f; if (addr == 0) { /* For the default control endpoint */ /* Configure IN part. */ if (max_size >= 64) { REBASE(OTG_DIEPCTL0) = OTG_FS_DIEPCTL0_MPSIZ_64; } else if (max_size >= 32) { REBASE(OTG_DIEPCTL0) = OTG_FS_DIEPCTL0_MPSIZ_32; } else if (max_size >= 16) { REBASE(OTG_DIEPCTL0) = OTG_FS_DIEPCTL0_MPSIZ_16; } else { REBASE(OTG_DIEPCTL0) = OTG_FS_DIEPCTL0_MPSIZ_8; } REBASE(OTG_DIEPTSIZ0) = (max_size & OTG_FS_DIEPSIZ0_XFRSIZ_MASK); REBASE(OTG_DIEPCTL0) |= OTG_FS_DIEPCTL0_EPENA | OTG_FS_DIEPCTL0_SNAK; /* Configure OUT part. */ usbd_dev->doeptsiz[0] = OTG_FS_DIEPSIZ0_STUPCNT_1 | OTG_FS_DIEPSIZ0_PKTCNT | (max_size & OTG_FS_DIEPSIZ0_XFRSIZ_MASK); REBASE(OTG_DOEPTSIZ(0)) = usbd_dev->doeptsiz[0]; REBASE(OTG_DOEPCTL(0)) |= OTG_FS_DOEPCTL0_EPENA | OTG_FS_DIEPCTL0_SNAK; REBASE(OTG_GNPTXFSIZ) = ((max_size / 4) << 16) | usbd_dev->driver->rx_fifo_size; usbd_dev->fifo_mem_top += max_size / 4; usbd_dev->fifo_mem_top_ep0 = usbd_dev->fifo_mem_top; return; } if (dir) { REBASE(OTG_DIEPTXF(addr)) = ((max_size / 4) << 16) | usbd_dev->fifo_mem_top; usbd_dev->fifo_mem_top += max_size / 4; REBASE(OTG_DIEPTSIZ(addr)) = (max_size & OTG_FS_DIEPSIZ0_XFRSIZ_MASK); REBASE(OTG_DIEPCTL(addr)) |= OTG_FS_DIEPCTL0_EPENA | OTG_FS_DIEPCTL0_SNAK | (type << 18) | OTG_FS_DIEPCTL0_USBAEP | OTG_FS_DIEPCTLX_SD0PID | (addr << 22) | max_size; if (callback) { usbd_dev->user_callback_ctr[addr][USB_TRANSACTION_IN] = (void *)callback; } } if (!dir) { usbd_dev->doeptsiz[addr] = OTG_FS_DIEPSIZ0_PKTCNT | (max_size & OTG_FS_DIEPSIZ0_XFRSIZ_MASK); REBASE(OTG_DOEPTSIZ(addr)) = usbd_dev->doeptsiz[addr]; REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTL0_EPENA | OTG_FS_DOEPCTL0_USBAEP | OTG_FS_DIEPCTL0_CNAK | OTG_FS_DOEPCTLX_SD0PID | (type << 18) | max_size; if (callback) { usbd_dev->user_callback_ctr[addr][USB_TRANSACTION_OUT] = (void *)callback; } } } void stm32fx07_endpoints_reset(usbd_device *usbd_dev) { /* The core resets the endpoints automatically on reset. */ usbd_dev->fifo_mem_top = usbd_dev->fifo_mem_top_ep0; } void stm32fx07_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall) { if (addr == 0) { if (stall) { REBASE(OTG_DIEPCTL(addr)) |= OTG_FS_DIEPCTL0_STALL; } else { REBASE(OTG_DIEPCTL(addr)) &= ~OTG_FS_DIEPCTL0_STALL; } } if (addr & 0x80) { addr &= 0x7F; if (stall) { REBASE(OTG_DIEPCTL(addr)) |= OTG_FS_DIEPCTL0_STALL; } else { REBASE(OTG_DIEPCTL(addr)) &= ~OTG_FS_DIEPCTL0_STALL; REBASE(OTG_DIEPCTL(addr)) |= OTG_FS_DIEPCTLX_SD0PID; } } else { if (stall) { REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTL0_STALL; } else { REBASE(OTG_DOEPCTL(addr)) &= ~OTG_FS_DOEPCTL0_STALL; REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTLX_SD0PID; } } } uint8_t stm32fx07_ep_stall_get(usbd_device *usbd_dev, uint8_t addr) { /* Return non-zero if STALL set. */ if (addr & 0x80) { return (REBASE(OTG_DIEPCTL(addr & 0x7f)) & OTG_FS_DIEPCTL0_STALL) ? 1 : 0; } else { return (REBASE(OTG_DOEPCTL(addr)) & OTG_FS_DOEPCTL0_STALL) ? 1 : 0; } } void stm32fx07_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak) { /* It does not make sence to force NAK on IN endpoints. */ if (addr & 0x80) { return; } usbd_dev->force_nak[addr] = nak; if (nak) { REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTL0_SNAK; } else { REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTL0_CNAK; } } uint16_t stm32fx07_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len) { const uint32_t *buf32 = buf; int i; addr &= 0x7F; /* Return if endpoint is already enabled. */ if (REBASE(OTG_DIEPTSIZ(addr)) & OTG_FS_DIEPSIZ0_PKTCNT) { return 0; } /* Enable endpoint for transmission. */ REBASE(OTG_DIEPTSIZ(addr)) = OTG_FS_DIEPSIZ0_PKTCNT | len; REBASE(OTG_DIEPCTL(addr)) |= OTG_FS_DIEPCTL0_EPENA | OTG_FS_DIEPCTL0_CNAK; volatile uint32_t *fifo = REBASE_FIFO(addr); /* Copy buffer to endpoint FIFO, note - memcpy does not work */ for (i = len; i > 0; i -= 4) { *fifo++ = *buf32++; } return len; } uint16_t stm32fx07_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len) { int i; uint32_t *buf32 = buf; uint32_t extra; len = MIN(len, usbd_dev->rxbcnt); usbd_dev->rxbcnt -= len; volatile uint32_t *fifo = REBASE_FIFO(addr); for (i = len; i >= 4; i -= 4) { *buf32++ = *fifo++; } if (i) { extra = *fifo++; memcpy(buf32, &extra, i); } REBASE(OTG_DOEPTSIZ(addr)) = usbd_dev->doeptsiz[addr]; REBASE(OTG_DOEPCTL(addr)) |= OTG_FS_DOEPCTL0_EPENA | (usbd_dev->force_nak[addr] ? OTG_FS_DOEPCTL0_SNAK : OTG_FS_DOEPCTL0_CNAK); return len; } void stm32fx07_poll(usbd_device *usbd_dev) { /* Read interrupt status register. */ uint32_t intsts = REBASE(OTG_GINTSTS); int i; if (intsts & OTG_FS_GINTSTS_ENUMDNE) { /* Handle USB RESET condition. */ REBASE(OTG_GINTSTS) = OTG_FS_GINTSTS_ENUMDNE; usbd_dev->fifo_mem_top = usbd_dev->driver->rx_fifo_size; _usbd_reset(usbd_dev); return; } /* Note: RX and TX handled differently in this device. */ if (intsts & OTG_FS_GINTSTS_RXFLVL) { /* Receive FIFO non-empty. */ uint32_t rxstsp = REBASE(OTG_GRXSTSP); uint32_t pktsts = rxstsp & OTG_FS_GRXSTSP_PKTSTS_MASK; if ((pktsts != OTG_FS_GRXSTSP_PKTSTS_OUT) && (pktsts != OTG_FS_GRXSTSP_PKTSTS_SETUP)) { return; } uint8_t ep = rxstsp & OTG_FS_GRXSTSP_EPNUM_MASK; uint8_t type; if (pktsts == OTG_FS_GRXSTSP_PKTSTS_SETUP) { type = USB_TRANSACTION_SETUP; } else { type = USB_TRANSACTION_OUT; } /* Save packet size for stm32f107_ep_read_packet(). */ usbd_dev->rxbcnt = (rxstsp & OTG_FS_GRXSTSP_BCNT_MASK) >> 4; /* * FIXME: Why is a delay needed here? * This appears to fix a problem where the first 4 bytes * of the DATA OUT stage of a control transaction are lost. */ for (i = 0; i < 1000; i++) { __asm__("nop"); } if (usbd_dev->user_callback_ctr[ep][type]) { usbd_dev->user_callback_ctr[ep][type] (usbd_dev, ep); } /* Discard unread packet data. */ for (i = 0; i < usbd_dev->rxbcnt; i += 4) { (void)*REBASE_FIFO(ep); } usbd_dev->rxbcnt = 0; } /* * There is no global interrupt flag for transmit complete. * The XFRC bit must be checked in each OTG_FS_DIEPINT(x). */ for (i = 0; i < 4; i++) { /* Iterate over endpoints. */ if (REBASE(OTG_DIEPINT(i)) & OTG_FS_DIEPINTX_XFRC) { /* Transfer complete. */ if (usbd_dev->user_callback_ctr[i] [USB_TRANSACTION_IN]) { usbd_dev->user_callback_ctr[i] [USB_TRANSACTION_IN](usbd_dev, i); } REBASE(OTG_DIEPINT(i)) = OTG_FS_DIEPINTX_XFRC; } } if (intsts & OTG_FS_GINTSTS_USBSUSP) { if (usbd_dev->user_callback_suspend) { usbd_dev->user_callback_suspend(); } REBASE(OTG_GINTSTS) = OTG_FS_GINTSTS_USBSUSP; } if (intsts & OTG_FS_GINTSTS_WKUPINT) { if (usbd_dev->user_callback_resume) { usbd_dev->user_callback_resume(); } REBASE(OTG_GINTSTS) = OTG_FS_GINTSTS_WKUPINT; } if (intsts & OTG_FS_GINTSTS_SOF) { if (usbd_dev->user_callback_sof) { usbd_dev->user_callback_sof(); } REBASE(OTG_GINTSTS) = OTG_FS_GINTSTS_SOF; } } void stm32fx07_disconnect(usbd_device *usbd_dev, bool disconnected) { if (disconnected) { REBASE(OTG_DCTL) |= OTG_FS_DCTL_SDIS; } else { REBASE(OTG_DCTL) &= ~OTG_FS_DCTL_SDIS; } } ================================================ FILE: firmware/libopencm3/lib/usb/usb_fx07_common.h ================================================ /* * This file is part of the libopencm3 project. * * Copyright (C) 2011 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ #ifndef __USB_FX07_COMMON_H_ #define __USB_FX07_COMMON_H_ void stm32fx07_set_address(usbd_device *usbd_dev, uint8_t addr); void stm32fx07_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*callback)(usbd_device *usbd_dev, uint8_t ep)); void stm32fx07_endpoints_reset(usbd_device *usbd_dev); void stm32fx07_ep_stall_set(usbd_device *usbd_dev, uint8_t addr, uint8_t stall); uint8_t stm32fx07_ep_stall_get(usbd_device *usbd_dev, uint8_t addr); void stm32fx07_ep_nak_set(usbd_device *usbd_dev, uint8_t addr, uint8_t nak); uint16_t stm32fx07_ep_write_packet(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len); uint16_t stm32fx07_ep_read_packet(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len); void stm32fx07_poll(usbd_device *usbd_dev); void stm32fx07_disconnect(usbd_device *usbd_dev, bool disconnected); #endif /* __USB_FX07_COMMON_H_ */ ================================================ FILE: firmware/libopencm3/lib/usb/usb_private.h ================================================ /** @defgroup usb_private_defines USB Private Structures @brief Defined Constants and Types for the USB Private Structures @ingroup USB_defines @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #ifndef __USB_PRIVATE_H #define __USB_PRIVATE_H #define MAX_USER_CONTROL_CALLBACK 4 #define MIN(a, b) ((a) < (b) ? (a) : (b)) /** Internal collection of device information. */ struct _usbd_device { const struct usb_device_descriptor *desc; const struct usb_config_descriptor *config; const char **strings; int num_strings; uint8_t *ctrl_buf; /**< Internal buffer used for control transfers */ uint16_t ctrl_buf_len; uint8_t current_address; uint8_t current_config; uint16_t pm_top; /**< Top of allocated endpoint buffer memory */ /* User callback functions for various USB events */ void (*user_callback_reset)(void); void (*user_callback_suspend)(void); void (*user_callback_resume)(void); void (*user_callback_sof)(void); struct usb_control_state { enum { IDLE, STALLED, DATA_IN, LAST_DATA_IN, STATUS_IN, DATA_OUT, LAST_DATA_OUT, STATUS_OUT, } state; struct usb_setup_data req __attribute__((aligned(4))); uint8_t *ctrl_buf; uint16_t ctrl_len; void (*complete)(usbd_device *usbd_dev, struct usb_setup_data *req); } control_state; struct user_control_callback { usbd_control_callback cb; uint8_t type; uint8_t type_mask; } user_control_callback[MAX_USER_CONTROL_CALLBACK]; void (*user_callback_ctr[8][3])(usbd_device *usbd_dev, uint8_t ea); /* User callback function for some standard USB function hooks */ void (*user_callback_set_config)(usbd_device *usbd_dev, uint16_t wValue); const struct _usbd_driver *driver; /* private driver data */ uint16_t fifo_mem_top; uint16_t fifo_mem_top_ep0; uint8_t force_nak[4]; /* * We keep a backup copy of the out endpoint size registers to restore * them after a transaction. */ uint32_t doeptsiz[4]; /* * Received packet size for each endpoint. This is assigned in * stm32f107_poll() which reads the packet status push register GRXSTSP * for use in stm32f107_ep_read_packet(). */ uint16_t rxbcnt; }; enum _usbd_transaction { USB_TRANSACTION_IN, USB_TRANSACTION_OUT, USB_TRANSACTION_SETUP, }; /* Do not appear to belong to the API, so are omitted from docs */ /**@}*/ void _usbd_control_in(usbd_device *usbd_dev, uint8_t ea); void _usbd_control_out(usbd_device *usbd_dev, uint8_t ea); void _usbd_control_setup(usbd_device *usbd_dev, uint8_t ea); int _usbd_standard_request_device(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len); int _usbd_standard_request_interface(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len); int _usbd_standard_request_endpoint(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len); int _usbd_standard_request(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len); void _usbd_reset(usbd_device *usbd_dev); /* Functions provided by the hardware abstraction. */ struct _usbd_driver { usbd_device *(*init)(void); void (*set_address)(usbd_device *usbd_dev, uint8_t addr); void (*ep_setup)(usbd_device *usbd_dev, uint8_t addr, uint8_t type, uint16_t max_size, void (*cb)(usbd_device *usbd_dev, uint8_t ep)); void (*ep_reset)(usbd_device *usbd_dev); void (*ep_stall_set)(usbd_device *usbd_dev, uint8_t addr, uint8_t stall); void (*ep_nak_set)(usbd_device *usbd_dev, uint8_t addr, uint8_t nak); uint8_t (*ep_stall_get)(usbd_device *usbd_dev, uint8_t addr); uint16_t (*ep_write_packet)(usbd_device *usbd_dev, uint8_t addr, const void *buf, uint16_t len); uint16_t (*ep_read_packet)(usbd_device *usbd_dev, uint8_t addr, void *buf, uint16_t len); void (*poll)(usbd_device *usbd_dev); void (*disconnect)(usbd_device *usbd_dev, bool disconnected); uint32_t base_address; bool set_address_before_status; uint16_t rx_fifo_size; }; #endif ================================================ FILE: firmware/libopencm3/lib/usb/usb_standard.c ================================================ /** @defgroup usb_standard_file Generic USB Standard Request Interface @ingroup USB @brief Generic USB Standard Request Interface @version 1.0.0 @author @htmlonly © @endhtmlonly 2010 Gareth McMullin @date 10 March 2013 LGPL License Terms @ref lgpl_license */ /* * This file is part of the libopencm3 project. * * Copyright (C) 2010 Gareth McMullin * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . */ /**@{*/ #include #include #include "usb_private.h" void usbd_register_set_config_callback(usbd_device *usbd_dev, void (*callback)(usbd_device *usbd_dev, uint16_t wValue)) { usbd_dev->user_callback_set_config = callback; } static uint16_t build_config_descriptor(usbd_device *usbd_dev, uint8_t index, uint8_t *buf, uint16_t len) { uint8_t *tmpbuf = buf; const struct usb_config_descriptor *cfg = &usbd_dev->config[index]; uint16_t count, total = 0, totallen = 0; uint16_t i, j, k; memcpy(buf, cfg, count = MIN(len, cfg->bLength)); buf += count; len -= count; total += count; totallen += cfg->bLength; /* For each interface... */ for (i = 0; i < cfg->bNumInterfaces; i++) { /* Interface Association Descriptor, if any */ if (cfg->interface[i].iface_assoc) { const struct usb_iface_assoc_descriptor *assoc = cfg->interface[i].iface_assoc; memcpy(buf, assoc, count = MIN(len, assoc->bLength)); buf += count; len -= count; total += count; totallen += assoc->bLength; } /* For each alternate setting... */ for (j = 0; j < cfg->interface[i].num_altsetting; j++) { const struct usb_interface_descriptor *iface = &cfg->interface[i].altsetting[j]; /* Copy interface descriptor. */ memcpy(buf, iface, count = MIN(len, iface->bLength)); buf += count; len -= count; total += count; totallen += iface->bLength; /* Copy extra bytes (function descriptors). */ memcpy(buf, iface->extra, count = MIN(len, iface->extralen)); buf += count; len -= count; total += count; totallen += iface->extralen; /* For each endpoint... */ for (k = 0; k < iface->bNumEndpoints; k++) { const struct usb_endpoint_descriptor *ep = &iface->endpoint[k]; memcpy(buf, ep, count = MIN(len, ep->bLength)); buf += count; len -= count; total += count; totallen += ep->bLength; } } } /* Fill in wTotalLength. */ *(uint16_t *)(tmpbuf + 2) = totallen; return total; } static int usb_descriptor_type(uint16_t wValue) { return wValue >> 8; } static int usb_descriptor_index(uint16_t wValue) { return wValue & 0xFF; } static int usb_standard_get_descriptor(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { int i, array_idx, descr_idx; struct usb_string_descriptor *sd; descr_idx = usb_descriptor_index(req->wValue); switch (usb_descriptor_type(req->wValue)) { case USB_DT_DEVICE: *buf = (uint8_t *) usbd_dev->desc; *len = MIN(*len, usbd_dev->desc->bLength); return USBD_REQ_HANDLED; case USB_DT_CONFIGURATION: *buf = usbd_dev->ctrl_buf; *len = build_config_descriptor(usbd_dev, descr_idx, *buf, *len); return USBD_REQ_HANDLED; case USB_DT_STRING: sd = (struct usb_string_descriptor *)usbd_dev->ctrl_buf; if (descr_idx == 0) { /* Send sane Language ID descriptor... */ sd->wData[0] = USB_LANGID_ENGLISH_US; sd->bLength = sizeof(sd->bLength) + sizeof(sd->bDescriptorType) + sizeof(sd->wData[0]); *len = MIN(*len, sd->bLength); } else { array_idx = descr_idx - 1; if (!usbd_dev->strings) { /* Device doesn't support strings. */ return USBD_REQ_NOTSUPP; } /* Check that string index is in range. */ if (array_idx >= usbd_dev->num_strings) { return USBD_REQ_NOTSUPP; } /* Strings with Language ID differnet from * USB_LANGID_ENGLISH_US are not supported */ if (req->wIndex != USB_LANGID_ENGLISH_US) { return USBD_REQ_NOTSUPP; } /* Ths string is returned as UTF16, hence the * multiplication */ sd->bLength = strlen(usbd_dev->strings[array_idx]) * 2 + sizeof(sd->bLength) + sizeof(sd->bDescriptorType); *len = MIN(*len, sd->bLength); for (i = 0; i < (*len / 2) - 1; i++) { sd->wData[i] = usbd_dev->strings[array_idx][i]; } } sd->bDescriptorType = USB_DT_STRING; *buf = (uint8_t *)sd; return USBD_REQ_HANDLED; } return USBD_REQ_NOTSUPP; } static int usb_standard_set_address(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)req; (void)buf; (void)len; /* The actual address is only latched at the STATUS IN stage. */ if ((req->bmRequestType != 0) || (req->wValue >= 128)) { return 0; } usbd_dev->current_address = req->wValue; /* * Special workaround for STM32F10[57] that require the address * to be set here. This is undocumented! */ if (usbd_dev->driver->set_address_before_status) { usbd_dev->driver->set_address(usbd_dev, req->wValue); } return 1; } static int usb_standard_set_configuration(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { int i; (void)req; (void)buf; (void)len; /* Is this correct, or should we reset alternate settings. */ if (req->wValue == usbd_dev->current_config) { return 1; } usbd_dev->current_config = req->wValue; /* Reset all endpoints. */ usbd_dev->driver->ep_reset(usbd_dev); if (usbd_dev->user_callback_set_config) { /* * Flush control callbacks. These will be reregistered * by the user handler. */ for (i = 0; i < MAX_USER_CONTROL_CALLBACK; i++) { usbd_dev->user_control_callback[i].cb = NULL; } usbd_dev->user_callback_set_config(usbd_dev, req->wValue); } return 1; } static int usb_standard_get_configuration(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)req; if (*len > 1) { *len = 1; } (*buf)[0] = usbd_dev->current_config; return 1; } static int usb_standard_set_interface(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)usbd_dev; (void)req; (void)buf; /* FIXME: Adapt if we have more than one interface. */ if (req->wValue != 0) { return 0; } *len = 0; return 1; } static int usb_standard_get_interface(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)usbd_dev; (void)req; (void)buf; /* FIXME: Adapt if we have more than one interface. */ *len = 1; (*buf)[0] = 0; return 1; } static int usb_standard_device_get_status(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)usbd_dev; (void)req; /* bit 0: self powered */ /* bit 1: remote wakeup */ if (*len > 2) { *len = 2; } (*buf)[0] = 0; (*buf)[1] = 0; return 1; } static int usb_standard_interface_get_status(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)usbd_dev; (void)req; /* not defined */ if (*len > 2) { *len = 2; } (*buf)[0] = 0; (*buf)[1] = 0; return 1; } static int usb_standard_endpoint_get_status(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)req; if (*len > 2) { *len = 2; } (*buf)[0] = usbd_ep_stall_get(usbd_dev, req->wIndex) ? 1 : 0; (*buf)[1] = 0; return 1; } static int usb_standard_endpoint_stall(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)buf; (void)len; usbd_ep_stall_set(usbd_dev, req->wIndex, 1); return 1; } static int usb_standard_endpoint_unstall(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { (void)buf; (void)len; usbd_ep_stall_set(usbd_dev, req->wIndex, 0); return 1; } /* Do not appear to belong to the API, so are omitted from docs */ /**@}*/ int _usbd_standard_request_device(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { int (*command)(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) = NULL; switch (req->bRequest) { case USB_REQ_CLEAR_FEATURE: case USB_REQ_SET_FEATURE: if (req->wValue == USB_FEAT_DEVICE_REMOTE_WAKEUP) { /* Device wakeup code goes here. */ } if (req->wValue == USB_FEAT_TEST_MODE) { /* Test mode code goes here. */ } break; case USB_REQ_SET_ADDRESS: /* * SET ADDRESS is an exception. * It is only processed at STATUS stage. */ command = usb_standard_set_address; break; case USB_REQ_SET_CONFIGURATION: command = usb_standard_set_configuration; break; case USB_REQ_GET_CONFIGURATION: command = usb_standard_get_configuration; break; case USB_REQ_GET_DESCRIPTOR: command = usb_standard_get_descriptor; break; case USB_REQ_GET_STATUS: /* * GET_STATUS always responds with zero reply. * The application may override this behaviour. */ command = usb_standard_device_get_status; break; case USB_REQ_SET_DESCRIPTOR: /* SET_DESCRIPTOR is optional and not implemented. */ break; } if (!command) { return 0; } return command(usbd_dev, req, buf, len); } int _usbd_standard_request_interface(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { int (*command)(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) = NULL; switch (req->bRequest) { case USB_REQ_CLEAR_FEATURE: case USB_REQ_SET_FEATURE: /* not defined */ break; case USB_REQ_GET_INTERFACE: command = usb_standard_get_interface; break; case USB_REQ_SET_INTERFACE: command = usb_standard_set_interface; break; case USB_REQ_GET_STATUS: command = usb_standard_interface_get_status; break; } if (!command) { return 0; } return command(usbd_dev, req, buf, len); } int _usbd_standard_request_endpoint(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { int (*command) (usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) = NULL; switch (req->bRequest) { case USB_REQ_CLEAR_FEATURE: if (req->wValue == USB_FEAT_ENDPOINT_HALT) { command = usb_standard_endpoint_unstall; } break; case USB_REQ_SET_FEATURE: if (req->wValue == USB_FEAT_ENDPOINT_HALT) { command = usb_standard_endpoint_stall; } break; case USB_REQ_GET_STATUS: command = usb_standard_endpoint_get_status; break; case USB_REQ_SET_SYNCH_FRAME: /* FIXME: SYNCH_FRAME is not implemented. */ /* * SYNCH_FRAME is used for synchronization of isochronous * endpoints which are not yet implemented. */ break; } if (!command) { return 0; } return command(usbd_dev, req, buf, len); } int _usbd_standard_request(usbd_device *usbd_dev, struct usb_setup_data *req, uint8_t **buf, uint16_t *len) { /* FIXME: Have class/vendor requests as well. */ if ((req->bmRequestType & USB_REQ_TYPE_TYPE) != USB_REQ_TYPE_STANDARD) { return 0; } switch (req->bmRequestType & USB_REQ_TYPE_RECIPIENT) { case USB_REQ_TYPE_DEVICE: return _usbd_standard_request_device(usbd_dev, req, buf, len); case USB_REQ_TYPE_INTERFACE: return _usbd_standard_request_interface(usbd_dev, req, buf, len); case USB_REQ_TYPE_ENDPOINT: return _usbd_standard_request_endpoint(usbd_dev, req, buf, len); default: return 0; } } ================================================ FILE: firmware/libopencm3/locm3.sublime-project ================================================ { "folders": [ { "path": ".", "file_exclude_patterns": [ "*.o", "*.a", "*.d", "*.sublime-project", "*.sublime-workspace", "*.swp" ], "folder_exclude_patterns": [ ] } ], "settings": { "tab_size": 8, "translate_tabs_to_spaces": false, "rulers": [80] }, "build_systems": [ { "name": "libopencm3", "working_dir": "${project_path}", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "cmd": ["make"] } ] } ================================================ FILE: firmware/libopencm3/scripts/black_magic_probe_debug.scr ================================================ monitor version monitor swdp_scan attach 1 run ================================================ FILE: firmware/libopencm3/scripts/black_magic_probe_flash.scr ================================================ monitor version monitor swdp_scan attach 1 load ================================================ FILE: firmware/libopencm3/scripts/checkpatch.pl ================================================ #!/usr/bin/perl -w # (c) 2001, Dave Jones. (the file handling bit) # (c) 2005, Joel Schopp (the ugly bit) # (c) 2007,2008, Andy Whitcroft (new conditions, test suite) # (c) 2008-2010 Andy Whitcroft # Licensed under the terms of the GNU GPL License version 2 use strict; my $P = $0; $P =~ s@.*/@@g; my $V = '0.32'; use Getopt::Long qw(:config no_auto_abbrev); my $quiet = 0; my $tree = 1; my $chk_signoff = 1; my $chk_patch = 1; my $tst_only; my $emacs = 0; my $terse = 0; my $file = 0; my $check = 0; my $summary = 1; my $mailback = 0; my $summary_file = 0; my $show_types = 0; my $root; my %debug; my %ignore_type = (); my @ignore = (); my $help = 0; my $configuration_file = ".checkpatch.conf"; my $max_line_length = 80; sub help { my ($exitcode) = @_; print << "EOM"; Usage: $P [OPTION]... [FILE]... Version: $V Options: -q, --quiet quiet --no-tree run without a kernel tree --no-signoff do not check for 'Signed-off-by' line --patch treat FILE as patchfile (default) --emacs emacs compile window format --terse one line per report -f, --file treat FILE as regular source file --subjective, --strict enable more subjective tests --ignore TYPE(,TYPE2...) ignore various comma separated message types --max-line-length=n set the maximum line length, if exceeded, warn --show-types show the message "types" in the output --root=PATH PATH to the kernel tree root --no-summary suppress the per-file summary --mailback only produce a report in case of warnings/errors --summary-file include the filename in summary --debug KEY=[0|1] turn on/off debugging of KEY, where KEY is one of 'values', 'possible', 'type', and 'attr' (default is all off) --test-only=WORD report only warnings/errors containing WORD literally -h, --help, --version display this help and exit When FILE is - read standard input. EOM exit($exitcode); } my $conf = which_conf($configuration_file); if (-f $conf) { my @conf_args; open(my $conffile, '<', "$conf") or warn "$P: Can't find a readable $configuration_file file $!\n"; while (<$conffile>) { my $line = $_; $line =~ s/\s*\n?$//g; $line =~ s/^\s*//g; $line =~ s/\s+/ /g; next if ($line =~ m/^\s*#/); next if ($line =~ m/^\s*$/); my @words = split(" ", $line); foreach my $word (@words) { last if ($word =~ m/^#/); push (@conf_args, $word); } } close($conffile); unshift(@ARGV, @conf_args) if @conf_args; } GetOptions( 'q|quiet+' => \$quiet, 'tree!' => \$tree, 'signoff!' => \$chk_signoff, 'patch!' => \$chk_patch, 'emacs!' => \$emacs, 'terse!' => \$terse, 'f|file!' => \$file, 'subjective!' => \$check, 'strict!' => \$check, 'ignore=s' => \@ignore, 'show-types!' => \$show_types, 'max-line-length=i' => \$max_line_length, 'root=s' => \$root, 'summary!' => \$summary, 'mailback!' => \$mailback, 'summary-file!' => \$summary_file, 'debug=s' => \%debug, 'test-only=s' => \$tst_only, 'h|help' => \$help, 'version' => \$help ) or help(1); help(0) if ($help); my $exit = 0; if ($#ARGV < 0) { print "$P: no input files\n"; exit(1); } @ignore = split(/,/, join(',',@ignore)); foreach my $word (@ignore) { $word =~ s/\s*\n?$//g; $word =~ s/^\s*//g; $word =~ s/\s+/ /g; $word =~ tr/[a-z]/[A-Z]/; next if ($word =~ m/^\s*#/); next if ($word =~ m/^\s*$/); $ignore_type{$word}++; } my $dbg_values = 0; my $dbg_possible = 0; my $dbg_type = 0; my $dbg_attr = 0; for my $key (keys %debug) { ## no critic eval "\${dbg_$key} = '$debug{$key}';"; die "$@" if ($@); } my $rpt_cleaners = 0; if ($terse) { $emacs = 1; $quiet++; } if ($tree) { if (defined $root) { if (!top_of_kernel_tree($root)) { die "$P: $root: --root does not point at a valid tree\n"; } } else { if (top_of_kernel_tree('.')) { $root = '.'; } elsif ($0 =~ m@(.*)/scripts/[^/]*$@ && top_of_kernel_tree($1)) { $root = $1; } } if (!defined $root) { print "Must be run from the top-level dir. of a kernel tree\n"; exit(2); } } my $emitted_corrupt = 0; our $Ident = qr{ [A-Za-z_][A-Za-z\d_]* (?:\s*\#\#\s*[A-Za-z_][A-Za-z\d_]*)* }x; our $Storage = qr{extern|static|asmlinkage}; our $Sparse = qr{ __user| __kernel| __force| __iomem| __must_check| __init_refok| __kprobes| __ref| __rcu }x; # Notes to $Attribute: # We need \b after 'init' otherwise 'initconst' will cause a false positive in a check our $Attribute = qr{ const| __percpu| __nocast| __safe| __bitwise__| __packed__| __packed2__| __naked| __maybe_unused| __always_unused| __noreturn| __used| __cold| __noclone| __deprecated| __read_mostly| __kprobes| __(?:mem|cpu|dev|)(?:initdata|initconst|init\b)| ____cacheline_aligned| ____cacheline_aligned_in_smp| ____cacheline_internodealigned_in_smp| __weak }x; our $Modifier; our $Inline = qr{inline|__always_inline|noinline}; our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; our $Lval = qr{$Ident(?:$Member)*}; our $Float_hex = qr{(?i)0x[0-9a-f]+p-?[0-9]+[fl]?}; our $Float_dec = qr{(?i)(?:[0-9]+\.[0-9]*|[0-9]*\.[0-9]+)(?:e-?[0-9]+)?[fl]?}; our $Float_int = qr{(?i)[0-9]+e-?[0-9]+[fl]?}; our $Float = qr{$Float_hex|$Float_dec|$Float_int}; our $Constant = qr{$Float|(?i)(?:0x[0-9a-f]+|[0-9]+)[ul]*}; our $Assignment = qr{\*\=|/=|%=|\+=|-=|<<=|>>=|&=|\^=|\|=|=}; our $Compare = qr{<=|>=|==|!=|<|>}; our $Operators = qr{ <=|>=|==|!=| =>|->|<<|>>|<|>|!|~| &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|% }x; our $NonptrType; our $Type; our $Declare; our $NON_ASCII_UTF8 = qr{ [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte | \xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte | \xED[\x80-\x9F][\x80-\xBF] # excluding surrogates | \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3 | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15 | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16 }x; our $UTF8 = qr{ [\x09\x0A\x0D\x20-\x7E] # ASCII | $NON_ASCII_UTF8 }x; our $typeTypedefs = qr{(?x: (?:__)?(?:u|s|be|le)(?:8|16|32|64)| atomic_t )}; our $logFunctions = qr{(?x: printk(?:_ratelimited|_once|)| [a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| WARN(?:_RATELIMIT|_ONCE|)| panic| MODULE_[A-Z_]+ )}; our $signature_tags = qr{(?xi: Signed-off-by:| Acked-by:| Tested-by:| Reviewed-by:| Reported-by:| Suggested-by:| To:| Cc: )}; our @typeList = ( qr{void}, qr{(?:unsigned\s+)?char}, qr{(?:unsigned\s+)?short}, qr{(?:unsigned\s+)?int}, qr{(?:unsigned\s+)?long}, qr{(?:unsigned\s+)?long\s+int}, qr{(?:unsigned\s+)?long\s+long}, qr{(?:unsigned\s+)?long\s+long\s+int}, qr{unsigned}, qr{float}, qr{double}, qr{bool}, qr{struct\s+$Ident}, qr{union\s+$Ident}, qr{enum\s+$Ident}, qr{${Ident}_t}, qr{${Ident}_handler}, qr{${Ident}_handler_fn}, ); our @modifierList = ( qr{fastcall}, ); our $allowed_asm_includes = qr{(?x: irq| memory )}; # memory.h: ARM has a custom one sub build_types { my $mods = "(?x: \n" . join("|\n ", @modifierList) . "\n)"; my $all = "(?x: \n" . join("|\n ", @typeList) . "\n)"; $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; $NonptrType = qr{ (?:$Modifier\s+|const\s+)* (?: (?:typeof|__typeof__)\s*\([^\)]*\)| (?:$typeTypedefs\b)| (?:${all}\b) ) (?:\s+$Modifier|\s+const)* }x; $Type = qr{ $NonptrType (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)? (?:\s+$Inline|\s+$Modifier)* }x; $Declare = qr{(?:$Storage\s+)?$Type}; } build_types(); our $Typecast = qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*}; # Using $balanced_parens, $LvalOrFunc, or $FuncArg # requires at least perl version v5.10.0 # Any use must be runtime checked with $^V our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/; our $LvalOrFunc = qr{($Lval)\s*($balanced_parens{0,1})\s*}; our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant)}; sub deparenthesize { my ($string) = @_; return "" if (!defined($string)); $string =~ s@^\s*\(\s*@@g; $string =~ s@\s*\)\s*$@@g; $string =~ s@\s+@ @g; return $string; } $chk_signoff = 0 if ($file); my @rawlines = (); my @lines = (); my $vname; for my $filename (@ARGV) { my $FILE; if ($file) { open($FILE, '-|', "diff -u /dev/null $filename") || die "$P: $filename: diff failed - $!\n"; } elsif ($filename eq '-') { open($FILE, '<&STDIN'); } else { open($FILE, '<', "$filename") || die "$P: $filename: open failed - $!\n"; } if ($filename eq '-') { $vname = 'Your patch'; } else { $vname = $filename; } while (<$FILE>) { chomp; push(@rawlines, $_); } close($FILE); if (!process($filename)) { $exit = 1; } @rawlines = (); @lines = (); } exit($exit); sub top_of_kernel_tree { my ($root) = @_; my @tree_check = ( "COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile", "README", "Documentation", "arch", "include", "drivers", "fs", "init", "ipc", "kernel", "lib", "scripts", ); foreach my $check (@tree_check) { if (! -e $root . '/' . $check) { return 0; } } return 1; } sub parse_email { my ($formatted_email) = @_; my $name = ""; my $address = ""; my $comment = ""; if ($formatted_email =~ /^(.*)<(\S+\@\S+)>(.*)$/) { $name = $1; $address = $2; $comment = $3 if defined $3; } elsif ($formatted_email =~ /^\s*<(\S+\@\S+)>(.*)$/) { $address = $1; $comment = $2 if defined $2; } elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) { $address = $1; $comment = $2 if defined $2; $formatted_email =~ s/$address.*$//; $name = $formatted_email; $name =~ s/^\s+|\s+$//g; $name =~ s/^\"|\"$//g; # If there's a name left after stripping spaces and # leading quotes, and the address doesn't have both # leading and trailing angle brackets, the address # is invalid. ie: # "joe smith joe@smith.com" bad # "joe smith ]+>$/) { $name = ""; $address = ""; $comment = ""; } } $name =~ s/^\s+|\s+$//g; $name =~ s/^\"|\"$//g; $address =~ s/^\s+|\s+$//g; $address =~ s/^\<|\>$//g; if ($name =~ /[^\w \-]/i) { ##has "must quote" chars $name =~ s/(?"; } return $formatted_email; } sub which_conf { my ($conf) = @_; foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) { if (-e "$path/$conf") { return "$path/$conf"; } } return ""; } sub expand_tabs { my ($str) = @_; my $res = ''; my $n = 0; for my $c (split(//, $str)) { if ($c eq "\t") { $res .= ' '; $n++; for (; ($n % 8) != 0; $n++) { $res .= ' '; } next; } $res .= $c; $n++; } return $res; } sub copy_spacing { (my $res = shift) =~ tr/\t/ /c; return $res; } sub line_stats { my ($line) = @_; # Drop the diff line leader and expand tabs $line =~ s/^.//; $line = expand_tabs($line); # Pick the indent from the front of the line. my ($white) = ($line =~ /^(\s*)/); return (length($line), length($white)); } my $sanitise_quote = ''; sub sanitise_line_reset { my ($in_comment) = @_; if ($in_comment) { $sanitise_quote = '*/'; } else { $sanitise_quote = ''; } } sub sanitise_line { my ($line) = @_; my $res = ''; my $l = ''; my $qlen = 0; my $off = 0; my $c; # Always copy over the diff marker. $res = substr($line, 0, 1); for ($off = 1; $off < length($line); $off++) { $c = substr($line, $off, 1); # Comments we are wacking completly including the begin # and end, all to $;. if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') { $sanitise_quote = '*/'; substr($res, $off, 2, "$;$;"); $off++; next; } if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') { $sanitise_quote = ''; substr($res, $off, 2, "$;$;"); $off++; next; } if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') { $sanitise_quote = '//'; substr($res, $off, 2, $sanitise_quote); $off++; next; } # A \ in a string means ignore the next character. if (($sanitise_quote eq "'" || $sanitise_quote eq '"') && $c eq "\\") { substr($res, $off, 2, 'XX'); $off++; next; } # Regular quotes. if ($c eq "'" || $c eq '"') { if ($sanitise_quote eq '') { $sanitise_quote = $c; substr($res, $off, 1, $c); next; } elsif ($sanitise_quote eq $c) { $sanitise_quote = ''; } } #print "c<$c> SQ<$sanitise_quote>\n"; if ($off != 0 && $sanitise_quote eq '*/' && $c ne "\t") { substr($res, $off, 1, $;); } elsif ($off != 0 && $sanitise_quote eq '//' && $c ne "\t") { substr($res, $off, 1, $;); } elsif ($off != 0 && $sanitise_quote && $c ne "\t") { substr($res, $off, 1, 'X'); } else { substr($res, $off, 1, $c); } } if ($sanitise_quote eq '//') { $sanitise_quote = ''; } # The pathname on a #include may be surrounded by '<' and '>'. if ($res =~ /^.\s*\#\s*include\s+\<(.*)\>/) { my $clean = 'X' x length($1); $res =~ s@\<.*\>@<$clean>@; # The whole of a #error is a string. } elsif ($res =~ /^.\s*\#\s*(?:error|warning)\s+(.*)\b/) { my $clean = 'X' x length($1); $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; } return $res; } sub get_quoted_string { my ($line, $rawline) = @_; return "" if ($line !~ m/(\"[X]+\")/g); return substr($rawline, $-[0], $+[0] - $-[0]); } sub ctx_statement_block { my ($linenr, $remain, $off) = @_; my $line = $linenr - 1; my $blk = ''; my $soff = $off; my $coff = $off - 1; my $coff_set = 0; my $loff = 0; my $type = ''; my $level = 0; my @stack = (); my $p; my $c; my $len = 0; my $remainder; while (1) { @stack = (['', 0]) if ($#stack == -1); #warn "CSB: blk<$blk> remain<$remain>\n"; # If we are about to drop off the end, pull in more # context. if ($off >= $len) { for (; $remain > 0; $line++) { last if (!defined $lines[$line]); next if ($lines[$line] =~ /^-/); $remain--; $loff = $len; $blk .= $lines[$line] . "\n"; $len = length($blk); $line++; last; } # Bail if there is no further context. #warn "CSB: blk<$blk> off<$off> len<$len>\n"; if ($off >= $len) { last; } if ($level == 0 && substr($blk, $off) =~ /^.\s*#\s*define/) { $level++; $type = '#'; } } $p = $c; $c = substr($blk, $off, 1); $remainder = substr($blk, $off); #warn "CSB: c<$c> type<$type> level<$level> remainder<$remainder> coff_set<$coff_set>\n"; # Handle nested #if/#else. if ($remainder =~ /^#\s*(?:ifndef|ifdef|if)\s/) { push(@stack, [ $type, $level ]); } elsif ($remainder =~ /^#\s*(?:else|elif)\b/) { ($type, $level) = @{$stack[$#stack - 1]}; } elsif ($remainder =~ /^#\s*endif\b/) { ($type, $level) = @{pop(@stack)}; } # Statement ends at the ';' or a close '}' at the # outermost level. if ($level == 0 && $c eq ';') { last; } # An else is really a conditional as long as its not else if if ($level == 0 && $coff_set == 0 && (!defined($p) || $p =~ /(?:\s|\}|\+)/) && $remainder =~ /^(else)(?:\s|{)/ && $remainder !~ /^else\s+if\b/) { $coff = $off + length($1) - 1; $coff_set = 1; #warn "CSB: mark coff<$coff> soff<$soff> 1<$1>\n"; #warn "[" . substr($blk, $soff, $coff - $soff + 1) . "]\n"; } if (($type eq '' || $type eq '(') && $c eq '(') { $level++; $type = '('; } if ($type eq '(' && $c eq ')') { $level--; $type = ($level != 0)? '(' : ''; if ($level == 0 && $coff < $soff) { $coff = $off; $coff_set = 1; #warn "CSB: mark coff<$coff>\n"; } } if (($type eq '' || $type eq '{') && $c eq '{') { $level++; $type = '{'; } if ($type eq '{' && $c eq '}') { $level--; $type = ($level != 0)? '{' : ''; if ($level == 0) { if (substr($blk, $off + 1, 1) eq ';') { $off++; } last; } } # Preprocessor commands end at the newline unless escaped. if ($type eq '#' && $c eq "\n" && $p ne "\\") { $level--; $type = ''; $off++; last; } $off++; } # We are truly at the end, so shuffle to the next line. if ($off == $len) { $loff = $len + 1; $line++; $remain--; } my $statement = substr($blk, $soff, $off - $soff + 1); my $condition = substr($blk, $soff, $coff - $soff + 1); #warn "STATEMENT<$statement>\n"; #warn "CONDITION<$condition>\n"; #print "coff<$coff> soff<$off> loff<$loff>\n"; return ($statement, $condition, $line, $remain + 1, $off - $loff + 1, $level); } sub statement_lines { my ($stmt) = @_; # Strip the diff line prefixes and rip blank lines at start and end. $stmt =~ s/(^|\n)./$1/g; $stmt =~ s/^\s*//; $stmt =~ s/\s*$//; my @stmt_lines = ($stmt =~ /\n/g); return $#stmt_lines + 2; } sub statement_rawlines { my ($stmt) = @_; my @stmt_lines = ($stmt =~ /\n/g); return $#stmt_lines + 2; } sub statement_block_size { my ($stmt) = @_; $stmt =~ s/(^|\n)./$1/g; $stmt =~ s/^\s*{//; $stmt =~ s/}\s*$//; $stmt =~ s/^\s*//; $stmt =~ s/\s*$//; my @stmt_lines = ($stmt =~ /\n/g); my @stmt_statements = ($stmt =~ /;/g); my $stmt_lines = $#stmt_lines + 2; my $stmt_statements = $#stmt_statements + 1; if ($stmt_lines > $stmt_statements) { return $stmt_lines; } else { return $stmt_statements; } } sub ctx_statement_full { my ($linenr, $remain, $off) = @_; my ($statement, $condition, $level); my (@chunks); # Grab the first conditional/block pair. ($statement, $condition, $linenr, $remain, $off, $level) = ctx_statement_block($linenr, $remain, $off); #print "F: c<$condition> s<$statement> remain<$remain>\n"; push(@chunks, [ $condition, $statement ]); if (!($remain > 0 && $condition =~ /^\s*(?:\n[+-])?\s*(?:if|else|do)\b/s)) { return ($level, $linenr, @chunks); } # Pull in the following conditional/block pairs and see if they # could continue the statement. for (;;) { ($statement, $condition, $linenr, $remain, $off, $level) = ctx_statement_block($linenr, $remain, $off); #print "C: c<$condition> s<$statement> remain<$remain>\n"; last if (!($remain > 0 && $condition =~ /^(?:\s*\n[+-])*\s*(?:else|do)\b/s)); #print "C: push\n"; push(@chunks, [ $condition, $statement ]); } return ($level, $linenr, @chunks); } sub ctx_block_get { my ($linenr, $remain, $outer, $open, $close, $off) = @_; my $line; my $start = $linenr - 1; my $blk = ''; my @o; my @c; my @res = (); my $level = 0; my @stack = ($level); for ($line = $start; $remain > 0; $line++) { next if ($rawlines[$line] =~ /^-/); $remain--; $blk .= $rawlines[$line]; # Handle nested #if/#else. if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) { push(@stack, $level); } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) { $level = $stack[$#stack - 1]; } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) { $level = pop(@stack); } foreach my $c (split(//, $lines[$line])) { ##print "C<$c>L<$level><$open$close>O<$off>\n"; if ($off > 0) { $off--; next; } if ($c eq $close && $level > 0) { $level--; last if ($level == 0); } elsif ($c eq $open) { $level++; } } if (!$outer || $level <= 1) { push(@res, $rawlines[$line]); } last if ($level == 0); } return ($level, @res); } sub ctx_block_outer { my ($linenr, $remain) = @_; my ($level, @r) = ctx_block_get($linenr, $remain, 1, '{', '}', 0); return @r; } sub ctx_block { my ($linenr, $remain) = @_; my ($level, @r) = ctx_block_get($linenr, $remain, 0, '{', '}', 0); return @r; } sub ctx_statement { my ($linenr, $remain, $off) = @_; my ($level, @r) = ctx_block_get($linenr, $remain, 0, '(', ')', $off); return @r; } sub ctx_block_level { my ($linenr, $remain) = @_; return ctx_block_get($linenr, $remain, 0, '{', '}', 0); } sub ctx_statement_level { my ($linenr, $remain, $off) = @_; return ctx_block_get($linenr, $remain, 0, '(', ')', $off); } sub ctx_locate_comment { my ($first_line, $end_line) = @_; # Catch a comment on the end of the line itself. my ($current_comment) = ($rawlines[$end_line - 1] =~ m@.*(/\*.*\*/)\s*(?:\\\s*)?$@); return $current_comment if (defined $current_comment); # Look through the context and try and figure out if there is a # comment. my $in_comment = 0; $current_comment = ''; for (my $linenr = $first_line; $linenr < $end_line; $linenr++) { my $line = $rawlines[$linenr - 1]; #warn " $line\n"; if ($linenr == $first_line and $line =~ m@^.\s*\*@) { $in_comment = 1; } if ($line =~ m@/\*@) { $in_comment = 1; } if (!$in_comment && $current_comment ne '') { $current_comment = ''; } $current_comment .= $line . "\n" if ($in_comment); if ($line =~ m@\*/@) { $in_comment = 0; } } chomp($current_comment); return($current_comment); } sub ctx_has_comment { my ($first_line, $end_line) = @_; my $cmt = ctx_locate_comment($first_line, $end_line); ##print "LINE: $rawlines[$end_line - 1 ]\n"; ##print "CMMT: $cmt\n"; return ($cmt ne ''); } sub raw_line { my ($linenr, $cnt) = @_; my $offset = $linenr - 1; $cnt++; my $line; while ($cnt) { $line = $rawlines[$offset++]; next if (defined($line) && $line =~ /^-/); $cnt--; } return $line; } sub cat_vet { my ($vet) = @_; my ($res, $coded); $res = ''; while ($vet =~ /([^[:cntrl:]]*)([[:cntrl:]]|$)/g) { $res .= $1; if ($2 ne '') { $coded = sprintf("^%c", unpack('C', $2) + 64); $res .= $coded; } } $res =~ s/$/\$/; return $res; } my $av_preprocessor = 0; my $av_pending; my @av_paren_type; my $av_pend_colon; sub annotate_reset { $av_preprocessor = 0; $av_pending = '_'; @av_paren_type = ('E'); $av_pend_colon = 'O'; } sub annotate_values { my ($stream, $type) = @_; my $res; my $var = '_' x length($stream); my $cur = $stream; print "$stream\n" if ($dbg_values > 1); while (length($cur)) { @av_paren_type = ('E') if ($#av_paren_type < 0); print " <" . join('', @av_paren_type) . "> <$type> <$av_pending>" if ($dbg_values > 1); if ($cur =~ /^(\s+)/o) { print "WS($1)\n" if ($dbg_values > 1); if ($1 =~ /\n/ && $av_preprocessor) { $type = pop(@av_paren_type); $av_preprocessor = 0; } } elsif ($cur =~ /^(\(\s*$Type\s*)\)/ && $av_pending eq '_') { print "CAST($1)\n" if ($dbg_values > 1); push(@av_paren_type, $type); $type = 'c'; } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) { print "DECLARE($1)\n" if ($dbg_values > 1); $type = 'T'; } elsif ($cur =~ /^($Modifier)\s*/) { print "MODIFIER($1)\n" if ($dbg_values > 1); $type = 'T'; } elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) { print "DEFINE($1,$2)\n" if ($dbg_values > 1); $av_preprocessor = 1; push(@av_paren_type, $type); if ($2 ne '') { $av_pending = 'N'; } $type = 'E'; } elsif ($cur =~ /^(\#\s*(?:undef\s*$Ident|include\b))/o) { print "UNDEF($1)\n" if ($dbg_values > 1); $av_preprocessor = 1; push(@av_paren_type, $type); } elsif ($cur =~ /^(\#\s*(?:ifdef|ifndef|if))/o) { print "PRE_START($1)\n" if ($dbg_values > 1); $av_preprocessor = 1; push(@av_paren_type, $type); push(@av_paren_type, $type); $type = 'E'; } elsif ($cur =~ /^(\#\s*(?:else|elif))/o) { print "PRE_RESTART($1)\n" if ($dbg_values > 1); $av_preprocessor = 1; push(@av_paren_type, $av_paren_type[$#av_paren_type]); $type = 'E'; } elsif ($cur =~ /^(\#\s*(?:endif))/o) { print "PRE_END($1)\n" if ($dbg_values > 1); $av_preprocessor = 1; # Assume all arms of the conditional end as this # one does, and continue as if the #endif was not here. pop(@av_paren_type); push(@av_paren_type, $type); $type = 'E'; } elsif ($cur =~ /^(\\\n)/o) { print "PRECONT($1)\n" if ($dbg_values > 1); } elsif ($cur =~ /^(__attribute__)\s*\(?/o) { print "ATTR($1)\n" if ($dbg_values > 1); $av_pending = $type; $type = 'N'; } elsif ($cur =~ /^(sizeof)\s*(\()?/o) { print "SIZEOF($1)\n" if ($dbg_values > 1); if (defined $2) { $av_pending = 'V'; } $type = 'N'; } elsif ($cur =~ /^(if|while|for)\b/o) { print "COND($1)\n" if ($dbg_values > 1); $av_pending = 'E'; $type = 'N'; } elsif ($cur =~/^(case)/o) { print "CASE($1)\n" if ($dbg_values > 1); $av_pend_colon = 'C'; $type = 'N'; } elsif ($cur =~/^(return|else|goto|typeof|__typeof__)\b/o) { print "KEYWORD($1)\n" if ($dbg_values > 1); $type = 'N'; } elsif ($cur =~ /^(\()/o) { print "PAREN('$1')\n" if ($dbg_values > 1); push(@av_paren_type, $av_pending); $av_pending = '_'; $type = 'N'; } elsif ($cur =~ /^(\))/o) { my $new_type = pop(@av_paren_type); if ($new_type ne '_') { $type = $new_type; print "PAREN('$1') -> $type\n" if ($dbg_values > 1); } else { print "PAREN('$1')\n" if ($dbg_values > 1); } } elsif ($cur =~ /^($Ident)\s*\(/o) { print "FUNC($1)\n" if ($dbg_values > 1); $type = 'V'; $av_pending = 'V'; } elsif ($cur =~ /^($Ident\s*):(?:\s*\d+\s*(,|=|;))?/) { if (defined $2 && $type eq 'C' || $type eq 'T') { $av_pend_colon = 'B'; } elsif ($type eq 'E') { $av_pend_colon = 'L'; } print "IDENT_COLON($1,$type>$av_pend_colon)\n" if ($dbg_values > 1); $type = 'V'; } elsif ($cur =~ /^($Ident|$Constant)/o) { print "IDENT($1)\n" if ($dbg_values > 1); $type = 'V'; } elsif ($cur =~ /^($Assignment)/o) { print "ASSIGN($1)\n" if ($dbg_values > 1); $type = 'N'; } elsif ($cur =~/^(;|{|})/) { print "END($1)\n" if ($dbg_values > 1); $type = 'E'; $av_pend_colon = 'O'; } elsif ($cur =~/^(,)/) { print "COMMA($1)\n" if ($dbg_values > 1); $type = 'C'; } elsif ($cur =~ /^(\?)/o) { print "QUESTION($1)\n" if ($dbg_values > 1); $type = 'N'; } elsif ($cur =~ /^(:)/o) { print "COLON($1,$av_pend_colon)\n" if ($dbg_values > 1); substr($var, length($res), 1, $av_pend_colon); if ($av_pend_colon eq 'C' || $av_pend_colon eq 'L') { $type = 'E'; } else { $type = 'N'; } $av_pend_colon = 'O'; } elsif ($cur =~ /^(\[)/o) { print "CLOSE($1)\n" if ($dbg_values > 1); $type = 'N'; } elsif ($cur =~ /^(-(?![->])|\+(?!\+)|\*|\&\&|\&)/o) { my $variant; print "OPV($1)\n" if ($dbg_values > 1); if ($type eq 'V') { $variant = 'B'; } else { $variant = 'U'; } substr($var, length($res), 1, $variant); $type = 'N'; } elsif ($cur =~ /^($Operators)/o) { print "OP($1)\n" if ($dbg_values > 1); if ($1 ne '++' && $1 ne '--') { $type = 'N'; } } elsif ($cur =~ /(^.)/o) { print "C($1)\n" if ($dbg_values > 1); } if (defined $1) { $cur = substr($cur, length($1)); $res .= $type x length($1); } } return ($res, $var); } sub possible { my ($possible, $line) = @_; my $notPermitted = qr{(?: ^(?: $Modifier| $Storage| $Type| DEFINE_\S+ )$| ^(?: goto| return| case| else| asm|__asm__| do| \#| \#\#| )(?:\s|$)| ^(?:typedef|struct|enum)\b )}x; warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2); if ($possible !~ $notPermitted) { # Check for modifiers. $possible =~ s/\s*$Storage\s*//g; $possible =~ s/\s*$Sparse\s*//g; if ($possible =~ /^\s*$/) { } elsif ($possible =~ /\s/) { $possible =~ s/\s*$Type\s*//g; for my $modifier (split(' ', $possible)) { if ($modifier !~ $notPermitted) { warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible); push(@modifierList, $modifier); } } } else { warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); push(@typeList, $possible); } build_types(); } else { warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1); } } my $prefix = ''; sub show_type { return !defined $ignore_type{$_[0]}; } sub report { if (!show_type($_[1]) || (defined $tst_only && $_[2] !~ /\Q$tst_only\E/)) { return 0; } my $line; if ($show_types) { $line = "$prefix$_[0]:$_[1]: $_[2]\n"; } else { $line = "$prefix$_[0]: $_[2]\n"; } $line = (split('\n', $line))[0] . "\n" if ($terse); push(our @report, $line); return 1; } sub report_dump { our @report; } sub ERROR { if (report("ERROR", $_[0], $_[1])) { our $clean = 0; our $cnt_error++; } } sub WARN { if (report("WARNING", $_[0], $_[1])) { our $clean = 0; our $cnt_warn++; } } sub CHK { if ($check && report("CHECK", $_[0], $_[1])) { our $clean = 0; our $cnt_chk++; } } sub check_absolute_file { my ($absolute, $herecurr) = @_; my $file = $absolute; ##print "absolute<$absolute>\n"; # See if any suffix of this path is a path within the tree. while ($file =~ s@^[^/]*/@@) { if (-f "$root/$file") { ##print "file<$file>\n"; last; } } if (! -f _) { return 0; } # It is, so see if the prefix is acceptable. my $prefix = $absolute; substr($prefix, -length($file)) = ''; ##print "prefix<$prefix>\n"; if ($prefix ne ".../") { WARN("USE_RELATIVE_PATH", "use relative pathname instead of absolute in changelog text\n" . $herecurr); } } sub pos_last_openparen { my ($line) = @_; my $pos = 0; my $opens = $line =~ tr/\(/\(/; my $closes = $line =~ tr/\)/\)/; my $last_openparen = 0; if (($opens == 0) || ($closes >= $opens)) { return -1; } my $len = length($line); for ($pos = 0; $pos < $len; $pos++) { my $string = substr($line, $pos); if ($string =~ /^($FuncArg|$balanced_parens)/) { $pos += length($1) - 1; } elsif (substr($line, $pos, 1) eq '(') { $last_openparen = $pos; } elsif (index($string, '(') == -1) { last; } } return $last_openparen + 1; } sub process { my $filename = shift; my $linenr=0; my $prevline=""; my $prevrawline=""; my $stashline=""; my $stashrawline=""; my $length; my $indent; my $previndent=0; my $stashindent=0; our $clean = 1; my $signoff = 0; my $is_patch = 0; my $in_header_lines = 1; my $in_commit_log = 0; #Scanning lines before patch my $non_utf8_charset = 0; our @report = (); our $cnt_lines = 0; our $cnt_error = 0; our $cnt_warn = 0; our $cnt_chk = 0; # Trace the real file/line as we go. my $realfile = ''; my $realline = 0; my $realcnt = 0; my $here = ''; my $in_comment = 0; my $comment_edge = 0; my $first_line = 0; my $p1_prefix = ''; my $prev_values = 'E'; # suppression flags my %suppress_ifbraces; my %suppress_whiletrailers; my %suppress_export; my $suppress_statement = 0; my %camelcase = (); # Pre-scan the patch sanitizing the lines. # Pre-scan the patch looking for any __setup documentation. # my @setup_docs = (); my $setup_docs = 0; sanitise_line_reset(); my $line; foreach my $rawline (@rawlines) { $linenr++; $line = $rawline; if ($rawline=~/^\+\+\+\s+(\S+)/) { $setup_docs = 0; if ($1 =~ m@Documentation/kernel-parameters.txt$@) { $setup_docs = 1; } #next; } if ($rawline=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) { $realline=$1-1; if (defined $2) { $realcnt=$3+1; } else { $realcnt=1+1; } $in_comment = 0; # Guestimate if this is a continuing comment. Run # the context looking for a comment "edge". If this # edge is a close comment then we must be in a comment # at context start. my $edge; my $cnt = $realcnt; for (my $ln = $linenr + 1; $cnt > 0; $ln++) { next if (defined $rawlines[$ln - 1] && $rawlines[$ln - 1] =~ /^-/); $cnt--; #print "RAW<$rawlines[$ln - 1]>\n"; last if (!defined $rawlines[$ln - 1]); if ($rawlines[$ln - 1] =~ m@(/\*|\*/)@ && $rawlines[$ln - 1] !~ m@"[^"]*(?:/\*|\*/)[^"]*"@) { ($edge) = $1; last; } } if (defined $edge && $edge eq '*/') { $in_comment = 1; } # Guestimate if this is a continuing comment. If this # is the start of a diff block and this line starts # ' *' then it is very likely a comment. if (!defined $edge && $rawlines[$linenr] =~ m@^.\s*(?:\*\*+| \*)(?:\s|$)@) { $in_comment = 1; } ##print "COMMENT:$in_comment edge<$edge> $rawline\n"; sanitise_line_reset($in_comment); } elsif ($realcnt && $rawline =~ /^(?:\+| |$)/) { # Standardise the strings and chars within the input to # simplify matching -- only bother with positive lines. $line = sanitise_line($rawline); } push(@lines, $line); if ($realcnt > 1) { $realcnt-- if ($line =~ /^(?:\+| |$)/); } else { $realcnt = 0; } #print "==>$rawline\n"; #print "-->$line\n"; if ($setup_docs && $line =~ /^\+/) { push(@setup_docs, $line); } } $prefix = ''; $realcnt = 0; $linenr = 0; foreach my $line (@lines) { $linenr++; my $rawline = $rawlines[$linenr - 1]; #extract the line range in the file after the patch is applied if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) { $is_patch = 1; $first_line = $linenr + 1; $realline=$1-1; if (defined $2) { $realcnt=$3+1; } else { $realcnt=1+1; } annotate_reset(); $prev_values = 'E'; %suppress_ifbraces = (); %suppress_whiletrailers = (); %suppress_export = (); $suppress_statement = 0; next; # track the line number as we move through the hunk, note that # new versions of GNU diff omit the leading space on completely # blank context lines so we need to count that too. } elsif ($line =~ /^( |\+|$)/) { $realline++; $realcnt-- if ($realcnt != 0); # Measure the line length and indent. ($length, $indent) = line_stats($rawline); # Track the previous line. ($prevline, $stashline) = ($stashline, $line); ($previndent, $stashindent) = ($stashindent, $indent); ($prevrawline, $stashrawline) = ($stashrawline, $rawline); #warn "line<$line>\n"; } elsif ($realcnt == 1) { $realcnt--; } my $hunk_line = ($realcnt != 0); #make up the handle for any error we report on this line $prefix = "$filename:$realline: " if ($emacs && $file); $prefix = "$filename:$linenr: " if ($emacs && !$file); $here = "#$linenr: " if (!$file); $here = "#$realline: " if ($file); # extract the filename as it passes if ($line =~ /^diff --git.*?(\S+)$/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; $in_commit_log = 0; } elsif ($line =~ /^\+\+\+\s+(\S+)/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; $in_commit_log = 0; $p1_prefix = $1; if (!$file && $tree && $p1_prefix ne '' && -e "$root/$p1_prefix") { WARN("PATCH_PREFIX", "patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n"); } if ($realfile =~ m@^include/asm/@) { ERROR("MODIFIED_INCLUDE_ASM", "do not modify files in include/asm, change architecture specific files in include/asm-\n" . "$here$rawline\n"); } next; } $here .= "FILE: $realfile:$realline:" if ($realcnt != 0); my $hereline = "$here\n$rawline\n"; my $herecurr = "$here\n$rawline\n"; my $hereprev = "$here\n$prevrawline\n$rawline\n"; $cnt_lines++ if ($realcnt != 0); # Check for incorrect file permissions if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { my $permhere = $here . "FILE: $realfile\n"; if ($realfile !~ m@scripts/@ && $realfile !~ /\.(py|pl|awk|sh)$/) { ERROR("EXECUTE_PERMISSIONS", "do not set execute permissions for source files\n" . $permhere); } } # Check the patch for a signoff: if ($line =~ /^\s*signed-off-by:/i) { $signoff++; $in_commit_log = 0; } # Check signature styles if (!$in_header_lines && $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) { my $space_before = $1; my $sign_off = $2; my $space_after = $3; my $email = $4; my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { WARN("BAD_SIGN_OFF", "Non-standard signature: $sign_off\n" . $herecurr); } if (defined $space_before && $space_before ne "") { WARN("BAD_SIGN_OFF", "Do not use whitespace before $ucfirst_sign_off\n" . $herecurr); } if ($sign_off =~ /-by:$/i && $sign_off ne $ucfirst_sign_off) { WARN("BAD_SIGN_OFF", "'$ucfirst_sign_off' is the preferred signature form\n" . $herecurr); } if (!defined $space_after || $space_after ne " ") { WARN("BAD_SIGN_OFF", "Use a single space after $ucfirst_sign_off\n" . $herecurr); } my ($email_name, $email_address, $comment) = parse_email($email); my $suggested_email = format_email(($email_name, $email_address)); if ($suggested_email eq "") { ERROR("BAD_SIGN_OFF", "Unrecognized email address: '$email'\n" . $herecurr); } else { my $dequoted = $suggested_email; $dequoted =~ s/^"//; $dequoted =~ s/" $comment" ne $email && "$suggested_email$comment" ne $email) { WARN("BAD_SIGN_OFF", "email address '$email' might be better as '$suggested_email$comment'\n" . $herecurr); } } } # Check for wrappage within a valid hunk of the file if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) { ERROR("CORRUPTED_PATCH", "patch seems to be corrupt (line wrapped?)\n" . $herecurr) if (!$emitted_corrupt++); } # Check for absolute kernel paths. if ($tree) { while ($line =~ m{(?:^|\s)(/\S*)}g) { my $file = $1; if ($file =~ m{^(.*?)(?::\d+)+:?$} && check_absolute_file($1, $herecurr)) { # } else { check_absolute_file($file, $herecurr); } } } # UTF-8 regex found at http://www.w3.org/International/questions/qa-forms-utf-8.en.php if (($realfile =~ /^$/ || $line =~ /^\+/) && $rawline !~ m/^$UTF8*$/) { my ($utf8_prefix) = ($rawline =~ /^($UTF8*)/); my $blank = copy_spacing($rawline); my $ptr = substr($blank, 0, length($utf8_prefix)) . "^"; my $hereptr = "$hereline$ptr\n"; CHK("INVALID_UTF8", "Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr); } # Check if it's the start of a commit log # (not a header line and we haven't seen the patch filename) if ($in_header_lines && $realfile =~ /^$/ && $rawline !~ /^(commit\b|from\b|[\w-]+:).+$/i) { $in_header_lines = 0; $in_commit_log = 1; } # Check if there is UTF-8 in a commit log when a mail header has explicitly # declined it, i.e defined some charset where it is missing. if ($in_header_lines && $rawline =~ /^Content-Type:.+charset="(.+)".*$/ && $1 !~ /utf-8/i) { $non_utf8_charset = 1; } if ($in_commit_log && $non_utf8_charset && $realfile =~ /^$/ && $rawline =~ /$NON_ASCII_UTF8/) { WARN("UTF8_BEFORE_PATCH", "8-bit UTF-8 used in possible commit log\n" . $herecurr); } # ignore non-hunk lines and lines being removed next if (!$hunk_line || $line =~ /^-/); #trailing whitespace if ($line =~ /^\+.*\015/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("DOS_LINE_ENDINGS", "DOS line endings\n" . $herevet); } elsif ($rawline =~ /^\+.*\S\s+$/ || $rawline =~ /^\+\s+$/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("TRAILING_WHITESPACE", "trailing whitespace\n" . $herevet); $rpt_cleaners = 1; } # check for Kconfig help text having a real description # Only applies when adding the entry originally, after that we do not have # sufficient context to determine whether it is indeed long enough. if ($realfile =~ /Kconfig/ && $line =~ /.\s*config\s+/) { my $length = 0; my $cnt = $realcnt; my $ln = $linenr + 1; my $f; my $is_start = 0; my $is_end = 0; for (; $cnt > 0 && defined $lines[$ln - 1]; $ln++) { $f = $lines[$ln - 1]; $cnt-- if ($lines[$ln - 1] !~ /^-/); $is_end = $lines[$ln - 1] =~ /^\+/; next if ($f =~ /^-/); if ($lines[$ln - 1] =~ /.\s*(?:bool|tristate)\s*\"/) { $is_start = 1; } elsif ($lines[$ln - 1] =~ /.\s*(?:---)?help(?:---)?$/) { $length = -1; } $f =~ s/^.//; $f =~ s/#.*//; $f =~ s/^\s+//; next if ($f =~ /^$/); if ($f =~ /^\s*config\s/) { $is_end = 1; last; } $length++; } WARN("CONFIG_DESCRIPTION", "please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_start && $is_end && $length < 4); #print "is_start<$is_start> is_end<$is_end> length<$length>\n"; } # discourage the addition of CONFIG_EXPERIMENTAL in Kconfig. if ($realfile =~ /Kconfig/ && $line =~ /.\s*depends on\s+.*\bEXPERIMENTAL\b/) { WARN("CONFIG_EXPERIMENTAL", "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n"); } if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { my $flag = $1; my $replacement = { 'EXTRA_AFLAGS' => 'asflags-y', 'EXTRA_CFLAGS' => 'ccflags-y', 'EXTRA_CPPFLAGS' => 'cppflags-y', 'EXTRA_LDFLAGS' => 'ldflags-y', }; WARN("DEPRECATED_VARIABLE", "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag}); } # check we are in a valid source file if not then ignore this hunk next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); #line length limit if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && $rawline !~ /^.\s*\*\s*\@$Ident\s/ && !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ || $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && $length > $max_line_length) { WARN("LONG_LINE", "line over $max_line_length characters\n" . $herecurr); } # Check for user-visible strings broken across lines, which breaks the ability # to grep for the string. Limited to strings used as parameters (those # following an open parenthesis), which almost completely eliminates false # positives, as well as warning only once per parameter rather than once per # line of the string. Make an exception when the previous string ends in a # newline (multiple lines in one string constant) or \n\t (common in inline # assembly to indent the instruction on the following line). if ($line =~ /^\+\s*"/ && $prevline =~ /"\s*$/ && $prevline =~ /\(/ && $prevrawline !~ /\\n(?:\\t)*"\s*$/) { WARN("SPLIT_STRING", "quoted string split across lines\n" . $hereprev); } # check for spaces before a quoted newline if ($rawline =~ /^.*\".*\s\\n/) { WARN("QUOTED_WHITESPACE_BEFORE_NEWLINE", "unnecessary whitespace before a quoted newline\n" . $herecurr); } # check for adding lines without a newline. if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) { WARN("MISSING_EOF_NEWLINE", "adding a line without newline at end of file\n" . $herecurr); } # Blackfin: use hi/lo macros if ($realfile =~ m@arch/blackfin/.*\.S$@) { if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) { my $herevet = "$here\n" . cat_vet($line) . "\n"; ERROR("LO_MACRO", "use the LO() macro, not (... & 0xFFFF)\n" . $herevet); } if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) { my $herevet = "$here\n" . cat_vet($line) . "\n"; ERROR("HI_MACRO", "use the HI() macro, not (... >> 16)\n" . $herevet); } } # check we are in a valid source file C or perl if not then ignore this hunk next if ($realfile !~ /\.(h|c|pl)$/); # at the beginning of a line any tabs must come first and anything # more than 8 must use tabs. if ($rawline =~ /^\+\s* \t\s*\S/ || $rawline =~ /^\+\s* \s*/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("CODE_INDENT", "code indent should use tabs where possible\n" . $herevet); $rpt_cleaners = 1; } # check for space before tabs. if ($rawline =~ /^\+/ && $rawline =~ / \t/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; WARN("SPACE_BEFORE_TAB", "please, no space before tabs\n" . $herevet); } # check for && or || at the start of a line if ($rawline =~ /^\+\s*(&&|\|\|)/) { CHK("LOGICAL_CONTINUATIONS", "Logical continuations should be on the previous line\n" . $hereprev); } # check multi-line statement indentation matches previous line if ($^V && $^V ge 5.10.0 && $prevline =~ /^\+(\t*)(if \(|$Ident\().*(\&\&|\|\||,)\s*$/) { $prevline =~ /^\+(\t*)(.*)$/; my $oldindent = $1; my $rest = $2; my $pos = pos_last_openparen($rest); if ($pos >= 0) { $line =~ /^(\+| )([ \t]*)/; my $newindent = $2; my $goodtabindent = $oldindent . "\t" x ($pos / 8) . " " x ($pos % 8); my $goodspaceindent = $oldindent . " " x $pos; if ($newindent ne $goodtabindent && $newindent ne $goodspaceindent) { CHK("PARENTHESIS_ALIGNMENT", "Alignment should match open parenthesis\n" . $hereprev); } } } if ($line =~ /^\+.*\*[ \t]*\)[ \t]+/) { CHK("SPACING", "No space is necessary after a cast\n" . $hereprev); } if ($realfile =~ m@^(drivers/net/|net/)@ && $rawline =~ /^\+[ \t]*\/\*[ \t]*$/ && $prevrawline =~ /^\+[ \t]*$/) { WARN("NETWORKING_BLOCK_COMMENT_STYLE", "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev); } if ($realfile =~ m@^(drivers/net/|net/)@ && $rawline !~ m@^\+[ \t]*\*/[ \t]*$@ && #trailing */ $rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/ $rawline !~ m@^\+.*\*{2,}/[ \t]*$@ && #trailing **/ $rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) { #non blank */ WARN("NETWORKING_BLOCK_COMMENT_STYLE", "networking block comments put the trailing */ on a separate line\n" . $herecurr); } # check for spaces at the beginning of a line. # Exceptions: # 1) within comments # 2) indented preprocessor commands # 3) hanging labels if ($rawline =~ /^\+ / && $line !~ /\+ *(?:$;|#|$Ident:)/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; WARN("LEADING_SPACE", "please, no spaces at the start of a line\n" . $herevet); } # check we are in a valid C source file if not then ignore this hunk next if ($realfile !~ /\.(h|c)$/); # discourage the addition of CONFIG_EXPERIMENTAL in #if(def). if ($line =~ /^\+\s*\#\s*if.*\bCONFIG_EXPERIMENTAL\b/) { WARN("CONFIG_EXPERIMENTAL", "Use of CONFIG_EXPERIMENTAL is deprecated. For alternatives, see https://lkml.org/lkml/2012/10/23/580\n"); } # check for RCS/CVS revision markers if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) { WARN("CVS_KEYWORD", "CVS style keyword markers, these will _not_ be updated\n". $herecurr); } # Blackfin: don't use __builtin_bfin_[cs]sync if ($line =~ /__builtin_bfin_csync/) { my $herevet = "$here\n" . cat_vet($line) . "\n"; ERROR("CSYNC", "use the CSYNC() macro in asm/blackfin.h\n" . $herevet); } if ($line =~ /__builtin_bfin_ssync/) { my $herevet = "$here\n" . cat_vet($line) . "\n"; ERROR("SSYNC", "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); } # check for old HOTPLUG __dev section markings if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) { WARN("HOTPLUG_SECTION", "Using $1 is unnecessary\n" . $herecurr); } # Check for potential 'bare' types my ($stat, $cond, $line_nr_next, $remain_next, $off_next, $realline_next); #print "LINE<$line>\n"; if ($linenr >= $suppress_statement && $realcnt && $line =~ /.\s*\S/) { ($stat, $cond, $line_nr_next, $remain_next, $off_next) = ctx_statement_block($linenr, $realcnt, 0); $stat =~ s/\n./\n /g; $cond =~ s/\n./\n /g; #print "linenr<$linenr> <$stat>\n"; # If this statement has no statement boundaries within # it there is no point in retrying a statement scan # until we hit end of it. my $frag = $stat; $frag =~ s/;+\s*$//; if ($frag !~ /(?:{|;)/) { #print "skip<$line_nr_next>\n"; $suppress_statement = $line_nr_next; } # Find the real next line. $realline_next = $line_nr_next; if (defined $realline_next && (!defined $lines[$realline_next - 1] || substr($lines[$realline_next - 1], $off_next) =~ /^\s*$/)) { $realline_next++; } my $s = $stat; $s =~ s/{.*$//s; # Ignore goto labels. if ($s =~ /$Ident:\*$/s) { # Ignore functions being called } elsif ($s =~ /^.\s*$Ident\s*\(/s) { } elsif ($s =~ /^.\s*else\b/s) { # declarations always start with types } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+?)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))(?:\s*$Modifier)?\s*(?:;|=|,|\()/s) { my $type = $1; $type =~ s/\s+/ /g; possible($type, "A:" . $s); # definitions in global scope can only start with types } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b\s*(?!:)/s) { possible($1, "B:" . $s); } # any (foo ... *) is a pointer cast, and foo is a type while ($s =~ /\(($Ident)(?:\s+$Sparse)*[\s\*]+\s*\)/sg) { possible($1, "C:" . $s); } # Check for any sort of function declaration. # int foo(something bar, other baz); # void (*store_gdt)(x86_descr_ptr *); if ($prev_values eq 'E' && $s =~ /^(.(?:typedef\s*)?(?:(?:$Storage|$Inline)\s*)*\s*$Type\s*(?:\b$Ident|\(\*\s*$Ident\))\s*)\(/s) { my ($name_len) = length($1); my $ctx = $s; substr($ctx, 0, $name_len + 1, ''); $ctx =~ s/\)[^\)]*$//; for my $arg (split(/\s*,\s*/, $ctx)) { if ($arg =~ /^(?:const\s+)?($Ident)(?:\s+$Sparse)*\s*\**\s*(:?\b$Ident)?$/s || $arg =~ /^($Ident)$/s) { possible($1, "D:" . $s); } } } } # # Checks which may be anchored in the context. # # Check for switch () and associated case and default # statements should be at the same indent. if ($line=~/\bswitch\s*\(.*\)/) { my $err = ''; my $sep = ''; my @ctx = ctx_block_outer($linenr, $realcnt); shift(@ctx); for my $ctx (@ctx) { my ($clen, $cindent) = line_stats($ctx); if ($ctx =~ /^\+\s*(case\s+|default:)/ && $indent != $cindent) { $err .= "$sep$ctx\n"; $sep = ''; } else { $sep = "[...]\n"; } } if ($err ne '') { ERROR("SWITCH_CASE_INDENT_LEVEL", "switch and case should be at the same indent\n$hereline$err"); } } # if/while/etc brace do not go on next line, unless defining a do while loop, # or if that brace on the next line is for something else if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) { my $pre_ctx = "$1$2"; my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); if ($line =~ /^\+\t{6,}/) { WARN("DEEP_INDENTATION", "Too many leading tabs - consider code refactoring\n" . $herecurr); } my $ctx_cnt = $realcnt - $#ctx - 1; my $ctx = join("\n", @ctx); my $ctx_ln = $linenr; my $ctx_skip = $realcnt; while ($ctx_skip > $ctx_cnt || ($ctx_skip == $ctx_cnt && defined $lines[$ctx_ln - 1] && $lines[$ctx_ln - 1] =~ /^-/)) { ##print "SKIP<$ctx_skip> CNT<$ctx_cnt>\n"; $ctx_skip-- if (!defined $lines[$ctx_ln - 1] || $lines[$ctx_ln - 1] !~ /^-/); $ctx_ln++; } #print "realcnt<$realcnt> ctx_cnt<$ctx_cnt>\n"; #print "pre<$pre_ctx>\nline<$line>\nctx<$ctx>\nnext<$lines[$ctx_ln - 1]>\n"; if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) { ERROR("OPEN_BRACE", "that open brace { should be on the previous line\n" . "$here\n$ctx\n$rawlines[$ctx_ln - 1]\n"); } if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ && $ctx =~ /\)\s*\;\s*$/ && defined $lines[$ctx_ln - 1]) { my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]); if ($nindent > $indent) { WARN("TRAILING_SEMICOLON", "trailing semicolon indicates no statements, indent implies otherwise\n" . "$here\n$ctx\n$rawlines[$ctx_ln - 1]\n"); } } } # Check relative indent for conditionals and blocks. if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) { ($stat, $cond, $line_nr_next, $remain_next, $off_next) = ctx_statement_block($linenr, $realcnt, 0) if (!defined $stat); my ($s, $c) = ($stat, $cond); substr($s, 0, length($c), ''); # Make sure we remove the line prefixes as we have # none on the first line, and are going to readd them # where necessary. $s =~ s/\n./\n/gs; # Find out how long the conditional actually is. my @newlines = ($c =~ /\n/gs); my $cond_lines = 1 + $#newlines; # We want to check the first line inside the block # starting at the end of the conditional, so remove: # 1) any blank line termination # 2) any opening brace { on end of the line # 3) any do (...) { my $continuation = 0; my $check = 0; $s =~ s/^.*\bdo\b//; $s =~ s/^\s*{//; if ($s =~ s/^\s*\\//) { $continuation = 1; } if ($s =~ s/^\s*?\n//) { $check = 1; $cond_lines++; } # Also ignore a loop construct at the end of a # preprocessor statement. if (($prevline =~ /^.\s*#\s*define\s/ || $prevline =~ /\\\s*$/) && $continuation == 0) { $check = 0; } my $cond_ptr = -1; $continuation = 0; while ($cond_ptr != $cond_lines) { $cond_ptr = $cond_lines; # If we see an #else/#elif then the code # is not linear. if ($s =~ /^\s*\#\s*(?:else|elif)/) { $check = 0; } # Ignore: # 1) blank lines, they should be at 0, # 2) preprocessor lines, and # 3) labels. if ($continuation || $s =~ /^\s*?\n/ || $s =~ /^\s*#\s*?/ || $s =~ /^\s*$Ident\s*:/) { $continuation = ($s =~ /^.*?\\\n/) ? 1 : 0; if ($s =~ s/^.*?\n//) { $cond_lines++; } } } my (undef, $sindent) = line_stats("+" . $s); my $stat_real = raw_line($linenr, $cond_lines); # Check if either of these lines are modified, else # this is not this patch's fault. if (!defined($stat_real) || $stat !~ /^\+/ && $stat_real !~ /^\+/) { $check = 0; } if (defined($stat_real) && $cond_lines > 1) { $stat_real = "[...]\n$stat_real"; } #print "line<$line> prevline<$prevline> indent<$indent> sindent<$sindent> check<$check> continuation<$continuation> s<$s> cond_lines<$cond_lines> stat_real<$stat_real> stat<$stat>\n"; if ($check && (($sindent % 8) != 0 || ($sindent <= $indent && $s ne ''))) { WARN("SUSPECT_CODE_INDENT", "suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n"); } } # Track the 'values' across context and added lines. my $opline = $line; $opline =~ s/^./ /; my ($curr_values, $curr_vars) = annotate_values($opline . "\n", $prev_values); $curr_values = $prev_values . $curr_values; if ($dbg_values) { my $outline = $opline; $outline =~ s/\t/ /g; print "$linenr > .$outline\n"; print "$linenr > $curr_values\n"; print "$linenr > $curr_vars\n"; } $prev_values = substr($curr_values, -1); #ignore lines not being added if ($line=~/^[^\+]/) {next;} # TEST: allow direct testing of the type matcher. if ($dbg_type) { if ($line =~ /^.\s*$Declare\s*$/) { ERROR("TEST_TYPE", "TEST: is type\n" . $herecurr); } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) { ERROR("TEST_NOT_TYPE", "TEST: is not type ($1 is)\n". $herecurr); } next; } # TEST: allow direct testing of the attribute matcher. if ($dbg_attr) { if ($line =~ /^.\s*$Modifier\s*$/) { ERROR("TEST_ATTR", "TEST: is attr\n" . $herecurr); } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) { ERROR("TEST_NOT_ATTR", "TEST: is not attr ($1 is)\n". $herecurr); } next; } # check for initialisation to aggregates open brace on the next line if ($line =~ /^.\s*{/ && $prevline =~ /(?:^|[^=])=\s*$/) { ERROR("OPEN_BRACE", "that open brace { should be on the previous line\n" . $hereprev); } # # Checks which are anchored on the added line. # # check for malformed paths in #include statements (uses RAW line) if ($rawline =~ m{^.\s*\#\s*include\s+[<"](.*)[">]}) { my $path = $1; if ($path =~ m{//}) { ERROR("MALFORMED_INCLUDE", "malformed #include filename\n" . $herecurr); } if ($path =~ "^uapi/" && $realfile =~ m@\binclude/uapi/@) { ERROR("UAPI_INCLUDE", "No #include in ...include/uapi/... should use a uapi/ path prefix\n" . $herecurr); } } # no C99 // comments if ($line =~ m{//}) { ERROR("C99_COMMENTS", "do not use C99 // comments\n" . $herecurr); } # Remove C99 comments. $line =~ s@//.*@@; $opline =~ s@//.*@@; # EXPORT_SYMBOL should immediately follow the thing it is exporting, consider # the whole statement. #print "APW <$lines[$realline_next - 1]>\n"; if (defined $realline_next && exists $lines[$realline_next - 1] && !defined $suppress_export{$realline_next} && ($lines[$realline_next - 1] =~ /EXPORT_SYMBOL.*\((.*)\)/ || $lines[$realline_next - 1] =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { # Handle definitions which produce identifiers with # a prefix: # XXX(foo); # EXPORT_SYMBOL(something_foo); my $name = $1; if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ && $name =~ /^${Ident}_$2/) { #print "FOO C name<$name>\n"; $suppress_export{$realline_next} = 1; } elsif ($stat !~ /(?: \n.}\s*$| ^.DEFINE_$Ident\(\Q$name\E\)| ^.DECLARE_$Ident\(\Q$name\E\)| ^.LIST_HEAD\(\Q$name\E\)| ^.(?:$Storage\s+)?$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(| \b\Q$name\E(?:\s+$Attribute)*\s*(?:;|=|\[|\() )/x) { #print "FOO A<$lines[$realline_next - 1]> stat<$stat> name<$name>\n"; $suppress_export{$realline_next} = 2; } else { $suppress_export{$realline_next} = 1; } } if (!defined $suppress_export{$linenr} && $prevline =~ /^.\s*$/ && ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ || $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { #print "FOO B <$lines[$linenr - 1]>\n"; $suppress_export{$linenr} = 2; } if (defined $suppress_export{$linenr} && $suppress_export{$linenr} == 2) { WARN("EXPORT_SYMBOL", "EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); } # check for global initialisers. if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { ERROR("GLOBAL_INITIALISERS", "do not initialise globals to 0 or NULL\n" . $herecurr); } # check for static initialisers. if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) { ERROR("INITIALISED_STATIC", "do not initialise statics to 0 or NULL\n" . $herecurr); } # check for static const char * arrays. if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) { WARN("STATIC_CONST_CHAR_ARRAY", "static const char * array should probably be static const char * const\n" . $herecurr); } # check for static char foo[] = "bar" declarations. if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) { WARN("STATIC_CONST_CHAR_ARRAY", "static char array declaration should probably be static const char\n" . $herecurr); } # check for declarations of struct pci_device_id if ($line =~ /\bstruct\s+pci_device_id\s+\w+\s*\[\s*\]\s*\=\s*\{/) { WARN("DEFINE_PCI_DEVICE_TABLE", "Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id\n" . $herecurr); } # check for new typedefs, only function parameters and sparse annotations # make sense. if ($line =~ /\btypedef\s/ && $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ && $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ && $line !~ /\b$typeTypedefs\b/ && $line !~ /\b__bitwise(?:__|)\b/) { WARN("NEW_TYPEDEFS", "do not add new typedefs\n" . $herecurr); } # * goes on variable not on type # (char*[ const]) while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) { #print "AA<$1>\n"; my ($from, $to) = ($2, $2); # Should start with a space. $to =~ s/^(\S)/ $1/; # Should not end with a space. $to =~ s/\s+$//; # '*'s should not have spaces between. while ($to =~ s/\*\s+\*/\*\*/) { } #print "from<$from> to<$to>\n"; if ($from ne $to) { ERROR("POINTER_LOCATION", "\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr); } } while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) { #print "BB<$1>\n"; my ($from, $to, $ident) = ($2, $2, $3); # Should start with a space. $to =~ s/^(\S)/ $1/; # Should not end with a space. $to =~ s/\s+$//; # '*'s should not have spaces between. while ($to =~ s/\*\s+\*/\*\*/) { } # Modifiers should have spaces. $to =~ s/(\b$Modifier$)/$1 /; #print "from<$from> to<$to> ident<$ident>\n"; if ($from ne $to && $ident !~ /^$Modifier$/) { ERROR("POINTER_LOCATION", "\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr); } } # # no BUG() or BUG_ON() # if ($line =~ /\b(BUG|BUG_ON)\b/) { # print "Try to use WARN_ON & Recovery code rather than BUG() or BUG_ON()\n"; # print "$herecurr"; # $clean = 0; # } if ($line =~ /\bLINUX_VERSION_CODE\b/) { WARN("LINUX_VERSION_CODE", "LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); } # check for uses of printk_ratelimit if ($line =~ /\bprintk_ratelimit\s*\(/) { WARN("PRINTK_RATELIMITED", "Prefer printk_ratelimited or pr__ratelimited to printk_ratelimit\n" . $herecurr); } # printk should use KERN_* levels. Note that follow on printk's on the # same line do not need a level, so we use the current block context # to try and find and validate the current printk. In summary the current # printk includes all preceding printk's which have no newline on the end. # we assume the first bad printk is the one to report. if ($line =~ /\bprintk\((?!KERN_)\s*"/) { my $ok = 0; for (my $ln = $linenr - 1; $ln >= $first_line; $ln--) { #print "CHECK<$lines[$ln - 1]\n"; # we have a preceding printk if it ends # with "\n" ignore it, else it is to blame if ($lines[$ln - 1] =~ m{\bprintk\(}) { if ($rawlines[$ln - 1] !~ m{\\n"}) { $ok = 1; } last; } } if ($ok == 0) { WARN("PRINTK_WITHOUT_KERN_LEVEL", "printk() should include KERN_ facility level\n" . $herecurr); } } if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) { my $orig = $1; my $level = lc($orig); $level = "warn" if ($level eq "warning"); my $level2 = $level; $level2 = "dbg" if ($level eq "debug"); WARN("PREFER_PR_LEVEL", "Prefer netdev_$level2(netdev, ... then dev_$level2(dev, ... then pr_$level(... to printk(KERN_$orig ...\n" . $herecurr); } if ($line =~ /\bpr_warning\s*\(/) { WARN("PREFER_PR_LEVEL", "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); } if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) { my $orig = $1; my $level = lc($orig); $level = "warn" if ($level eq "warning"); $level = "dbg" if ($level eq "debug"); WARN("PREFER_DEV_LEVEL", "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr); } # function brace can't be on same line, except for #defines of do while, # or if closed on same line if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) { ERROR("OPEN_BRACE", "open brace '{' following function declarations go on the next line\n" . $herecurr); } # open braces for enum, union and struct go on the same line. if ($line =~ /^.\s*{/ && $prevline =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?\s*$/) { ERROR("OPEN_BRACE", "open brace '{' following $1 go on the same line\n" . $hereprev); } # missing space after union, struct or enum definition if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) { WARN("SPACING", "missing space after $1 definition\n" . $herecurr); } # check for spacing round square brackets; allowed: # 1. with a type on the left -- int [] a; # 2. at the beginning of a line for slice initialisers -- [0...10] = 5, # 3. inside a curly brace -- = { [0...10] = 5 } while ($line =~ /(.*?\s)\[/g) { my ($where, $prefix) = ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where != 0 || $prefix !~ /^.\s+$/) && $prefix !~ /[{,]\s+$/) { ERROR("BRACKET_SPACE", "space prohibited before open square bracket '['\n" . $herecurr); } } # check for spaces between functions and their parentheses. while ($line =~ /($Ident)\s+\(/g) { my $name = $1; my $ctx_before = substr($line, 0, $-[1]); my $ctx = "$ctx_before$name"; # Ignore those directives where spaces _are_ permitted. if ($name =~ /^(?: if|for|while|switch|return|case| volatile|__volatile__| __attribute__|format|__extension__| asm|__asm__)$/x) { # cpp #define statements have non-optional spaces, ie # if there is a space between the name and the open # parenthesis it is simply not a parameter group. } elsif ($ctx_before =~ /^.\s*\#\s*define\s*$/) { # cpp #elif statement condition may start with a ( } elsif ($ctx =~ /^.\s*\#\s*elif\s*$/) { # If this whole things ends with a type its most # likely a typedef for a function. } elsif ($ctx =~ /$Type$/) { } else { WARN("SPACING", "space prohibited between function name and open parenthesis '('\n" . $herecurr); } } # check for whitespace before a non-naked semicolon if ($line =~ /^\+.*\S\s+;/) { WARN("SPACING", "space prohibited before semicolon\n" . $herecurr); } # Check operator spacing. if (!($line=~/\#\s*include/)) { my $ops = qr{ <<=|>>=|<=|>=|==|!=| \+=|-=|\*=|\/=|%=|\^=|\|=|&=| =>|->|<<|>>|<|>|=|!|~| &&|\|\||,|\^|\+\+|--|&|\||\+|-|\*|\/|%| \?|: }x; my @elements = split(/($ops|;)/, $opline); my $off = 0; my $blank = copy_spacing($opline); for (my $n = 0; $n < $#elements; $n += 2) { $off += length($elements[$n]); # Pick up the preceding and succeeding characters. my $ca = substr($opline, 0, $off); my $cc = ''; if (length($opline) >= ($off + length($elements[$n + 1]))) { $cc = substr($opline, $off + length($elements[$n + 1])); } my $cb = "$ca$;$cc"; my $a = ''; $a = 'V' if ($elements[$n] ne ''); $a = 'W' if ($elements[$n] =~ /\s$/); $a = 'C' if ($elements[$n] =~ /$;$/); $a = 'B' if ($elements[$n] =~ /(\[|\()$/); $a = 'O' if ($elements[$n] eq ''); $a = 'E' if ($ca =~ /^\s*$/); my $op = $elements[$n + 1]; my $c = ''; if (defined $elements[$n + 2]) { $c = 'V' if ($elements[$n + 2] ne ''); $c = 'W' if ($elements[$n + 2] =~ /^\s/); $c = 'C' if ($elements[$n + 2] =~ /^$;/); $c = 'B' if ($elements[$n + 2] =~ /^(\)|\]|;)/); $c = 'O' if ($elements[$n + 2] eq ''); $c = 'E' if ($elements[$n + 2] =~ /^\s*\\$/); } else { $c = 'E'; } my $ctx = "${a}x${c}"; my $at = "(ctx:$ctx)"; my $ptr = substr($blank, 0, $off) . "^"; my $hereptr = "$hereline$ptr\n"; # Pull out the value of this operator. my $op_type = substr($curr_values, $off + 1, 1); # Get the full operator variant. my $opv = $op . substr($curr_vars, $off, 1); # Ignore operators passed as parameters. if ($op_type ne 'V' && $ca =~ /\s$/ && $cc =~ /^\s*,/) { # # Ignore comments # } elsif ($op =~ /^$;+$/) { # ; should have either the end of line or a space or \ after it } elsif ($op eq ';') { if ($ctx !~ /.x[WEBC]/ && $cc !~ /^\\/ && $cc !~ /^;/) { ERROR("SPACING", "space required after that '$op' $at\n" . $hereptr); } # // is a comment } elsif ($op eq '//') { # No spaces for: # -> # : when part of a bitfield } elsif ($op eq '->' || $opv eq ':B') { if ($ctx =~ /Wx.|.xW/) { ERROR("SPACING", "spaces prohibited around that '$op' $at\n" . $hereptr); } # , must have a space on the right. } elsif ($op eq ',') { if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/) { ERROR("SPACING", "space required after that '$op' $at\n" . $hereptr); } # '*' as part of a type definition -- reported already. } elsif ($opv eq '*_') { #warn "'*' is part of type\n"; # unary operators should have a space before and # none after. May be left adjacent to another # unary operator, or a cast } elsif ($op eq '!' || $op eq '~' || $opv eq '*U' || $opv eq '-U' || $opv eq '&U' || $opv eq '&&U') { if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { ERROR("SPACING", "space required before that '$op' $at\n" . $hereptr); } if ($op eq '*' && $cc =~/\s*$Modifier\b/) { # A unary '*' may be const } elsif ($ctx =~ /.xW/) { ERROR("SPACING", "space prohibited after that '$op' $at\n" . $hereptr); } # unary ++ and unary -- are allowed no space on one side. } elsif ($op eq '++' or $op eq '--') { if ($ctx !~ /[WEOBC]x[^W]/ && $ctx !~ /[^W]x[WOBEC]/) { ERROR("SPACING", "space required one side of that '$op' $at\n" . $hereptr); } if ($ctx =~ /Wx[BE]/ || ($ctx =~ /Wx./ && $cc =~ /^;/)) { ERROR("SPACING", "space prohibited before that '$op' $at\n" . $hereptr); } if ($ctx =~ /ExW/) { ERROR("SPACING", "space prohibited after that '$op' $at\n" . $hereptr); } # << and >> may either have or not have spaces both sides } elsif ($op eq '<<' or $op eq '>>' or $op eq '&' or $op eq '^' or $op eq '|' or $op eq '+' or $op eq '-' or $op eq '*' or $op eq '/' or $op eq '%') { if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) { ERROR("SPACING", "need consistent spacing around '$op' $at\n" . $hereptr); } # A colon needs no spaces before when it is # terminating a case value or a label. } elsif ($opv eq ':C' || $opv eq ':L') { if ($ctx =~ /Wx./) { ERROR("SPACING", "space prohibited before that '$op' $at\n" . $hereptr); } # All the others need spaces both sides. } elsif ($ctx !~ /[EWC]x[CWE]/) { my $ok = 0; # Ignore email addresses if (($op eq '<' && $cc =~ /^\S+\@\S+>/) || ($op eq '>' && $ca =~ /<\S+\@\S+$/)) { $ok = 1; } # Ignore ?: if (($opv eq ':O' && $ca =~ /\?$/) || ($op eq '?' && $cc =~ /^:/)) { $ok = 1; } if ($ok == 0) { ERROR("SPACING", "spaces required around that '$op' $at\n" . $hereptr); } } $off += length($elements[$n + 1]); } } # check for multiple assignments if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) { CHK("MULTIPLE_ASSIGNMENTS", "multiple assignments should be avoided\n" . $herecurr); } ## # check for multiple declarations, allowing for a function declaration ## # continuation. ## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ && ## $line !~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Type\s*$Ident.*/) { ## ## # Remove any bracketed sections to ensure we do not ## # falsly report the parameters of functions. ## my $ln = $line; ## while ($ln =~ s/\([^\(\)]*\)//g) { ## } ## if ($ln =~ /,/) { ## WARN("MULTIPLE_DECLARATION", ## "declaring multiple variables together should be avoided\n" . $herecurr); ## } ## } #need space before brace following if, while, etc if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || $line =~ /do{/) { ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr); } # closing brace should have a space following it when it has anything # on the line if ($line =~ /}(?!(?:,|;|\)))\S/) { ERROR("SPACING", "space required after that close brace '}'\n" . $herecurr); } # check spacing on square brackets if ($line =~ /\[\s/ && $line !~ /\[\s*$/) { ERROR("SPACING", "space prohibited after that open square bracket '['\n" . $herecurr); } if ($line =~ /\s\]/) { ERROR("SPACING", "space prohibited before that close square bracket ']'\n" . $herecurr); } # check spacing on parentheses if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ && $line !~ /for\s*\(\s+;/) { ERROR("SPACING", "space prohibited after that open parenthesis '('\n" . $herecurr); } if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && $line !~ /for\s*\(.*;\s+\)/ && $line !~ /:\s+\)/) { ERROR("SPACING", "space prohibited before that close parenthesis ')'\n" . $herecurr); } #goto labels aren't indented, allow a single space however if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) { WARN("INDENTED_LABEL", "labels should not be indented\n" . $herecurr); } # Return is not a function. if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) { my $spacing = $1; my $value = $2; # Flatten any parentheses $value =~ s/\(/ \(/g; $value =~ s/\)/\) /g; while ($value =~ s/\[[^\[\]]*\]/1/ || $value !~ /(?:$Ident|-?$Constant)\s* $Compare\s* (?:$Ident|-?$Constant)/x && $value =~ s/\([^\(\)]*\)/1/) { } #print "value<$value>\n"; if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/) { ERROR("RETURN_PARENTHESES", "return is not a function, parentheses are not required\n" . $herecurr); } elsif ($spacing !~ /\s+/) { ERROR("SPACING", "space required before the open parenthesis '('\n" . $herecurr); } } # Return of what appears to be an errno should normally be -'ve if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) { my $name = $1; if ($name ne 'EOF' && $name ne 'ERROR') { WARN("USE_NEGATIVE_ERRNO", "return of an errno should typically be -ve (return -$1)\n" . $herecurr); } } # Need a space before open parenthesis after if, while etc if ($line=~/\b(if|while|for|switch)\(/) { ERROR("SPACING", "space required before the open parenthesis '('\n" . $herecurr); } # Check for illegal assignment in if conditional -- and check for trailing # statements after the conditional. if ($line =~ /do\s*(?!{)/) { ($stat, $cond, $line_nr_next, $remain_next, $off_next) = ctx_statement_block($linenr, $realcnt, 0) if (!defined $stat); my ($stat_next) = ctx_statement_block($line_nr_next, $remain_next, $off_next); $stat_next =~ s/\n./\n /g; ##print "stat<$stat> stat_next<$stat_next>\n"; if ($stat_next =~ /^\s*while\b/) { # If the statement carries leading newlines, # then count those as offsets. my ($whitespace) = ($stat_next =~ /^((?:\s*\n[+-])*\s*)/s); my $offset = statement_rawlines($whitespace) - 1; $suppress_whiletrailers{$line_nr_next + $offset} = 1; } } if (!defined $suppress_whiletrailers{$linenr} && $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) { my ($s, $c) = ($stat, $cond); if ($c =~ /\bif\s*\(.*[^<>!=]=[^=].*/s) { ERROR("ASSIGN_IN_IF", "do not use assignment in if condition\n" . $herecurr); } # Find out what is on the end of the line after the # conditional. substr($s, 0, length($c), ''); $s =~ s/\n.*//g; $s =~ s/$;//g; # Remove any comments if (length($c) && $s !~ /^\s*{?\s*\\*\s*$/ && $c !~ /}\s*while\s*/ && !($c =~ /while/ && $s eq ";")) { # Find out how long the conditional actually is. my @newlines = ($c =~ /\n/gs); my $cond_lines = 1 + $#newlines; my $stat_real = ''; $stat_real = raw_line($linenr, $cond_lines) . "\n" if ($cond_lines); if (defined($stat_real) && $cond_lines > 1) { $stat_real = "[...]\n$stat_real"; } ERROR("TRAILING_STATEMENTS", "trailing statements should be on next line\n" . $herecurr . $stat_real); } } # Check for bitwise tests written as boolean if ($line =~ / (?: (?:\[|\(|\&\&|\|\|) \s*0[xX][0-9]+\s* (?:\&\&|\|\|) | (?:\&\&|\|\|) \s*0[xX][0-9]+\s* (?:\&\&|\|\||\)|\]) )/x) { WARN("HEXADECIMAL_BOOLEAN_TEST", "boolean test with hexadecimal, perhaps just 1 \& or \|?\n" . $herecurr); } # if and else should not have general statements after it if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) { my $s = $1; $s =~ s/$;//g; # Remove any comments if ($s !~ /^\s*(?:\sif|(?:{|)\s*\\?\s*$)/) { ERROR("TRAILING_STATEMENTS", "trailing statements should be on next line\n" . $herecurr); } } # if should not continue a brace if ($line =~ /}\s*if\b/) { ERROR("TRAILING_STATEMENTS", "trailing statements should be on next line\n" . $herecurr); } # case and default should not have general statements after them if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && $line !~ /\G(?: (?:\s*$;*)(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$| \s*return\s+ )/xg) { ERROR("TRAILING_STATEMENTS", "trailing statements should be on next line\n" . $herecurr); } # Check for }else {, these must be at the same # indent level to be relevant to each other. if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and $previndent == $indent) { ERROR("ELSE_AFTER_BRACE", "else should follow close brace '}'\n" . $hereprev); } #if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and # $previndent == $indent) { # my ($s, $c) = ctx_statement_block($linenr, $realcnt, 0); # # Find out what is on the end of the line after the # # conditional. # substr($s, 0, length($c), ''); # $s =~ s/\n.*//g; # if ($s =~ /^\s*;/) { # ERROR("WHILE_AFTER_BRACE", # "while should follow close brace '}'\n" . $hereprev); # } #} #CamelCase while ($line =~ m{($Constant|$Lval)}g) { my $var = $1; if ($var !~ /$Constant/ && $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ && $var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && !defined $camelcase{$var} && $var !~ /[A-Z][A-Z0-9_]*x[A-Z0-9_]*\b/) { $camelcase{$var} = 1; #print "Camelcase line <<$line>> <<$var>>\n"; WARN("CAMELCASE", "Avoid CamelCase: <$var>\n" . $herecurr); } } #no spaces allowed after \ in define if ($line=~/\#\s*define.*\\\s$/) { WARN("WHITESPACE_AFTER_LINE_CONTINUATION", "Whitepspace after \\ makes next lines useless\n" . $herecurr); } #warn if is #included and is available (uses RAW line) if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\}) { my $file = "$1.h"; my $checkfile = "include/linux/$file"; if (-f "$root/$checkfile" && $realfile ne $checkfile && $1 !~ /$allowed_asm_includes/) { if ($realfile =~ m{^arch/}) { CHK("ARCH_INCLUDE_LINUX", "Consider using #include instead of \n" . $herecurr); } else { WARN("INCLUDE_LINUX", "Use #include instead of \n" . $herecurr); } } } # multi-statement macros should be enclosed in a do while loop, grab the # first statement and ensure its the whole macro if its not enclosed # in a known good container if ($realfile !~ m@/vmlinux.lds.h$@ && $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) { my $ln = $linenr; my $cnt = $realcnt; my ($off, $dstat, $dcond, $rest); my $ctx = ''; ($dstat, $dcond, $ln, $cnt, $off) = ctx_statement_block($linenr, $realcnt, 0); $ctx = $dstat; #print "dstat<$dstat> dcond<$dcond> cnt<$cnt> off<$off>\n"; #print "LINE<$lines[$ln-1]> len<" . length($lines[$ln-1]) . "\n"; $dstat =~ s/^.\s*\#\s*define\s+$Ident(?:\([^\)]*\))?\s*//; $dstat =~ s/$;//g; $dstat =~ s/\\\n.//g; $dstat =~ s/^\s*//s; $dstat =~ s/\s*$//s; # Flatten any parentheses and braces while ($dstat =~ s/\([^\(\)]*\)/1/ || $dstat =~ s/\{[^\{\}]*\}/1/ || $dstat =~ s/\[[^\[\]]*\]/1/) { } # Flatten any obvious string concatentation. while ($dstat =~ s/("X*")\s*$Ident/$1/ || $dstat =~ s/$Ident\s*("X*")/$1/) { } my $exceptions = qr{ $Declare| module_param_named| MODULE_PARM_DESC| DECLARE_PER_CPU| DEFINE_PER_CPU| __typeof__\(| union| struct| \.$Ident\s*=\s*| ^\"|\"$ }x; #print "REST<$rest> dstat<$dstat> ctx<$ctx>\n"; if ($dstat ne '' && $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo $dstat !~ /^'X'$/ && # character constants $dstat !~ /$exceptions/ && $dstat !~ /^\.$Ident\s*=/ && # .foo = $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^do\s*{/ && # do {... $dstat !~ /^\({/) # ({... { $ctx =~ s/\n*$//; my $herectx = $here . "\n"; my $cnt = statement_rawlines($ctx); for (my $n = 0; $n < $cnt; $n++) { $herectx .= raw_line($linenr, $n) . "\n"; } if ($dstat =~ /;/) { ERROR("MULTISTATEMENT_MACRO_USE_DO_WHILE", "Macros with multiple statements should be enclosed in a do - while loop\n" . "$herectx"); } else { ERROR("COMPLEX_MACRO", "Macros with complex values should be enclosed in parenthesis\n" . "$herectx"); } } # check for line continuations outside of #defines, preprocessor #, and asm } else { if ($prevline !~ /^..*\\$/ && $line !~ /^\+\s*\#.*\\$/ && # preprocessor $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm $line =~ /^\+.*\\$/) { WARN("LINE_CONTINUATIONS", "Avoid unnecessary line continuations\n" . $herecurr); } } # do {} while (0) macro tests: # single-statement macros do not need to be enclosed in do while (0) loop, # macro should not end with a semicolon if ($^V && $^V ge 5.10.0 && $realfile !~ m@/vmlinux.lds.h$@ && $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) { my $ln = $linenr; my $cnt = $realcnt; my ($off, $dstat, $dcond, $rest); my $ctx = ''; ($dstat, $dcond, $ln, $cnt, $off) = ctx_statement_block($linenr, $realcnt, 0); $ctx = $dstat; $dstat =~ s/\\\n.//g; if ($dstat =~ /^\+\s*#\s*define\s+$Ident\s*${balanced_parens}\s*do\s*{(.*)\s*}\s*while\s*\(\s*0\s*\)\s*([;\s]*)\s*$/) { my $stmts = $2; my $semis = $3; $ctx =~ s/\n*$//; my $cnt = statement_rawlines($ctx); my $herectx = $here . "\n"; for (my $n = 0; $n < $cnt; $n++) { $herectx .= raw_line($linenr, $n) . "\n"; } if (($stmts =~ tr/;/;/) == 1 && $stmts !~ /^\s*(if|while|for|switch)\b/) { WARN("SINGLE_STATEMENT_DO_WHILE_MACRO", "Single statement macros should not use a do {} while (0) loop\n" . "$herectx"); } if (defined $semis && $semis ne "") { WARN("DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON", "do {} while (0) macros should not be semicolon terminated\n" . "$herectx"); } } } # make sure symbols are always wrapped with VMLINUX_SYMBOL() ... # all assignments may have only one of the following with an assignment: # . # ALIGN(...) # VMLINUX_SYMBOL(...) if ($realfile eq 'vmlinux.lds.h' && $line =~ /(?:(?:^|\s)$Ident\s*=|=\s*$Ident(?:\s|$))/) { WARN("MISSING_VMLINUX_SYMBOL", "vmlinux.lds.h needs VMLINUX_SYMBOL() around C-visible symbols\n" . $herecurr); } # check for redundant bracing round if etc if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) { my ($level, $endln, @chunks) = ctx_statement_full($linenr, $realcnt, 1); #if ($#chunks > 0) { # print "chunks<$#chunks> linenr<$linenr> endln<$endln> level<$level>\n"; # my $count = 0; # for my $chunk (@chunks) { # my ($cond, $block) = @{$chunk}; # print "APW: count<$count> <<$cond>><<$block>>\n"; # $count++; # } #} if ($#chunks > 0 && $level == 0) { my @allowed = (); my $allow = 0; my $seen = 0; my $herectx = $here . "\n"; my $ln = $linenr - 1; for my $chunk (@chunks) { my ($cond, $block) = @{$chunk}; # If the condition carries leading newlines, then count those as offsets. my ($whitespace) = ($cond =~ /^((?:\s*\n[+-])*\s*)/s); my $offset = statement_rawlines($whitespace) - 1; $allowed[$allow] = 0; #print "COND<$cond> whitespace<$whitespace> offset<$offset>\n"; # We have looked at and allowed this specific line. $suppress_ifbraces{$ln + $offset} = 1; $herectx .= "$rawlines[$ln + $offset]\n[...]\n"; $ln += statement_rawlines($block) - 1; substr($block, 0, length($cond), ''); $seen++ if ($block =~ /^\s*{/); #print "cond<$cond> block<$block> allowed<$allowed[$allow]>\n"; #if (statement_lines($cond) > 1) { # #print "APW: ALLOWED: cond<$cond>\n"; # $allowed[$allow] = 1; #} #if ($block =~/\b(?:if|for|while)\b/) { # #print "APW: ALLOWED: block<$block>\n"; # $allowed[$allow] = 1; #} #if (statement_block_size($block) > 1) { # #print "APW: ALLOWED: lines block<$block>\n"; # $allowed[$allow] = 1; #} #$allow++; } if (!$seen) { ERROR("BRACES", "braces {} are necessary for all arms of this statement\n" . $herectx); } #if ($seen) { # my $sum_allowed = 0; # foreach (@allowed) { # $sum_allowed += $_; # } # if ($sum_allowed == 0) { # WARN("BRACES", # "braces {} are not necessary for any arm of this statement\n" . $herectx); # } elsif ($sum_allowed != $allow && # $seen != $allow) { # CHK("BRACES", # "braces {} should be used on all arms of this statement\n" . $herectx); # } #} } } if (!defined $suppress_ifbraces{$linenr - 1} && $line =~ /\b(if|while|for|else)\b/) { my $allowed = 0; # Check the pre-context. if (substr($line, 0, $-[0]) =~ /(#\s*)$/) { #print "APW: ALLOWED: pre<$1>\n"; $allowed = 1; } my ($level, $endln, @chunks) = ctx_statement_full($linenr, $realcnt, $-[0]); # Check the condition. my ($cond, $block) = @{$chunks[0]}; #print "CHECKING<$linenr> cond<$cond> block<$block>\n"; if (defined $cond) { substr($block, 0, length($cond), ''); } if ($cond =~ /\bwhile/ && $block =~ /^;/) { #print "APW: ALLOWED: block<$block>"; $allowed = 1; } #if ($block =~/\b(?:if|for|while)\b/) { # print "APW: ALLOWED: block<$block>\n"; # $allowed = 1; #} # Check the post-context. if (defined $chunks[1]) { my ($cond, $block) = @{$chunks[1]}; if (defined $cond) { substr($block, 0, length($cond), ''); } if ($block =~ /^\s*\{/) { #print "APW: ALLOWED: chunk-1 block<$block>\n"; #$allowed = 1; } } if ($level == 0 && !($block =~ /^\s*\{/) && !$allowed) { my $herectx = $here . "\n"; my $cnt = statement_rawlines($block); for (my $n = 0; $n < $cnt; $n++) { $herectx .= raw_line($linenr, $n) . "\n"; } WARN("BRACES", "braces {} are needed for every statement block\n" . $herectx); } } # check for unnecessary blank lines around braces if (($line =~ /^.\s*}\s*$/ && $prevline =~ /^.\s*$/)) { CHK("BRACES", "Blank lines aren't necessary before a close brace '}'\n" . $hereprev); } if (($line =~ /^.\s*$/ && $prevline =~ /^..*{\s*$/)) { CHK("BRACES", "Blank lines aren't necessary after an open brace '{'\n" . $hereprev); } # no volatiles please my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b}; if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) { WARN("VOLATILE", "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr); } # warn about #if 0 if ($line =~ /^.\s*\#\s*if\s+0\b/) { CHK("REDUNDANT_CODE", "if this code is redundant consider removing it\n" . $herecurr); } # check for needless "if () fn()" uses if ($prevline =~ /\bif\s*\(\s*($Lval)\s*\)/) { my $expr = '\s*\(\s*' . quotemeta($1) . '\s*\)\s*;'; if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?)$expr/) { WARN('NEEDLESS_IF', "$1(NULL) is safe this check is probably not required\n" . $hereprev); } } # prefer usleep_range over udelay if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) { # ignore udelay's < 10, however if (! ($1 < 10) ) { CHK("USLEEP_RANGE", "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line); } } # warn about unexpectedly long msleep's if ($line =~ /\bmsleep\s*\((\d+)\);/) { if ($1 < 20) { WARN("MSLEEP", "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line); } } # warn about #ifdefs in C files # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { # print "#ifdef in C files should be avoided\n"; # print "$herecurr"; # $clean = 0; # } # warn about spacing in #ifdefs if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) { ERROR("SPACING", "exactly one space required after that #$1\n" . $herecurr); } # check for spinlock_t definitions without a comment. if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ || $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) { my $which = $1; if (!ctx_has_comment($first_line, $linenr)) { CHK("UNCOMMENTED_DEFINITION", "$1 definition without comment\n" . $herecurr); } } # check for memory barriers without a comment. if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\(/) { if (!ctx_has_comment($first_line, $linenr)) { CHK("MEMORY_BARRIER", "memory barrier without comment\n" . $herecurr); } } # check of hardware specific defines if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) { CHK("ARCH_DEFINES", "architecture specific defines should be avoided\n" . $herecurr); } # Check that the storage class is at the beginning of a declaration if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) { WARN("STORAGE_CLASS", "storage class should be at the beginning of the declaration\n" . $herecurr) } # check the location of the inline attribute, that it is between # storage class and type. if ($line =~ /\b$Type\s+$Inline\b/ || $line =~ /\b$Inline\s+$Storage\b/) { ERROR("INLINE_LOCATION", "inline keyword should sit between storage class and type\n" . $herecurr); } # Check for __inline__ and __inline, prefer inline if ($line =~ /\b(__inline__|__inline)\b/) { WARN("INLINE", "plain inline is preferred over $1\n" . $herecurr); } # Check for __attribute__ format(printf, prefer __printf if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) { WARN("PREFER_PRINTF", "__printf(string-index, first-to-check) is preferred over __attribute__((format(printf, string-index, first-to-check)))\n" . $herecurr); } # Check for __attribute__ format(scanf, prefer __scanf if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) { WARN("PREFER_SCANF", "__scanf(string-index, first-to-check) is preferred over __attribute__((format(scanf, string-index, first-to-check)))\n" . $herecurr); } # check for sizeof(&) if ($line =~ /\bsizeof\s*\(\s*\&/) { WARN("SIZEOF_ADDRESS", "sizeof(& should be avoided\n" . $herecurr); } # check for sizeof without parenthesis if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) { WARN("SIZEOF_PARENTHESIS", "sizeof $1 should be sizeof($1)\n" . $herecurr); } # check for line continuations in quoted strings with odd counts of " if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { WARN("LINE_CONTINUATIONS", "Avoid line continuations in quoted strings\n" . $herecurr); } # check for struct spinlock declarations if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) { WARN("USE_SPINLOCK_T", "struct spinlock should be spinlock_t\n" . $herecurr); } # check for seq_printf uses that could be seq_puts if ($line =~ /\bseq_printf\s*\(/) { my $fmt = get_quoted_string($line, $rawline); if ($fmt !~ /[^\\]\%/) { WARN("PREFER_SEQ_PUTS", "Prefer seq_puts to seq_printf\n" . $herecurr); } } # Check for misused memsets if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+(?:.*?)\bmemset\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\,\s*$FuncArg\s*\)/s) { my $ms_addr = $2; my $ms_val = $7; my $ms_size = $12; if ($ms_size =~ /^(0x|)0$/i) { ERROR("MEMSET", "memset to 0's uses 0 as the 2nd argument, not the 3rd\n" . "$here\n$stat\n"); } elsif ($ms_size =~ /^(0x|)1$/i) { WARN("MEMSET", "single byte memset is suspicious. Swapped 2nd/3rd argument?\n" . "$here\n$stat\n"); } } # typecasts on min/max could be min_t/max_t if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+(?:.*?)\b(min|max)\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) { if (defined $2 || defined $7) { my $call = $1; my $cast1 = deparenthesize($2); my $arg1 = $3; my $cast2 = deparenthesize($7); my $arg2 = $8; my $cast; if ($cast1 ne "" && $cast2 ne "" && $cast1 ne $cast2) { $cast = "$cast1 or $cast2"; } elsif ($cast1 ne "") { $cast = $cast1; } else { $cast = $cast2; } WARN("MINMAX", "$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . "$here\n$stat\n"); } } # check usleep_range arguments if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+(?:.*?)\busleep_range\s*\(\s*($FuncArg)\s*,\s*($FuncArg)\s*\)/) { my $min = $1; my $max = $7; if ($min eq $max) { WARN("USLEEP_RANGE", "usleep_range should not use min == max args; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); } elsif ($min =~ /^\d+$/ && $max =~ /^\d+$/ && $min > $max) { WARN("USLEEP_RANGE", "usleep_range args reversed, use min then max; see Documentation/timers/timers-howto.txt\n" . "$here\n$stat\n"); } } # check for new externs in .c files. if ($realfile =~ /\.c$/ && defined $stat && $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) { my $function_name = $1; my $paren_space = $2; my $s = $stat; if (defined $cond) { substr($s, 0, length($cond), ''); } if ($s =~ /^\s*;/ && $function_name ne 'uninitialized_var') { WARN("AVOID_EXTERNS", "externs should be avoided in .c files\n" . $herecurr); } if ($paren_space =~ /\n/) { WARN("FUNCTION_ARGUMENTS", "arguments for function declarations should follow identifier\n" . $herecurr); } } elsif ($realfile =~ /\.c$/ && defined $stat && $stat =~ /^.\s*extern\s+/) { WARN("AVOID_EXTERNS", "externs should be avoided in .c files\n" . $herecurr); } # checks for new __setup's if ($rawline =~ /\b__setup\("([^"]*)"/) { my $name = $1; if (!grep(/$name/, @setup_docs)) { CHK("UNDOCUMENTED_SETUP", "__setup appears un-documented -- check Documentation/kernel-parameters.txt\n" . $herecurr); } } # check for pointless casting of kmalloc return if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) { WARN("UNNECESSARY_CASTS", "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); } # check for krealloc arg reuse if ($^V && $^V ge 5.10.0 && $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*\1\s*,/) { WARN("KREALLOC_ARG_REUSE", "Reusing the krealloc arg is almost always a bug\n" . $herecurr); } # check for alloc argument mismatch if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) { WARN("ALLOC_ARRAY_ARGS", "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); } # check for multiple semicolons if ($line =~ /;\s*;\s*$/) { WARN("ONE_SEMICOLON", "Statements terminations use 1 semicolon\n" . $herecurr); } # check for switch/default statements without a break; if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+[$;\s]*(?:case[$;\s]+\w+[$;\s]*:[$;\s]*|)*[$;\s]*\bdefault[$;\s]*:[$;\s]*;/g) { my $ctx = ''; my $herectx = $here . "\n"; my $cnt = statement_rawlines($stat); for (my $n = 0; $n < $cnt; $n++) { $herectx .= raw_line($linenr, $n) . "\n"; } WARN("DEFAULT_NO_BREAK", "switch default: should use break\n" . $herectx); } # check for gcc specific __FUNCTION__ if ($line =~ /__FUNCTION__/) { WARN("USE_FUNC", "__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); } # check for use of yield() if ($line =~ /\byield\s*\(\s*\)/) { WARN("YIELD", "Using yield() is generally wrong. See yield() kernel-doc (sched/core.c)\n" . $herecurr); } # check for semaphores initialized locked if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { WARN("CONSIDER_COMPLETION", "consider using a completion\n" . $herecurr); } # recommend kstrto* over simple_strto* and strict_strto* if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) { WARN("CONSIDER_KSTRTO", "$1 is obsolete, use k$3 instead\n" . $herecurr); } # check for __initcall(), use device_initcall() explicitly please if ($line =~ /^.\s*__initcall\s*\(/) { WARN("USE_DEVICE_INITCALL", "please use device_initcall() instead of __initcall()\n" . $herecurr); } # check for various ops structs, ensure they are const. my $struct_ops = qr{acpi_dock_ops| address_space_operations| backlight_ops| block_device_operations| dentry_operations| dev_pm_ops| dma_map_ops| extent_io_ops| file_lock_operations| file_operations| hv_ops| ide_dma_ops| intel_dvo_dev_ops| item_operations| iwl_ops| kgdb_arch| kgdb_io| kset_uevent_ops| lock_manager_operations| microcode_ops| mtrr_ops| neigh_ops| nlmsvc_binding| pci_raw_ops| pipe_buf_operations| platform_hibernation_ops| platform_suspend_ops| proto_ops| rpc_pipe_ops| seq_operations| snd_ac97_build_ops| soc_pcmcia_socket_ops| stacktrace_ops| sysfs_ops| tty_operations| usb_mon_operations| wd_ops}x; if ($line !~ /\bconst\b/ && $line =~ /\bstruct\s+($struct_ops)\b/) { WARN("CONST_STRUCT", "struct $1 should normally be const\n" . $herecurr); } # use of NR_CPUS is usually wrong # ignore definitions of NR_CPUS and usage to define arrays as likely right if ($line =~ /\bNR_CPUS\b/ && $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ && $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ && $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ && $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ && $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/) { WARN("NR_CPUS", "usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc\n" . $herecurr); } # check for %L{u,d,i} in strings my $string; while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) { $string = substr($rawline, $-[1], $+[1] - $-[1]); $string =~ s/%%/__/g; if ($string =~ /(?mutex.\n" . $herecurr); } } if ($line =~ /debugfs_create_file.*S_IWUGO/ || $line =~ /DEVICE_ATTR.*S_IWUGO/ ) { WARN("EXPORTED_WORLD_WRITABLE", "Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr); } } # If we have no input at all, then there is nothing to report on # so just keep quiet. if ($#rawlines == -1) { exit(0); } # In mailback mode only produce a report in the negative, for # things that appear to be patches. if ($mailback && ($clean == 1 || !$is_patch)) { exit(0); } # This is not a patch, and we are are in 'no-patch' mode so # just keep quiet. if (!$chk_patch && !$is_patch) { exit(0); } if (!$is_patch) { ERROR("NOT_UNIFIED_DIFF", "Does not appear to be a unified-diff format patch\n"); } if ($is_patch && $chk_signoff && $signoff == 0) { ERROR("MISSING_SIGN_OFF", "Missing Signed-off-by: line(s)\n"); } print report_dump(); if ($summary && !($clean == 1 && $quiet == 1)) { print "$filename " if ($summary_file); print "total: $cnt_error errors, $cnt_warn warnings, " . (($check)? "$cnt_chk checks, " : "") . "$cnt_lines lines checked\n"; print "\n" if ($quiet == 0); } if ($quiet == 0) { if ($^V lt 5.10.0) { print("NOTE: perl $^V is not modern enough to detect all possible issues.\n"); print("An upgrade to at least perl v5.10.0 is suggested.\n\n"); } # If there were whitespace errors which cleanpatch can fix # then suggest that. if ($rpt_cleaners) { print "NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or\n"; print " scripts/cleanfile\n\n"; $rpt_cleaners = 0; } } if ($quiet == 0 && keys %ignore_type) { print "NOTE: Ignored message types:"; foreach my $ignore (sort keys %ignore_type) { print " $ignore"; } print "\n\n"; } if ($clean == 1 && $quiet == 0) { print "$vname has no obvious style problems and is ready for submission.\n" } if ($clean == 0 && $quiet == 0) { print << "EOM"; $vname has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. EOM } return $clean; } ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/README ================================================ These files contain information derived from the LPC43xx user manual (UM10503). They are intended to be used by scripts for the generation of header files and functions. Each line describes a field within a register. The comma separated values are: register name (as found in include/lpc43xx/*.h), bit position, length in bits, field name, description/comment (may be empty if not specified in data sheet), reset value (may be empty if not specified in data sheet), access (may be empty if not specified in data sheet) The access field may consist of any of the following codes: r: read only rw: read/write rwc: read/write one to clear rwo: read/write once rws: read/write one to set w: write only ws: write one to set Descriptions containing commas are quoted. ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/adc.csv ================================================ ADC0_CR,0,8,SEL,Selects which of the ADCn_[7:0] inputs are to be sampled and converted,0,rw ADC0_CR,8,8,CLKDIV,The ADC clock is divided by the CLKDIV value plus one to produce the clock for the A/D converter,0,rw ADC0_CR,16,1,BURST,Controls Burst mode,0,rw ADC0_CR,17,3,CLKS,"This field selects the number of clocks used for each conversion in Burst mode and the number of bits of accuracy of the result in the LS bits of ADDR, between 11 clocks (10 bits) and 4 clocks (3 bits).",0,rw ADC0_CR,21,1,PDN,Power mode,0,rw ADC0_CR,24,3,START,Controls the start of an A/D conversion when the BURST bit is 0,0,rw ADC0_CR,27,1,EDGE,Controls rising or falling edge on the selected signal for the start of a conversion,0,rw ADC1_CR,0,8,SEL,Selects which of the ADCn_[7:0] inputs are to be sampled and converted,0,rw ADC1_CR,8,8,CLKDIV,The ADC clock is divided by the CLKDIV value plus one to produce the clock for the A/D converter,0,rw ADC1_CR,16,1,BURST,Controls Burst mode,0,rw ADC1_CR,17,3,CLKS,"This field selects the number of clocks used for each conversion in Burst mode and the number of bits of accuracy of the result in the LS bits of ADDR, between 11 clocks (10 bits) and 4 clocks (3 bits).",0,rw ADC1_CR,21,1,PDN,Power mode,0,rw ADC1_CR,24,3,START,Controls the start of an A/D conversion when the BURST bit is 0,0,rw ADC1_CR,27,1,EDGE,Controls rising or falling edge on the selected signal for the start of a conversion,0,rw ADC0_GDR,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADCn pin selected by the SEL field, divided by the reference voltage on the VDDA pin",0,r ADC0_GDR,24,3,CHN,These bits contain the channel from which the LS bits were converted,0,r ADC0_GDR,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits,0,r ADC0_GDR,31,1,DONE,This bit is set to 1 when an analog-to-digital conversion completes. It is cleared when this register is read and when the AD0/1CR register is written,0,r ADC1_GDR,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADCn pin selected by the SEL field, divided by the reference voltage on the VDDA pin",0,r ADC1_GDR,24,3,CHN,These bits contain the channel from which the LS bits were converted,0,r ADC1_GDR,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits,0,r ADC1_GDR,31,1,DONE,This bit is set to 1 when an analog-to-digital conversion completes. It is cleared when this register is read and when the AD0/1CR register is written,0,r ADC0_INTEN,0,8,ADINTEN,These bits allow control over which A/D channels generate interrupts for conversion completion,0,rw ADC0_INTEN,8,1,ADGINTEN,"When 1, enables the global DONE flag in ADDR to generate an interrupt. When 0, only the individual A/D channels enabled by ADINTEN 7:0 will generate interrupts.",1,rw ADC1_INTEN,0,8,ADINTEN,These bits allow control over which A/D channels generate interrupts for conversion completion,0,rw ADC1_INTEN,8,1,ADGINTEN,"When 1, enables the global DONE flag in ADDR to generate an interrupt. When 0, only the individual A/D channels enabled by ADINTEN 7:0 will generate interrupts.",1,rw ADC0_DR0,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC0 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR0,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR0,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR0,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC0 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR0,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR0,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR1,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC1 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR1,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR1,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR1,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC1 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR1,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR1,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR2,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC2 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR2,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR2,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR2,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC2 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR2,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR2,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR3,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC3 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR3,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR3,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR3,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC3 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR3,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR3,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR4,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC4 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR4,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR4,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR4,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC4 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR4,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR4,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR5,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC5 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR5,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR5,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR5,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC5 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR5,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR5,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR6,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC6 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR6,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR6,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR6,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC6 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR6,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR6,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_DR7,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC7 pin divided by the reference voltage on the VDDA pin",0,r ADC0_DR7,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC0_DR7,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC1_DR7,6,10,V_VREF,"When DONE is 1, this field contains a binary fraction representing the voltage on the ADC7 pin divided by the reference voltage on the VDDA pin",0,r ADC1_DR7,30,1,OVERRUN,This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register.,0,r ADC1_DR7,31,1,DONE,This bit is set to 1 when an A/D conversion completes.,0,r ADC0_STAT,0,8,DONE,These bits mirror the DONE status flags that appear in the result register for each A/D channel.,0,r ADC0_STAT,8,8,OVERRUN,These bits mirror the OVERRRUN status flags that appear in the result register for each A/D channel.,0,r ADC0_STAT,16,1,ADINT,This bit is the A/D interrupt flag. It is one when any of the individual A/D channel Done flags is asserted and enabled to contribute to the A/D interrupt via the ADINTEN register.,0,r ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/adc.yaml ================================================ !!omap - ADC0_CR: fields: !!omap - SEL: access: rw description: Selects which of the ADCn_[7:0] inputs are to be sampled and converted lsb: 0 reset_value: '0' width: 8 - CLKDIV: access: rw description: The ADC clock is divided by the CLKDIV value plus one to produce the clock for the A/D converter lsb: 8 reset_value: '0' width: 8 - BURST: access: rw description: Controls Burst mode lsb: 16 reset_value: '0' width: 1 - CLKS: access: rw description: This field selects the number of clocks used for each conversion in Burst mode and the number of bits of accuracy of the result in the LS bits of ADDR, between 11 clocks (10 bits) and 4 clocks (3 bits). lsb: 17 reset_value: '0' width: 3 - PDN: access: rw description: Power mode lsb: 21 reset_value: '0' width: 1 - START: access: rw description: Controls the start of an A/D conversion when the BURST bit is 0 lsb: 24 reset_value: '0' width: 3 - EDGE: access: rw description: Controls rising or falling edge on the selected signal for the start of a conversion lsb: 27 reset_value: '0' width: 1 - ADC1_CR: fields: !!omap - SEL: access: rw description: Selects which of the ADCn_[7:0] inputs are to be sampled and converted lsb: 0 reset_value: '0' width: 8 - CLKDIV: access: rw description: The ADC clock is divided by the CLKDIV value plus one to produce the clock for the A/D converter lsb: 8 reset_value: '0' width: 8 - BURST: access: rw description: Controls Burst mode lsb: 16 reset_value: '0' width: 1 - CLKS: access: rw description: This field selects the number of clocks used for each conversion in Burst mode and the number of bits of accuracy of the result in the LS bits of ADDR, between 11 clocks (10 bits) and 4 clocks (3 bits). lsb: 17 reset_value: '0' width: 3 - PDN: access: rw description: Power mode lsb: 21 reset_value: '0' width: 1 - START: access: rw description: Controls the start of an A/D conversion when the BURST bit is 0 lsb: 24 reset_value: '0' width: 3 - EDGE: access: rw description: Controls rising or falling edge on the selected signal for the start of a conversion lsb: 27 reset_value: '0' width: 1 - ADC0_GDR: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADCn pin selected by the SEL field, divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - CHN: access: r description: These bits contain the channel from which the LS bits were converted lsb: 24 reset_value: '0' width: 3 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an analog-to-digital conversion completes. It is cleared when this register is read and when the AD0/1CR register is written lsb: 31 reset_value: '0' width: 1 - ADC1_GDR: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADCn pin selected by the SEL field, divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - CHN: access: r description: These bits contain the channel from which the LS bits were converted lsb: 24 reset_value: '0' width: 3 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an analog-to-digital conversion completes. It is cleared when this register is read and when the AD0/1CR register is written lsb: 31 reset_value: '0' width: 1 - ADC0_INTEN: fields: !!omap - ADINTEN: access: rw description: These bits allow control over which A/D channels generate interrupts for conversion completion lsb: 0 reset_value: '0' width: 8 - ADGINTEN: access: rw description: When 1, enables the global DONE flag in ADDR to generate an interrupt. When 0, only the individual A/D channels enabled by ADINTEN 7:0 will generate interrupts. lsb: 8 reset_value: '1' width: 1 - ADC1_INTEN: fields: !!omap - ADINTEN: access: rw description: These bits allow control over which A/D channels generate interrupts for conversion completion lsb: 0 reset_value: '0' width: 8 - ADGINTEN: access: rw description: When 1, enables the global DONE flag in ADDR to generate an interrupt. When 0, only the individual A/D channels enabled by ADINTEN 7:0 will generate interrupts. lsb: 8 reset_value: '1' width: 1 - ADC0_DR0: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC0 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR0: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC0 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR1: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC1 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR1: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC1 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR2: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC2 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR2: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC2 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR3: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC3 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR3: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC3 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR4: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC4 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR4: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC4 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR5: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC5 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR5: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC5 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR6: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC6 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR6: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC6 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_DR7: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC7 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC1_DR7: fields: !!omap - V_VREF: access: r description: When DONE is 1, this field contains a binary fraction representing the voltage on the ADC7 pin divided by the reference voltage on the VDDA pin lsb: 6 reset_value: '0' width: 10 - OVERRUN: access: r description: This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result in the V_VREF bits in this register. lsb: 30 reset_value: '0' width: 1 - DONE: access: r description: This bit is set to 1 when an A/D conversion completes. lsb: 31 reset_value: '0' width: 1 - ADC0_STAT: fields: !!omap - DONE: access: r description: These bits mirror the DONE status flags that appear in the result register for each A/D channel. lsb: 0 reset_value: '0' width: 8 - OVERRUN: access: r description: These bits mirror the OVERRRUN status flags that appear in the result register for each A/D channel. lsb: 8 reset_value: '0' width: 8 - ADINT: access: r description: This bit is the A/D interrupt flag. It is one when any of the individual A/D channel Done flags is asserted and enabled to contribute to the A/D interrupt via the ADINTEN register. lsb: 16 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/atimer.csv ================================================ ATIMER_DOWNCOUNTER,0,16,CVAL,When equal to zero an interrupt is raised,0,rw ATIMER_PRESET,0,16,PRESETVAL,Value loaded in DOWNCOUNTER when DOWNCOUNTER equals zero,0,rw ATIMER_CLR_EN,0,1,CLR_EN,Writing a 1 to this bit clears the interrupt enable bit in the ENABLE register,0,w ATIMER_SET_EN,0,1,SET_EN,Writing a 1 to this bit sets the interrupt enable bit in the ENABLE register,0,w ATIMER_STATUS,0,1,STAT,A 1 in this bit shows that the STATUS interrupt has been raised,0,r ATIMER_ENABLE,0,1,ENA,A 1 in this bit shows that the STATUS interrupt has been enabled and that the STATUS interrupt request signal is asserted when STAT = 1 in the STATUS register,0,r ATIMER_CLR_STAT,0,1,CSTAT,Writing a 1 to this bit clears the STATUS interrupt bit in the STATUS register,0,w ATIMER_SET_STAT,0,1,SSTAT,Writing a 1 to this bit sets the STATUS interrupt bit in the STATUS register,0,w ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/atimer.yaml ================================================ !!omap - ATIMER_DOWNCOUNTER: fields: !!omap - CVAL: access: rw description: When equal to zero an interrupt is raised lsb: 0 reset_value: '0' width: 16 - ATIMER_PRESET: fields: !!omap - PRESETVAL: access: rw description: Value loaded in DOWNCOUNTER when DOWNCOUNTER equals zero lsb: 0 reset_value: '0' width: 16 - ATIMER_CLR_EN: fields: !!omap - CLR_EN: access: w description: Writing a 1 to this bit clears the interrupt enable bit in the ENABLE register lsb: 0 reset_value: '0' width: 1 - ATIMER_SET_EN: fields: !!omap - SET_EN: access: w description: Writing a 1 to this bit sets the interrupt enable bit in the ENABLE register lsb: 0 reset_value: '0' width: 1 - ATIMER_STATUS: fields: !!omap - STAT: access: r description: A 1 in this bit shows that the STATUS interrupt has been raised lsb: 0 reset_value: '0' width: 1 - ATIMER_ENABLE: fields: !!omap - ENA: access: r description: A 1 in this bit shows that the STATUS interrupt has been enabled and that the STATUS interrupt request signal is asserted when STAT = 1 in the STATUS register lsb: 0 reset_value: '0' width: 1 - ATIMER_CLR_STAT: fields: !!omap - CSTAT: access: w description: Writing a 1 to this bit clears the STATUS interrupt bit in the STATUS register lsb: 0 reset_value: '0' width: 1 - ATIMER_SET_STAT: fields: !!omap - SSTAT: access: w description: Writing a 1 to this bit sets the STATUS interrupt bit in the STATUS register lsb: 0 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ccu.csv ================================================ CCU1_PM,0,1,PD,Initiate power-down mode,0,rw CCU1_BASE_STAT,0,1,BASE_APB3_CLK_IND,Base clock indicator for BASE_APB3_CLK,1,r CCU1_BASE_STAT,1,1,BASE_APB1_CLK_IND,Base clock indicator for BASE_APB1_CLK,1,r CCU1_BASE_STAT,2,1,BASE_SPIFI_CLK_IND,Base clock indicator for BASE_SPIFI_CLK,1,r CCU1_BASE_STAT,3,1,BASE_M4_CLK_IND,Base clock indicator for BASE_M4_CLK,1,r CCU1_BASE_STAT,6,1,BASE_PERIPH_CLK_IND,Base clock indicator for BASE_PERIPH_CLK,1,r CCU1_BASE_STAT,7,1,BASE_USB0_CLK_IND,Base clock indicator for BASE_USB0_CLK,1,r CCU1_BASE_STAT,8,1,BASE_USB1_CLK_IND,Base clock indicator for BASE_USB1_CLK,1,r CCU1_BASE_STAT,9,1,BASE_SPI_CLK_IND,Base clock indicator for BASE_SPI_CLK,1,r CCU1_CLK_APB3_BUS_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_BUS_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_BUS_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_BUS_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_BUS_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_BUS_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB3_I2C1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_I2C1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_I2C1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_I2C1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_I2C1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_I2C1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB3_DAC_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_DAC_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_DAC_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_DAC_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_DAC_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_DAC_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB3_ADC0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_ADC0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_ADC0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_ADC0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_ADC0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_ADC0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB3_ADC1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_ADC1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_ADC1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_ADC1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_ADC1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_ADC1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB3_CAN0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB3_CAN0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB3_CAN0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB3_CAN0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB3_CAN0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB3_CAN0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB1_BUS_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB1_BUS_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB1_BUS_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB1_BUS_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB1_BUS_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB1_BUS_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB1_MOTOCONPWM_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB1_MOTOCONPWM_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB1_MOTOCONPWM_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB1_MOTOCONPWM_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB1_MOTOCONPWM_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB1_MOTOCONPWM_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB1_I2C0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB1_I2C0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB1_I2C0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB1_I2C0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB1_I2C0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB1_I2C0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB1_I2S_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB1_I2S_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB1_I2S_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB1_I2S_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB1_I2S_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB1_I2S_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_APB1_CAN1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_APB1_CAN1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_APB1_CAN1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_APB1_CAN1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_APB1_CAN1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_APB1_CAN1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_SPIFI_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_SPIFI_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_SPIFI_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_SPIFI_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_SPIFI_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_SPIFI_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_BUS_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_BUS_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_BUS_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_BUS_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_BUS_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_BUS_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SPIFI_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SPIFI_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SPIFI_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SPIFI_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SPIFI_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SPIFI_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_GPIO_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_GPIO_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_GPIO_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_GPIO_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_GPIO_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_GPIO_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_LCD_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_LCD_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_LCD_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_LCD_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_LCD_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_LCD_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_ETHERNET_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_ETHERNET_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_ETHERNET_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_ETHERNET_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_ETHERNET_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_ETHERNET_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_USB0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_USB0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_USB0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_USB0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_USB0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_USB0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_EMC_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_EMC_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_EMC_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_EMC_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_EMC_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_EMC_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SDIO_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SDIO_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SDIO_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SDIO_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SDIO_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SDIO_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_DMA_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_DMA_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_DMA_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_DMA_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_DMA_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_DMA_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_M4CORE_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_M4CORE_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_M4CORE_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_M4CORE_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_M4CORE_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_M4CORE_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SCT_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SCT_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SCT_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SCT_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SCT_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SCT_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_USB1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_USB1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_USB1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_USB1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_USB1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_USB1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_EMCDIV_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_EMCDIV_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_EMCDIV_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_EMCDIV_CFG,5,3,DIV,Clock divider value,0,rw CCU1_CLK_M4_EMCDIV_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_EMCDIV_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_EMCDIV_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_M0APP_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_M0APP_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_M0APP_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_M0APP_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_M0APP_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_M0APP_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_VADC_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_VADC_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_VADC_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_VADC_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_VADC_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_VADC_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_WWDT_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_WWDT_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_WWDT_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_WWDT_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_WWDT_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_WWDT_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_USART0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_USART0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_USART0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_USART0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_USART0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_USART0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_UART1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_UART1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_UART1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_UART1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_UART1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_UART1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SSP0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SSP0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SSP0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SSP0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SSP0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SSP0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_TIMER0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_TIMER0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_TIMER0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_TIMER0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_TIMER0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_TIMER0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_TIMER1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_TIMER1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_TIMER1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_TIMER1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_TIMER1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_TIMER1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SCU_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SCU_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SCU_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SCU_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SCU_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SCU_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_CREG_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_CREG_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_CREG_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_CREG_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_CREG_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_CREG_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_RITIMER_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_RITIMER_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_RITIMER_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_RITIMER_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_RITIMER_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_RITIMER_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_USART2_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_USART2_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_USART2_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_USART2_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_USART2_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_USART2_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_USART3_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_USART3_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_USART3_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_USART3_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_USART3_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_USART3_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_TIMER2_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_TIMER2_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_TIMER2_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_TIMER2_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_TIMER2_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_TIMER2_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_TIMER3_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_TIMER3_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_TIMER3_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_TIMER3_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_TIMER3_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_TIMER3_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_SSP1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_SSP1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_SSP1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_SSP1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_SSP1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_SSP1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_M4_QEI_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_M4_QEI_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_M4_QEI_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_M4_QEI_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_M4_QEI_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_M4_QEI_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_PERIPH_BUS_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_PERIPH_BUS_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_PERIPH_BUS_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_PERIPH_BUS_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_PERIPH_BUS_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_PERIPH_BUS_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_PERIPH_CORE_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_PERIPH_CORE_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_PERIPH_CORE_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_PERIPH_CORE_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_PERIPH_CORE_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_PERIPH_CORE_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_PERIPH_SGPIO_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_PERIPH_SGPIO_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_PERIPH_SGPIO_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_PERIPH_SGPIO_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_PERIPH_SGPIO_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_PERIPH_SGPIO_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_USB0_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_USB0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_USB0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_USB0_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_USB0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_USB0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_USB1_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_USB1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_USB1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_USB1_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_USB1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_USB1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_SPI_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_SPI_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_SPI_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_SPI_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_SPI_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_SPI_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU1_CLK_VADC_CFG,0,1,RUN,Run enable,1,rw CCU1_CLK_VADC_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU1_CLK_VADC_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU1_CLK_VADC_STAT,0,1,RUN,Run enable status,1,r CCU1_CLK_VADC_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU1_CLK_VADC_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_PM,0,1,PD,Initiate power-down mode,0,rw CCU2_BASE_STAT,1,1,BASE_UART3_CLK_IND,Base clock indicator for BASE_UART3_CLK,1,r CCU2_BASE_STAT,2,1,BASE_UART2_CLK_IND,Base clock indicator for BASE_UART2_CLK,1,r CCU2_BASE_STAT,3,1,BASE_UART1_CLK_IND,Base clock indicator for BASE_UART1_CLK,1,r CCU2_BASE_STAT,4,1,BASE_UART0_CLK_IND,Base clock indicator for BASE_UART0_CLK,1,r CCU2_BASE_STAT,5,1,BASE_SSP1_CLK_IND,Base clock indicator for BASE_SSP1_CLK,1,r CCU2_BASE_STAT,6,1,BASE_SSP0_CLK_IND,Base clock indicator for BASE_SSP0_CLK,1,r CCU2_CLK_APLL_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APLL_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APLL_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APLL_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APLL_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APLL_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB2_USART3_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB2_USART3_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB2_USART3_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB2_USART3_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB2_USART3_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB2_USART3_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB2_USART2_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB2_USART2_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB2_USART2_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB2_USART2_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB2_USART2_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB2_USART2_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB0_UART1_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB0_UART1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB0_UART1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB0_UART1_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB0_UART1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB0_UART1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB0_USART0_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB0_USART0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB0_USART0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB0_USART0_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB0_USART0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB0_USART0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB2_SSP1_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB2_SSP1_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB2_SSP1_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB2_SSP1_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB2_SSP1_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB2_SSP1_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_APB0_SSP0_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_APB0_SSP0_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_APB0_SSP0_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_APB0_SSP0_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_APB0_SSP0_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_APB0_SSP0_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r CCU2_CLK_SDIO_CFG,0,1,RUN,Run enable,1,rw CCU2_CLK_SDIO_CFG,1,1,AUTO,Auto (AHB disable mechanism) enable,0,rw CCU2_CLK_SDIO_CFG,2,1,WAKEUP,Wake-up mechanism enable,0,rw CCU2_CLK_SDIO_STAT,0,1,RUN,Run enable status,1,r CCU2_CLK_SDIO_STAT,1,1,AUTO,Auto (AHB disable mechanism) enable status,0,r CCU2_CLK_SDIO_STAT,2,1,WAKEUP,Wake-up mechanism enable status,0,r ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ccu.yaml ================================================ !!omap - CCU1_PM: fields: !!omap - PD: access: rw description: Initiate power-down mode lsb: 0 reset_value: '0' width: 1 - CCU1_BASE_STAT: fields: !!omap - BASE_APB3_CLK_IND: access: r description: Base clock indicator for BASE_APB3_CLK lsb: 0 reset_value: '1' width: 1 - BASE_APB1_CLK_IND: access: r description: Base clock indicator for BASE_APB1_CLK lsb: 1 reset_value: '1' width: 1 - BASE_SPIFI_CLK_IND: access: r description: Base clock indicator for BASE_SPIFI_CLK lsb: 2 reset_value: '1' width: 1 - BASE_M4_CLK_IND: access: r description: Base clock indicator for BASE_M4_CLK lsb: 3 reset_value: '1' width: 1 - BASE_PERIPH_CLK_IND: access: r description: Base clock indicator for BASE_PERIPH_CLK lsb: 6 reset_value: '1' width: 1 - BASE_USB0_CLK_IND: access: r description: Base clock indicator for BASE_USB0_CLK lsb: 7 reset_value: '1' width: 1 - BASE_USB1_CLK_IND: access: r description: Base clock indicator for BASE_USB1_CLK lsb: 8 reset_value: '1' width: 1 - BASE_SPI_CLK_IND: access: r description: Base clock indicator for BASE_SPI_CLK lsb: 9 reset_value: '1' width: 1 - CCU1_CLK_APB3_BUS_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_BUS_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_I2C1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_I2C1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_DAC_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_DAC_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_ADC0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_ADC0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_ADC1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_ADC1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_CAN0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB3_CAN0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_BUS_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_BUS_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_MOTOCONPWM_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_MOTOCONPWM_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_I2C0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_I2C0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_I2S_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_I2S_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_CAN1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_APB1_CAN1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_SPIFI_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_SPIFI_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_BUS_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_BUS_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SPIFI_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SPIFI_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_GPIO_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_GPIO_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_LCD_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_LCD_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_ETHERNET_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_ETHERNET_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USB0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USB0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_EMC_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_EMC_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SDIO_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SDIO_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_DMA_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_DMA_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_M4CORE_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_M4CORE_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SCT_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SCT_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USB1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USB1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_EMCDIV_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - DIV: access: rw description: Clock divider value lsb: 5 reset_value: '0' width: 3 - CCU1_CLK_M4_EMCDIV_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_M0APP_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_M0APP_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_VADC_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_VADC_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_WWDT_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_WWDT_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_UART1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_UART1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SSP0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SSP0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SCU_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SCU_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_CREG_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_CREG_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_RITIMER_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_RITIMER_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART2_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART2_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART3_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_USART3_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER2_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER2_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER3_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_TIMER3_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SSP1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_SSP1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_QEI_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_M4_QEI_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_BUS_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_BUS_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_CORE_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_CORE_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_SGPIO_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_PERIPH_SGPIO_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_USB0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_USB0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_USB1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_USB1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_SPI_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_SPI_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_VADC_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU1_CLK_VADC_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_PM: fields: !!omap - PD: access: rw description: Initiate power-down mode lsb: 0 reset_value: '0' width: 1 - CCU2_BASE_STAT: fields: !!omap - BASE_UART3_CLK_IND: access: r description: Base clock indicator for BASE_UART3_CLK lsb: 1 reset_value: '1' width: 1 - BASE_UART2_CLK_IND: access: r description: Base clock indicator for BASE_UART2_CLK lsb: 2 reset_value: '1' width: 1 - BASE_UART1_CLK_IND: access: r description: Base clock indicator for BASE_UART1_CLK lsb: 3 reset_value: '1' width: 1 - BASE_UART0_CLK_IND: access: r description: Base clock indicator for BASE_UART0_CLK lsb: 4 reset_value: '1' width: 1 - BASE_SSP1_CLK_IND: access: r description: Base clock indicator for BASE_SSP1_CLK lsb: 5 reset_value: '1' width: 1 - BASE_SSP0_CLK_IND: access: r description: Base clock indicator for BASE_SSP0_CLK lsb: 6 reset_value: '1' width: 1 - CCU2_CLK_APLL_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APLL_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_USART3_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_USART3_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_USART2_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_USART2_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_UART1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_UART1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_USART0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_USART0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_SSP1_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB2_SSP1_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_SSP0_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_APB0_SSP0_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_SDIO_CFG: fields: !!omap - RUN: access: rw description: Run enable lsb: 0 reset_value: '1' width: 1 - AUTO: access: rw description: Auto (AHB disable mechanism) enable lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: rw description: Wake-up mechanism enable lsb: 2 reset_value: '0' width: 1 - CCU2_CLK_SDIO_STAT: fields: !!omap - RUN: access: r description: Run enable status lsb: 0 reset_value: '1' width: 1 - AUTO: access: r description: Auto (AHB disable mechanism) enable status lsb: 1 reset_value: '0' width: 1 - WAKEUP: access: r description: Wake-up mechanism enable status lsb: 2 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/cgu.csv ================================================ CGU_FREQ_MON,0,9,RCNT,9-bit reference clock-counter value,0,rw CGU_FREQ_MON,9,14,FCNT,14-bit selected clock-counter value,0,r CGU_FREQ_MON,23,1,MEAS,Measure frequency,0,rw CGU_FREQ_MON,24,5,CLK_SEL,Clock-source selection for the clock to be measured,0,rw CGU_XTAL_OSC_CTRL,0,1,ENABLE,Oscillator-pad enable,1,rw CGU_XTAL_OSC_CTRL,1,1,BYPASS,Configure crystal operation or external-clock input pin XTAL1,0,rw CGU_XTAL_OSC_CTRL,2,1,HF,Select frequency range,1,rw CGU_PLL0USB_STAT,0,1,LOCK,PLL0 lock indicator,0,r CGU_PLL0USB_STAT,1,1,FR,PLL0 free running indicator,0,r CGU_PLL0USB_CTRL,0,1,PD,PLL0 power down,1,rw CGU_PLL0USB_CTRL,1,1,BYPASS,Input clock bypass control,1,rw CGU_PLL0USB_CTRL,2,1,DIRECTI,PLL0 direct input,0,rw CGU_PLL0USB_CTRL,3,1,DIRECTO,PLL0 direct output,0,rw CGU_PLL0USB_CTRL,4,1,CLKEN,PLL0 clock enable,0,rw CGU_PLL0USB_CTRL,6,1,FRM,Free running mode,0,rw CGU_PLL0USB_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_PLL0USB_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_PLL0USB_MDIV,0,17,MDEC,Decoded M-divider coefficient value,0x5B6A,rw CGU_PLL0USB_MDIV,17,5,SELP,Bandwidth select P value,0x1C,rw CGU_PLL0USB_MDIV,22,6,SELI,Bandwidth select I value,0x17,rw CGU_PLL0USB_MDIV,28,4,SELR,Bandwidth select R value,0x0,rw CGU_PLL0USB_NP_DIV,0,7,PDEC,Decoded P-divider coefficient value,0x02,rw CGU_PLL0USB_NP_DIV,12,10,NDEC,Decoded N-divider coefficient value,0xB1,rw CGU_PLL0AUDIO_STAT,0,1,LOCK,PLL0 lock indicator,0,r CGU_PLL0AUDIO_STAT,1,1,FR,PLL0 free running indicator,0,r CGU_PLL0AUDIO_CTRL,0,1,PD,PLL0 power down,1,rw CGU_PLL0AUDIO_CTRL,1,1,BYPASS,Input clock bypass control,1,rw CGU_PLL0AUDIO_CTRL,2,1,DIRECTI,PLL0 direct input,0,rw CGU_PLL0AUDIO_CTRL,3,1,DIRECTO,PLL0 direct output,0,rw CGU_PLL0AUDIO_CTRL,4,1,CLKEN,PLL0 clock enable,0,rw CGU_PLL0AUDIO_CTRL,6,1,FRM,Free running mode,0,rw CGU_PLL0AUDIO_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_PLL0AUDIO_CTRL,12,1,PLLFRACT_REQ,Fractional PLL word write request,0,rw CGU_PLL0AUDIO_CTRL,13,1,SEL_EXT,Select fractional divider,0,rw CGU_PLL0AUDIO_CTRL,14,1,MOD_PD,Sigma-Delta modulator power-down,1,rw CGU_PLL0AUDIO_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_PLL0AUDIO_MDIV,0,17,MDEC,Decoded M-divider coefficient value,0x5B6A,rw CGU_PLL0AUDIO_NP_DIV,0,7,PDEC,Decoded P-divider coefficient value,0x02,rw CGU_PLL0AUDIO_NP_DIV,12,10,NDEC,Decoded N-divider coefficient value,0xB1,rw CGU_PLL0AUDIO_FRAC,0,22,PLLFRACT_CTRL,PLL fractional divider control word,0x00,rw CGU_PLL1_STAT,0,1,LOCK,PLL1 lock indicator,0,r CGU_PLL1_CTRL,0,1,PD,PLL1 power down,1,rw CGU_PLL1_CTRL,1,1,BYPASS,Input clock bypass control,1,rw CGU_PLL1_CTRL,6,1,FBSEL,PLL feedback select,0,rw CGU_PLL1_CTRL,7,1,DIRECT,PLL direct CCO output,0,rw CGU_PLL1_CTRL,8,2,PSEL,Post-divider division ratio P,0x1,rw CGU_PLL1_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_PLL1_CTRL,12,2,NSEL,Pre-divider division ratio N,0x2,rw CGU_PLL1_CTRL,16,8,MSEL,Feedback-divider division ratio (M),0x18,rw CGU_PLL1_CTRL,24,5,CLK_SEL,Clock-source selection,0x01,rw CGU_IDIVA_CTRL,0,1,PD,Integer divider power down,0,rw CGU_IDIVA_CTRL,2,2,IDIV,Integer divider A divider value (1/(IDIV + 1)),0x0,rw CGU_IDIVA_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_IDIVA_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_IDIVB_CTRL,0,1,PD,Integer divider power down,0,rw CGU_IDIVB_CTRL,2,4,IDIV,Integer divider B divider value (1/(IDIV + 1)),0x0,rw CGU_IDIVB_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_IDIVB_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_IDIVC_CTRL,0,1,PD,Integer divider power down,0,rw CGU_IDIVC_CTRL,2,4,IDIV,Integer divider C divider value (1/(IDIV + 1)),0x0,rw CGU_IDIVC_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_IDIVC_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_IDIVD_CTRL,0,1,PD,Integer divider power down,0,rw CGU_IDIVD_CTRL,2,4,IDIV,Integer divider D divider value (1/(IDIV + 1)),0x0,rw CGU_IDIVD_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_IDIVD_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_IDIVE_CTRL,0,1,PD,Integer divider power down,0,rw CGU_IDIVE_CTRL,2,8,IDIV,Integer divider E divider value (1/(IDIV + 1)),0x00,rw CGU_IDIVE_CTRL,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_IDIVE_CTRL,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SAFE_CLK,0,1,PD,Output stage power down,0,r CGU_BASE_SAFE_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,r CGU_BASE_SAFE_CLK,24,5,CLK_SEL,Clock source selection,0x01,r CGU_BASE_USB0_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_USB0_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_USB0_CLK,24,5,CLK_SEL,Clock source selection,0x07,rw CGU_BASE_PERIPH_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_PERIPH_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_PERIPH_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_USB1_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_USB1_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_USB1_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_M4_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_M4_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_M4_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SPIFI_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_SPIFI_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_SPIFI_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SPI_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_SPI_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_SPI_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_PHY_RX_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_PHY_RX_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_PHY_RX_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_PHY_TX_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_PHY_TX_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_PHY_TX_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_APB1_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_APB1_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_APB1_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_APB3_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_APB3_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_APB3_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_LCD_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_LCD_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_LCD_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_VADC_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_VADC_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_VADC_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SDIO_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_SDIO_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_SDIO_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SSP0_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_SSP0_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_SSP0_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_SSP1_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_SSP1_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_SSP1_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_UART0_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_UART0_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_UART0_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_UART1_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_UART1_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_UART1_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_UART2_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_UART2_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_UART2_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_UART3_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_UART3_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_UART3_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_OUT_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_OUT_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_OUT_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_AUDIO_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_AUDIO_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_AUDIO_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_CGU_OUT0_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_CGU_OUT0_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_CGU_OUT0_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw CGU_BASE_CGU_OUT1_CLK,0,1,PD,Output stage power down,0,rw CGU_BASE_CGU_OUT1_CLK,11,1,AUTOBLOCK,Block clock automatically during frequency change,0,rw CGU_BASE_CGU_OUT1_CLK,24,5,CLK_SEL,Clock source selection,0x01,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/cgu.yaml ================================================ !!omap - CGU_FREQ_MON: fields: !!omap - RCNT: access: rw description: 9-bit reference clock-counter value lsb: 0 reset_value: '0' width: 9 - FCNT: access: r description: 14-bit selected clock-counter value lsb: 9 reset_value: '0' width: 14 - MEAS: access: rw description: Measure frequency lsb: 23 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock-source selection for the clock to be measured lsb: 24 reset_value: '0' width: 5 - CGU_XTAL_OSC_CTRL: fields: !!omap - ENABLE: access: rw description: Oscillator-pad enable lsb: 0 reset_value: '1' width: 1 - BYPASS: access: rw description: Configure crystal operation or external-clock input pin XTAL1 lsb: 1 reset_value: '0' width: 1 - HF: access: rw description: Select frequency range lsb: 2 reset_value: '1' width: 1 - CGU_PLL0USB_STAT: fields: !!omap - LOCK: access: r description: PLL0 lock indicator lsb: 0 reset_value: '0' width: 1 - FR: access: r description: PLL0 free running indicator lsb: 1 reset_value: '0' width: 1 - CGU_PLL0USB_CTRL: fields: !!omap - PD: access: rw description: PLL0 power down lsb: 0 reset_value: '1' width: 1 - BYPASS: access: rw description: Input clock bypass control lsb: 1 reset_value: '1' width: 1 - DIRECTI: access: rw description: PLL0 direct input lsb: 2 reset_value: '0' width: 1 - DIRECTO: access: rw description: PLL0 direct output lsb: 3 reset_value: '0' width: 1 - CLKEN: access: rw description: PLL0 clock enable lsb: 4 reset_value: '0' width: 1 - FRM: access: rw description: Free running mode lsb: 6 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_PLL0USB_MDIV: fields: !!omap - MDEC: access: rw description: Decoded M-divider coefficient value lsb: 0 reset_value: '0x5B6A' width: 17 - SELP: access: rw description: Bandwidth select P value lsb: 17 reset_value: '0x1C' width: 5 - SELI: access: rw description: Bandwidth select I value lsb: 22 reset_value: '0x17' width: 6 - SELR: access: rw description: Bandwidth select R value lsb: 28 reset_value: '0x0' width: 4 - CGU_PLL0USB_NP_DIV: fields: !!omap - PDEC: access: rw description: Decoded P-divider coefficient value lsb: 0 reset_value: '0x02' width: 7 - NDEC: access: rw description: Decoded N-divider coefficient value lsb: 12 reset_value: '0xB1' width: 10 - CGU_PLL0AUDIO_STAT: fields: !!omap - LOCK: access: r description: PLL0 lock indicator lsb: 0 reset_value: '0' width: 1 - FR: access: r description: PLL0 free running indicator lsb: 1 reset_value: '0' width: 1 - CGU_PLL0AUDIO_CTRL: fields: !!omap - PD: access: rw description: PLL0 power down lsb: 0 reset_value: '1' width: 1 - BYPASS: access: rw description: Input clock bypass control lsb: 1 reset_value: '1' width: 1 - DIRECTI: access: rw description: PLL0 direct input lsb: 2 reset_value: '0' width: 1 - DIRECTO: access: rw description: PLL0 direct output lsb: 3 reset_value: '0' width: 1 - CLKEN: access: rw description: PLL0 clock enable lsb: 4 reset_value: '0' width: 1 - FRM: access: rw description: Free running mode lsb: 6 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - PLLFRACT_REQ: access: rw description: Fractional PLL word write request lsb: 12 reset_value: '0' width: 1 - SEL_EXT: access: rw description: Select fractional divider lsb: 13 reset_value: '0' width: 1 - MOD_PD: access: rw description: Sigma-Delta modulator power-down lsb: 14 reset_value: '1' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_PLL0AUDIO_MDIV: fields: !!omap - MDEC: access: rw description: Decoded M-divider coefficient value lsb: 0 reset_value: '0x5B6A' width: 17 - CGU_PLL0AUDIO_NP_DIV: fields: !!omap - PDEC: access: rw description: Decoded P-divider coefficient value lsb: 0 reset_value: '0x02' width: 7 - NDEC: access: rw description: Decoded N-divider coefficient value lsb: 12 reset_value: '0xB1' width: 10 - CGU_PLL0AUDIO_FRAC: fields: !!omap - PLLFRACT_CTRL: access: rw description: PLL fractional divider control word lsb: 0 reset_value: '0x00' width: 22 - CGU_PLL1_STAT: fields: !!omap - LOCK: access: r description: PLL1 lock indicator lsb: 0 reset_value: '0' width: 1 - CGU_PLL1_CTRL: fields: !!omap - PD: access: rw description: PLL1 power down lsb: 0 reset_value: '1' width: 1 - BYPASS: access: rw description: Input clock bypass control lsb: 1 reset_value: '1' width: 1 - FBSEL: access: rw description: PLL feedback select lsb: 6 reset_value: '0' width: 1 - DIRECT: access: rw description: PLL direct CCO output lsb: 7 reset_value: '0' width: 1 - PSEL: access: rw description: Post-divider division ratio P lsb: 8 reset_value: '0x1' width: 2 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - NSEL: access: rw description: Pre-divider division ratio N lsb: 12 reset_value: '0x2' width: 2 - MSEL: access: rw description: Feedback-divider division ratio (M) lsb: 16 reset_value: '0x18' width: 8 - CLK_SEL: access: rw description: Clock-source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_IDIVA_CTRL: fields: !!omap - PD: access: rw description: Integer divider power down lsb: 0 reset_value: '0' width: 1 - IDIV: access: rw description: Integer divider A divider value (1/(IDIV + 1)) lsb: 2 reset_value: '0x0' width: 2 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_IDIVB_CTRL: fields: !!omap - PD: access: rw description: Integer divider power down lsb: 0 reset_value: '0' width: 1 - IDIV: access: rw description: Integer divider B divider value (1/(IDIV + 1)) lsb: 2 reset_value: '0x0' width: 4 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_IDIVC_CTRL: fields: !!omap - PD: access: rw description: Integer divider power down lsb: 0 reset_value: '0' width: 1 - IDIV: access: rw description: Integer divider C divider value (1/(IDIV + 1)) lsb: 2 reset_value: '0x0' width: 4 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_IDIVD_CTRL: fields: !!omap - PD: access: rw description: Integer divider power down lsb: 0 reset_value: '0' width: 1 - IDIV: access: rw description: Integer divider D divider value (1/(IDIV + 1)) lsb: 2 reset_value: '0x0' width: 4 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_IDIVE_CTRL: fields: !!omap - PD: access: rw description: Integer divider power down lsb: 0 reset_value: '0' width: 1 - IDIV: access: rw description: Integer divider E divider value (1/(IDIV + 1)) lsb: 2 reset_value: '0x00' width: 8 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SAFE_CLK: fields: !!omap - PD: access: r description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: r description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: r description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_USB0_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x07' width: 5 - CGU_BASE_PERIPH_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_USB1_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_M4_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SPIFI_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SPI_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_PHY_RX_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_PHY_TX_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_APB1_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_APB3_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_LCD_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_VADC_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SDIO_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SSP0_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_SSP1_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_UART0_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_UART1_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_UART2_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_UART3_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_OUT_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_AUDIO_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_CGU_OUT0_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 - CGU_BASE_CGU_OUT1_CLK: fields: !!omap - PD: access: rw description: Output stage power down lsb: 0 reset_value: '0' width: 1 - AUTOBLOCK: access: rw description: Block clock automatically during frequency change lsb: 11 reset_value: '0' width: 1 - CLK_SEL: access: rw description: Clock source selection lsb: 24 reset_value: '0x01' width: 5 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/creg.csv ================================================ CREG_CREG0,0,1,EN1KHZ,Enable 1 kHz output,0,rw CREG_CREG0,1,1,EN32KHZ,Enable 32 kHz output,0,rw CREG_CREG0,2,1,RESET32KHZ,32 kHz oscillator reset,1,rw CREG_CREG0,3,1,PD32KHZ,32 kHz power control,1,rw CREG_CREG0,5,1,USB0PHY,USB0 PHY power control,1,rw CREG_CREG0,6,2,ALARMCTRL,RTC_ALARM pin output control,0,rw CREG_CREG0,8,2,BODLVL1,BOD trip level to generate an interrupt,0x3,rw CREG_CREG0,10,2,BODLVL2,BOD trip level to generate a reset,0x3,rw CREG_CREG0,12,2,SAMPLECTRL,SAMPLE pin input/output control,0,rw CREG_CREG0,14,2,WAKEUP0CTRL,WAKEUP0 pin input/output control,0,rw CREG_CREG0,16,2,WAKEUP1CTRL,WAKEUP1 pin input/output control,0,rw CREG_M4MEMMAP,12,20,M4MAP,Shadow address when accessing memory at address 0x00000000,0x10400000,rw CREG_CREG5,6,1,M4TAPSEL,JTAG debug select for M4 core,1,rw CREG_CREG5,9,1,M0APPTAPSEL,JTAG debug select for M0 co-processor,1,rw CREG_DMAMUX,0,2,DMAMUXPER0,Select DMA to peripheral connection for DMA peripheral 0,0,rw CREG_DMAMUX,2,2,DMAMUXPER1,Select DMA to peripheral connection for DMA peripheral 1,0,rw CREG_DMAMUX,4,2,DMAMUXPER2,Select DMA to peripheral connection for DMA peripheral 2,0,rw CREG_DMAMUX,6,2,DMAMUXPER3,Select DMA to peripheral connection for DMA peripheral 3,0,rw CREG_DMAMUX,8,2,DMAMUXPER4,Select DMA to peripheral connection for DMA peripheral 4,0,rw CREG_DMAMUX,10,2,DMAMUXPER5,Select DMA to peripheral connection for DMA peripheral 5,0,rw CREG_DMAMUX,12,2,DMAMUXPER6,Select DMA to peripheral connection for DMA peripheral 6,0,rw CREG_DMAMUX,14,2,DMAMUXPER7,Select DMA to peripheral connection for DMA peripheral 7,0,rw CREG_DMAMUX,16,2,DMAMUXPER8,Select DMA to peripheral connection for DMA peripheral 8,0,rw CREG_DMAMUX,18,2,DMAMUXPER9,Select DMA to peripheral connection for DMA peripheral 9,0,rw CREG_DMAMUX,20,2,DMAMUXPER10,Select DMA to peripheral connection for DMA peripheral 10,0,rw CREG_DMAMUX,22,2,DMAMUXPER11,Select DMA to peripheral connection for DMA peripheral 11,0,rw CREG_DMAMUX,24,2,DMAMUXPER12,Select DMA to peripheral connection for DMA peripheral 12,0,rw CREG_DMAMUX,26,2,DMAMUXPER13,Select DMA to peripheral connection for DMA peripheral 13,0,rw CREG_DMAMUX,28,2,DMAMUXPER14,Select DMA to peripheral connection for DMA peripheral 14,0,rw CREG_DMAMUX,30,2,DMAMUXPER15,Select DMA to peripheral connection for DMA peripheral 15,0,rw CREG_FLASHCFGA,12,4,FLASHTIM,Flash access time. The value of this field plus 1 gives the number of BASE_M4_CLK clocks used for a flash access,,rw CREG_FLASHCFGA,31,1,POW,Flash bank A power control,1,rw CREG_FLASHCFGB,12,4,FLASHTIM,Flash access time. The value of this field plus 1 gives the number of BASE_M4_CLK clocks used for a flash access,,rw CREG_FLASHCFGB,31,1,POW,Flash bank B power control,1,rw CREG_ETBCFG,0,1,ETB,Select SRAM interface,1,rw CREG_CREG6,0,3,ETHMODE,Selects the Ethernet mode. Reset the ethernet after changing the PHY interface,,rw CREG_CREG6,4,1,CTOUTCTRL,Selects the functionality of the SCT outputs,0,rw CREG_CREG6,12,1,I2S0_TX_SCK_IN_SEL,I2S0_TX_SCK input select,0,rw CREG_CREG6,13,1,I2S0_RX_SCK_IN_SEL,I2S0_RX_SCK input select,0,rw CREG_CREG6,14,1,I2S1_TX_SCK_IN_SEL,I2S1_TX_SCK input select,0,rw CREG_CREG6,15,1,I2S1_RX_SCK_IN_SEL,I2S1_RX_SCK input select,0,rw CREG_CREG6,16,1,EMC_CLK_SEL,EMC_CLK divided clock select,0,rw CREG_M4TXEVENT,0,1,TXEVCLR,Cortex-M4 TXEV event,0,rw CREG_M0TXEVENT,0,1,TXEVCLR,Cortex-M0 TXEV event,0,rw CREG_M0APPMEMMAP,12,20,M0APPMAP,Shadow address when accessing memory at address 0x00000000,0x20000000,rw CREG_USB0FLADJ,0,6,FLTV,Frame length timing value,0x20,rw CREG_USB1FLADJ,0,6,FLTV,Frame length timing value,0x20,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/creg.yaml ================================================ !!omap - CREG_CREG0: fields: !!omap - EN1KHZ: access: rw description: Enable 1 kHz output lsb: 0 reset_value: '0' width: 1 - EN32KHZ: access: rw description: Enable 32 kHz output lsb: 1 reset_value: '0' width: 1 - RESET32KHZ: access: rw description: 32 kHz oscillator reset lsb: 2 reset_value: '1' width: 1 - PD32KHZ: access: rw description: 32 kHz power control lsb: 3 reset_value: '1' width: 1 - USB0PHY: access: rw description: USB0 PHY power control lsb: 5 reset_value: '1' width: 1 - ALARMCTRL: access: rw description: RTC_ALARM pin output control lsb: 6 reset_value: '0' width: 2 - BODLVL1: access: rw description: BOD trip level to generate an interrupt lsb: 8 reset_value: '0x3' width: 2 - BODLVL2: access: rw description: BOD trip level to generate a reset lsb: 10 reset_value: '0x3' width: 2 - SAMPLECTRL: access: rw description: SAMPLE pin input/output control lsb: 12 reset_value: '0' width: 2 - WAKEUP0CTRL: access: rw description: WAKEUP0 pin input/output control lsb: 14 reset_value: '0' width: 2 - WAKEUP1CTRL: access: rw description: WAKEUP1 pin input/output control lsb: 16 reset_value: '0' width: 2 - CREG_M4MEMMAP: fields: !!omap - M4MAP: access: rw description: Shadow address when accessing memory at address 0x00000000 lsb: 12 reset_value: '0x10400000' width: 20 - CREG_CREG5: fields: !!omap - M4TAPSEL: access: rw description: JTAG debug select for M4 core lsb: 6 reset_value: '1' width: 1 - M0APPTAPSEL: access: rw description: JTAG debug select for M0 co-processor lsb: 9 reset_value: '1' width: 1 - CREG_DMAMUX: fields: !!omap - DMAMUXPER0: access: rw description: Select DMA to peripheral connection for DMA peripheral 0 lsb: 0 reset_value: '0' width: 2 - DMAMUXPER1: access: rw description: Select DMA to peripheral connection for DMA peripheral 1 lsb: 2 reset_value: '0' width: 2 - DMAMUXPER2: access: rw description: Select DMA to peripheral connection for DMA peripheral 2 lsb: 4 reset_value: '0' width: 2 - DMAMUXPER3: access: rw description: Select DMA to peripheral connection for DMA peripheral 3 lsb: 6 reset_value: '0' width: 2 - DMAMUXPER4: access: rw description: Select DMA to peripheral connection for DMA peripheral 4 lsb: 8 reset_value: '0' width: 2 - DMAMUXPER5: access: rw description: Select DMA to peripheral connection for DMA peripheral 5 lsb: 10 reset_value: '0' width: 2 - DMAMUXPER6: access: rw description: Select DMA to peripheral connection for DMA peripheral 6 lsb: 12 reset_value: '0' width: 2 - DMAMUXPER7: access: rw description: Select DMA to peripheral connection for DMA peripheral 7 lsb: 14 reset_value: '0' width: 2 - DMAMUXPER8: access: rw description: Select DMA to peripheral connection for DMA peripheral 8 lsb: 16 reset_value: '0' width: 2 - DMAMUXPER9: access: rw description: Select DMA to peripheral connection for DMA peripheral 9 lsb: 18 reset_value: '0' width: 2 - DMAMUXPER10: access: rw description: Select DMA to peripheral connection for DMA peripheral 10 lsb: 20 reset_value: '0' width: 2 - DMAMUXPER11: access: rw description: Select DMA to peripheral connection for DMA peripheral 11 lsb: 22 reset_value: '0' width: 2 - DMAMUXPER12: access: rw description: Select DMA to peripheral connection for DMA peripheral 12 lsb: 24 reset_value: '0' width: 2 - DMAMUXPER13: access: rw description: Select DMA to peripheral connection for DMA peripheral 13 lsb: 26 reset_value: '0' width: 2 - DMAMUXPER14: access: rw description: Select DMA to peripheral connection for DMA peripheral 14 lsb: 28 reset_value: '0' width: 2 - DMAMUXPER15: access: rw description: Select DMA to peripheral connection for DMA peripheral 15 lsb: 30 reset_value: '0' width: 2 - CREG_FLASHCFGA: fields: !!omap - FLASHTIM: access: rw description: Flash access time. The value of this field plus 1 gives the number of BASE_M4_CLK clocks used for a flash access lsb: 12 reset_value: '' width: 4 - POW: access: rw description: Flash bank A power control lsb: 31 reset_value: '1' width: 1 - CREG_FLASHCFGB: fields: !!omap - FLASHTIM: access: rw description: Flash access time. The value of this field plus 1 gives the number of BASE_M4_CLK clocks used for a flash access lsb: 12 reset_value: '' width: 4 - POW: access: rw description: Flash bank B power control lsb: 31 reset_value: '1' width: 1 - CREG_ETBCFG: fields: !!omap - ETB: access: rw description: Select SRAM interface lsb: 0 reset_value: '1' width: 1 - CREG_CREG6: fields: !!omap - ETHMODE: access: rw description: Selects the Ethernet mode. Reset the ethernet after changing the PHY interface lsb: 0 reset_value: '' width: 3 - CTOUTCTRL: access: rw description: Selects the functionality of the SCT outputs lsb: 4 reset_value: '0' width: 1 - I2S0_TX_SCK_IN_SEL: access: rw description: I2S0_TX_SCK input select lsb: 12 reset_value: '0' width: 1 - I2S0_RX_SCK_IN_SEL: access: rw description: I2S0_RX_SCK input select lsb: 13 reset_value: '0' width: 1 - I2S1_TX_SCK_IN_SEL: access: rw description: I2S1_TX_SCK input select lsb: 14 reset_value: '0' width: 1 - I2S1_RX_SCK_IN_SEL: access: rw description: I2S1_RX_SCK input select lsb: 15 reset_value: '0' width: 1 - EMC_CLK_SEL: access: rw description: EMC_CLK divided clock select lsb: 16 reset_value: '0' width: 1 - CREG_M4TXEVENT: fields: !!omap - TXEVCLR: access: rw description: Cortex-M4 TXEV event lsb: 0 reset_value: '0' width: 1 - CREG_M0TXEVENT: fields: !!omap - TXEVCLR: access: rw description: Cortex-M0 TXEV event lsb: 0 reset_value: '0' width: 1 - CREG_M0APPMEMMAP: fields: !!omap - M0APPMAP: access: rw description: Shadow address when accessing memory at address 0x00000000 lsb: 12 reset_value: '0x20000000' width: 20 - CREG_USB0FLADJ: fields: !!omap - FLTV: access: rw description: Frame length timing value lsb: 0 reset_value: '0x20' width: 6 - CREG_USB1FLADJ: fields: !!omap - FLTV: access: rw description: Frame length timing value lsb: 0 reset_value: '0x20' width: 6 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/csv2yaml.py ================================================ #!/usr/bin/env python import sys import yaml import csv from collections import OrderedDict import yaml_odict def convert_file(fname): reader = csv.reader(open(fname, 'r')) registers = OrderedDict() for register_name, lsb, width, field_name, description, reset_value, access in reader: if register_name not in registers: registers[register_name] = { 'fields': OrderedDict(), } register = registers[register_name] fields = register['fields'] if field_name in fields: raise RuntimeError('Duplicate field name "%s" in register "%s"' % field_name, register_name) else: fields[field_name] = { 'lsb': int(lsb), 'width': int(width), 'description': description, 'reset_value': reset_value, 'access': access, } with open(fname.replace('.csv', '.yaml'), 'w') as out_file: yaml.dump(registers, out_file, default_flow_style=False) for fname in sys.argv[1:]: convert_file(fname) ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/eventrouter.csv ================================================ EVENTROUTER_HILO,0,1,WAKEUP0_L,Level detect mode for WAKEUP0 event,0,rw EVENTROUTER_HILO,1,1,WAKEUP1_L,Level detect mode for WAKEUP1 event,0,rw EVENTROUTER_HILO,2,1,WAKEUP2_L,Level detect mode for WAKEUP2 event,0,rw EVENTROUTER_HILO,3,1,WAKEUP3_L,Level detect mode for WAKEUP3 event,0,rw EVENTROUTER_HILO,4,1,ATIMER_L,Level detect mode for alarm timer event,0,rw EVENTROUTER_HILO,5,1,RTC_L,Level detect mode for RTC event,0,rw EVENTROUTER_HILO,6,1,BOD_L,Level detect mode for BOD event,0,rw EVENTROUTER_HILO,7,1,WWDT_L,Level detect mode for WWDT event,0,rw EVENTROUTER_HILO,8,1,ETH_L,Level detect mode for Ethernet event,0,rw EVENTROUTER_HILO,9,1,USB0_L,Level detect mode for USB0 event,0,rw EVENTROUTER_HILO,10,1,USB1_L,Level detect mode for USB1 event,0,rw EVENTROUTER_HILO,11,1,SDMMC_L,Level detect mode for SD/MMC event,0,rw EVENTROUTER_HILO,12,1,CAN_L,Level detect mode for C_CAN event,0,rw EVENTROUTER_HILO,13,1,TIM2_L,Level detect mode for combined timer output 2 event,0,rw EVENTROUTER_HILO,14,1,TIM6_L,Level detect mode for combined timer output 6 event,0,rw EVENTROUTER_HILO,15,1,QEI_L,Level detect mode for QEI event,0,rw EVENTROUTER_HILO,16,1,TIM14_L,Level detect mode for combined timer output 14 event,0,rw EVENTROUTER_HILO,19,1,RESET_L,Level detect mode for Reset,0,rw EVENTROUTER_EDGE,0,1,WAKEUP0_E,Edge/Level detect mode for WAKEUP0 event,0,rw EVENTROUTER_EDGE,1,1,WAKEUP1_E,Edge/Level detect mode for WAKEUP1 event,0,rw EVENTROUTER_EDGE,2,1,WAKEUP2_E,Edge/Level detect mode for WAKEUP2 event,0,rw EVENTROUTER_EDGE,3,1,WAKEUP3_E,Edge/Level detect mode for WAKEUP3 event,0,rw EVENTROUTER_EDGE,4,1,ATIMER_E,Edge/Level detect mode for alarm timer event,0,rw EVENTROUTER_EDGE,5,1,RTC_E,Edge/Level detect mode for RTC event,0,rw EVENTROUTER_EDGE,6,1,BOD_E,Edge/Level detect mode for BOD event,0,rw EVENTROUTER_EDGE,7,1,WWDT_E,Edge/Level detect mode for WWDT event,0,rw EVENTROUTER_EDGE,8,1,ETH_E,Edge/Level detect mode for Ethernet event,0,rw EVENTROUTER_EDGE,9,1,USB0_E,Edge/Level detect mode for USB0 event,0,rw EVENTROUTER_EDGE,10,1,USB1_E,Edge/Level detect mode for USB1 event,0,rw EVENTROUTER_EDGE,11,1,SDMMC_E,Edge/Level detect mode for SD/MMC event,0,rw EVENTROUTER_EDGE,12,1,CAN_E,Edge/Level detect mode for C_CAN event,0,rw EVENTROUTER_EDGE,13,1,TIM2_E,Edge/Level detect mode for combined timer output 2 event,0,rw EVENTROUTER_EDGE,14,1,TIM6_E,Edge/Level detect mode for combined timer output 6 event,0,rw EVENTROUTER_EDGE,15,1,QEI_E,Edge/Level detect mode for QEI event,0,rw EVENTROUTER_EDGE,16,1,TIM14_E,Edge/Level detect mode for combined timer output 14 event,0,rw EVENTROUTER_EDGE,19,1,RESET_E,Edge/Level detect mode for Reset,0,rw EVENTROUTER_CLR_EN,0,1,WAKEUP0_CLREN,Writing a 1 to this bit clears the event enable bit 0 in the ENABLE register,0,w EVENTROUTER_CLR_EN,1,1,WAKEUP1_CLREN,Writing a 1 to this bit clears the event enable bit 1 in the ENABLE register,0,w EVENTROUTER_CLR_EN,2,1,WAKEUP2_CLREN,Writing a 1 to this bit clears the event enable bit 2 in the ENABLE register,0,w EVENTROUTER_CLR_EN,3,1,WAKEUP3_CLREN,Writing a 1 to this bit clears the event enable bit 3 in the ENABLE register,0,w EVENTROUTER_CLR_EN,4,1,ATIMER_CLREN,Writing a 1 to this bit clears the event enable bit 4 in the ENABLE register,0,w EVENTROUTER_CLR_EN,5,1,RTC_CLREN,Writing a 1 to this bit clears the event enable bit 5 in the ENABLE register,0,w EVENTROUTER_CLR_EN,6,1,BOD_CLREN,Writing a 1 to this bit clears the event enable bit 6 in the ENABLE register,0,w EVENTROUTER_CLR_EN,7,1,WWDT_CLREN,Writing a 1 to this bit clears the event enable bit 7 in the ENABLE register,0,w EVENTROUTER_CLR_EN,8,1,ETH_CLREN,Writing a 1 to this bit clears the event enable bit 8 in the ENABLE register,0,w EVENTROUTER_CLR_EN,9,1,USB0_CLREN,Writing a 1 to this bit clears the event enable bit 9 in the ENABLE register,0,w EVENTROUTER_CLR_EN,10,1,USB1_CLREN,Writing a 1 to this bit clears the event enable bit 10 in the ENABLE register,0,w EVENTROUTER_CLR_EN,11,1,SDMCC_CLREN,Writing a 1 to this bit clears the event enable bit 11 in the ENABLE register,0,w EVENTROUTER_CLR_EN,12,1,CAN_CLREN,Writing a 1 to this bit clears the event enable bit 12 in the ENABLE register,0,w EVENTROUTER_CLR_EN,13,1,TIM2_CLREN,Writing a 1 to this bit clears the event enable bit 13 in the ENABLE register,0,w EVENTROUTER_CLR_EN,14,1,TIM6_CLREN,Writing a 1 to this bit clears the event enable bit 14 in the ENABLE register,0,w EVENTROUTER_CLR_EN,15,1,QEI_CLREN,Writing a 1 to this bit clears the event enable bit 15 in the ENABLE register,0,w EVENTROUTER_CLR_EN,16,1,TIM14_CLREN,Writing a 1 to this bit clears the event enable bit 16 in the ENABLE register,0,w EVENTROUTER_CLR_EN,19,1,RESET_CLREN,Writing a 1 to this bit clears the event enable bit 19 in the ENABLE register,0,w EVENTROUTER_SET_EN,0,1,WAKEUP0_SETEN,Writing a 1 to this bit sets the event enable bit 0 in the ENABLE register,0,w EVENTROUTER_SET_EN,1,1,WAKEUP1_SETEN,Writing a 1 to this bit sets the event enable bit 1 in the ENABLE register,0,w EVENTROUTER_SET_EN,2,1,WAKEUP2_SETEN,Writing a 1 to this bit sets the event enable bit 2 in the ENABLE register,0,w EVENTROUTER_SET_EN,3,1,WAKEUP3_SETEN,Writing a 1 to this bit sets the event enable bit 3 in the ENABLE register,0,w EVENTROUTER_SET_EN,4,1,ATIMER_SETEN,Writing a 1 to this bit sets the event enable bit 4 in the ENABLE register,0,w EVENTROUTER_SET_EN,5,1,RTC_SETEN,Writing a 1 to this bit sets the event enable bit 5 in the ENABLE register,0,w EVENTROUTER_SET_EN,6,1,BOD_SETEN,Writing a 1 to this bit sets the event enable bit 6 in the ENABLE register,0,w EVENTROUTER_SET_EN,7,1,WWDT_SETEN,Writing a 1 to this bit sets the event enable bit 7 in the ENABLE register,0,w EVENTROUTER_SET_EN,8,1,ETH_SETEN,Writing a 1 to this bit sets the event enable bit 8 in the ENABLE register,0,w EVENTROUTER_SET_EN,9,1,USB0_SETEN,Writing a 1 to this bit sets the event enable bit 9 in the ENABLE register,0,w EVENTROUTER_SET_EN,10,1,USB1_SETEN,Writing a 1 to this bit sets the event enable bit 10 in the ENABLE register,0,w EVENTROUTER_SET_EN,11,1,SDMCC_SETEN,Writing a 1 to this bit sets the event enable bit 11 in the ENABLE register,0,w EVENTROUTER_SET_EN,12,1,CAN_SETEN,Writing a 1 to this bit sets the event enable bit 12 in the ENABLE register,0,w EVENTROUTER_SET_EN,13,1,TIM2_SETEN,Writing a 1 to this bit sets the event enable bit 13 in the ENABLE register,0,w EVENTROUTER_SET_EN,14,1,TIM6_SETEN,Writing a 1 to this bit sets the event enable bit 14 in the ENABLE register,0,w EVENTROUTER_SET_EN,15,1,QEI_SETEN,Writing a 1 to this bit sets the event enable bit 15 in the ENABLE register,0,w EVENTROUTER_SET_EN,16,1,TIM14_SETEN,Writing a 1 to this bit sets the event enable bit 16 in the ENABLE register,0,w EVENTROUTER_SET_EN,19,1,RESET_SETEN,Writing a 1 to this bit sets the event enable bit 19 in the ENABLE register,0,w EVENTROUTER_STATUS,0,1,WAKEUP0_ST,A 1 in this bit shows that the WAKEUP0 event has been raised,1,r EVENTROUTER_STATUS,1,1,WAKEUP1_ST,A 1 in this bit shows that the WAKEUP1 event has been raised,1,r EVENTROUTER_STATUS,2,1,WAKEUP2_ST,A 1 in this bit shows that the WAKEUP2 event has been raised,1,r EVENTROUTER_STATUS,3,1,WAKEUP3_ST,A 1 in this bit shows that the WAKEUP3 event has been raised,1,r EVENTROUTER_STATUS,4,1,ATIMER_ST,A 1 in this bit shows that the ATIMER event has been raised,1,r EVENTROUTER_STATUS,5,1,RTC_ST,A 1 in this bit shows that the RTC event has been raised,1,r EVENTROUTER_STATUS,6,1,BOD_ST,A 1 in this bit shows that the BOD event has been raised,1,r EVENTROUTER_STATUS,7,1,WWDT_ST,A 1 in this bit shows that the WWDT event has been raised,1,r EVENTROUTER_STATUS,8,1,ETH_ST,A 1 in this bit shows that the ETH event has been raised,1,r EVENTROUTER_STATUS,9,1,USB0_ST,A 1 in this bit shows that the USB0 event has been raised,1,r EVENTROUTER_STATUS,10,1,USB1_ST,A 1 in this bit shows that the USB1 event has been raised,1,r EVENTROUTER_STATUS,11,1,SDMMC_ST,A 1 in this bit shows that the SDMMC event has been raised,1,r EVENTROUTER_STATUS,12,1,CAN_ST,A 1 in this bit shows that the CAN event has been raised,1,r EVENTROUTER_STATUS,13,1,TIM2_ST,A 1 in this bit shows that the combined timer 2 output event has been raised,1,r EVENTROUTER_STATUS,14,1,TIM6_ST,A 1 in this bit shows that the combined timer 6 output event has been raised,1,r EVENTROUTER_STATUS,15,1,QEI_ST,A 1 in this bit shows that the QEI event has been raised,1,r EVENTROUTER_STATUS,16,1,TIM14_ST,A 1 in this bit shows that the combined timer 14 output event has been raised,1,r EVENTROUTER_STATUS,19,1,RESET_ST,A 1 in this bit shows that the reset event has been raised,1,r EVENTROUTER_ENABLE,0,1,WAKEUP0_EN,A 1 in this bit shows that the WAKEUP0 event has been enabled,0,r EVENTROUTER_ENABLE,1,1,WAKEUP1_EN,A 1 in this bit shows that the WAKEUP1 event has been enabled,0,r EVENTROUTER_ENABLE,2,1,WAKEUP2_EN,A 1 in this bit shows that the WAKEUP2 event has been enabled,0,r EVENTROUTER_ENABLE,3,1,WAKEUP3_EN,A 1 in this bit shows that the WAKEUP3 event has been enabled,0,r EVENTROUTER_ENABLE,4,1,ATIMER_EN,A 1 in this bit shows that the ATIMER event has been enabled,0,r EVENTROUTER_ENABLE,5,1,RTC_EN,A 1 in this bit shows that the RTC event has been enabled,0,r EVENTROUTER_ENABLE,6,1,BOD_EN,A 1 in this bit shows that the BOD event has been enabled,0,r EVENTROUTER_ENABLE,7,1,WWDT_EN,A 1 in this bit shows that the WWDT event has been enabled,0,r EVENTROUTER_ENABLE,8,1,ETH_EN,A 1 in this bit shows that the ETH event has been enabled,0,r EVENTROUTER_ENABLE,9,1,USB0_EN,A 1 in this bit shows that the USB0 event has been enabled,0,r EVENTROUTER_ENABLE,10,1,USB1_EN,A 1 in this bit shows that the USB1 event has been enabled,0,r EVENTROUTER_ENABLE,11,1,SDMMC_EN,A 1 in this bit shows that the SDMMC event has been enabled,0,r EVENTROUTER_ENABLE,12,1,CAN_EN,A 1 in this bit shows that the CAN event has been enabled,0,r EVENTROUTER_ENABLE,13,1,TIM2_EN,A 1 in this bit shows that the combined timer 2 output event has been enabled,0,r EVENTROUTER_ENABLE,14,1,TIM6_EN,A 1 in this bit shows that the combined timer 6 output event has been enabled,0,r EVENTROUTER_ENABLE,15,1,QEI_EN,A 1 in this bit shows that the QEI event has been enabled,0,r EVENTROUTER_ENABLE,16,1,TIM14_EN,A 1 in this bit shows that the combined timer 14 output event has been enabled,0,r EVENTROUTER_ENABLE,19,1,RESET_EN,A 1 in this bit shows that the reset event has been enabled,0,r EVENTROUTER_CLR_STAT,0,1,WAKEUP0_CLRST,Writing a 1 to this bit clears the STATUS event bit 0 in the STATUS register,0,w EVENTROUTER_CLR_STAT,1,1,WAKEUP1_CLRST,Writing a 1 to this bit clears the STATUS event bit 1 in the STATUS register,0,w EVENTROUTER_CLR_STAT,2,1,WAKEUP2_CLRST,Writing a 1 to this bit clears the STATUS event bit 2 in the STATUS register,0,w EVENTROUTER_CLR_STAT,3,1,WAKEUP3_CLRST,Writing a 1 to this bit clears the STATUS event bit 3 in the STATUS register,0,w EVENTROUTER_CLR_STAT,4,1,ATIMER_CLRST,Writing a 1 to this bit clears the STATUS event bit 4 in the STATUS register,0,w EVENTROUTER_CLR_STAT,5,1,RTC_CLRST,Writing a 1 to this bit clears the STATUS event bit 5 in the STATUS register,0,w EVENTROUTER_CLR_STAT,6,1,BOD_CLRST,Writing a 1 to this bit clears the STATUS event bit 6 in the STATUS register,0,w EVENTROUTER_CLR_STAT,7,1,WWDT_CLRST,Writing a 1 to this bit clears the STATUS event bit 7 in the STATUS register,0,w EVENTROUTER_CLR_STAT,8,1,ETH_CLRST,Writing a 1 to this bit clears the STATUS event bit 8 in the STATUS register,0,w EVENTROUTER_CLR_STAT,9,1,USB0_CLRST,Writing a 1 to this bit clears the STATUS event bit 9 in the STATUS register,0,w EVENTROUTER_CLR_STAT,10,1,USB1_CLRST,Writing a 1 to this bit clears the STATUS event bit 10 in the STATUS register,0,w EVENTROUTER_CLR_STAT,11,1,SDMCC_CLRST,Writing a 1 to this bit clears the STATUS event bit 11 in the STATUS register,0,w EVENTROUTER_CLR_STAT,12,1,CAN_CLRST,Writing a 1 to this bit clears the STATUS event bit 12 in the STATUS register,0,w EVENTROUTER_CLR_STAT,13,1,TIM2_CLRST,Writing a 1 to this bit clears the STATUS event bit 13 in the STATUS register,0,w EVENTROUTER_CLR_STAT,14,1,TIM6_CLRST,Writing a 1 to this bit clears the STATUS event bit 14 in the STATUS register,0,w EVENTROUTER_CLR_STAT,15,1,QEI_CLRST,Writing a 1 to this bit clears the STATUS event bit 15 in the STATUS register,0,w EVENTROUTER_CLR_STAT,16,1,TIM14_CLRST,Writing a 1 to this bit clears the STATUS event bit 16 in the STATUS register,0,w EVENTROUTER_CLR_STAT,19,1,RESET_CLRST,Writing a 1 to this bit clears the STATUS event bit 19 in the STATUS register,0,w EVENTROUTER_SET_STAT,0,1,WAKEUP0_SETST,Writing a 1 to this bit sets the STATUS event bit 0 in the STATUS register,0,w EVENTROUTER_SET_STAT,1,1,WAKEUP1_SETST,Writing a 1 to this bit sets the STATUS event bit 1 in the STATUS register,0,w EVENTROUTER_SET_STAT,2,1,WAKEUP2_SETST,Writing a 1 to this bit sets the STATUS event bit 2 in the STATUS register,0,w EVENTROUTER_SET_STAT,3,1,WAKEUP3_SETST,Writing a 1 to this bit sets the STATUS event bit 3 in the STATUS register,0,w EVENTROUTER_SET_STAT,4,1,ATIMER_SETST,Writing a 1 to this bit sets the STATUS event bit 4 in the STATUS register,0,w EVENTROUTER_SET_STAT,5,1,RTC_SETST,Writing a 1 to this bit sets the STATUS event bit 5 in the STATUS register,0,w EVENTROUTER_SET_STAT,6,1,BOD_SETST,Writing a 1 to this bit sets the STATUS event bit 6 in the STATUS register,0,w EVENTROUTER_SET_STAT,7,1,WWDT_SETST,Writing a 1 to this bit sets the STATUS event bit 7 in the STATUS register,0,w EVENTROUTER_SET_STAT,8,1,ETH_SETST,Writing a 1 to this bit sets the STATUS event bit 8 in the STATUS register,0,w EVENTROUTER_SET_STAT,9,1,USB0_SETST,Writing a 1 to this bit sets the STATUS event bit 9 in the STATUS register,0,w EVENTROUTER_SET_STAT,10,1,USB1_SETST,Writing a 1 to this bit sets the STATUS event bit 10 in the STATUS register,0,w EVENTROUTER_SET_STAT,11,1,SDMCC_SETST,Writing a 1 to this bit sets the STATUS event bit 11 in the STATUS register,0,w EVENTROUTER_SET_STAT,12,1,CAN_SETST,Writing a 1 to this bit sets the STATUS event bit 12 in the STATUS register,0,w EVENTROUTER_SET_STAT,13,1,TIM2_SETST,Writing a 1 to this bit sets the STATUS event bit 13 in the STATUS register,0,w EVENTROUTER_SET_STAT,14,1,TIM6_SETST,Writing a 1 to this bit sets the STATUS event bit 14 in the STATUS register,0,w EVENTROUTER_SET_STAT,15,1,QEI_SETST,Writing a 1 to this bit sets the STATUS event bit 15 in the STATUS register,0,w EVENTROUTER_SET_STAT,16,1,TIM14_SETST,Writing a 1 to this bit sets the STATUS event bit 16 in the STATUS register,0,w EVENTROUTER_SET_STAT,19,1,RESET_SETST,Writing a 1 to this bit sets the STATUS event bit 19 in the STATUS register,0,w ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/eventrouter.yaml ================================================ !!omap - EVENTROUTER_HILO: fields: !!omap - WAKEUP0_L: access: rw description: Level detect mode for WAKEUP0 event lsb: 0 reset_value: '0' width: 1 - WAKEUP1_L: access: rw description: Level detect mode for WAKEUP1 event lsb: 1 reset_value: '0' width: 1 - WAKEUP2_L: access: rw description: Level detect mode for WAKEUP2 event lsb: 2 reset_value: '0' width: 1 - WAKEUP3_L: access: rw description: Level detect mode for WAKEUP3 event lsb: 3 reset_value: '0' width: 1 - ATIMER_L: access: rw description: Level detect mode for alarm timer event lsb: 4 reset_value: '0' width: 1 - RTC_L: access: rw description: Level detect mode for RTC event lsb: 5 reset_value: '0' width: 1 - BOD_L: access: rw description: Level detect mode for BOD event lsb: 6 reset_value: '0' width: 1 - WWDT_L: access: rw description: Level detect mode for WWDT event lsb: 7 reset_value: '0' width: 1 - ETH_L: access: rw description: Level detect mode for Ethernet event lsb: 8 reset_value: '0' width: 1 - USB0_L: access: rw description: Level detect mode for USB0 event lsb: 9 reset_value: '0' width: 1 - USB1_L: access: rw description: Level detect mode for USB1 event lsb: 10 reset_value: '0' width: 1 - SDMMC_L: access: rw description: Level detect mode for SD/MMC event lsb: 11 reset_value: '0' width: 1 - CAN_L: access: rw description: Level detect mode for C_CAN event lsb: 12 reset_value: '0' width: 1 - TIM2_L: access: rw description: Level detect mode for combined timer output 2 event lsb: 13 reset_value: '0' width: 1 - TIM6_L: access: rw description: Level detect mode for combined timer output 6 event lsb: 14 reset_value: '0' width: 1 - QEI_L: access: rw description: Level detect mode for QEI event lsb: 15 reset_value: '0' width: 1 - TIM14_L: access: rw description: Level detect mode for combined timer output 14 event lsb: 16 reset_value: '0' width: 1 - RESET_L: access: rw description: Level detect mode for Reset lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_EDGE: fields: !!omap - WAKEUP0_E: access: rw description: Edge/Level detect mode for WAKEUP0 event lsb: 0 reset_value: '0' width: 1 - WAKEUP1_E: access: rw description: Edge/Level detect mode for WAKEUP1 event lsb: 1 reset_value: '0' width: 1 - WAKEUP2_E: access: rw description: Edge/Level detect mode for WAKEUP2 event lsb: 2 reset_value: '0' width: 1 - WAKEUP3_E: access: rw description: Edge/Level detect mode for WAKEUP3 event lsb: 3 reset_value: '0' width: 1 - ATIMER_E: access: rw description: Edge/Level detect mode for alarm timer event lsb: 4 reset_value: '0' width: 1 - RTC_E: access: rw description: Edge/Level detect mode for RTC event lsb: 5 reset_value: '0' width: 1 - BOD_E: access: rw description: Edge/Level detect mode for BOD event lsb: 6 reset_value: '0' width: 1 - WWDT_E: access: rw description: Edge/Level detect mode for WWDT event lsb: 7 reset_value: '0' width: 1 - ETH_E: access: rw description: Edge/Level detect mode for Ethernet event lsb: 8 reset_value: '0' width: 1 - USB0_E: access: rw description: Edge/Level detect mode for USB0 event lsb: 9 reset_value: '0' width: 1 - USB1_E: access: rw description: Edge/Level detect mode for USB1 event lsb: 10 reset_value: '0' width: 1 - SDMMC_E: access: rw description: Edge/Level detect mode for SD/MMC event lsb: 11 reset_value: '0' width: 1 - CAN_E: access: rw description: Edge/Level detect mode for C_CAN event lsb: 12 reset_value: '0' width: 1 - TIM2_E: access: rw description: Edge/Level detect mode for combined timer output 2 event lsb: 13 reset_value: '0' width: 1 - TIM6_E: access: rw description: Edge/Level detect mode for combined timer output 6 event lsb: 14 reset_value: '0' width: 1 - QEI_E: access: rw description: Edge/Level detect mode for QEI event lsb: 15 reset_value: '0' width: 1 - TIM14_E: access: rw description: Edge/Level detect mode for combined timer output 14 event lsb: 16 reset_value: '0' width: 1 - RESET_E: access: rw description: Edge/Level detect mode for Reset lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_CLR_EN: fields: !!omap - WAKEUP0_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 0 in the ENABLE register lsb: 0 reset_value: '0' width: 1 - WAKEUP1_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 1 in the ENABLE register lsb: 1 reset_value: '0' width: 1 - WAKEUP2_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 2 in the ENABLE register lsb: 2 reset_value: '0' width: 1 - WAKEUP3_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 3 in the ENABLE register lsb: 3 reset_value: '0' width: 1 - ATIMER_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 4 in the ENABLE register lsb: 4 reset_value: '0' width: 1 - RTC_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 5 in the ENABLE register lsb: 5 reset_value: '0' width: 1 - BOD_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 6 in the ENABLE register lsb: 6 reset_value: '0' width: 1 - WWDT_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 7 in the ENABLE register lsb: 7 reset_value: '0' width: 1 - ETH_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 8 in the ENABLE register lsb: 8 reset_value: '0' width: 1 - USB0_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 9 in the ENABLE register lsb: 9 reset_value: '0' width: 1 - USB1_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 10 in the ENABLE register lsb: 10 reset_value: '0' width: 1 - SDMCC_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 11 in the ENABLE register lsb: 11 reset_value: '0' width: 1 - CAN_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 12 in the ENABLE register lsb: 12 reset_value: '0' width: 1 - TIM2_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 13 in the ENABLE register lsb: 13 reset_value: '0' width: 1 - TIM6_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 14 in the ENABLE register lsb: 14 reset_value: '0' width: 1 - QEI_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 15 in the ENABLE register lsb: 15 reset_value: '0' width: 1 - TIM14_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 16 in the ENABLE register lsb: 16 reset_value: '0' width: 1 - RESET_CLREN: access: w description: Writing a 1 to this bit clears the event enable bit 19 in the ENABLE register lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_SET_EN: fields: !!omap - WAKEUP0_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 0 in the ENABLE register lsb: 0 reset_value: '0' width: 1 - WAKEUP1_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 1 in the ENABLE register lsb: 1 reset_value: '0' width: 1 - WAKEUP2_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 2 in the ENABLE register lsb: 2 reset_value: '0' width: 1 - WAKEUP3_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 3 in the ENABLE register lsb: 3 reset_value: '0' width: 1 - ATIMER_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 4 in the ENABLE register lsb: 4 reset_value: '0' width: 1 - RTC_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 5 in the ENABLE register lsb: 5 reset_value: '0' width: 1 - BOD_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 6 in the ENABLE register lsb: 6 reset_value: '0' width: 1 - WWDT_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 7 in the ENABLE register lsb: 7 reset_value: '0' width: 1 - ETH_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 8 in the ENABLE register lsb: 8 reset_value: '0' width: 1 - USB0_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 9 in the ENABLE register lsb: 9 reset_value: '0' width: 1 - USB1_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 10 in the ENABLE register lsb: 10 reset_value: '0' width: 1 - SDMCC_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 11 in the ENABLE register lsb: 11 reset_value: '0' width: 1 - CAN_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 12 in the ENABLE register lsb: 12 reset_value: '0' width: 1 - TIM2_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 13 in the ENABLE register lsb: 13 reset_value: '0' width: 1 - TIM6_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 14 in the ENABLE register lsb: 14 reset_value: '0' width: 1 - QEI_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 15 in the ENABLE register lsb: 15 reset_value: '0' width: 1 - TIM14_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 16 in the ENABLE register lsb: 16 reset_value: '0' width: 1 - RESET_SETEN: access: w description: Writing a 1 to this bit sets the event enable bit 19 in the ENABLE register lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_STATUS: fields: !!omap - WAKEUP0_ST: access: r description: A 1 in this bit shows that the WAKEUP0 event has been raised lsb: 0 reset_value: '1' width: 1 - WAKEUP1_ST: access: r description: A 1 in this bit shows that the WAKEUP1 event has been raised lsb: 1 reset_value: '1' width: 1 - WAKEUP2_ST: access: r description: A 1 in this bit shows that the WAKEUP2 event has been raised lsb: 2 reset_value: '1' width: 1 - WAKEUP3_ST: access: r description: A 1 in this bit shows that the WAKEUP3 event has been raised lsb: 3 reset_value: '1' width: 1 - ATIMER_ST: access: r description: A 1 in this bit shows that the ATIMER event has been raised lsb: 4 reset_value: '1' width: 1 - RTC_ST: access: r description: A 1 in this bit shows that the RTC event has been raised lsb: 5 reset_value: '1' width: 1 - BOD_ST: access: r description: A 1 in this bit shows that the BOD event has been raised lsb: 6 reset_value: '1' width: 1 - WWDT_ST: access: r description: A 1 in this bit shows that the WWDT event has been raised lsb: 7 reset_value: '1' width: 1 - ETH_ST: access: r description: A 1 in this bit shows that the ETH event has been raised lsb: 8 reset_value: '1' width: 1 - USB0_ST: access: r description: A 1 in this bit shows that the USB0 event has been raised lsb: 9 reset_value: '1' width: 1 - USB1_ST: access: r description: A 1 in this bit shows that the USB1 event has been raised lsb: 10 reset_value: '1' width: 1 - SDMMC_ST: access: r description: A 1 in this bit shows that the SDMMC event has been raised lsb: 11 reset_value: '1' width: 1 - CAN_ST: access: r description: A 1 in this bit shows that the CAN event has been raised lsb: 12 reset_value: '1' width: 1 - TIM2_ST: access: r description: A 1 in this bit shows that the combined timer 2 output event has been raised lsb: 13 reset_value: '1' width: 1 - TIM6_ST: access: r description: A 1 in this bit shows that the combined timer 6 output event has been raised lsb: 14 reset_value: '1' width: 1 - QEI_ST: access: r description: A 1 in this bit shows that the QEI event has been raised lsb: 15 reset_value: '1' width: 1 - TIM14_ST: access: r description: A 1 in this bit shows that the combined timer 14 output event has been raised lsb: 16 reset_value: '1' width: 1 - RESET_ST: access: r description: A 1 in this bit shows that the reset event has been raised lsb: 19 reset_value: '1' width: 1 - EVENTROUTER_ENABLE: fields: !!omap - WAKEUP0_EN: access: r description: A 1 in this bit shows that the WAKEUP0 event has been enabled lsb: 0 reset_value: '0' width: 1 - WAKEUP1_EN: access: r description: A 1 in this bit shows that the WAKEUP1 event has been enabled lsb: 1 reset_value: '0' width: 1 - WAKEUP2_EN: access: r description: A 1 in this bit shows that the WAKEUP2 event has been enabled lsb: 2 reset_value: '0' width: 1 - WAKEUP3_EN: access: r description: A 1 in this bit shows that the WAKEUP3 event has been enabled lsb: 3 reset_value: '0' width: 1 - ATIMER_EN: access: r description: A 1 in this bit shows that the ATIMER event has been enabled lsb: 4 reset_value: '0' width: 1 - RTC_EN: access: r description: A 1 in this bit shows that the RTC event has been enabled lsb: 5 reset_value: '0' width: 1 - BOD_EN: access: r description: A 1 in this bit shows that the BOD event has been enabled lsb: 6 reset_value: '0' width: 1 - WWDT_EN: access: r description: A 1 in this bit shows that the WWDT event has been enabled lsb: 7 reset_value: '0' width: 1 - ETH_EN: access: r description: A 1 in this bit shows that the ETH event has been enabled lsb: 8 reset_value: '0' width: 1 - USB0_EN: access: r description: A 1 in this bit shows that the USB0 event has been enabled lsb: 9 reset_value: '0' width: 1 - USB1_EN: access: r description: A 1 in this bit shows that the USB1 event has been enabled lsb: 10 reset_value: '0' width: 1 - SDMMC_EN: access: r description: A 1 in this bit shows that the SDMMC event has been enabled lsb: 11 reset_value: '0' width: 1 - CAN_EN: access: r description: A 1 in this bit shows that the CAN event has been enabled lsb: 12 reset_value: '0' width: 1 - TIM2_EN: access: r description: A 1 in this bit shows that the combined timer 2 output event has been enabled lsb: 13 reset_value: '0' width: 1 - TIM6_EN: access: r description: A 1 in this bit shows that the combined timer 6 output event has been enabled lsb: 14 reset_value: '0' width: 1 - QEI_EN: access: r description: A 1 in this bit shows that the QEI event has been enabled lsb: 15 reset_value: '0' width: 1 - TIM14_EN: access: r description: A 1 in this bit shows that the combined timer 14 output event has been enabled lsb: 16 reset_value: '0' width: 1 - RESET_EN: access: r description: A 1 in this bit shows that the reset event has been enabled lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_CLR_STAT: fields: !!omap - WAKEUP0_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 0 in the STATUS register lsb: 0 reset_value: '0' width: 1 - WAKEUP1_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 1 in the STATUS register lsb: 1 reset_value: '0' width: 1 - WAKEUP2_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 2 in the STATUS register lsb: 2 reset_value: '0' width: 1 - WAKEUP3_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 3 in the STATUS register lsb: 3 reset_value: '0' width: 1 - ATIMER_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 4 in the STATUS register lsb: 4 reset_value: '0' width: 1 - RTC_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 5 in the STATUS register lsb: 5 reset_value: '0' width: 1 - BOD_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 6 in the STATUS register lsb: 6 reset_value: '0' width: 1 - WWDT_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 7 in the STATUS register lsb: 7 reset_value: '0' width: 1 - ETH_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 8 in the STATUS register lsb: 8 reset_value: '0' width: 1 - USB0_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 9 in the STATUS register lsb: 9 reset_value: '0' width: 1 - USB1_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 10 in the STATUS register lsb: 10 reset_value: '0' width: 1 - SDMCC_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 11 in the STATUS register lsb: 11 reset_value: '0' width: 1 - CAN_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 12 in the STATUS register lsb: 12 reset_value: '0' width: 1 - TIM2_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 13 in the STATUS register lsb: 13 reset_value: '0' width: 1 - TIM6_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 14 in the STATUS register lsb: 14 reset_value: '0' width: 1 - QEI_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 15 in the STATUS register lsb: 15 reset_value: '0' width: 1 - TIM14_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 16 in the STATUS register lsb: 16 reset_value: '0' width: 1 - RESET_CLRST: access: w description: Writing a 1 to this bit clears the STATUS event bit 19 in the STATUS register lsb: 19 reset_value: '0' width: 1 - EVENTROUTER_SET_STAT: fields: !!omap - WAKEUP0_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 0 in the STATUS register lsb: 0 reset_value: '0' width: 1 - WAKEUP1_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 1 in the STATUS register lsb: 1 reset_value: '0' width: 1 - WAKEUP2_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 2 in the STATUS register lsb: 2 reset_value: '0' width: 1 - WAKEUP3_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 3 in the STATUS register lsb: 3 reset_value: '0' width: 1 - ATIMER_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 4 in the STATUS register lsb: 4 reset_value: '0' width: 1 - RTC_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 5 in the STATUS register lsb: 5 reset_value: '0' width: 1 - BOD_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 6 in the STATUS register lsb: 6 reset_value: '0' width: 1 - WWDT_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 7 in the STATUS register lsb: 7 reset_value: '0' width: 1 - ETH_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 8 in the STATUS register lsb: 8 reset_value: '0' width: 1 - USB0_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 9 in the STATUS register lsb: 9 reset_value: '0' width: 1 - USB1_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 10 in the STATUS register lsb: 10 reset_value: '0' width: 1 - SDMCC_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 11 in the STATUS register lsb: 11 reset_value: '0' width: 1 - CAN_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 12 in the STATUS register lsb: 12 reset_value: '0' width: 1 - TIM2_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 13 in the STATUS register lsb: 13 reset_value: '0' width: 1 - TIM6_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 14 in the STATUS register lsb: 14 reset_value: '0' width: 1 - QEI_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 15 in the STATUS register lsb: 15 reset_value: '0' width: 1 - TIM14_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 16 in the STATUS register lsb: 16 reset_value: '0' width: 1 - RESET_SETST: access: w description: Writing a 1 to this bit sets the STATUS event bit 19 in the STATUS register lsb: 19 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gen.py ================================================ #!/usr/bin/env python import sys import yaml import yaml_odict from collections import OrderedDict from pprint import pprint registers = yaml.load(open(sys.argv[1], 'r')) for register_name, register in registers.iteritems(): print('/* --- %s values %s */' % (register_name, '-' * (50 - len(register_name)))) print fields = register['fields'] #for field_name, field in sorted(fields.items(), lambda x, y: cmp(x[1]['lsb'], y[1]['lsb'])): for field_name, field in fields.items(): mask_bits = (1 << field['width']) - 1 print('/* %s: %s */' % (field_name, field['description'])) print('#define %s_%s_SHIFT (%d)' % ( register_name, field_name, field['lsb'], )) print('#define %s_%s_MASK (0x%x << %s_%s_SHIFT)' % ( register_name, field_name, mask_bits, register_name, field_name, )) print('#define %s_%s(x) ((x) << %s_%s_SHIFT)' % ( register_name, field_name, register_name, field_name, )) print ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gima.csv ================================================ GIMA_CAP0_0_IN,0,1,INV,Invert input,0,rw GIMA_CAP0_0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP0_0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP0_0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP0_0_IN,4,4,SELECT,Select input,0,rw GIMA_CAP0_1_IN,0,1,INV,Invert input,0,rw GIMA_CAP0_1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP0_1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP0_1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP0_1_IN,4,4,SELECT,Select input,0,rw GIMA_CAP0_2_IN,0,1,INV,Invert input,0,rw GIMA_CAP0_2_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP0_2_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP0_2_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP0_2_IN,4,4,SELECT,Select input,0,rw GIMA_CAP0_3_IN,0,1,INV,Invert input,0,rw GIMA_CAP0_3_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP0_3_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP0_3_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP0_3_IN,4,4,SELECT,Select input,0,rw GIMA_CAP1_0_IN,0,1,INV,Invert input,0,rw GIMA_CAP1_0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP1_0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP1_0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP1_0_IN,4,4,SELECT,Select input,0,rw GIMA_CAP1_1_IN,0,1,INV,Invert input,0,rw GIMA_CAP1_1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP1_1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP1_1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP1_1_IN,4,4,SELECT,Select input,0,rw GIMA_CAP1_2_IN,0,1,INV,Invert input,0,rw GIMA_CAP1_2_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP1_2_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP1_2_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP1_2_IN,4,4,SELECT,Select input,0,rw GIMA_CAP1_3_IN,0,1,INV,Invert input,0,rw GIMA_CAP1_3_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP1_3_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP1_3_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP1_3_IN,4,4,SELECT,Select input,0,rw GIMA_CAP2_0_IN,0,1,INV,Invert input,0,rw GIMA_CAP2_0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP2_0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP2_0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP2_0_IN,4,4,SELECT,Select input,0,rw GIMA_CAP2_1_IN,0,1,INV,Invert input,0,rw GIMA_CAP2_1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP2_1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP2_1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP2_1_IN,4,4,SELECT,Select input,0,rw GIMA_CAP2_2_IN,0,1,INV,Invert input,0,rw GIMA_CAP2_2_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP2_2_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP2_2_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP2_2_IN,4,4,SELECT,Select input,0,rw GIMA_CAP2_3_IN,0,1,INV,Invert input,0,rw GIMA_CAP2_3_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP2_3_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP2_3_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP2_3_IN,4,4,SELECT,Select input,0,rw GIMA_CAP3_0_IN,0,1,INV,Invert input,0,rw GIMA_CAP3_0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP3_0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP3_0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP3_0_IN,4,4,SELECT,Select input,0,rw GIMA_CAP3_1_IN,0,1,INV,Invert input,0,rw GIMA_CAP3_1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP3_1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP3_1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP3_1_IN,4,4,SELECT,Select input,0,rw GIMA_CAP3_2_IN,0,1,INV,Invert input,0,rw GIMA_CAP3_2_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP3_2_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP3_2_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP3_2_IN,4,4,SELECT,Select input,0,rw GIMA_CAP3_3_IN,0,1,INV,Invert input,0,rw GIMA_CAP3_3_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CAP3_3_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CAP3_3_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CAP3_3_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_0_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_0_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_1_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_1_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_2_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_2_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_2_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_2_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_2_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_3_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_3_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_3_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_3_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_3_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_4_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_4_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_4_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_4_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_4_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_5_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_5_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_5_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_5_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_5_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_6_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_6_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_6_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_6_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_6_IN,4,4,SELECT,Select input,0,rw GIMA_CTIN_7_IN,0,1,INV,Invert input,0,rw GIMA_CTIN_7_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_CTIN_7_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_CTIN_7_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_CTIN_7_IN,4,4,SELECT,Select input,0,rw GIMA_VADC_TRIGGER_IN,0,1,INV,Invert input,0,rw GIMA_VADC_TRIGGER_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_VADC_TRIGGER_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_VADC_TRIGGER_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_VADC_TRIGGER_IN,4,4,SELECT,Select input,0,rw GIMA_EVENTROUTER_13_IN,0,1,INV,Invert input,0,rw GIMA_EVENTROUTER_13_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_EVENTROUTER_13_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_EVENTROUTER_13_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_EVENTROUTER_13_IN,4,4,SELECT,Select input,0,rw GIMA_EVENTROUTER_14_IN,0,1,INV,Invert input,0,rw GIMA_EVENTROUTER_14_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_EVENTROUTER_14_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_EVENTROUTER_14_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_EVENTROUTER_14_IN,4,4,SELECT,Select input,0,rw GIMA_EVENTROUTER_16_IN,0,1,INV,Invert input,0,rw GIMA_EVENTROUTER_16_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_EVENTROUTER_16_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_EVENTROUTER_16_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_EVENTROUTER_16_IN,4,4,SELECT,Select input,0,rw GIMA_ADCSTART0_IN,0,1,INV,Invert input,0,rw GIMA_ADCSTART0_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_ADCSTART0_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_ADCSTART0_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_ADCSTART0_IN,4,4,SELECT,Select input,0,rw GIMA_ADCSTART1_IN,0,1,INV,Invert input,0,rw GIMA_ADCSTART1_IN,1,1,EDGE,Enable rising edge detection,0,rw GIMA_ADCSTART1_IN,2,1,SYNCH,Enable synchronization,0,rw GIMA_ADCSTART1_IN,3,1,PULSE,Enable single pulse generation,0,rw GIMA_ADCSTART1_IN,4,4,SELECT,Select input,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gima.yaml ================================================ !!omap - GIMA_CAP0_0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP0_1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP0_2_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP0_3_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP1_0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP1_1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP1_2_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP1_3_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP2_0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP2_1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP2_2_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP2_3_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP3_0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP3_1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP3_2_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CAP3_3_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_2_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_3_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_4_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_5_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_6_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_CTIN_7_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_VADC_TRIGGER_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_EVENTROUTER_13_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_EVENTROUTER_14_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_EVENTROUTER_16_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_ADCSTART0_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 - GIMA_ADCSTART1_IN: fields: !!omap - INV: access: rw description: Invert input lsb: 0 reset_value: '0' width: 1 - EDGE: access: rw description: Enable rising edge detection lsb: 1 reset_value: '0' width: 1 - SYNCH: access: rw description: Enable synchronization lsb: 2 reset_value: '0' width: 1 - PULSE: access: rw description: Enable single pulse generation lsb: 3 reset_value: '0' width: 1 - SELECT: access: rw description: Select input lsb: 4 reset_value: '0' width: 4 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gpdma.csv ================================================ GPDMA_NTSTAT,0,8,INTSTAT,Status of DMA channel interrupts after masking,0x00,r GPDMA_INTTCSTAT,0,8,INTTCSTAT,Terminal count interrupt request status for DMA channels,0x00,r GPDMA_INTTCCLEAR,0,8,INTTCCLEAR,Allows clearing the Terminal count interrupt request (IntTCStat) for DMA channels,0x00,w GPDMA_INTERRSTAT,0,8,INTERRSTAT,Interrupt error status for DMA channels,0x00,r GPDMA_INTERRCLR,0,8,INTERRCLR,Writing a 1 clears the error interrupt request (IntErrStat) for DMA channels,0x00,w GPDMA_RAWINTTCSTAT,0,8,RAWINTTCSTAT,Status of the terminal count interrupt for DMA channels prior to masking,0x00,r GPDMA_RAWINTERRSTAT,0,8,RAWINTERRSTAT,Status of the error interrupt for DMA channels prior to masking,0x00,r GPDMA_ENBLDCHNS,0,8,ENABLEDCHANNELS,Enable status for DMA channels,0x00,r GPDMA_SOFTBREQ,0,16,SOFTBREQ,Software burst request flags for each of 16 possible sources,0x00,rw GPDMA_SOFTSREQ,0,16,SOFTSREQ,Software single transfer request flags for each of 16 possible sources,0x00,rw GPDMA_SOFTLBREQ,0,16,SOFTLBREQ,Software last burst request flags for each of 16 possible sources,0x00,rw GPDMA_SOFTLSREQ,0,16,SOFTLSREQ,Software last single transfer request flags for each of 16 possible sources,0x00,rw GPDMA_CONFIG,0,1,E,DMA Controller enable,0,rw GPDMA_CONFIG,1,1,M0,AHB Master 0 endianness configuration,0,rw GPDMA_CONFIG,2,1,M1,AHB Master 1 endianness configuration,0,rw GPDMA_SYNC,0,16,DMACSYNC,Controls the synchronization logic for DMA request signals,0x00,rw GPDMA_C0SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C1SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C2SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C3SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C4SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C5SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C6SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C7SRCADDR,0,32,SRCADDR,DMA source address,0x00000000,rw GPDMA_C0DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C1DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C2DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C3DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C4DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C5DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C6DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C7DESTADDR,0,32,DESTADDR,DMA source address,0x00000000,rw GPDMA_C0LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C0LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C1LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C1LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C2LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C2LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C3LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C3LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C4LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C4LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C5LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C5LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C6LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C6LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C7LLI,0,1,LM,AHB master select for loading the next LLI,0,rw GPDMA_C7LLI,2,30,LLI,Linked list item,0x00000000,rw GPDMA_C0CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C0CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C0CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C0CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C0CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C0CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C0CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C0CONTROL,26,1,SI,Source increment,0,rw GPDMA_C0CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C0CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C0CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C0CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C0CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C1CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C1CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C1CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C1CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C1CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C1CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C1CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C1CONTROL,26,1,SI,Source increment,0,rw GPDMA_C1CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C1CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C1CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C1CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C1CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C2CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C2CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C2CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C2CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C2CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C2CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C2CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C2CONTROL,26,1,SI,Source increment,0,rw GPDMA_C2CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C2CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C2CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C2CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C2CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C3CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C3CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C3CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C3CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C3CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C3CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C3CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C3CONTROL,26,1,SI,Source increment,0,rw GPDMA_C3CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C3CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C3CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C3CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C3CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C4CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C4CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C4CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C4CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C4CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C4CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C4CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C4CONTROL,26,1,SI,Source increment,0,rw GPDMA_C4CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C4CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C4CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C4CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C4CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C5CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C5CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C5CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C5CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C5CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C5CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C5CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C5CONTROL,26,1,SI,Source increment,0,rw GPDMA_C5CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C5CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C5CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C5CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C5CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C6CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C6CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C6CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C6CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C6CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C6CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C6CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C6CONTROL,26,1,SI,Source increment,0,rw GPDMA_C6CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C6CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C6CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C6CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C6CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C7CONTROL,0,12,TRANSFERSIZE,Transfer size in number of transfers,0x00,rw GPDMA_C7CONTROL,12,3,SBSIZE,Source burst size,0x0,rw GPDMA_C7CONTROL,15,3,DBSIZE,Destination burst size,0x0,rw GPDMA_C7CONTROL,18,3,SWIDTH,Source transfer width,0x0,rw GPDMA_C7CONTROL,21,3,DWIDTH,Destination transfer width,0x0,rw GPDMA_C7CONTROL,24,1,S,Source AHB master select,0,rw GPDMA_C7CONTROL,25,1,D,Destination AHB master select,0,rw GPDMA_C7CONTROL,26,1,SI,Source increment,0,rw GPDMA_C7CONTROL,27,1,DI,Destination increment,0,rw GPDMA_C7CONTROL,28,1,PROT1,This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode,0,rw GPDMA_C7CONTROL,29,1,PROT2,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable,0,rw GPDMA_C7CONTROL,30,1,PROT3,This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable,0,rw GPDMA_C7CONTROL,31,1,I,Terminal count interrupt enable bit,0,rw GPDMA_C0CONFIG,0,1,E,Channel enable,0,rw GPDMA_C0CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C0CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C0CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C0CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C0CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C0CONFIG,16,1,L,Lock,,rw GPDMA_C0CONFIG,17,1,A,Active,,r GPDMA_C0CONFIG,18,1,H,Halt,,rw GPDMA_C1CONFIG,0,1,E,Channel enable,0,rw GPDMA_C1CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C1CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C1CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C1CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C1CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C1CONFIG,16,1,L,Lock,,rw GPDMA_C1CONFIG,17,1,A,Active,,r GPDMA_C1CONFIG,18,1,H,Halt,,rw GPDMA_C2CONFIG,0,1,E,Channel enable,0,rw GPDMA_C2CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C2CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C2CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C2CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C2CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C2CONFIG,16,1,L,Lock,,rw GPDMA_C2CONFIG,17,1,A,Active,,r GPDMA_C2CONFIG,18,1,H,Halt,,rw GPDMA_C3CONFIG,0,1,E,Channel enable,0,rw GPDMA_C3CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C3CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C3CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C3CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C3CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C3CONFIG,16,1,L,Lock,,rw GPDMA_C3CONFIG,17,1,A,Active,,r GPDMA_C3CONFIG,18,1,H,Halt,,rw GPDMA_C4CONFIG,0,1,E,Channel enable,0,rw GPDMA_C4CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C4CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C4CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C4CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C4CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C4CONFIG,16,1,L,Lock,,rw GPDMA_C4CONFIG,17,1,A,Active,,r GPDMA_C4CONFIG,18,1,H,Halt,,rw GPDMA_C5CONFIG,0,1,E,Channel enable,0,rw GPDMA_C5CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C5CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C5CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C5CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C5CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C5CONFIG,16,1,L,Lock,,rw GPDMA_C5CONFIG,17,1,A,Active,,r GPDMA_C5CONFIG,18,1,H,Halt,,rw GPDMA_C6CONFIG,0,1,E,Channel enable,0,rw GPDMA_C6CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C6CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C6CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C6CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C6CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C6CONFIG,16,1,L,Lock,,rw GPDMA_C6CONFIG,17,1,A,Active,,r GPDMA_C6CONFIG,18,1,H,Halt,,rw GPDMA_C7CONFIG,0,1,E,Channel enable,0,rw GPDMA_C7CONFIG,1,5,SRCPERIPHERAL,Source peripheral,,rw GPDMA_C7CONFIG,6,5,DESTPERIPHERAL,Destination peripheral,,rw GPDMA_C7CONFIG,11,3,FLOWCNTRL,Flow control and transfer type,,rw GPDMA_C7CONFIG,14,1,IE,Interrupt error mask,,rw GPDMA_C7CONFIG,15,1,ITC,Terminal count interrupt mask,,rw GPDMA_C7CONFIG,16,1,L,Lock,,rw GPDMA_C7CONFIG,17,1,A,Active,,r GPDMA_C7CONFIG,18,1,H,Halt,,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gpdma.yaml ================================================ !!omap - GPDMA_INTSTAT: fields: !!omap - INTSTAT: access: r description: Status of DMA channel interrupts after masking lsb: 0 reset_value: '0x00' width: 8 - GPDMA_INTTCSTAT: fields: !!omap - INTTCSTAT: access: r description: Terminal count interrupt request status for DMA channels lsb: 0 reset_value: '0x00' width: 8 - GPDMA_INTTCCLEAR: fields: !!omap - INTTCCLEAR: access: w description: Allows clearing the Terminal count interrupt request (IntTCStat) for DMA channels lsb: 0 reset_value: '0x00' width: 8 - GPDMA_INTERRSTAT: fields: !!omap - INTERRSTAT: access: r description: Interrupt error status for DMA channels lsb: 0 reset_value: '0x00' width: 8 - GPDMA_INTERRCLR: fields: !!omap - INTERRCLR: access: w description: Writing a 1 clears the error interrupt request (IntErrStat) for DMA channels lsb: 0 reset_value: '0x00' width: 8 - GPDMA_RAWINTTCSTAT: fields: !!omap - RAWINTTCSTAT: access: r description: Status of the terminal count interrupt for DMA channels prior to masking lsb: 0 reset_value: '0x00' width: 8 - GPDMA_RAWINTERRSTAT: fields: !!omap - RAWINTERRSTAT: access: r description: Status of the error interrupt for DMA channels prior to masking lsb: 0 reset_value: '0x00' width: 8 - GPDMA_ENBLDCHNS: fields: !!omap - ENABLEDCHANNELS: access: r description: Enable status for DMA channels lsb: 0 reset_value: '0x00' width: 8 - GPDMA_SOFTBREQ: fields: !!omap - SOFTBREQ: access: rw description: Software burst request flags for each of 16 possible sources lsb: 0 reset_value: '0x00' width: 16 - GPDMA_SOFTSREQ: fields: !!omap - SOFTSREQ: access: rw description: Software single transfer request flags for each of 16 possible sources lsb: 0 reset_value: '0x00' width: 16 - GPDMA_SOFTLBREQ: fields: !!omap - SOFTLBREQ: access: rw description: Software last burst request flags for each of 16 possible sources lsb: 0 reset_value: '0x00' width: 16 - GPDMA_SOFTLSREQ: fields: !!omap - SOFTLSREQ: access: rw description: Software last single transfer request flags for each of 16 possible sources lsb: 0 reset_value: '0x00' width: 16 - GPDMA_CONFIG: fields: !!omap - E: access: rw description: DMA Controller enable lsb: 0 reset_value: '0' width: 1 - M0: access: rw description: AHB Master 0 endianness configuration lsb: 1 reset_value: '0' width: 1 - M1: access: rw description: AHB Master 1 endianness configuration lsb: 2 reset_value: '0' width: 1 - GPDMA_SYNC: fields: !!omap - DMACSYNC: access: rw description: Controls the synchronization logic for DMA request signals lsb: 0 reset_value: '0x00' width: 16 - GPDMA_C0SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C1SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C2SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C3SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C4SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C5SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C6SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C7SRCADDR: fields: !!omap - SRCADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C0DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C1DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C2DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C3DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C4DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C5DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C6DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C7DESTADDR: fields: !!omap - DESTADDR: access: rw description: DMA source address lsb: 0 reset_value: '0x00000000' width: 32 - GPDMA_C0LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C1LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C2LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C3LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C4LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C5LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C6LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C7LLI: fields: !!omap - LM: access: rw description: AHB master select for loading the next LLI lsb: 0 reset_value: '0' width: 1 - LLI: access: rw description: Linked list item lsb: 2 reset_value: '0x00000000' width: 30 - GPDMA_C0CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C1CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C2CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C3CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C4CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C5CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C6CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C7CONTROL: fields: !!omap - TRANSFERSIZE: access: rw description: Transfer size in number of transfers lsb: 0 reset_value: '0x00' width: 12 - SBSIZE: access: rw description: Source burst size lsb: 12 reset_value: '0x0' width: 3 - DBSIZE: access: rw description: Destination burst size lsb: 15 reset_value: '0x0' width: 3 - SWIDTH: access: rw description: Source transfer width lsb: 18 reset_value: '0x0' width: 3 - DWIDTH: access: rw description: Destination transfer width lsb: 21 reset_value: '0x0' width: 3 - S: access: rw description: Source AHB master select lsb: 24 reset_value: '0' width: 1 - D: access: rw description: Destination AHB master select lsb: 25 reset_value: '0' width: 1 - SI: access: rw description: Source increment lsb: 26 reset_value: '0' width: 1 - DI: access: rw description: Destination increment lsb: 27 reset_value: '0' width: 1 - PROT1: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates that the access is in user mode or privileged mode lsb: 28 reset_value: '0' width: 1 - PROT2: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is bufferable or not bufferable lsb: 29 reset_value: '0' width: 1 - PROT3: access: rw description: This information is provided to the peripheral during a DMA bus access and indicates to the peripheral that the access is cacheable or not cacheable lsb: 30 reset_value: '0' width: 1 - I: access: rw description: Terminal count interrupt enable bit lsb: 31 reset_value: '0' width: 1 - GPDMA_C0CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C1CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C2CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C3CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C4CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C5CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C6CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 - GPDMA_C7CONFIG: fields: !!omap - E: access: rw description: Channel enable lsb: 0 reset_value: '0' width: 1 - SRCPERIPHERAL: access: rw description: Source peripheral lsb: 1 reset_value: '' width: 5 - DESTPERIPHERAL: access: rw description: Destination peripheral lsb: 6 reset_value: '' width: 5 - FLOWCNTRL: access: rw description: Flow control and transfer type lsb: 11 reset_value: '' width: 3 - IE: access: rw description: Interrupt error mask lsb: 14 reset_value: '' width: 1 - ITC: access: rw description: Terminal count interrupt mask lsb: 15 reset_value: '' width: 1 - L: access: rw description: Lock lsb: 16 reset_value: '' width: 1 - A: access: r description: Active lsb: 17 reset_value: '' width: 1 - H: access: rw description: Halt lsb: 18 reset_value: '' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gpio.csv ================================================ GPIO_PIN_INTERRUPT_ISEL,0,8,PMODE,Selects the interrupt mode for each pin interrupt,0,rw GPIO_PIN_INTERRUPT_IENR,0,8,ENRL,Enables the rising edge or level interrupt for each pin interrupt,0,rw GPIO_PIN_INTERRUPT_SIENR,0,8,SETENRL,"Ones written to this address set bits in the IENR, thus enabling interrupts",,w GPIO_PIN_INTERRUPT_CIENR,0,8,CENRL,"Ones written to this address clear bits in the IENR, thus disabling the interrupts",,w GPIO_PIN_INTERRUPT_IENF,0,8,ENAF,Enables the falling edge or configures the active level interrupt for each pin interrupt,0,rw GPIO_PIN_INTERRUPT_SIENF,0,8,SETENAF,"Ones written to this address set bits in the IENF, thus enabling interrupts",,w GPIO_PIN_INTERRUPT_CIENF,0,8,CENAF,"Ones written to this address clears bits in the IENF, thus disabling interrupts",,w GPIO_PIN_INTERRUPT_RISE,0,8,RDET,Rising edge detect,0,rw GPIO_PIN_INTERRUPT_FALL,0,8,FDET,Falling edge detect,0,rw GPIO_PIN_INTERRUPT_IST,0,8,PSTAT,Pin interrupt status,0,rw GPIO_GROUP0_INTERRUPT_CTRL,0,1,INT,Group interrupt status,0,rw GPIO_GROUP0_INTERRUPT_CTRL,1,1,COMB,Combine enabled inputs for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_CTRL,2,1,TRIG,Group interrupt trigger,0,rw GPIO_GROUP0_INTERRUPT_PORT_POL0,0,32,POL,Configure pin polarity of port 0 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL1,0,32,POL,Configure pin polarity of port 1 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL2,0,32,POL,Configure pin polarity of port 2 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL3,0,32,POL,Configure pin polarity of port 3 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL4,0,32,POL,Configure pin polarity of port 4 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL5,0,32,POL,Configure pin polarity of port 5 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL6,0,32,POL,Configure pin polarity of port 6 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_POL7,0,32,POL,Configure pin polarity of port 7 pins for group interrupt,1,rw GPIO_GROUP0_INTERRUPT_PORT_ENA0,0,32,ENA,Enable port 0 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA1,0,32,ENA,Enable port 1 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA2,0,32,ENA,Enable port 2 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA3,0,32,ENA,Enable port 3 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA4,0,32,ENA,Enable port 4 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA5,0,32,ENA,Enable port 5 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA6,0,32,ENA,Enable port 6 pin for group interrupt,0,rw GPIO_GROUP0_INTERRUPT_PORT_ENA7,0,32,ENA,Enable port 7 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_CTRL,0,1,INT,Group interrupt status,0,rw GPIO_GROUP1_INTERRUPT_CTRL,1,1,COMB,Combine enabled inputs for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_CTRL,2,1,TRIG,Group interrupt trigger,0,rw GPIO_GROUP1_INTERRUPT_PORT_POL0,0,32,POL,Configure pin polarity of port 0 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL1,0,32,POL,Configure pin polarity of port 1 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL2,0,32,POL,Configure pin polarity of port 2 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL3,0,32,POL,Configure pin polarity of port 3 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL4,0,32,POL,Configure pin polarity of port 4 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL5,0,32,POL,Configure pin polarity of port 5 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL6,0,32,POL,Configure pin polarity of port 6 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_POL7,0,32,POL,Configure pin polarity of port 7 pins for group interrupt,1,rw GPIO_GROUP1_INTERRUPT_PORT_ENA0,0,32,ENA,Enable port 0 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA1,0,32,ENA,Enable port 1 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA2,0,32,ENA,Enable port 2 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA3,0,32,ENA,Enable port 3 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA4,0,32,ENA,Enable port 4 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA5,0,32,ENA,Enable port 5 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA6,0,32,ENA,Enable port 6 pin for group interrupt,0,rw GPIO_GROUP1_INTERRUPT_PORT_ENA7,0,32,ENA,Enable port 7 pin for group interrupt,0,rw GPIO_B0,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B1,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B2,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B3,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B4,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B5,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B6,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B7,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B8,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B9,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B10,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B11,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B12,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B13,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B14,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B15,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B16,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B17,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B18,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B19,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B20,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B21,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B22,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B23,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B24,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B25,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B26,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B27,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B28,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B29,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B30,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B31,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B32,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B33,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B34,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B35,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B36,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B37,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B38,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B39,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B40,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B41,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B42,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B43,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B44,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B45,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B46,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B47,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B48,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B49,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B50,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B51,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B52,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B53,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B54,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B55,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B56,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B57,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B58,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B59,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B60,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B61,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B62,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B63,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B64,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B65,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B66,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B67,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B68,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B69,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B70,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B71,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B72,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B73,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B74,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B75,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B76,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B77,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B78,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B79,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B80,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B81,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B82,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B83,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B84,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B85,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B86,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B87,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B88,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B89,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B90,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B91,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B92,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B93,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B94,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B95,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B96,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B97,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B98,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B99,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B100,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B101,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B102,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B103,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B104,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B105,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B106,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B107,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B108,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B109,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B110,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B111,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B112,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B113,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B114,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B115,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B116,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B117,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B118,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B119,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B120,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B121,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B122,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B123,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B124,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B125,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B126,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B127,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B128,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B129,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B130,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B131,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B132,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B133,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B134,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B135,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B136,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B137,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B138,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B139,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B140,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B141,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B142,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B143,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B144,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B145,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B146,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B147,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B148,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B149,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B150,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B151,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B152,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B153,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B154,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B155,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B156,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B157,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B158,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B159,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B160,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B161,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B162,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B163,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B164,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B165,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B166,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B167,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B168,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B169,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B170,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B171,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B172,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B173,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B174,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B175,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B176,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B177,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B178,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B179,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B180,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B181,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B182,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B183,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B184,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B185,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B186,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B187,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B188,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B189,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B190,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B191,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B192,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B193,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B194,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B195,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B196,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B197,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B198,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B199,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B200,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B201,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B202,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B203,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B204,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B205,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B206,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B207,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B208,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B209,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B210,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B211,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B212,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B213,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B214,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B215,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B216,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B217,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B218,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B219,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B220,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B221,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B222,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B223,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B224,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B225,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B226,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B227,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B228,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B229,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B230,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B231,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B232,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B233,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B234,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B235,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B236,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B237,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B238,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B239,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B240,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B241,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B242,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B243,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B244,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B245,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B246,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B247,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B248,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B249,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B250,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B251,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B252,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B253,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B254,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_B255,0,1,PBYTE,GPIO port byte pin register,,rw GPIO_W0,0,32,PWORD,GPIO port word pin register,,rw GPIO_W1,0,32,PWORD,GPIO port word pin register,,rw GPIO_W2,0,32,PWORD,GPIO port word pin register,,rw GPIO_W3,0,32,PWORD,GPIO port word pin register,,rw GPIO_W4,0,32,PWORD,GPIO port word pin register,,rw GPIO_W5,0,32,PWORD,GPIO port word pin register,,rw GPIO_W6,0,32,PWORD,GPIO port word pin register,,rw GPIO_W7,0,32,PWORD,GPIO port word pin register,,rw GPIO_W8,0,32,PWORD,GPIO port word pin register,,rw GPIO_W9,0,32,PWORD,GPIO port word pin register,,rw GPIO_W10,0,32,PWORD,GPIO port word pin register,,rw GPIO_W11,0,32,PWORD,GPIO port word pin register,,rw GPIO_W12,0,32,PWORD,GPIO port word pin register,,rw GPIO_W13,0,32,PWORD,GPIO port word pin register,,rw GPIO_W14,0,32,PWORD,GPIO port word pin register,,rw GPIO_W15,0,32,PWORD,GPIO port word pin register,,rw GPIO_W16,0,32,PWORD,GPIO port word pin register,,rw GPIO_W17,0,32,PWORD,GPIO port word pin register,,rw GPIO_W18,0,32,PWORD,GPIO port word pin register,,rw GPIO_W19,0,32,PWORD,GPIO port word pin register,,rw GPIO_W20,0,32,PWORD,GPIO port word pin register,,rw GPIO_W21,0,32,PWORD,GPIO port word pin register,,rw GPIO_W22,0,32,PWORD,GPIO port word pin register,,rw GPIO_W23,0,32,PWORD,GPIO port word pin register,,rw GPIO_W24,0,32,PWORD,GPIO port word pin register,,rw GPIO_W25,0,32,PWORD,GPIO port word pin register,,rw GPIO_W26,0,32,PWORD,GPIO port word pin register,,rw GPIO_W27,0,32,PWORD,GPIO port word pin register,,rw GPIO_W28,0,32,PWORD,GPIO port word pin register,,rw GPIO_W29,0,32,PWORD,GPIO port word pin register,,rw GPIO_W30,0,32,PWORD,GPIO port word pin register,,rw GPIO_W31,0,32,PWORD,GPIO port word pin register,,rw GPIO_W32,0,32,PWORD,GPIO port word pin register,,rw GPIO_W33,0,32,PWORD,GPIO port word pin register,,rw GPIO_W34,0,32,PWORD,GPIO port word pin register,,rw GPIO_W35,0,32,PWORD,GPIO port word pin register,,rw GPIO_W36,0,32,PWORD,GPIO port word pin register,,rw GPIO_W37,0,32,PWORD,GPIO port word pin register,,rw GPIO_W38,0,32,PWORD,GPIO port word pin register,,rw GPIO_W39,0,32,PWORD,GPIO port word pin register,,rw GPIO_W40,0,32,PWORD,GPIO port word pin register,,rw GPIO_W41,0,32,PWORD,GPIO port word pin register,,rw GPIO_W42,0,32,PWORD,GPIO port word pin register,,rw GPIO_W43,0,32,PWORD,GPIO port word pin register,,rw GPIO_W44,0,32,PWORD,GPIO port word pin register,,rw GPIO_W45,0,32,PWORD,GPIO port word pin register,,rw GPIO_W46,0,32,PWORD,GPIO port word pin register,,rw GPIO_W47,0,32,PWORD,GPIO port word pin register,,rw GPIO_W48,0,32,PWORD,GPIO port word pin register,,rw GPIO_W49,0,32,PWORD,GPIO port word pin register,,rw GPIO_W50,0,32,PWORD,GPIO port word pin register,,rw GPIO_W51,0,32,PWORD,GPIO port word pin register,,rw GPIO_W52,0,32,PWORD,GPIO port word pin register,,rw GPIO_W53,0,32,PWORD,GPIO port word pin register,,rw GPIO_W54,0,32,PWORD,GPIO port word pin register,,rw GPIO_W55,0,32,PWORD,GPIO port word pin register,,rw GPIO_W56,0,32,PWORD,GPIO port word pin register,,rw GPIO_W57,0,32,PWORD,GPIO port word pin register,,rw GPIO_W58,0,32,PWORD,GPIO port word pin register,,rw GPIO_W59,0,32,PWORD,GPIO port word pin register,,rw GPIO_W60,0,32,PWORD,GPIO port word pin register,,rw GPIO_W61,0,32,PWORD,GPIO port word pin register,,rw GPIO_W62,0,32,PWORD,GPIO port word pin register,,rw GPIO_W63,0,32,PWORD,GPIO port word pin register,,rw GPIO_W64,0,32,PWORD,GPIO port word pin register,,rw GPIO_W65,0,32,PWORD,GPIO port word pin register,,rw GPIO_W66,0,32,PWORD,GPIO port word pin register,,rw GPIO_W67,0,32,PWORD,GPIO port word pin register,,rw GPIO_W68,0,32,PWORD,GPIO port word pin register,,rw GPIO_W69,0,32,PWORD,GPIO port word pin register,,rw GPIO_W70,0,32,PWORD,GPIO port word pin register,,rw GPIO_W71,0,32,PWORD,GPIO port word pin register,,rw GPIO_W72,0,32,PWORD,GPIO port word pin register,,rw GPIO_W73,0,32,PWORD,GPIO port word pin register,,rw GPIO_W74,0,32,PWORD,GPIO port word pin register,,rw GPIO_W75,0,32,PWORD,GPIO port word pin register,,rw GPIO_W76,0,32,PWORD,GPIO port word pin register,,rw GPIO_W77,0,32,PWORD,GPIO port word pin register,,rw GPIO_W78,0,32,PWORD,GPIO port word pin register,,rw GPIO_W79,0,32,PWORD,GPIO port word pin register,,rw GPIO_W80,0,32,PWORD,GPIO port word pin register,,rw GPIO_W81,0,32,PWORD,GPIO port word pin register,,rw GPIO_W82,0,32,PWORD,GPIO port word pin register,,rw GPIO_W83,0,32,PWORD,GPIO port word pin register,,rw GPIO_W84,0,32,PWORD,GPIO port word pin register,,rw GPIO_W85,0,32,PWORD,GPIO port word pin register,,rw GPIO_W86,0,32,PWORD,GPIO port word pin register,,rw GPIO_W87,0,32,PWORD,GPIO port word pin register,,rw GPIO_W88,0,32,PWORD,GPIO port word pin register,,rw GPIO_W89,0,32,PWORD,GPIO port word pin register,,rw GPIO_W90,0,32,PWORD,GPIO port word pin register,,rw GPIO_W91,0,32,PWORD,GPIO port word pin register,,rw GPIO_W92,0,32,PWORD,GPIO port word pin register,,rw GPIO_W93,0,32,PWORD,GPIO port word pin register,,rw GPIO_W94,0,32,PWORD,GPIO port word pin register,,rw GPIO_W95,0,32,PWORD,GPIO port word pin register,,rw GPIO_W96,0,32,PWORD,GPIO port word pin register,,rw GPIO_W97,0,32,PWORD,GPIO port word pin register,,rw GPIO_W98,0,32,PWORD,GPIO port word pin register,,rw GPIO_W99,0,32,PWORD,GPIO port word pin register,,rw GPIO_W100,0,32,PWORD,GPIO port word pin register,,rw GPIO_W101,0,32,PWORD,GPIO port word pin register,,rw GPIO_W102,0,32,PWORD,GPIO port word pin register,,rw GPIO_W103,0,32,PWORD,GPIO port word pin register,,rw GPIO_W104,0,32,PWORD,GPIO port word pin register,,rw GPIO_W105,0,32,PWORD,GPIO port word pin register,,rw GPIO_W106,0,32,PWORD,GPIO port word pin register,,rw GPIO_W107,0,32,PWORD,GPIO port word pin register,,rw GPIO_W108,0,32,PWORD,GPIO port word pin register,,rw GPIO_W109,0,32,PWORD,GPIO port word pin register,,rw GPIO_W110,0,32,PWORD,GPIO port word pin register,,rw GPIO_W111,0,32,PWORD,GPIO port word pin register,,rw GPIO_W112,0,32,PWORD,GPIO port word pin register,,rw GPIO_W113,0,32,PWORD,GPIO port word pin register,,rw GPIO_W114,0,32,PWORD,GPIO port word pin register,,rw GPIO_W115,0,32,PWORD,GPIO port word pin register,,rw GPIO_W116,0,32,PWORD,GPIO port word pin register,,rw GPIO_W117,0,32,PWORD,GPIO port word pin register,,rw GPIO_W118,0,32,PWORD,GPIO port word pin register,,rw GPIO_W119,0,32,PWORD,GPIO port word pin register,,rw GPIO_W120,0,32,PWORD,GPIO port word pin register,,rw GPIO_W121,0,32,PWORD,GPIO port word pin register,,rw GPIO_W122,0,32,PWORD,GPIO port word pin register,,rw GPIO_W123,0,32,PWORD,GPIO port word pin register,,rw GPIO_W124,0,32,PWORD,GPIO port word pin register,,rw GPIO_W125,0,32,PWORD,GPIO port word pin register,,rw GPIO_W126,0,32,PWORD,GPIO port word pin register,,rw GPIO_W127,0,32,PWORD,GPIO port word pin register,,rw GPIO_W128,0,32,PWORD,GPIO port word pin register,,rw GPIO_W129,0,32,PWORD,GPIO port word pin register,,rw GPIO_W130,0,32,PWORD,GPIO port word pin register,,rw GPIO_W131,0,32,PWORD,GPIO port word pin register,,rw GPIO_W132,0,32,PWORD,GPIO port word pin register,,rw GPIO_W133,0,32,PWORD,GPIO port word pin register,,rw GPIO_W134,0,32,PWORD,GPIO port word pin register,,rw GPIO_W135,0,32,PWORD,GPIO port word pin register,,rw GPIO_W136,0,32,PWORD,GPIO port word pin register,,rw GPIO_W137,0,32,PWORD,GPIO port word pin register,,rw GPIO_W138,0,32,PWORD,GPIO port word pin register,,rw GPIO_W139,0,32,PWORD,GPIO port word pin register,,rw GPIO_W140,0,32,PWORD,GPIO port word pin register,,rw GPIO_W141,0,32,PWORD,GPIO port word pin register,,rw GPIO_W142,0,32,PWORD,GPIO port word pin register,,rw GPIO_W143,0,32,PWORD,GPIO port word pin register,,rw GPIO_W144,0,32,PWORD,GPIO port word pin register,,rw GPIO_W145,0,32,PWORD,GPIO port word pin register,,rw GPIO_W146,0,32,PWORD,GPIO port word pin register,,rw GPIO_W147,0,32,PWORD,GPIO port word pin register,,rw GPIO_W148,0,32,PWORD,GPIO port word pin register,,rw GPIO_W149,0,32,PWORD,GPIO port word pin register,,rw GPIO_W150,0,32,PWORD,GPIO port word pin register,,rw GPIO_W151,0,32,PWORD,GPIO port word pin register,,rw GPIO_W152,0,32,PWORD,GPIO port word pin register,,rw GPIO_W153,0,32,PWORD,GPIO port word pin register,,rw GPIO_W154,0,32,PWORD,GPIO port word pin register,,rw GPIO_W155,0,32,PWORD,GPIO port word pin register,,rw GPIO_W156,0,32,PWORD,GPIO port word pin register,,rw GPIO_W157,0,32,PWORD,GPIO port word pin register,,rw GPIO_W158,0,32,PWORD,GPIO port word pin register,,rw GPIO_W159,0,32,PWORD,GPIO port word pin register,,rw GPIO_W160,0,32,PWORD,GPIO port word pin register,,rw GPIO_W161,0,32,PWORD,GPIO port word pin register,,rw GPIO_W162,0,32,PWORD,GPIO port word pin register,,rw GPIO_W163,0,32,PWORD,GPIO port word pin register,,rw GPIO_W164,0,32,PWORD,GPIO port word pin register,,rw GPIO_W165,0,32,PWORD,GPIO port word pin register,,rw GPIO_W166,0,32,PWORD,GPIO port word pin register,,rw GPIO_W167,0,32,PWORD,GPIO port word pin register,,rw GPIO_W168,0,32,PWORD,GPIO port word pin register,,rw GPIO_W169,0,32,PWORD,GPIO port word pin register,,rw GPIO_W170,0,32,PWORD,GPIO port word pin register,,rw GPIO_W171,0,32,PWORD,GPIO port word pin register,,rw GPIO_W172,0,32,PWORD,GPIO port word pin register,,rw GPIO_W173,0,32,PWORD,GPIO port word pin register,,rw GPIO_W174,0,32,PWORD,GPIO port word pin register,,rw GPIO_W175,0,32,PWORD,GPIO port word pin register,,rw GPIO_W176,0,32,PWORD,GPIO port word pin register,,rw GPIO_W177,0,32,PWORD,GPIO port word pin register,,rw GPIO_W178,0,32,PWORD,GPIO port word pin register,,rw GPIO_W179,0,32,PWORD,GPIO port word pin register,,rw GPIO_W180,0,32,PWORD,GPIO port word pin register,,rw GPIO_W181,0,32,PWORD,GPIO port word pin register,,rw GPIO_W182,0,32,PWORD,GPIO port word pin register,,rw GPIO_W183,0,32,PWORD,GPIO port word pin register,,rw GPIO_W184,0,32,PWORD,GPIO port word pin register,,rw GPIO_W185,0,32,PWORD,GPIO port word pin register,,rw GPIO_W186,0,32,PWORD,GPIO port word pin register,,rw GPIO_W187,0,32,PWORD,GPIO port word pin register,,rw GPIO_W188,0,32,PWORD,GPIO port word pin register,,rw GPIO_W189,0,32,PWORD,GPIO port word pin register,,rw GPIO_W190,0,32,PWORD,GPIO port word pin register,,rw GPIO_W191,0,32,PWORD,GPIO port word pin register,,rw GPIO_W192,0,32,PWORD,GPIO port word pin register,,rw GPIO_W193,0,32,PWORD,GPIO port word pin register,,rw GPIO_W194,0,32,PWORD,GPIO port word pin register,,rw GPIO_W195,0,32,PWORD,GPIO port word pin register,,rw GPIO_W196,0,32,PWORD,GPIO port word pin register,,rw GPIO_W197,0,32,PWORD,GPIO port word pin register,,rw GPIO_W198,0,32,PWORD,GPIO port word pin register,,rw GPIO_W199,0,32,PWORD,GPIO port word pin register,,rw GPIO_W200,0,32,PWORD,GPIO port word pin register,,rw GPIO_W201,0,32,PWORD,GPIO port word pin register,,rw GPIO_W202,0,32,PWORD,GPIO port word pin register,,rw GPIO_W203,0,32,PWORD,GPIO port word pin register,,rw GPIO_W204,0,32,PWORD,GPIO port word pin register,,rw GPIO_W205,0,32,PWORD,GPIO port word pin register,,rw GPIO_W206,0,32,PWORD,GPIO port word pin register,,rw GPIO_W207,0,32,PWORD,GPIO port word pin register,,rw GPIO_W208,0,32,PWORD,GPIO port word pin register,,rw GPIO_W209,0,32,PWORD,GPIO port word pin register,,rw GPIO_W210,0,32,PWORD,GPIO port word pin register,,rw GPIO_W211,0,32,PWORD,GPIO port word pin register,,rw GPIO_W212,0,32,PWORD,GPIO port word pin register,,rw GPIO_W213,0,32,PWORD,GPIO port word pin register,,rw GPIO_W214,0,32,PWORD,GPIO port word pin register,,rw GPIO_W215,0,32,PWORD,GPIO port word pin register,,rw GPIO_W216,0,32,PWORD,GPIO port word pin register,,rw GPIO_W217,0,32,PWORD,GPIO port word pin register,,rw GPIO_W218,0,32,PWORD,GPIO port word pin register,,rw GPIO_W219,0,32,PWORD,GPIO port word pin register,,rw GPIO_W220,0,32,PWORD,GPIO port word pin register,,rw GPIO_W221,0,32,PWORD,GPIO port word pin register,,rw GPIO_W222,0,32,PWORD,GPIO port word pin register,,rw GPIO_W223,0,32,PWORD,GPIO port word pin register,,rw GPIO_W224,0,32,PWORD,GPIO port word pin register,,rw GPIO_W225,0,32,PWORD,GPIO port word pin register,,rw GPIO_W226,0,32,PWORD,GPIO port word pin register,,rw GPIO_W227,0,32,PWORD,GPIO port word pin register,,rw GPIO_W228,0,32,PWORD,GPIO port word pin register,,rw GPIO_W229,0,32,PWORD,GPIO port word pin register,,rw GPIO_W230,0,32,PWORD,GPIO port word pin register,,rw GPIO_W231,0,32,PWORD,GPIO port word pin register,,rw GPIO_W232,0,32,PWORD,GPIO port word pin register,,rw GPIO_W233,0,32,PWORD,GPIO port word pin register,,rw GPIO_W234,0,32,PWORD,GPIO port word pin register,,rw GPIO_W235,0,32,PWORD,GPIO port word pin register,,rw GPIO_W236,0,32,PWORD,GPIO port word pin register,,rw GPIO_W237,0,32,PWORD,GPIO port word pin register,,rw GPIO_W238,0,32,PWORD,GPIO port word pin register,,rw GPIO_W239,0,32,PWORD,GPIO port word pin register,,rw GPIO_W240,0,32,PWORD,GPIO port word pin register,,rw GPIO_W241,0,32,PWORD,GPIO port word pin register,,rw GPIO_W242,0,32,PWORD,GPIO port word pin register,,rw GPIO_W243,0,32,PWORD,GPIO port word pin register,,rw GPIO_W244,0,32,PWORD,GPIO port word pin register,,rw GPIO_W245,0,32,PWORD,GPIO port word pin register,,rw GPIO_W246,0,32,PWORD,GPIO port word pin register,,rw GPIO_W247,0,32,PWORD,GPIO port word pin register,,rw GPIO_W248,0,32,PWORD,GPIO port word pin register,,rw GPIO_W249,0,32,PWORD,GPIO port word pin register,,rw GPIO_W250,0,32,PWORD,GPIO port word pin register,,rw GPIO_W251,0,32,PWORD,GPIO port word pin register,,rw GPIO_W252,0,32,PWORD,GPIO port word pin register,,rw GPIO_W253,0,32,PWORD,GPIO port word pin register,,rw GPIO_W254,0,32,PWORD,GPIO port word pin register,,rw GPIO_W255,0,32,PWORD,GPIO port word pin register,,rw GPIO0_DIR,0,32,DIR,Selects pin direction for GPIO0,0,rw GPIO1_DIR,0,32,DIR,Selects pin direction for GPIO1,0,rw GPIO2_DIR,0,32,DIR,Selects pin direction for GPIO2,0,rw GPIO3_DIR,0,32,DIR,Selects pin direction for GPIO3,0,rw GPIO4_DIR,0,32,DIR,Selects pin direction for GPIO4,0,rw GPIO5_DIR,0,32,DIR,Selects pin direction for GPIO5,0,rw GPIO6_DIR,0,32,DIR,Selects pin direction for GPIO6,0,rw GPIO7_DIR,0,32,DIR,Selects pin direction for GPIO7,0,rw GPIO0_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO1_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO2_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO3_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO4_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO5_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO6_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO7_MASK,0,32,MASK,Controls which pins are active in the MPORT register,0,rw GPIO0_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO1_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO2_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO3_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO4_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO5_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO6_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO7_PIN,0,32,PORT,Reads pin states or loads output bits,,rw GPIO0_MPIN,0,32,MPORT,Masked port register,,rw GPIO1_MPIN,0,32,MPORT,Masked port register,,rw GPIO2_MPIN,0,32,MPORT,Masked port register,,rw GPIO3_MPIN,0,32,MPORT,Masked port register,,rw GPIO4_MPIN,0,32,MPORT,Masked port register,,rw GPIO5_MPIN,0,32,MPORT,Masked port register,,rw GPIO6_MPIN,0,32,MPORT,Masked port register,,rw GPIO7_MPIN,0,32,MPORT,Masked port register,,rw GPIO0_SET,0,32,SET,Read or set output bits,0,rw GPIO1_SET,0,32,SET,Read or set output bits,0,rw GPIO2_SET,0,32,SET,Read or set output bits,0,rw GPIO3_SET,0,32,SET,Read or set output bits,0,rw GPIO4_SET,0,32,SET,Read or set output bits,0,rw GPIO5_SET,0,32,SET,Read or set output bits,0,rw GPIO6_SET,0,32,SET,Read or set output bits,0,rw GPIO7_SET,0,32,SET,Read or set output bits,0,rw GPIO0_CLR,0,32,CLR,Clear output bits,,w GPIO1_CLR,0,32,CLR,Clear output bits,,w GPIO2_CLR,0,32,CLR,Clear output bits,,w GPIO3_CLR,0,32,CLR,Clear output bits,,w GPIO4_CLR,0,32,CLR,Clear output bits,,w GPIO5_CLR,0,32,CLR,Clear output bits,,w GPIO6_CLR,0,32,CLR,Clear output bits,,w GPIO7_CLR,0,32,CLR,Clear output bits,,w GPIO0_NOT,0,32,NOT,Toggle output bits,,w GPIO1_NOT,0,32,NOT,Toggle output bits,,w GPIO2_NOT,0,32,NOT,Toggle output bits,,w GPIO3_NOT,0,32,NOT,Toggle output bits,,w GPIO4_NOT,0,32,NOT,Toggle output bits,,w GPIO5_NOT,0,32,NOT,Toggle output bits,,w GPIO6_NOT,0,32,NOT,Toggle output bits,,w GPIO7_NOT,0,32,NOT,Toggle output bits,,w ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/gpio.yaml ================================================ !!omap - GPIO_PIN_INTERRUPT_ISEL: fields: !!omap - PMODE: access: rw description: Selects the interrupt mode for each pin interrupt lsb: 0 reset_value: '0' width: 8 - GPIO_PIN_INTERRUPT_IENR: fields: !!omap - ENRL: access: rw description: Enables the rising edge or level interrupt for each pin interrupt lsb: 0 reset_value: '0' width: 8 - GPIO_PIN_INTERRUPT_SIENR: fields: !!omap - SETENRL: access: w description: Ones written to this address set bits in the IENR, thus enabling interrupts lsb: 0 reset_value: '' width: 8 - GPIO_PIN_INTERRUPT_CIENR: fields: !!omap - CENRL: access: w description: Ones written to this address clear bits in the IENR, thus disabling the interrupts lsb: 0 reset_value: '' width: 8 - GPIO_PIN_INTERRUPT_IENF: fields: !!omap - ENAF: access: rw description: Enables the falling edge or configures the active level interrupt for each pin interrupt lsb: 0 reset_value: '0' width: 8 - GPIO_PIN_INTERRUPT_SIENF: fields: !!omap - SETENAF: access: w description: Ones written to this address set bits in the IENF, thus enabling interrupts lsb: 0 reset_value: '' width: 8 - GPIO_PIN_INTERRUPT_CIENF: fields: !!omap - CENAF: access: w description: Ones written to this address clears bits in the IENF, thus disabling interrupts lsb: 0 reset_value: '' width: 8 - GPIO_PIN_INTERRUPT_RISE: fields: !!omap - RDET: access: rw description: Rising edge detect lsb: 0 reset_value: '0' width: 8 - GPIO_PIN_INTERRUPT_FALL: fields: !!omap - FDET: access: rw description: Falling edge detect lsb: 0 reset_value: '0' width: 8 - GPIO_PIN_INTERRUPT_IST: fields: !!omap - PSTAT: access: rw description: Pin interrupt status lsb: 0 reset_value: '0' width: 8 - GPIO_GROUP0_INTERRUPT_CTRL: fields: !!omap - INT: access: rw description: Group interrupt status lsb: 0 reset_value: '0' width: 1 - COMB: access: rw description: Combine enabled inputs for group interrupt lsb: 1 reset_value: '0' width: 1 - TRIG: access: rw description: Group interrupt trigger lsb: 2 reset_value: '0' width: 1 - GPIO_GROUP0_INTERRUPT_PORT_POL0: fields: !!omap - POL: access: rw description: Configure pin polarity of port 0 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL1: fields: !!omap - POL: access: rw description: Configure pin polarity of port 1 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL2: fields: !!omap - POL: access: rw description: Configure pin polarity of port 2 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL3: fields: !!omap - POL: access: rw description: Configure pin polarity of port 3 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL4: fields: !!omap - POL: access: rw description: Configure pin polarity of port 4 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL5: fields: !!omap - POL: access: rw description: Configure pin polarity of port 5 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL6: fields: !!omap - POL: access: rw description: Configure pin polarity of port 6 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_POL7: fields: !!omap - POL: access: rw description: Configure pin polarity of port 7 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA0: fields: !!omap - ENA: access: rw description: Enable port 0 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA1: fields: !!omap - ENA: access: rw description: Enable port 1 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA2: fields: !!omap - ENA: access: rw description: Enable port 2 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA3: fields: !!omap - ENA: access: rw description: Enable port 3 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA4: fields: !!omap - ENA: access: rw description: Enable port 4 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA5: fields: !!omap - ENA: access: rw description: Enable port 5 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA6: fields: !!omap - ENA: access: rw description: Enable port 6 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP0_INTERRUPT_PORT_ENA7: fields: !!omap - ENA: access: rw description: Enable port 7 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_CTRL: fields: !!omap - INT: access: rw description: Group interrupt status lsb: 0 reset_value: '0' width: 1 - COMB: access: rw description: Combine enabled inputs for group interrupt lsb: 1 reset_value: '0' width: 1 - TRIG: access: rw description: Group interrupt trigger lsb: 2 reset_value: '0' width: 1 - GPIO_GROUP1_INTERRUPT_PORT_POL0: fields: !!omap - POL: access: rw description: Configure pin polarity of port 0 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL1: fields: !!omap - POL: access: rw description: Configure pin polarity of port 1 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL2: fields: !!omap - POL: access: rw description: Configure pin polarity of port 2 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL3: fields: !!omap - POL: access: rw description: Configure pin polarity of port 3 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL4: fields: !!omap - POL: access: rw description: Configure pin polarity of port 4 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL5: fields: !!omap - POL: access: rw description: Configure pin polarity of port 5 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL6: fields: !!omap - POL: access: rw description: Configure pin polarity of port 6 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_POL7: fields: !!omap - POL: access: rw description: Configure pin polarity of port 7 pins for group interrupt lsb: 0 reset_value: '1' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA0: fields: !!omap - ENA: access: rw description: Enable port 0 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA1: fields: !!omap - ENA: access: rw description: Enable port 1 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA2: fields: !!omap - ENA: access: rw description: Enable port 2 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA3: fields: !!omap - ENA: access: rw description: Enable port 3 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA4: fields: !!omap - ENA: access: rw description: Enable port 4 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA5: fields: !!omap - ENA: access: rw description: Enable port 5 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA6: fields: !!omap - ENA: access: rw description: Enable port 6 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_GROUP1_INTERRUPT_PORT_ENA7: fields: !!omap - ENA: access: rw description: Enable port 7 pin for group interrupt lsb: 0 reset_value: '0' width: 32 - GPIO_B0: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B1: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B2: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B3: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B4: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B5: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B6: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B7: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B8: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B9: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B10: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B11: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B12: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B13: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B14: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B15: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B16: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B17: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B18: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B19: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B20: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B21: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B22: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B23: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B24: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B25: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B26: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B27: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B28: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B29: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B30: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B31: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B32: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B33: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B34: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B35: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B36: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B37: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B38: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B39: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B40: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B41: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B42: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B43: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B44: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B45: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B46: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B47: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B48: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B49: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B50: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B51: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B52: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B53: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B54: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B55: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B56: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B57: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B58: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B59: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B60: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B61: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B62: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B63: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B64: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B65: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B66: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B67: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B68: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B69: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B70: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B71: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B72: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B73: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B74: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B75: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B76: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B77: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B78: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B79: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B80: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B81: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B82: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B83: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B84: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B85: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B86: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B87: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B88: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B89: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B90: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B91: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B92: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B93: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B94: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B95: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B96: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B97: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B98: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B99: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B100: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B101: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B102: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B103: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B104: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B105: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B106: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B107: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B108: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B109: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B110: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B111: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B112: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B113: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B114: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B115: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B116: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B117: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B118: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B119: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B120: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B121: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B122: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B123: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B124: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B125: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B126: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B127: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B128: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B129: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B130: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B131: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B132: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B133: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B134: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B135: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B136: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B137: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B138: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B139: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B140: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B141: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B142: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B143: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B144: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B145: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B146: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B147: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B148: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B149: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B150: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B151: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B152: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B153: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B154: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B155: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B156: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B157: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B158: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B159: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B160: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B161: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B162: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B163: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B164: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B165: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B166: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B167: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B168: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B169: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B170: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B171: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B172: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B173: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B174: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B175: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B176: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B177: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B178: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B179: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B180: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B181: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B182: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B183: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B184: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B185: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B186: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B187: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B188: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B189: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B190: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B191: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B192: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B193: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B194: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B195: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B196: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B197: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B198: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B199: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B200: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B201: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B202: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B203: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B204: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B205: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B206: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B207: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B208: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B209: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B210: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B211: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B212: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B213: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B214: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B215: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B216: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B217: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B218: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B219: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B220: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B221: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B222: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B223: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B224: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B225: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B226: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B227: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B228: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B229: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B230: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B231: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B232: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B233: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B234: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B235: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B236: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B237: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B238: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B239: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B240: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B241: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B242: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B243: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B244: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B245: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B246: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B247: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B248: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B249: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B250: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B251: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B252: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B253: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B254: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_B255: fields: !!omap - PBYTE: access: rw description: GPIO port byte pin register lsb: 0 reset_value: '' width: 1 - GPIO_W0: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W1: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W2: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W3: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W4: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W5: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W6: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W7: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W8: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W9: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W10: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W11: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W12: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W13: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W14: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W15: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W16: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W17: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W18: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W19: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W20: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W21: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W22: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W23: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W24: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W25: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W26: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W27: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W28: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W29: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W30: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W31: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W32: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W33: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W34: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W35: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W36: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W37: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W38: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W39: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W40: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W41: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W42: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W43: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W44: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W45: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W46: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W47: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W48: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W49: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W50: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W51: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W52: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W53: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W54: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W55: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W56: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W57: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W58: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W59: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W60: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W61: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W62: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W63: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W64: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W65: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W66: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W67: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W68: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W69: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W70: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W71: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W72: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W73: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W74: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W75: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W76: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W77: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W78: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W79: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W80: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W81: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W82: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W83: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W84: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W85: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W86: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W87: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W88: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W89: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W90: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W91: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W92: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W93: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W94: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W95: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W96: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W97: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W98: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W99: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W100: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W101: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W102: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W103: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W104: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W105: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W106: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W107: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W108: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W109: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W110: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W111: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W112: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W113: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W114: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W115: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W116: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W117: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W118: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W119: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W120: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W121: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W122: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W123: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W124: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W125: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W126: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W127: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W128: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W129: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W130: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W131: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W132: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W133: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W134: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W135: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W136: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W137: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W138: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W139: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W140: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W141: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W142: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W143: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W144: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W145: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W146: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W147: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W148: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W149: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W150: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W151: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W152: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W153: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W154: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W155: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W156: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W157: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W158: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W159: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W160: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W161: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W162: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W163: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W164: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W165: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W166: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W167: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W168: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W169: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W170: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W171: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W172: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W173: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W174: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W175: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W176: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W177: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W178: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W179: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W180: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W181: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W182: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W183: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W184: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W185: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W186: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W187: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W188: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W189: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W190: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W191: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W192: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W193: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W194: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W195: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W196: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W197: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W198: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W199: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W200: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W201: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W202: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W203: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W204: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W205: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W206: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W207: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W208: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W209: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W210: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W211: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W212: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W213: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W214: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W215: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W216: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W217: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W218: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W219: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W220: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W221: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W222: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W223: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W224: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W225: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W226: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W227: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W228: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W229: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W230: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W231: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W232: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W233: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W234: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W235: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W236: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W237: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W238: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W239: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W240: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W241: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W242: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W243: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W244: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W245: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W246: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W247: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W248: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W249: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W250: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W251: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W252: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W253: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W254: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO_W255: fields: !!omap - PWORD: access: rw description: GPIO port word pin register lsb: 0 reset_value: '' width: 32 - GPIO0_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO0 lsb: 0 reset_value: '0' width: 32 - GPIO1_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO1 lsb: 0 reset_value: '0' width: 32 - GPIO2_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO2 lsb: 0 reset_value: '0' width: 32 - GPIO3_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO3 lsb: 0 reset_value: '0' width: 32 - GPIO4_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO4 lsb: 0 reset_value: '0' width: 32 - GPIO5_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO5 lsb: 0 reset_value: '0' width: 32 - GPIO6_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO6 lsb: 0 reset_value: '0' width: 32 - GPIO7_DIR: fields: !!omap - DIR: access: rw description: Selects pin direction for GPIO7 lsb: 0 reset_value: '0' width: 32 - GPIO0_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO1_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO2_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO3_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO4_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO5_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO6_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO7_MASK: fields: !!omap - MASK: access: rw description: Controls which pins are active in the MPORT register lsb: 0 reset_value: '0' width: 32 - GPIO0_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO1_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO2_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO3_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO4_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO5_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO6_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO7_PIN: fields: !!omap - PORT: access: rw description: Reads pin states or loads output bits lsb: 0 reset_value: '' width: 32 - GPIO0_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO1_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO2_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO3_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO4_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO5_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO6_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO7_MPIN: fields: !!omap - MPORT: access: rw description: Masked port register lsb: 0 reset_value: '' width: 32 - GPIO0_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO1_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO2_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO3_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO4_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO5_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO6_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO7_SET: fields: !!omap - SET: access: rw description: Read or set output bits lsb: 0 reset_value: '0' width: 32 - GPIO0_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO1_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO2_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO3_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO4_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO5_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO6_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO7_CLR: fields: !!omap - CLR: access: w description: Clear output bits lsb: 0 reset_value: '' width: 32 - GPIO0_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO1_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO2_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO3_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO4_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO5_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO6_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 - GPIO7_NOT: fields: !!omap - NOT: access: w description: Toggle output bits lsb: 0 reset_value: '' width: 32 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/i2c.csv ================================================ I2C0_CONSET,2,1,AA,Assert acknowledge flag,0,rw I2C0_CONSET,3,1,SI,I2C interrupt flag,0,rw I2C0_CONSET,4,1,STO,STOP flag,0,rw I2C0_CONSET,5,1,STA,START flag,0,rw I2C0_CONSET,6,1,I2EN,I2C interface enable,0,rw I2C1_CONSET,2,1,AA,Assert acknowledge flag,0,rw I2C1_CONSET,3,1,SI,I2C interrupt flag,0,rw I2C1_CONSET,4,1,STO,STOP flag,0,rw I2C1_CONSET,5,1,STA,START flag,0,rw I2C1_CONSET,6,1,I2EN,I2C interface enable,0,rw I2C0_STAT,3,5,STATUS,These bits give the actual status information about the I2C interface,0x1f,r I2C1_STAT,3,5,STATUS,These bits give the actual status information about the I2C interface,0x1f,r I2C0_DAT,0,8,DATA,This register holds data values that have been received or are to be transmitted,0,rw I2C1_DAT,0,8,DATA,This register holds data values that have been received or are to be transmitted,0,rw I2C0_ADR0,0,1,GC,General Call enable bit,0,rw I2C0_ADR0,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C1_ADR0,0,1,GC,General Call enable bit,0,rw I2C1_ADR0,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C0_SCLH,0,16,SCLH,Count for SCL HIGH time period selection,0x0004,rw I2C1_SCLH,0,16,SCLH,Count for SCL HIGH time period selection,0x0004,rw I2C0_SCLL,0,16,SCLL,Count for SCL LOW time period selection,0x0004,rw I2C1_SCLL,0,16,SCLL,Count for SCL LOW time period selection,0x0004,rw I2C0_CONCLR,2,1,AAC,Assert acknowledge Clear bit,0,w I2C0_CONCLR,3,1,SIC,I2C interrupt Clear bit,0,w I2C0_CONCLR,5,1,STAC,START flag Clear bit,0,w I2C0_CONCLR,6,1,I2ENC,I2C interface Disable bit,0,w I2C1_CONCLR,2,1,AAC,Assert acknowledge Clear bit,0,w I2C1_CONCLR,3,1,SIC,I2C interrupt Clear bit,0,w I2C1_CONCLR,5,1,STAC,START flag Clear bit,0,w I2C1_CONCLR,6,1,I2ENC,I2C interface Disable bit,0,w I2C0_MMCTRL,0,1,MM_ENA,Monitor mode enable,0,rw I2C0_MMCTRL,1,1,ENA_SCL,SCL output enable,0,rw I2C0_MMCTRL,2,1,MATCH_ALL,Select interrupt register match,0,rw I2C1_MMCTRL,0,1,MM_ENA,Monitor mode enable,0,rw I2C1_MMCTRL,1,1,ENA_SCL,SCL output enable,0,rw I2C1_MMCTRL,2,1,MATCH_ALL,Select interrupt register match,0,rw I2C0_ADR1,0,1,GC,General Call enable bit,0,rw I2C0_ADR1,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C1_ADR1,0,1,GC,General Call enable bit,0,rw I2C1_ADR1,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C0_ADR2,0,1,GC,General Call enable bit,0,rw I2C0_ADR2,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C1_ADR2,0,1,GC,General Call enable bit,0,rw I2C1_ADR2,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C0_ADR3,0,1,GC,General Call enable bit,0,rw I2C0_ADR3,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C1_ADR3,0,1,GC,General Call enable bit,0,rw I2C1_ADR3,1,7,ADDRESS,The I2C device address for slave mode,0,rw I2C0_DATA_BUFFER,0,8,DATA,This register holds contents of the 8 MSBs of the DAT shift register,0,r I2C1_DATA_BUFFER,0,8,DATA,This register holds contents of the 8 MSBs of the DAT shift register,0,r I2C0_MASK0,1,7,MASK,Mask bits,0,rw I2C1_MASK0,1,7,MASK,Mask bits,0,rw I2C0_MASK1,1,7,MASK,Mask bits,0,rw I2C1_MASK1,1,7,MASK,Mask bits,0,rw I2C0_MASK2,1,7,MASK,Mask bits,0,rw I2C1_MASK2,1,7,MASK,Mask bits,0,rw I2C0_MASK3,1,7,MASK,Mask bits,0,rw I2C1_MASK3,1,7,MASK,Mask bits,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/i2c.yaml ================================================ !!omap - I2C0_CONSET: fields: !!omap - AA: access: rw description: Assert acknowledge flag lsb: 2 reset_value: '0' width: 1 - SI: access: rw description: I2C interrupt flag lsb: 3 reset_value: '0' width: 1 - STO: access: rw description: STOP flag lsb: 4 reset_value: '0' width: 1 - STA: access: rw description: START flag lsb: 5 reset_value: '0' width: 1 - I2EN: access: rw description: I2C interface enable lsb: 6 reset_value: '0' width: 1 - I2C1_CONSET: fields: !!omap - AA: access: rw description: Assert acknowledge flag lsb: 2 reset_value: '0' width: 1 - SI: access: rw description: I2C interrupt flag lsb: 3 reset_value: '0' width: 1 - STO: access: rw description: STOP flag lsb: 4 reset_value: '0' width: 1 - STA: access: rw description: START flag lsb: 5 reset_value: '0' width: 1 - I2EN: access: rw description: I2C interface enable lsb: 6 reset_value: '0' width: 1 - I2C0_STAT: fields: !!omap - STATUS: access: r description: These bits give the actual status information about the I2C interface lsb: 3 reset_value: '0x1f' width: 5 - I2C1_STAT: fields: !!omap - STATUS: access: r description: These bits give the actual status information about the I2C interface lsb: 3 reset_value: '0x1f' width: 5 - I2C0_DAT: fields: !!omap - DATA: access: rw description: This register holds data values that have been received or are to be transmitted lsb: 0 reset_value: '0' width: 8 - I2C1_DAT: fields: !!omap - DATA: access: rw description: This register holds data values that have been received or are to be transmitted lsb: 0 reset_value: '0' width: 8 - I2C0_ADR0: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C1_ADR0: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C0_SCLH: fields: !!omap - SCLH: access: rw description: Count for SCL HIGH time period selection lsb: 0 reset_value: '0x0004' width: 16 - I2C1_SCLH: fields: !!omap - SCLH: access: rw description: Count for SCL HIGH time period selection lsb: 0 reset_value: '0x0004' width: 16 - I2C0_SCLL: fields: !!omap - SCLL: access: rw description: Count for SCL LOW time period selection lsb: 0 reset_value: '0x0004' width: 16 - I2C1_SCLL: fields: !!omap - SCLL: access: rw description: Count for SCL LOW time period selection lsb: 0 reset_value: '0x0004' width: 16 - I2C0_CONCLR: fields: !!omap - AAC: access: w description: Assert acknowledge Clear bit lsb: 2 reset_value: '0' width: 1 - SIC: access: w description: I2C interrupt Clear bit lsb: 3 reset_value: '0' width: 1 - STAC: access: w description: START flag Clear bit lsb: 5 reset_value: '0' width: 1 - I2ENC: access: w description: I2C interface Disable bit lsb: 6 reset_value: '0' width: 1 - I2C1_CONCLR: fields: !!omap - AAC: access: w description: Assert acknowledge Clear bit lsb: 2 reset_value: '0' width: 1 - SIC: access: w description: I2C interrupt Clear bit lsb: 3 reset_value: '0' width: 1 - STAC: access: w description: START flag Clear bit lsb: 5 reset_value: '0' width: 1 - I2ENC: access: w description: I2C interface Disable bit lsb: 6 reset_value: '0' width: 1 - I2C0_MMCTRL: fields: !!omap - MM_ENA: access: rw description: Monitor mode enable lsb: 0 reset_value: '0' width: 1 - ENA_SCL: access: rw description: SCL output enable lsb: 1 reset_value: '0' width: 1 - MATCH_ALL: access: rw description: Select interrupt register match lsb: 2 reset_value: '0' width: 1 - I2C1_MMCTRL: fields: !!omap - MM_ENA: access: rw description: Monitor mode enable lsb: 0 reset_value: '0' width: 1 - ENA_SCL: access: rw description: SCL output enable lsb: 1 reset_value: '0' width: 1 - MATCH_ALL: access: rw description: Select interrupt register match lsb: 2 reset_value: '0' width: 1 - I2C0_ADR1: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C1_ADR1: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C0_ADR2: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C1_ADR2: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C0_ADR3: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C1_ADR3: fields: !!omap - GC: access: rw description: General Call enable bit lsb: 0 reset_value: '0' width: 1 - ADDRESS: access: rw description: The I2C device address for slave mode lsb: 1 reset_value: '0' width: 7 - I2C0_DATA_BUFFER: fields: !!omap - DATA: access: r description: This register holds contents of the 8 MSBs of the DAT shift register lsb: 0 reset_value: '0' width: 8 - I2C1_DATA_BUFFER: fields: !!omap - DATA: access: r description: This register holds contents of the 8 MSBs of the DAT shift register lsb: 0 reset_value: '0' width: 8 - I2C0_MASK0: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C1_MASK0: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C0_MASK1: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C1_MASK1: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C0_MASK2: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C1_MASK2: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C0_MASK3: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 - I2C1_MASK3: fields: !!omap - MASK: access: rw description: Mask bits lsb: 1 reset_value: '0' width: 7 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/i2s.csv ================================================ I2S0_DAO,0,2,WORDWIDTH,Selects the number of bytes in data,1,rw I2S0_DAO,2,1,MONO,"When 1, data is of monaural format. When 0, the data is in stereo format",0,rw I2S0_DAO,3,1,STOP,"When 1, disables accesses on FIFOs, places the transmit channel in mute mode",0,rw I2S0_DAO,4,1,RESET,"When 1, asynchronously resets the transmit channel and FIFO",0,rw I2S0_DAO,5,1,WS_SEL,"When 0, the interface is in master mode. When 1, the interface is in slave mode",1,rw I2S0_DAO,6,9,WS_HALFPERIOD,"Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31.",0x1f,rw I2S0_DAO,15,1,MUTE,"When 1, the transmit channel sends only zeroes",1,rw I2S1_DAO,0,2,WORDWIDTH,Selects the number of bytes in data,1,rw I2S1_DAO,2,1,MONO,"When 1, data is of monaural format. When 0, the data is in stereo format",0,rw I2S1_DAO,3,1,STOP,"When 1, disables accesses on FIFOs, places the transmit channel in mute mode",0,rw I2S1_DAO,4,1,RESET,"When 1, asynchronously resets the transmit channel and FIFO",0,rw I2S1_DAO,5,1,WS_SEL,"When 0, the interface is in master mode. When 1, the interface is in slave mode",1,rw I2S1_DAO,6,9,WS_HALFPERIOD,"Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31.",0x1f,rw I2S1_DAO,15,1,MUTE,"When 1, the transmit channel sends only zeroes",1,rw I2S0_DAI,0,2,WORDWIDTH,Selects the number of bytes in data,1,rw I2S0_DAI,2,1,MONO,"When 1, data is of monaural format. When 0, the data is in stereo format",0,rw I2S0_DAI,3,1,STOP,"When 1, disables accesses on FIFOs, places the transmit channel in mute mode",0,rw I2S0_DAI,4,1,RESET,"When 1, asynchronously resets the transmit channel and FIFO",0,rw I2S0_DAI,5,1,WS_SEL,"When 0, the interface is in master mode. When 1, the interface is in slave mode",1,rw I2S0_DAI,6,9,WS_HALFPERIOD,"Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31.",0x1f,rw I2S1_DAI,0,2,WORDWIDTH,Selects the number of bytes in data,1,rw I2S1_DAI,2,1,MONO,"When 1, data is of monaural format. When 0, the data is in stereo format",0,rw I2S1_DAI,3,1,STOP,"When 1, disables accesses on FIFOs, places the transmit channel in mute mode",0,rw I2S1_DAI,4,1,RESET,"When 1, asynchronously resets the transmit channel and FIFO",0,rw I2S1_DAI,5,1,WS_SEL,"When 0, the interface is in master mode. When 1, the interface is in slave mode",1,rw I2S1_DAI,6,9,WS_HALFPERIOD,"Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31.",0x1f,rw I2S0_TXFIFO,0,32,I2STXFIFO,8 x 32-bit transmit FIFO,0,w I2S1_TXFIFO,0,32,I2STXFIFO,8 x 32-bit transmit FIFO,0,w I2S0_RXFIFO,0,32,I2SRXFIFO,8 x 32-bit receive FIFO,0,r I2S1_RXFIFO,0,32,I2SRXFIFO,8 x 32-bit receive FIFO,0,r I2S0_STATE,0,1,IRQ,This bit reflects the presence of Receive Interrupt or Transmit Interrupt,1,r I2S0_STATE,1,1,DMAREQ1,This bit reflects the presence of Receive or Transmit DMA Request 1,1,r I2S0_STATE,2,1,DMAREQ2,This bit reflects the presence of Receive or Transmit DMA Request 2,1,r I2S0_STATE,8,4,RX_LEVEL,Reflects the current level of the Receive FIFO,0,r I2S0_STATE,16,4,TX_LEVEL,Reflects the current level of the Transmit FIFO,0,r I2S1_STATE,0,1,IRQ,This bit reflects the presence of Receive Interrupt or Transmit Interrupt,1,r I2S1_STATE,1,1,DMAREQ1,This bit reflects the presence of Receive or Transmit DMA Request 1,1,r I2S1_STATE,2,1,DMAREQ2,This bit reflects the presence of Receive or Transmit DMA Request 2,1,r I2S1_STATE,8,4,RX_LEVEL,Reflects the current level of the Receive FIFO,0,r I2S1_STATE,16,4,TX_LEVEL,Reflects the current level of the Transmit FIFO,0,r I2S0_DMA1,0,1,RX_DMA1_ENABLE,"When 1, enables DMA1 for I2S receive",0,rw I2S0_DMA1,1,1,TX_DMA1_ENABLE,"When 1, enables DMA1 for I2S transmit",0,rw I2S0_DMA1,8,4,RX_DEPTH_DMA1,Set the FIFO level that triggers a receive DMA request on DMA1,0,rw I2S0_DMA1,16,4,TX_DEPTH_DMA1,Set the FIFO level that triggers a transmit DMA request on DMA1,0,rw I2S1_DMA1,0,1,RX_DMA1_ENABLE,"When 1, enables DMA1 for I2S receive",0,rw I2S1_DMA1,1,1,TX_DMA1_ENABLE,"When 1, enables DMA1 for I2S transmit",0,rw I2S1_DMA1,8,4,RX_DEPTH_DMA1,Set the FIFO level that triggers a receive DMA request on DMA1,0,rw I2S1_DMA1,16,4,TX_DEPTH_DMA1,Set the FIFO level that triggers a transmit DMA request on DMA1,0,rw I2S0_DMA2,0,1,RX_DMA2_ENABLE,"When 1, enables DMA2 for I2S receive",0,rw I2S0_DMA2,1,1,TX_DMA2_ENABLE,"When 1, enables DMA2 for I2S transmit",0,rw I2S0_DMA2,8,4,RX_DEPTH_DMA2,Set the FIFO level that triggers a receive DMA request on DMA2,0,rw I2S0_DMA2,16,4,TX_DEPTH_DMA2,Set the FIFO level that triggers a transmit DMA request on DMA2,0,rw I2S1_DMA2,0,1,RX_DMA2_ENABLE,"When 1, enables DMA2 for I2S receive",0,rw I2S1_DMA2,1,1,TX_DMA2_ENABLE,"When 1, enables DMA2 for I2S transmit",0,rw I2S1_DMA2,8,4,RX_DEPTH_DMA2,Set the FIFO level that triggers a receive DMA request on DMA2,0,rw I2S1_DMA2,16,4,TX_DEPTH_DMA2,Set the FIFO level that triggers a transmit DMA request on DMA2,0,rw I2S0_IRQ,0,1,RX_IRQ_ENABLE,"When 1, enables I2S receive interrupt",0,rw I2S0_IRQ,1,1,TX_IRQ_ENABLE,"When 1, enables I2S transmit interrupt",0,rw I2S0_IRQ,8,4,RX_DEPTH_IRQ,Set the FIFO level on which to create an irq request.,0,rw I2S0_IRQ,16,4,TX_DEPTH_IRQ,Set the FIFO level on which to create an irq request.,0,rw I2S1_IRQ,0,1,RX_IRQ_ENABLE,"When 1, enables I2S receive interrupt",0,rw I2S1_IRQ,1,1,TX_IRQ_ENABLE,"When 1, enables I2S transmit interrupt",0,rw I2S1_IRQ,8,4,RX_DEPTH_IRQ,Set the FIFO level on which to create an irq request.,0,rw I2S1_IRQ,16,4,TX_DEPTH_IRQ,Set the FIFO level on which to create an irq request.,0,rw I2S0_TXRATE,0,8,Y_DIVIDER,I2S transmit MCLK rate denominator,0,rw I2S0_TXRATE,8,8,X_DIVIDER,I2S transmit MCLK rate numerator,0,rw I2S1_TXRATE,0,8,Y_DIVIDER,I2S transmit MCLK rate denominator,0,rw I2S1_TXRATE,8,8,X_DIVIDER,I2S transmit MCLK rate numerator,0,rw I2S0_RXRATE,0,8,Y_DIVIDER,I2S receive MCLK rate denominator,0,rw I2S0_RXRATE,8,8,X_DIVIDER,I2S receive MCLK rate numerator,0,rw I2S1_RXRATE,0,8,Y_DIVIDER,I2S receive MCLK rate denominator,0,rw I2S1_RXRATE,8,8,X_DIVIDER,I2S receive MCLK rate numerator,0,rw I2S0_TXBITRATE,0,6,TX_BITRATE,I2S transmit bit rate,0,rw I2S1_TXBITRATE,0,6,TX_BITRATE,I2S transmit bit rate,0,rw I2S0_RXBITRATE,0,6,RX_BITRATE,I2S receive bit rate,0,rw I2S1_RXBITRATE,0,6,RX_BITRATE,I2S receive bit rate,0,rw I2S0_TXMODE,0,2,TXCLKSEL,Clock source selection for the transmit bit clock divider,0,rw I2S0_TXMODE,2,1,TX4PIN,Transmit 4-pin mode selection,0,rw I2S0_TXMODE,3,1,TXMCENA,Enable for the TX_MCLK output,0,rw I2S1_TXMODE,0,2,TXCLKSEL,Clock source selection for the transmit bit clock divider,0,rw I2S1_TXMODE,2,1,TX4PIN,Transmit 4-pin mode selection,0,rw I2S1_TXMODE,3,1,TXMCENA,Enable for the TX_MCLK output,0,rw I2S0_RXMODE,0,2,RXCLKSEL,Clock source selection for the receive bit clock divider,0,rw I2S0_RXMODE,2,1,RX4PIN,Receive 4-pin mode selection,0,rw I2S0_RXMODE,3,1,RXMCENA,Enable for the RX_MCLK output,0,rw I2S1_RXMODE,0,2,RXCLKSEL,Clock source selection for the receive bit clock divider,0,rw I2S1_RXMODE,2,1,RX4PIN,Receive 4-pin mode selection,0,rw I2S1_RXMODE,3,1,RXMCENA,Enable for the RX_MCLK output,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/i2s.yaml ================================================ !!omap - I2S0_DAO: fields: !!omap - WORDWIDTH: access: rw description: Selects the number of bytes in data lsb: 0 reset_value: '1' width: 2 - MONO: access: rw description: When 1, data is of monaural format. When 0, the data is in stereo format lsb: 2 reset_value: '0' width: 1 - STOP: access: rw description: When 1, disables accesses on FIFOs, places the transmit channel in mute mode lsb: 3 reset_value: '0' width: 1 - RESET: access: rw description: When 1, asynchronously resets the transmit channel and FIFO lsb: 4 reset_value: '0' width: 1 - WS_SEL: access: rw description: When 0, the interface is in master mode. When 1, the interface is in slave mode lsb: 5 reset_value: '1' width: 1 - WS_HALFPERIOD: access: rw description: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. lsb: 6 reset_value: '0x1f' width: 9 - MUTE: access: rw description: When 1, the transmit channel sends only zeroes lsb: 15 reset_value: '1' width: 1 - I2S1_DAO: fields: !!omap - WORDWIDTH: access: rw description: Selects the number of bytes in data lsb: 0 reset_value: '1' width: 2 - MONO: access: rw description: When 1, data is of monaural format. When 0, the data is in stereo format lsb: 2 reset_value: '0' width: 1 - STOP: access: rw description: When 1, disables accesses on FIFOs, places the transmit channel in mute mode lsb: 3 reset_value: '0' width: 1 - RESET: access: rw description: When 1, asynchronously resets the transmit channel and FIFO lsb: 4 reset_value: '0' width: 1 - WS_SEL: access: rw description: When 0, the interface is in master mode. When 1, the interface is in slave mode lsb: 5 reset_value: '1' width: 1 - WS_HALFPERIOD: access: rw description: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. lsb: 6 reset_value: '0x1f' width: 9 - MUTE: access: rw description: When 1, the transmit channel sends only zeroes lsb: 15 reset_value: '1' width: 1 - I2S0_DAI: fields: !!omap - WORDWIDTH: access: rw description: Selects the number of bytes in data lsb: 0 reset_value: '1' width: 2 - MONO: access: rw description: When 1, data is of monaural format. When 0, the data is in stereo format lsb: 2 reset_value: '0' width: 1 - STOP: access: rw description: When 1, disables accesses on FIFOs, places the transmit channel in mute mode lsb: 3 reset_value: '0' width: 1 - RESET: access: rw description: When 1, asynchronously resets the transmit channel and FIFO lsb: 4 reset_value: '0' width: 1 - WS_SEL: access: rw description: When 0, the interface is in master mode. When 1, the interface is in slave mode lsb: 5 reset_value: '1' width: 1 - WS_HALFPERIOD: access: rw description: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. lsb: 6 reset_value: '0x1f' width: 9 - I2S1_DAI: fields: !!omap - WORDWIDTH: access: rw description: Selects the number of bytes in data lsb: 0 reset_value: '1' width: 2 - MONO: access: rw description: When 1, data is of monaural format. When 0, the data is in stereo format lsb: 2 reset_value: '0' width: 1 - STOP: access: rw description: When 1, disables accesses on FIFOs, places the transmit channel in mute mode lsb: 3 reset_value: '0' width: 1 - RESET: access: rw description: When 1, asynchronously resets the transmit channel and FIFO lsb: 4 reset_value: '0' width: 1 - WS_SEL: access: rw description: When 0, the interface is in master mode. When 1, the interface is in slave mode lsb: 5 reset_value: '1' width: 1 - WS_HALFPERIOD: access: rw description: Word select half period minus 1, i.e. WS 64clk period -> ws_halfperiod = 31. lsb: 6 reset_value: '0x1f' width: 9 - I2S0_TXFIFO: fields: !!omap - I2STXFIFO: access: w description: 8 x 32-bit transmit FIFO lsb: 0 reset_value: '0' width: 32 - I2S1_TXFIFO: fields: !!omap - I2STXFIFO: access: w description: 8 x 32-bit transmit FIFO lsb: 0 reset_value: '0' width: 32 - I2S0_RXFIFO: fields: !!omap - I2SRXFIFO: access: r description: 8 x 32-bit receive FIFO lsb: 0 reset_value: '0' width: 32 - I2S1_RXFIFO: fields: !!omap - I2SRXFIFO: access: r description: 8 x 32-bit receive FIFO lsb: 0 reset_value: '0' width: 32 - I2S0_STATE: fields: !!omap - IRQ: access: r description: This bit reflects the presence of Receive Interrupt or Transmit Interrupt lsb: 0 reset_value: '1' width: 1 - DMAREQ1: access: r description: This bit reflects the presence of Receive or Transmit DMA Request 1 lsb: 1 reset_value: '1' width: 1 - DMAREQ2: access: r description: This bit reflects the presence of Receive or Transmit DMA Request 2 lsb: 2 reset_value: '1' width: 1 - RX_LEVEL: access: r description: Reflects the current level of the Receive FIFO lsb: 8 reset_value: '0' width: 4 - TX_LEVEL: access: r description: Reflects the current level of the Transmit FIFO lsb: 16 reset_value: '0' width: 4 - I2S1_STATE: fields: !!omap - IRQ: access: r description: This bit reflects the presence of Receive Interrupt or Transmit Interrupt lsb: 0 reset_value: '1' width: 1 - DMAREQ1: access: r description: This bit reflects the presence of Receive or Transmit DMA Request 1 lsb: 1 reset_value: '1' width: 1 - DMAREQ2: access: r description: This bit reflects the presence of Receive or Transmit DMA Request 2 lsb: 2 reset_value: '1' width: 1 - RX_LEVEL: access: r description: Reflects the current level of the Receive FIFO lsb: 8 reset_value: '0' width: 4 - TX_LEVEL: access: r description: Reflects the current level of the Transmit FIFO lsb: 16 reset_value: '0' width: 4 - I2S0_DMA1: fields: !!omap - RX_DMA1_ENABLE: access: rw description: When 1, enables DMA1 for I2S receive lsb: 0 reset_value: '0' width: 1 - TX_DMA1_ENABLE: access: rw description: When 1, enables DMA1 for I2S transmit lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_DMA1: access: rw description: Set the FIFO level that triggers a receive DMA request on DMA1 lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_DMA1: access: rw description: Set the FIFO level that triggers a transmit DMA request on DMA1 lsb: 16 reset_value: '0' width: 4 - I2S1_DMA1: fields: !!omap - RX_DMA1_ENABLE: access: rw description: When 1, enables DMA1 for I2S receive lsb: 0 reset_value: '0' width: 1 - TX_DMA1_ENABLE: access: rw description: When 1, enables DMA1 for I2S transmit lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_DMA1: access: rw description: Set the FIFO level that triggers a receive DMA request on DMA1 lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_DMA1: access: rw description: Set the FIFO level that triggers a transmit DMA request on DMA1 lsb: 16 reset_value: '0' width: 4 - I2S0_DMA2: fields: !!omap - RX_DMA2_ENABLE: access: rw description: When 1, enables DMA2 for I2S receive lsb: 0 reset_value: '0' width: 1 - TX_DMA2_ENABLE: access: rw description: When 1, enables DMA2 for I2S transmit lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_DMA2: access: rw description: Set the FIFO level that triggers a receive DMA request on DMA2 lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_DMA2: access: rw description: Set the FIFO level that triggers a transmit DMA request on DMA2 lsb: 16 reset_value: '0' width: 4 - I2S1_DMA2: fields: !!omap - RX_DMA2_ENABLE: access: rw description: When 1, enables DMA2 for I2S receive lsb: 0 reset_value: '0' width: 1 - TX_DMA2_ENABLE: access: rw description: When 1, enables DMA2 for I2S transmit lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_DMA2: access: rw description: Set the FIFO level that triggers a receive DMA request on DMA2 lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_DMA2: access: rw description: Set the FIFO level that triggers a transmit DMA request on DMA2 lsb: 16 reset_value: '0' width: 4 - I2S0_IRQ: fields: !!omap - RX_IRQ_ENABLE: access: rw description: When 1, enables I2S receive interrupt lsb: 0 reset_value: '0' width: 1 - TX_IRQ_ENABLE: access: rw description: When 1, enables I2S transmit interrupt lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_IRQ: access: rw description: Set the FIFO level on which to create an irq request. lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_IRQ: access: rw description: Set the FIFO level on which to create an irq request. lsb: 16 reset_value: '0' width: 4 - I2S1_IRQ: fields: !!omap - RX_IRQ_ENABLE: access: rw description: When 1, enables I2S receive interrupt lsb: 0 reset_value: '0' width: 1 - TX_IRQ_ENABLE: access: rw description: When 1, enables I2S transmit interrupt lsb: 1 reset_value: '0' width: 1 - RX_DEPTH_IRQ: access: rw description: Set the FIFO level on which to create an irq request. lsb: 8 reset_value: '0' width: 4 - TX_DEPTH_IRQ: access: rw description: Set the FIFO level on which to create an irq request. lsb: 16 reset_value: '0' width: 4 - I2S0_TXRATE: fields: !!omap - Y_DIVIDER: access: rw description: I2S transmit MCLK rate denominator lsb: 0 reset_value: '0' width: 8 - X_DIVIDER: access: rw description: I2S transmit MCLK rate numerator lsb: 8 reset_value: '0' width: 8 - I2S1_TXRATE: fields: !!omap - Y_DIVIDER: access: rw description: I2S transmit MCLK rate denominator lsb: 0 reset_value: '0' width: 8 - X_DIVIDER: access: rw description: I2S transmit MCLK rate numerator lsb: 8 reset_value: '0' width: 8 - I2S0_RXRATE: fields: !!omap - Y_DIVIDER: access: rw description: I2S receive MCLK rate denominator lsb: 0 reset_value: '0' width: 8 - X_DIVIDER: access: rw description: I2S receive MCLK rate numerator lsb: 8 reset_value: '0' width: 8 - I2S1_RXRATE: fields: !!omap - Y_DIVIDER: access: rw description: I2S receive MCLK rate denominator lsb: 0 reset_value: '0' width: 8 - X_DIVIDER: access: rw description: I2S receive MCLK rate numerator lsb: 8 reset_value: '0' width: 8 - I2S0_TXBITRATE: fields: !!omap - TX_BITRATE: access: rw description: I2S transmit bit rate lsb: 0 reset_value: '0' width: 6 - I2S1_TXBITRATE: fields: !!omap - TX_BITRATE: access: rw description: I2S transmit bit rate lsb: 0 reset_value: '0' width: 6 - I2S0_RXBITRATE: fields: !!omap - RX_BITRATE: access: rw description: I2S receive bit rate lsb: 0 reset_value: '0' width: 6 - I2S1_RXBITRATE: fields: !!omap - RX_BITRATE: access: rw description: I2S receive bit rate lsb: 0 reset_value: '0' width: 6 - I2S0_TXMODE: fields: !!omap - TXCLKSEL: access: rw description: Clock source selection for the transmit bit clock divider lsb: 0 reset_value: '0' width: 2 - TX4PIN: access: rw description: Transmit 4-pin mode selection lsb: 2 reset_value: '0' width: 1 - TXMCENA: access: rw description: Enable for the TX_MCLK output lsb: 3 reset_value: '0' width: 1 - I2S1_TXMODE: fields: !!omap - TXCLKSEL: access: rw description: Clock source selection for the transmit bit clock divider lsb: 0 reset_value: '0' width: 2 - TX4PIN: access: rw description: Transmit 4-pin mode selection lsb: 2 reset_value: '0' width: 1 - TXMCENA: access: rw description: Enable for the TX_MCLK output lsb: 3 reset_value: '0' width: 1 - I2S0_RXMODE: fields: !!omap - RXCLKSEL: access: rw description: Clock source selection for the receive bit clock divider lsb: 0 reset_value: '0' width: 2 - RX4PIN: access: rw description: Receive 4-pin mode selection lsb: 2 reset_value: '0' width: 1 - RXMCENA: access: rw description: Enable for the RX_MCLK output lsb: 3 reset_value: '0' width: 1 - I2S1_RXMODE: fields: !!omap - RXCLKSEL: access: rw description: Clock source selection for the receive bit clock divider lsb: 0 reset_value: '0' width: 2 - RX4PIN: access: rw description: Receive 4-pin mode selection lsb: 2 reset_value: '0' width: 1 - RXMCENA: access: rw description: Enable for the RX_MCLK output lsb: 3 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/rgu.csv ================================================ RESET_CTRL0,0,1,CORE_RST,Writing a one activates the reset,0,w RESET_CTRL0,1,1,PERIPH_RST,Writing a one activates the reset,0,w RESET_CTRL0,2,1,MASTER_RST,Writing a one activates the reset,0,w RESET_CTRL0,4,1,WWDT_RST,Writing a one to this bit has no effect,0, RESET_CTRL0,5,1,CREG_RST,Writing a one to this bit has no effect,0, RESET_CTRL0,8,1,BUS_RST,Writing a one activates the reset,0,w RESET_CTRL0,9,1,SCU_RST,Writing a one activates the reset,0,w RESET_CTRL0,13,1,M4_RST,Writing a one activates the reset,0,w RESET_CTRL0,16,1,LCD_RST,Writing a one activates the reset,0,w RESET_CTRL0,17,1,USB0_RST,Writing a one activates the reset,0,w RESET_CTRL0,18,1,USB1_RST,Writing a one activates the reset,0,w RESET_CTRL0,19,1,DMA_RST,Writing a one activates the reset,0,w RESET_CTRL0,20,1,SDIO_RST,Writing a one activates the reset,0,w RESET_CTRL0,21,1,EMC_RST,Writing a one activates the reset,0,w RESET_CTRL0,22,1,ETHERNET_RST,Writing a one activates the reset,0,w RESET_CTRL0,25,1,FLASHA_RST,Writing a one activates the reset,0,w RESET_CTRL0,27,1,EEPROM_RST,Writing a one activates the reset,0,w RESET_CTRL0,28,1,GPIO_RST,Writing a one activates the reset,0,w RESET_CTRL0,29,1,FLASHB_RST,Writing a one activates the reset,0,w RESET_CTRL1,0,1,TIMER0_RST,Writing a one activates the reset,0,w RESET_CTRL1,1,1,TIMER1_RST,Writing a one activates the reset,0,w RESET_CTRL1,2,1,TIMER2_RST,Writing a one activates the reset,0,w RESET_CTRL1,3,1,TIMER3_RST,Writing a one activates the reset,0,w RESET_CTRL1,4,1,RTIMER_RST,Writing a one activates the reset,0,w RESET_CTRL1,5,1,SCT_RST,Writing a one activates the reset,0,w RESET_CTRL1,6,1,MOTOCONPWM_RST,Writing a one activates the reset,0,w RESET_CTRL1,7,1,QEI_RST,Writing a one activates the reset,0,w RESET_CTRL1,8,1,ADC0_RST,Writing a one activates the reset,0,w RESET_CTRL1,9,1,ADC1_RST,Writing a one activates the reset,0,w RESET_CTRL1,10,1,DAC_RST,Writing a one activates the reset,0,w RESET_CTRL1,12,1,UART0_RST,Writing a one activates the reset,0,w RESET_CTRL1,13,1,UART1_RST,Writing a one activates the reset,0,w RESET_CTRL1,14,1,UART2_RST,Writing a one activates the reset,0,w RESET_CTRL1,15,1,UART3_RST,Writing a one activates the reset,0,w RESET_CTRL1,16,1,I2C0_RST,Writing a one activates the reset,0,w RESET_CTRL1,17,1,I2C1_RST,Writing a one activates the reset,0,w RESET_CTRL1,18,1,SSP0_RST,Writing a one activates the reset,0,w RESET_CTRL1,19,1,SSP1_RST,Writing a one activates the reset,0,w RESET_CTRL1,20,1,I2S_RST,Writing a one activates the reset,0,w RESET_CTRL1,21,1,SPIFI_RST,Writing a one activates the reset,0,w RESET_CTRL1,22,1,CAN1_RST,Writing a one activates the reset,0,w RESET_CTRL1,23,1,CAN0_RST,Writing a one activates the reset,0,w RESET_CTRL1,24,1,M0APP_RST,Writing a one activates the reset,1,w RESET_CTRL1,25,1,SGPIO_RST,Writing a one activates the reset,0,w RESET_CTRL1,26,1,SPI_RST,Writing a one activates the reset,0,w RESET_STATUS0,0,2,CORE_RST,Status of the CORE_RST reset generator output,0x0,rw RESET_STATUS0,2,2,PERIPH_RST,Status of the PERIPH_RST reset generator output,0x0,rw RESET_STATUS0,4,2,MASTER_RST,Status of the MASTER_RST reset generator output,0x1,rw RESET_STATUS0,8,2,WWDT_RST,Status of the WWDT_RST reset generator output,0x0,rw RESET_STATUS0,10,2,CREG_RST,Status of the CREG_RST reset generator output,0x0,rw RESET_STATUS0,16,2,BUS_RST,Status of the BUS_RST reset generator output,0x1,rw RESET_STATUS0,18,2,SCU_RST,Status of the SCU_RST reset generator output,0x1,rw RESET_STATUS0,26,2,M4_RST,Status of the M4_RST reset generator output,0x1,rw RESET_STATUS1,0,2,LCD_RST,Status of the LCD_RST reset generator output,0x1,rw RESET_STATUS1,2,2,USB0_RST,Status of the USB0_RST reset generator output,0x1,rw RESET_STATUS1,4,2,USB1_RST,Status of the USB1_RST reset generator output,0x1,rw RESET_STATUS1,6,2,DMA_RST,Status of the DMA_RST reset generator output,0x1,rw RESET_STATUS1,8,2,SDIO_RST,Status of the SDIO_RST reset generator output,0x1,rw RESET_STATUS1,10,2,EMC_RST,Status of the EMC_RST reset generator output,0x1,rw RESET_STATUS1,12,2,ETHERNET_RST,Status of the ETHERNET_RST reset generator output,0x1,rw RESET_STATUS1,18,2,FLASHA_RST,Status of the FLASHA_RST reset generator output,0x1, RESET_STATUS1,22,2,EEPROM_RST,Status of the EEPROM_RST reset generator output,0x1, RESET_STATUS1,24,2,GPIO_RST,Status of the GPIO_RST reset generator output,0x1,rw RESET_STATUS1,26,2,FLASHB_RST,Status of the FLASHB_RST reset generator output,0x1,rw RESET_STATUS2,0,2,TIMER0_RST,Status of the TIMER0_RST reset generator output,0x1,rw RESET_STATUS2,2,2,TIMER1_RST,Status of the TIMER1_RST reset generator output,0x1,rw RESET_STATUS2,4,2,TIMER2_RST,Status of the TIMER2_RST reset generator output,0x1,rw RESET_STATUS2,6,2,TIMER3_RST,Status of the TIMER3_RST reset generator output,0x1,rw RESET_STATUS2,8,2,RITIMER_RST,Status of the RITIMER_RST reset generator output,0x1,rw RESET_STATUS2,10,2,SCT_RST,Status of the SCT_RST reset generator output,0x1,rw RESET_STATUS2,12,2,MOTOCONPWM_RST,Status of the MOTOCONPWM_RST reset generator output,0x1,rw RESET_STATUS2,14,2,QEI_RST,Status of the QEI_RST reset generator output,0x1,rw RESET_STATUS2,16,2,ADC0_RST,Status of the ADC0_RST reset generator output,0x1,rw RESET_STATUS2,18,2,ADC1_RST,Status of the ADC1_RST reset generator output,0x1,rw RESET_STATUS2,20,2,DAC_RST,Status of the DAC_RST reset generator output,0x1,rw RESET_STATUS2,24,2,UART0_RST,Status of the UART0_RST reset generator output,0x1,rw RESET_STATUS2,26,2,UART1_RST,Status of the UART1_RST reset generator output,0x1,rw RESET_STATUS2,28,2,UART2_RST,Status of the UART2_RST reset generator output,0x1,rw RESET_STATUS2,30,2,UART3_RST,Status of the UART3_RST reset generator output,0x1,rw RESET_STATUS3,0,2,I2C0_RST,Status of the I2C0_RST reset generator output,0x1,rw RESET_STATUS3,2,2,I2C1_RST,Status of the I2C1_RST reset generator output,0x1,rw RESET_STATUS3,4,2,SSP0_RST,Status of the SSP0_RST reset generator output,0x1,rw RESET_STATUS3,6,2,SSP1_RST,Status of the SSP1_RST reset generator output,0x1,rw RESET_STATUS3,8,2,I2S_RST,Status of the I2S_RST reset generator output,0x1,rw RESET_STATUS3,10,2,SPIFI_RST,Status of the SPIFI_RST reset generator output,0x1,rw RESET_STATUS3,12,2,CAN1_RST,Status of the CAN1_RST reset generator output,0x1,rw RESET_STATUS3,14,2,CAN0_RST,Status of the CAN0_RST reset generator output,0x1,rw RESET_STATUS3,16,2,M0APP_RST,Status of the M0APP_RST reset generator output,0x3,rw RESET_STATUS3,18,2,SGPIO_RST,Status of the SGPIO_RST reset generator output,0x1,rw RESET_STATUS3,20,2,SPI_RST,Status of the SPI_RST reset generator output,0x1,rw RESET_ACTIVE_STATUS0,0,1,CORE_RST,Current status of the CORE_RST,0,r RESET_ACTIVE_STATUS0,1,1,PERIPH_RST,Current status of the PERIPH_RST,0,r RESET_ACTIVE_STATUS0,2,1,MASTER_RST,Current status of the MASTER_RST,0,r RESET_ACTIVE_STATUS0,4,1,WWDT_RST,Current status of the WWDT_RST,0,r RESET_ACTIVE_STATUS0,5,1,CREG_RST,Current status of the CREG_RST,0,r RESET_ACTIVE_STATUS0,8,1,BUS_RST,Current status of the BUS_RST,0,r RESET_ACTIVE_STATUS0,9,1,SCU_RST,Current status of the SCU_RST,0,r RESET_ACTIVE_STATUS0,13,1,M4_RST,Current status of the M4_RST,0,r RESET_ACTIVE_STATUS0,16,1,LCD_RST,Current status of the LCD_RST,0,r RESET_ACTIVE_STATUS0,17,1,USB0_RST,Current status of the USB0_RST,0,r RESET_ACTIVE_STATUS0,18,1,USB1_RST,Current status of the USB1_RST,0,r RESET_ACTIVE_STATUS0,19,1,DMA_RST,Current status of the DMA_RST,0,r RESET_ACTIVE_STATUS0,20,1,SDIO_RST,Current status of the SDIO_RST,0,r RESET_ACTIVE_STATUS0,21,1,EMC_RST,Current status of the EMC_RST,0,r RESET_ACTIVE_STATUS0,22,1,ETHERNET_RST,Current status of the ETHERNET_RST,0,r RESET_ACTIVE_STATUS0,25,1,FLASHA_RST,Current status of the FLASHA_RST,0,r RESET_ACTIVE_STATUS0,27,1,EEPROM_RST,Current status of the EEPROM_RST,0,r RESET_ACTIVE_STATUS0,28,1,GPIO_RST,Current status of the GPIO_RST,0,r RESET_ACTIVE_STATUS0,29,1,FLASHB_RST,Current status of the FLASHB_RST,0,r RESET_ACTIVE_STATUS1,0,1,TIMER0_RST,Current status of the TIMER0_RST,0,r RESET_ACTIVE_STATUS1,1,1,TIMER1_RST,Current status of the TIMER1_RST,0,r RESET_ACTIVE_STATUS1,2,1,TIMER2_RST,Current status of the TIMER2_RST,0,r RESET_ACTIVE_STATUS1,3,1,TIMER3_RST,Current status of the TIMER3_RST,0,r RESET_ACTIVE_STATUS1,4,1,RITIMER_RST,Current status of the RITIMER_RST,0,r RESET_ACTIVE_STATUS1,5,1,SCT_RST,Current status of the SCT_RST,0,r RESET_ACTIVE_STATUS1,6,1,MOTOCONPWM_RST,Current status of the MOTOCONPWM_RST,0,r RESET_ACTIVE_STATUS1,7,1,QEI_RST,Current status of the QEI_RST,0,r RESET_ACTIVE_STATUS1,8,1,ADC0_RST,Current status of the ADC0_RST,0,r RESET_ACTIVE_STATUS1,9,1,ADC1_RST,Current status of the ADC1_RST,0,r RESET_ACTIVE_STATUS1,10,1,DAC_RST,Current status of the DAC_RST,0,r RESET_ACTIVE_STATUS1,12,1,UART0_RST,Current status of the UART0_RST,0,r RESET_ACTIVE_STATUS1,13,1,UART1_RST,Current status of the UART1_RST,0,r RESET_ACTIVE_STATUS1,14,1,UART2_RST,Current status of the UART2_RST,0,r RESET_ACTIVE_STATUS1,15,1,UART3_RST,Current status of the UART3_RST,0,r RESET_ACTIVE_STATUS1,16,1,I2C0_RST,Current status of the I2C0_RST,0,r RESET_ACTIVE_STATUS1,17,1,I2C1_RST,Current status of the I2C1_RST,0,r RESET_ACTIVE_STATUS1,18,1,SSP0_RST,Current status of the SSP0_RST,0,r RESET_ACTIVE_STATUS1,19,1,SSP1_RST,Current status of the SSP1_RST,0,r RESET_ACTIVE_STATUS1,20,1,I2S_RST,Current status of the I2S_RST,0,r RESET_ACTIVE_STATUS1,21,1,SPIFI_RST,Current status of the SPIFI_RST,0,r RESET_ACTIVE_STATUS1,22,1,CAN1_RST,Current status of the CAN1_RST,0,r RESET_ACTIVE_STATUS1,23,1,CAN0_RST,Current status of the CAN0_RST,0,r RESET_ACTIVE_STATUS1,24,1,M0APP_RST,Current status of the M0APP_RST,0,r RESET_ACTIVE_STATUS1,25,1,SGPIO_RST,Current status of the SGPIO_RST,0,r RESET_ACTIVE_STATUS1,26,1,SPI_RST,Current status of the SPI_RST,0,r RESET_EXT_STAT0,0,1,EXT_RESET,Reset activated by external reset from reset pin,0,rw RESET_EXT_STAT0,4,1,BOD_RESET,Reset activated by BOD reset,0,rw RESET_EXT_STAT0,5,1,WWDT_RESET,Reset activated by WWDT time-out,0,rw RESET_EXT_STAT1,1,1,CORE_RESET,Reset activated by CORE_RST output,0,rw RESET_EXT_STAT2,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT4,1,1,CORE_RESET,Reset activated by CORE_RST output,0,rw RESET_EXT_STAT5,1,1,CORE_RESET,Reset activated by CORE_RST output,0,rw RESET_EXT_STAT8,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT9,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT13,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT16,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT17,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT18,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT19,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT20,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT21,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT22,3,1,MASTER_RESET,Reset activated by MASTER_RST output,0,rw RESET_EXT_STAT25,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT27,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT28,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT29,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT32,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT33,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT34,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT35,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT36,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT37,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT38,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT39,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT40,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT41,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT42,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT44,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT45,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT46,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT47,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT48,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT49,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT50,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT51,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT52,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT53,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT54,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT55,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT56,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,,rw RESET_EXT_STAT57,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw RESET_EXT_STAT58,2,1,PERIPHERAL_RESET,Reset activated by PERIPHERAL_RST output,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/rgu.yaml ================================================ !!omap - RESET_CTRL0: fields: !!omap - CORE_RST: access: w description: Writing a one activates the reset lsb: 0 reset_value: '0' width: 1 - PERIPH_RST: access: w description: Writing a one activates the reset lsb: 1 reset_value: '0' width: 1 - MASTER_RST: access: w description: Writing a one activates the reset lsb: 2 reset_value: '0' width: 1 - WWDT_RST: access: '' description: Writing a one to this bit has no effect lsb: 4 reset_value: '0' width: 1 - CREG_RST: access: '' description: Writing a one to this bit has no effect lsb: 5 reset_value: '0' width: 1 - BUS_RST: access: w description: Writing a one activates the reset lsb: 8 reset_value: '0' width: 1 - SCU_RST: access: w description: Writing a one activates the reset lsb: 9 reset_value: '0' width: 1 - M4_RST: access: w description: Writing a one activates the reset lsb: 13 reset_value: '0' width: 1 - LCD_RST: access: w description: Writing a one activates the reset lsb: 16 reset_value: '0' width: 1 - USB0_RST: access: w description: Writing a one activates the reset lsb: 17 reset_value: '0' width: 1 - USB1_RST: access: w description: Writing a one activates the reset lsb: 18 reset_value: '0' width: 1 - DMA_RST: access: w description: Writing a one activates the reset lsb: 19 reset_value: '0' width: 1 - SDIO_RST: access: w description: Writing a one activates the reset lsb: 20 reset_value: '0' width: 1 - EMC_RST: access: w description: Writing a one activates the reset lsb: 21 reset_value: '0' width: 1 - ETHERNET_RST: access: w description: Writing a one activates the reset lsb: 22 reset_value: '0' width: 1 - FLASHA_RST: access: w description: Writing a one activates the reset lsb: 25 reset_value: '0' width: 1 - EEPROM_RST: access: w description: Writing a one activates the reset lsb: 27 reset_value: '0' width: 1 - GPIO_RST: access: w description: Writing a one activates the reset lsb: 28 reset_value: '0' width: 1 - FLASHB_RST: access: w description: Writing a one activates the reset lsb: 29 reset_value: '0' width: 1 - RESET_CTRL1: fields: !!omap - TIMER0_RST: access: w description: Writing a one activates the reset lsb: 0 reset_value: '0' width: 1 - TIMER1_RST: access: w description: Writing a one activates the reset lsb: 1 reset_value: '0' width: 1 - TIMER2_RST: access: w description: Writing a one activates the reset lsb: 2 reset_value: '0' width: 1 - TIMER3_RST: access: w description: Writing a one activates the reset lsb: 3 reset_value: '0' width: 1 - RTIMER_RST: access: w description: Writing a one activates the reset lsb: 4 reset_value: '0' width: 1 - SCT_RST: access: w description: Writing a one activates the reset lsb: 5 reset_value: '0' width: 1 - MOTOCONPWM_RST: access: w description: Writing a one activates the reset lsb: 6 reset_value: '0' width: 1 - QEI_RST: access: w description: Writing a one activates the reset lsb: 7 reset_value: '0' width: 1 - ADC0_RST: access: w description: Writing a one activates the reset lsb: 8 reset_value: '0' width: 1 - ADC1_RST: access: w description: Writing a one activates the reset lsb: 9 reset_value: '0' width: 1 - DAC_RST: access: w description: Writing a one activates the reset lsb: 10 reset_value: '0' width: 1 - UART0_RST: access: w description: Writing a one activates the reset lsb: 12 reset_value: '0' width: 1 - UART1_RST: access: w description: Writing a one activates the reset lsb: 13 reset_value: '0' width: 1 - UART2_RST: access: w description: Writing a one activates the reset lsb: 14 reset_value: '0' width: 1 - UART3_RST: access: w description: Writing a one activates the reset lsb: 15 reset_value: '0' width: 1 - I2C0_RST: access: w description: Writing a one activates the reset lsb: 16 reset_value: '0' width: 1 - I2C1_RST: access: w description: Writing a one activates the reset lsb: 17 reset_value: '0' width: 1 - SSP0_RST: access: w description: Writing a one activates the reset lsb: 18 reset_value: '0' width: 1 - SSP1_RST: access: w description: Writing a one activates the reset lsb: 19 reset_value: '0' width: 1 - I2S_RST: access: w description: Writing a one activates the reset lsb: 20 reset_value: '0' width: 1 - SPIFI_RST: access: w description: Writing a one activates the reset lsb: 21 reset_value: '0' width: 1 - CAN1_RST: access: w description: Writing a one activates the reset lsb: 22 reset_value: '0' width: 1 - CAN0_RST: access: w description: Writing a one activates the reset lsb: 23 reset_value: '0' width: 1 - M0APP_RST: access: w description: Writing a one activates the reset lsb: 24 reset_value: '1' width: 1 - SGPIO_RST: access: w description: Writing a one activates the reset lsb: 25 reset_value: '0' width: 1 - SPI_RST: access: w description: Writing a one activates the reset lsb: 26 reset_value: '0' width: 1 - RESET_STATUS0: fields: !!omap - CORE_RST: access: rw description: Status of the CORE_RST reset generator output lsb: 0 reset_value: '0x0' width: 2 - PERIPH_RST: access: rw description: Status of the PERIPH_RST reset generator output lsb: 2 reset_value: '0x0' width: 2 - MASTER_RST: access: rw description: Status of the MASTER_RST reset generator output lsb: 4 reset_value: '0x1' width: 2 - WWDT_RST: access: rw description: Status of the WWDT_RST reset generator output lsb: 8 reset_value: '0x0' width: 2 - CREG_RST: access: rw description: Status of the CREG_RST reset generator output lsb: 10 reset_value: '0x0' width: 2 - BUS_RST: access: rw description: Status of the BUS_RST reset generator output lsb: 16 reset_value: '0x1' width: 2 - SCU_RST: access: rw description: Status of the SCU_RST reset generator output lsb: 18 reset_value: '0x1' width: 2 - M4_RST: access: rw description: Status of the M4_RST reset generator output lsb: 26 reset_value: '0x1' width: 2 - RESET_STATUS1: fields: !!omap - LCD_RST: access: rw description: Status of the LCD_RST reset generator output lsb: 0 reset_value: '0x1' width: 2 - USB0_RST: access: rw description: Status of the USB0_RST reset generator output lsb: 2 reset_value: '0x1' width: 2 - USB1_RST: access: rw description: Status of the USB1_RST reset generator output lsb: 4 reset_value: '0x1' width: 2 - DMA_RST: access: rw description: Status of the DMA_RST reset generator output lsb: 6 reset_value: '0x1' width: 2 - SDIO_RST: access: rw description: Status of the SDIO_RST reset generator output lsb: 8 reset_value: '0x1' width: 2 - EMC_RST: access: rw description: Status of the EMC_RST reset generator output lsb: 10 reset_value: '0x1' width: 2 - ETHERNET_RST: access: rw description: Status of the ETHERNET_RST reset generator output lsb: 12 reset_value: '0x1' width: 2 - FLASHA_RST: access: '' description: Status of the FLASHA_RST reset generator output lsb: 18 reset_value: '0x1' width: 2 - EEPROM_RST: access: '' description: Status of the EEPROM_RST reset generator output lsb: 22 reset_value: '0x1' width: 2 - GPIO_RST: access: rw description: Status of the GPIO_RST reset generator output lsb: 24 reset_value: '0x1' width: 2 - FLASHB_RST: access: rw description: Status of the FLASHB_RST reset generator output lsb: 26 reset_value: '0x1' width: 2 - RESET_STATUS2: fields: !!omap - TIMER0_RST: access: rw description: Status of the TIMER0_RST reset generator output lsb: 0 reset_value: '0x1' width: 2 - TIMER1_RST: access: rw description: Status of the TIMER1_RST reset generator output lsb: 2 reset_value: '0x1' width: 2 - TIMER2_RST: access: rw description: Status of the TIMER2_RST reset generator output lsb: 4 reset_value: '0x1' width: 2 - TIMER3_RST: access: rw description: Status of the TIMER3_RST reset generator output lsb: 6 reset_value: '0x1' width: 2 - RITIMER_RST: access: rw description: Status of the RITIMER_RST reset generator output lsb: 8 reset_value: '0x1' width: 2 - SCT_RST: access: rw description: Status of the SCT_RST reset generator output lsb: 10 reset_value: '0x1' width: 2 - MOTOCONPWM_RST: access: rw description: Status of the MOTOCONPWM_RST reset generator output lsb: 12 reset_value: '0x1' width: 2 - QEI_RST: access: rw description: Status of the QEI_RST reset generator output lsb: 14 reset_value: '0x1' width: 2 - ADC0_RST: access: rw description: Status of the ADC0_RST reset generator output lsb: 16 reset_value: '0x1' width: 2 - ADC1_RST: access: rw description: Status of the ADC1_RST reset generator output lsb: 18 reset_value: '0x1' width: 2 - DAC_RST: access: rw description: Status of the DAC_RST reset generator output lsb: 20 reset_value: '0x1' width: 2 - UART0_RST: access: rw description: Status of the UART0_RST reset generator output lsb: 24 reset_value: '0x1' width: 2 - UART1_RST: access: rw description: Status of the UART1_RST reset generator output lsb: 26 reset_value: '0x1' width: 2 - UART2_RST: access: rw description: Status of the UART2_RST reset generator output lsb: 28 reset_value: '0x1' width: 2 - UART3_RST: access: rw description: Status of the UART3_RST reset generator output lsb: 30 reset_value: '0x1' width: 2 - RESET_STATUS3: fields: !!omap - I2C0_RST: access: rw description: Status of the I2C0_RST reset generator output lsb: 0 reset_value: '0x1' width: 2 - I2C1_RST: access: rw description: Status of the I2C1_RST reset generator output lsb: 2 reset_value: '0x1' width: 2 - SSP0_RST: access: rw description: Status of the SSP0_RST reset generator output lsb: 4 reset_value: '0x1' width: 2 - SSP1_RST: access: rw description: Status of the SSP1_RST reset generator output lsb: 6 reset_value: '0x1' width: 2 - I2S_RST: access: rw description: Status of the I2S_RST reset generator output lsb: 8 reset_value: '0x1' width: 2 - SPIFI_RST: access: rw description: Status of the SPIFI_RST reset generator output lsb: 10 reset_value: '0x1' width: 2 - CAN1_RST: access: rw description: Status of the CAN1_RST reset generator output lsb: 12 reset_value: '0x1' width: 2 - CAN0_RST: access: rw description: Status of the CAN0_RST reset generator output lsb: 14 reset_value: '0x1' width: 2 - M0APP_RST: access: rw description: Status of the M0APP_RST reset generator output lsb: 16 reset_value: '0x3' width: 2 - SGPIO_RST: access: rw description: Status of the SGPIO_RST reset generator output lsb: 18 reset_value: '0x1' width: 2 - SPI_RST: access: rw description: Status of the SPI_RST reset generator output lsb: 20 reset_value: '0x1' width: 2 - RESET_ACTIVE_STATUS0: fields: !!omap - CORE_RST: access: r description: Current status of the CORE_RST lsb: 0 reset_value: '0' width: 1 - PERIPH_RST: access: r description: Current status of the PERIPH_RST lsb: 1 reset_value: '0' width: 1 - MASTER_RST: access: r description: Current status of the MASTER_RST lsb: 2 reset_value: '0' width: 1 - WWDT_RST: access: r description: Current status of the WWDT_RST lsb: 4 reset_value: '0' width: 1 - CREG_RST: access: r description: Current status of the CREG_RST lsb: 5 reset_value: '0' width: 1 - BUS_RST: access: r description: Current status of the BUS_RST lsb: 8 reset_value: '0' width: 1 - SCU_RST: access: r description: Current status of the SCU_RST lsb: 9 reset_value: '0' width: 1 - M4_RST: access: r description: Current status of the M4_RST lsb: 13 reset_value: '0' width: 1 - LCD_RST: access: r description: Current status of the LCD_RST lsb: 16 reset_value: '0' width: 1 - USB0_RST: access: r description: Current status of the USB0_RST lsb: 17 reset_value: '0' width: 1 - USB1_RST: access: r description: Current status of the USB1_RST lsb: 18 reset_value: '0' width: 1 - DMA_RST: access: r description: Current status of the DMA_RST lsb: 19 reset_value: '0' width: 1 - SDIO_RST: access: r description: Current status of the SDIO_RST lsb: 20 reset_value: '0' width: 1 - EMC_RST: access: r description: Current status of the EMC_RST lsb: 21 reset_value: '0' width: 1 - ETHERNET_RST: access: r description: Current status of the ETHERNET_RST lsb: 22 reset_value: '0' width: 1 - FLASHA_RST: access: r description: Current status of the FLASHA_RST lsb: 25 reset_value: '0' width: 1 - EEPROM_RST: access: r description: Current status of the EEPROM_RST lsb: 27 reset_value: '0' width: 1 - GPIO_RST: access: r description: Current status of the GPIO_RST lsb: 28 reset_value: '0' width: 1 - FLASHB_RST: access: r description: Current status of the FLASHB_RST lsb: 29 reset_value: '0' width: 1 - RESET_ACTIVE_STATUS1: fields: !!omap - TIMER0_RST: access: r description: Current status of the TIMER0_RST lsb: 0 reset_value: '0' width: 1 - TIMER1_RST: access: r description: Current status of the TIMER1_RST lsb: 1 reset_value: '0' width: 1 - TIMER2_RST: access: r description: Current status of the TIMER2_RST lsb: 2 reset_value: '0' width: 1 - TIMER3_RST: access: r description: Current status of the TIMER3_RST lsb: 3 reset_value: '0' width: 1 - RITIMER_RST: access: r description: Current status of the RITIMER_RST lsb: 4 reset_value: '0' width: 1 - SCT_RST: access: r description: Current status of the SCT_RST lsb: 5 reset_value: '0' width: 1 - MOTOCONPWM_RST: access: r description: Current status of the MOTOCONPWM_RST lsb: 6 reset_value: '0' width: 1 - QEI_RST: access: r description: Current status of the QEI_RST lsb: 7 reset_value: '0' width: 1 - ADC0_RST: access: r description: Current status of the ADC0_RST lsb: 8 reset_value: '0' width: 1 - ADC1_RST: access: r description: Current status of the ADC1_RST lsb: 9 reset_value: '0' width: 1 - DAC_RST: access: r description: Current status of the DAC_RST lsb: 10 reset_value: '0' width: 1 - UART0_RST: access: r description: Current status of the UART0_RST lsb: 12 reset_value: '0' width: 1 - UART1_RST: access: r description: Current status of the UART1_RST lsb: 13 reset_value: '0' width: 1 - UART2_RST: access: r description: Current status of the UART2_RST lsb: 14 reset_value: '0' width: 1 - UART3_RST: access: r description: Current status of the UART3_RST lsb: 15 reset_value: '0' width: 1 - I2C0_RST: access: r description: Current status of the I2C0_RST lsb: 16 reset_value: '0' width: 1 - I2C1_RST: access: r description: Current status of the I2C1_RST lsb: 17 reset_value: '0' width: 1 - SSP0_RST: access: r description: Current status of the SSP0_RST lsb: 18 reset_value: '0' width: 1 - SSP1_RST: access: r description: Current status of the SSP1_RST lsb: 19 reset_value: '0' width: 1 - I2S_RST: access: r description: Current status of the I2S_RST lsb: 20 reset_value: '0' width: 1 - SPIFI_RST: access: r description: Current status of the SPIFI_RST lsb: 21 reset_value: '0' width: 1 - CAN1_RST: access: r description: Current status of the CAN1_RST lsb: 22 reset_value: '0' width: 1 - CAN0_RST: access: r description: Current status of the CAN0_RST lsb: 23 reset_value: '0' width: 1 - M0APP_RST: access: r description: Current status of the M0APP_RST lsb: 24 reset_value: '0' width: 1 - SGPIO_RST: access: r description: Current status of the SGPIO_RST lsb: 25 reset_value: '0' width: 1 - SPI_RST: access: r description: Current status of the SPI_RST lsb: 26 reset_value: '0' width: 1 - RESET_EXT_STAT0: fields: !!omap - EXT_RESET: access: rw description: Reset activated by external reset from reset pin lsb: 0 reset_value: '0' width: 1 - BOD_RESET: access: rw description: Reset activated by BOD reset lsb: 4 reset_value: '0' width: 1 - WWDT_RESET: access: rw description: Reset activated by WWDT time-out lsb: 5 reset_value: '0' width: 1 - RESET_EXT_STAT1: fields: !!omap - CORE_RESET: access: rw description: Reset activated by CORE_RST output lsb: 1 reset_value: '0' width: 1 - RESET_EXT_STAT2: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT4: fields: !!omap - CORE_RESET: access: rw description: Reset activated by CORE_RST output lsb: 1 reset_value: '0' width: 1 - RESET_EXT_STAT5: fields: !!omap - CORE_RESET: access: rw description: Reset activated by CORE_RST output lsb: 1 reset_value: '0' width: 1 - RESET_EXT_STAT8: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT9: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT13: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT16: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT17: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT18: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT19: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT20: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT21: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT22: fields: !!omap - MASTER_RESET: access: rw description: Reset activated by MASTER_RST output lsb: 3 reset_value: '0' width: 1 - RESET_EXT_STAT25: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT27: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT28: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT29: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT32: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT33: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT34: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT35: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT36: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT37: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT38: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT39: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT40: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT41: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT42: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT44: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT45: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT46: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT47: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT48: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT49: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT50: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT51: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT52: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT53: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT54: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT55: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT56: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '' width: 1 - RESET_EXT_STAT57: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 - RESET_EXT_STAT58: fields: !!omap - PERIPHERAL_RESET: access: rw description: Reset activated by PERIPHERAL_RST output lsb: 2 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ritimer.csv ================================================ RITIMER_COMPVAL,0,32,RICOMP,Compare register,0xFFFFFFFF,rw RITIMER_MASK,0,32,RIMASK,Mask register,0,rw RITIMER_CTRL,0,1,RITINT,Interrupt flag,0,rw RITIMER_CTRL,1,1,RITENCLR,Timer enable clear,0,rw RITIMER_CTRL,2,1,RITENBR,Timer enable for debug,1,rw RITIMER_CTRL,3,1,RITEN,Timer enable,1,rw RITIMER_COUNTER,0,32,RICOUNTER,32-bit up counter,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ritimer.yaml ================================================ !!omap - RITIMER_COMPVAL: fields: !!omap - RICOMP: access: rw description: Compare register lsb: 0 reset_value: '0xFFFFFFFF' width: 32 - RITIMER_MASK: fields: !!omap - RIMASK: access: rw description: Mask register lsb: 0 reset_value: '0' width: 32 - RITIMER_CTRL: fields: !!omap - RITINT: access: rw description: Interrupt flag lsb: 0 reset_value: '0' width: 1 - RITENCLR: access: rw description: Timer enable clear lsb: 1 reset_value: '0' width: 1 - RITENBR: access: rw description: Timer enable for debug lsb: 2 reset_value: '1' width: 1 - RITEN: access: rw description: Timer enable lsb: 3 reset_value: '1' width: 1 - RITIMER_COUNTER: fields: !!omap - RICOUNTER: access: rw description: 32-bit up counter lsb: 0 reset_value: '0' width: 32 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/rtc.csv ================================================ RTC_ILR,0,1,RTCCIF,Counter increment interrupt block interrupted,0,w RTC_ILR,1,1,RTCALF,Alarm interrupted,0,w RTC_CCR,0,1,CLKEN,Clock enable,,rw RTC_CCR,1,1,CTCRST,CTC reset,0,rw RTC_CCR,4,1,CCALEN,Calibration counter enable,,rw RTC_CIIR,0,1,IMSEC,Second interrupt enable,0,rw RTC_CIIR,1,1,IMMIN,Minute interrupt enable,0,rw RTC_CIIR,2,1,IMHOUR,Hour interrupt enable,0,rw RTC_CIIR,3,1,IMDOM,Day of month interrupt enable,0,rw RTC_CIIR,4,1,IMDOW,Day of week interrupt enable,0,rw RTC_CIIR,5,1,IMDOY,Day of year interrupt enable,0,rw RTC_CIIR,6,1,IMMON,Month interrupt enable,0,rw RTC_CIIR,7,1,IMYEAR,Year interrupt enable,0,rw RTC_AMR,0,1,AMRSEC,Second not compared for alarm,0,rw RTC_AMR,1,1,AMRMIN,Minute not compared for alarm,0,rw RTC_AMR,2,1,AMRHOUR,Hour not compared for alarm,0,rw RTC_AMR,3,1,AMRDOM,Day of month not compared for alarm,0,rw RTC_AMR,4,1,AMRDOW,Day of week not compared for alarm,0,rw RTC_AMR,5,1,AMRDOY,Day of year not compared for alarm,0,rw RTC_AMR,6,1,AMRMON,Month not compared for alarm,0,rw RTC_AMR,7,1,AMRYEAR,Year not compared for alarm,0,rw RTC_CTIME0,0,6,SECONDS,Seconds,,r RTC_CTIME0,8,6,MINUTES,Minutes,,r RTC_CTIME0,16,5,HOURS,Hours,,r RTC_CTIME0,24,3,DOW,Day of week,,r RTC_CTIME1,0,5,DOM,Day of month,,r RTC_CTIME1,8,4,MONTH,Month,,r RTC_CTIME1,16,12,YEAR,Year,,r RTC_CTIME2,0,12,DOY,Day of year,,r RTC_SEC,0,6,SECONDS,Seconds,,rw RTC_MIN,0,6,MINUTES,Minutes,,rw RTC_HRS,0,5,HOURS,Hours,,rw RTC_DOM,0,5,DOM,Day of month,,rw RTC_DOW,0,3,DOW,Day of week,,rw RTC_DOY,0,9,DOY,Day of year,,rw RTC_MONTH,0,4,MONTH,Month,,rw RTC_YEAR,0,12,YEAR,Year,,rw RTC_CALIBRATION,0,17,CALVAL,Calibration counter max,,rw RTC_CALIBRATION,17,1,CALDIR,Calibration counter direction,,rw RTC_ASEC,0,6,SECONDS,Alarm seconds,,rw RTC_AMIN,0,6,MINUTES,Alarm minutes,,rw RTC_AHRS,0,5,HOURS,Alarm hours,,rw RTC_ADOM,0,5,DOM,Alarm day of month,,rw RTC_ADOW,0,3,DOW,Alarm day of week,,rw RTC_ADOY,0,9,DOY,Alarm day of year,,rw RTC_AMON,0,4,MONTH,Alarm month,,rw RTC_AYRS,0,12,YEAR,Alarm year,,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/rtc.yaml ================================================ !!omap - RTC_ILR: fields: !!omap - RTCCIF: access: w description: Counter increment interrupt block interrupted lsb: 0 reset_value: '0' width: 1 - RTCALF: access: w description: Alarm interrupted lsb: 1 reset_value: '0' width: 1 - RTC_CCR: fields: !!omap - CLKEN: access: rw description: Clock enable lsb: 0 reset_value: '' width: 1 - CTCRST: access: rw description: CTC reset lsb: 1 reset_value: '0' width: 1 - CCALEN: access: rw description: Calibration counter enable lsb: 4 reset_value: '' width: 1 - RTC_CIIR: fields: !!omap - IMSEC: access: rw description: Second interrupt enable lsb: 0 reset_value: '0' width: 1 - IMMIN: access: rw description: Minute interrupt enable lsb: 1 reset_value: '0' width: 1 - IMHOUR: access: rw description: Hour interrupt enable lsb: 2 reset_value: '0' width: 1 - IMDOM: access: rw description: Day of month interrupt enable lsb: 3 reset_value: '0' width: 1 - IMDOW: access: rw description: Day of week interrupt enable lsb: 4 reset_value: '0' width: 1 - IMDOY: access: rw description: Day of year interrupt enable lsb: 5 reset_value: '0' width: 1 - IMMON: access: rw description: Month interrupt enable lsb: 6 reset_value: '0' width: 1 - IMYEAR: access: rw description: Year interrupt enable lsb: 7 reset_value: '0' width: 1 - RTC_AMR: fields: !!omap - AMRSEC: access: rw description: Second not compared for alarm lsb: 0 reset_value: '0' width: 1 - AMRMIN: access: rw description: Minute not compared for alarm lsb: 1 reset_value: '0' width: 1 - AMRHOUR: access: rw description: Hour not compared for alarm lsb: 2 reset_value: '0' width: 1 - AMRDOM: access: rw description: Day of month not compared for alarm lsb: 3 reset_value: '0' width: 1 - AMRDOW: access: rw description: Day of week not compared for alarm lsb: 4 reset_value: '0' width: 1 - AMRDOY: access: rw description: Day of year not compared for alarm lsb: 5 reset_value: '0' width: 1 - AMRMON: access: rw description: Month not compared for alarm lsb: 6 reset_value: '0' width: 1 - AMRYEAR: access: rw description: Year not compared for alarm lsb: 7 reset_value: '0' width: 1 - RTC_CTIME0: fields: !!omap - SECONDS: access: r description: Seconds lsb: 0 reset_value: '' width: 6 - MINUTES: access: r description: Minutes lsb: 8 reset_value: '' width: 6 - HOURS: access: r description: Hours lsb: 16 reset_value: '' width: 5 - DOW: access: r description: Day of week lsb: 24 reset_value: '' width: 3 - RTC_CTIME1: fields: !!omap - DOM: access: r description: Day of month lsb: 0 reset_value: '' width: 5 - MONTH: access: r description: Month lsb: 8 reset_value: '' width: 4 - YEAR: access: r description: Year lsb: 16 reset_value: '' width: 12 - RTC_CTIME2: fields: !!omap - DOY: access: r description: Day of year lsb: 0 reset_value: '' width: 12 - RTC_SEC: fields: !!omap - SECONDS: access: rw description: Seconds lsb: 0 reset_value: '' width: 6 - RTC_MIN: fields: !!omap - MINUTES: access: rw description: Minutes lsb: 0 reset_value: '' width: 6 - RTC_HRS: fields: !!omap - HOURS: access: rw description: Hours lsb: 0 reset_value: '' width: 5 - RTC_DOM: fields: !!omap - DOM: access: rw description: Day of month lsb: 0 reset_value: '' width: 5 - RTC_DOW: fields: !!omap - DOW: access: rw description: Day of week lsb: 0 reset_value: '' width: 3 - RTC_DOY: fields: !!omap - DOY: access: rw description: Day of year lsb: 0 reset_value: '' width: 9 - RTC_MONTH: fields: !!omap - MONTH: access: rw description: Month lsb: 0 reset_value: '' width: 4 - RTC_YEAR: fields: !!omap - YEAR: access: rw description: Year lsb: 0 reset_value: '' width: 12 - RTC_CALIBRATION: fields: !!omap - CALVAL: access: rw description: Calibration counter max lsb: 0 reset_value: '' width: 17 - CALDIR: access: rw description: Calibration counter direction lsb: 17 reset_value: '' width: 1 - RTC_ASEC: fields: !!omap - SECONDS: access: rw description: Alarm seconds lsb: 0 reset_value: '' width: 6 - RTC_AMIN: fields: !!omap - MINUTES: access: rw description: Alarm minutes lsb: 0 reset_value: '' width: 6 - RTC_AHRS: fields: !!omap - HOURS: access: rw description: Alarm hours lsb: 0 reset_value: '' width: 5 - RTC_ADOM: fields: !!omap - DOM: access: rw description: Alarm day of month lsb: 0 reset_value: '' width: 5 - RTC_ADOW: fields: !!omap - DOW: access: rw description: Alarm day of week lsb: 0 reset_value: '' width: 3 - RTC_ADOY: fields: !!omap - DOY: access: rw description: Alarm day of year lsb: 0 reset_value: '' width: 9 - RTC_AMON: fields: !!omap - MONTH: access: rw description: Alarm month lsb: 0 reset_value: '' width: 4 - RTC_AYRS: fields: !!omap - YEAR: access: rw description: Alarm year lsb: 0 reset_value: '' width: 12 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/scu.csv ================================================ SCU_SFSP0_0,0,3,MODE,Select pin function,0,rw SCU_SFSP0_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP0_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP0_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP0_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP0_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP0_1,0,3,MODE,Select pin function,0,rw SCU_SFSP0_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP0_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP0_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP0_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP0_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_0,0,3,MODE,Select pin function,0,rw SCU_SFSP1_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_1,0,3,MODE,Select pin function,0,rw SCU_SFSP1_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_2,0,3,MODE,Select pin function,0,rw SCU_SFSP1_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_3,0,3,MODE,Select pin function,0,rw SCU_SFSP1_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_4,0,3,MODE,Select pin function,0,rw SCU_SFSP1_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_5,0,3,MODE,Select pin function,0,rw SCU_SFSP1_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_6,0,3,MODE,Select pin function,0,rw SCU_SFSP1_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_7,0,3,MODE,Select pin function,0,rw SCU_SFSP1_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_8,0,3,MODE,Select pin function,0,rw SCU_SFSP1_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_9,0,3,MODE,Select pin function,0,rw SCU_SFSP1_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_10,0,3,MODE,Select pin function,0,rw SCU_SFSP1_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_11,0,3,MODE,Select pin function,0,rw SCU_SFSP1_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_12,0,3,MODE,Select pin function,0,rw SCU_SFSP1_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_13,0,3,MODE,Select pin function,0,rw SCU_SFSP1_13,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_13,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_13,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_13,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_13,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_14,0,3,MODE,Select pin function,0,rw SCU_SFSP1_14,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_14,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_14,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_14,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_14,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_15,0,3,MODE,Select pin function,0,rw SCU_SFSP1_15,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_15,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_15,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_15,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_15,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_16,0,3,MODE,Select pin function,0,rw SCU_SFSP1_16,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_16,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_16,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_16,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_16,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_18,0,3,MODE,Select pin function,0,rw SCU_SFSP1_18,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_18,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_18,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_18,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_18,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_19,0,3,MODE,Select pin function,0,rw SCU_SFSP1_19,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_19,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_19,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_19,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_19,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_20,0,3,MODE,Select pin function,0,rw SCU_SFSP1_20,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_20,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_20,5,1,EHS,Select Slew rate,0,rw SCU_SFSP1_20,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_20,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_0,0,3,MODE,Select pin function,0,rw SCU_SFSP2_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_1,0,3,MODE,Select pin function,0,rw SCU_SFSP2_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_2,0,3,MODE,Select pin function,0,rw SCU_SFSP2_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_6,0,3,MODE,Select pin function,0,rw SCU_SFSP2_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_7,0,3,MODE,Select pin function,0,rw SCU_SFSP2_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_8,0,3,MODE,Select pin function,0,rw SCU_SFSP2_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_9,0,3,MODE,Select pin function,0,rw SCU_SFSP2_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_10,0,3,MODE,Select pin function,0,rw SCU_SFSP2_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_11,0,3,MODE,Select pin function,0,rw SCU_SFSP2_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_12,0,3,MODE,Select pin function,0,rw SCU_SFSP2_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_13,0,3,MODE,Select pin function,0,rw SCU_SFSP2_13,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_13,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_13,5,1,EHS,Select Slew rate,0,rw SCU_SFSP2_13,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_13,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_0,0,3,MODE,Select pin function,0,rw SCU_SFSP3_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_1,0,3,MODE,Select pin function,0,rw SCU_SFSP3_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_2,0,3,MODE,Select pin function,0,rw SCU_SFSP3_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_4,0,3,MODE,Select pin function,0,rw SCU_SFSP3_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_5,0,3,MODE,Select pin function,0,rw SCU_SFSP3_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_6,0,3,MODE,Select pin function,0,rw SCU_SFSP3_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_7,0,3,MODE,Select pin function,0,rw SCU_SFSP3_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP3_8,0,3,MODE,Select pin function,0,rw SCU_SFSP3_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_0,0,3,MODE,Select pin function,0,rw SCU_SFSP4_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_1,0,3,MODE,Select pin function,0,rw SCU_SFSP4_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_2,0,3,MODE,Select pin function,0,rw SCU_SFSP4_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_3,0,3,MODE,Select pin function,0,rw SCU_SFSP4_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_4,0,3,MODE,Select pin function,0,rw SCU_SFSP4_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_5,0,3,MODE,Select pin function,0,rw SCU_SFSP4_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_6,0,3,MODE,Select pin function,0,rw SCU_SFSP4_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_7,0,3,MODE,Select pin function,0,rw SCU_SFSP4_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_8,0,3,MODE,Select pin function,0,rw SCU_SFSP4_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_9,0,3,MODE,Select pin function,0,rw SCU_SFSP4_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP4_10,0,3,MODE,Select pin function,0,rw SCU_SFSP4_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP4_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP4_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSP4_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSP4_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_0,0,3,MODE,Select pin function,0,rw SCU_SFSP5_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_1,0,3,MODE,Select pin function,0,rw SCU_SFSP5_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_2,0,3,MODE,Select pin function,0,rw SCU_SFSP5_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_3,0,3,MODE,Select pin function,0,rw SCU_SFSP5_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_4,0,3,MODE,Select pin function,0,rw SCU_SFSP5_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_5,0,3,MODE,Select pin function,0,rw SCU_SFSP5_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_6,0,3,MODE,Select pin function,0,rw SCU_SFSP5_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP5_7,0,3,MODE,Select pin function,0,rw SCU_SFSP5_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP5_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP5_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP5_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP5_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_0,0,3,MODE,Select pin function,0,rw SCU_SFSP6_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_1,0,3,MODE,Select pin function,0,rw SCU_SFSP6_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_2,0,3,MODE,Select pin function,0,rw SCU_SFSP6_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_3,0,3,MODE,Select pin function,0,rw SCU_SFSP6_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_4,0,3,MODE,Select pin function,0,rw SCU_SFSP6_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_5,0,3,MODE,Select pin function,0,rw SCU_SFSP6_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_6,0,3,MODE,Select pin function,0,rw SCU_SFSP6_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_7,0,3,MODE,Select pin function,0,rw SCU_SFSP6_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_8,0,3,MODE,Select pin function,0,rw SCU_SFSP6_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_9,0,3,MODE,Select pin function,0,rw SCU_SFSP6_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_10,0,3,MODE,Select pin function,0,rw SCU_SFSP6_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_11,0,3,MODE,Select pin function,0,rw SCU_SFSP6_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP6_12,0,3,MODE,Select pin function,0,rw SCU_SFSP6_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP6_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP6_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSP6_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSP6_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_0,0,3,MODE,Select pin function,0,rw SCU_SFSP7_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_1,0,3,MODE,Select pin function,0,rw SCU_SFSP7_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_2,0,3,MODE,Select pin function,0,rw SCU_SFSP7_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_3,0,3,MODE,Select pin function,0,rw SCU_SFSP7_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_4,0,3,MODE,Select pin function,0,rw SCU_SFSP7_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_5,0,3,MODE,Select pin function,0,rw SCU_SFSP7_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_6,0,3,MODE,Select pin function,0,rw SCU_SFSP7_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP7_7,0,3,MODE,Select pin function,0,rw SCU_SFSP7_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP7_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP7_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP7_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP7_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_3,0,3,MODE,Select pin function,0,rw SCU_SFSP8_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_4,0,3,MODE,Select pin function,0,rw SCU_SFSP8_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_5,0,3,MODE,Select pin function,0,rw SCU_SFSP8_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_6,0,3,MODE,Select pin function,0,rw SCU_SFSP8_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_7,0,3,MODE,Select pin function,0,rw SCU_SFSP8_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_8,0,3,MODE,Select pin function,0,rw SCU_SFSP8_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSP8_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_0,0,3,MODE,Select pin function,0,rw SCU_SFSP9_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_1,0,3,MODE,Select pin function,0,rw SCU_SFSP9_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_2,0,3,MODE,Select pin function,0,rw SCU_SFSP9_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_3,0,3,MODE,Select pin function,0,rw SCU_SFSP9_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_4,0,3,MODE,Select pin function,0,rw SCU_SFSP9_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_5,0,3,MODE,Select pin function,0,rw SCU_SFSP9_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP9_6,0,3,MODE,Select pin function,0,rw SCU_SFSP9_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP9_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP9_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSP9_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSP9_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPA_0,0,3,MODE,Select pin function,0,rw SCU_SFSPA_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPA_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPA_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPA_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPA_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPA_4,0,3,MODE,Select pin function,0,rw SCU_SFSPA_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPA_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPA_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPA_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPA_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_0,0,3,MODE,Select pin function,0,rw SCU_SFSPB_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_1,0,3,MODE,Select pin function,0,rw SCU_SFSPB_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_2,0,3,MODE,Select pin function,0,rw SCU_SFSPB_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_3,0,3,MODE,Select pin function,0,rw SCU_SFSPB_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_4,0,3,MODE,Select pin function,0,rw SCU_SFSPB_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_5,0,3,MODE,Select pin function,0,rw SCU_SFSPB_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPB_6,0,3,MODE,Select pin function,0,rw SCU_SFSPB_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPB_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPB_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSPB_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSPB_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_0,0,3,MODE,Select pin function,0,rw SCU_SFSPC_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_1,0,3,MODE,Select pin function,0,rw SCU_SFSPC_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_2,0,3,MODE,Select pin function,0,rw SCU_SFSPC_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_3,0,3,MODE,Select pin function,0,rw SCU_SFSPC_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_4,0,3,MODE,Select pin function,0,rw SCU_SFSPC_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_5,0,3,MODE,Select pin function,0,rw SCU_SFSPC_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_6,0,3,MODE,Select pin function,0,rw SCU_SFSPC_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_7,0,3,MODE,Select pin function,0,rw SCU_SFSPC_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_8,0,3,MODE,Select pin function,0,rw SCU_SFSPC_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_9,0,3,MODE,Select pin function,0,rw SCU_SFSPC_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_10,0,3,MODE,Select pin function,0,rw SCU_SFSPC_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_11,0,3,MODE,Select pin function,0,rw SCU_SFSPC_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_12,0,3,MODE,Select pin function,0,rw SCU_SFSPC_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_13,0,3,MODE,Select pin function,0,rw SCU_SFSPC_13,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_13,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_13,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_13,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_13,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPC_14,0,3,MODE,Select pin function,0,rw SCU_SFSPC_14,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPC_14,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPC_14,5,1,EHS,Select Slew rate,0,rw SCU_SFSPC_14,6,1,EZI,Input buffer enable,0,rw SCU_SFSPC_14,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_0,0,3,MODE,Select pin function,0,rw SCU_SFSPD_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_1,0,3,MODE,Select pin function,0,rw SCU_SFSPD_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_2,0,3,MODE,Select pin function,0,rw SCU_SFSPD_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_3,0,3,MODE,Select pin function,0,rw SCU_SFSPD_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_4,0,3,MODE,Select pin function,0,rw SCU_SFSPD_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_5,0,3,MODE,Select pin function,0,rw SCU_SFSPD_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_6,0,3,MODE,Select pin function,0,rw SCU_SFSPD_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_7,0,3,MODE,Select pin function,0,rw SCU_SFSPD_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_8,0,3,MODE,Select pin function,0,rw SCU_SFSPD_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_9,0,3,MODE,Select pin function,0,rw SCU_SFSPD_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_10,0,3,MODE,Select pin function,0,rw SCU_SFSPD_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_11,0,3,MODE,Select pin function,0,rw SCU_SFSPD_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_12,0,3,MODE,Select pin function,0,rw SCU_SFSPD_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_13,0,3,MODE,Select pin function,0,rw SCU_SFSPD_13,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_13,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_13,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_13,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_13,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_14,0,3,MODE,Select pin function,0,rw SCU_SFSPD_14,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_14,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_14,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_14,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_14,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_15,0,3,MODE,Select pin function,0,rw SCU_SFSPD_15,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_15,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_15,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_15,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_15,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPD_16,0,3,MODE,Select pin function,0,rw SCU_SFSPD_16,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPD_16,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPD_16,5,1,EHS,Select Slew rate,0,rw SCU_SFSPD_16,6,1,EZI,Input buffer enable,0,rw SCU_SFSPD_16,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_0,0,3,MODE,Select pin function,0,rw SCU_SFSPE_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_1,0,3,MODE,Select pin function,0,rw SCU_SFSPE_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_2,0,3,MODE,Select pin function,0,rw SCU_SFSPE_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_3,0,3,MODE,Select pin function,0,rw SCU_SFSPE_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_4,0,3,MODE,Select pin function,0,rw SCU_SFSPE_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_5,0,3,MODE,Select pin function,0,rw SCU_SFSPE_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_6,0,3,MODE,Select pin function,0,rw SCU_SFSPE_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_7,0,3,MODE,Select pin function,0,rw SCU_SFSPE_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_8,0,3,MODE,Select pin function,0,rw SCU_SFSPE_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_9,0,3,MODE,Select pin function,0,rw SCU_SFSPE_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_10,0,3,MODE,Select pin function,0,rw SCU_SFSPE_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_11,0,3,MODE,Select pin function,0,rw SCU_SFSPE_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_12,0,3,MODE,Select pin function,0,rw SCU_SFSPE_12,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_12,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_12,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_12,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_12,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_13,0,3,MODE,Select pin function,0,rw SCU_SFSPE_13,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_13,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_13,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_13,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_13,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_14,0,3,MODE,Select pin function,0,rw SCU_SFSPE_14,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_14,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_14,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_14,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_14,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPE_15,0,3,MODE,Select pin function,0,rw SCU_SFSPE_15,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPE_15,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPE_15,5,1,EHS,Select Slew rate,0,rw SCU_SFSPE_15,6,1,EZI,Input buffer enable,0,rw SCU_SFSPE_15,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_0,0,3,MODE,Select pin function,0,rw SCU_SFSPF_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_0,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_1,0,3,MODE,Select pin function,0,rw SCU_SFSPF_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_1,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_2,0,3,MODE,Select pin function,0,rw SCU_SFSPF_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_2,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_3,0,3,MODE,Select pin function,0,rw SCU_SFSPF_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_4,0,3,MODE,Select pin function,0,rw SCU_SFSPF_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_4,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_5,0,3,MODE,Select pin function,0,rw SCU_SFSPF_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_5,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_6,0,3,MODE,Select pin function,0,rw SCU_SFSPF_6,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_6,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_6,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_6,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_6,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_7,0,3,MODE,Select pin function,0,rw SCU_SFSPF_7,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_7,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_7,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_7,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_7,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_8,0,3,MODE,Select pin function,0,rw SCU_SFSPF_8,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_8,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_8,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_8,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_8,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_9,0,3,MODE,Select pin function,0,rw SCU_SFSPF_9,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_9,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_9,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_9,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_9,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_10,0,3,MODE,Select pin function,0,rw SCU_SFSPF_10,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_10,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_10,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_10,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_10,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPF_11,0,3,MODE,Select pin function,0,rw SCU_SFSPF_11,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPF_11,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPF_11,5,1,EHS,Select Slew rate,0,rw SCU_SFSPF_11,6,1,EZI,Input buffer enable,0,rw SCU_SFSPF_11,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_17,0,3,MODE,Select pin function,0,rw SCU_SFSP1_17,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP1_17,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP1_17,6,1,EZI,Input buffer enable,0,rw SCU_SFSP1_17,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP1_17,8,2,EHD,Select drive strength,0,rw SCU_SFSP2_3,0,3,MODE,Select pin function,0,rw SCU_SFSP2_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_3,8,2,EHD,Select drive strength,0,rw SCU_SFSP2_4,0,3,MODE,Select pin function,0,rw SCU_SFSP2_4,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_4,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_4,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_4,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_4,8,2,EHD,Select drive strength,0,rw SCU_SFSP2_5,0,3,MODE,Select pin function,0,rw SCU_SFSP2_5,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP2_5,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP2_5,6,1,EZI,Input buffer enable,0,rw SCU_SFSP2_5,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP2_5,8,2,EHD,Select drive strength,0,rw SCU_SFSP8_0,0,3,MODE,Select pin function,0,rw SCU_SFSP8_0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_0,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_0,8,2,EHD,Select drive strength,0,rw SCU_SFSP8_1,0,3,MODE,Select pin function,0,rw SCU_SFSP8_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_1,8,2,EHD,Select drive strength,0,rw SCU_SFSP8_2,0,3,MODE,Select pin function,0,rw SCU_SFSP8_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP8_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP8_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSP8_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSP8_2,8,2,EHD,Select drive strength,0,rw SCU_SFSPA_1,0,3,MODE,Select pin function,0,rw SCU_SFSPA_1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPA_1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPA_1,6,1,EZI,Input buffer enable,0,rw SCU_SFSPA_1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPA_1,8,2,EHD,Select drive strength,0,rw SCU_SFSPA_2,0,3,MODE,Select pin function,0,rw SCU_SFSPA_2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPA_2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPA_2,6,1,EZI,Input buffer enable,0,rw SCU_SFSPA_2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPA_2,8,2,EHD,Select drive strength,0,rw SCU_SFSPA_3,0,3,MODE,Select pin function,0,rw SCU_SFSPA_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSPA_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSPA_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSPA_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSPA_3,8,2,EHD,Select drive strength,0,rw SCU_SFSP3_3,0,3,MODE,Select pin function,0,rw SCU_SFSP3_3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSP3_3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSP3_3,5,1,EHS,Select Slew rate,0,rw SCU_SFSP3_3,6,1,EZI,Input buffer enable,0,rw SCU_SFSP3_3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSCLK0,0,3,MODE,Select pin function,0,rw SCU_SFSCLK0,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSCLK0,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSCLK0,5,1,EHS,Select Slew rate,0,rw SCU_SFSCLK0,6,1,EZI,Input buffer enable,0,rw SCU_SFSCLK0,7,1,ZIF,Input glitch filter,0,rw SCU_SFSCLK1,0,3,MODE,Select pin function,0,rw SCU_SFSCLK1,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSCLK1,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSCLK1,5,1,EHS,Select Slew rate,0,rw SCU_SFSCLK1,6,1,EZI,Input buffer enable,0,rw SCU_SFSCLK1,7,1,ZIF,Input glitch filter,0,rw SCU_SFSCLK2,0,3,MODE,Select pin function,0,rw SCU_SFSCLK2,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSCLK2,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSCLK2,5,1,EHS,Select Slew rate,0,rw SCU_SFSCLK2,6,1,EZI,Input buffer enable,0,rw SCU_SFSCLK2,7,1,ZIF,Input glitch filter,0,rw SCU_SFSCLK3,0,3,MODE,Select pin function,0,rw SCU_SFSCLK3,3,1,EPD,Enable pull-down resistor at pad,0,rw SCU_SFSCLK3,4,1,EPUN,Disable pull-up resistor at pad,0,rw SCU_SFSCLK3,5,1,EHS,Select Slew rate,0,rw SCU_SFSCLK3,6,1,EZI,Input buffer enable,0,rw SCU_SFSCLK3,7,1,ZIF,Input glitch filter,0,rw SCU_SFSUSB,0,1,USB_AIM,Differential data input AIP/AIM,0,rw SCU_SFSUSB,1,1,USB_ESEA,Control signal for differential input or single input,1,rw SCU_SFSUSB,2,1,USB_EPD,Enable pull-down connect,0,rw SCU_SFSUSB,4,1,USB_EPWR,Power mode,0,rw SCU_SFSUSB,5,1,USB_VBUS,Enable the vbus_valid signal,0,rw SCU_SFSI2C0,0,1,SCL_EFP,Select input glitch filter time constant for the SCL pin,0,rw SCU_SFSI2C0,2,1,SCL_EHD,Select I2C mode for the SCL pin,0,rw SCU_SFSI2C0,3,1,SCL_EZI,Enable the input receiver for the SCL pin,0,rw SCU_SFSI2C0,7,1,SCL_ZIF,Enable or disable input glitch filter for the SCL pin,0,rw SCU_SFSI2C0,8,1,SDA_EFP,Select input glitch filter time constant for the SDA pin,0,rw SCU_SFSI2C0,10,1,SDA_EHD,Select I2C mode for the SDA pin,0,rw SCU_SFSI2C0,11,1,SDA_EZI,Enable the input receiver for the SDA pin,0,rw SCU_SFSI2C0,15,1,SDA_ZIF,Enable or disable input glitch filter for the SDA pin,0,rw SCU_ENAIO0,0,1,ADC0_0,Select ADC0_0,0,rw SCU_ENAIO0,1,1,ADC0_1,Select ADC0_1,0,rw SCU_ENAIO0,2,1,ADC0_2,Select ADC0_2,0,rw SCU_ENAIO0,3,1,ADC0_3,Select ADC0_3,0,rw SCU_ENAIO0,4,1,ADC0_4,Select ADC0_4,0,rw SCU_ENAIO0,5,1,ADC0_5,Select ADC0_5,0,rw SCU_ENAIO0,6,1,ADC0_6,Select ADC0_6,0,rw SCU_ENAIO1,0,1,ADC1_0,Select ADC1_0,0,rw SCU_ENAIO1,1,1,ADC1_1,Select ADC1_1,0,rw SCU_ENAIO1,2,1,ADC1_2,Select ADC1_2,0,rw SCU_ENAIO1,3,1,ADC1_3,Select ADC1_3,0,rw SCU_ENAIO1,4,1,ADC1_4,Select ADC1_4,0,rw SCU_ENAIO1,5,1,ADC1_5,Select ADC1_5,0,rw SCU_ENAIO1,6,1,ADC1_6,Select ADC1_6,0,rw SCU_ENAIO1,7,1,ADC1_7,Select ADC1_7,0,rw SCU_ENAIO2,0,1,DAC,Select DAC,0,rw SCU_ENAIO2,4,1,BG,Select band gap output,0,rw SCU_EMCDELAYCLK,0,16,CLK_DELAY,EMC_CLKn SDRAM clock output delay,0,rw SCU_PINTSEL0,0,5,INTPIN0,pin number for interrupt 0 source,0, SCU_PINTSEL0,5,3,PORTSEL0,port for interrupt 0 source,0, SCU_PINTSEL0,8,5,INTPIN1,pin number for interrupt 1 source,0, SCU_PINTSEL0,13,3,PORTSEL1,port for interrupt 1 source,0, SCU_PINTSEL0,16,5,INTPIN2,pin number for interrupt 2 source,0, SCU_PINTSEL0,21,3,PORTSEL2,port for interrupt 2 source,0, SCU_PINTSEL0,24,5,INTPIN3,pin number for interrupt 3 source,0, SCU_PINTSEL0,29,3,PORTSEL3,port for interrupt 3 source,0, SCU_PINTSEL1,0,5,INTPIN4,pin number for interrupt 4 source,0, SCU_PINTSEL1,5,3,PORTSEL4,port for interrupt 4 source,0, SCU_PINTSEL1,8,5,INTPIN5,pin number for interrupt 5 source,0, SCU_PINTSEL1,13,3,PORTSEL5,port for interrupt 5 source,0, SCU_PINTSEL1,16,5,INTPIN6,pin number for interrupt 6 source,0, SCU_PINTSEL1,21,3,PORTSEL6,port for interrupt 6 source,0, SCU_PINTSEL1,24,5,INTPIN7,pin number for interrupt 7 source,0, SCU_PINTSEL1,29,3,PORTSEL7,port for interrupt 7 source,0, ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/scu.yaml ================================================ !!omap - SCU_SFSP0_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP0_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_13: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_14: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_15: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_16: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_18: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_19: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_20: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP2_13: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP3_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP4_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP5_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP6_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP7_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP8_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP9_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPA_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPA_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPB_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_13: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPC_14: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_13: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_14: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_15: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPD_16: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_12: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_13: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_14: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPE_15: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_6: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_7: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_8: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_9: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_10: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSPF_11: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSP1_17: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP2_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP2_4: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP2_5: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP8_0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP8_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP8_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSPA_1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSPA_2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSPA_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - EHD: access: rw description: Select drive strength lsb: 8 reset_value: '0' width: 2 - SCU_SFSP3_3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSCLK0: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSCLK1: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSCLK2: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSCLK3: fields: !!omap - MODE: access: rw description: Select pin function lsb: 0 reset_value: '0' width: 3 - EPD: access: rw description: Enable pull-down resistor at pad lsb: 3 reset_value: '0' width: 1 - EPUN: access: rw description: Disable pull-up resistor at pad lsb: 4 reset_value: '0' width: 1 - EHS: access: rw description: Select Slew rate lsb: 5 reset_value: '0' width: 1 - EZI: access: rw description: Input buffer enable lsb: 6 reset_value: '0' width: 1 - ZIF: access: rw description: Input glitch filter lsb: 7 reset_value: '0' width: 1 - SCU_SFSUSB: fields: !!omap - USB_AIM: access: rw description: Differential data input AIP/AIM lsb: 0 reset_value: '0' width: 1 - USB_ESEA: access: rw description: Control signal for differential input or single input lsb: 1 reset_value: '1' width: 1 - USB_EPD: access: rw description: Enable pull-down connect lsb: 2 reset_value: '0' width: 1 - USB_EPWR: access: rw description: Power mode lsb: 4 reset_value: '0' width: 1 - USB_VBUS: access: rw description: Enable the vbus_valid signal lsb: 5 reset_value: '0' width: 1 - SCU_SFSI2C0: fields: !!omap - SCL_EFP: access: rw description: Select input glitch filter time constant for the SCL pin lsb: 0 reset_value: '0' width: 1 - SCL_EHD: access: rw description: Select I2C mode for the SCL pin lsb: 2 reset_value: '0' width: 1 - SCL_EZI: access: rw description: Enable the input receiver for the SCL pin lsb: 3 reset_value: '0' width: 1 - SCL_ZIF: access: rw description: Enable or disable input glitch filter for the SCL pin lsb: 7 reset_value: '0' width: 1 - SDA_EFP: access: rw description: Select input glitch filter time constant for the SDA pin lsb: 8 reset_value: '0' width: 1 - SDA_EHD: access: rw description: Select I2C mode for the SDA pin lsb: 10 reset_value: '0' width: 1 - SDA_EZI: access: rw description: Enable the input receiver for the SDA pin lsb: 11 reset_value: '0' width: 1 - SDA_ZIF: access: rw description: Enable or disable input glitch filter for the SDA pin lsb: 15 reset_value: '0' width: 1 - SCU_ENAIO0: fields: !!omap - ADC0_0: access: rw description: Select ADC0_0 lsb: 0 reset_value: '0' width: 1 - ADC0_1: access: rw description: Select ADC0_1 lsb: 1 reset_value: '0' width: 1 - ADC0_2: access: rw description: Select ADC0_2 lsb: 2 reset_value: '0' width: 1 - ADC0_3: access: rw description: Select ADC0_3 lsb: 3 reset_value: '0' width: 1 - ADC0_4: access: rw description: Select ADC0_4 lsb: 4 reset_value: '0' width: 1 - ADC0_5: access: rw description: Select ADC0_5 lsb: 5 reset_value: '0' width: 1 - ADC0_6: access: rw description: Select ADC0_6 lsb: 6 reset_value: '0' width: 1 - SCU_ENAIO1: fields: !!omap - ADC1_0: access: rw description: Select ADC1_0 lsb: 0 reset_value: '0' width: 1 - ADC1_1: access: rw description: Select ADC1_1 lsb: 1 reset_value: '0' width: 1 - ADC1_2: access: rw description: Select ADC1_2 lsb: 2 reset_value: '0' width: 1 - ADC1_3: access: rw description: Select ADC1_3 lsb: 3 reset_value: '0' width: 1 - ADC1_4: access: rw description: Select ADC1_4 lsb: 4 reset_value: '0' width: 1 - ADC1_5: access: rw description: Select ADC1_5 lsb: 5 reset_value: '0' width: 1 - ADC1_6: access: rw description: Select ADC1_6 lsb: 6 reset_value: '0' width: 1 - ADC1_7: access: rw description: Select ADC1_7 lsb: 7 reset_value: '0' width: 1 - SCU_ENAIO2: fields: !!omap - DAC: access: rw description: Select DAC lsb: 0 reset_value: '0' width: 1 - BG: access: rw description: Select band gap output lsb: 4 reset_value: '0' width: 1 - SCU_EMCDELAYCLK: fields: !!omap - CLK_DELAY: access: rw description: EMC_CLKn SDRAM clock output delay lsb: 0 reset_value: '0' width: 16 - SCU_PINTSEL0: fields: !!omap - INTPIN0: access: '' description: pin number for interrupt 0 source lsb: 0 reset_value: '0' width: 5 - PORTSEL0: access: '' description: port for interrupt 0 source lsb: 5 reset_value: '0' width: 3 - INTPIN1: access: '' description: pin number for interrupt 1 source lsb: 8 reset_value: '0' width: 5 - PORTSEL1: access: '' description: port for interrupt 1 source lsb: 13 reset_value: '0' width: 3 - INTPIN2: access: '' description: pin number for interrupt 2 source lsb: 16 reset_value: '0' width: 5 - PORTSEL2: access: '' description: port for interrupt 2 source lsb: 21 reset_value: '0' width: 3 - INTPIN3: access: '' description: pin number for interrupt 3 source lsb: 24 reset_value: '0' width: 5 - PORTSEL3: access: '' description: port for interrupt 3 source lsb: 29 reset_value: '0' width: 3 - SCU_PINTSEL1: fields: !!omap - INTPIN4: access: '' description: pin number for interrupt 4 source lsb: 0 reset_value: '0' width: 5 - PORTSEL4: access: '' description: port for interrupt 4 source lsb: 5 reset_value: '0' width: 3 - INTPIN5: access: '' description: pin number for interrupt 5 source lsb: 8 reset_value: '0' width: 5 - PORTSEL5: access: '' description: port for interrupt 5 source lsb: 13 reset_value: '0' width: 3 - INTPIN6: access: '' description: pin number for interrupt 6 source lsb: 16 reset_value: '0' width: 5 - PORTSEL6: access: '' description: port for interrupt 6 source lsb: 21 reset_value: '0' width: 3 - INTPIN7: access: '' description: pin number for interrupt 7 source lsb: 24 reset_value: '0' width: 5 - PORTSEL7: access: '' description: port for interrupt 7 source lsb: 29 reset_value: '0' width: 3 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/sgpio.csv ================================================ SGPIO_OUT_MUX_CFG0,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG0,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG1,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG1,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG2,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG2,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG3,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG3,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG4,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG4,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG5,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG5,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG6,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG6,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG7,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG7,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG8,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG8,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG9,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG9,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG10,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG10,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG11,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG11,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG12,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG12,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG13,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG13,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG14,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG14,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_OUT_MUX_CFG15,0,4,P_OUT_CFG,Output control of output SGPIOn,0,rw SGPIO_OUT_MUX_CFG15,4,3,P_OE_CFG,Output enable source,0,rw SGPIO_MUX_CFG0,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG0,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG0,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG0,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG0,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG0,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG0,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG0,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG1,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG1,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG1,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG1,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG1,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG1,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG1,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG1,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG2,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG2,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG2,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG2,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG2,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG2,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG2,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG2,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG3,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG3,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG3,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG3,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG3,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG3,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG3,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG3,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG4,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG4,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG4,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG4,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG4,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG4,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG4,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG4,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG5,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG5,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG5,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG5,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG5,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG5,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG5,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG5,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG6,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG6,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG6,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG6,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG6,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG6,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG6,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG6,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG7,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG7,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG7,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG7,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG7,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG7,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG7,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG7,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG8,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG8,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG8,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG8,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG8,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG8,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG8,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG8,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG9,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG9,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG9,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG9,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG9,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG9,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG9,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG9,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG10,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG10,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG10,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG10,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG10,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG10,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG10,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG10,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG11,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG11,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG11,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG11,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG11,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG11,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG11,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG11,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG12,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG12,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG12,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG12,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG12,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG12,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG12,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG12,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG13,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG13,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG13,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG13,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG13,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG13,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG13,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG13,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG14,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG14,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG14,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG14,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG14,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG14,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG14,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG14,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_MUX_CFG15,0,1,EXT_CLK_ENABLE,Select clock signal,0,rw SGPIO_MUX_CFG15,1,2,CLK_SOURCE_PIN_MODE,Select source clock pin,0,rw SGPIO_MUX_CFG15,3,2,CLK_SOURCE_SLICE_MODE,Select clock source slice,0,rw SGPIO_MUX_CFG15,5,2,QUALIFIER_MODE,Select qualifier mode,0,rw SGPIO_MUX_CFG15,7,2,QUALIFIER_PIN_MODE,Select qualifier pin,0,rw SGPIO_MUX_CFG15,9,2,QUALIFIER_SLICE_MODE,Select qualifier slice,0,rw SGPIO_MUX_CFG15,11,1,CONCAT_ENABLE,Enable concatenation,0,rw SGPIO_MUX_CFG15,12,2,CONCAT_ORDER,Select concatenation order,0,rw SGPIO_SLICE_MUX_CFG0,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG0,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG0,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG0,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG0,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG0,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG0,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG1,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG1,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG1,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG1,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG1,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG1,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG1,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG2,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG2,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG2,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG2,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG2,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG2,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG2,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG3,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG3,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG3,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG3,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG3,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG3,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG3,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG4,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG4,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG4,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG4,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG4,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG4,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG4,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG5,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG5,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG5,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG5,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG5,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG5,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG5,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG6,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG6,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG6,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG6,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG6,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG6,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG6,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG7,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG7,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG7,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG7,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG7,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG7,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG7,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG8,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG8,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG8,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG8,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG8,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG8,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG8,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG9,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG9,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG9,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG9,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG9,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG9,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG9,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG10,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG10,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG10,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG10,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG10,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG10,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG10,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG11,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG11,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG11,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG11,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG11,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG11,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG11,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG12,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG12,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG12,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG12,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG12,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG12,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG12,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG13,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG13,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG13,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG13,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG13,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG13,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG13,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG14,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG14,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG14,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG14,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG14,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG14,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG14,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_SLICE_MUX_CFG15,0,1,MATCH_MODE,Match mode,0,rw SGPIO_SLICE_MUX_CFG15,1,1,CLK_CAPTURE_MODE,Capture clock mode,0,rw SGPIO_SLICE_MUX_CFG15,2,1,CLKGEN_MODE,Clock generation mode,0,rw SGPIO_SLICE_MUX_CFG15,3,1,INV_OUT_CLK,Invert output clock,0,rw SGPIO_SLICE_MUX_CFG15,4,2,DATA_CAPTURE_MODE,Condition for input bit match interrupt,0,rw SGPIO_SLICE_MUX_CFG15,6,2,PARALLEL_MODE,Parallel mode,0,rw SGPIO_SLICE_MUX_CFG15,8,1,INV_QUALIFIER,Inversion qualifier,0,rw SGPIO_POS0,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS0,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS1,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS1,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS2,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS2,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS3,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS3,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS4,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS4,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS5,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS5,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS6,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS6,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS7,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS7,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS8,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS8,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS9,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS9,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS10,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS10,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS11,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS11,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS12,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS12,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS13,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS13,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS14,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS14,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw SGPIO_POS15,0,8,POS,Each time COUNT reaches 0x0 POS counts down,0,rw SGPIO_POS15,8,8,POS_RESET,Reload value for POS after POS reaches 0x0,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/sgpio.yaml ================================================ !!omap - SGPIO_OUT_MUX_CFG0: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG1: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG2: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG3: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG4: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG5: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG6: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG7: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG8: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG9: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG10: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG11: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG12: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG13: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG14: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_OUT_MUX_CFG15: fields: !!omap - P_OUT_CFG: access: rw description: Output control of output SGPIOn lsb: 0 reset_value: '0' width: 4 - P_OE_CFG: access: rw description: Output enable source lsb: 4 reset_value: '0' width: 3 - SGPIO_MUX_CFG0: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG1: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG2: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG3: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG4: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG5: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG6: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG7: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG8: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG9: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG10: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG11: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG12: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG13: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG14: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_MUX_CFG15: fields: !!omap - EXT_CLK_ENABLE: access: rw description: Select clock signal lsb: 0 reset_value: '0' width: 1 - CLK_SOURCE_PIN_MODE: access: rw description: Select source clock pin lsb: 1 reset_value: '0' width: 2 - CLK_SOURCE_SLICE_MODE: access: rw description: Select clock source slice lsb: 3 reset_value: '0' width: 2 - QUALIFIER_MODE: access: rw description: Select qualifier mode lsb: 5 reset_value: '0' width: 2 - QUALIFIER_PIN_MODE: access: rw description: Select qualifier pin lsb: 7 reset_value: '0' width: 2 - QUALIFIER_SLICE_MODE: access: rw description: Select qualifier slice lsb: 9 reset_value: '0' width: 2 - CONCAT_ENABLE: access: rw description: Enable concatenation lsb: 11 reset_value: '0' width: 1 - CONCAT_ORDER: access: rw description: Select concatenation order lsb: 12 reset_value: '0' width: 2 - SGPIO_SLICE_MUX_CFG0: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG1: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG2: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG3: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG4: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG5: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG6: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG7: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG8: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG9: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG10: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG11: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG12: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG13: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG14: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_SLICE_MUX_CFG15: fields: !!omap - MATCH_MODE: access: rw description: Match mode lsb: 0 reset_value: '0' width: 1 - CLK_CAPTURE_MODE: access: rw description: Capture clock mode lsb: 1 reset_value: '0' width: 1 - CLKGEN_MODE: access: rw description: Clock generation mode lsb: 2 reset_value: '0' width: 1 - INV_OUT_CLK: access: rw description: Invert output clock lsb: 3 reset_value: '0' width: 1 - DATA_CAPTURE_MODE: access: rw description: Condition for input bit match interrupt lsb: 4 reset_value: '0' width: 2 - PARALLEL_MODE: access: rw description: Parallel mode lsb: 6 reset_value: '0' width: 2 - INV_QUALIFIER: access: rw description: Inversion qualifier lsb: 8 reset_value: '0' width: 1 - SGPIO_POS0: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS1: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS2: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS3: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS4: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS5: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS6: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS7: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS8: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS9: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS10: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS11: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS12: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS13: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS14: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 - SGPIO_POS15: fields: !!omap - POS: access: rw description: Each time COUNT reaches 0x0 POS counts down lsb: 0 reset_value: '0' width: 8 - POS_RESET: access: rw description: Reload value for POS after POS reaches 0x0 lsb: 8 reset_value: '0' width: 8 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/spi.csv ================================================ SPI_CR,2,1,BITENABLE,Bit length enable,0,rw SPI_CR,3,1,CPHA,Clock phase control,0,rw SPI_CR,4,1,CPOL,Clock polarity control,0,rw SPI_CR,5,1,MSTR,Master mode select,0,rw SPI_CR,6,1,LSBF,LSB first,0,rw SPI_CR,7,1,SPIE,Serial peripheral interrupt enable,0,rw SPI_CR,8,4,BITS,Bits per transfer,0,rw SPI_SR,3,1,ABRT,Slave abort,0,ro SPI_SR,4,1,MODF,Mode fault,0,ro SPI_SR,5,1,ROVR,Read overrun,0,ro SPI_SR,6,1,WCOL,Write collision,0,ro SPI_SR,7,1,SPIF,Transfer complete,0,ro SPI_DR,0,16,DATA,Bi-directional data port,0,rw SPI_CCR,0,8,COUNTER,Clock counter setting,0,rw SPI_TCR,1,7,TEST,Test mode,0,rw SPI_TSR,3,1,ABRT,Slave abort,0,rw SPI_TSR,4,1,MODF,Mode fault,0,rw SPI_TSR,5,1,ROVR,Read overrun,0,rw SPI_TSR,6,1,WCOL,Write collision,0,rw SPI_TSR,7,1,SPIF,Transfer complete,0,rw SPI_CR,0,1,SPIF,Interrupt,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/spi.yaml ================================================ !!omap - SPI_CR: fields: !!omap - BITENABLE: access: rw description: Bit length enable lsb: 2 reset_value: '0' width: 1 - CPHA: access: rw description: Clock phase control lsb: 3 reset_value: '0' width: 1 - CPOL: access: rw description: Clock polarity control lsb: 4 reset_value: '0' width: 1 - MSTR: access: rw description: Master mode select lsb: 5 reset_value: '0' width: 1 - LSBF: access: rw description: LSB first lsb: 6 reset_value: '0' width: 1 - SPIE: access: rw description: Serial peripheral interrupt enable lsb: 7 reset_value: '0' width: 1 - BITS: access: rw description: Bits per transfer lsb: 8 reset_value: '0' width: 4 - SPIF: access: rw description: Interrupt lsb: 0 reset_value: '0' width: 1 - SPI_SR: fields: !!omap - ABRT: access: ro description: Slave abort lsb: 3 reset_value: '0' width: 1 - MODF: access: ro description: Mode fault lsb: 4 reset_value: '0' width: 1 - ROVR: access: ro description: Read overrun lsb: 5 reset_value: '0' width: 1 - WCOL: access: ro description: Write collision lsb: 6 reset_value: '0' width: 1 - SPIF: access: ro description: Transfer complete lsb: 7 reset_value: '0' width: 1 - SPI_DR: fields: !!omap - DATA: access: rw description: Bi-directional data port lsb: 0 reset_value: '0' width: 16 - SPI_CCR: fields: !!omap - COUNTER: access: rw description: Clock counter setting lsb: 0 reset_value: '0' width: 8 - SPI_TCR: fields: !!omap - TEST: access: rw description: Test mode lsb: 1 reset_value: '0' width: 7 - SPI_TSR: fields: !!omap - ABRT: access: rw description: Slave abort lsb: 3 reset_value: '0' width: 1 - MODF: access: rw description: Mode fault lsb: 4 reset_value: '0' width: 1 - ROVR: access: rw description: Read overrun lsb: 5 reset_value: '0' width: 1 - WCOL: access: rw description: Write collision lsb: 6 reset_value: '0' width: 1 - SPIF: access: rw description: Transfer complete lsb: 7 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/spifi.csv ================================================ SPIFI_CTRL,0,16,TIMEOUT,Memory mode idle timeout,0xffff,rw SPIFI_CTRL,16,4,CSHIGH,Minimum CS# high time,15,rw SPIFI_CTRL,21,1,D_PRFTCH_DIS,Disable speculative prefetch,0,rw SPIFI_CTRL,22,1,INTEN,Enable command end interrupt,0,rw SPIFI_CTRL,23,1,MODE3,SPI mode 3 select,0,rw SPIFI_CTRL,27,1,PRFTCH_DIS,Disable prefetching of cache lines,0,rw SPIFI_CTRL,28,1,DUAL,Select dual protocol,0,rw SPIFI_CTRL,29,1,RFCLK,Read data on falling edge,0,rw SPIFI_CTRL,30,1,FBCLK,Feedback clock select,1,rw SPIFI_CTRL,31,1,DMAEN,DMA request output enable,0,rw SPIFI_CMD,0,14,DATALEN,Data bytes in command,0,rw SPIFI_CMD,14,1,POLL,Poll at end of command,0,rw SPIFI_CMD,15,1,DOUT,Data output to serial flash,0,rw SPIFI_CMD,16,3,INTLEN,Intermediate bytes before data,0,rw SPIFI_CMD,19,2,FIELDFORM,Form of command fields,0,rw SPIFI_CMD,21,3,FRAMEFORM,Form of the opcode/address fields,0,rw SPIFI_CMD,24,8,OPCODE,Command opcode,0,rw SPIFI_ADDR,0,32,ADDRESS,Address field value,0,rw SPIFI_IDATA,0,32,IDATA,Intermediate bytes value,0,rw SPIFI_CLIMIT,0,32,CLIMIT,Upper limit of cacheable memory,0x08000000,rw SPIFI_DATA,0,32,DATA,Input or output data,0,rw SPIFI_MCMD,14,1,POLL,Must be zero,0,rw SPIFI_MCMD,15,1,DOUT,Must be zero,0,rw SPIFI_MCMD,16,3,INTLEN,Intermediate bytes before data,0,rw SPIFI_MCMD,19,2,FIELDFORM,Form of command fields,0,rw SPIFI_MCMD,21,3,FRAMEFORM,Form of the opcode/address fields,0,rw SPIFI_MCMD,24,8,OPCODE,Command opcode,0,rw SPIFI_STAT,0,1,MCINIT,Memory command initialized,0,rw SPIFI_STAT,1,1,CMD,Command active,0,rw SPIFI_STAT,4,1,RESET,Abort current command/memory mode,0,rw SPIFI_STAT,5,1,INTRQ,Interrupt request status,0,rw SPIFI_STAT,24,8,VERSION,Peripheral hardware version,0x02,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/spifi.yaml ================================================ !!omap - SPIFI_CTRL: fields: !!omap - TIMEOUT: access: rw description: Memory mode idle timeout lsb: 0 reset_value: '0xffff' width: 16 - CSHIGH: access: rw description: Minimum CS# high time lsb: 16 reset_value: '15' width: 4 - D_PRFTCH_DIS: access: rw description: Disable speculative prefetch lsb: 21 reset_value: '0' width: 1 - INTEN: access: rw description: Enable command end interrupt lsb: 22 reset_value: '0' width: 1 - MODE3: access: rw description: SPI mode 3 select lsb: 23 reset_value: '0' width: 1 - PRFTCH_DIS: access: rw description: Disable prefetching of cache lines lsb: 27 reset_value: '0' width: 1 - DUAL: access: rw description: Select dual protocol lsb: 28 reset_value: '0' width: 1 - RFCLK: access: rw description: Read data on falling edge lsb: 29 reset_value: '0' width: 1 - FBCLK: access: rw description: Feedback clock select lsb: 30 reset_value: '1' width: 1 - DMAEN: access: rw description: DMA request output enable lsb: 31 reset_value: '0' width: 1 - SPIFI_CMD: fields: !!omap - DATALEN: access: rw description: Data bytes in command lsb: 0 reset_value: '0' width: 14 - POLL: access: rw description: Poll at end of command lsb: 14 reset_value: '0' width: 1 - DOUT: access: rw description: Data output to serial flash lsb: 15 reset_value: '0' width: 1 - INTLEN: access: rw description: Intermediate bytes before data lsb: 16 reset_value: '0' width: 3 - FIELDFORM: access: rw description: Form of command fields lsb: 19 reset_value: '0' width: 2 - FRAMEFORM: access: rw description: Form of the opcode/address fields lsb: 21 reset_value: '0' width: 3 - OPCODE: access: rw description: Command opcode lsb: 24 reset_value: '0' width: 8 - SPIFI_ADDR: fields: !!omap - ADDRESS: access: rw description: Address field value lsb: 0 reset_value: '0' width: 32 - SPIFI_IDATA: fields: !!omap - IDATA: access: rw description: Intermediate bytes value lsb: 0 reset_value: '0' width: 32 - SPIFI_CLIMIT: fields: !!omap - CLIMIT: access: rw description: Upper limit of cacheable memory lsb: 0 reset_value: '0x08000000' width: 32 - SPIFI_DATA: fields: !!omap - DATA: access: rw description: Input or output data lsb: 0 reset_value: '0' width: 32 - SPIFI_MCMD: fields: !!omap - POLL: access: rw description: Must be zero lsb: 14 reset_value: '0' width: 1 - DOUT: access: rw description: Must be zero lsb: 15 reset_value: '0' width: 1 - INTLEN: access: rw description: Intermediate bytes before data lsb: 16 reset_value: '0' width: 3 - FIELDFORM: access: rw description: Form of command fields lsb: 19 reset_value: '0' width: 2 - FRAMEFORM: access: rw description: Form of the opcode/address fields lsb: 21 reset_value: '0' width: 3 - OPCODE: access: rw description: Command opcode lsb: 24 reset_value: '0' width: 8 - SPIFI_STAT: fields: !!omap - MCINIT: access: rw description: Memory command initialized lsb: 0 reset_value: '0' width: 1 - CMD: access: rw description: Command active lsb: 1 reset_value: '0' width: 1 - RESET: access: rw description: Abort current command/memory mode lsb: 4 reset_value: '0' width: 1 - INTRQ: access: rw description: Interrupt request status lsb: 5 reset_value: '0' width: 1 - VERSION: access: rw description: Peripheral hardware version lsb: 24 reset_value: '0x02' width: 8 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ssp.csv ================================================ SSP0_CR0,0,4,DSS,Data Size Select,0,rw SSP0_CR0,4,2,FRF,Frame Format,0,rw SSP0_CR0,6,1,CPOL,Clock Out Polarity,0,rw SSP0_CR0,7,1,CPHA,Clock Out Phase,0,rw SSP0_CR0,8,8,SCR,Serial Clock Rate,0,rw SSP1_CR0,0,4,DSS,Data Size Select,0,rw SSP1_CR0,4,2,FRF,Frame Format,0,rw SSP1_CR0,6,1,CPOL,Clock Out Polarity,0,rw SSP1_CR0,7,1,CPHA,Clock Out Phase,0,rw SSP1_CR0,8,8,SCR,Serial Clock Rate,0,rw SSP0_CR1,0,1,LBM,Loop Back Mode,0,rw SSP0_CR1,1,1,SSE,SSP Enable,0,rw SSP0_CR1,2,1,MS,Master/Slave Mode,0,rw SSP0_CR1,3,1,SOD,Slave Output Disable,0,rw SSP1_CR1,1,1,SSE,SSP Enable,0,rw SSP1_CR1,2,1,MS,Master/Slave Mode,0,rw SSP1_CR1,3,1,SOD,Slave Output Disable,0,rw SSP0_DR,0,16,DATA,"Software can write data to be transmitted to this register, and read data that has been",0,rw SSP1_DR,0,16,DATA,"Software can write data to be transmitted to this register, and read data that has been",0,rw SSP0_SR,0,1,TFE,Transmit FIFO Empty,1,r SSP0_SR,1,1,TNF,Transmit FIFO Not Full,1,r SSP0_SR,2,1,RNE,Receive FIFO Not Empty,0,r SSP0_SR,3,1,RFF,Receive FIFO Full,0,r SSP0_SR,4,1,BSY,Busy.,0,r SSP1_SR,0,1,TFE,Transmit FIFO Empty,1,r SSP1_SR,1,1,TNF,Transmit FIFO Not Full,1,r SSP1_SR,2,1,RNE,Receive FIFO Not Empty,0,r SSP1_SR,3,1,RFF,Receive FIFO Full,0,r SSP1_SR,4,1,BSY,Busy.,0,r SSP0_CPSR,0,8,CPSDVSR,SSP Clock Prescale Register,0,rw SSP1_CPSR,0,8,CPSDVSR,SSP Clock Prescale Register,0,rw SSP0_IMSC,0,1,RORIM,Software should set this bit to enable interrupt when a Receive Overrun occurs,0,rw SSP0_IMSC,1,1,RTIM,Software should set this bit to enable interrupt when a Receive Time-out condition occurs,0,rw SSP0_IMSC,2,1,RXIM,Software should set this bit to enable interrupt when the Rx FIFO is at least half full,0,rw SSP0_IMSC,3,1,TXIM,Software should set this bit to enable interrupt when the Tx FIFO is at least half empty,0,rw SSP1_IMSC,0,1,RORIM,Software should set this bit to enable interrupt when a Receive Overrun occurs,0,rw SSP1_IMSC,1,1,RTIM,Software should set this bit to enable interrupt when a Receive Time-out condition occurs,0,rw SSP1_IMSC,2,1,RXIM,Software should set this bit to enable interrupt when the Rx FIFO is at least half full,0,rw SSP1_IMSC,3,1,TXIM,Software should set this bit to enable interrupt when the Tx FIFO is at least half empty,0,rw SSP0_RIS,0,1,RORRIS,This bit is 1 if another frame was completely received while the RxFIFO was full,0,r SSP0_RIS,1,1,RTRIS,"This bit is 1 if the Rx FIFO is not empty, and has not been read for a time-out period",0,r SSP0_RIS,2,1,RXRIS,This bit is 1 if the Rx FIFO is at least half full,0,r SSP0_RIS,3,1,TXRIS,This bit is 1 if the Tx FIFO is at least half empty,1,r SSP1_RIS,0,1,RORRIS,This bit is 1 if another frame was completely received while the RxFIFO was full,0,r SSP1_RIS,1,1,RTRIS,"This bit is 1 if the Rx FIFO is not empty, and has not been read for a time-out period",0,r SSP1_RIS,2,1,RXRIS,This bit is 1 if the Rx FIFO is at least half full,0,r SSP1_RIS,3,1,TXRIS,This bit is 1 if the Tx FIFO is at least half empty,1,r SSP0_MIS,0,1,RORMIS,"This bit is 1 if another frame was completely received while the RxFIFO was full, and this interrupt is enabled",0,r SSP0_MIS,1,1,RTMIS,"This bit is 1 if the Rx FIFO is not empty, has not been read for a time-out period, and this interrupt is enabled",0,r SSP0_MIS,2,1,RXMIS,"This bit is 1 if the Rx FIFO is at least half full, and this interrupt is enabled",0,r SSP0_MIS,3,1,TXMIS,"This bit is 1 if the Tx FIFO is at least half empty, and this interrupt is enabled",0,r SSP1_MIS,0,1,RORMIS,"This bit is 1 if another frame was completely received while the RxFIFO was full, and this interrupt is enabled",0,r SSP1_MIS,1,1,RTMIS,"This bit is 1 if the Rx FIFO is not empty, has not been read for a time-out period, and this interrupt is enabled",0,r SSP1_MIS,2,1,RXMIS,"This bit is 1 if the Rx FIFO is at least half full, and this interrupt is enabled",0,r SSP1_MIS,3,1,TXMIS,"This bit is 1 if the Tx FIFO is at least half empty, and this interrupt is enabled",0,r SSP0_ICR,0,1,RORIC,Writing a 1 to this bit clears the 'frame was received when RxFIFO was full' interrupt,,w SSP0_ICR,1,1,RTIC,Writing a 1 to this bit clears the Rx FIFO was not empty and has not been read for a time-out period interrupt,,w SSP1_ICR,0,1,RORIC,Writing a 1 to this bit clears the 'frame was received when RxFIFO was full' interrupt,,w SSP1_ICR,1,1,RTIC,Writing a 1 to this bit clears the Rx FIFO was not empty and has not been read for a time-out period interrupt,,w SSP0_DMACR,0,1,RXDMAE,Receive DMA Enable,0,rw SSP0_DMACR,1,1,TXDMAE,Transmit DMA Enable,0,rw SSP1_DMACR,0,1,RXDMAE,Receive DMA Enable,0,rw SSP1_DMACR,1,1,TXDMAE,Transmit DMA Enable,0,rw ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/ssp.yaml ================================================ !!omap - SSP0_CR0: fields: !!omap - DSS: access: rw description: Data Size Select lsb: 0 reset_value: '0' width: 4 - FRF: access: rw description: Frame Format lsb: 4 reset_value: '0' width: 2 - CPOL: access: rw description: Clock Out Polarity lsb: 6 reset_value: '0' width: 1 - CPHA: access: rw description: Clock Out Phase lsb: 7 reset_value: '0' width: 1 - SCR: access: rw description: Serial Clock Rate lsb: 8 reset_value: '0' width: 8 - SSP1_CR0: fields: !!omap - DSS: access: rw description: Data Size Select lsb: 0 reset_value: '0' width: 4 - FRF: access: rw description: Frame Format lsb: 4 reset_value: '0' width: 2 - CPOL: access: rw description: Clock Out Polarity lsb: 6 reset_value: '0' width: 1 - CPHA: access: rw description: Clock Out Phase lsb: 7 reset_value: '0' width: 1 - SCR: access: rw description: Serial Clock Rate lsb: 8 reset_value: '0' width: 8 - SSP0_CR1: fields: !!omap - LBM: access: rw description: Loop Back Mode lsb: 0 reset_value: '0' width: 1 - SSE: access: rw description: SSP Enable lsb: 1 reset_value: '0' width: 1 - MS: access: rw description: Master/Slave Mode lsb: 2 reset_value: '0' width: 1 - SOD: access: rw description: Slave Output Disable lsb: 3 reset_value: '0' width: 1 - SSP1_CR1: fields: !!omap - SSE: access: rw description: SSP Enable lsb: 1 reset_value: '0' width: 1 - MS: access: rw description: Master/Slave Mode lsb: 2 reset_value: '0' width: 1 - SOD: access: rw description: Slave Output Disable lsb: 3 reset_value: '0' width: 1 - SSP0_DR: fields: !!omap - DATA: access: rw description: Software can write data to be transmitted to this register, and read data that has been lsb: 0 reset_value: '0' width: 16 - SSP1_DR: fields: !!omap - DATA: access: rw description: Software can write data to be transmitted to this register, and read data that has been lsb: 0 reset_value: '0' width: 16 - SSP0_SR: fields: !!omap - TFE: access: r description: Transmit FIFO Empty lsb: 0 reset_value: '1' width: 1 - TNF: access: r description: Transmit FIFO Not Full lsb: 1 reset_value: '1' width: 1 - RNE: access: r description: Receive FIFO Not Empty lsb: 2 reset_value: '0' width: 1 - RFF: access: r description: Receive FIFO Full lsb: 3 reset_value: '0' width: 1 - BSY: access: r description: Busy. lsb: 4 reset_value: '0' width: 1 - SSP1_SR: fields: !!omap - TFE: access: r description: Transmit FIFO Empty lsb: 0 reset_value: '1' width: 1 - TNF: access: r description: Transmit FIFO Not Full lsb: 1 reset_value: '1' width: 1 - RNE: access: r description: Receive FIFO Not Empty lsb: 2 reset_value: '0' width: 1 - RFF: access: r description: Receive FIFO Full lsb: 3 reset_value: '0' width: 1 - BSY: access: r description: Busy. lsb: 4 reset_value: '0' width: 1 - SSP0_CPSR: fields: !!omap - CPSDVSR: access: rw description: SSP Clock Prescale Register lsb: 0 reset_value: '0' width: 8 - SSP1_CPSR: fields: !!omap - CPSDVSR: access: rw description: SSP Clock Prescale Register lsb: 0 reset_value: '0' width: 8 - SSP0_IMSC: fields: !!omap - RORIM: access: rw description: Software should set this bit to enable interrupt when a Receive Overrun occurs lsb: 0 reset_value: '0' width: 1 - RTIM: access: rw description: Software should set this bit to enable interrupt when a Receive Time-out condition occurs lsb: 1 reset_value: '0' width: 1 - RXIM: access: rw description: Software should set this bit to enable interrupt when the Rx FIFO is at least half full lsb: 2 reset_value: '0' width: 1 - TXIM: access: rw description: Software should set this bit to enable interrupt when the Tx FIFO is at least half empty lsb: 3 reset_value: '0' width: 1 - SSP1_IMSC: fields: !!omap - RORIM: access: rw description: Software should set this bit to enable interrupt when a Receive Overrun occurs lsb: 0 reset_value: '0' width: 1 - RTIM: access: rw description: Software should set this bit to enable interrupt when a Receive Time-out condition occurs lsb: 1 reset_value: '0' width: 1 - RXIM: access: rw description: Software should set this bit to enable interrupt when the Rx FIFO is at least half full lsb: 2 reset_value: '0' width: 1 - TXIM: access: rw description: Software should set this bit to enable interrupt when the Tx FIFO is at least half empty lsb: 3 reset_value: '0' width: 1 - SSP0_RIS: fields: !!omap - RORRIS: access: r description: This bit is 1 if another frame was completely received while the RxFIFO was full lsb: 0 reset_value: '0' width: 1 - RTRIS: access: r description: This bit is 1 if the Rx FIFO is not empty, and has not been read for a time-out period lsb: 1 reset_value: '0' width: 1 - RXRIS: access: r description: This bit is 1 if the Rx FIFO is at least half full lsb: 2 reset_value: '0' width: 1 - TXRIS: access: r description: This bit is 1 if the Tx FIFO is at least half empty lsb: 3 reset_value: '1' width: 1 - SSP1_RIS: fields: !!omap - RORRIS: access: r description: This bit is 1 if another frame was completely received while the RxFIFO was full lsb: 0 reset_value: '0' width: 1 - RTRIS: access: r description: This bit is 1 if the Rx FIFO is not empty, and has not been read for a time-out period lsb: 1 reset_value: '0' width: 1 - RXRIS: access: r description: This bit is 1 if the Rx FIFO is at least half full lsb: 2 reset_value: '0' width: 1 - TXRIS: access: r description: This bit is 1 if the Tx FIFO is at least half empty lsb: 3 reset_value: '1' width: 1 - SSP0_MIS: fields: !!omap - RORMIS: access: r description: This bit is 1 if another frame was completely received while the RxFIFO was full, and this interrupt is enabled lsb: 0 reset_value: '0' width: 1 - RTMIS: access: r description: This bit is 1 if the Rx FIFO is not empty, has not been read for a time-out period, and this interrupt is enabled lsb: 1 reset_value: '0' width: 1 - RXMIS: access: r description: This bit is 1 if the Rx FIFO is at least half full, and this interrupt is enabled lsb: 2 reset_value: '0' width: 1 - TXMIS: access: r description: This bit is 1 if the Tx FIFO is at least half empty, and this interrupt is enabled lsb: 3 reset_value: '0' width: 1 - SSP1_MIS: fields: !!omap - RORMIS: access: r description: This bit is 1 if another frame was completely received while the RxFIFO was full, and this interrupt is enabled lsb: 0 reset_value: '0' width: 1 - RTMIS: access: r description: This bit is 1 if the Rx FIFO is not empty, has not been read for a time-out period, and this interrupt is enabled lsb: 1 reset_value: '0' width: 1 - RXMIS: access: r description: This bit is 1 if the Rx FIFO is at least half full, and this interrupt is enabled lsb: 2 reset_value: '0' width: 1 - TXMIS: access: r description: This bit is 1 if the Tx FIFO is at least half empty, and this interrupt is enabled lsb: 3 reset_value: '0' width: 1 - SSP0_ICR: fields: !!omap - RORIC: access: w description: Writing a 1 to this bit clears the 'frame was received when RxFIFO was full' interrupt lsb: 0 reset_value: '' width: 1 - RTIC: access: w description: Writing a 1 to this bit clears the Rx FIFO was not empty and has not been read for a time-out period interrupt lsb: 1 reset_value: '' width: 1 - SSP1_ICR: fields: !!omap - RORIC: access: w description: Writing a 1 to this bit clears the 'frame was received when RxFIFO was full' interrupt lsb: 0 reset_value: '' width: 1 - RTIC: access: w description: Writing a 1 to this bit clears the Rx FIFO was not empty and has not been read for a time-out period interrupt lsb: 1 reset_value: '' width: 1 - SSP0_DMACR: fields: !!omap - RXDMAE: access: rw description: Receive DMA Enable lsb: 0 reset_value: '0' width: 1 - TXDMAE: access: rw description: Transmit DMA Enable lsb: 1 reset_value: '0' width: 1 - SSP1_DMACR: fields: !!omap - RXDMAE: access: rw description: Receive DMA Enable lsb: 0 reset_value: '0' width: 1 - TXDMAE: access: rw description: Transmit DMA Enable lsb: 1 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/usb.csv ================================================ USB0_CAPLENGTH,0,8,CAPLENGTH,Indicates offset to add to the register base address at the beginning of the Operational Register,0x40,r USB0_CAPLENGTH,8,16,HCIVERSION,BCD encoding of the EHCI revision number supported by this host controller,0x100,r USB0_HCSPARAMS,0,4,N_PORTS,Number of downstream ports,0x1,r USB0_HCSPARAMS,4,1,PPC,Port Power Control,0x1,r USB0_HCSPARAMS,8,4,N_PCC,Number of Ports per Companion Controller,0x0,r USB0_HCSPARAMS,12,4,N_CC,Number of Companion Controller,0x0,r USB0_HCSPARAMS,16,1,PI,Port indicators,0x1,r USB0_HCSPARAMS,20,4,N_PTT,Number of Ports per Transaction Translator,0x0,r USB0_HCSPARAMS,24,4,N_TT,Number of Transaction Translators,0x0,r USB0_HCCPARAMS,0,1,ADC,64-bit Addressing Capability,0,r USB0_HCCPARAMS,1,1,PFL,Programmable Frame List Flag,1,r USB0_HCCPARAMS,2,1,ASP,Asynchronous Schedule Park Capability,1,r USB0_HCCPARAMS,4,4,IST,Isochronous Scheduling Threshold,0,r USB0_HCCPARAMS,8,4,EECP,EHCI Extended Capabilities Pointer,0,r USB0_DCCPARAMS,0,5,DEN,Device Endpoint Number,0x4,r USB0_DCCPARAMS,7,1,DC,Device Capable,0x1,r USB0_DCCPARAMS,8,1,HC,Host Capable,0x1,r USB0_USBCMD_D,0,1,RS,Run/Stop,0,rw USB0_USBCMD_D,1,1,RST,Controller reset,0,rw USB0_USBCMD_D,13,1,SUTW,Setup trip wire,0,rw USB0_USBCMD_D,14,1,ATDTW,Add dTD trip wire,0,rw USB0_USBCMD_D,16,8,ITC,Interrupt threshold control,0x8,rw USB0_USBCMD_H,0,1,RS,Run/Stop,0,rw USB0_USBCMD_H,1,1,RST,Controller reset,0,rw USB0_USBCMD_H,2,1,FS0,Bit 0 of the Frame List Size bits,0, USB0_USBCMD_H,3,1,FS1,Bit 1 of the Frame List Size bits,0, USB0_USBCMD_H,4,1,PSE,This bit controls whether the host controller skips processing the periodic schedule,0,rw USB0_USBCMD_H,5,1,ASE,This bit controls whether the host controller skips processing the asynchronous schedule,0,rw USB0_USBCMD_H,6,1,IAA,This bit is used as a doorbell by software to tell the host controller to issue an interrupt the next time it advances asynchronous schedule,0,rw USB0_USBCMD_H,8,2,ASP1_0,Asynchronous schedule park mode,0x3,rw USB0_USBCMD_H,11,1,ASPE,Asynchronous Schedule Park Mode Enable,1,rw USB0_USBCMD_H,15,1,FS2,Bit 2 of the Frame List Size bits,0, USB0_USBCMD_H,16,8,ITC,Interrupt threshold control,0x8,rw USB0_USBSTS_D,0,1,UI,USB interrupt,0,rwc USB0_USBSTS_D,1,1,UEI,USB error interrupt,0,rwc USB0_USBSTS_D,2,1,PCI,Port change detect,0,rwc USB0_USBSTS_D,6,1,URI,USB reset received,0,rwc USB0_USBSTS_D,7,1,SRI,SOF received,0,rwc USB0_USBSTS_D,8,1,SLI,DCSuspend,0,rwc USB0_USBSTS_D,16,1,NAKI,NAK interrupt bit,0,r USB0_USBSTS_H,0,1,UI,USB interrupt,0,rwc USB0_USBSTS_H,1,1,UEI,USB error interrupt,0,rwc USB0_USBSTS_H,2,1,PCI,Port change detect,0,rwc USB0_USBSTS_H,3,1,FRI,Frame list roll-over,0,rwc USB0_USBSTS_H,5,1,AAI,Interrupt on async advance,0,rwc USB0_USBSTS_H,7,1,SRI,SOF received,0,rwc USB0_USBSTS_H,12,1,HCH,HCHalted,1,r USB0_USBSTS_H,13,1,RCL,Reclamation,0,r USB0_USBSTS_H,14,1,PS,Periodic schedule status,0,r USB0_USBSTS_H,15,1,AS,Asynchronous schedule status,0, USB0_USBSTS_H,18,1,UAI,USB host asynchronous interrupt (USBHSTASYNCINT),0,rwc USB0_USBSTS_H,19,1,UPI,USB host periodic interrupt (USBHSTPERINT),0,rwc USB0_USBINTR_D,0,1,UE,USB interrupt enable,0,rw USB0_USBINTR_D,1,1,UEE,USB error interrupt enable,0,rw USB0_USBINTR_D,2,1,PCE,Port change detect enable,0,rw USB0_USBINTR_D,6,1,URE,USB reset enable,0,rw USB0_USBINTR_D,7,1,SRE,SOF received enable,0,rw USB0_USBINTR_D,8,1,SLE,Sleep enable,0,rw USB0_USBINTR_D,16,1,NAKE,NAK interrupt enable,0,rw USB0_USBINTR_H,0,1,UE,USB interrupt enable,0,rw USB0_USBINTR_H,1,1,UEE,USB error interrupt enable,0,rw USB0_USBINTR_H,2,1,PCE,Port change detect enable,0,rw USB0_USBINTR_H,3,1,FRE,Frame list rollover enable,0,rw USB0_USBINTR_H,5,1,AAE,Interrupt on asynchronous advance enable,0,rw USB0_USBINTR_H,7,1,SRE,SOF received enable,0, USB0_USBINTR_H,18,1,UAIE,USB host asynchronous interrupt enable,0,rw USB0_USBINTR_H,19,1,UPIA,USB host periodic interrupt enable,0,rw USB0_FRINDEX_D,0,3,FRINDEX2_0,Current micro frame number,,r USB0_FRINDEX_D,3,11,FRINDEX13_3,Current frame number of the last frame transmitted,,r USB0_FRINDEX_H,0,3,FRINDEX2_0,Current micro frame number,,rw USB0_FRINDEX_H,3,10,FRINDEX12_3,Frame list current index,,rw USB0_DEVICEADDR,24,1,USBADRA,Device address advance,0, USB0_DEVICEADDR,25,7,USBADR,USB device address,0,rw USB0_PERIODICLISTBASE,12,20,PERBASE31_12,Base Address (Low),,rw USB0_ENDPOINTLISTADDR,11,21,EPBASE31_11,Endpoint list pointer (low),,rw USB0_ASYNCLISTADDR,5,27,ASYBASE31_5,Link pointer (Low) LPL,,rw USB0_TTCTRL,24,7,TTHA,Hub address when FS or LS device are connected directly,,rw USB0_BURSTSIZE,0,8,RXPBURST,Programmable RX burst length,0x10,rw USB0_BURSTSIZE,8,8,TXPBURST,Programmable TX burst length,0x10,rw USB0_TXFILLTUNING,0,8,TXSCHOH,FIFO burst threshold,0x2,rw USB0_TXFILLTUNING,8,5,TXSCHEATLTH,Scheduler health counter,0x0,rw USB0_TXFILLTUNING,16,6,TXFIFOTHRES,Scheduler overhead,0x0,rw USB0_BINTERVAL,0,4,BINT,bInterval value,0x00,rw USB0_ENDPTNAK,0,6,EPRN,Rx endpoint NAK,0x00,rwc USB0_ENDPTNAK,16,6,EPTN,Tx endpoint NAK,0x00,rwc USB0_ENDPTNAKEN,0,6,EPRNE,Rx endpoint NAK enable,0x00,rw USB0_ENDPTNAKEN,16,6,EPTNE,Tx endpoint NAK,0x00,rw USB0_PORTSC1_D,0,1,CCS,Current connect status,0,r USB0_PORTSC1_D,2,1,PE,Port enable,1,r USB0_PORTSC1_D,3,1,PEC,Port enable/disable change,0,r USB0_PORTSC1_D,6,1,FPR,Force port resume,0,rw USB0_PORTSC1_D,7,1,SUSP,Suspend,0,r USB0_PORTSC1_D,8,1,PR,Port reset,0,r USB0_PORTSC1_D,9,1,HSP,High-speed status,0,r USB0_PORTSC1_D,14,2,PIC1_0,Port indicator control,0,rw USB0_PORTSC1_D,16,4,PTC3_0,Port test control,0,rw USB0_PORTSC1_D,23,1,PHCD,PHY low power suspend - clock disable (PLPSCD),0,rw USB0_PORTSC1_D,24,1,PFSC,Port force full speed connect,0,rw USB0_PORTSC1_D,26,2,PSPD,Port speed,0,r USB0_PORTSC1_H,0,1,CCS,Current connect status,0,rwc USB0_PORTSC1_H,1,1,CSC,Connect status change,0,rwc USB0_PORTSC1_H,2,1,PE,Port enable,0,rw USB0_PORTSC1_H,3,1,PEC,Port disable/enable change,0,rwc USB0_PORTSC1_H,4,1,OCA,Over-current active,0,r USB0_PORTSC1_H,5,1,OCC,Over-current change,0,rwc USB0_PORTSC1_H,6,1,FPR,Force port resume,0,rw USB0_PORTSC1_H,7,1,SUSP,Suspend,0,rw USB0_PORTSC1_H,8,1,PR,Port reset,0,rw USB0_PORTSC1_H,9,1,HSP,High-speed status,0,r USB0_PORTSC1_H,10,2,LS,Line status,0x3,r USB0_PORTSC1_H,12,1,PP,Port power control,0,rw USB0_PORTSC1_H,14,2,PIC1_0,Port indicator control,0,rw USB0_PORTSC1_H,16,4,PTC3_0,Port test control,0,rw USB0_PORTSC1_H,20,1,WKCN,Wake on connect enable (WKCNNT_E),0,rw USB0_PORTSC1_H,21,1,WKDC,Wake on disconnect enable (WKDSCNNT_E),0,rw USB0_PORTSC1_H,22,1,WKOC,Wake on over-current enable (WKOC_E),0,rw USB0_PORTSC1_H,23,1,PHCD,PHY low power suspend - clock disable (PLPSCD),0,rw USB0_PORTSC1_H,24,1,PFSC,Port force full speed connect,0,rw USB0_PORTSC1_H,26,2,PSPD,Port speed,0,r USB0_OTGSC,0,1,VD,VBUS_Discharge,0,rw USB0_OTGSC,1,1,VC,VBUS_Charge,0,rw USB0_OTGSC,2,1,HAAR,Hardware assist auto_reset,0,rw USB0_OTGSC,3,1,OT,OTG termination,0,rw USB0_OTGSC,4,1,DP,Data pulsing,0,rw USB0_OTGSC,5,1,IDPU,ID pull-up,1,rw USB0_OTGSC,6,1,HADP,Hardware assist data pulse,0,rw USB0_OTGSC,7,1,HABA,Hardware assist B-disconnect to A-connect,0,rw USB0_OTGSC,8,1,ID,USB ID,0,r USB0_OTGSC,9,1,AVV,A-VBUS valid,0,r USB0_OTGSC,10,1,ASV,A-session valid,0,r USB0_OTGSC,11,1,BSV,B-session valid,0,r USB0_OTGSC,12,1,BSE,B-session end,0,r USB0_OTGSC,13,1,MS1T,1 millisecond timer toggle,0,r USB0_OTGSC,14,1,DPS,Data bus pulsing status,0,r USB0_OTGSC,16,1,IDIS,USB ID interrupt status,0,rwc USB0_OTGSC,17,1,AVVIS,A-VBUS valid interrupt status,0,rwc USB0_OTGSC,18,1,ASVIS,A-Session valid interrupt status,0,rwc USB0_OTGSC,19,1,BSVIS,B-Session valid interrupt status,0,rwc USB0_OTGSC,20,1,BSEIS,B-Session end interrupt status,0,rwc USB0_OTGSC,21,1,MS1S,1 millisecond timer interrupt status,0,rwc USB0_OTGSC,22,1,DPIS,Data pulse interrupt status,0,rwc USB0_OTGSC,24,1,IDIE,USB ID interrupt enable,0,rw USB0_OTGSC,25,1,AVVIE,A-VBUS valid interrupt enable,0,rw USB0_OTGSC,26,1,ASVIE,A-session valid interrupt enable,0,rw USB0_OTGSC,27,1,BSVIE,B-session valid interrupt enable,0,rw USB0_OTGSC,28,1,BSEIE,B-session end interrupt enable,0,rw USB0_OTGSC,29,1,MS1E,1 millisecond timer interrupt enable,0,rw USB0_OTGSC,30,1,DPIE,Data pulse interrupt enable,0,rw USB0_USBMODE_D,0,2,CM1_0,Controller mode,0,rwo USB0_USBMODE_D,2,1,ES,Endian select,0,rw USB0_USBMODE_D,3,1,SLOM,Setup Lockout mode,0,rw USB0_USBMODE_D,4,1,SDIS,Setup Lockout mode,0,rw USB0_USBMODE_H,0,2,CM,Controller mode,0,rwo USB0_USBMODE_H,2,1,ES,Endian select,0,rw USB0_USBMODE_H,4,1,SDIS,Stream disable mode,0,rw USB0_USBMODE_H,5,1,VBPS,VBUS power select,0,rwo USB0_ENDPTSETUPSTAT,0,6,ENDPTSETUPSTAT,Setup endpoint status for logical endpoints 0 to 5,0,rwc USB0_ENDPTPRIME,0,6,PERB,Prime endpoint receive buffer for physical OUT endpoints 5 to 0,0,rws USB0_ENDPTPRIME,16,6,PETB,Prime endpoint transmit buffer for physical IN endpoints 5 to 0,0,rws USB0_ENDPTFLUSH,0,6,FERB,Flush endpoint receive buffer for physical OUT endpoints 5 to 0,0,rwc USB0_ENDPTFLUSH,16,6,FETB,Flush endpoint transmit buffer for physical IN endpoints 5 to 0,0,rwc USB0_ENDPTSTAT,0,6,ERBR,Endpoint receive buffer ready for physical OUT endpoints 5 to 0,0,r USB0_ENDPTSTAT,16,6,ETBR,Endpoint transmit buffer ready for physical IN endpoints 3 to 0,0,r USB0_ENDPTCOMPLETE,0,6,ERCE,Endpoint receive complete event for physical OUT endpoints 5 to 0,0,rwc USB0_ENDPTCOMPLETE,16,6,ETCE,Endpoint transmit complete event for physical IN endpoints 5 to 0,0,rwc USB0_ENDPTCTRL0,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL0,2,2,RXT1_0,Endpoint type,0,rw USB0_ENDPTCTRL0,7,1,RXE,Rx endpoint enable,1,r USB0_ENDPTCTRL0,16,1,TXS,Tx endpoint stall,,rw USB0_ENDPTCTRL0,18,2,TXT1_0,Endpoint type,0,r USB0_ENDPTCTRL0,23,1,TXE,Tx endpoint enable,1,r USB0_ENDPTCTRL1,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL1,2,2,RXT,Endpoint type,0,rw USB0_ENDPTCTRL1,5,1,RXI,Rx data toggle inhibit,0,rw USB0_ENDPTCTRL1,6,1,RXR,Rx data toggle reset,0,ws USB0_ENDPTCTRL1,7,1,RXE,Rx endpoint enable,0,rw USB0_ENDPTCTRL1,16,1,TXS,Tx endpoint stall,0,rw USB0_ENDPTCTRL1,18,2,TXT1_0,Tx Endpoint type,0,r USB0_ENDPTCTRL1,21,1,TXI,Tx data toggle inhibit,0,rw USB0_ENDPTCTRL1,22,1,TXR,Tx data toggle reset,1,ws USB0_ENDPTCTRL1,23,1,TXE,Tx endpoint enable,0,r USB0_ENDPTCTRL2,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL2,2,2,RXT,Endpoint type,0,rw USB0_ENDPTCTRL2,5,1,RXI,Rx data toggle inhibit,0,rw USB0_ENDPTCTRL2,6,1,RXR,Rx data toggle reset,0,ws USB0_ENDPTCTRL2,7,1,RXE,Rx endpoint enable,0,rw USB0_ENDPTCTRL2,16,1,TXS,Tx endpoint stall,0,rw USB0_ENDPTCTRL2,18,2,TXT1_0,Tx Endpoint type,0,r USB0_ENDPTCTRL2,21,1,TXI,Tx data toggle inhibit,0,rw USB0_ENDPTCTRL2,22,1,TXR,Tx data toggle reset,1,ws USB0_ENDPTCTRL2,23,1,TXE,Tx endpoint enable,0,r USB0_ENDPTCTRL3,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL3,2,2,RXT,Endpoint type,0,rw USB0_ENDPTCTRL3,5,1,RXI,Rx data toggle inhibit,0,rw USB0_ENDPTCTRL3,6,1,RXR,Rx data toggle reset,0,ws USB0_ENDPTCTRL3,7,1,RXE,Rx endpoint enable,0,rw USB0_ENDPTCTRL3,16,1,TXS,Tx endpoint stall,0,rw USB0_ENDPTCTRL3,18,2,TXT1_0,Tx Endpoint type,0,r USB0_ENDPTCTRL3,21,1,TXI,Tx data toggle inhibit,0,rw USB0_ENDPTCTRL3,22,1,TXR,Tx data toggle reset,1,ws USB0_ENDPTCTRL3,23,1,TXE,Tx endpoint enable,0,r USB0_ENDPTCTRL4,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL4,2,2,RXT,Endpoint type,0,rw USB0_ENDPTCTRL4,5,1,RXI,Rx data toggle inhibit,0,rw USB0_ENDPTCTRL4,6,1,RXR,Rx data toggle reset,0,ws USB0_ENDPTCTRL4,7,1,RXE,Rx endpoint enable,0,rw USB0_ENDPTCTRL4,16,1,TXS,Tx endpoint stall,0,rw USB0_ENDPTCTRL4,18,2,TXT1_0,Tx Endpoint type,0,r USB0_ENDPTCTRL4,21,1,TXI,Tx data toggle inhibit,0,rw USB0_ENDPTCTRL4,22,1,TXR,Tx data toggle reset,1,ws USB0_ENDPTCTRL4,23,1,TXE,Tx endpoint enable,0,r USB0_ENDPTCTRL5,0,1,RXS,Rx endpoint stall,0,rw USB0_ENDPTCTRL5,2,2,RXT,Endpoint type,0,rw USB0_ENDPTCTRL5,5,1,RXI,Rx data toggle inhibit,0,rw USB0_ENDPTCTRL5,6,1,RXR,Rx data toggle reset,0,ws USB0_ENDPTCTRL5,7,1,RXE,Rx endpoint enable,0,rw USB0_ENDPTCTRL5,16,1,TXS,Tx endpoint stall,0,rw USB0_ENDPTCTRL5,18,2,TXT1_0,Tx Endpoint type,0,r USB0_ENDPTCTRL5,21,1,TXI,Tx data toggle inhibit,0,rw USB0_ENDPTCTRL5,22,1,TXR,Tx data toggle reset,1,ws USB0_ENDPTCTRL5,23,1,TXE,Tx endpoint enable,0,r ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/usb.yaml ================================================ !!omap - USB0_CAPLENGTH: fields: !!omap - CAPLENGTH: access: r description: Indicates offset to add to the register base address at the beginning of the Operational Register lsb: 0 reset_value: '0x40' width: 8 - HCIVERSION: access: r description: BCD encoding of the EHCI revision number supported by this host controller lsb: 8 reset_value: '0x100' width: 16 - USB0_HCSPARAMS: fields: !!omap - N_PORTS: access: r description: Number of downstream ports lsb: 0 reset_value: '0x1' width: 4 - PPC: access: r description: Port Power Control lsb: 4 reset_value: '0x1' width: 1 - N_PCC: access: r description: Number of Ports per Companion Controller lsb: 8 reset_value: '0x0' width: 4 - N_CC: access: r description: Number of Companion Controller lsb: 12 reset_value: '0x0' width: 4 - PI: access: r description: Port indicators lsb: 16 reset_value: '0x1' width: 1 - N_PTT: access: r description: Number of Ports per Transaction Translator lsb: 20 reset_value: '0x0' width: 4 - N_TT: access: r description: Number of Transaction Translators lsb: 24 reset_value: '0x0' width: 4 - USB0_HCCPARAMS: fields: !!omap - ADC: access: r description: 64-bit Addressing Capability lsb: 0 reset_value: '0' width: 1 - PFL: access: r description: Programmable Frame List Flag lsb: 1 reset_value: '1' width: 1 - ASP: access: r description: Asynchronous Schedule Park Capability lsb: 2 reset_value: '1' width: 1 - IST: access: r description: Isochronous Scheduling Threshold lsb: 4 reset_value: '0' width: 4 - EECP: access: r description: EHCI Extended Capabilities Pointer lsb: 8 reset_value: '0' width: 4 - USB0_DCCPARAMS: fields: !!omap - DEN: access: r description: Device Endpoint Number lsb: 0 reset_value: '0x4' width: 5 - DC: access: r description: Device Capable lsb: 7 reset_value: '0x1' width: 1 - HC: access: r description: Host Capable lsb: 8 reset_value: '0x1' width: 1 - USB0_USBCMD_D: fields: !!omap - RS: access: rw description: Run/Stop lsb: 0 reset_value: '0' width: 1 - RST: access: rw description: Controller reset lsb: 1 reset_value: '0' width: 1 - SUTW: access: rw description: Setup trip wire lsb: 13 reset_value: '0' width: 1 - ATDTW: access: rw description: Add dTD trip wire lsb: 14 reset_value: '0' width: 1 - ITC: access: rw description: Interrupt threshold control lsb: 16 reset_value: '0x8' width: 8 - USB0_USBCMD_H: fields: !!omap - RS: access: rw description: Run/Stop lsb: 0 reset_value: '0' width: 1 - RST: access: rw description: Controller reset lsb: 1 reset_value: '0' width: 1 - FS0: access: '' description: Bit 0 of the Frame List Size bits lsb: 2 reset_value: '0' width: 1 - FS1: access: '' description: Bit 1 of the Frame List Size bits lsb: 3 reset_value: '0' width: 1 - PSE: access: rw description: This bit controls whether the host controller skips processing the periodic schedule lsb: 4 reset_value: '0' width: 1 - ASE: access: rw description: This bit controls whether the host controller skips processing the asynchronous schedule lsb: 5 reset_value: '0' width: 1 - IAA: access: rw description: This bit is used as a doorbell by software to tell the host controller to issue an interrupt the next time it advances asynchronous schedule lsb: 6 reset_value: '0' width: 1 - ASP1_0: access: rw description: Asynchronous schedule park mode lsb: 8 reset_value: '0x3' width: 2 - ASPE: access: rw description: Asynchronous Schedule Park Mode Enable lsb: 11 reset_value: '1' width: 1 - FS2: access: '' description: Bit 2 of the Frame List Size bits lsb: 15 reset_value: '0' width: 1 - ITC: access: rw description: Interrupt threshold control lsb: 16 reset_value: '0x8' width: 8 - USB0_USBSTS_D: fields: !!omap - UI: access: rwc description: USB interrupt lsb: 0 reset_value: '0' width: 1 - UEI: access: rwc description: USB error interrupt lsb: 1 reset_value: '0' width: 1 - PCI: access: rwc description: Port change detect lsb: 2 reset_value: '0' width: 1 - URI: access: rwc description: USB reset received lsb: 6 reset_value: '0' width: 1 - SRI: access: rwc description: SOF received lsb: 7 reset_value: '0' width: 1 - SLI: access: rwc description: DCSuspend lsb: 8 reset_value: '0' width: 1 - NAKI: access: r description: NAK interrupt bit lsb: 16 reset_value: '0' width: 1 - USB0_USBSTS_H: fields: !!omap - UI: access: rwc description: USB interrupt lsb: 0 reset_value: '0' width: 1 - UEI: access: rwc description: USB error interrupt lsb: 1 reset_value: '0' width: 1 - PCI: access: rwc description: Port change detect lsb: 2 reset_value: '0' width: 1 - FRI: access: rwc description: Frame list roll-over lsb: 3 reset_value: '0' width: 1 - AAI: access: rwc description: Interrupt on async advance lsb: 5 reset_value: '0' width: 1 - SRI: access: rwc description: SOF received lsb: 7 reset_value: '0' width: 1 - HCH: access: r description: HCHalted lsb: 12 reset_value: '1' width: 1 - RCL: access: r description: Reclamation lsb: 13 reset_value: '0' width: 1 - PS: access: r description: Periodic schedule status lsb: 14 reset_value: '0' width: 1 - AS: access: '' description: Asynchronous schedule status lsb: 15 reset_value: '0' width: 1 - UAI: access: rwc description: USB host asynchronous interrupt (USBHSTASYNCINT) lsb: 18 reset_value: '0' width: 1 - UPI: access: rwc description: USB host periodic interrupt (USBHSTPERINT) lsb: 19 reset_value: '0' width: 1 - USB0_USBINTR_D: fields: !!omap - UE: access: rw description: USB interrupt enable lsb: 0 reset_value: '0' width: 1 - UEE: access: rw description: USB error interrupt enable lsb: 1 reset_value: '0' width: 1 - PCE: access: rw description: Port change detect enable lsb: 2 reset_value: '0' width: 1 - URE: access: rw description: USB reset enable lsb: 6 reset_value: '0' width: 1 - SRE: access: rw description: SOF received enable lsb: 7 reset_value: '0' width: 1 - SLE: access: rw description: Sleep enable lsb: 8 reset_value: '0' width: 1 - NAKE: access: rw description: NAK interrupt enable lsb: 16 reset_value: '0' width: 1 - USB0_USBINTR_H: fields: !!omap - UE: access: rw description: USB interrupt enable lsb: 0 reset_value: '0' width: 1 - UEE: access: rw description: USB error interrupt enable lsb: 1 reset_value: '0' width: 1 - PCE: access: rw description: Port change detect enable lsb: 2 reset_value: '0' width: 1 - FRE: access: rw description: Frame list rollover enable lsb: 3 reset_value: '0' width: 1 - AAE: access: rw description: Interrupt on asynchronous advance enable lsb: 5 reset_value: '0' width: 1 - SRE: access: '' description: SOF received enable lsb: 7 reset_value: '0' width: 1 - UAIE: access: rw description: USB host asynchronous interrupt enable lsb: 18 reset_value: '0' width: 1 - UPIA: access: rw description: USB host periodic interrupt enable lsb: 19 reset_value: '0' width: 1 - USB0_FRINDEX_D: fields: !!omap - FRINDEX2_0: access: r description: Current micro frame number lsb: 0 reset_value: '' width: 3 - FRINDEX13_3: access: r description: Current frame number of the last frame transmitted lsb: 3 reset_value: '' width: 11 - USB0_FRINDEX_H: fields: !!omap - FRINDEX2_0: access: rw description: Current micro frame number lsb: 0 reset_value: '' width: 3 - FRINDEX12_3: access: rw description: Frame list current index lsb: 3 reset_value: '' width: 10 - USB0_DEVICEADDR: fields: !!omap - USBADRA: access: '' description: Device address advance lsb: 24 reset_value: '0' width: 1 - USBADR: access: rw description: USB device address lsb: 25 reset_value: '0' width: 7 - USB0_PERIODICLISTBASE: fields: !!omap - PERBASE31_12: access: rw description: Base Address (Low) lsb: 12 reset_value: '' width: 20 - USB0_ENDPOINTLISTADDR: fields: !!omap - EPBASE31_11: access: rw description: Endpoint list pointer (low) lsb: 11 reset_value: '' width: 21 - USB0_ASYNCLISTADDR: fields: !!omap - ASYBASE31_5: access: rw description: Link pointer (Low) LPL lsb: 5 reset_value: '' width: 27 - USB0_TTCTRL: fields: !!omap - TTHA: access: rw description: Hub address when FS or LS device are connected directly lsb: 24 reset_value: '' width: 7 - USB0_BURSTSIZE: fields: !!omap - RXPBURST: access: rw description: Programmable RX burst length lsb: 0 reset_value: '0x10' width: 8 - TXPBURST: access: rw description: Programmable TX burst length lsb: 8 reset_value: '0x10' width: 8 - USB0_TXFILLTUNING: fields: !!omap - TXSCHOH: access: rw description: FIFO burst threshold lsb: 0 reset_value: '0x2' width: 8 - TXSCHEATLTH: access: rw description: Scheduler health counter lsb: 8 reset_value: '0x0' width: 5 - TXFIFOTHRES: access: rw description: Scheduler overhead lsb: 16 reset_value: '0x0' width: 6 - USB0_BINTERVAL: fields: !!omap - BINT: access: rw description: bInterval value lsb: 0 reset_value: '0x00' width: 4 - USB0_ENDPTNAK: fields: !!omap - EPRN: access: rwc description: Rx endpoint NAK lsb: 0 reset_value: '0x00' width: 6 - EPTN: access: rwc description: Tx endpoint NAK lsb: 16 reset_value: '0x00' width: 6 - USB0_ENDPTNAKEN: fields: !!omap - EPRNE: access: rw description: Rx endpoint NAK enable lsb: 0 reset_value: '0x00' width: 6 - EPTNE: access: rw description: Tx endpoint NAK lsb: 16 reset_value: '0x00' width: 6 - USB0_PORTSC1_D: fields: !!omap - CCS: access: r description: Current connect status lsb: 0 reset_value: '0' width: 1 - PE: access: r description: Port enable lsb: 2 reset_value: '1' width: 1 - PEC: access: r description: Port enable/disable change lsb: 3 reset_value: '0' width: 1 - FPR: access: rw description: Force port resume lsb: 6 reset_value: '0' width: 1 - SUSP: access: r description: Suspend lsb: 7 reset_value: '0' width: 1 - PR: access: r description: Port reset lsb: 8 reset_value: '0' width: 1 - HSP: access: r description: High-speed status lsb: 9 reset_value: '0' width: 1 - PIC1_0: access: rw description: Port indicator control lsb: 14 reset_value: '0' width: 2 - PTC3_0: access: rw description: Port test control lsb: 16 reset_value: '0' width: 4 - PHCD: access: rw description: PHY low power suspend - clock disable (PLPSCD) lsb: 23 reset_value: '0' width: 1 - PFSC: access: rw description: Port force full speed connect lsb: 24 reset_value: '0' width: 1 - PSPD: access: r description: Port speed lsb: 26 reset_value: '0' width: 2 - USB0_PORTSC1_H: fields: !!omap - CCS: access: rwc description: Current connect status lsb: 0 reset_value: '0' width: 1 - CSC: access: rwc description: Connect status change lsb: 1 reset_value: '0' width: 1 - PE: access: rw description: Port enable lsb: 2 reset_value: '0' width: 1 - PEC: access: rwc description: Port disable/enable change lsb: 3 reset_value: '0' width: 1 - OCA: access: r description: Over-current active lsb: 4 reset_value: '0' width: 1 - OCC: access: rwc description: Over-current change lsb: 5 reset_value: '0' width: 1 - FPR: access: rw description: Force port resume lsb: 6 reset_value: '0' width: 1 - SUSP: access: rw description: Suspend lsb: 7 reset_value: '0' width: 1 - PR: access: rw description: Port reset lsb: 8 reset_value: '0' width: 1 - HSP: access: r description: High-speed status lsb: 9 reset_value: '0' width: 1 - LS: access: r description: Line status lsb: 10 reset_value: '0x3' width: 2 - PP: access: rw description: Port power control lsb: 12 reset_value: '0' width: 1 - PIC1_0: access: rw description: Port indicator control lsb: 14 reset_value: '0' width: 2 - PTC3_0: access: rw description: Port test control lsb: 16 reset_value: '0' width: 4 - WKCN: access: rw description: Wake on connect enable (WKCNNT_E) lsb: 20 reset_value: '0' width: 1 - WKDC: access: rw description: Wake on disconnect enable (WKDSCNNT_E) lsb: 21 reset_value: '0' width: 1 - WKOC: access: rw description: Wake on over-current enable (WKOC_E) lsb: 22 reset_value: '0' width: 1 - PHCD: access: rw description: PHY low power suspend - clock disable (PLPSCD) lsb: 23 reset_value: '0' width: 1 - PFSC: access: rw description: Port force full speed connect lsb: 24 reset_value: '0' width: 1 - PSPD: access: r description: Port speed lsb: 26 reset_value: '0' width: 2 - USB0_OTGSC: fields: !!omap - VD: access: rw description: VBUS_Discharge lsb: 0 reset_value: '0' width: 1 - VC: access: rw description: VBUS_Charge lsb: 1 reset_value: '0' width: 1 - HAAR: access: rw description: Hardware assist auto_reset lsb: 2 reset_value: '0' width: 1 - OT: access: rw description: OTG termination lsb: 3 reset_value: '0' width: 1 - DP: access: rw description: Data pulsing lsb: 4 reset_value: '0' width: 1 - IDPU: access: rw description: ID pull-up lsb: 5 reset_value: '1' width: 1 - HADP: access: rw description: Hardware assist data pulse lsb: 6 reset_value: '0' width: 1 - HABA: access: rw description: Hardware assist B-disconnect to A-connect lsb: 7 reset_value: '0' width: 1 - ID: access: r description: USB ID lsb: 8 reset_value: '0' width: 1 - AVV: access: r description: A-VBUS valid lsb: 9 reset_value: '0' width: 1 - ASV: access: r description: A-session valid lsb: 10 reset_value: '0' width: 1 - BSV: access: r description: B-session valid lsb: 11 reset_value: '0' width: 1 - BSE: access: r description: B-session end lsb: 12 reset_value: '0' width: 1 - MS1T: access: r description: 1 millisecond timer toggle lsb: 13 reset_value: '0' width: 1 - DPS: access: r description: Data bus pulsing status lsb: 14 reset_value: '0' width: 1 - IDIS: access: rwc description: USB ID interrupt status lsb: 16 reset_value: '0' width: 1 - AVVIS: access: rwc description: A-VBUS valid interrupt status lsb: 17 reset_value: '0' width: 1 - ASVIS: access: rwc description: A-Session valid interrupt status lsb: 18 reset_value: '0' width: 1 - BSVIS: access: rwc description: B-Session valid interrupt status lsb: 19 reset_value: '0' width: 1 - BSEIS: access: rwc description: B-Session end interrupt status lsb: 20 reset_value: '0' width: 1 - MS1S: access: rwc description: 1 millisecond timer interrupt status lsb: 21 reset_value: '0' width: 1 - DPIS: access: rwc description: Data pulse interrupt status lsb: 22 reset_value: '0' width: 1 - IDIE: access: rw description: USB ID interrupt enable lsb: 24 reset_value: '0' width: 1 - AVVIE: access: rw description: A-VBUS valid interrupt enable lsb: 25 reset_value: '0' width: 1 - ASVIE: access: rw description: A-session valid interrupt enable lsb: 26 reset_value: '0' width: 1 - BSVIE: access: rw description: B-session valid interrupt enable lsb: 27 reset_value: '0' width: 1 - BSEIE: access: rw description: B-session end interrupt enable lsb: 28 reset_value: '0' width: 1 - MS1E: access: rw description: 1 millisecond timer interrupt enable lsb: 29 reset_value: '0' width: 1 - DPIE: access: rw description: Data pulse interrupt enable lsb: 30 reset_value: '0' width: 1 - USB0_USBMODE_D: fields: !!omap - CM1_0: access: rwo description: Controller mode lsb: 0 reset_value: '0' width: 2 - ES: access: rw description: Endian select lsb: 2 reset_value: '0' width: 1 - SLOM: access: rw description: Setup Lockout mode lsb: 3 reset_value: '0' width: 1 - SDIS: access: rw description: Setup Lockout mode lsb: 4 reset_value: '0' width: 1 - USB0_USBMODE_H: fields: !!omap - CM: access: rwo description: Controller mode lsb: 0 reset_value: '0' width: 2 - ES: access: rw description: Endian select lsb: 2 reset_value: '0' width: 1 - SDIS: access: rw description: Stream disable mode lsb: 4 reset_value: '0' width: 1 - VBPS: access: rwo description: VBUS power select lsb: 5 reset_value: '0' width: 1 - USB0_ENDPTSETUPSTAT: fields: !!omap - ENDPTSETUPSTAT: access: rwc description: Setup endpoint status for logical endpoints 0 to 5 lsb: 0 reset_value: '0' width: 6 - USB0_ENDPTPRIME: fields: !!omap - PERB: access: rws description: Prime endpoint receive buffer for physical OUT endpoints 5 to 0 lsb: 0 reset_value: '0' width: 6 - PETB: access: rws description: Prime endpoint transmit buffer for physical IN endpoints 5 to 0 lsb: 16 reset_value: '0' width: 6 - USB0_ENDPTFLUSH: fields: !!omap - FERB: access: rwc description: Flush endpoint receive buffer for physical OUT endpoints 5 to 0 lsb: 0 reset_value: '0' width: 6 - FETB: access: rwc description: Flush endpoint transmit buffer for physical IN endpoints 5 to 0 lsb: 16 reset_value: '0' width: 6 - USB0_ENDPTSTAT: fields: !!omap - ERBR: access: r description: Endpoint receive buffer ready for physical OUT endpoints 5 to 0 lsb: 0 reset_value: '0' width: 6 - ETBR: access: r description: Endpoint transmit buffer ready for physical IN endpoints 3 to 0 lsb: 16 reset_value: '0' width: 6 - USB0_ENDPTCOMPLETE: fields: !!omap - ERCE: access: rwc description: Endpoint receive complete event for physical OUT endpoints 5 to 0 lsb: 0 reset_value: '0' width: 6 - ETCE: access: rwc description: Endpoint transmit complete event for physical IN endpoints 5 to 0 lsb: 16 reset_value: '0' width: 6 - USB0_ENDPTCTRL0: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT1_0: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXE: access: r description: Rx endpoint enable lsb: 7 reset_value: '1' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '' width: 1 - TXT1_0: access: r description: Endpoint type lsb: 18 reset_value: '0' width: 2 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '1' width: 1 - USB0_ENDPTCTRL1: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXI: access: rw description: Rx data toggle inhibit lsb: 5 reset_value: '0' width: 1 - RXR: access: ws description: Rx data toggle reset lsb: 6 reset_value: '0' width: 1 - RXE: access: rw description: Rx endpoint enable lsb: 7 reset_value: '0' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '0' width: 1 - TXT1_0: access: r description: Tx Endpoint type lsb: 18 reset_value: '0' width: 2 - TXI: access: rw description: Tx data toggle inhibit lsb: 21 reset_value: '0' width: 1 - TXR: access: ws description: Tx data toggle reset lsb: 22 reset_value: '1' width: 1 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '0' width: 1 - USB0_ENDPTCTRL2: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXI: access: rw description: Rx data toggle inhibit lsb: 5 reset_value: '0' width: 1 - RXR: access: ws description: Rx data toggle reset lsb: 6 reset_value: '0' width: 1 - RXE: access: rw description: Rx endpoint enable lsb: 7 reset_value: '0' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '0' width: 1 - TXT1_0: access: r description: Tx Endpoint type lsb: 18 reset_value: '0' width: 2 - TXI: access: rw description: Tx data toggle inhibit lsb: 21 reset_value: '0' width: 1 - TXR: access: ws description: Tx data toggle reset lsb: 22 reset_value: '1' width: 1 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '0' width: 1 - USB0_ENDPTCTRL3: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXI: access: rw description: Rx data toggle inhibit lsb: 5 reset_value: '0' width: 1 - RXR: access: ws description: Rx data toggle reset lsb: 6 reset_value: '0' width: 1 - RXE: access: rw description: Rx endpoint enable lsb: 7 reset_value: '0' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '0' width: 1 - TXT1_0: access: r description: Tx Endpoint type lsb: 18 reset_value: '0' width: 2 - TXI: access: rw description: Tx data toggle inhibit lsb: 21 reset_value: '0' width: 1 - TXR: access: ws description: Tx data toggle reset lsb: 22 reset_value: '1' width: 1 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '0' width: 1 - USB0_ENDPTCTRL4: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXI: access: rw description: Rx data toggle inhibit lsb: 5 reset_value: '0' width: 1 - RXR: access: ws description: Rx data toggle reset lsb: 6 reset_value: '0' width: 1 - RXE: access: rw description: Rx endpoint enable lsb: 7 reset_value: '0' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '0' width: 1 - TXT1_0: access: r description: Tx Endpoint type lsb: 18 reset_value: '0' width: 2 - TXI: access: rw description: Tx data toggle inhibit lsb: 21 reset_value: '0' width: 1 - TXR: access: ws description: Tx data toggle reset lsb: 22 reset_value: '1' width: 1 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '0' width: 1 - USB0_ENDPTCTRL5: fields: !!omap - RXS: access: rw description: Rx endpoint stall lsb: 0 reset_value: '0' width: 1 - RXT: access: rw description: Endpoint type lsb: 2 reset_value: '0' width: 2 - RXI: access: rw description: Rx data toggle inhibit lsb: 5 reset_value: '0' width: 1 - RXR: access: ws description: Rx data toggle reset lsb: 6 reset_value: '0' width: 1 - RXE: access: rw description: Rx endpoint enable lsb: 7 reset_value: '0' width: 1 - TXS: access: rw description: Tx endpoint stall lsb: 16 reset_value: '0' width: 1 - TXT1_0: access: r description: Tx Endpoint type lsb: 18 reset_value: '0' width: 2 - TXI: access: rw description: Tx data toggle inhibit lsb: 21 reset_value: '0' width: 1 - TXR: access: ws description: Tx data toggle reset lsb: 22 reset_value: '1' width: 1 - TXE: access: r description: Tx endpoint enable lsb: 23 reset_value: '0' width: 1 ================================================ FILE: firmware/libopencm3/scripts/data/lpc43xx/yaml_odict.py ================================================ import yaml from collections import OrderedDict def construct_odict(load, node): """This is the same as SafeConstructor.construct_yaml_omap(), except the data type is changed to OrderedDict() and setitem is used instead of append in the loop. >>> yaml.load(''' ... !!omap ... - foo: bar ... - mumble: quux ... - baz: gorp ... ''') OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) >>> yaml.load('''!!omap [ foo: bar, mumble: quux, baz : gorp ]''') OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) """ omap = OrderedDict() yield omap if not isinstance(node, yaml.SequenceNode): raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a sequence, but found %s" % node.id, node.start_mark ) for subnode in node.value: if not isinstance(subnode, yaml.MappingNode): raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a mapping of length 1, but found %s" % subnode.id, subnode.start_mark ) if len(subnode.value) != 1: raise yaml.constructor.ConstructorError( "while constructing an ordered map", node.start_mark, "expected a single mapping item, but found %d items" % len(subnode.value), subnode.start_mark ) key_node, value_node = subnode.value[0] key = load.construct_object(key_node) value = load.construct_object(value_node) omap[key] = value yaml.add_constructor(u'tag:yaml.org,2002:omap', construct_odict) def repr_pairs(dump, tag, sequence, flow_style=None): """This is the same code as BaseRepresenter.represent_sequence(), but the value passed to dump.represent_data() in the loop is a dictionary instead of a tuple.""" value = [] node = yaml.SequenceNode(tag, value, flow_style=flow_style) if dump.alias_key is not None: dump.represented_objects[dump.alias_key] = node best_style = True for (key, val) in sequence: item = dump.represent_data({key: val}) if not (isinstance(item, yaml.ScalarNode) and not item.style): best_style = False value.append(item) if flow_style is None: if dump.default_flow_style is not None: node.flow_style = dump.default_flow_style else: node.flow_style = best_style return node def repr_odict(dumper, data): """ >>> data = OrderedDict([('foo', 'bar'), ('mumble', 'quux'), ('baz', 'gorp')]) >>> yaml.dump(data, default_flow_style=False) '!!omap\\n- foo: bar\\n- mumble: quux\\n- baz: gorp\\n' >>> yaml.dump(data, default_flow_style=True) '!!omap [foo: bar, mumble: quux, baz: gorp]\\n' """ return repr_pairs(dumper, u'tag:yaml.org,2002:omap', data.iteritems()) yaml.add_representer(OrderedDict, repr_odict) ================================================ FILE: firmware/libopencm3/scripts/genlink.awk ================================================ # This program converts chip name to the series of definitions for make of # automatic linker script. # # Copyright (C) 2013 Frantisek Burian # Copyright (C) 2013 Werner Almesberger # BEGIN { PAT = tolower(PAT); } !/^#/{ tmp = "^"$1"$"; gsub(/?/, ".", tmp); gsub(/*/, ".*", tmp); gsub(/+/, ".+", tmp); tolower(tmp); if (PAT ~ tmp) { if ($2 != "+") PAT=$2; $1=""; $2=""; for (i = 3; i <= NF; i = i + 1) $i = "-D"$i; print; if (PAT=="END") exit; } } ================================================ FILE: firmware/libopencm3/scripts/irq2nvic_h ================================================ #!/usr/bin/env python # This file is part of the libopencm3 project. # # Copyright (C) 2012 chrysn # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . """Generate an nvic.h header from a small YAML file describing the interrupt numbers. Code generation is chosen here because the resulting C code needs to be very repetetive (definition of the IRQ numbers, function prototypes, weak fallback definition and vector table definition), all being very repetitive. No portable method to achive the same thing with C preprocessor is known to the author. (Neither is any non-portable method, for that matter.)""" import sys import os import os.path import yaml template_nvic_h = '''\ /* This file is part of the libopencm3 project. * * It was generated by the irq2nvic_h script. */ #ifndef {includeguard} #define {includeguard} #include /** @defgroup CM3_nvic_defines_{partname_doxygen} User interrupts for {partname_humanreadable} @ingroup CM3_nvic_defines @{{*/ {irqdefinitions} #define NVIC_IRQ_COUNT {irqcount} /**@}}*/ /** @defgroup CM3_nvic_isrprototypes_{partname_doxygen} User interrupt service routines (ISR) prototypes for {partname_humanreadable} @ingroup CM3_nvic_isrprototypes @{{*/ BEGIN_DECLS {isrprototypes} END_DECLS /**@}}*/ #endif /* {includeguard} */ ''' template_vector_nvic_c = '''\ /* This file is part of the libopencm3 project. * * It was generated by the irq2nvic_h script. * * This part needs to get included in the compilation unit where * blocking_handler gets defined due to the way #pragma works. */ /** @defgroup CM3_nvic_isrpragmas_{partname_doxygen} User interrupt service routines (ISR) defaults for {partname_humanreadable} @ingroup CM3_nvic_isrpragmas @{{*/ {isrpragmas} /**@}}*/ /* Initialization template for the interrupt vector table. This definition is * used by the startup code generator (vector.c) to set the initial values for * the interrupt handling routines to the chip family specific _isr weak * symbols. */ #define IRQ_HANDLERS \\ {vectortableinitialization} ''' template_cmsis_h = '''\ /* This file is part of the libopencm3 project. * * It was generated by the irq2nvic_h script. * * These definitions bend every interrupt handler that is defined CMSIS style * to the weak symbol exported by libopenmc3. */ {cmsisbends} ''' def convert(infile, outfile_nvic, outfile_vectornvic, outfile_cmsis): data = yaml.load(infile) irq2name = list(enumerate(data['irqs']) if isinstance(data['irqs'], list) else data['irqs'].items()) irqnames = [v for (k,v) in irq2name] if isinstance(data['irqs'], list): data['irqcount'] = len(irq2name) else: data['irqcount'] = max(data['irqs'].keys()) + 1 data['irqdefinitions'] = "\n".join('#define NVIC_%s_IRQ %d'%(v.upper(),k) for (k,v) in irq2name) data['isrprototypes'] = "\n".join('void WEAK %s_isr(void);'%name.lower() for name in irqnames) data['isrpragmas'] = "\n".join('#pragma weak %s_isr = blocking_handler'%name.lower() for name in irqnames) data['vectortableinitialization'] = ', \\\n '.join('[NVIC_%s_IRQ] = %s_isr'%(name.upper(), name.lower()) for name in irqnames) data['cmsisbends'] = "\n".join("#define %s_IRQHandler %s_isr"%(name.upper(), name.lower()) for name in irqnames) outfile_nvic.write(template_nvic_h.format(**data)) outfile_vectornvic.write(template_vector_nvic_c.format(**data)) outfile_cmsis.write(template_cmsis_h.format(**data)) def makeparentdir(filename): try: os.makedirs(os.path.dirname(filename)) except OSError: # where is my 'mkdir -p'? pass def needs_update(infiles, outfiles): timestamp = lambda filename: os.stat(filename).st_mtime return any(not os.path.exists(o) for o in outfiles) or max(map(timestamp, infiles)) > min(map(timestamp, outfiles)) def main(): if sys.argv[1] == '--remove': remove = True del sys.argv[1] else: remove = False infile = sys.argv[1] if not infile.startswith('./include/libopencm3/') or not infile.endswith('/irq.yaml'): raise ValueError("Arguent must match ./include/libopencm3/**/irq.yaml") nvic_h = infile.replace('irq.yaml', 'nvic.h') vector_nvic_c = infile.replace('./include/libopencm3/', './lib/').replace('irq.yaml', 'vector_nvic.c') cmsis = infile.replace('irq.yaml', 'irqhandlers.h').replace('/libopencm3/', '/libopencmsis/') if remove: if os.path.exists(nvic_h): os.unlink(nvic_h) if os.path.exists(vector_nvic_c): os.unlink(vector_nvic_c) sys.exit(0) if not needs_update([__file__, infile], [nvic_h, vector_nvic_c]): sys.exit(0) makeparentdir(nvic_h) makeparentdir(vector_nvic_c) makeparentdir(cmsis) convert(open(infile), open(nvic_h, 'w'), open(vector_nvic_c, 'w'), open(cmsis, 'w')) if __name__ == "__main__": main() ================================================ FILE: firmware/libopencm3/scripts/lpcvtcksum ================================================ #!/usr/bin/python # # Compute and insert the vector table checksum required for booting the # LPC43xx and some other NXP ARM microcontrollers. # # usage: lpcvtcksum firmware.bin # # This file is part of the libopencm3 project. # # Copyright (C) 2012 Michael Ossmann # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This library 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see . import sys, struct binfile = open(sys.argv[1], 'r+b') rawvectors = binfile.read(32) vectors = list(struct.unpack(' # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. .data .section .m0_bin, "ax" .incbin "blinky_m0.bin" ================================================ FILE: firmware/toolchain-arm-cortex-m.cmake ================================================ # Copyright 2014 Jared Boone # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR arm) include(CMakeForceCompiler) CMAKE_FORCE_C_COMPILER(arm-none-eabi-gcc GNU) CMAKE_FORCE_CXX_COMPILER(arm-none-eabi-g++ GNU) execute_process( COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.a OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE ) get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" PATH ) get_filename_component(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/.." REALPATH ) set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE FILEPATH "Install path prefix, prepended onto install directories.") message(STATUS "Cross-compiling with the gcc-arm-embedded toolchain") message(STATUS "Toolchain prefix: ${CMAKE_INSTALL_PREFIX}") set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER}) #set(CMAKE_LD ${CMAKE_INSTALL_PREFIX}/bin/ld CACHE INTERNAL "ld tool") set(CMAKE_OBJCOPY ${CMAKE_INSTALL_PREFIX}/bin/objcopy CACHE INTERNAL "objcopy tool") set(CMAKE_FIND_ROOT_PATH ${CMAKE_INSTALL_PREFIX}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ================================================ FILE: hardware/README.md ================================================ PCB info: OSH Park 4-layer. Material: FR408 Relative permittivity: 3.66 Tangent delta: 0.0127 Stackup: - 1 mil solder resist - 1 oz copper (1.4 mil) - 6.7 mil prepreg - 0.5 oz copper (0.7 mil) - 47 mil core - 0.5 oz copper (0.7 mil) - 6.7 mil prepreg - 1 oz copper (1.4 mil) - 1 mil solder resist More information: http://support.oshpark.com/support/solutions/articles/122263-4-layer-board-stackup-and-specifications ================================================ FILE: hardware/fmcw2/fmcw2-cache.lib ================================================ EESchema-LIBRARY Version 2.3 #encoding utf-8 # # 5400BL15B050E # DEF 5400BL15B050E U 0 40 Y Y 1 F N F0 "U" 250 250 60 H V C CNN F1 "5400BL15B050E" 100 700 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -250 300 350 650 0 1 0 N X IN 1 -450 500 200 R 50 50 1 1 P X GND 2 50 100 200 U 50 50 1 1 W X OUTP 3 550 450 200 L 50 50 1 1 P X OUTN 4 550 550 200 L 50 50 1 1 P X GND 5 -50 100 200 U 50 50 1 1 W ENDDRAW ENDDEF # # ADF4158 # DEF ADF4158 U 0 40 Y Y 1 F N F0 "U" 1750 -200 60 H V C CNN F1 "ADF4158" 1800 100 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST WFQFN-24 $ENDFPLIST DRAW S 1000 600 2550 -650 0 1 0 N X CPGND 1 2000 -850 200 U 50 50 1 1 W X AGND 2 1450 -850 200 U 50 50 1 1 W X AGND 3 1550 -850 200 U 50 50 1 1 W X RFINB 4 2750 -400 200 L 50 50 1 1 I X RFINA 5 2750 -300 200 L 50 50 1 1 I X AVDD 6 1350 800 200 D 50 50 1 1 W X AVDD 7 1450 800 200 D 50 50 1 1 W X AVDD 8 1550 800 200 D 50 50 1 1 W X REFIN 9 800 400 200 R 50 50 1 1 I X DGND 10 1700 -850 200 U 50 50 1 1 W X SW1 20 2750 0 200 L 50 50 1 1 P X SDGND 11 1850 -850 200 U 50 50 1 1 W X SW2 21 2750 400 200 L 50 50 1 1 P X TXDATA 12 800 -150 200 R 50 50 1 1 I X VP 22 2100 800 200 D 50 50 1 1 W X CE 13 800 -50 200 R 50 50 1 1 I X RSET 23 2750 -550 200 L 50 50 1 1 P X CLK 14 800 -350 200 R 50 50 1 1 I X CP 24 2750 250 200 L 50 50 1 1 O X DATA 15 800 -450 200 R 50 50 1 1 I X LE 16 800 -550 200 R 50 50 1 1 I X MUXOUT 17 800 200 200 R 50 50 1 1 O X SDVDD 18 1850 800 200 D 50 50 1 1 W X DVDD 19 1700 800 200 D 50 50 1 1 W X EP PAD 2150 -850 200 U 50 50 1 1 W ENDDRAW ENDDEF # # ADL5801 # DEF ADL5801 U 0 40 Y Y 1 F N F0 "U" 800 -200 60 H V C CNN F1 "ADL5801" 950 1000 60 H V C CNN F2 "" 0 50 60 H V C CNN F3 "" 0 50 60 H V C CNN DRAW S -150 -150 900 950 0 1 0 N X GND 1 -350 650 200 R 50 50 1 1 W X GND 2 -350 550 200 R 50 50 1 1 W X LOIP 3 -350 450 200 R 50 50 1 1 I X LOIN 4 -350 350 200 R 50 50 1 1 I X GND 5 -350 250 200 R 50 50 1 1 W X GND 6 -350 150 200 R 50 50 1 1 W X VPLO 7 150 -350 200 U 50 50 1 1 W X GND 8 250 -350 200 U 50 50 1 1 W X ENBL 9 350 -350 200 U 50 50 1 1 I X VSET 10 450 -350 200 U 50 50 1 1 I X IFOP 20 550 1150 200 D 50 50 1 1 O X DETO 11 550 -350 200 U 50 50 1 1 O X IFON 21 450 1150 200 D 50 50 1 1 O X GND 12 650 -350 200 U 50 50 1 1 W X NC 22 350 1150 200 D 50 50 1 1 N X VPDT 13 1100 150 200 L 50 50 1 1 W X GND 23 250 1150 200 D 50 50 1 1 W X GND 14 1100 250 200 L 50 50 1 1 W X VPLO 24 150 1150 200 D 50 50 1 1 W X RFIN 15 1100 350 200 L 50 50 1 1 I X RFIP 16 1100 450 200 L 50 50 1 1 I X GND 17 1100 550 200 L 50 50 1 1 W X VPRF 18 1100 650 200 L 50 50 1 1 W X GND 19 650 1150 200 D 50 50 1 1 W X PAD PAD 50 -350 200 U 50 50 1 1 P ENDDRAW ENDDEF # # BEND # DEF BEND F 0 40 Y Y 1 F N F0 "F" 0 -100 60 H V C CNN F1 "BEND" 150 150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -25 100 -25 25 25 -25 100 -25 N P 5 0 1 0 100 -25 100 25 25 25 25 100 -25 100 N X ~ 1 0 200 100 D 50 50 1 1 P X ~ 2 200 0 100 L 50 50 1 1 P ENDDRAW ENDDEF # # BRANCHLINE # DEF BRANCHLINE Z 0 40 Y Y 1 F N F0 "Z" 100 -200 60 H V C CNN F1 "BRANCHLINE" 50 300 60 H V C CNN F2 "" 50 -150 60 H V C CNN F3 "" 50 -150 60 H V C CNN DRAW S -150 -100 -150 -100 0 1 0 N S -150 -100 -150 -100 0 1 0 N S 150 150 -150 -100 0 1 20 N X ~ 1 -350 150 200 R 50 50 1 1 P X ~ 2 350 150 200 L 50 50 1 1 P X ~ 3 -350 -100 200 R 50 50 1 1 P X ~ 4 350 -100 200 L 50 50 1 1 P ENDDRAW ENDDEF # # C-RESCUE-fmcw2 # DEF C-RESCUE-fmcw2 C 0 10 N Y 1 F N F0 "C" 0 100 40 H V L CNN F1 "C-RESCUE-fmcw2" 6 -85 40 H V L CNN F2 "" 38 -150 30 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW P 2 0 1 20 -80 -30 80 -30 N P 2 0 1 20 -80 30 80 30 N X ~ 1 0 200 170 D 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P ENDDRAW ENDDEF # # CONN_15X2 # DEF CONN_15X2 P 0 10 Y N 1 F N F0 "P" 0 800 60 H V C CNN F1 "CONN_15X2" 0 -50 50 V V C CNN F2 "" 0 150 60 H V C CNN F3 "" 0 150 60 H V C CNN DRAW S -100 750 100 -750 0 1 0 N X P1 1 -400 700 300 R 60 30 1 1 P I X P2 2 -400 600 300 R 60 30 1 1 P I X P3 3 -400 500 300 R 60 30 1 1 P I X P4 4 -400 400 300 R 60 30 1 1 P I X P5 5 -400 300 300 R 60 30 1 1 P I X P6 6 -400 200 300 R 60 30 1 1 P I X P7 7 -400 100 300 R 60 30 1 1 P I X P8 8 -400 0 300 R 60 30 1 1 P I X P9 9 -400 -100 300 R 60 30 1 1 P I X P10 10 -400 -200 300 R 60 30 1 1 P I X P20 20 400 300 300 L 60 30 1 1 P I X P30 30 400 -700 300 L 60 30 1 1 P I X P11 11 -400 -300 300 R 60 30 1 1 P I X P21 21 400 200 300 L 60 30 1 1 P I X P12 12 -400 -400 300 R 60 30 1 1 P I X P22 22 400 100 300 L 60 30 1 1 P I X P13 13 -400 -500 300 R 60 30 1 1 P I X P23 23 400 0 300 L 60 30 1 1 P I X P14 14 -400 -600 300 R 60 30 1 1 P I X P24 24 400 -100 300 L 60 30 1 1 P I X P15 15 -400 -700 300 R 60 30 1 1 P I X P25 25 400 -200 300 L 60 30 1 1 P I X P16 16 400 700 300 L 60 30 1 1 P I X 26 26 400 -300 300 L 60 30 1 1 I I X P17 17 400 600 300 L 60 30 1 1 P I X P27 27 400 -400 300 L 60 30 1 1 P I X P18 18 400 500 300 L 60 30 1 1 P I X P28 28 400 -500 300 L 60 30 1 1 P I X P19 19 400 400 300 L 60 30 1 1 P I X P29 29 400 -600 300 L 60 30 1 1 P I ENDDRAW ENDDEF # # GND-RESCUE-fmcw2 # DEF ~GND-RESCUE-fmcw2 #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 0 30 H I C CNN F1 "GND-RESCUE-fmcw2" 0 -70 30 H I C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X GND 1 0 0 0 U 30 30 1 1 W N ENDDRAW ENDDEF # # HMC313 # DEF HMC313 U 0 40 Y Y 1 F N F0 "U" 350 300 60 H V C CNN F1 "HMC313" 250 800 60 H V C CNN F2 "" 100 0 60 H V C CNN F3 "" 100 0 60 H V C CNN DRAW S -250 350 400 750 0 1 0 N X RFOUT 1 600 650 200 L 50 50 1 1 O X GND 2 -50 150 200 U 50 50 1 1 W X RFIN 3 -450 650 200 R 50 50 1 1 I X GND 4 150 150 200 U 50 50 1 1 W X GND 5 250 150 200 U 50 50 1 1 W X GND 6 50 150 200 U 50 50 1 1 W ENDDRAW ENDDEF # # HMC431LP4 # DEF HMC431LP4 U 0 40 Y Y 1 F N F0 "U" 300 -350 60 H V C CNN F1 "HMC431LP4" 200 300 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST VQFN-24 $ENDFPLIST DRAW S -300 250 400 -300 0 1 0 N X VCC 20 -600 150 300 R 60 60 1 1 W X VTUNE 22 -600 -200 300 R 60 60 1 1 I X GND 15 700 -100 300 L 60 60 1 1 W X RFOUT 16 700 150 300 L 60 60 1 1 O X PAD PAD 700 -200 300 L 60 60 1 1 W ENDDRAW ENDDEF # # INDUCTOR_SMALL # DEF INDUCTOR_SMALL L 0 0 N N 1 F N F0 "L" 0 100 50 H V C CNN F1 "INDUCTOR_SMALL" 0 -50 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW A -150 0 50 1 1799 0 1 0 N -100 0 -200 0 A -50 0 50 1 1799 0 1 0 N 0 0 -100 0 A 50 0 50 1 1799 0 1 0 N 100 0 0 0 A 150 0 50 1 1799 0 1 0 N 200 0 100 0 X 1 1 -250 0 50 R 30 30 1 1 I X 2 2 250 0 50 L 30 30 1 1 I ENDDRAW ENDDEF # # LDS3985 # DEF LDS3985 U 0 40 Y Y 1 F N F0 "U" 250 -200 60 H V C CNN F1 "LDS3985" 100 200 60 H V C CNN F2 "" -100 -200 60 H V C CNN F3 "" -100 -200 60 H V C CNN DRAW S -300 -150 300 150 0 1 0 N X VIN 1 -500 100 200 R 50 50 1 1 W X GND 2 -500 -100 200 R 50 50 1 1 W X EN 3 -500 0 200 R 50 50 1 1 I X BYPASS 4 500 -100 200 L 50 50 1 1 P X VOUT 5 500 100 200 L 50 50 1 1 w ENDDRAW ENDDEF # # LED-RESCUE-fmcw2 # DEF LED-RESCUE-fmcw2 D 0 40 Y N 1 F N F0 "D" 0 100 50 H V C CNN F1 "LED-RESCUE-fmcw2" 0 -100 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST LED-3MM LED-5MM LED-10MM LED-0603 LED-0805 LED-1206 LEDV $ENDFPLIST DRAW P 2 0 1 0 50 50 50 -50 N P 3 0 1 0 -50 50 50 0 -50 -50 F P 3 0 1 0 65 -40 110 -80 105 -55 N P 3 0 1 0 80 -25 125 -65 120 -40 N X A 1 -200 0 150 R 40 40 1 1 P X K 2 200 0 150 L 40 40 1 1 P ENDDRAW ENDDEF # # LT6232 # DEF LT6232 U 0 20 Y Y 4 L N F0 "U" 150 150 60 H V C CNN F1 "LT6232" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT23-6 SOT-23-6 $ENDFPLIST DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X - 2 -500 -100 300 R 40 40 1 1 I X + 3 -500 100 300 R 40 40 1 1 I X V+ 4 -100 400 250 D 40 40 1 1 W X V- 13 -100 -400 250 U 40 40 1 1 W X + 5 -500 100 300 R 40 40 2 1 I X - 6 -500 -100 300 R 40 40 2 1 I X ~ 7 500 0 300 L 40 40 2 1 C X ~ 10 500 0 300 L 40 40 3 1 C X - 11 -500 -100 300 R 40 40 3 1 I X + 12 -500 100 300 R 40 40 3 1 I X + 14 -500 100 300 R 40 40 4 1 I X - 15 -500 -100 300 R 40 40 4 1 I X ~ 16 500 0 300 L 40 40 4 1 C ENDDRAW ENDDEF # # MCP1700 # DEF MCP1700 U 0 40 Y Y 1 F N F0 "U" 250 -150 60 H V C CNN F1 "MCP1700" 50 400 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT-23 $ENDFPLIST DRAW S -300 350 300 -100 0 1 0 N X GND 1 0 -400 300 U 60 60 1 1 W X VOUT 2 600 250 300 L 60 60 1 1 w X VIN 3 -600 250 300 R 60 60 1 1 W ENDDRAW ENDDEF # # MGA-25203 # DEF MGA-25203 U 0 40 Y Y 1 F N F0 "U" 650 -200 60 H V C CNN F1 "MGA-25203" 600 700 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -300 -150 700 650 0 1 0 N X RFIN 1 -500 300 200 R 50 50 1 1 I X GND 2 0 -350 200 U 50 50 1 1 W X GND 3 -100 -350 200 U 50 50 1 1 W X BCTRL 4 0 850 200 D 50 50 1 1 I X BSPLY 5 150 850 200 D 50 50 1 1 W X BSW 6 -100 850 200 D 50 50 1 1 I X GND 10 200 -350 200 U 50 50 1 1 W X RFOUT 11 900 300 200 L 50 50 1 1 O X GND 12 300 -350 200 U 50 50 1 1 W X VCC 13 300 850 200 D 50 50 1 1 W X GND 14 400 -350 200 U 50 50 1 1 W X GND 16 100 -350 200 U 50 50 1 1 W X GND EP 500 -350 200 U 50 50 1 1 W ENDDRAW ENDDEF # # MOS_N_GSD # DEF MOS_N_GSD Q 0 0 Y Y 1 F N F0 "Q" 10 170 60 H V R CNN F1 "MOS_N_GSD" 10 -150 60 H V R CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 8 -50 -100 -50 100 N P 2 0 1 10 0 -150 0 150 N P 2 0 1 0 100 -100 0 -100 N P 2 0 1 0 100 100 0 100 N P 3 0 1 8 100 -100 100 0 50 0 N P 5 0 1 8 50 30 50 -30 0 0 50 30 50 30 N X G 1 -200 0 150 R 40 40 1 1 I X S 2 100 -200 100 U 40 40 1 1 P X D 3 100 200 100 D 40 40 1 1 P ENDDRAW ENDDEF # # PAT1220 # DEF PAT1220 U 0 40 Y Y 1 F N F0 "U" 200 -300 60 H V C CNN F1 "PAT1220" 50 100 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST PAT1220 $ENDFPLIST DRAW S -250 50 250 -250 0 1 0 N S -175 -50 -125 -150 0 1 0 N S -150 -150 -150 -200 0 1 0 N S -150 0 -150 -50 0 1 0 N S -60 0 -200 0 0 1 0 N S -60 25 65 -25 0 1 0 N S 125 -50 175 -150 0 1 0 N S 150 -200 -150 -200 0 1 0 N S 150 -150 150 -200 0 1 0 N S 150 -50 150 0 0 1 0 N S 200 0 65 0 0 1 0 N X ~ 1 -500 0 300 R 60 60 1 1 P X ~ 2 500 0 300 L 60 60 1 1 P X ~ 3 0 -500 300 U 60 60 1 1 P ENDDRAW ENDDEF # # PWR_FLAG # DEF PWR_FLAG #FLG 0 0 N N 1 F P F0 "#FLG" 0 95 50 H I C CNN F1 "PWR_FLAG" 0 180 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW X pwr 1 0 0 0 U 20 20 0 0 w P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N ENDDRAW ENDDEF # # R-RESCUE-fmcw2 # DEF R-RESCUE-fmcw2 R 0 0 N Y 1 F N F0 "R" 80 0 40 V V C CNN F1 "R-RESCUE-fmcw2" 7 1 40 V V C CNN F2 "" -70 0 30 V V C CNN F3 "" 0 0 30 H V C CNN $FPLIST R? SM0603 SM0805 R?-* SM1206 $ENDFPLIST DRAW S -40 150 40 -150 0 1 12 N X ~ 1 0 250 100 D 60 60 1 1 P X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW ENDDEF # # SG-210STF # DEF SG-210STF U 0 40 Y Y 1 F N F0 "U" 300 -250 60 H V C CNN F1 "SG-210STF" 150 300 60 H V C CNN F2 "" -100 100 60 H V C CNN F3 "" -100 100 60 H V C CNN DRAW S -150 -200 300 200 0 1 0 N X ~ST 1 -350 150 200 R 50 50 1 1 I X GND 2 -350 -150 200 R 50 50 1 1 W X OUT 3 500 0 200 L 50 50 1 1 O X VCC 4 -350 0 200 R 50 50 1 1 W ENDDRAW ENDDEF # # SKY65404 # DEF SKY65404 U 0 40 Y Y 1 F N F0 "U" 350 -300 60 H V C CNN F1 "SKY65404" 250 300 60 H V C CNN F2 "" -50 0 60 H V C CNN F3 "" -50 0 60 H V C CNN $FPLIST QFN-6 $ENDFPLIST DRAW S -400 250 500 -250 0 1 0 N X V_ENABLE 1 -700 150 300 R 60 60 1 1 I X GND 2 -700 0 300 R 60 60 1 1 W X RF_IN 3 800 -150 300 L 60 60 1 1 I X RF_OUT 4 -700 -150 300 R 60 60 1 1 O X GND 5 800 0 300 L 60 60 1 1 W X VCC 6 800 150 300 L 60 60 1 1 W X PAD PAD 50 -550 300 U 60 60 1 1 P ENDDRAW ENDDEF # # SMA # DEF SMA U 0 40 Y Y 1 F N F0 "U" 150 0 60 H V C CNN F1 "SMA" 0 150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW C 0 0 22 0 1 0 N S -50 -50 50 50 0 1 0 N P 2 0 1 0 -100 0 -50 0 N X ~ 1 -200 0 100 R 50 50 1 1 P X ~ 2 0 -150 100 U 50 50 1 1 P ENDDRAW ENDDEF # # TLV271 # DEF TLV271 U 0 20 Y Y 1 F N F0 "U" 150 150 60 H V C CNN F1 "TLV271" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT-23-5 $ENDFPLIST DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X V- 2 -100 -400 250 U 40 40 1 1 W X + 3 -500 100 300 R 40 40 1 1 I X _ 4 -500 -100 300 R 40 40 1 1 I X V+ 5 -100 400 250 D 40 40 1 1 W ENDDRAW ENDDEF # #End Library ================================================ FILE: hardware/fmcw2/fmcw2-rescue.lib ================================================ EESchema-LIBRARY Version 2.3 #encoding utf-8 # # C-RESCUE-fmcw2 # DEF C-RESCUE-fmcw2 C 0 10 N Y 1 F N F0 "C" 0 100 40 H V L CNN F1 "C-RESCUE-fmcw2" 6 -85 40 H V L CNN F2 "" 38 -150 30 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW P 2 0 1 20 -80 -30 80 -30 N P 2 0 1 20 -80 30 80 30 N X ~ 1 0 200 170 D 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P ENDDRAW ENDDEF # # GND-RESCUE-fmcw2 # DEF ~GND-RESCUE-fmcw2 #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 0 30 H I C CNN F1 "GND-RESCUE-fmcw2" 0 -70 30 H I C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X GND 1 0 0 0 U 30 30 1 1 W N ENDDRAW ENDDEF # # LED-RESCUE-fmcw2 # DEF LED-RESCUE-fmcw2 D 0 40 Y N 1 F N F0 "D" 0 100 50 H V C CNN F1 "LED-RESCUE-fmcw2" 0 -100 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST LED-3MM LED-5MM LED-10MM LED-0603 LED-0805 LED-1206 LEDV $ENDFPLIST DRAW P 2 0 1 0 50 50 50 -50 N P 3 0 1 0 -50 50 50 0 -50 -50 F P 3 0 1 0 65 -40 110 -80 105 -55 N P 3 0 1 0 80 -25 125 -65 120 -40 N X A 1 -200 0 150 R 40 40 1 1 P X K 2 200 0 150 L 40 40 1 1 P ENDDRAW ENDDEF # # R-RESCUE-fmcw2 # DEF R-RESCUE-fmcw2 R 0 0 N Y 1 F N F0 "R" 80 0 40 V V C CNN F1 "R-RESCUE-fmcw2" 7 1 40 V V C CNN F2 "" -70 0 30 V V C CNN F3 "" 0 0 30 H V C CNN $FPLIST R? SM0603 SM0805 R?-* SM1206 $ENDFPLIST DRAW S -40 150 40 -150 0 1 12 N X ~ 1 0 250 100 D 60 60 1 1 P X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW ENDDEF # #End Library ================================================ FILE: hardware/fmcw2/fmcw2.kicad_pcb ================================================ (kicad_pcb (version 4) (host pcbnew "(2016-02-01 BZR 6532)-product") (general (links 398) (no_connects 0) (area 120.45 91.3 189.450001 124.300001) (thickness 1.6) (drawings 17) (tracks 1934) (zones 0) (modules 136) (nets 85) ) (page A4) (layers (0 F.Cu signal) (1 In1.Cu signal) (2 In2.Cu signal) (31 B.Cu signal) (32 B.Adhes user) (33 F.Adhes user) (34 B.Paste user) (35 F.Paste user) (36 B.SilkS user) (37 F.SilkS user) (38 B.Mask user hide) (39 F.Mask user hide) (40 Dwgs.User user) (41 Cmts.User user) (42 Eco1.User user) (43 Eco2.User user) (44 Edge.Cuts user) (45 Margin user) (46 B.CrtYd user) (47 F.CrtYd user) (48 B.Fab user) (49 F.Fab user) ) (setup (last_trace_width 0.15) (user_trace_width 0.2) (user_trace_width 0.34) (trace_clearance 0.15) (zone_clearance 0.26) (zone_45_only yes) (trace_min 0.15) (segment_width 1.2) (edge_width 0.1) (via_size 0.7) (via_drill 0.3) (via_min_size 0.69) (via_min_drill 0.3) (uvia_size 0.69) (uvia_drill 0.34) (uvias_allowed no) (uvia_min_size 0.69) (uvia_min_drill 0.3) (pcb_text_width 0.3) (pcb_text_size 1.5 1.5) (mod_edge_width 0.15) (mod_text_size 1 1) (mod_text_width 0.15) (pad_size 1 1.25) (pad_drill 0) (pad_to_mask_clearance 0) (aux_axis_origin 0 0) (visible_elements FFFEFF7F) (pcbplotparams (layerselection 0x010fc_80000007) (usegerberextensions true) (excludeedgelayer true) (linewidth 0.100000) (plotframeref false) (viasonmask false) (mode 1) (useauxorigin false) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) (hpglpenoverlay 2) (psnegative false) (psa4output false) (plotreference true) (plotvalue false) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) (drillshape 0) (scaleselection 1) (outputdirectory gerbers)) ) (net 0 "") (net 1 /3V3) (net 2 GND) (net 3 /5V) (net 4 "Net-(C8-Pad2)") (net 5 "Net-(C9-Pad1)") (net 6 "Net-(C9-Pad2)") (net 7 "Net-(C10-Pad1)") (net 8 "Net-(C10-Pad2)") (net 9 "Net-(C11-Pad1)") (net 10 "Net-(C11-Pad2)") (net 11 "Net-(C12-Pad1)") (net 12 "Net-(C12-Pad2)") (net 13 /10V) (net 14 "Net-(C24-Pad1)") (net 15 "Net-(C25-Pad1)") (net 16 /3V0) (net 17 "Net-(C29-Pad1)") (net 18 "Net-(C31-Pad1)") (net 19 "Net-(C32-Pad1)") (net 20 /BSW) (net 21 "Net-(C37-Pad2)") (net 22 "Net-(L2-Pad1)") (net 23 "Net-(R1-Pad1)") (net 24 "Net-(R2-Pad2)") (net 25 "Net-(R5-Pad1)") (net 26 "Net-(R6-Pad1)") (net 27 "Net-(R8-Pad1)") (net 28 "Net-(R11-Pad2)") (net 29 "Net-(R9-Pad2)") (net 30 "Net-(R11-Pad1)") (net 31 /OSC_REF) (net 32 /LO) (net 33 "Net-(U12-Pad2)") (net 34 "Net-(U14-Pad11)") (net 35 "Net-(U15-Pad1)") (net 36 "Net-(R17-Pad2)") (net 37 "Net-(C42-Pad2)") (net 38 "Net-(F1-Pad1)") (net 39 "Net-(F1-Pad2)") (net 40 "Net-(F3-Pad1)") (net 41 "Net-(F3-Pad2)") (net 42 "Net-(F5-Pad2)") (net 43 "Net-(U3-Pad2)") (net 44 "Net-(F4-Pad2)") (net 45 "Net-(F2-Pad2)") (net 46 "Net-(C20-Pad1)") (net 47 /RFIN) (net 48 /RFIP) (net 49 "Net-(C47-Pad1)") (net 50 "Net-(C52-Pad1)") (net 51 "Net-(C52-Pad2)") (net 52 "Net-(C54-Pad1)") (net 53 "Net-(C54-Pad2)") (net 54 "Net-(D1-Pad1)") (net 55 /IF-) (net 56 /IF+) (net 57 /PA_OFF) (net 58 /ADF_CE) (net 59 /ADF_CLK) (net 60 /ADF_DATA) (net 61 /ADF_LE) (net 62 /ADF_MUXOUT) (net 63 /ADF_TXDATA) (net 64 /MIX_ENBL) (net 65 "Net-(C55-Pad1)") (net 66 "Net-(C55-Pad2)") (net 67 "Net-(C56-Pad1)") (net 68 "Net-(C57-Pad1)") (net 69 "Net-(C59-Pad1)") (net 70 "Net-(C59-Pad2)") (net 71 "Net-(C60-Pad1)") (net 72 "Net-(C60-Pad2)") (net 73 "Net-(C61-Pad1)") (net 74 "Net-(C62-Pad1)") (net 75 "Net-(C64-Pad2)") (net 76 "Net-(C65-Pad2)") (net 77 /IFF-) (net 78 /IFF+) (net 79 "Net-(R28-Pad1)") (net 80 "Net-(R29-Pad1)") (net 81 "Net-(C67-Pad1)") (net 82 /2V5) (net 83 /VTUNE) (net 84 "Net-(R36-Pad1)") (net_class Default "This is the default net class." (clearance 0.15) (trace_width 0.15) (via_dia 0.7) (via_drill 0.3) (uvia_dia 0.69) (uvia_drill 0.34) (add_net /10V) (add_net /2V5) (add_net /3V0) (add_net /3V3) (add_net /5V) (add_net /ADF_CE) (add_net /ADF_CLK) (add_net /ADF_DATA) (add_net /ADF_LE) (add_net /ADF_MUXOUT) (add_net /ADF_TXDATA) (add_net /BSW) (add_net /IF+) (add_net /IF-) (add_net /IFF+) (add_net /IFF-) (add_net /LO) (add_net /MIX_ENBL) (add_net /OSC_REF) (add_net /PA_OFF) (add_net /RFIN) (add_net /RFIP) (add_net /VTUNE) (add_net GND) (add_net "Net-(C10-Pad1)") (add_net "Net-(C10-Pad2)") (add_net "Net-(C11-Pad1)") (add_net "Net-(C11-Pad2)") (add_net "Net-(C12-Pad1)") (add_net "Net-(C12-Pad2)") (add_net "Net-(C20-Pad1)") (add_net "Net-(C24-Pad1)") (add_net "Net-(C25-Pad1)") (add_net "Net-(C29-Pad1)") (add_net "Net-(C31-Pad1)") (add_net "Net-(C32-Pad1)") (add_net "Net-(C37-Pad2)") (add_net "Net-(C42-Pad2)") (add_net "Net-(C47-Pad1)") (add_net "Net-(C52-Pad1)") (add_net "Net-(C52-Pad2)") (add_net "Net-(C54-Pad1)") (add_net "Net-(C54-Pad2)") (add_net "Net-(C55-Pad1)") (add_net "Net-(C55-Pad2)") (add_net "Net-(C56-Pad1)") (add_net "Net-(C57-Pad1)") (add_net "Net-(C59-Pad1)") (add_net "Net-(C59-Pad2)") (add_net "Net-(C60-Pad1)") (add_net "Net-(C60-Pad2)") (add_net "Net-(C61-Pad1)") (add_net "Net-(C62-Pad1)") (add_net "Net-(C64-Pad2)") (add_net "Net-(C65-Pad2)") (add_net "Net-(C67-Pad1)") (add_net "Net-(C8-Pad2)") (add_net "Net-(C9-Pad1)") (add_net "Net-(C9-Pad2)") (add_net "Net-(D1-Pad1)") (add_net "Net-(F1-Pad1)") (add_net "Net-(F1-Pad2)") (add_net "Net-(F2-Pad2)") (add_net "Net-(F3-Pad1)") (add_net "Net-(F3-Pad2)") (add_net "Net-(F4-Pad2)") (add_net "Net-(F5-Pad2)") (add_net "Net-(L2-Pad1)") (add_net "Net-(R1-Pad1)") (add_net "Net-(R11-Pad1)") (add_net "Net-(R11-Pad2)") (add_net "Net-(R17-Pad2)") (add_net "Net-(R2-Pad2)") (add_net "Net-(R28-Pad1)") (add_net "Net-(R29-Pad1)") (add_net "Net-(R36-Pad1)") (add_net "Net-(R5-Pad1)") (add_net "Net-(R6-Pad1)") (add_net "Net-(R8-Pad1)") (add_net "Net-(R9-Pad2)") (add_net "Net-(U12-Pad2)") (add_net "Net-(U14-Pad11)") (add_net "Net-(U15-Pad1)") (add_net "Net-(U3-Pad2)") ) (module fmcw2:uwmiter_0.34_0.17_45 (layer F.Cu) (tedit 0) (tstamp 552A4FBD) (at 159.15 108.93 270) (path /552A64D7) (fp_text reference F6 (at 0 1.34 270) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 270) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.460208 0.290208) (xy 0.219791 0.530624) (xy 0.129199 0.440032) (xy 0 0.128116) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 270) (size 0.34 0.034) (layers F.Cu) (net 40 "Net-(F3-Pad1)") (clearance 0.000001)) (pad 2 smd rect (at 0.35202 0.422437 225) (size 0.034 0.34) (layers F.Cu) (net 44 "Net-(F4-Pad2)") (clearance 0.000001)) ) (module fmcw2:uwmiter_0.34_0.17_45 (layer F.Cu) (tedit 0) (tstamp 552A4FB1) (at 155.25 112.69 90) (path /552A5548) (fp_text reference F4 (at 0 1.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.460208 0.290208) (xy 0.219791 0.530624) (xy 0.129199 0.440032) (xy 0 0.128116) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 90) (size 0.34 0.034) (layers F.Cu) (net 38 "Net-(F1-Pad1)") (clearance 0.000001)) (pad 2 smd rect (at 0.35202 0.422437 45) (size 0.034 0.34) (layers F.Cu) (net 44 "Net-(F4-Pad2)") (clearance 0.000001)) ) (module fmcw2:uwmiter_0.34_0.17_45 (layer F.Cu) (tedit 0) (tstamp 552A49D1) (at 165.62 107.1 135) (path /552A504F) (fp_text reference F5 (at 0 1.34 135) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 135) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.460208 0.290208) (xy 0.219791 0.530624) (xy 0.129199 0.440032) (xy 0 0.128116) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 135) (size 0.34 0.034) (layers F.Cu) (net 41 "Net-(F3-Pad2)") (clearance 0.000001)) (pad 2 smd rect (at 0.35202 0.422437 90) (size 0.034 0.34) (layers F.Cu) (net 42 "Net-(F5-Pad2)") (clearance 0.000001)) ) (module fmcw2:uwmiter_0.34_0.17_45 (layer F.Cu) (tedit 0) (tstamp 552A49C3) (at 163.14 109.27 90) (path /552A521C) (fp_text reference F3 (at 0 1.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.460208 0.290208) (xy 0.219791 0.530624) (xy 0.129199 0.440032) (xy 0 0.128116) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 90) (size 0.34 0.034) (layers F.Cu) (net 40 "Net-(F3-Pad1)") (clearance 0.000001)) (pad 2 smd rect (at 0.35202 0.422437 45) (size 0.034 0.34) (layers F.Cu) (net 41 "Net-(F3-Pad2)") (clearance 0.000001)) ) (module fmcw2:uwmiter_0.34_0.17_90 (layer F.Cu) (tedit 0) (tstamp 552A49B5) (at 152.6 112.35 270) (path /552A5618) (fp_text reference F1 (at 0 1.34 270) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 270) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.51 0.17) (xy 0.509999 0.51) (xy 0.3808 0.51) (xy 0 0.129199) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 270) (size 0.34 0.034) (layers F.Cu) (net 38 "Net-(F1-Pad1)") (clearance 0.000001)) (pad 2 smd rect (at 0.526999 0.34 270) (size 0.034 0.34) (layers F.Cu) (net 39 "Net-(F1-Pad2)") (clearance 0.000001)) ) (module fmcw2:uwmiter_0.34_0.17_90 (layer F.Cu) (tedit 0) (tstamp 552A49BC) (at 152.09 116.33) (path /552A56E8) (fp_text reference F2 (at 0 1.34) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.51 0.17) (xy 0.509999 0.51) (xy 0.3808 0.51) (xy 0 0.129199) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017) (size 0.34 0.034) (layers F.Cu) (net 39 "Net-(F1-Pad2)") (clearance 0.000001)) (pad 2 smd rect (at 0.526999 0.34) (size 0.034 0.34) (layers F.Cu) (net 45 "Net-(F2-Pad2)") (clearance 0.000001)) ) (module fmcw2:VQFN-24 (layer F.Cu) (tedit 55A406C6) (tstamp 551FA7F6) (at 151.15 100.2 270) (path /54FAAD5A) (fp_text reference U10 (at -0.025 0.05 540) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value HMC431LP4 (at 0 -5 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -2.25 1.75) (end -2.25 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2.25 2.25) (end -1.75 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2 -2) (end 2 -2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 -2) (end 2 2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 2) (end -2 2) (layer F.SilkS) (width 0.15)) (fp_line (start -2 2) (end -2 -2) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.25 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 2 smd rect (at -0.75 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 3 smd rect (at -0.25 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 4 smd rect (at 0.25 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 5 smd rect (at 0.75 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 6 smd rect (at 1.25 1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 13 smd rect (at 1.25 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 14 smd rect (at 0.75 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 15 smd rect (at 0.25 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 16 smd rect (at -0.25 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask) (net 29 "Net-(R9-Pad2)")) (pad 17 smd rect (at -0.75 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 18 smd rect (at -1.25 -1.9 270) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 19 smd rect (at -1.9 -1.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 20 smd rect (at -1.9 -0.75) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 21 smd rect (at -1.9 -0.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 22 smd rect (at -1.9 0.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask) (net 17 "Net-(C29-Pad1)")) (pad 23 smd rect (at -1.9 0.75) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 7 smd rect (at 1.9 1.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 8 smd rect (at 1.9 0.76) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 9 smd rect (at 1.9 0.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 10 smd rect (at 1.9 -0.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 11 smd rect (at 1.9 -0.75) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 12 smd rect (at 1.9 -1.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad 24 smd rect (at -1.9 1.25) (size 0.25 0.7) (layers F.Cu F.Paste F.Mask)) (pad PAD smd rect (at 0 0 270) (size 2.7 2.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad PAD thru_hole circle (at 0 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.5 -0.5 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -1 -1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 -1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 1 -1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.5 -0.5 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -1 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 1 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.5 0.5 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.5 0.5 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -1 1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 1 1 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) ) (module fmcw2:XFDFN-6 (layer F.Cu) (tedit 55A407B3) (tstamp 551FA800) (at 172.975 114.775 180) (path /54FAB1B7) (fp_text reference U11 (at -0.075 -5.275 180) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value SKY65404 (at 0 5 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start 0.075 -0.5) (end -0.3 -0.5) (layer F.SilkS) (width 0.15)) (fp_line (start -0.3 -0.5) (end -0.3 -0.275) (layer F.SilkS) (width 0.15)) (fp_line (start -0.025 1.25) (end -0.025 -0.25) (layer F.SilkS) (width 0.15)) (fp_line (start -0.025 -0.25) (end 1.475 -0.25) (layer F.SilkS) (width 0.15)) (fp_line (start 1.475 -0.25) (end 1.475 1.25) (layer F.SilkS) (width 0.15)) (fp_line (start 1.475 1.25) (end -0.025 1.25) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 27 "Net-(R8-Pad1)")) (pad 2 smd rect (at 0 0.5 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 0 1 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 18 "Net-(C31-Pad1)")) (pad 4 smd rect (at 1.45 1 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 51 "Net-(C52-Pad2)")) (pad 5 smd rect (at 1.45 0.5 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 6 smd rect (at 1.45 0 180) (size 0.35 0.25) (layers F.Cu F.Paste F.Mask) (net 22 "Net-(L2-Pad1)")) (pad PAD smd rect (at 0.725 0.5 180) (size 0.7 1.2) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad PAD smd rect (at 0.725 -0.125 180) (size 0.2 0.05) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad PAD smd rect (at 0.725 1.125 180) (size 0.2 0.05) (layers F.Cu F.Paste F.Mask) (net 2 GND)) ) (module fmcw2:PAT1220 (layer F.Cu) (tedit 53D14AD8) (tstamp 551FA80B) (at 158.1 99.95) (path /54FB1677) (fp_text reference U12 (at 0.75 -1.75) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value PAT1220-6dB (at 0.5 3) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.25 0) (end -0.25 1.25) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 1.25) (end 1.75 1.25) (layer F.SilkS) (width 0.15)) (fp_line (start 1.75 1.25) (end 1.75 0) (layer F.SilkS) (width 0.15)) (fp_line (start 1.75 0) (end -0.25 0) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0) (size 0.8 0.7) (layers F.Cu F.Paste F.Mask) (net 30 "Net-(R11-Pad1)")) (pad 2 smd rect (at 1.5 0) (size 0.8 0.7) (layers F.Cu F.Paste F.Mask) (net 33 "Net-(U12-Pad2)")) (pad 3 smd rect (at 0.75 1.2) (size 2.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) ) (module Housings_SOT-23_SOT-143_TSOT-6:SOT-23 (layer F.Cu) (tedit 54E9291B) (tstamp 551FA7C6) (at 171.9 107.8) (descr "SOT-23, Standard") (tags SOT-23) (path /551EE0A5) (attr smd) (fp_text reference U9 (at 0 -3.81) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value MCP1700 (at 0 3.81) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start 1.29916 -0.65024) (end 1.2509 -0.65024) (layer F.SilkS) (width 0.15)) (fp_line (start -1.49982 0.0508) (end -1.49982 -0.65024) (layer F.SilkS) (width 0.15)) (fp_line (start -1.49982 -0.65024) (end -1.2509 -0.65024) (layer F.SilkS) (width 0.15)) (fp_line (start 1.29916 -0.65024) (end 1.49982 -0.65024) (layer F.SilkS) (width 0.15)) (fp_line (start 1.49982 -0.65024) (end 1.49982 0.0508) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.95 1.00076) (size 0.8001 0.8001) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.95 1.00076) (size 0.8001 0.8001) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 3 smd rect (at 0 -0.99822) (size 0.8001 0.8001) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (model Housings_SOT-23_SOT-143_TSOT-6.3dshapes/SOT-23.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:5400BL15B050E (layer F.Cu) (tedit 55A4075C) (tstamp 551FA7BF) (at 165.96 113.7 180) (path /54FBB9A1) (fp_text reference U8 (at 0.585 -0.975 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 5400BL15B050E (at 0.05 -4 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 -0.3) (end -0.4 -1.6) (layer F.SilkS) (width 0.15)) (fp_line (start -0.4 -1.6) (end 1.6 -1.6) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 -1.6) (end 1.6 -0.3) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 -0.3) (end -0.4 -0.3) (layer F.SilkS) (width 0.15)) (fp_circle (center -0.5 -0.9) (end -0.4 -1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 52 "Net-(C54-Pad1)")) (pad 2 smd rect (at 0.65 0 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 1.3 0 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 15 "Net-(C25-Pad1)")) (pad 4 smd rect (at 1.3 -1.8 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 14 "Net-(C24-Pad1)")) (pad 5 smd rect (at 0.65 -1.8 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 6 smd rect (at 0 -1.8 180) (size 0.35 1) (layers F.Cu F.Paste F.Mask)) ) (module fmcw2:5400BL15B050E (layer F.Cu) (tedit 55A407C7) (tstamp 551FA76A) (at 153.1 116) (path /54FBCF6C) (fp_text reference U4 (at 0.425 3.6) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 5400BL15B050E (at 0.05 -4) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 -0.3) (end -0.4 -1.6) (layer F.SilkS) (width 0.15)) (fp_line (start -0.4 -1.6) (end 1.6 -1.6) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 -1.6) (end 1.6 -0.3) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 -0.3) (end -0.4 -0.3) (layer F.SilkS) (width 0.15)) (fp_circle (center -0.5 -0.9) (end -0.4 -1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 32 /LO)) (pad 2 smd rect (at 0.65 0) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 1.3 0) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 6 "Net-(C9-Pad2)")) (pad 4 smd rect (at 1.3 -1.8) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 12 "Net-(C12-Pad2)")) (pad 5 smd rect (at 0.65 -1.8) (size 0.35 1) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 6 smd rect (at 0 -1.8) (size 0.35 1) (layers F.Cu F.Paste F.Mask)) ) (module fmcw2:PAT1220 (layer F.Cu) (tedit 55A40711) (tstamp 551FA75B) (at 165.67 106 90) (path /551D3333) (fp_text reference U3 (at 0.775 0.68 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value PAT1220-6dB (at 0.5 3 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.25 0) (end -0.25 1.25) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 1.25) (end 1.75 1.25) (layer F.SilkS) (width 0.15)) (fp_line (start 1.75 1.25) (end 1.75 0) (layer F.SilkS) (width 0.15)) (fp_line (start 1.75 0) (end -0.25 0) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 90) (size 0.8 0.7) (layers F.Cu F.Paste F.Mask) (net 42 "Net-(F5-Pad2)")) (pad 2 smd rect (at 1.5 0 90) (size 0.8 0.7) (layers F.Cu F.Paste F.Mask) (net 43 "Net-(U3-Pad2)")) (pad 3 smd rect (at 0.75 1.2 90) (size 2.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) ) (module fmcw2:SG-210STF (layer F.Cu) (tedit 55A4084D) (tstamp 551FA750) (at 149.95 106.9) (path /551CC14C) (fp_text reference U2 (at -0.15 0) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value "SG-210STF 30MHz" (at 0.25 2.05) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.2 1.35) (end -1.65 1.35) (layer F.SilkS) (width 0.15)) (fp_line (start -1.65 1.35) (end -1.65 0.9) (layer F.SilkS) (width 0.15)) (fp_line (start -1.3 1) (end -1.3 -1) (layer F.SilkS) (width 0.15)) (fp_line (start -1.3 -1) (end 1.2 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 1.2 -1) (end 1.2 1) (layer F.SilkS) (width 0.15)) (fp_line (start 1.2 1) (end -1.3 1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.9 0.65) (size 1.1 0.9) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.8 0.65) (size 1.1 0.9) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 0.8 -0.65) (size 1.1 0.9) (layers F.Cu F.Paste F.Mask) (net 37 "Net-(C42-Pad2)")) (pad 4 smd rect (at -0.9 -0.65) (size 1.1 0.9) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) ) (module Capacitors_SMD:C_0402 (layer F.Cu) (tedit 55A4077C) (tstamp 551FA6A4) (at 171.4 116.35 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAF841) (attr smd) (fp_text reference L2 (at -0.75 1.25 360) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 0.6n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 22 "Net-(L2-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:coupler (layer F.Cu) (tedit 552AB814) (tstamp 552281B8) (at 169.94 101.62) (path /551D7C09) (fp_text reference Z1 (at -0.08 2) (layer F.SilkS) hide (effects (font (thickness 0.3))) ) (fp_text value "15dB COUPLER" (at 0 -2.18) (layer F.SilkS) hide (effects (font (thickness 0.3))) ) (fp_poly (pts (xy 4.383306 0.449919) (xy 4.212882 0.449919) (xy 4.042458 0.449919) (xy 4.042458 0.364707) (xy 4.042458 0.279495) (xy 0 0.279495) (xy -4.042459 0.279495) (xy -4.042459 0.548765) (xy -4.042459 0.818035) (xy -4.212883 0.818035) (xy -4.383307 0.818035) (xy -4.383307 0.570876) (xy -4.383307 0.323716) (xy -4.190684 0.131182) (xy -3.99806 -0.061353) (xy 0 -0.061353) (xy 3.99806 -0.061353) (xy 4.190683 0.131182) (xy 4.383306 0.323716) (xy 4.383306 0.386818) (xy 4.383306 0.449919) (xy 4.383306 0.449919)) (layer F.Cu) (width 0)) (fp_poly (pts (xy 4.996833 -0.477187) (xy 4.732774 -0.477187) (xy 4.468715 -0.477187) (xy 4.386813 -0.395898) (xy 4.304911 -0.314609) (xy 4.153379 -0.252742) (xy 4.001847 -0.190875) (xy -0.001559 -0.191168) (xy -4.004966 -0.191461) (xy -4.154939 -0.253036) (xy -4.304912 -0.314612) (xy -4.386814 -0.3959) (xy -4.468716 -0.477187) (xy -4.732775 -0.477187) (xy -4.996833 -0.477187) (xy -4.996833 -0.647611) (xy -4.996833 -0.818035) (xy -4.747806 -0.818035) (xy -4.498778 -0.818035) (xy -4.354126 -0.759157) (xy -4.209474 -0.700279) (xy -4.124168 -0.616001) (xy -4.038861 -0.531723) (xy 0 -0.531723) (xy 4.03886 -0.531723) (xy 4.124167 -0.616001) (xy 4.209474 -0.700279) (xy 4.354126 -0.759157) (xy 4.498778 -0.818035) (xy 4.747805 -0.818035) (xy 4.996833 -0.818035) (xy 4.996833 -0.647611) (xy 4.996833 -0.477187) (xy 4.996833 -0.477187)) (layer F.Cu) (width 0)) (pad 1 smd rect (at -4.97 -0.647 90) (size 0.34 0.034) (layers F.Cu) (net 34 "Net-(U14-Pad11)") (clearance 0.001)) (pad 2 smd rect (at 4.97 -0.647 90) (size 0.34 0.034) (layers F.Cu) (net 35 "Net-(U15-Pad1)") (clearance 0.001)) (pad 3 smd rect (at -4.213 0.8) (size 0.34 0.034) (layers F.Cu) (net 43 "Net-(U3-Pad2)") (clearance 0.001)) (pad 4 smd rect (at 4.212 0.42) (size 0.34 0.034) (layers F.Cu) (net 36 "Net-(R17-Pad2)") (clearance 0.001)) ) (module fmcw2:uwmiter_0.34_0.17_90 (layer F.Cu) (tedit 0) (tstamp 552FF38C) (at 152.76 116.84 90) (path /552FF9E8) (fp_text reference F7 (at 0 1.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_text value BEND (at 0 2.34 90) (layer F.SilkS) hide (effects (font (size 0.7 0.8) (thickness 0.15))) ) (fp_poly (pts (xy 0 0) (xy 0.34 0) (xy 0.34 0.17) (xy 0.51 0.17) (xy 0.509999 0.51) (xy 0.3808 0.51) (xy 0 0.129199) (xy 0 0)) (layer F.Cu) (width 0)) (pad 1 smd rect (at 0.17 -0.017 90) (size 0.34 0.034) (layers F.Cu) (net 45 "Net-(F2-Pad2)") (clearance 0.000001)) (pad 2 smd rect (at 0.526999 0.34 90) (size 0.034 0.34) (layers F.Cu) (net 32 /LO) (clearance 0.000001)) ) (module Capacitors_SMD:C_0402 (layer F.Cu) (tedit 55A4076A) (tstamp 5572FAA4) (at 166.91 113.015 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557309E0) (attr smd) (fp_text reference L3 (at 2.265 0.015 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value LQW15AN9N9J80D (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 53 "Net-(C54-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:SOT-416 (layer B.Cu) (tedit 55AA3095) (tstamp 5572FAAB) (at 170.075 104 270) (path /55324B1D) (fp_text reference Q1 (at -2.24 0.475 360) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_text value SSM3K15AFS (at 0 1.6 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.4 -0.8) (end -0.4 0.8) (layer B.SilkS) (width 0.15)) (fp_line (start -0.4 0.8) (end 0.4 0.8) (layer B.SilkS) (width 0.15)) (fp_line (start 0.4 0.8) (end 0.4 -0.8) (layer B.SilkS) (width 0.15)) (fp_line (start 0.4 -0.8) (end -0.4 -0.8) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.7 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 57 /PA_OFF)) (pad 2 smd rect (at 0.6 -0.5 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 3 smd rect (at 0.6 0.5 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 20 /BSW)) ) (module fmcw2:SOT-23-6 (layer F.Cu) (tedit 55A4076E) (tstamp 5572FAD3) (at 168.835 110.99) (path /5572F186) (fp_text reference U16 (at 0.09 -0.24 180) (layer F.SilkS) (effects (font (size 0.762 0.762) (thickness 0.0762))) ) (fp_text value HMC313 (at 0.0635 0) (layer F.SilkS) (effects (font (size 0.50038 0.50038) (thickness 0.0762))) ) (fp_circle (center -1.1 0.5) (end -1 0.2) (layer F.SilkS) (width 0.15)) (fp_line (start -1.5 0.9) (end -1.5 -0.8) (layer F.SilkS) (width 0.15)) (fp_line (start -1.5 -0.8) (end 1.5 -0.8) (layer F.SilkS) (width 0.15)) (fp_line (start 1.5 -0.8) (end 1.5 0.9) (layer F.SilkS) (width 0.15)) (fp_line (start 1.5 0.9) (end -1.5 0.9) (layer F.SilkS) (width 0.15)) (pad 6 smd rect (at -0.9525 -1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 5 smd rect (at 0 -1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 4 smd rect (at 0.9525 -1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 0.9525 1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 50 "Net-(C52-Pad1)")) (pad 2 smd rect (at 0 1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 1 smd rect (at -0.9525 1.27) (size 0.70104 1.00076) (layers F.Cu F.Paste F.Mask) (net 53 "Net-(C54-Pad2)")) (model smd/SOT23_6.wrl (at (xyz 0 0 0)) (scale (xyz 0.11 0.11 0.11)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:LED_0603 (layer F.Cu) (tedit 55A407BE) (tstamp 557DB0BE) (at 140.05 97.95 90) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /557E0B12) (attr smd) (fp_text reference D1 (at 0.275 -2.7 90) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LED (at 0 1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 0.6) (end 0.3 0) (layer F.SilkS) (width 0.15)) (fp_line (start 0.3 0) (end -0.4 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 54 "Net-(D1-Pad1)")) (pad 2 smd rect (at 0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module Capacitors_SMD:C_0402 (layer B.Cu) (tedit 55A40837) (tstamp 55840621) (at 157.61 109.51 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55842066) (attr smd) (fp_text reference L4 (at 0.485 1.01 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.2u (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 56 /IF+)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 65 "Net-(C55-Pad1)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module Capacitors_SMD:C_0402 (layer B.Cu) (tedit 55A40835) (tstamp 55840627) (at 157.61 110.46 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /558422BF) (attr smd) (fp_text reference L5 (at 0.81 -0.965 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.2u (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 55 /IF-)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 66 "Net-(C55-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:SOT-23-5L (layer F.Cu) (tedit 55A408E3) (tstamp 55841441) (at 141.625 113.35 180) (path /5585B6AE) (fp_text reference U19 (at 1.025 -1.225 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LDS3985 (at 0.7 -3.6 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.5 -0.4) (end -0.5 -2) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 -2) (end 2.5 -2) (layer F.SilkS) (width 0.15)) (fp_line (start 2.5 -2) (end 2.5 -0.4) (layer F.SilkS) (width 0.15)) (fp_line (start 2.5 -0.4) (end -0.5 -0.4) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 180) (size 0.6 1.2) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.95 0 180) (size 0.6 1.2) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 1.9 0 180) (size 0.6 1.2) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 4 smd rect (at 1.9 -2.3 180) (size 0.6 1.2) (layers F.Cu F.Paste F.Mask) (net 81 "Net-(C67-Pad1)")) (pad 5 smd rect (at 0 -2.3 180) (size 0.6 1.2) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) ) (module Housings_SSOP:SSOP-16_3.9x4.9mm_Pitch0.635mm (layer F.Cu) (tedit 55A408AF) (tstamp 5592DED3) (at 146.65 114.9 180) (descr "SSOP16: plastic shrink small outline package; 16 leads; body width 3.9 mm; lead pitch 0.635; (see NXP SSOP-TSSOP-VSO-REFLOW.pdf and sot519-1_po.pdf)") (tags "SSOP 0.635") (path /5592FA6E) (attr smd) (fp_text reference U5 (at -0.075 -0.05 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LT6232 (at 0 3.5 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -3.45 -2.75) (end -3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 3.45 -2.75) (end 3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -3.45 -2.75) (end 3.45 -2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -3.45 2.75) (end 3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -2 2.6475) (end 2 2.6475) (layer F.SilkS) (width 0.15)) (fp_line (start -3.275 -2.6475) (end 2 -2.6475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -2.6 -2.2225 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 70 "Net-(C59-Pad2)")) (pad 2 smd rect (at -2.6 -1.5875 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 75 "Net-(C64-Pad2)")) (pad 3 smd rect (at -2.6 -0.9525 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) (pad 4 smd rect (at -2.6 -0.3175 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 5 smd rect (at -2.6 0.3175 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) (pad 6 smd rect (at -2.6 0.9525 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 76 "Net-(C65-Pad2)")) (pad 7 smd rect (at -2.6 1.5875 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 72 "Net-(C60-Pad2)")) (pad 8 smd rect (at -2.6 2.2225 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask)) (pad 9 smd rect (at 2.6 2.2225 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask)) (pad 10 smd rect (at 2.6 1.5875 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 77 /IFF-)) (pad 11 smd rect (at 2.6 0.9525 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 80 "Net-(R29-Pad1)")) (pad 12 smd rect (at 2.6 0.3175 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 74 "Net-(C62-Pad1)")) (pad 13 smd rect (at 2.6 -0.3175 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 14 smd rect (at 2.6 -0.9525 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 73 "Net-(C61-Pad1)")) (pad 15 smd rect (at 2.6 -1.5875 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 79 "Net-(R28-Pad1)")) (pad 16 smd rect (at 2.6 -2.2225 180) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 78 /IFF+)) (model Housings_SSOP.3dshapes/SSOP-16_3.9x4.9mm_Pitch0.635mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:MGA-25203 (layer F.Cu) (tedit 55A4070C) (tstamp 551FA82F) (at 163.1 101.225) (path /5519A425) (fp_text reference U14 (at -0.025 0.025) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value MGA-25203 (at 0 -3.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.375 -1.725) (end -1.7 -1.725) (layer F.SilkS) (width 0.15)) (fp_line (start -1.7 -1.725) (end -1.7 -1.4) (layer F.SilkS) (width 0.15)) (fp_line (start -1.5 1.5) (end -1.5 -1.5) (layer F.SilkS) (width 0.15)) (fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.SilkS) (width 0.15)) (fp_line (start 1.5 -1.5) (end 1.5 1.5) (layer F.SilkS) (width 0.15)) (fp_line (start 1.5 1.5) (end -1.5 1.5) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.325 -0.75) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 33 "Net-(U12-Pad2)")) (pad 4 smd rect (at -1.325 0.75) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 19 "Net-(C32-Pad1)")) (pad 2 smd rect (at -1.325 -0.25) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2)) (pad 3 smd rect (at -1.325 0.25) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2)) (pad 5 smd rect (at -0.75 1.325 90) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (pad 6 smd rect (at -0.25 1.325 90) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 20 /BSW)) (pad 7 smd rect (at 0.25 1.325 90) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask)) (pad 8 smd rect (at 0.75 1.325 90) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask)) (pad 9 smd rect (at 1.325 0.75) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask)) (pad 10 smd rect (at 1.325 0.25) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 11 smd rect (at 1.325 -0.25) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 34 "Net-(U14-Pad11)")) (pad 12 smd rect (at 1.325 -0.75) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 13 smd rect (at 0.75 -1.325 270) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (pad 14 smd rect (at 0.25 -1.325 270) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 15 smd rect (at -0.25 -1.325 270) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask)) (pad 16 smd rect (at -0.75 -1.325 270) (size 0.55 0.2) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2)) (pad EP smd rect (at 0 0) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad EP thru_hole circle (at -0.4 -0.4) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad EP thru_hole circle (at 0.4 -0.4) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad EP thru_hole circle (at -0.4 0.4) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad EP thru_hole circle (at 0.4 0.4) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40849) (tstamp 55A421C3) (at 147.8 105.75 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /551CD660) (attr smd) (fp_text reference C1 (at 0.4 -1.2 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4086A) (tstamp 55A421C8) (at 153.95 102.75 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAB845) (attr smd) (fp_text reference C2 (at 1.15 1.075 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40862) (tstamp 55A421CD) (at 152.65 103.55 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAB814) (attr smd) (fp_text reference C3 (at 0.75 -0.975 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10p (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40855) (tstamp 55A421D2) (at 151.75 104.65 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAB968) (attr smd) (fp_text reference C4 (at 1.275 0.775 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40865) (tstamp 55A421D7) (at 151.65 105.4 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAB91A) (attr smd) (fp_text reference C5 (at 0.125 0.925 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10p (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4083D) (tstamp 55A421DC) (at 159.85 106.3) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FABD07) (attr smd) (fp_text reference C6 (at -0.075 0.65) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40188) (tstamp 55A421E1) (at 159.5 106.3) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FABCC1) (attr smd) (fp_text reference C7 (at 0 -1.7) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10p (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4072C) (tstamp 55A421E6) (at 156.2 103.1 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAC816) (attr smd) (fp_text reference C8 (at -0.125 -1.025 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 4 "Net-(C8-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407F5) (tstamp 55A421EB) (at 156.15 115.3 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FBFE64) (attr smd) (fp_text reference C9 (at 0.875 -1.875 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 5 "Net-(C9-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 6 "Net-(C9-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A406A2) (tstamp 55A421F0) (at 141.6 98.95 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FACE38) (attr smd) (fp_text reference C10 (at -1.875 0.2 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 7 "Net-(C10-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 8 "Net-(C10-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4085F) (tstamp 55A421F5) (at 155.45 103.1 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAE276) (attr smd) (fp_text reference C11 (at 0.175 1.25 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 9 "Net-(C11-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 10 "Net-(C11-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40801) (tstamp 55A421FA) (at 156.15 114.15 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FBFC85) (attr smd) (fp_text reference C12 (at 0.425 -2.025 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 11 "Net-(C12-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 12 "Net-(C12-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55AA34F5) (tstamp 55A421FF) (at 142.85 98.95 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /551C586A) (attr smd) (fp_text reference C14 (at 1.78 -0.4 450) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 7 "Net-(C10-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407F1) (tstamp 55A42204) (at 156.9 117.35) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FC08CD) (attr smd) (fp_text reference C15 (at 0.275 0.975) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A42209) (at 156.9 117.35 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556D4DE9) (attr smd) (fp_text reference C16 (at 0 1.7 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A4220E) (at 156.4 112.3 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CC82A) (attr smd) (fp_text reference C17 (at 0 1.7 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40900) (tstamp 55A42213) (at 158.45 111.35 45) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CC5EB) (attr smd) (fp_text reference C18 (at 0.548008 0.866206 45) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 45) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 45) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0 45) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4090D) (tstamp 55A42218) (at 163.35 111.3) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556C7D66) (attr smd) (fp_text reference C19 (at 1.65 0.2 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A407CE) (tstamp 55A4221D) (at 159.35 117.35 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CE3F6) (attr smd) (fp_text reference C20 (at 0.025 1.125 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 46 "Net-(C20-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A406D6) (tstamp 55A42222) (at 147.75 100.35 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /551C1B93) (attr smd) (fp_text reference C21 (at -1.55 -0.3 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 13 /10V)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407D6) (tstamp 55A42227) (at 163.14 115.2 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FBF1D8) (attr smd) (fp_text reference C24 (at -0.735 -2.25 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 14 "Net-(C24-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 47 /RFIN)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407E7) (tstamp 55A4222C) (at 163.15 114.33 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FBF13F) (attr smd) (fp_text reference C25 (at -1.925 -2.22 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 15 "Net-(C25-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 48 /RFIP)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A40701) (tstamp 55A42231) (at 149.95 96.95 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /54FAD91A) (attr smd) (fp_text reference C26 (at 2.05 -0.075 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A4074F) (tstamp 55A42236) (at 169.65 105.8 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /551EE94F) (attr smd) (fp_text reference C27 (at 0.1 1.175 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40681) (tstamp 55A4223B) (at 152.5 97.2) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAD983) (attr smd) (fp_text reference C28 (at 2.275 -0.425) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A406C0) (tstamp 55A42240) (at 148.9 99.8 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /551C3BFE) (attr smd) (fp_text reference C29 (at 1.55 0.35 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 18p (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 17 "Net-(C29-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A40754) (tstamp 55A42245) (at 174.55 107.95 90) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /551EEE4B) (attr smd) (fp_text reference C30 (at 1.2 -1.725 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 2 smd rect (at 0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4079E) (tstamp 55A4224A) (at 173.75 113.05 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FB0546) (attr smd) (fp_text reference C31 (at 2.225 -0.35 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 0.5p (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 18 "Net-(C31-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40188) (tstamp 55A4224F) (at 159.15 103.65 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5519DF9B) (attr smd) (fp_text reference C32 (at 0 -1.7 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 19 "Net-(C32-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A42254) (at 160.25 101.3 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5519DF17) (attr smd) (fp_text reference C33 (at 0 1.7 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100p (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 19 "Net-(C32-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40724) (tstamp 55A42259) (at 159.75 102.7 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5519DDD7) (attr smd) (fp_text reference C34 (at -0.575 1.25 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 19 "Net-(C32-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40793) (tstamp 55A4225E) (at 169.7 116.9 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /54FAF898) (attr smd) (fp_text reference C35 (at 0.05 -1.1 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4087B) (tstamp 55A42263) (at 164.1 103.2) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /551A0060) (attr smd) (fp_text reference C36 (at 1.625 -0.775) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100p (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 20 /BSW)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A401E5) (tstamp 55A42268) (at 168.05 98.075 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5519CE33) (attr smd) (fp_text reference C37 (at 0 -1.425 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value DNP (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer B.Cu) (tedit 55A40719) (tstamp 55A4226D) (at 163.6 105.4 90) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /5519CDB1) (attr smd) (fp_text reference C38 (at 0.125 1.475 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10u (at 0 -2.1 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.8 1) (end 1.8 1) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end 1.8 -1) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end -1.8 -1) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.8 1) (end 1.8 -1) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.5 0.85) (end -0.5 0.85) (layer B.SilkS) (width 0.15)) (fp_line (start -0.5 -0.85) (end 0.5 -0.85) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 90) (size 1 1.25) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 2 smd rect (at 1 0 90) (size 1 1.25) (layers B.Cu B.Paste B.Mask) (net 21 "Net-(C37-Pad2)")) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A4067F) (tstamp 55A42272) (at 161.85 98.075) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5519CD31) (attr smd) (fp_text reference C39 (at 0 -1.125) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4071D) (tstamp 55A42277) (at 161.575 103.6) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5519CCA0) (attr smd) (fp_text reference C40 (at 0.35 1.45 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40881) (tstamp 55A4227C) (at 164.625 98.75 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5519EE3F) (attr smd) (fp_text reference C41 (at -0.9 -0.875 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 "Net-(C37-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40859) (tstamp 55A42281) (at 152.35 106.25 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5522DA50) (attr smd) (fp_text reference C42 (at 0.1 -0.975 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 470p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /OSC_REF)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 37 "Net-(C42-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4083B) (tstamp 55A42286) (at 160.3 107.55) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /552AB842) (attr smd) (fp_text reference C43 (at 1.55 0.325 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40782) (tstamp 55A4228B) (at 159.36 117.36 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CE2A3) (attr smd) (fp_text reference C44 (at -1.265 -0.865 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 46 "Net-(C20-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A407CA) (tstamp 55A42290) (at 162.05 117.64) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CEF31) (attr smd) (fp_text reference C47 (at 0.125 0.885) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 49 "Net-(C47-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407E2) (tstamp 55A42295) (at 162.05 117.64) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CEF2B) (attr smd) (fp_text reference C48 (at 0.625 -0.715) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 49 "Net-(C47-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A407DA) (tstamp 55A4229A) (at 163 116.25) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CB19B) (attr smd) (fp_text reference C49 (at 0.175 -2.6) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40910) (tstamp 55A4229F) (at 163.075 110.525) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556C7C47) (attr smd) (fp_text reference C50 (at 1.55 -0.75) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40909) (tstamp 55A422A4) (at 163.01 112.76) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /556CA852) (attr smd) (fp_text reference C51 (at 0.815 -0.585) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40774) (tstamp 55A422A9) (at 170.65 112.96 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55730E18) (attr smd) (fp_text reference C52 (at -0.71 -0.975 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 50 "Net-(C52-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 51 "Net-(C52-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40799) (tstamp 55A422AE) (at 168.235 114.04 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557326A2) (attr smd) (fp_text reference C53 (at -0.115 -1.085 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4075F) (tstamp 55A422B3) (at 166.04 112.3 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55731440) (attr smd) (fp_text reference C54 (at 1.875 -0.09 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2p (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 52 "Net-(C54-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 53 "Net-(C54-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4080B) (tstamp 55A422B8) (at 155.98 110.05 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /558423BD) (attr smd) (fp_text reference C55 (at -1.6 1.705 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.2n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 65 "Net-(C55-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 66 "Net-(C55-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer B.Cu) (tedit 55AA30B6) (tstamp 55A422BD) (at 154.32 109.54) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55842F32) (attr smd) (fp_text reference C56 (at 0.04 3.06) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 330n (at 0 -1.9) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end -1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.45 0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.35 0.6) (end 0.35 0.6) (layer B.SilkS) (width 0.15)) (fp_line (start 0.35 -0.6) (end -0.35 -0.6) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 67 "Net-(C56-Pad1)")) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 65 "Net-(C55-Pad1)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer B.Cu) (tedit 55A401E5) (tstamp 55A422C2) (at 154.31 110.46) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55842DB6) (attr smd) (fp_text reference C57 (at 0 1.425) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 330n (at 0 -1.9) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end -1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.45 0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.35 0.6) (end 0.35 0.6) (layer B.SilkS) (width 0.15)) (fp_line (start 0.35 -0.6) (end -0.35 -0.6) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 68 "Net-(C57-Pad1)")) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 66 "Net-(C55-Pad2)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A422C7) (at 151.15 114.6 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5584601A) (attr smd) (fp_text reference C58 (at 0 1.7 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408C7) (tstamp 55A422CC) (at 146.65 116.15 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5584A310) (attr smd) (fp_text reference C59 (at 1.175 -0.825 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 470p (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 69 "Net-(C59-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 70 "Net-(C59-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4089D) (tstamp 55A422D1) (at 146.7 113.45 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5584A4A1) (attr smd) (fp_text reference C60 (at 1.225 0.2 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 470p (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 71 "Net-(C60-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 72 "Net-(C60-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408BA) (tstamp 55A422D6) (at 144.9 115.95) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5584AD7A) (attr smd) (fp_text reference C61 (at 0.575 -0.85) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 470p (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 73 "Net-(C61-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 69 "Net-(C59-Pad1)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408C1) (tstamp 55A422DB) (at 144.9 114.1) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5584AF04) (attr smd) (fp_text reference C62 (at -0.425 0.725) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 470p (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 74 "Net-(C62-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 71 "Net-(C60-Pad1)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408AB) (tstamp 55A422E0) (at 148.3 116.5 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55856D56) (attr smd) (fp_text reference C64 (at -1.475 0.2 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10p (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 70 "Net-(C59-Pad2)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 75 "Net-(C64-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4089F) (tstamp 55A422E5) (at 148.15 113.35 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55856B9A) (attr smd) (fp_text reference C65 (at -1.3 -0.2 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10p (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 72 "Net-(C60-Pad2)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 76 "Net-(C65-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408EA) (tstamp 55A422EA) (at 141 113.425 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5585D5B3) (attr smd) (fp_text reference C66 (at 0.8 0.95 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A408D9) (tstamp 55A422EF) (at 140.675 115.925) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5585BC2A) (attr smd) (fp_text reference C67 (at -0.375 1.1 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10n (at 0 -1.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 81 "Net-(C67-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A408DC) (tstamp 55A422F4) (at 141.35 117.075 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5585BA65) (attr smd) (fp_text reference C68 (at 1.275 -1.15 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A401B2) (tstamp 55A422F9) (at 160.05 104.95) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FAC988) (attr smd) (fp_text reference R1 (at 0 -1.4) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 5.49k (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 23 "Net-(R1-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A422FE) (at 141.88 99.88 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FACF33) (attr smd) (fp_text reference R2 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 750 (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 8 "Net-(C10-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 24 "Net-(R2-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40913) (tstamp 55A42303) (at 160.925 110.525) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /556C5B94) (attr smd) (fp_text reference R3 (at -0.325 0) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 49.9 (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 55 /IF-)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A406A6) (tstamp 55A42308) (at 142.05 100.8) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FACFD7) (attr smd) (fp_text reference R4 (at -0.025 1.35) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2k (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 8 "Net-(C10-Pad2)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A4230D) (at 145.3 100.24) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551C4A31) (attr smd) (fp_text reference R5 (at 0 1.4) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 25 "Net-(R5-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A42312) (at 145.28 99.13 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551C477A) (attr smd) (fp_text reference R6 (at 0 1.4 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 26 "Net-(R6-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 25 "Net-(R5-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A42317) (at 147.35 99.15 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551C3AF7) (attr smd) (fp_text reference R7 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 17 "Net-(C29-Pad1)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 26 "Net-(R6-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40796) (tstamp 55A4231C) (at 172.8 116.2 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FB095E) (attr smd) (fp_text reference R8 (at 1.6 0.075 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100 (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 27 "Net-(R8-Pad1)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 16 /3V0)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40735) (tstamp 55A42321) (at 154.5 99.95 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FADE32) (attr smd) (fp_text reference R9 (at 0.125 1.025 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 18 (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 28 "Net-(R11-Pad2)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 29 "Net-(R9-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A42326) (at 159.25 103.65 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5519F3AC) (attr smd) (fp_text reference R10 (at 0 1.4 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 6.98k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 19 "Net-(C32-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A4073F) (tstamp 55A4232B) (at 156.45 99.95 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FADEF5) (attr smd) (fp_text reference R11 (at 0 1.3 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 18 (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 30 "Net-(R11-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 28 "Net-(R11-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A4073C) (tstamp 55A42330) (at 155.45 101.1 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /54FADF4C) (attr smd) (fp_text reference R12 (at 0.425 -1.775 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 18 (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 28 "Net-(R11-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 9 "Net-(C11-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A42335) (at 163.03 116.82 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /556D26D0) (attr smd) (fp_text reference R13 (at 0 1.4 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 46 "Net-(C20-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 49 "Net-(C47-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A4233A) (at 160.15 102.6) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5519F7F5) (attr smd) (fp_text reference R14 (at 0 1.4) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 39k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 19 "Net-(C32-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40875) (tstamp 55A4233F) (at 159.95 98.65 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551F70C0) (attr smd) (fp_text reference R15 (at -1.725 -0.05 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 0 (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 21 "Net-(C37-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40871) (tstamp 55A42344) (at 158.6 98.65 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551F721E) (attr smd) (fp_text reference R16 (at -1.7 0.2 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 21 "Net-(C37-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55AA3089) (tstamp 55A42349) (at 174.12 102.72 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /552295DA) (attr smd) (fp_text reference R17 (at 1.1 -1.16 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 49.9 (at 0 1.8 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 36 "Net-(R17-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55AA309D) (tstamp 55A4234E) (at 170.425 105.875 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551F0348) (attr smd) (fp_text reference R18 (at 0.515 -1.265 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 8.25k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 20 /BSW)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55AA30A3) (tstamp 55A42353) (at 168.6 104.125 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /551F047B) (attr smd) (fp_text reference R19 (at 0.125 -1.1 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 20 /BSW)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40905) (tstamp 55A42358) (at 161.69 111.32 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /556C6671) (attr smd) (fp_text reference R20 (at 0.565 -0.755 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 49.9 (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 56 /IF+)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A4235D) (at 162.9 115.7) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /556D0F9D) (attr smd) (fp_text reference R21 (at 0 1.4) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 46 "Net-(C20-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A407D3) (tstamp 55A42362) (at 164.3 115.7) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /556D10BE) (attr smd) (fp_text reference R22 (at 0.4 1.25 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 46 "Net-(C20-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A4068A) (tstamp 55A42367) (at 140 100.45 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /557E1095) (attr smd) (fp_text reference R23 (at -2 -0.2 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 549 (at 0 1.8 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 54 "Net-(D1-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40809) (tstamp 55A4236C) (at 152.39 109.54) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584433C) (attr smd) (fp_text reference R24 (at -1.515 0.21 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 549 (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 "Net-(C64-Pad2)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 67 "Net-(C56-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40806) (tstamp 55A42371) (at 152.4 110.5) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55844592) (attr smd) (fp_text reference R25 (at -1.05 1.075) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 549 (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 76 "Net-(C65-Pad2)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 68 "Net-(C57-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408B3) (tstamp 55A42376) (at 144.85 116.8) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584DD0A) (attr smd) (fp_text reference R26 (at 1.3 0.6) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 910 (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 78 /IFF+)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 69 "Net-(C59-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40890) (tstamp 55A4237B) (at 144.85 113.3 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584DF2F) (attr smd) (fp_text reference R27 (at -1.15 1.525 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 910 (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 71 "Net-(C60-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 77 /IFF-)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408D0) (tstamp 55A42380) (at 142.25 117.95 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5585112C) (attr smd) (fp_text reference R28 (at 0.45 0.825 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 79 "Net-(R28-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 82 /2V5)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A408EF) (tstamp 55A42385) (at 142.31 112.06 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5585397A) (attr smd) (fp_text reference R29 (at 0.175 -1.075 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 1k (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 80 "Net-(R29-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408CC) (tstamp 55A4238A) (at 143.35 115.75 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584B249) (attr smd) (fp_text reference R30 (at 0.6 -0.95 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 130 (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 73 "Net-(C61-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 82 /2V5)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A4238F) (at 143.35 114.25 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584B42C) (attr smd) (fp_text reference R31 (at 0 1.4 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 130 (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 82 /2V5)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 74 "Net-(C62-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A42394) (at 143.85 117.95 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /558512EC) (attr smd) (fp_text reference R32 (at 0 1.4 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.99k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 78 /IFF+)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 79 "Net-(R28-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408F1) (tstamp 55A42399) (at 143.95 112.7 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55852B38) (attr smd) (fp_text reference R33 (at -0.05 1.2 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.99k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 77 /IFF-)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 80 "Net-(R29-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408A8) (tstamp 55A4239E) (at 149.25 116.6 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55856708) (attr smd) (fp_text reference R34 (at -0.075 1.7 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 70 "Net-(C59-Pad2)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 "Net-(C64-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A408A2) (tstamp 55A423A3) (at 149.05 113.45 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55856908) (attr smd) (fp_text reference R35 (at -0.6 -1.225 540) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 72 "Net-(C60-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 76 "Net-(C65-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55AA34EA) (tstamp 55A423A8) (at 143.525 97 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584DAA8) (attr smd) (fp_text reference R36 (at 1.385 0.04 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 0 (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 84 "Net-(R36-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 7 "Net-(C10-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A406B7) (tstamp 55A423AD) (at 145.225 97) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5584DC57) (attr smd) (fp_text reference R37 (at 1.35 -0.1 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value DNP (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 84 "Net-(R36-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 83 /VTUNE)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A401B2) (tstamp 55A423B2) (at 140.78 110.79 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559443A1) (attr smd) (fp_text reference R38 (at 0 -1.4 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10k (at 0 1.8 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 82 /2V5)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55AA3091) (tstamp 55A423B7) (at 172.55 104.7 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55A23ED1) (attr smd) (fp_text reference R39 (at -0.03 -0.99 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 47k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 57 /PA_OFF)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55AA3098) (tstamp 55A423BC) (at 171.7 103.19) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55A2408C) (attr smd) (fp_text reference R40 (at 0.01 -1.07) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 57 /PA_OFF)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:VFQFN-24 (layer F.Cu) (tedit 55A67B47) (tstamp 551FA7A3) (at 159.65 114.65 270) (path /556BF1C9) (fp_text reference U6 (at 0.095 5.025 360) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value ADL5801 (at 0 -5 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -2.25 1.75) (end -2.25 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2.25 2.25) (end -1.75 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2 -2) (end 2 -2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 -2) (end 2 2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 2) (end -2 2) (layer F.SilkS) (width 0.15)) (fp_line (start -2 2) (end -2 -2) (layer F.SilkS) (width 0.15)) (pad 1 smd oval (at -1.25 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd oval (at -0.75 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd oval (at -0.25 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 11 "Net-(C12-Pad1)")) (pad 4 smd oval (at 0.25 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 5 "Net-(C9-Pad1)")) (pad 5 smd oval (at 0.75 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 6 smd oval (at 1.25 1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 13 smd oval (at 1.25 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 14 smd oval (at 0.75 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 15 smd oval (at 0.25 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 47 /RFIN)) (pad 16 smd oval (at -0.25 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 48 /RFIP)) (pad 17 smd oval (at -0.75 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 18 smd oval (at -1.25 -1.8 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 19 smd oval (at -1.8 -1.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 20 smd oval (at -1.8 -0.75) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 56 /IF+)) (pad 21 smd oval (at -1.8 -0.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 55 /IF-)) (pad 22 smd oval (at -1.8 0.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask)) (pad 23 smd oval (at -1.8 0.75) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 7 smd oval (at 1.8 1.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 8 smd oval (at 1.8 0.76) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 9 smd oval (at 1.8 0.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 64 /MIX_ENBL)) (pad 10 smd oval (at 1.8 -0.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 46 "Net-(C20-Pad1)")) (pad 11 smd oval (at 1.8 -0.75) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 49 "Net-(C47-Pad1)")) (pad 12 smd oval (at 1.8 -1.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 24 smd oval (at -1.8 1.25) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad PAD smd rect (at 0 0 270) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad PAD thru_hole circle (at 0 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 -0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 -0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 -0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 0 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 0.65 270) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) ) (module fmcw2:VFQFN-24 (layer F.Cu) (tedit 55A67B47) (tstamp 551FA742) (at 156.2 106.55 180) (path /54FAADA7) (fp_text reference U1 (at 0.095 5.025 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value ADF4158 (at 0 -5 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -2.25 1.75) (end -2.25 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2.25 2.25) (end -1.75 2.25) (layer F.SilkS) (width 0.15)) (fp_line (start -2 -2) (end 2 -2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 -2) (end 2 2) (layer F.SilkS) (width 0.15)) (fp_line (start 2 2) (end -2 2) (layer F.SilkS) (width 0.15)) (fp_line (start -2 2) (end -2 -2) (layer F.SilkS) (width 0.15)) (pad 1 smd oval (at -1.25 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd oval (at -0.75 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd oval (at -0.25 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 4 smd oval (at 0.25 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 4 "Net-(C8-Pad2)")) (pad 5 smd oval (at 0.75 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 10 "Net-(C11-Pad2)")) (pad 6 smd oval (at 1.25 1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 13 smd oval (at 1.25 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 58 /ADF_CE)) (pad 14 smd oval (at 0.75 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 59 /ADF_CLK)) (pad 15 smd oval (at 0.25 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 60 /ADF_DATA)) (pad 16 smd oval (at -0.25 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 61 /ADF_LE)) (pad 17 smd oval (at -0.75 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 62 /ADF_MUXOUT)) (pad 18 smd oval (at -1.25 -1.8 180) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 19 smd oval (at -1.8 -1.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 20 smd oval (at -1.8 -0.75 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 24 "Net-(R2-Pad2)")) (pad 21 smd oval (at -1.8 -0.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask)) (pad 22 smd oval (at -1.8 0.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 3 /5V)) (pad 23 smd oval (at -1.8 0.75 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 23 "Net-(R1-Pad1)")) (pad 7 smd oval (at 1.8 1.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 8 smd oval (at 1.8 0.76 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (pad 9 smd oval (at 1.8 0.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 31 /OSC_REF)) (pad 10 smd oval (at 1.8 -0.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 11 smd oval (at 1.8 -0.75 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 12 smd oval (at 1.8 -1.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 63 /ADF_TXDATA)) (pad 24 smd oval (at -1.8 1.25 270) (size 0.3 0.7) (layers F.Cu F.Paste F.Mask) (net 7 "Net-(C10-Pad1)")) (pad PAD smd rect (at 0 0 180) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad PAD thru_hole circle (at 0 0 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 -0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0 0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 0 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at 0.65 -0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 -0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 0 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) (pad PAD thru_hole circle (at -0.65 0.65 180) (size 0.3 0.3) (drill 0.3) (layers *.Cu F.SilkS F.Mask) (net 2 GND) (zone_connect 2)) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A401E5) (tstamp 55A6853E) (at 144.2 104.975) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55A69485) (attr smd) (fp_text reference C13 (at 0 -1.425) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 1u (at 0 1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 /3V3)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module "fmcw2:DF12B(5.0)-30DP-0.5V(86)" (layer B.Cu) (tedit 55A6952B) (tstamp 55A6AE84) (at 142.75 106.75 270) (path /559CA596) (fp_text reference P1 (at 0.2 0 270) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_text value CONN_15X2 (at -0.3 3.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start 5.25 -1.2) (end 4.85 -1.2) (layer B.SilkS) (width 0.15)) (fp_line (start 5.25 1.2) (end 4.85 1.2) (layer B.SilkS) (width 0.15)) (fp_line (start -5.25 -1.2) (end -4.85 -1.2) (layer B.SilkS) (width 0.15)) (fp_line (start -5.25 1.2) (end -4.85 1.2) (layer B.SilkS) (width 0.15)) (fp_line (start -5.25 1.2) (end -5.25 -1.2) (layer B.SilkS) (width 0.15)) (fp_line (start 5.25 1.2) (end 5.25 -1.2) (layer B.SilkS) (width 0.15)) (fp_line (start 4.85 -2.325) (end -4.85 -2.3) (layer B.SilkS) (width 0.15)) (fp_line (start -4.85 2.3) (end 4.85 2.3) (layer B.SilkS) (width 0.15)) (fp_line (start 4.85 2.3) (end 4.85 -2.3) (layer B.SilkS) (width 0.15)) (fp_line (start -4.85 2.3) (end -4.85 -2.3) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -3.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 2 smd rect (at -3 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 83 /VTUNE)) (pad 3 smd rect (at -2.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 4 smd rect (at -2 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 5 smd rect (at -1.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 /3V3)) (pad 6 smd rect (at -1 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 7 smd rect (at -0.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 8 smd rect (at 0 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 64 /MIX_ENBL)) (pad 9 smd rect (at 0.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 57 /PA_OFF)) (pad 10 smd rect (at 1 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 58 /ADF_CE)) (pad 11 smd rect (at 1.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 61 /ADF_LE)) (pad 12 smd rect (at 2 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 63 /ADF_TXDATA)) (pad 13 smd rect (at 2.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 60 /ADF_DATA)) (pad 14 smd rect (at 3 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 59 /ADF_CLK)) (pad 15 smd rect (at 3.5 -1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 62 /ADF_MUXOUT)) (pad 16 smd rect (at 3.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 17 smd rect (at 3 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 18 smd rect (at 2.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 78 /IFF+)) (pad 19 smd rect (at 2 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 77 /IFF-)) (pad 20 smd rect (at 1.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 21 smd rect (at 1 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 22 smd rect (at 0.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 13 /10V)) (pad 23 smd rect (at 0 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 24 smd rect (at -0.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 25 smd rect (at -1 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) (pad 26 smd rect (at -1.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 27 smd rect (at -2 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 28 smd rect (at -2.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 29 smd rect (at -3 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 3 /5V)) (pad 30 smd rect (at -3.5 1.8 270) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 GND)) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A8063F) (tstamp 55A80D29) (at 141.78 104.68 270) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55A8E633) (attr smd) (fp_text reference C22 (at 0 -1.675 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value DNP (at 0 2.1 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 2 smd rect (at 1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 3 /5V) (zone_connect 2)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:SOT-23-5 (layer F.Cu) (tedit 55AA34E3) (tstamp 551FA7B0) (at 146.15 98.3 180) (path /551C18D2) (fp_text reference U7 (at 0.65 -1.41 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value TLV271 (at 0 -4.05 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.55 -2.2) (end -0.55 -0.45) (layer F.SilkS) (width 0.15)) (fp_line (start -0.55 -0.45) (end 2.45 -0.45) (layer F.SilkS) (width 0.15)) (fp_line (start 2.45 -0.45) (end 2.45 -2.2) (layer F.SilkS) (width 0.15)) (fp_line (start 2.45 -2.2) (end -0.55 -2.2) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 180) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask) (net 26 "Net-(R6-Pad1)")) (pad 2 smd rect (at 0.95 0 180) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask) (net 2 GND)) (pad 3 smd rect (at 1.9 0 180) (size 0.6 1.05) (layers F.Cu F.Paste F.Mask) (net 84 "Net-(R36-Pad1)")) (pad 4 smd rect (at 1.9 -2.6 180) (size 0.6 1.25) (layers F.Cu F.Paste F.Mask) (net 25 "Net-(R5-Pad1)")) (pad 5 smd rect (at 0 -2.6 180) (size 0.6 1.25) (layers F.Cu F.Paste F.Mask) (net 13 /10V)) ) (module fmcw2:CONSMA003.062 (layer F.Cu) (tedit 56B0F470) (tstamp 551FA814) (at 176.8 114.225) (path /54FAB614) (fp_text reference U13 (at 0 7.62) (layer F.SilkS) (effects (font (size 1.5 1.5) (thickness 0.15))) ) (fp_text value SMA (at 0 -7.62) (layer F.SilkS) hide (effects (font (size 1.5 1.5) (thickness 0.15))) ) (fp_line (start 2.25 4.5) (end 2.25 -4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 2.25 -4.5) (end 12.25 -4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 12.25 -4.5) (end 12.25 4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 12.25 4.5) (end 2.25 4.5) (layer Dwgs.User) (width 0.15)) (pad 1 smd rect (at 0 0) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 18 "Net-(C31-Pad1)")) (pad 2 smd rect (at 0 -2.54) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 2.54) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 -2.54) (size 4.06 1.52) (layers B.Cu B.Paste B.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 2.54) (size 4.06 1.52) (layers B.Cu B.Paste B.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 thru_hole circle (at 1.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 -2.55) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 -3.05) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 2.55) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 3.05) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) ) (module fmcw2:CONSMA003.062 (layer F.Cu) (tedit 56B0F470) (tstamp 551FA838) (at 176.8 101) (path /54FAB57F) (fp_text reference U15 (at 0 7.62) (layer F.SilkS) (effects (font (size 1.5 1.5) (thickness 0.15))) ) (fp_text value SMA (at 0 -7.62) (layer F.SilkS) hide (effects (font (size 1.5 1.5) (thickness 0.15))) ) (fp_line (start 2.25 4.5) (end 2.25 -4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 2.25 -4.5) (end 12.25 -4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 12.25 -4.5) (end 12.25 4.5) (layer Dwgs.User) (width 0.15)) (fp_line (start 12.25 4.5) (end 2.25 4.5) (layer Dwgs.User) (width 0.15)) (pad 1 smd rect (at 0 0) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 35 "Net-(U15-Pad1)")) (pad 2 smd rect (at 0 -2.54) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 2.54) (size 4.06 1.52) (layers F.Cu F.Paste F.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 -2.54) (size 4.06 1.52) (layers B.Cu B.Paste B.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 smd rect (at 0 2.54) (size 4.06 1.52) (layers B.Cu B.Paste B.Mask) (net 2 GND) (zone_connect 2) (thermal_width 4) (thermal_gap 0.3)) (pad 2 thru_hole circle (at 1.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.25 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.75 -2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 0.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -0.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.25 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at -1.75 2.1) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 -2.55) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 -3.05) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 2.55) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) (pad 2 thru_hole circle (at 1.75 3.05) (size 0.5 0.5) (drill 0.25) (layers *.Cu *.Mask F.SilkS) (net 2 GND) (zone_connect 2)) ) (gr_text HF (at 144.43 108.65 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.25))) ) (gr_text FMCW2 (at 142.63 108.74 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.25))) ) (gr_line (start 152.12 115.77) (end 152.12 116.6) (angle 90) (layer F.Mask) (width 1.2)) (gr_line (start 152.12 112.87) (end 152.12 115.64) (angle 90) (layer F.Mask) (width 1.2)) (gr_line (start 152.62 112.43) (end 152.29 112.76) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 155.66 112.43) (end 152.62 112.43) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 158.99 109.1) (end 155.66 112.43) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 163.4 109.1) (end 158.99 109.1) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 165 107.5) (end 163.4 109.1) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 165.73 102.15) (end 165.73 102.9) (angle 90) (layer F.Mask) (width 1.4)) (gr_line (start 173.15 101.19) (end 173.15 101.83) (angle 90) (layer F.Mask) (width 1.2)) (gr_line (start 173.16 101.18) (end 165.99 101.18) (angle 90) (layer F.Mask) (width 1.2)) (gr_line (start 173.03 101.81) (end 165.91 101.81) (angle 90) (layer F.Mask) (width 1.2)) (gr_line (start 138.69 95.97) (end 138.69 118.88) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 179.02 95.97) (end 138.69 95.97) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 179.02 118.88) (end 179.02 95.97) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 138.69 118.88) (end 179.02 118.88) (angle 90) (layer Edge.Cuts) (width 0.1)) (segment (start 147.23 111.13) (end 145.48 111.13) (width 0.15) (layer B.Cu) (net 1)) (segment (start 147.44 106.3) (end 148.56 107.42) (width 0.2) (layer B.Cu) (net 1) (tstamp 55A2B4DE)) (segment (start 148.56 107.42) (end 148.56 109.8) (width 0.2) (layer B.Cu) (net 1) (tstamp 55A2B4DF)) (segment (start 148.56 109.8) (end 147.23 111.13) (width 0.2) (layer B.Cu) (net 1) (tstamp 55A2B4E1)) (segment (start 147.3 106.3) (end 147.44 106.3) (width 0.2) (layer B.Cu) (net 1)) (segment (start 142.27 110.8) (end 142.27 113.17) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6AFF6)) (segment (start 142.29 110.78) (end 142.27 110.8) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6AFF5)) (segment (start 145.13 110.78) (end 142.29 110.78) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6AFF4)) (segment (start 145.48 111.13) (end 145.13 110.78) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6AFF3)) (segment (start 158.725 107.825) (end 159.475 107.825) (width 0.34) (layer B.Cu) (net 1) (tstamp 55A124D5)) (segment (start 158.725 107.825) (end 158.65 107.75) (width 0.34) (layer B.Cu) (net 1)) (segment (start 158.65 107.75) (end 157.925 107.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 55A12636)) (segment (start 159.75 107.55) (end 159.475 107.825) (width 0.34) (layer B.Cu) (net 1) (tstamp 55A124D6) (status 10)) (via (at 145.9 104.87) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 144.95 104.975) (end 145.795 104.975) (width 0.34) (layer F.Cu) (net 1) (tstamp 55A6855B) (status 10)) (segment (start 145.795 104.975) (end 145.9 104.87) (width 0.34) (layer F.Cu) (net 1) (tstamp 55A6855A)) (segment (start 173 104.7) (end 173 104.79) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 173 104.79) (end 171.88 105.91) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A2255D) (status 10)) (segment (start 171.88 105.91) (end 170.91 105.91) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A2255E) (status 20)) (segment (start 170.91 105.91) (end 170.875 105.875) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A22560) (status 30)) (segment (start 157.975 108.35) (end 157.925 108.3) (width 0.34) (layer B.Cu) (net 1)) (segment (start 157.925 107.75) (end 157.925 105.45) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C1D)) (segment (start 157.925 105.45) (end 157.225 104.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C1E)) (segment (start 154.725 104.75) (end 157.225 104.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 5584770D)) (segment (start 154.3 104.325) (end 154.725 104.75) (width 0.34) (layer B.Cu) (net 1)) (segment (start 157.82 108.35) (end 157.81 108.36) (width 0.15) (layer F.Cu) (net 1)) (via (at 157.975 108.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 157.82 108.35) (end 157.975 108.35) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A12627)) (segment (start 157.925 108.3) (end 157.925 107.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 55A12633)) (segment (start 152.275 106.85) (end 147.85 106.85) (width 0.34) (layer In2.Cu) (net 1)) (segment (start 166.675 109.2) (end 153.925 109.2) (width 0.34) (layer In2.Cu) (net 1) (tstamp 55A12506)) (segment (start 153.925 109.2) (end 152.775 108.05) (width 0.34) (layer In2.Cu) (net 1) (tstamp 55A12508)) (segment (start 152.775 108.05) (end 152.775 107.35) (width 0.34) (layer In2.Cu) (net 1) (tstamp 55A1250A)) (segment (start 152.775 107.35) (end 152.275 106.85) (width 0.34) (layer In2.Cu) (net 1) (tstamp 55A1250C)) (segment (start 168.35 107.525) (end 166.675 109.2) (width 0.34) (layer In2.Cu) (net 1)) (segment (start 170.95 106.8) (end 170.225 107.525) (width 0.34) (layer In2.Cu) (net 1) (tstamp 5584760F)) (segment (start 168.35 107.525) (end 170.225 107.525) (width 0.34) (layer In2.Cu) (net 1) (tstamp 5584760E)) (segment (start 147.85 106.85) (end 147.3 106.3) (width 0.34) (layer In2.Cu) (net 1) (tstamp 55A12519)) (segment (start 148.975 106.25) (end 149.05 106.25) (width 0.34) (layer F.Cu) (net 1) (tstamp 55A12514) (status 30)) (segment (start 157.81 108.36) (end 158 108.17) (width 0.2) (layer F.Cu) (net 1)) (segment (start 157.8 108.35) (end 157.81 108.36) (width 0.2) (layer F.Cu) (net 1)) (segment (start 157.45 108.35) (end 157.8 108.35) (width 0.2) (layer F.Cu) (net 1) (status 10)) (segment (start 158 108.17) (end 158 107.8) (width 0.2) (layer F.Cu) (net 1) (tstamp 55A124CB) (status 20)) (segment (start 147.3 105.45) (end 147.28 105.45) (width 0.34) (layer B.Cu) (net 1)) (segment (start 147.28 105.45) (end 146.315 104.485) (width 0.34) (layer B.Cu) (net 1) (tstamp 559D2D33)) (segment (start 147.3 106.3) (end 147.3 105.45) (width 0.34) (layer B.Cu) (net 1) (tstamp 559C1E36)) (segment (start 145.54 105.25) (end 145.54 105.23) (width 0.34) (layer B.Cu) (net 1)) (segment (start 145.54 105.23) (end 145.9 104.87) (width 0.34) (layer B.Cu) (net 1) (tstamp 559D2D27)) (segment (start 145.9 104.87) (end 146.02 104.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 55A68557)) (segment (start 144.55 104.75) (end 146.02 104.75) (width 0.34) (layer B.Cu) (net 1) (status 10)) (segment (start 146.02 104.75) (end 146.05 104.75) (width 0.34) (layer B.Cu) (net 1) (tstamp 559D2D2A)) (segment (start 146.05 104.75) (end 146.315 104.485) (width 0.34) (layer B.Cu) (net 1) (tstamp 559D2D1F)) (segment (start 146.315 104.485) (end 146.4 104.4) (width 0.34) (layer B.Cu) (net 1) (tstamp 559D2D36)) (segment (start 146.45 104.4) (end 147.05 103.8) (width 0.34) (layer B.Cu) (net 1) (tstamp 559C1EA7)) (segment (start 147.05 103.8) (end 151.29 103.8) (width 0.34) (layer B.Cu) (net 1) (tstamp 559C1EA8)) (segment (start 151.29 103.8) (end 151.64 103.45) (width 0.34) (layer B.Cu) (net 1) (tstamp 559C1EA9)) (segment (start 146.4 104.4) (end 146.45 104.4) (width 0.34) (layer B.Cu) (net 1)) (segment (start 144.55 105.25) (end 145.54 105.25) (width 0.34) (layer B.Cu) (net 1) (status 10)) (segment (start 141.55 113.425) (end 142.015 113.425) (width 0.2) (layer B.Cu) (net 1) (status 10)) (segment (start 142.015 113.425) (end 142.27 113.17) (width 0.2) (layer B.Cu) (net 1) (tstamp 559C2B95)) (segment (start 142.09 113.35) (end 141.625 113.35) (width 0.2) (layer F.Cu) (net 1) (tstamp 559C2B9B) (status 20)) (via (at 142.27 113.17) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 142.27 113.17) (end 142.09 113.35) (width 0.2) (layer F.Cu) (net 1) (tstamp 559C2B9A)) (segment (start 147.8 106.3) (end 149 106.3) (width 0.34) (layer F.Cu) (net 1) (status 30)) (segment (start 149 106.3) (end 149.05 106.25) (width 0.34) (layer F.Cu) (net 1) (tstamp 559C1EAC) (status 30)) (segment (start 149.05 107.55) (end 149.05 106.25) (width 0.2) (layer F.Cu) (net 1) (status 30)) (via (at 147.3 106.3) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 147.8 106.3) (end 147.3 106.3) (width 0.2) (layer F.Cu) (net 1) (status 10)) (segment (start 139.725 113.35) (end 139.75 113.325) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 141.625 113.35) (end 141.6 113.375) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 141.6 113.375) (end 141.6 114.1) (width 0.15) (layer F.Cu) (net 1) (tstamp 559C1A02) (status 10)) (segment (start 141.6 114.1) (end 141.2 114.5) (width 0.15) (layer F.Cu) (net 1) (tstamp 559C1A03)) (segment (start 141.2 114.5) (end 140.05 114.5) (width 0.15) (layer F.Cu) (net 1) (tstamp 559C1A04)) (segment (start 140.05 114.5) (end 139.725 114.175) (width 0.15) (layer F.Cu) (net 1) (tstamp 559C1A05)) (segment (start 139.725 114.175) (end 139.725 113.35) (width 0.15) (layer F.Cu) (net 1) (tstamp 559C1A06) (status 20)) (segment (start 153.075 105.475) (end 153.4 105.15) (width 0.34) (layer B.Cu) (net 1)) (segment (start 153.4 105.15) (end 153.4 104.15) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C31)) (segment (start 152.2 105.4) (end 153 105.4) (width 0.34) (layer B.Cu) (net 1) (status 10)) (segment (start 153 105.4) (end 153.075 105.475) (width 0.34) (layer B.Cu) (net 1) (tstamp 5584771F)) (segment (start 154.4 105.79) (end 153.39 105.79) (width 0.15) (layer F.Cu) (net 1) (status 10)) (segment (start 153.075 105.475) (end 153 105.4) (width 0.15) (layer B.Cu) (net 1) (tstamp 5584771A)) (via (at 153.075 105.475) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 153.39 105.79) (end 153.075 105.475) (width 0.15) (layer F.Cu) (net 1) (tstamp 55847718)) (segment (start 153.4 104.15) (end 153.575 104.325) (width 0.34) (layer B.Cu) (net 1)) (segment (start 153.575 104.325) (end 154.3 104.325) (width 0.34) (layer B.Cu) (net 1) (tstamp 5584770A)) (segment (start 153.95 103.825) (end 154.3 104.175) (width 0.34) (layer B.Cu) (net 1)) (segment (start 154.3 104.175) (end 154.3 104.325) (width 0.34) (layer B.Cu) (net 1) (tstamp 55847707)) (segment (start 153.95 103.3) (end 153.95 103.825) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C27) (status 10)) (segment (start 154.3 104.5) (end 154.3 104.325) (width 0.15) (layer F.Cu) (net 1) (tstamp 55847702)) (segment (start 154.3 104.5) (end 154.55 104.75) (width 0.15) (layer F.Cu) (net 1)) (via (at 154.3 104.325) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 154.95 104.75) (end 154.55 104.75) (width 0.15) (layer F.Cu) (net 1) (status 10)) (segment (start 154.4 104.9) (end 154.4 105.3) (width 0.15) (layer F.Cu) (net 1) (tstamp 558476FF) (status 20)) (segment (start 154.55 104.75) (end 154.4 104.9) (width 0.15) (layer F.Cu) (net 1) (tstamp 558476FE)) (segment (start 159.95 99.1) (end 157.625 101.425) (width 0.34) (layer B.Cu) (net 1) (status 10)) (segment (start 157.625 101.425) (end 157.625 102.5) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C37)) (segment (start 153.4 104.15) (end 152.7 104.15) (width 0.34) (layer B.Cu) (net 1) (status 20)) (segment (start 152.7 104.15) (end 152.65 104.1) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C2E) (status 30)) (segment (start 158.8 103.65) (end 158.8 103.125) (width 0.34) (layer B.Cu) (net 1) (status 10)) (segment (start 158.8 103.125) (end 158.175 102.5) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C0C)) (segment (start 158.175 102.5) (end 157.625 102.5) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C0D)) (segment (start 157.625 102.5) (end 156.825 103.3) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C0E)) (segment (start 156.825 103.3) (end 153.95 103.3) (width 0.34) (layer B.Cu) (net 1) (tstamp 55846C0F) (status 20)) (segment (start 170.875 105.875) (end 170.875 106.725) (width 0.15) (layer B.Cu) (net 1) (status 10)) (segment (start 170.875 106.725) (end 170.95 106.8) (width 0.15) (layer B.Cu) (net 1) (tstamp 55846B53)) (segment (start 170.95178 106.80178) (end 171.9 106.80178) (width 0.15) (layer F.Cu) (net 1) (tstamp 55846B56) (status 20)) (segment (start 170.95 106.8) (end 170.95178 106.80178) (width 0.15) (layer F.Cu) (net 1) (tstamp 55846B55)) (via (at 170.95 106.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 1)) (segment (start 170.4 105.8) (end 171.55 105.8) (width 0.34) (layer F.Cu) (net 1) (status 10)) (segment (start 171.55 105.8) (end 171.9 106.15) (width 0.34) (layer F.Cu) (net 1) (tstamp 5522C514)) (segment (start 171.9 106.15) (end 171.9 106.80178) (width 0.34) (layer F.Cu) (net 1) (tstamp 5522C515) (status 20)) (segment (start 151.64 103.45) (end 152.67 103.45) (width 0.34) (layer F.Cu) (net 1)) (segment (start 152.72 103.47) (end 153.4 104.15) (width 0.34) (layer F.Cu) (net 1) (tstamp 552AAB85)) (segment (start 152.72 103.4) (end 152.72 103.47) (width 0.34) (layer F.Cu) (net 1) (tstamp 552AAB84)) (segment (start 152.67 103.45) (end 152.72 103.4) (width 0.34) (layer F.Cu) (net 1) (tstamp 552AAB83)) (segment (start 151.7 103.45) (end 151.64 103.45) (width 0.34) (layer F.Cu) (net 1)) (segment (start 152.3 104.05) (end 152.3 104.65) (width 0.34) (layer F.Cu) (net 1) (tstamp 552AAB7A) (status 20)) (segment (start 151.7 103.45) (end 152.3 104.05) (width 0.34) (layer F.Cu) (net 1) (tstamp 552AAB79)) (via (at 151.64 103.45) (size 0.7) (layers F.Cu B.Cu) (net 1)) (segment (start 152.29 104.1) (end 152.65 104.1) (width 0.34) (layer B.Cu) (net 1) (tstamp 552AAB80) (status 20)) (segment (start 151.64 103.45) (end 152.29 104.1) (width 0.34) (layer B.Cu) (net 1) (tstamp 552AAB7F)) (segment (start 152.3 104.65) (end 152.3 104.7) (width 0.2) (layer F.Cu) (net 1) (status 30)) (segment (start 154.4 105.3) (end 154.2 105.3) (width 0.2) (layer F.Cu) (net 1) (status 30)) (segment (start 153.9 105.3) (end 153.4 104.8) (width 0.2) (layer F.Cu) (net 1) (tstamp 5522AB9A)) (segment (start 153.4 104.8) (end 153.4 104.15) (width 0.2) (layer F.Cu) (net 1) (tstamp 5522AB9B)) (segment (start 154.4 105.3) (end 153.9 105.3) (width 0.2) (layer F.Cu) (net 1) (status 10)) (via (at 153.4 104.15) (size 0.7) (layers F.Cu B.Cu) (net 1)) (segment (start 151.05 113.45) (end 151.17 113.57) (width 0.34) (layer F.Cu) (net 2)) (segment (start 151.17 115.9) (end 151.08 115.99) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA387F)) (segment (start 151.17 113.57) (end 151.17 115.9) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA387E)) (segment (start 169.52 100.06) (end 171.35 100.06) (width 0.34) (layer F.Cu) (net 2)) (segment (start 171.39 100.1) (end 171.36 100.07) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA32BA)) (via (at 171.36 100.07) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 172.16 100.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.16 100.1) (end 172.15 100.09) (width 0.15) (layer F.Cu) (net 2)) (segment (start 173.72 99.46) (end 173.72 100.09) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E296)) (via (at 173.72 100.09) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.72 100.09) (end 172.96 100.09) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E298)) (segment (start 172.96 100.09) (end 172.95 100.1) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E299)) (via (at 172.95 100.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.95 100.1) (end 172.16 100.1) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E29B)) (segment (start 173.73 99.45) (end 173.72 99.46) (width 0.15) (layer F.Cu) (net 2)) (segment (start 171.39 100.1) (end 172.16 100.1) (width 0.34) (layer F.Cu) (net 2)) (segment (start 171.35 100.06) (end 171.36 100.07) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA32C0)) (segment (start 169.52 100.06) (end 169.52 99.66) (width 0.34) (layer F.Cu) (net 2)) (via (at 168.09 99.37) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.19 99.37) (end 168.09 99.37) (width 0.34) (layer B.Cu) (net 2) (tstamp 55AA32B0)) (segment (start 169.21 99.35) (end 169.19 99.37) (width 0.34) (layer B.Cu) (net 2) (tstamp 55AA32AF)) (via (at 169.21 99.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.52 99.66) (end 169.21 99.35) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA32AD)) (segment (start 166.37 100.22) (end 168.53 100.22) (width 0.34) (layer F.Cu) (net 2)) (via (at 166.37 100.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.52 100.06) (end 169.53 100.07) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA329F)) (via (at 169.52 100.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.69 100.06) (end 169.52 100.06) (width 0.34) (layer B.Cu) (net 2) (tstamp 55AA329D)) (segment (start 168.68 100.07) (end 168.69 100.06) (width 0.34) (layer B.Cu) (net 2) (tstamp 55AA329C)) (via (at 168.68 100.07) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.53 100.22) (end 168.68 100.07) (width 0.34) (layer F.Cu) (net 2) (tstamp 55AA3297)) (segment (start 141.78 103.68) (end 141.78 103.01) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 141.54 102.77) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 141.78 103.01) (end 141.54 102.77) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A80D37)) (segment (start 140.08 117.07) (end 140.35 116.8) (width 0.15) (layer B.Cu) (net 2)) (segment (start 140.75 116.8) (end 141.225 116.325) (width 0.15) (layer B.Cu) (net 2) (tstamp 559C1AA2)) (segment (start 141.225 115.925) (end 141.225 116.325) (width 0.15) (layer B.Cu) (net 2) (tstamp 559C1AA3) (status 10)) (via (at 140.08 117.07) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.08 117.07) (end 140.595 117.07) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A6AFE4) (status 20)) (segment (start 140.35 116.8) (end 140.75 116.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A6AFE8)) (segment (start 140.6 117.075) (end 140.595 117.07) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 145.75 100.24) (end 145.75 100.62) (width 0.2) (layer B.Cu) (net 2) (status 10)) (via (at 145.27 101.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.75 100.62) (end 145.27 101.1) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A6AEDE)) (segment (start 145.2 98.3) (end 145.2 97.77) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 145.21 97.76) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.2 97.77) (end 145.21 97.76) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A6AEB2)) (segment (start 144.55 106.25) (end 143.7 106.25) (width 0.34) (layer B.Cu) (net 2) (status 10)) (segment (start 143.7 106.25) (end 143.5 106.05) (width 0.34) (layer B.Cu) (net 2) (tstamp 55A68565)) (segment (start 143.45 104.975) (end 143.45 106) (width 0.34) (layer F.Cu) (net 2) (status 10)) (segment (start 143.45 106) (end 143.5 106.05) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A6855E)) (via (at 143.5 106.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 143.5 106.05) (end 143.8 105.75) (width 0.34) (layer B.Cu) (net 2) (tstamp 55A68560) (status 20)) (segment (start 143.8 105.75) (end 144.55 105.75) (width 0.34) (layer B.Cu) (net 2) (tstamp 55A68561) (status 30)) (segment (start 157.9 103.25) (end 158.225 103.25) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 158.3 103.65) (end 157.9 103.25) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522B393) (status 10)) (via (at 157.9 103.25) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 158.225 105.9) (end 156.85 105.9) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55A67969) (status 20)) (segment (start 159.25 104.875) (end 158.225 105.9) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55A67966)) (segment (start 159.25 104.275) (end 159.25 104.875) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55A67965)) (segment (start 158.225 103.25) (end 159.25 104.275) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55A67964)) (segment (start 164.65 103.2) (end 164.65 103.75) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 164.65 103.75) (end 164.75 103.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A423D5)) (via (at 164.75 103.85) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.75 103.85) (end 164.6625 103.7625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A423D7)) (segment (start 164.6625 103.7625) (end 164.6625 103.4625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A423D8)) (segment (start 164.4 103.775) (end 164.4 106.23) (width 0.15) (layer F.Cu) (net 2)) (segment (start 164.4 106.23) (end 164.34 106.29) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A423D1)) (segment (start 168.835 112.26) (end 168.835 111.525) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 168.81 111.5) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.835 111.525) (end 168.81 111.5) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3FE23)) (segment (start 156.55 102.55) (end 156.79 102.31) (width 0.15) (layer F.Cu) (net 2)) (segment (start 156.79 102.31) (end 156.79 101.1) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5E4)) (via (at 156.79 101.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 153.55 97.2) (end 153.82 97.2) (width 0.15) (layer F.Cu) (net 2)) (segment (start 153.82 97.2) (end 154.24 97.62) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5CC)) (via (at 154.24 97.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 154.24 97.62) (end 155.16 97.62) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E5D2)) (via (at 155.16 97.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.16 97.62) (end 155.17 97.61) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5D8)) (segment (start 155.17 97.61) (end 155.99 97.61) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5D9)) (via (at 155.99 97.61) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.99 97.61) (end 156 97.62) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E5DB)) (segment (start 156 97.62) (end 156.88 97.62) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E5DC)) (via (at 156.88 97.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 156.88 97.62) (end 156.9 97.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5DE)) (segment (start 156.9 97.64) (end 157.73 97.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E5DF)) (via (at 157.73 97.64) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 149.48 118.32) (end 150.45 118.32) (width 0.34) (layer F.Cu) (net 2)) (via (at 149.48 118.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 150.45 118.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 150.45 118.32) (end 149.48 118.32) (width 0.34) (layer B.Cu) (net 2) (tstamp 55A3E5AF)) (segment (start 151.14 117.7) (end 151.07 117.7) (width 0.34) (layer F.Cu) (net 2)) (segment (start 149.48 118.32) (end 149.45 118.32) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5B2)) (segment (start 151.07 117.7) (end 150.45 118.32) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5AD)) (segment (start 149.45 118.32) (end 148.51 118.32) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5A6)) (segment (start 148.51 118.32) (end 148.5 118.33) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5A7)) (segment (start 148.5 118.33) (end 146.66 118.33) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5A8)) (segment (start 146.66 118.33) (end 146.65 118.32) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5A9)) (segment (start 146.65 118.32) (end 145.58 118.32) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A3E5AA)) (via (at 145.58 118.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 146.59 118.32) (end 145.58 118.32) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E5A2)) (segment (start 146.62 118.29) (end 146.59 118.32) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E5A1)) (via (at 146.62 118.29) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 147.54 118.29) (end 146.62 118.29) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E59F)) (segment (start 147.58 118.33) (end 147.54 118.29) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E59E)) (via (at 147.58 118.33) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 148.5 118.33) (end 147.58 118.33) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E59C)) (segment (start 148.51 118.32) (end 148.5 118.33) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E59B)) (via (at 148.51 118.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 149.45 118.32) (end 148.51 118.32) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E598)) (segment (start 154.56 117.21) (end 154.56 117.55) (width 0.15) (layer F.Cu) (net 2)) (via (at 154.18 117.82) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 154.18 117.82) (end 154.56 117.44) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E572)) (segment (start 154.56 117.44) (end 154.56 117.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E573)) (via (at 154.56 117.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 151.98 117.74) (end 152.6 117.74) (width 0.15) (layer F.Cu) (net 2)) (via (at 151.08 115.99) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 151.08 115.99) (end 151.11 116.02) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E55D)) (segment (start 151.11 116.02) (end 151.11 116.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E55E)) (via (at 151.11 116.85) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 151.11 116.85) (end 151.14 116.88) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E560)) (segment (start 151.14 116.88) (end 151.14 117.7) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E561)) (via (at 151.14 117.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 151.14 117.7) (end 151.18 117.74) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E563)) (segment (start 151.18 117.74) (end 151.98 117.74) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E564)) (via (at 151.98 117.74) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 153.44 117.82) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 152.78 117.82) (end 153.44 117.82) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E56C)) (segment (start 152.73 117.87) (end 152.78 117.82) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E56B)) (via (at 152.73 117.87) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 152.6 117.74) (end 152.73 117.87) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E569)) (segment (start 153.44 117.82) (end 154.18 117.82) (width 0.15) (layer F.Cu) (net 2)) (via (at 155.02 118.01) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 154.56 117.55) (end 155.02 118.01) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E577)) (segment (start 155.61 111.34) (end 155.33 111.34) (width 0.15) (layer F.Cu) (net 2)) (via (at 152.53 111.36) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 153.09 111.36) (end 152.53 111.36) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E531)) (segment (start 153.11 111.34) (end 153.09 111.36) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E530)) (via (at 153.11 111.34) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 153.88 111.34) (end 153.11 111.34) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E52C)) (via (at 153.88 111.34) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 154.56 111.34) (end 153.88 111.34) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E52A)) (segment (start 154.59 111.37) (end 154.56 111.34) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E529)) (via (at 154.59 111.37) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.3 111.37) (end 154.59 111.37) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E526)) (via (at 155.3 111.37) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.33 111.34) (end 155.3 111.37) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E524)) (segment (start 163.26 107.47) (end 163.02 107.71) (width 0.15) (layer F.Cu) (net 2)) (via (at 162.68 107.86) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 163.02 107.71) (end 162.68 107.86) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4C1)) (segment (start 160.8 107) (end 161.19 106.61) (width 0.15) (layer F.Cu) (net 2)) (via (at 161.19 106.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 161.19 106.61) (end 161.19 106.22) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4B6)) (segment (start 163.26 107.47) (end 162.7 107.2) (width 0.15) (layer F.Cu) (net 2)) (segment (start 163.81 106.77) (end 163.81 106.9) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E490)) (via (at 163.81 106.9) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2) (status 30)) (segment (start 163.81 106.9) (end 163.79 106.9) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E492) (status 30)) (segment (start 163.79 106.9) (end 163.26 107.47) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E493) (status 10)) (via (at 163.26 107.47) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.375 103.75) (end 164.4 103.775) (width 0.15) (layer F.Cu) (net 2)) (segment (start 164.4 103.775) (end 164.39 103.765) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A423CF)) (via (at 164.34 106.29) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.34 106.29) (end 163.81 106.77) (width 0.15) (layer F.Cu) (net 2)) (via (at 162.66 106.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 162.7 106.1) (end 162.66 106.06) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E4AF)) (segment (start 162.7 106.96) (end 162.7 106.1) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E4AE)) (via (at 162.7 106.96) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 162.7 107.2) (end 162.7 106.96) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4AC)) (segment (start 167.3 105.25) (end 167.55 105) (width 0.15) (layer F.Cu) (net 2)) (via (at 167.3 105.25) (size 0.7) (layers F.Cu B.Cu) (net 2)) (via (at 167.83 105) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.55 105) (end 167.83 105) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4A8)) (segment (start 167.3 105.25) (end 167.79 105.74) (width 0.15) (layer F.Cu) (net 2)) (segment (start 166.75 105.25) (end 167.3 105.25) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 165.71 108.36) (end 165.7 108.36) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E4A5)) (via (at 165.71 108.36) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.13 107.94) (end 165.71 108.36) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4A3)) (segment (start 166.17 107.94) (end 166.13 107.94) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E4A2)) (via (at 166.17 107.94) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.75 107.36) (end 166.17 107.94) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E4A0)) (segment (start 166.89 107.36) (end 166.75 107.36) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E49F)) (via (at 166.89 107.36) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.36 106.89) (end 166.89 107.36) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E49D)) (segment (start 167.63 106.89) (end 167.36 106.89) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E49C)) (via (at 167.63 106.89) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.79 106.73) (end 167.63 106.89) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E49A)) (segment (start 167.79 105.87) (end 167.79 106.73) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E499)) (via (at 167.79 105.87) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.79 105.74) (end 167.79 105.87) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E497)) (segment (start 171.83 107.82) (end 170.96 107.82) (width 0.15) (layer F.Cu) (net 2)) (segment (start 168.79 108.845) (end 168.79 108.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E470)) (via (at 168.79 108.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.79 108.21) (end 169.65 108.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E472)) (segment (start 169.65 108.21) (end 169.67 108.23) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E473)) (via (at 169.67 108.23) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.67 108.23) (end 170.55 108.23) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E475)) (segment (start 170.55 108.23) (end 170.96 107.82) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E476)) (via (at 170.96 107.82) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.835 108.94) (end 168.835 109.72) (width 0.34) (layer F.Cu) (net 2) (status 20)) (via (at 168.86 108.915) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 168.835 108.94) (end 168.86 108.915) (width 0.34) (layer F.Cu) (net 2) (tstamp 557303DE)) (segment (start 168.86 108.915) (end 168.79 108.845) (width 0.15) (layer F.Cu) (net 2)) (via (at 171.83 107.82) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.95 109.5) (end 170.74 109.71) (width 0.15) (layer F.Cu) (net 2)) (via (at 170.95 109.5) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 170.95 108.80076) (end 170.95 109.5) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 170.7 111.57) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.71 111.56) (end 170.7 111.57) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E480)) (segment (start 170.71 111.02) (end 170.71 111.56) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E47F)) (via (at 170.71 111.02) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.74 110.99) (end 170.71 111.02) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E47D)) (segment (start 170.74 110.23) (end 170.74 110.99) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E47C)) (via (at 170.74 110.23) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.74 109.71) (end 170.74 110.23) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E47A)) (segment (start 167.91 108.965) (end 167.05 109.825) (width 0.15) (layer F.Cu) (net 2)) (segment (start 167.8825 108.9925) (end 167.91 108.965) (width 0.34) (layer F.Cu) (net 2) (tstamp 557303E2)) (via (at 167.91 108.965) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 167.8825 109.72) (end 167.8825 108.9925) (width 0.34) (layer F.Cu) (net 2) (status 10)) (segment (start 167.05 109.87) (end 167.03 109.87) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E46D)) (via (at 167.05 109.87) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.05 109.825) (end 167.05 109.87) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E46B)) (segment (start 164.45 111.3) (end 164.75 111.6) (width 0.15) (layer F.Cu) (net 2)) (via (at 164.45 111.3) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 163.9 111.3) (end 164.45 111.3) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 164.75 110.42) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.08 110.75) (end 164.75 110.42) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E467)) (segment (start 165.08 111.21) (end 165.08 110.75) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E466)) (via (at 165.08 111.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.75 111.54) (end 165.08 111.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E464)) (segment (start 164.75 112.04) (end 164.75 111.54) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E463)) (via (at 164.75 112.04) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.75 111.6) (end 164.75 112.04) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E461)) (segment (start 166.74 115.03) (end 166.91 115.2) (width 0.15) (layer F.Cu) (net 2)) (via (at 167.24 115.33) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.11 115.2) (end 167.24 115.33) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E451)) (segment (start 166.91 115.2) (end 167.11 115.2) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E44F)) (segment (start 166.74 115.03) (end 167.36 115.65) (width 0.15) (layer F.Cu) (net 2)) (via (at 167.36 115.97) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.36 115.65) (end 167.36 115.97) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E44B)) (segment (start 166.34 116.62) (end 166.71 116.25) (width 0.15) (layer F.Cu) (net 2)) (segment (start 167.8 116.45) (end 167.8 116.63) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E437)) (via (at 167.8 116.63) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.8 116.63) (end 167.05 116.63) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E439)) (via (at 167.05 116.63) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.05 116.63) (end 166.35 116.63) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E43C)) (segment (start 166.35 116.63) (end 166.34 116.62) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E43D)) (via (at 166.34 116.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.19 116.06) (end 167.8 116.45) (width 0.15) (layer F.Cu) (net 2)) (via (at 166.64 114.38) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.74 114.48) (end 166.64 114.38) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E447)) (segment (start 166.74 115.03) (end 166.74 114.48) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E446)) (via (at 166.74 115.03) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.71 115.06) (end 166.74 115.03) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E444)) (segment (start 166.71 115.88) (end 166.71 115.06) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E443)) (via (at 166.71 115.88) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.71 116.25) (end 166.71 115.88) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E441)) (segment (start 169.71 113.36) (end 169.97 113.62) (width 0.15) (layer F.Cu) (net 2)) (segment (start 169.71 113.615) (end 169.71 113.36) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E410)) (via (at 169.71 113.36) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.785 114.04) (end 169.285 114.04) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 169.285 114.04) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 169.285 114.04) (end 169.71 113.615) (width 0.15) (layer F.Cu) (net 2)) (via (at 167.93 115.44) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.19 115.79) (end 167.93 115.44) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E42C)) (segment (start 168.19 116.06) (end 168.19 115.79) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E42B)) (via (at 168.19 116.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.31 116.18) (end 168.19 116.06) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E429)) (segment (start 168.91 116.05) (end 168.31 116.18) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E428)) (via (at 168.91 116.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.68 115.82) (end 168.91 116.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E426)) (segment (start 168.68 115.05) (end 168.68 115.82) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E425)) (via (at 168.68 115.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.9 115.27) (end 168.68 115.05) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E423)) (segment (start 169.53 115.27) (end 168.9 115.27) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E422)) (via (at 169.53 115.27) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.63 115.37) (end 169.53 115.27) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E420)) (segment (start 169.63 115.91) (end 169.63 115.37) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E41F)) (via (at 169.63 115.91) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.68 115.96) (end 169.63 115.91) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E41D)) (segment (start 170.41 115.96) (end 169.68 115.96) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E41C)) (via (at 170.41 115.96) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.42 115.95) (end 170.41 115.96) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E41A)) (segment (start 170.42 115.15) (end 170.42 115.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E419)) (via (at 170.42 115.15) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.97 114.7) (end 170.42 115.15) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E417)) (segment (start 169.97 114.4) (end 169.97 114.7) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E416)) (via (at 169.97 114.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.97 113.62) (end 169.97 114.4) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E414)) (segment (start 173.01 118.25) (end 172.87 118.11) (width 0.15) (layer F.Cu) (net 2)) (via (at 172.87 117.59) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.87 118.11) (end 172.87 117.59) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E40C)) (segment (start 172.01 118.22) (end 172.04 118.19) (width 0.15) (layer F.Cu) (net 2)) (via (at 172.04 117.64) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.04 118.19) (end 172.04 117.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E408)) (segment (start 171.15 118.25) (end 170.83 117.93) (width 0.15) (layer F.Cu) (net 2)) (via (at 170.83 117.64) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.83 117.93) (end 170.83 117.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E404)) (segment (start 168.11 117.45) (end 168.21 117.55) (width 0.15) (layer F.Cu) (net 2)) (segment (start 164.41 117.43) (end 165.16 117.43) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3EC)) (via (at 165.16 117.43) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.16 117.43) (end 165.95 117.43) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3EE)) (segment (start 165.95 117.43) (end 165.97 117.41) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3EF)) (via (at 165.97 117.41) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.97 117.41) (end 166.67 117.41) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3F1)) (segment (start 166.67 117.41) (end 166.7 117.44) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3F2)) (via (at 166.7 117.44) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.7 117.44) (end 167.35 117.44) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3F4)) (segment (start 167.35 117.44) (end 167.37 117.42) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3F5)) (via (at 167.37 117.42) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.37 117.42) (end 168.08 117.42) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3F7)) (segment (start 168.08 117.42) (end 168.11 117.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3F8)) (via (at 168.11 117.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.27 118.19) (end 164.29 118.17) (width 0.15) (layer F.Cu) (net 2)) (segment (start 173.24 118.25) (end 173.01 118.25) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3C6)) (via (at 173.01 118.25) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.01 118.25) (end 172.04 118.25) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3C8)) (segment (start 172.04 118.25) (end 172.01 118.22) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3C9)) (via (at 172.01 118.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.01 118.22) (end 171.18 118.22) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3CB)) (segment (start 171.18 118.22) (end 171.15 118.25) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3CC)) (via (at 171.15 118.25) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.15 118.25) (end 170.3 118.25) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3CE)) (segment (start 170.3 118.25) (end 170.27 118.22) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3CF)) (via (at 170.27 118.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.27 118.22) (end 169.4 118.22) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3D1)) (via (at 169.4 118.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.4 118.22) (end 168.44 118.22) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3D4)) (segment (start 168.44 118.22) (end 168.42 118.2) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3D5)) (via (at 168.42 118.2) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.42 118.2) (end 167.43 118.2) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3D7)) (segment (start 167.43 118.2) (end 167.42 118.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3D8)) (via (at 167.42 118.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.42 118.21) (end 166.71 118.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3DA)) (segment (start 166.71 118.21) (end 166.68 118.18) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3DB)) (via (at 166.68 118.18) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.68 118.18) (end 165.97 118.18) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3DD)) (segment (start 165.97 118.18) (end 165.93 118.22) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3DE)) (via (at 165.93 118.22) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.93 118.22) (end 165.1 118.22) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3E0)) (segment (start 165.1 118.22) (end 165.09 118.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3E1)) (via (at 165.09 118.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.09 118.21) (end 164.29 118.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3E3)) (segment (start 164.29 118.21) (end 164.27 118.19) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3E4)) (via (at 164.27 118.19) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.625 114.475) (end 173.7 114.55) (width 0.15) (layer F.Cu) (net 2)) (segment (start 173.425 114.275) (end 173.625 114.475) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476A6)) (via (at 173.625 114.475) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.975 114.275) (end 173.425 114.275) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 173.69 117.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.69 116.88) (end 173.69 117.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3A1)) (via (at 173.69 116.88) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.68 116.87) (end 173.69 116.88) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E39F)) (segment (start 173.68 116.07) (end 173.68 116.87) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E39E)) (via (at 173.68 116.07) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.7 116.05) (end 173.68 116.07) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E39C)) (segment (start 173.7 115.27) (end 173.7 116.05) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E39B)) (via (at 173.7 115.27) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.7 114.55) (end 173.7 115.27) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E399)) (segment (start 173.69 117.8) (end 173.24 118.25) (width 0.15) (layer F.Cu) (net 2)) (via (at 164.29 117.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.29 118.17) (end 164.29 117.55) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3E8)) (segment (start 164.29 117.55) (end 164.41 117.43) (width 0.15) (layer F.Cu) (net 2)) (via (at 169.68 117.61) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.62 117.55) (end 169.68 117.61) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3FF)) (segment (start 168.94 117.55) (end 169.62 117.55) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3FE)) (via (at 168.94 117.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.21 117.55) (end 168.94 117.55) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3FC)) (segment (start 176.74 117.68) (end 176.34 118.08) (width 0.15) (layer F.Cu) (net 2)) (via (at 176.74 117.68) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.26 117.55) (end 174.26 117.53) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3C3)) (via (at 174.26 117.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.51 117.8) (end 174.26 117.55) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3C1)) (segment (start 174.51 118.23) (end 174.51 117.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3C0)) (via (at 174.51 118.23) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.55 118.27) (end 174.51 118.23) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3BE)) (segment (start 175.42 118.27) (end 174.55 118.27) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3BD)) (via (at 175.42 118.27) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.48 118.21) (end 175.42 118.27) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3BB)) (segment (start 176.34 118.21) (end 175.48 118.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3BA)) (via (at 176.34 118.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.34 118.08) (end 176.34 118.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3B8)) (segment (start 176.74 117.68) (end 177.01 117.95) (width 0.15) (layer F.Cu) (net 2)) (segment (start 176.74 116.825) (end 176.74 117.68) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3AD) (status 10)) (via (at 178.25 118) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.2 117.95) (end 178.25 118) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3B4)) (segment (start 177.43 117.95) (end 178.2 117.95) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3B3)) (via (at 177.43 117.95) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.01 117.95) (end 177.43 117.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3B1)) (segment (start 176.8 116.765) (end 176.74 116.825) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 176.8 116.765) (end 176.735 116.83) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 176.735 116.83) (end 174.38 116.83) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E3A6) (status 10)) (via (at 174.38 116.83) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.38 116.83) (end 174.38 116.02) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3A8)) (segment (start 174.38 116.02) (end 174.35 115.99) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E3A9)) (via (at 174.35 115.99) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.56 112.34) (end 172.92 111.98) (width 0.15) (layer F.Cu) (net 2)) (via (at 173.13 110.61) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.13 110.61) (end 173.13 110.92) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E385)) (segment (start 173.13 110.92) (end 172.73 111.32) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E386)) (via (at 172.73 111.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.73 111.32) (end 172.73 112.17) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E388)) (segment (start 172.73 112.17) (end 172.56 112.34) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E389)) (via (at 172.56 112.34) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 173.12 111.98) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.92 111.98) (end 173.12 111.98) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E395)) (segment (start 173.13 110.61) (end 173.39 110.87) (width 0.15) (layer F.Cu) (net 2)) (via (at 173.39 111.26) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.39 110.87) (end 173.39 111.26) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E391)) (segment (start 173.88 110.48) (end 174.07 110.67) (width 0.15) (layer F.Cu) (net 2)) (via (at 174.07 111.17) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.07 110.67) (end 174.07 111.17) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E38D)) (segment (start 174.73 110.15) (end 174.26 109.68) (width 0.15) (layer F.Cu) (net 2)) (segment (start 178.275 110.21) (end 178.44 110.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E36D)) (via (at 178.44 110.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.44 110.21) (end 177.57 110.21) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E36F)) (segment (start 177.57 110.21) (end 177.54 110.18) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E370)) (via (at 177.54 110.18) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.54 110.18) (end 176.57 110.18) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E372)) (segment (start 176.57 110.18) (end 176.56 110.19) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E373)) (via (at 176.56 110.19) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.56 110.19) (end 175.66 110.19) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E375)) (segment (start 175.66 110.19) (end 175.65 110.18) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E376)) (via (at 175.65 110.18) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.65 110.18) (end 174.76 110.18) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E378)) (segment (start 174.76 110.18) (end 174.73 110.15) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E379)) (via (at 174.73 110.15) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.8 111.685) (end 178.275 110.21) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 173.26 110.48) (end 173.13 110.61) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E383)) (segment (start 173.88 110.48) (end 173.26 110.48) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E382)) (via (at 173.88 110.48) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.94 110.42) (end 173.88 110.48) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E380)) (segment (start 173.94 109.68) (end 173.94 110.42) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E37F)) (via (at 173.94 109.68) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.26 109.68) (end 173.94 109.68) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E37D)) (segment (start 177.97 108.41) (end 177.97 108.72) (width 0.15) (layer F.Cu) (net 2)) (segment (start 175.94 109.15) (end 175.94 109.16) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E36A)) (segment (start 175.92 109.13) (end 175.94 109.15) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E369)) (via (at 175.92 109.13) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.7 109.13) (end 175.92 109.13) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E366)) (via (at 176.7 109.13) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.52 109.13) (end 176.7 109.13) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E363)) (via (at 177.52 109.13) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.38 109.13) (end 177.52 109.13) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E360)) (via (at 178.38 109.13) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.97 108.72) (end 178.38 109.13) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E35E)) (segment (start 178.4 106.63) (end 178.4 107.46) (width 0.15) (layer F.Cu) (net 2)) (segment (start 177.97 108.41) (end 177.97 108.4) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E35B)) (via (at 177.97 108.41) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.15 108.41) (end 177.97 108.41) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E359)) (segment (start 177.11 108.37) (end 177.15 108.41) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E358)) (via (at 177.11 108.37) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.28 108.37) (end 177.11 108.37) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E356)) (segment (start 176.25 108.4) (end 176.28 108.37) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E355)) (via (at 176.25 108.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.91 108.4) (end 176.25 108.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E353)) (segment (start 175.5 107.99) (end 175.91 108.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E352)) (via (at 175.5 107.99) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.64 107.99) (end 175.5 107.99) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E350)) (segment (start 176.1 107.53) (end 175.64 107.99) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E34F)) (via (at 176.1 107.53) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.95 107.53) (end 176.1 107.53) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E34D)) (segment (start 176.97 107.51) (end 176.95 107.53) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E34C)) (via (at 176.97 107.51) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.74 107.51) (end 176.97 107.51) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E349)) (via (at 177.74 107.51) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.45 107.51) (end 177.74 107.51) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E346)) (via (at 178.45 107.51) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.4 107.46) (end 178.45 107.51) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E344)) (segment (start 174.06 105.83) (end 174.06 106.31) (width 0.15) (layer F.Cu) (net 2)) (via (at 178.41 105.77) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.41 105.77) (end 178.4 105.78) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E319)) (segment (start 178.4 105.78) (end 177.69 105.78) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E31A)) (via (at 177.69 105.78) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.69 105.78) (end 177.67 105.76) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E31C)) (segment (start 177.67 105.76) (end 176.95 105.76) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E31D)) (via (at 176.95 105.76) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.95 105.76) (end 176.91 105.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E31F)) (segment (start 176.91 105.8) (end 176.21 105.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E320)) (via (at 176.21 105.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.21 105.8) (end 176.18 105.83) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E322)) (segment (start 176.18 105.83) (end 175.49 105.83) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E323)) (via (at 175.49 105.83) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.49 105.83) (end 174.88 105.83) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E325)) (via (at 174.88 105.83) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.88 105.83) (end 174.06 105.83) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E328)) (via (at 174.06 105.83) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 173.64 107.46) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.64 106.73) (end 173.64 107.46) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E340)) (segment (start 173.76 106.61) (end 173.64 106.73) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E33F)) (via (at 173.76 106.61) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.06 106.31) (end 173.76 106.61) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E33D)) (segment (start 178.41 105.77) (end 178.41 106.62) (width 0.15) (layer F.Cu) (net 2)) (via (at 175.35 106.6) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.97 106.6) (end 175.35 106.6) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E339)) (segment (start 176.03 106.66) (end 175.97 106.6) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E338)) (via (at 176.03 106.66) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.75 106.66) (end 176.03 106.66) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E336)) (segment (start 176.77 106.64) (end 176.75 106.66) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E335)) (via (at 176.77 106.64) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.78 106.64) (end 176.77 106.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E333)) (segment (start 177.8 106.62) (end 177.78 106.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E332)) (via (at 177.8 106.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.39 106.62) (end 177.8 106.62) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E330)) (segment (start 178.4 106.63) (end 178.39 106.62) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E32F)) (via (at 178.4 106.63) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.41 106.62) (end 178.4 106.63) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E32D)) (segment (start 178.42 104.88) (end 178.42 105.76) (width 0.15) (layer F.Cu) (net 2)) (segment (start 178.42 105.76) (end 178.41 105.77) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E317)) (segment (start 176.83 104.41) (end 177.95 104.41) (width 0.15) (layer F.Cu) (net 2)) (segment (start 176.8 104.38) (end 176.83 104.41) (width 0.15) (layer F.Cu) (net 2) (tstamp 559E9D6A)) (via (at 176.83 104.41) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.8 103.54) (end 176.8 104.38) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 173.85 104.31) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.85 104.96) (end 173.85 104.31) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E313)) (segment (start 173.89 105) (end 173.85 104.96) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E312)) (via (at 173.89 105) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.67 105) (end 173.89 105) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E310)) (segment (start 174.7 105.03) (end 174.67 105) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E30F)) (via (at 174.7 105.03) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.41 105.03) (end 174.7 105.03) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E30D)) (segment (start 175.43 105.01) (end 175.41 105.03) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E30C)) (via (at 175.43 105.01) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.2 105.01) (end 175.43 105.01) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E30A)) (segment (start 176.22 105.03) (end 176.2 105.01) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E309)) (via (at 176.22 105.03) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.86 105.03) (end 176.22 105.03) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E307)) (segment (start 176.88 105.05) (end 176.86 105.03) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E306)) (via (at 176.88 105.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.55 105.05) (end 176.88 105.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E304)) (segment (start 177.64 104.96) (end 177.55 105.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E303)) (via (at 177.64 104.96) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 178.34 104.96) (end 177.64 104.96) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E301)) (segment (start 178.42 104.88) (end 178.34 104.96) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E300)) (via (at 178.42 104.88) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.95 104.41) (end 178.42 104.88) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2FE)) (segment (start 168.6 103.1) (end 169.13 103.1) (width 0.15) (layer F.Cu) (net 2)) (via (at 169.3 102.93) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 169.13 103.1) (end 169.3 102.93) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2FA)) (segment (start 168.6 103.1) (end 167.7 103.1) (width 0.15) (layer F.Cu) (net 2)) (via (at 168.6 103.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.6 103.675) (end 168.6 103.1) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 167.52 102.92) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.7 103.1) (end 167.52 102.92) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2F6)) (segment (start 165.7 97.04) (end 165.35 97.04) (width 0.15) (layer F.Cu) (net 2)) (segment (start 167.76 97.06) (end 167.6 97.06) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2E8)) (via (at 167.6 97.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 167.6 97.06) (end 166.59 97.06) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E2EA)) (via (at 166.59 97.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.59 97.06) (end 166.57 97.04) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2ED)) (segment (start 166.57 97.04) (end 165.7 97.04) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2EE)) (via (at 165.7 97.04) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 168.775 98.075) (end 167.76 97.06) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2E7) (status 10)) (via (at 165.01 97.38) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.35 97.04) (end 165.01 97.38) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2F2)) (segment (start 168.8 98.075) (end 168.775 98.075) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 165.575 98.775) (end 166.315 98.775) (width 0.15) (layer F.Cu) (net 2)) (via (at 165.575 98.775) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 165.2 98.775) (end 165.575 98.775) (width 0.2) (layer F.Cu) (net 2) (tstamp 55229839) (status 10)) (via (at 166.36 98.73) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.315 98.775) (end 166.36 98.73) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2DB)) (segment (start 166.37 100.22) (end 165.66 100.22) (width 0.15) (layer F.Cu) (net 2)) (segment (start 166.51 100.08) (end 166.37 100.22) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2D3)) (via (at 165.65 100.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.66 100.22) (end 165.65 100.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E2D7)) (segment (start 173.63 98.4) (end 173.73 98.5) (width 0.15) (layer F.Cu) (net 2)) (segment (start 174.15 96.81) (end 174.15 97.54) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E26D)) (via (at 174.15 97.54) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.15 97.54) (end 172.98 97.54) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E26F)) (segment (start 172.98 97.54) (end 172.96 97.52) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E270)) (via (at 172.96 97.52) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.96 97.52) (end 171.92 97.52) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E272)) (segment (start 171.92 97.52) (end 171.9 97.5) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E273)) (via (at 171.9 97.5) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.9 97.5) (end 171.05 97.5) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E275)) (segment (start 171.05 97.5) (end 171.02 97.47) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E276)) (via (at 171.02 97.47) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.02 97.47) (end 171.02 98.35) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E278)) (segment (start 171.02 98.35) (end 171.04 98.37) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E279)) (via (at 171.04 98.37) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.04 98.37) (end 171.83 98.37) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E27B)) (segment (start 171.83 98.37) (end 171.86 98.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E27C)) (via (at 171.86 98.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.86 98.4) (end 172.75 98.4) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E27E)) (via (at 172.75 98.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.75 98.4) (end 173.63 98.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E281)) (via (at 173.63 98.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.04 96.7) (end 174.15 96.81) (width 0.15) (layer F.Cu) (net 2)) (via (at 171.19 99.26) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.37 99.44) (end 171.19 99.26) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E28F)) (segment (start 172.04 99.44) (end 171.37 99.44) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E28E)) (via (at 172.04 99.44) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.08 99.4) (end 172.04 99.44) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E28C)) (segment (start 172.88 99.4) (end 172.08 99.4) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E28B)) (via (at 172.88 99.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.93 99.45) (end 172.88 99.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E289)) (segment (start 173.73 99.45) (end 172.93 99.45) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A3E288)) (via (at 173.73 99.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.73 98.5) (end 173.73 99.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E286)) (segment (start 170.96 96.62) (end 170.2 96.62) (width 0.2) (layer F.Cu) (net 2)) (via (at 169.43 96.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.18 96.62) (end 169.43 96.62) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E251)) (segment (start 170.19 96.63) (end 170.18 96.62) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E250)) (via (at 170.19 96.63) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 170.2 96.62) (end 170.19 96.63) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E24E)) (segment (start 176.8 98.46) (end 176.85 98.46) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 176.85 98.46) (end 178.25 97.06) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E22C) (status 10)) (via (at 170.96 96.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.92 96.62) (end 170.96 96.62) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E241)) (segment (start 171.95 96.65) (end 171.92 96.62) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E240)) (via (at 171.95 96.65) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.86 96.65) (end 171.95 96.65) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E23E)) (segment (start 172.92 96.71) (end 172.86 96.65) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E23D)) (via (at 172.92 96.71) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.03 96.71) (end 172.92 96.71) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E23B)) (segment (start 174.04 96.7) (end 174.03 96.71) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E23A)) (via (at 174.04 96.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 175.05 96.7) (end 174.04 96.7) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E238)) (segment (start 175.06 96.71) (end 175.05 96.7) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E237)) (via (at 175.06 96.71) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.15 96.71) (end 175.06 96.71) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E235)) (segment (start 176.16 96.7) (end 176.15 96.71) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E234)) (via (at 176.16 96.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.33 96.7) (end 176.16 96.7) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E232)) (segment (start 177.34 96.69) (end 177.33 96.7) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A3E231)) (via (at 177.34 96.69) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 177.88 96.69) (end 177.34 96.69) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E22F)) (segment (start 178.25 97.06) (end 177.88 96.69) (width 0.2) (layer B.Cu) (net 2) (tstamp 55A3E22E)) (via (at 178.25 97.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 139.65 107.9) (end 140.91 107.9) (width 0.2) (layer F.Cu) (net 2)) (segment (start 142 108.99) (end 142 110.05) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A2B52C)) (segment (start 140.91 107.9) (end 142 108.99) (width 0.2) (layer F.Cu) (net 2) (tstamp 55A2B52A)) (via (at 165.15 101.65) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 165.15 101.65) (end 164.95 101.85) (width 0.15) (layer F.Cu) (net 2)) (segment (start 164.975 101.475) (end 165.15 101.65) (width 0.2) (layer F.Cu) (net 2) (tstamp 552283E0)) (segment (start 164.975 101.475) (end 164.425 101.475) (width 0.2) (layer F.Cu) (net 2) (status 20)) (segment (start 172.15 103.19) (end 172.15 103.5) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 172.22 103.57) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.15 103.5) (end 172.22 103.57) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A22563)) (segment (start 140.78 110.34) (end 141.71 110.34) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 141.71 110.34) (end 142 110.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A2252A)) (segment (start 159.975 108.35) (end 160.405 108.155) (width 0.15) (layer F.Cu) (net 2)) (via (at 160.58 107.98) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 160.405 108.155) (end 160.58 107.98) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A12658)) (segment (start 159.975 108.35) (end 158.8 108.35) (width 0.15) (layer F.Cu) (net 2)) (segment (start 160.8 107.525) (end 159.975 108.35) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A125FF)) (segment (start 151.05 113.45) (end 151.325 113.175) (width 0.15) (layer F.Cu) (net 2)) (via (at 160.8 107) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 160.8 107.5) (end 160.8 107) (width 0.15) (layer B.Cu) (net 2) (tstamp 5584478A) (status 10)) (segment (start 151.15 113.55) (end 151.05 113.45) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A1246E)) (via (at 151.05 113.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 151.15 113.55) (end 151.15 114.05) (width 0.15) (layer B.Cu) (net 2) (status 20)) (segment (start 152.05 111.625) (end 155.325 111.625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A125E5)) (segment (start 151.325 112.35) (end 152.05 111.625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A125E3)) (segment (start 151.325 113.175) (end 151.325 112.35) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A125E1)) (segment (start 160.8 107) (end 160.8 107.525) (width 0.15) (layer F.Cu) (net 2)) (segment (start 158 108.95) (end 155.61 111.34) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A12644)) (segment (start 155.61 111.34) (end 155.325 111.625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A3E522)) (segment (start 158.2 108.95) (end 158 108.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A12641)) (segment (start 158.8 108.35) (end 158.2 108.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1263B)) (segment (start 164.95 103.175) (end 164.6625 103.4625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A12610)) (segment (start 164.6625 103.4625) (end 164.375 103.75) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A423DB)) (segment (start 164.95 101.85) (end 164.95 103.175) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1260B)) (segment (start 150.75 107.55) (end 150.875 107.675) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 150.875 107.675) (end 150.875 108) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A12539) (status 30)) (via (at 150.875 108) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2) (status 30)) (segment (start 158.5125 110.5625) (end 158.838909 110.888909) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 158.838909 110.888909) (end 158.838909 110.961091) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A124BE) (status 30)) (via (at 153.75 113.4) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 163.7125 109.8375) (end 163.7125 110.4375) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 163.7125 110.4375) (end 163.625 110.525) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1244E) (status 30)) (segment (start 163.625 110.525) (end 163.775 110.525) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 163.775 110.525) (end 163.95 110.35) (width 0.34) (layer F.Cu) (net 2) (tstamp 55A12448) (status 10)) (via (at 163.95 110.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 159.55 110.2) (end 159.55 109.875) (width 0.15) (layer F.Cu) (net 2)) (segment (start 159.4 110.05) (end 159.55 110.2) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A123F3)) (via (at 159.55 110.2) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 158.15 110.961091) (end 158.15 110.925) (width 0.15) (layer F.Cu) (net 2)) (segment (start 159.125 109.95) (end 159.4 109.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A123DB)) (segment (start 158.15 110.925) (end 158.5125 110.5625) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A123DA)) (segment (start 158.5125 110.5625) (end 159.125 109.95) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A124BC)) (segment (start 159.4 109.95) (end 159.4 110.05) (width 0.15) (layer F.Cu) (net 2)) (segment (start 163.7 109.85) (end 163.7125 109.8375) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1242E)) (segment (start 159.575 109.85) (end 163.7 109.85) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1242D)) (segment (start 159.55 109.875) (end 159.575 109.85) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A1242C)) (segment (start 176.8 98.46) (end 174.66 98.46) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 174.65 98.47) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 174.66 98.46) (end 174.65 98.47) (width 0.15) (layer F.Cu) (net 2) (tstamp 559E9D72)) (segment (start 176.8 98.46) (end 176.8 97.63) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 176.81 97.62) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 176.8 97.63) (end 176.81 97.62) (width 0.15) (layer F.Cu) (net 2) (tstamp 559E9D6E)) (segment (start 174.12 103.17) (end 173.59 103.17) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 173.58 103.16) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 173.59 103.17) (end 173.58 103.16) (width 0.15) (layer F.Cu) (net 2) (tstamp 559E9D64)) (segment (start 176.8 103.54) (end 174.5 103.54) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 174.5 103.54) (end 174.475 103.54) (width 0.15) (layer F.Cu) (net 2) (tstamp 559E9D61)) (via (at 174.5 103.54) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.75 105.25) (end 166.75 103.98) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 166.73 103.96) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 166.75 103.98) (end 166.73 103.96) (width 0.34) (layer F.Cu) (net 2) (tstamp 559E9D26)) (segment (start 166.75 105.25) (end 166.75 106.63) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 166.75 106.63) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 161.775 100.975) (end 161.505 100.975) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 161.505 100.975) (end 161.4 101.08) (width 0.34) (layer F.Cu) (net 2) (tstamp 559E97FF) (status 10)) (segment (start 161.4 101.08) (end 161.4 101.475) (width 0.34) (layer F.Cu) (net 2) (tstamp 559E9800)) (segment (start 161.775 101.475) (end 161.4 101.475) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 161.4 101.475) (end 161.175 101.475) (width 0.2) (layer F.Cu) (net 2) (tstamp 559E9803)) (segment (start 153.95 102.2) (end 154.3 102.2) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 154.65 102.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 154.3 102.2) (end 154.65 102.55) (width 0.15) (layer B.Cu) (net 2) (tstamp 559D7185)) (segment (start 153.95 102.2) (end 153.85 102.2) (width 0.15) (layer B.Cu) (net 2) (status 30)) (segment (start 153.85 102.2) (end 153.2 102.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 559D7182) (status 10)) (segment (start 152.65 103) (end 153.05 103) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 153.2 102.85) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 153.05 103) (end 153.2 102.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 559D717A)) (segment (start 144.55 106.25) (end 145.7 106.25) (width 0.34) (layer B.Cu) (net 2) (status 10)) (segment (start 145.66 105.75) (end 145.93 106.02) (width 0.34) (layer B.Cu) (net 2) (tstamp 559D2D2C)) (via (at 145.93 106.02) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.66 105.75) (end 144.55 105.75) (width 0.34) (layer B.Cu) (net 2) (status 20)) (segment (start 145.7 106.25) (end 145.93 106.02) (width 0.34) (layer B.Cu) (net 2) (tstamp 559D2D30)) (segment (start 144.55 104.25) (end 145.6 104.25) (width 0.34) (layer B.Cu) (net 2) (status 10)) (via (at 145.87 103.98) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.6 104.25) (end 145.87 103.98) (width 0.34) (layer B.Cu) (net 2) (tstamp 559D2D22)) (segment (start 158.7 117.45) (end 158.34 117.45) (width 0.2) (layer B.Cu) (net 2) (status 10)) (segment (start 158.43 117.36) (end 158.34 117.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C2A9D)) (via (at 158.34 117.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 158.43 117.36) (end 158.81 117.36) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 158.7 117.45) (end 158.8 117.35) (width 0.2) (layer B.Cu) (net 2) (tstamp 559C2BC2) (status 30)) (segment (start 156.35 117.35) (end 156.35 116.77) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 156.35 116.77) (end 156.34 116.76) (width 0.2) (layer F.Cu) (net 2) (tstamp 559C2BB5)) (via (at 156.34 116.76) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 156.34 116.76) (end 156.35 116.77) (width 0.2) (layer B.Cu) (net 2) (tstamp 559C2BB8)) (segment (start 156.35 116.77) (end 156.35 117.35) (width 0.2) (layer B.Cu) (net 2) (tstamp 559C2BB9) (status 20)) (segment (start 157.85 115.9) (end 156.99 115.9) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 157.49 115.4) (end 156.83 116.06) (width 0.15) (layer F.Cu) (net 2) (tstamp 55841771)) (via (at 156.83 116.06) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 157.49 115.4) (end 157.85 115.4) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 156.99 115.9) (end 156.83 116.06) (width 0.2) (layer F.Cu) (net 2) (tstamp 559C2BA8)) (segment (start 140.45 113.425) (end 140.45 113.19) (width 0.2) (layer B.Cu) (net 2) (status 30)) (segment (start 140.45 113.19) (end 140.7 112.94) (width 0.2) (layer B.Cu) (net 2) (tstamp 559C2BA0) (status 10)) (segment (start 140.7 112.94) (end 140.7 112.5) (width 0.2) (layer B.Cu) (net 2) (tstamp 559C2BA1)) (segment (start 164.75 115.7) (end 164.75 116.47) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 164.71 116.51) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.75 116.47) (end 164.71 116.51) (width 0.15) (layer B.Cu) (net 2) (tstamp 559C2B38)) (segment (start 165.31 115.5) (end 165.31 116.23) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 165.52 116.44) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.31 116.23) (end 165.52 116.44) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C2B29)) (segment (start 162.6 117.64) (end 163.03 117.64) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 163.03 117.64) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 163.03 117.64) (end 162.6 117.64) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 163.55 116.25) (end 163.65 116.25) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 163.65 116.25) (end 164.19 116.79) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C2AE9) (status 10)) (via (at 164.19 116.79) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 158.81 117.36) (end 158.89 117.28) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 158.89 117.28) (end 158.89 116.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C2AA1) (status 30)) (segment (start 161.55 116.6) (end 161.56 116.6) (width 0.15) (layer F.Cu) (net 2)) (segment (start 161.56 116.6) (end 162.6 117.64) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C2A31) (status 20)) (segment (start 139.8 117.05) (end 139.8 116.78) (width 0.34) (layer In1.Cu) (net 2)) (segment (start 140.7 112.91) (end 140.7 112.5) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28F5)) (segment (start 139.26 114.35) (end 140.7 112.91) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28F4)) (segment (start 139.26 116.24) (end 139.26 114.35) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28F3)) (segment (start 139.8 116.78) (end 139.26 116.24) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28F2)) (segment (start 142 110.05) (end 141.88 110.05) (width 0.34) (layer In1.Cu) (net 2)) (segment (start 140.7 111.23) (end 140.7 112.5) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28E8)) (segment (start 141.88 110.05) (end 140.7 111.23) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28E7)) (via (at 140.7 112.5) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.7 112.5) (end 140.7 113.325) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C1AD4) (status 20)) (segment (start 139.65 106.15) (end 140.77 106.15) (width 0.34) (layer In1.Cu) (net 2)) (via (at 139.65 106.15) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.92 106.3) (end 140.92 107.9) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28E2)) (segment (start 140.77 106.15) (end 140.92 106.3) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28E1)) (segment (start 139.65 107.9) (end 140.92 107.9) (width 0.34) (layer In1.Cu) (net 2)) (via (at 139.65 107.9) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (via (at 142 110.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.92 107.9) (end 142 108.98) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28DD)) (segment (start 142 108.98) (end 142 110.05) (width 0.34) (layer In1.Cu) (net 2) (tstamp 559C28DE)) (segment (start 160.5 104.95) (end 160.66 104.95) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 160.66 104.95) (end 160.95 105.24) (width 0.34) (layer F.Cu) (net 2) (tstamp 559C28A7) (status 10)) (via (at 160.95 105.24) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 165.31 113.7) (end 165.3 113.69) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 165.3 113.69) (end 165.3 112.89) (width 0.34) (layer F.Cu) (net 2) (tstamp 559C2423) (status 10)) (segment (start 165.3 112.89) (end 165.22 112.81) (width 0.34) (layer F.Cu) (net 2) (tstamp 559C2424)) (via (at 165.22 112.81) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 158.89 116.45) (end 158.89 116.76) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 151.2 104.65) (end 150.9 104.65) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 150.9 104.65) (end 150.35 105.2) (width 0.34) (layer F.Cu) (net 2) (tstamp 559C1EC8) (status 10)) (segment (start 151.1 105.4) (end 150.55 105.4) (width 0.34) (layer B.Cu) (net 2) (status 10)) (via (at 150.35 105.2) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 150.55 105.4) (end 150.35 105.2) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1EC4)) (segment (start 144.55 103.25) (end 145.75 103.25) (width 0.34) (layer B.Cu) (net 2) (status 10)) (via (at 145.85 103.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.75 103.25) (end 145.85 103.35) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1C6A)) (segment (start 140.95 110.25) (end 141.8 110.25) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 141.8 110.25) (end 142 110.05) (width 0.15) (layer B.Cu) (net 2) (tstamp 559C1C55)) (segment (start 142 110.05) (end 141.7 109.75) (width 0.15) (layer B.Cu) (net 2) (tstamp 559C1C4F) (status 20)) (segment (start 140.95 109.75) (end 141.7 109.75) (width 0.15) (layer B.Cu) (net 2) (status 30)) (segment (start 140.95 103.25) (end 140.95 102.7) (width 0.34) (layer B.Cu) (net 2) (status 10)) (via (at 140.95 102.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.95 105.75) (end 140.05 105.75) (width 0.34) (layer B.Cu) (net 2) (status 10)) (segment (start 139.75 106.25) (end 139.65 106.15) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1BE6)) (segment (start 139.75 106.25) (end 140.95 106.25) (width 0.34) (layer B.Cu) (net 2) (status 20)) (segment (start 140.05 105.75) (end 139.65 106.15) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1BEA)) (segment (start 140.95 106.75) (end 140.95 106.25) (width 0.34) (layer B.Cu) (net 2) (status 30)) (segment (start 140.95 107.75) (end 139.8 107.75) (width 0.34) (layer B.Cu) (net 2) (status 10)) (segment (start 139.9 107.9) (end 139.65 107.9) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1BCB)) (segment (start 139.9 107.9) (end 140.25 108.25) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1BC8) (status 20)) (segment (start 139.8 107.75) (end 139.65 107.9) (width 0.34) (layer B.Cu) (net 2) (tstamp 559C1BD0)) (segment (start 140.95 108.25) (end 140.25 108.25) (width 0.34) (layer B.Cu) (net 2) (status 30)) (segment (start 144.05 115.2175) (end 145.0825 115.2175) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 145.1 115.2) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 145.0825 115.2175) (end 145.1 115.2) (width 0.15) (layer F.Cu) (net 2) (tstamp 559C1B08)) (segment (start 140.675 113.35) (end 140.7 113.325) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 140.05 97.2) (end 140.65 97.2) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 140.7 97.15) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 140.65 97.2) (end 140.7 97.15) (width 0.34) (layer F.Cu) (net 2) (tstamp 55847B80)) (segment (start 172.25 114.9) (end 172.25 114.275) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 172.25 113.65) (end 172.25 114.275) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 172.25 114.275) (end 172.3 114.325) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 172.3 114.325) (end 172.3 115.05) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476CF) (status 10)) (segment (start 172.25 114.275) (end 172.3 114.225) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 172.3 114.225) (end 172.3 113.425) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476CC) (status 10)) (segment (start 172.3 115.05) (end 172.325 115.025) (width 0.34) (layer B.Cu) (net 2)) (via (at 172.3 115.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.3 114.325) (end 172.3 115.05) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476B8) (status 10)) (via (at 172.3 113.425) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 172.3 113.425) (end 172.3 114.225) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476C3) (status 20)) (segment (start 172.325 113.45) (end 172.3 113.425) (width 0.34) (layer B.Cu) (net 2) (tstamp 558476C9)) (segment (start 172.325 115.025) (end 172.325 113.45) (width 0.34) (layer B.Cu) (net 2) (tstamp 558476C8)) (segment (start 172.25 114.275) (end 172.275 114.25) (width 0.34) (layer F.Cu) (net 2) (status 30)) (segment (start 172.275 114.25) (end 172.325 114.275) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476B3) (status 30)) (via (at 172.325 114.275) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2) (status 30)) (segment (start 171.525 114.275) (end 171.05 114.275) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 170.9 114.425) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.05 114.275) (end 170.9 114.425) (width 0.34) (layer F.Cu) (net 2) (tstamp 558476AB)) (segment (start 163.35 99.9) (end 163.35 99.6) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 162.85 99.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 163.35 99.6) (end 162.85 99.1) (width 0.15) (layer F.Cu) (net 2) (tstamp 5584766C)) (segment (start 164.425 100.475) (end 164.775 100.475) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 165 100.25) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 164.775 100.475) (end 165 100.25) (width 0.15) (layer F.Cu) (net 2) (tstamp 55847662)) (segment (start 161.35 112.5) (end 161.225 112.5) (width 0.15) (layer In1.Cu) (net 2)) (via (at 161.35 112.5) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 161 112.85) (end 161.35 112.5) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E03) (status 10)) (segment (start 160.3 113.425) (end 160.3 114) (width 0.15) (layer In1.Cu) (net 2) (tstamp 55847535) (status 20)) (segment (start 161.225 112.5) (end 160.3 113.425) (width 0.15) (layer In1.Cu) (net 2) (tstamp 55847534)) (segment (start 161.45 115.4) (end 160.4 115.4) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 160.4 115.4) (end 159.65 114.65) (width 0.15) (layer F.Cu) (net 2) (tstamp 55847530) (status 30)) (via (at 158.91 112.21) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 158.91 113.91) (end 159 114) (width 0.34) (layer In1.Cu) (net 2) (tstamp 55847520) (status 30)) (segment (start 159.2 102.7) (end 159.2 102.25) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 159.7 102.2) (end 159.7 102.6) (width 0.15) (layer B.Cu) (net 2) (tstamp 55846C05) (status 20)) (segment (start 159.475 101.975) (end 159.7 102.2) (width 0.15) (layer B.Cu) (net 2) (tstamp 55846C04)) (via (at 159.475 101.975) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 159.2 102.25) (end 159.475 101.975) (width 0.15) (layer F.Cu) (net 2) (tstamp 55846C00)) (segment (start 170.575 104.6) (end 171.025 104.6) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 171.1 104.525) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 171.025 104.6) (end 171.1 104.525) (width 0.15) (layer B.Cu) (net 2) (tstamp 55846B4F)) (segment (start 160.85 107.55) (end 160.8 107.5) (width 0.15) (layer B.Cu) (net 2) (status 30)) (segment (start 155.8 113.39) (end 156.11 113.39) (width 0.15) (layer F.Cu) (net 2)) (via (at 156.4 113.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 156.11 113.39) (end 156.4 113.1) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E66)) (segment (start 155.8 113.39) (end 155.1 113.525) (width 0.15) (layer F.Cu) (net 2)) (via (at 155 113.425) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.1 113.525) (end 155 113.425) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E60)) (segment (start 155.85 112.3) (end 155.85 113.34) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 155.8 113.39) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.85 113.34) (end 155.8 113.39) (width 0.15) (layer B.Cu) (net 2) (tstamp 55843E5D)) (segment (start 157.85 113.4) (end 157.06 113.4) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 157.06 113.4) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 155.81 113.4) (end 157.06 113.4) (width 0.34) (layer F.Cu) (net 2) (tstamp 55842271)) (segment (start 155.8 113.39) (end 155.81 113.4) (width 0.34) (layer F.Cu) (net 2)) (segment (start 157.06 113.4) (end 157.56 113.9) (width 0.15) (layer F.Cu) (net 2) (tstamp 558416F5) (status 20)) (segment (start 163.56 112.76) (end 163.56 113.44) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 163.55 113.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 163.56 113.44) (end 163.55 113.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E30)) (segment (start 161.45 113.9) (end 161.9 113.9) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 162.4 113.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 162.25 113.55) (end 162.4 113.55) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E27)) (segment (start 161.9 113.9) (end 162.25 113.55) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843E26)) (segment (start 160.9 112.85) (end 161 112.85) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 160.9 116.45) (end 161.4 116.45) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 161.55 116.6) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 161.4 116.45) (end 161.55 116.6) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843CA7)) (segment (start 158.838909 110.961091) (end 159 110.8) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 155.8 113.39) (end 155.8 113.3) (width 0.15) (layer F.Cu) (net 2)) (segment (start 158.138909 110.961091) (end 158.15 110.961091) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843C83)) (segment (start 158.15 110.961091) (end 158.838909 110.961091) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A123D8) (status 20)) (segment (start 155.8 113.3) (end 158.138909 110.961091) (width 0.15) (layer F.Cu) (net 2) (tstamp 55843C82)) (segment (start 153.75 113.4) (end 153.86 113.29) (width 0.34) (layer F.Cu) (net 2)) (segment (start 153.75 114.2) (end 153.75 113.4) (width 0.34) (layer F.Cu) (net 2) (status 10)) (segment (start 158.9 112.25) (end 158.9 112.85) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 158.91 112.24) (end 158.91 112.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 558416FF)) (segment (start 158.9 112.25) (end 158.91 112.24) (width 0.15) (layer F.Cu) (net 2) (tstamp 558416FD)) (segment (start 155.7 113.29) (end 155.8 113.39) (width 0.34) (layer F.Cu) (net 2) (tstamp 5584225D)) (segment (start 153.86 113.29) (end 155.7 113.29) (width 0.34) (layer F.Cu) (net 2) (tstamp 5584225B)) (segment (start 153.75 116) (end 153.75 116.97) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 153.75 116.97) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 2)) (segment (start 157.85 115.9) (end 157.74 115.9) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 161.45 115.4) (end 161.69 115.4) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 157.85 113.9) (end 157.56 113.9) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 147.8 105.1) (end 147.8 104.6) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 147.8 104.6) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 169.7875 109.72) (end 169.7875 109.0375) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 169.81 109.015) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 169.7875 109.0375) (end 169.81 109.015) (width 0.34) (layer F.Cu) (net 2) (tstamp 557303D9)) (segment (start 168.835 112.26) (end 168.835 113.09) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 168.86 113.115) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 168.835 113.09) (end 168.86 113.115) (width 0.34) (layer F.Cu) (net 2) (tstamp 557303D5)) (segment (start 154.4 107.3) (end 153.81 107.3) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 153.45 107.66) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 153.81 107.3) (end 153.45 107.66) (width 0.2) (layer F.Cu) (net 2) (tstamp 552AB14C)) (segment (start 169.15 116.9) (end 168.55 116.9) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 168.55 116.9) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 173.75 112.5) (end 173.75 111.9) (width 0.34) (layer F.Cu) (net 2) (status 10)) (segment (start 173.75 111.9) (end 173.75 111.95) (width 0.34) (layer B.Cu) (net 2) (tstamp 5522C51F)) (via (at 173.75 111.9) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 168.9 105.8) (end 168.9 106.65) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 168.9 106.65) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 174.55 107.2) (end 175.25 107.2) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 175.25 107.2) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 147.75 99.8) (end 147.85 99.9) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 147.85 99.9) (end 148.25 99.9) (width 0.2) (layer F.Cu) (net 2) (tstamp 55229BF2) (status 10)) (via (at 148.25 99.9) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 148.25 99.9) (end 148.4 99.9) (width 0.2) (layer B.Cu) (net 2) (tstamp 55229BF8)) (segment (start 148.4 99.9) (end 148.75 100.25) (width 0.2) (layer B.Cu) (net 2) (tstamp 55229BF9) (status 20)) (segment (start 142.5 100.8) (end 142.5 100.4) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 142.85 99.95) (end 142.9 100) (width 0.2) (layer F.Cu) (net 2) (tstamp 55229B19)) (via (at 142.9 100) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 142.85 99.95) (end 142.85 99.5) (width 0.2) (layer F.Cu) (net 2) (status 20)) (segment (start 142.5 100.4) (end 142.9 100) (width 0.2) (layer F.Cu) (net 2) (tstamp 55229B39)) (segment (start 149.2 96.95) (end 148.65 96.95) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 148.65 96.95) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 153.05 97.2) (end 153.55 97.2) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 153.55 97.2) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 153.05 100.45) (end 153.55 100.45) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 153.9 100.8) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 153.55 100.45) (end 153.9 100.8) (width 0.34) (layer F.Cu) (net 2) (tstamp 55229A36)) (segment (start 158.85 101.15) (end 158.85 101.75) (width 0.34) (layer F.Cu) (net 2) (status 10)) (via (at 158.85 101.75) (size 0.7) (layers F.Cu B.Cu) (net 2)) (via (at 161.05 101.6) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 161.175 101.475) (end 161.05 101.6) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522989F)) (segment (start 161.025 103.6) (end 160.6 103.6) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 160.6 103.6) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 168.8 98.075) (end 168.825 98.05) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 168.825 98.05) (end 169.425 98.05) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522983D) (status 10)) (via (at 169.425 98.05) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 165.175 98.75) (end 165.2 98.775) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 161.1 98.075) (end 161.1 98.3) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 162.35 99.9) (end 162.275 99.9) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 162.275 99.9) (end 162.05 99.675) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522982A) (status 10)) (via (at 162.05 99.675) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 164.425 100.475) (end 164.575 100.475) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 174.475 103.54) (end 176.8 103.54) (width 0.254) (layer F.Cu) (net 2) (tstamp 552281D3) (status 20)) (segment (start 153.65 106.8) (end 153.5 106.95) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522AB79)) (via (at 153.5 106.95) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 154.4 106.8) (end 153.65 106.8) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 160.25 105.8) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 160.25 106.1) (end 160.25 105.8) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522B31D) (status 10)) (segment (start 160.05 106.3) (end 160.25 106.1) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 160.25 106.15) (end 160.25 105.8) (width 0.2) (layer B.Cu) (net 2) (tstamp 5522B321) (status 10)) (segment (start 160.4 106.3) (end 160.25 106.15) (width 0.2) (layer B.Cu) (net 2) (status 30)) (segment (start 158.6 103.65) (end 158.3 103.65) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 161.025 100.975) (end 160.9 100.85) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522B3BF)) (segment (start 160.8 100.75) (end 160.25 100.75) (width 0.2) (layer B.Cu) (net 2) (status 20)) (via (at 160.9 100.85) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 160.8 100.75) (end 160.9 100.85) (width 0.2) (layer B.Cu) (net 2) (tstamp 5522B3BB)) (segment (start 161.775 100.975) (end 161.025 100.975) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 156.95 104.75) (end 156.95 104) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 156.95 104) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 156.45 104.5) (end 156.95 104) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522B43B) (status 10)) (segment (start 156.45 104.75) (end 156.45 104.5) (width 0.2) (layer F.Cu) (net 2) (status 30)) (segment (start 157.45 104.4) (end 157.7 104.15) (width 0.2) (layer F.Cu) (net 2) (tstamp 5522B43E)) (via (at 157.7 104.15) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 157.45 104.75) (end 157.45 104.4) (width 0.2) (layer F.Cu) (net 2) (status 10)) (via (at 156.55 102.55) (size 0.7) (layers F.Cu B.Cu) (net 2)) (segment (start 156.2 102.55) (end 156.55 102.55) (width 0.2) (layer F.Cu) (net 2) (status 10)) (segment (start 174.085 103.15) (end 174.475 103.54) (width 0.254) (layer F.Cu) (net 2) (status 10)) (segment (start 141.78 105.68) (end 141.78 105.78) (width 0.34) (layer F.Cu) (net 3) (status 30)) (segment (start 141.78 105.78) (end 144.8 108.8) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A80D45) (status 10)) (segment (start 144.8 108.8) (end 144.8 110.2) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71DA)) (segment (start 144.8 110.2) (end 146.3 111.7) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71DC)) (segment (start 146.3 111.7) (end 149.37 111.7) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71DD)) (segment (start 139.81 105.26) (end 141.36 105.26) (width 0.34) (layer F.Cu) (net 3) (status 20)) (segment (start 141.36 105.26) (end 141.78 105.68) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A80D42) (status 30)) (segment (start 159.25 105.8) (end 159.875 105.175) (width 0.34) (layer In2.Cu) (net 3)) (segment (start 153.575 102.175) (end 148.8 102.175) (width 0.34) (layer In2.Cu) (net 3) (tstamp 55847B68)) (segment (start 153.975 101.775) (end 153.575 102.175) (width 0.34) (layer In2.Cu) (net 3) (tstamp 55847B67)) (segment (start 157.6 101.775) (end 153.975 101.775) (width 0.34) (layer In2.Cu) (net 3) (tstamp 55847B5E)) (segment (start 159.875 104.05) (end 157.6 101.775) (width 0.34) (layer In2.Cu) (net 3) (tstamp 55847B5D)) (segment (start 159.875 105.175) (end 159.875 104.05) (width 0.34) (layer In2.Cu) (net 3) (tstamp 55A67945)) (segment (start 149.37 111.7) (end 148.83 111.7) (width 0.2) (layer F.Cu) (net 3)) (via (at 148.8 111.67) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 148.83 111.7) (end 148.8 111.67) (width 0.2) (layer F.Cu) (net 3) (tstamp 55A2B521)) (segment (start 139.65 105.1) (end 139.81 105.26) (width 0.34) (layer F.Cu) (net 3)) (segment (start 139.81 105.26) (end 139.6 105.05) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A80D40)) (segment (start 139.6 105.05) (end 139.6 102.4) (width 0.34) (layer F.Cu) (net 3) (tstamp 559C1C15)) (segment (start 139.6 102.4) (end 140 102) (width 0.34) (layer F.Cu) (net 3) (tstamp 559C1C16)) (segment (start 140 102) (end 140 101.58) (width 0.34) (layer F.Cu) (net 3) (tstamp 559C1C17)) (via (at 140 101.58) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 140 101.58) (end 139.98 101.58) (width 0.15) (layer B.Cu) (net 3) (tstamp 55A24DFF)) (segment (start 162.14 111.32) (end 162.23 111.32) (width 0.34) (layer F.Cu) (net 3) (status 30)) (segment (start 162.23 111.32) (end 162.525 111.025) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A12445) (status 10)) (segment (start 162.525 110.525) (end 162.525 111.025) (width 0.34) (layer F.Cu) (net 3) (status 10)) (segment (start 162.525 111.025) (end 162.8 111.3) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A12442) (status 20)) (segment (start 162.5 110.55) (end 161.925 110.55) (width 0.15) (layer F.Cu) (net 3) (status 10)) (segment (start 161.9 110.525) (end 161.925 110.55) (width 0.15) (layer F.Cu) (net 3) (tstamp 55A12435)) (via (at 161.925 110.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 161.9 110.525) (end 161.375 110.525) (width 0.15) (layer F.Cu) (net 3) (status 20)) (segment (start 162.5 110.55) (end 162.525 110.525) (width 0.15) (layer F.Cu) (net 3) (tstamp 55A12439) (status 30)) (segment (start 149.37 111.7) (end 149.4 111.7) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A2B51F)) (segment (start 149.4 111.7) (end 149.4 111.2) (width 0.34) (layer B.Cu) (net 3)) (segment (start 149.15 102.525) (end 148.8 102.175) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71D1)) (segment (start 149.15 104.65) (end 149.15 102.525) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71D0)) (segment (start 149.2 104.7) (end 149.15 104.65) (width 0.34) (layer F.Cu) (net 3) (tstamp 559D71CF)) (via (at 149.2 104.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 149.2 106.4) (end 149.2 104.7) (width 0.34) (layer B.Cu) (net 3) (tstamp 559D71CB)) (segment (start 150.1 107.3) (end 149.2 106.4) (width 0.34) (layer B.Cu) (net 3) (tstamp 559D71C9)) (segment (start 150.1 110.5) (end 150.1 107.3) (width 0.34) (layer B.Cu) (net 3) (tstamp 559D71C8)) (segment (start 149.4 111.2) (end 150.1 110.5) (width 0.34) (layer B.Cu) (net 3) (tstamp 559D71C7)) (segment (start 150.1 115.2) (end 149.4 114.5) (width 0.34) (layer In2.Cu) (net 3) (tstamp 559C1BBA)) (segment (start 149.4 114.5) (end 149.4 111.7) (width 0.34) (layer In2.Cu) (net 3) (tstamp 559C1BBB)) (segment (start 150.4 115.2) (end 150.1 115.2) (width 0.34) (layer In2.Cu) (net 3)) (via (at 149.4 111.7) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 162.45 116.25) (end 162.45 116.02) (width 0.34) (layer F.Cu) (net 3) (status 30)) (segment (start 162.45 116.02) (end 162.49 115.98) (width 0.34) (layer F.Cu) (net 3) (tstamp 559C29E9) (status 10)) (segment (start 162.49 115.98) (end 162.45 115.94) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C29EF) (status 30)) (via (at 162.49 115.98) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3) (status 30)) (segment (start 162.45 115.94) (end 162.45 115.7) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C29F0) (status 30)) (segment (start 161.42 104.28) (end 160.11 104.28) (width 0.34) (layer B.Cu) (net 3)) (segment (start 161.95 104.81) (end 161.42 104.28) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C2898)) (segment (start 161.95 109.35) (end 161.95 104.81) (width 0.34) (layer B.Cu) (net 3)) (segment (start 159.25 105.14) (end 159.25 105.8) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C28AC)) (segment (start 160.11 104.28) (end 159.25 105.14) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C28AB)) (segment (start 161.95 110.3) (end 161.95 109.35) (width 0.34) (layer B.Cu) (net 3)) (segment (start 164.8 109.25) (end 161.85 109.25) (width 0.34) (layer B.Cu) (net 3) (tstamp 55844764)) (segment (start 167.685 114.585) (end 167.685 114.04) (width 0.15) (layer F.Cu) (net 3) (status 20)) (via (at 167.7 114.6) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 167.685 114.585) (end 167.7 114.6) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843E45)) (segment (start 167.7 114.6) (end 167.7 112.15) (width 0.34) (layer B.Cu) (net 3)) (segment (start 167.7 112.15) (end 164.8 109.25) (width 0.34) (layer B.Cu) (net 3) (tstamp 55844762)) (segment (start 161.95 109.35) (end 161.85 109.25) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C23D2)) (segment (start 151.15 115.15) (end 157.7 115.15) (width 0.34) (layer B.Cu) (net 3) (status 10)) (segment (start 157.63 115.08) (end 157.7 115.08) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C23CB)) (segment (start 157.7 115.15) (end 157.63 115.08) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C23C9)) (segment (start 160.1 116.4) (end 158.1 116.4) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447EC)) (segment (start 157.95 113) (end 160.65 113) (width 0.34) (layer B.Cu) (net 3)) (segment (start 160.65 113) (end 160.95 113.3) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447FA)) (segment (start 157.7 116.8) (end 157.7 115.08) (width 0.34) (layer B.Cu) (net 3)) (segment (start 157.7 115.08) (end 157.7 114.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C23CC)) (segment (start 157.95 113.85) (end 157.95 113) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447F3)) (segment (start 157.7 114.1) (end 157.95 113.85) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447F0)) (segment (start 157.95 112.65) (end 157.75 112.45) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447F5)) (segment (start 157.95 113) (end 157.95 112.65) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447F8)) (segment (start 158.1 116.4) (end 157.7 116.8) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447ED)) (segment (start 157.6 112.3) (end 157.75 112.45) (width 0.15) (layer B.Cu) (net 3) (tstamp 55843E5A)) (via (at 157.75 112.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (via (at 157.7 116.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 157.7 116.8) (end 157.45 117.05) (width 0.15) (layer B.Cu) (net 3) (tstamp 55843D79)) (segment (start 160.95 113.3) (end 161.6 113.3) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447FB)) (segment (start 158.061091 112.138909) (end 157.75 112.45) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843CA2)) (segment (start 158.025 116.825) (end 157.725 116.825) (width 0.15) (layer F.Cu) (net 3)) (segment (start 157.725 116.825) (end 157.7 116.8) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843D77)) (segment (start 161.6 113.3) (end 162.15 112.75) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447FC)) (segment (start 139.65 105.1) (end 139.65 102.4) (width 0.34) (layer B.Cu) (net 3)) (via (at 139.6 103.6) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 146.875 102.175) (end 148.8 102.175) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C2D)) (segment (start 146.4 102.65) (end 146.875 102.175) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C2C)) (segment (start 142.65 102.65) (end 146.4 102.65) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C25)) (segment (start 141.85 101.85) (end 142.65 102.65) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C24)) (segment (start 140.2 101.85) (end 141.85 101.85) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C23)) (segment (start 139.65 102.4) (end 140.2 101.85) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C22)) (via (at 139.65 105.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 140 101.58) (end 140 100.9) (width 0.34) (layer F.Cu) (net 3) (tstamp 55A24DFC) (status 20)) (segment (start 140.95 103.75) (end 139.75 103.75) (width 0.34) (layer B.Cu) (net 3) (status 10)) (segment (start 139.75 103.75) (end 139.6 103.6) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C07)) (segment (start 140.95 104.25) (end 139.7 104.25) (width 0.34) (layer B.Cu) (net 3) (status 10)) (via (at 139.6 104.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 139.6 104.35) (end 140 104.75) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1BFF)) (segment (start 139.7 104.25) (end 139.6 104.35) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1C04)) (segment (start 140.95 104.75) (end 140 104.75) (width 0.34) (layer B.Cu) (net 3) (status 10)) (segment (start 139.8 105.25) (end 139.65 105.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1BF6)) (segment (start 139.8 105.25) (end 140.95 105.25) (width 0.34) (layer B.Cu) (net 3) (status 20)) (segment (start 140 104.75) (end 139.65 105.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 559C1BFB)) (segment (start 151.1 115.2) (end 150.4 115.2) (width 0.15) (layer B.Cu) (net 3) (status 10)) (segment (start 150.3825 115.2175) (end 150.4 115.2) (width 0.15) (layer F.Cu) (net 3) (tstamp 559C17D2)) (via (at 150.4 115.2) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 150.3825 115.2175) (end 149.25 115.2175) (width 0.15) (layer F.Cu) (net 3) (status 20)) (segment (start 151.1 115.2) (end 151.15 115.15) (width 0.15) (layer B.Cu) (net 3) (tstamp 559C17E2) (status 30)) (segment (start 148.8 102.175) (end 149.575 101.4) (width 0.34) (layer B.Cu) (net 3)) (segment (start 153.6 98.1) (end 149.8 98.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 558446E9)) (segment (start 154.6 99.1) (end 153.6 98.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 558446E4)) (segment (start 158.6 99.1) (end 154.6 99.1) (width 0.34) (layer B.Cu) (net 3) (status 10)) (segment (start 149.575 101.4) (end 149.575 98.325) (width 0.34) (layer B.Cu) (net 3) (tstamp 55847B74)) (segment (start 149.575 98.325) (end 149.8 98.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 55847B75)) (via (at 148.8 102.175) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 162.15 112.75) (end 162.15 111.95) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447FD)) (segment (start 162.45 115.1) (end 161.4 115.1) (width 0.34) (layer B.Cu) (net 3)) (segment (start 161.4 115.1) (end 160.1 116.4) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447EB)) (segment (start 162.8 112.25) (end 163.6 112.25) (width 0.34) (layer B.Cu) (net 3)) (segment (start 162.45 115.05) (end 162.45 115.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447D6)) (segment (start 162.45 115.1) (end 162.45 115.7) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447E9) (status 20)) (segment (start 162.8 114.7) (end 162.45 115.05) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447D5)) (segment (start 163.65 114.7) (end 162.8 114.7) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447D4)) (segment (start 164.45 113.9) (end 163.65 114.7) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447D3)) (segment (start 164.45 113.1) (end 164.45 113.9) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447D1)) (segment (start 163.6 112.25) (end 164.45 113.1) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447CF)) (segment (start 161.95 110.3) (end 161.85 110.2) (width 0.34) (layer B.Cu) (net 3)) (segment (start 162.15 111.95) (end 161.95 111.75) (width 0.34) (layer B.Cu) (net 3)) (segment (start 161.95 111.75) (end 161.95 110.3) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447B8)) (segment (start 162.8 112.25) (end 162.45 112.25) (width 0.34) (layer B.Cu) (net 3)) (segment (start 162.45 112.25) (end 162.15 111.95) (width 0.34) (layer B.Cu) (net 3) (tstamp 558447B5)) (segment (start 162.14 111.94) (end 162.15 111.95) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843DEE)) (via (at 162.15 111.95) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 162.14 111.32) (end 162.14 111.94) (width 0.15) (layer F.Cu) (net 3) (status 10)) (via (at 162.8 112.25) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 3)) (segment (start 162.8 112.25) (end 162.46 112.59) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843E34) (status 20)) (segment (start 156.95 112.3) (end 157.6 112.3) (width 0.15) (layer B.Cu) (net 3) (status 10)) (segment (start 158.061091 112.138909) (end 158.061091 111.738909) (width 0.15) (layer F.Cu) (net 3) (status 20)) (segment (start 162.46 112.76) (end 162.46 112.59) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 161.45 113.4) (end 161.5 113.4) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 161.5 113.4) (end 162.14 112.76) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843E2C) (status 10)) (segment (start 162.14 112.76) (end 162.46 112.76) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843E2D) (status 20)) (segment (start 162.14 111.32) (end 162.78 111.32) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 162.78 111.32) (end 162.8 111.3) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843DF2) (status 30)) (segment (start 157.45 117.05) (end 157.45 117.35) (width 0.15) (layer B.Cu) (net 3) (tstamp 55843D7A) (status 20)) (segment (start 157.45 117.35) (end 157.5 117.35) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 157.5 117.35) (end 158.025 116.825) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843D72) (status 10)) (segment (start 158.025 116.825) (end 158.4 116.45) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843D75) (status 20)) (segment (start 158.4 112.85) (end 158.3 112.75) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 158.3 112.75) (end 158.3 111.977818) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843C7E) (status 10)) (segment (start 158.3 111.977818) (end 158.061091 111.738909) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843C7F) (status 20)) (segment (start 161.45 115.9) (end 162.1 115.9) (width 0.15) (layer F.Cu) (net 3) (status 10)) (segment (start 162.1 115.9) (end 162.45 116.25) (width 0.15) (layer F.Cu) (net 3) (tstamp 55843B7F) (status 20)) (segment (start 158.4 112.85) (end 158.4 112.57) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 166.91 113.565) (end 167.21 113.565) (width 0.34) (layer F.Cu) (net 3) (status 10)) (segment (start 167.21 113.565) (end 167.685 114.04) (width 0.34) (layer F.Cu) (net 3) (tstamp 5573040D) (status 20)) (segment (start 159.35 106.3) (end 159.3 106.3) (width 0.34) (layer B.Cu) (net 3) (status 30)) (segment (start 158 106.3) (end 158.95 106.3) (width 0.2) (layer F.Cu) (net 3) (status 30)) (segment (start 159.25 106) (end 159.25 105.8) (width 0.2) (layer F.Cu) (net 3) (tstamp 5522B316)) (segment (start 158.95 106.3) (end 159.25 106) (width 0.2) (layer F.Cu) (net 3) (status 10)) (via (at 159.25 105.8) (size 0.7) (layers F.Cu B.Cu) (net 3)) (segment (start 159.25 106.25) (end 159.25 105.8) (width 0.2) (layer B.Cu) (net 3) (tstamp 5522B31A) (status 10)) (segment (start 159.3 106.3) (end 159.25 106.25) (width 0.2) (layer B.Cu) (net 3) (status 30)) (segment (start 155.95 104.4) (end 155.95 104.75) (width 0.2) (layer F.Cu) (net 4) (tstamp 5522B42B) (status 20)) (segment (start 156.1 104.25) (end 155.95 104.4) (width 0.2) (layer F.Cu) (net 4) (tstamp 5522B42A)) (segment (start 156.1 103.75) (end 156.1 104.25) (width 0.2) (layer F.Cu) (net 4) (tstamp 5522B429) (status 10)) (segment (start 156.2 103.65) (end 156.1 103.75) (width 0.2) (layer F.Cu) (net 4) (status 30)) (segment (start 157.85 114.9) (end 157.1 114.9) (width 0.34) (layer F.Cu) (net 5) (status 10)) (segment (start 157.1 114.9) (end 156.7 115.3) (width 0.34) (layer F.Cu) (net 5) (tstamp 55730580) (status 20)) (segment (start 155.6 115.3) (end 155.1 115.3) (width 0.34) (layer F.Cu) (net 6) (status 10)) (segment (start 155.1 115.3) (end 154.4 116) (width 0.34) (layer F.Cu) (net 6) (tstamp 55730583) (status 20)) (segment (start 146.25 101.9) (end 146.25 101.01) (width 0.2) (layer In2.Cu) (net 7)) (segment (start 153.178401 104.719999) (end 151.369999 104.719999) (width 0.2) (layer In2.Cu) (net 7)) (segment (start 158 105.25) (end 158.5 104.75) (width 0.2) (layer F.Cu) (net 7) (tstamp 5522AB8A) (status 10)) (via (at 158.5 104.75) (size 0.7) (layers F.Cu B.Cu) (net 7)) (segment (start 158.3 104.95) (end 153.408402 104.95) (width 0.2) (layer In2.Cu) (net 7)) (segment (start 158.5 104.75) (end 158.3 104.95) (width 0.2) (layer In2.Cu) (net 7)) (segment (start 153.408402 104.95) (end 153.178401 104.719999) (width 0.2) (layer In2.Cu) (net 7)) (segment (start 148.15 103.8) (end 146.25 101.9) (width 0.2) (layer In2.Cu) (net 7) (tstamp 559C1ED4)) (segment (start 150.45 103.8) (end 148.15 103.8) (width 0.2) (layer In2.Cu) (net 7) (tstamp 559C1ED2)) (segment (start 151.369999 104.719999) (end 150.45 103.8) (width 0.2) (layer In2.Cu) (net 7) (tstamp 559C1ED1)) (segment (start 143.68 98.44) (end 143.27 98.44) (width 0.2) (layer In2.Cu) (net 7) (tstamp 55A6B020)) (segment (start 146.25 101.01) (end 143.68 98.44) (width 0.2) (layer In2.Cu) (net 7) (tstamp 55A6B01F)) (segment (start 143.23 98.4) (end 142.85 98.4) (width 0.2) (layer F.Cu) (net 7) (tstamp 559C2B7A) (status 20)) (via (at 143.27 98.44) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 7)) (segment (start 143.27 98.44) (end 143.23 98.4) (width 0.2) (layer F.Cu) (net 7) (tstamp 559C2B79)) (segment (start 143.075 97) (end 143.075 98.175) (width 0.2) (layer F.Cu) (net 7) (status 30)) (segment (start 143.075 98.175) (end 142.85 98.4) (width 0.2) (layer F.Cu) (net 7) (tstamp 558484A0) (status 30)) (segment (start 141.6 98.4) (end 141.5 98.4) (width 0.2) (layer F.Cu) (net 7) (status 30)) (segment (start 142.95 98.3) (end 142.85 98.4) (width 0.2) (layer F.Cu) (net 7) (tstamp 55229B16) (status 30)) (segment (start 141.6 98.4) (end 142.85 98.4) (width 0.2) (layer F.Cu) (net 7) (status 30)) (segment (start 158 105.3) (end 158 105.25) (width 0.2) (layer F.Cu) (net 7) (status 30)) (segment (start 141.6 100.8) (end 141.6 99.5) (width 0.15) (layer F.Cu) (net 8) (status 30)) (segment (start 141.88 99.43) (end 141.49 99.43) (width 0.15) (layer B.Cu) (net 8) (status 10)) (segment (start 141.24 99.68) (end 141.42 99.5) (width 0.15) (layer F.Cu) (net 8) (tstamp 55A6AF15) (status 20)) (via (at 141.24 99.68) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 8)) (segment (start 141.49 99.43) (end 141.24 99.68) (width 0.15) (layer B.Cu) (net 8) (tstamp 55A6AF13)) (segment (start 141.42 99.5) (end 141.6 99.5) (width 0.15) (layer F.Cu) (net 8) (tstamp 55A6AF16) (status 30)) (segment (start 155.45 102.55) (end 155.45 101.55) (width 0.34) (layer F.Cu) (net 9) (status 30)) (segment (start 155.45 103.65) (end 155.45 104.75) (width 0.34) (layer F.Cu) (net 10) (status 30)) (segment (start 157.85 114.4) (end 156.95 114.4) (width 0.34) (layer F.Cu) (net 11) (status 30)) (segment (start 156.95 114.4) (end 156.7 114.15) (width 0.34) (layer F.Cu) (net 11) (tstamp 5573057D) (status 30)) (segment (start 155.6 114.15) (end 154.45 114.15) (width 0.34) (layer F.Cu) (net 12) (status 30)) (segment (start 154.45 114.15) (end 154.4 114.2) (width 0.34) (layer F.Cu) (net 12) (tstamp 55730586) (status 30)) (segment (start 144.95 99.85) (end 144.14 99.85) (width 0.15) (layer F.Cu) (net 13)) (segment (start 142.15 99.5) (end 142.45 99.2) (width 0.15) (layer In2.Cu) (net 13) (tstamp 559C1C3B)) (segment (start 142.45 99.2) (end 143.3 99.2) (width 0.15) (layer In2.Cu) (net 13) (tstamp 559C1C40)) (segment (start 146.1 101) (end 144.95 99.85) (width 0.15) (layer F.Cu) (net 13) (tstamp 559C1C45) (status 20)) (segment (start 139.85 107.25) (end 140.95 107.25) (width 0.15) (layer B.Cu) (net 13) (status 10)) (via (at 139.65 107.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 13)) (segment (start 139.85 107.25) (end 139.65 107.05) (width 0.15) (layer B.Cu) (net 13) (tstamp 559C1BDC)) (segment (start 142.15 105.15) (end 142.15 99.5) (width 0.15) (layer In2.Cu) (net 13) (tstamp 559C1C37)) (segment (start 140.25 107.05) (end 142.15 105.15) (width 0.15) (layer In2.Cu) (net 13) (tstamp 559C1C35)) (segment (start 139.65 107.05) (end 140.25 107.05) (width 0.15) (layer In2.Cu) (net 13)) (segment (start 143.49 99.2) (end 143.3 99.2) (width 0.15) (layer In2.Cu) (net 13) (tstamp 55AA382B)) (segment (start 143.77 99.48) (end 143.49 99.2) (width 0.15) (layer In2.Cu) (net 13) (tstamp 55AA382A)) (via (at 143.77 99.48) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 13)) (segment (start 144.14 99.85) (end 143.77 99.48) (width 0.15) (layer F.Cu) (net 13) (tstamp 55AA3828)) (segment (start 146.1 101) (end 146.15 101) (width 0.15) (layer F.Cu) (net 13) (tstamp 559C1C46) (status 30)) (segment (start 147.75 100.9) (end 146.25 100.9) (width 0.34) (layer F.Cu) (net 13) (status 30)) (segment (start 146.25 100.9) (end 146.15 101) (width 0.34) (layer F.Cu) (net 13) (tstamp 5522C4FC) (status 30)) (segment (start 163.69 115.2) (end 164.51 115.2) (width 0.34) (layer F.Cu) (net 14) (status 30)) (segment (start 164.51 115.2) (end 164.69 115.38) (width 0.34) (layer F.Cu) (net 14) (tstamp 55841EA6) (status 30)) (segment (start 164.66 113.7) (end 164.03 114.33) (width 0.34) (layer F.Cu) (net 15) (status 10)) (segment (start 164.03 114.33) (end 163.7 114.33) (width 0.34) (layer F.Cu) (net 15) (tstamp 559C2420) (status 20)) (segment (start 163.7 114.33) (end 163.94 114.33) (width 0.34) (layer F.Cu) (net 15) (status 30)) (segment (start 168.5 100.92) (end 167.104999 99.524999) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 151.375 97.2) (end 151.275 97.3) (width 0.15) (layer F.Cu) (net 16) (tstamp 55846B82)) (segment (start 151.95 97.2) (end 151.375 97.2) (width 0.15) (layer F.Cu) (net 16) (status 10)) (segment (start 151.275 97.3) (end 152.295 98.32) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55846B88)) (segment (start 159.332002 98.32) (end 152.295 98.32) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 163.499998 100.35) (end 164.324999 99.524999) (width 0.34) (layer In2.Cu) (net 16) (tstamp 5584767E)) (segment (start 161.362002 100.35) (end 163.499998 100.35) (width 0.34) (layer In2.Cu) (net 16) (tstamp 5584767C)) (segment (start 159.332002 98.32) (end 161.362002 100.35) (width 0.34) (layer In2.Cu) (net 16)) (via (at 151.275 97.3) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 16)) (segment (start 164.49 99.524999) (end 164.324999 99.524999) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55A3FF1F)) (segment (start 166.555001 99.524999) (end 164.49 99.524999) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55A3E2B6)) (segment (start 170.19 102.61) (end 168.5 100.92) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55AA3221)) (segment (start 172.85 106.2) (end 172.85 108.955026) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 172.46 105.81) (end 170.19 105.81) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55AA3214)) (segment (start 172.85 106.2) (end 172.46 105.81) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55AA3212)) (segment (start 170.19 105.81) (end 170.19 102.61) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 167.104999 99.524999) (end 166.555001 99.524999) (width 0.34) (layer In2.Cu) (net 16) (tstamp 55AA3237)) (segment (start 172.85 108.955026) (end 172.85 109.45) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 172.85 108.955026) (end 172.9 108.905026) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 172.15 116.7) (end 171.6 116.15) (width 0.34) (layer In2.Cu) (net 16)) (segment (start 171.6 116.15) (end 171.6 110.7) (width 0.34) (layer In2.Cu) (net 16) (tstamp 558476AF)) (via (at 172.15 116.7) (size 0.7) (layers F.Cu B.Cu) (net 16)) (segment (start 171.6 110.7) (end 172.85 109.45) (width 0.34) (layer In2.Cu) (net 16) (tstamp 5522C524)) (segment (start 174.55 108.7) (end 172.95076 108.7) (width 0.34) (layer F.Cu) (net 16) (status 30)) (segment (start 151.7 96.95) (end 150.7 96.95) (width 0.34) (layer F.Cu) (net 16) (status 30)) (segment (start 171.4 116.9) (end 170.25 116.9) (width 0.34) (layer F.Cu) (net 16) (status 30)) (segment (start 172.85 108.80076) (end 172.85 109.45) (width 0.34) (layer F.Cu) (net 16) (status 10)) (via (at 172.85 109.45) (size 0.7) (layers F.Cu B.Cu) (net 16)) (segment (start 172.15 116.7) (end 172.15 116.65) (width 0.34) (layer F.Cu) (net 16) (tstamp 5522C531)) (segment (start 172.15 116.65) (end 172.15 116.7) (width 0.34) (layer F.Cu) (net 16) (tstamp 5522C532)) (segment (start 172.15 116.7) (end 172.15 116.65) (width 0.34) (layer F.Cu) (net 16) (tstamp 5522C534)) (segment (start 172.95076 108.7) (end 172.85 108.80076) (width 0.34) (layer F.Cu) (net 16) (tstamp 5522C509) (status 30)) (segment (start 151.95 97.2) (end 151.7 96.95) (width 0.34) (layer F.Cu) (net 16) (status 30)) (segment (start 151.9 98.3) (end 151.9 97.25) (width 0.34) (layer F.Cu) (net 16) (status 30)) (segment (start 151.9 97.25) (end 151.95 97.2) (width 0.34) (layer F.Cu) (net 16) (tstamp 55229A57) (status 30)) (segment (start 171.65 116.65) (end 171.4 116.9) (width 0.2) (layer F.Cu) (net 16) (status 30)) (segment (start 172.8 116.65) (end 172.15 116.65) (width 0.2) (layer F.Cu) (net 16) (status 10)) (segment (start 172.15 116.65) (end 171.65 116.65) (width 0.2) (layer F.Cu) (net 16) (tstamp 5522C535) (status 20)) (segment (start 148.9 99.25) (end 148.6 98.95) (width 0.15) (layer B.Cu) (net 17) (status 10)) (segment (start 148.6 98.95) (end 148.2 98.95) (width 0.15) (layer B.Cu) (net 17) (tstamp 55844731)) (segment (start 148.7 97.65) (end 148.2 98.15) (width 0.15) (layer F.Cu) (net 17)) (segment (start 150.9 98.3) (end 150.9 97.9) (width 0.2) (layer F.Cu) (net 17) (tstamp 55229AB1) (status 10)) (segment (start 150.65 97.65) (end 150.9 97.9) (width 0.2) (layer F.Cu) (net 17) (tstamp 55229AB0)) (segment (start 148.7 97.65) (end 150.65 97.65) (width 0.2) (layer F.Cu) (net 17) (tstamp 55229AAF)) (segment (start 147.95 98.7) (end 147.35 98.7) (width 0.15) (layer B.Cu) (net 17) (tstamp 5584472E) (status 20)) (segment (start 148.2 98.95) (end 147.95 98.7) (width 0.15) (layer B.Cu) (net 17) (tstamp 5584472D)) (via (at 148.2 98.95) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 17)) (segment (start 148.2 98.15) (end 148.2 98.95) (width 0.15) (layer F.Cu) (net 17) (tstamp 5584472B)) (segment (start 148.65 99.05) (end 148.75 99.15) (width 0.2) (layer B.Cu) (net 17) (tstamp 55229BD4) (status 30)) (segment (start 173.98 113.775) (end 172.975 113.775) (width 0.34) (layer F.Cu) (net 18) (status 30)) (segment (start 174.43 114.225) (end 173.98 113.775) (width 0.34) (layer F.Cu) (net 18) (status 20)) (segment (start 176.8 114.225) (end 174.43 114.225) (width 0.34) (layer F.Cu) (net 18) (status 10)) (segment (start 159.7 103.5) (end 160.6 102.6) (width 0.2) (layer B.Cu) (net 19) (tstamp 5522B345) (status 30)) (segment (start 159.7 103.65) (end 159.7 103.5) (width 0.2) (layer B.Cu) (net 19) (status 30)) (via (at 161.15 102.6) (size 0.7) (layers F.Cu B.Cu) (net 19)) (segment (start 161.15 102.6) (end 161.775 101.975) (width 0.2) (layer F.Cu) (net 19) (tstamp 5522B34A) (status 20)) (segment (start 160.6 102.6) (end 161.15 102.6) (width 0.2) (layer B.Cu) (net 19) (status 10)) (segment (start 161.05 102.7) (end 161.15 102.6) (width 0.2) (layer F.Cu) (net 19) (tstamp 5522B359)) (segment (start 160.15 102.7) (end 161.05 102.7) (width 0.2) (layer F.Cu) (net 19) (status 10)) (segment (start 159.7 103.3) (end 160.3 102.7) (width 0.2) (layer F.Cu) (net 19) (tstamp 5522B390) (status 20)) (segment (start 159.7 103.65) (end 159.7 103.3) (width 0.2) (layer F.Cu) (net 19) (status 10)) (segment (start 160.25 102.25) (end 160.6 102.6) (width 0.2) (layer B.Cu) (net 19) (tstamp 5522B3B8) (status 20)) (segment (start 160.25 101.85) (end 160.25 102.25) (width 0.2) (layer B.Cu) (net 19) (status 10)) (segment (start 164.25 102.7) (end 166.4 102.7) (width 0.15) (layer B.Cu) (net 20)) (segment (start 163.75 103.2) (end 164.25 102.7) (width 0.15) (layer B.Cu) (net 20) (tstamp 559D7295) (status 10)) (segment (start 168.275 104.575) (end 168.6 104.575) (width 0.15) (layer B.Cu) (net 20) (tstamp 559E9D31) (status 20)) (segment (start 166.4 102.7) (end 168.275 104.575) (width 0.15) (layer B.Cu) (net 20) (tstamp 559E9D30)) (segment (start 163.55 103.2) (end 163.75 103.2) (width 0.15) (layer B.Cu) (net 20) (status 30)) (segment (start 169.575 104.6) (end 168.625 104.6) (width 0.15) (layer B.Cu) (net 20) (status 30)) (segment (start 168.625 104.6) (end 168.6 104.575) (width 0.15) (layer B.Cu) (net 20) (tstamp 55846B5D) (status 30)) (segment (start 169.975 105.875) (end 169.975 105.675) (width 0.15) (layer B.Cu) (net 20) (status 30)) (segment (start 169.975 105.675) (end 169.575 105.275) (width 0.15) (layer B.Cu) (net 20) (tstamp 55846B59) (status 10)) (segment (start 169.575 105.275) (end 169.575 104.6) (width 0.15) (layer B.Cu) (net 20) (tstamp 55846B5A) (status 20)) (segment (start 162.85 103.15) (end 163.05 103.35) (width 0.15) (layer F.Cu) (net 20) (tstamp 5522B2B9)) (segment (start 162.85 102.55) (end 162.85 103.15) (width 0.15) (layer F.Cu) (net 20) (status 10)) (segment (start 163.2 103.2) (end 163.55 103.2) (width 0.15) (layer B.Cu) (net 20) (tstamp 5522B2BC) (status 20)) (segment (start 163.05 103.35) (end 163.2 103.2) (width 0.15) (layer B.Cu) (net 20) (tstamp 5522B2BB)) (via (at 163.05 103.35) (size 0.7) (layers F.Cu B.Cu) (net 20)) (segment (start 163.85 99.9) (end 163.85 98.975) (width 0.34) (layer F.Cu) (net 21) (status 30)) (segment (start 163.85 98.975) (end 164.075 98.75) (width 0.34) (layer F.Cu) (net 21) (tstamp 55A67F44) (status 30)) (segment (start 162.7 104.45) (end 163.55 104.45) (width 0.34) (layer B.Cu) (net 21) (tstamp 55846C47) (status 20)) (segment (start 161.9 100.75) (end 161.95 100.75) (width 0.34) (layer B.Cu) (net 21)) (segment (start 163.5 97.95) (end 162.05 97.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D727C)) (segment (start 163.75 98.2) (end 163.5 97.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D727B)) (segment (start 163.75 99.45) (end 163.75 98.2) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D727A)) (segment (start 163.25 99.95) (end 163.75 99.45) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D7279)) (segment (start 162.75 99.95) (end 163.25 99.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D7278)) (segment (start 161.95 100.75) (end 162.75 99.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D7277)) (segment (start 162.125 103.6) (end 162.125 103.875) (width 0.34) (layer F.Cu) (net 21) (status 10)) (via (at 162.5 104.25) (size 0.7) (layers F.Cu B.Cu) (net 21)) (segment (start 162.125 103.875) (end 162.5 104.25) (width 0.34) (layer F.Cu) (net 21) (tstamp 55846C4E)) (segment (start 162.5 104.25) (end 162.7 104.45) (width 0.34) (layer B.Cu) (net 21)) (segment (start 162.5 104.25) (end 161.95 103.7) (width 0.34) (layer B.Cu) (net 21) (tstamp 55229903)) (segment (start 160.75 97.95) (end 160.75 99.6) (width 0.34) (layer B.Cu) (net 21) (tstamp 55229906)) (segment (start 161.95 100.8) (end 161.9 100.75) (width 0.34) (layer B.Cu) (net 21) (tstamp 55229905)) (segment (start 161.9 100.75) (end 160.75 99.6) (width 0.34) (layer B.Cu) (net 21) (tstamp 559D7275)) (segment (start 161.95 103.7) (end 161.95 100.8) (width 0.34) (layer B.Cu) (net 21) (tstamp 55229904)) (segment (start 159.95 98.2) (end 160.3 98.2) (width 0.34) (layer B.Cu) (net 21) (status 10)) (segment (start 160.3 98.2) (end 160.55 97.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 552298F7)) (segment (start 160.55 97.95) (end 160.75 97.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 552298F8)) (segment (start 162.175 98.075) (end 162.6 98.075) (width 0.34) (layer F.Cu) (net 21) (tstamp 552298FB) (status 20)) (segment (start 162.05 97.95) (end 162.175 98.075) (width 0.34) (layer F.Cu) (net 21) (tstamp 552298FA)) (via (at 162.05 97.95) (size 0.7) (layers F.Cu B.Cu) (net 21)) (segment (start 160.75 97.95) (end 162.05 97.95) (width 0.34) (layer B.Cu) (net 21) (tstamp 55229909)) (segment (start 158.6 98.2) (end 159.95 98.2) (width 0.34) (layer B.Cu) (net 21) (status 30)) (segment (start 162.35 102.55) (end 162.35 103.375) (width 0.2) (layer F.Cu) (net 21) (status 30)) (segment (start 162.35 103.375) (end 162.125 103.6) (width 0.2) (layer F.Cu) (net 21) (tstamp 5522988B) (status 30)) (segment (start 164.075 98.75) (end 164.075 98.225) (width 0.2) (layer F.Cu) (net 21) (status 10)) (segment (start 164.225 98.075) (end 167.3 98.075) (width 0.2) (layer F.Cu) (net 21) (tstamp 55229848) (status 20)) (segment (start 164.075 98.225) (end 164.225 98.075) (width 0.2) (layer F.Cu) (net 21) (tstamp 55229847)) (segment (start 167.3 98.075) (end 167.275 98.05) (width 0.2) (layer F.Cu) (net 21) (status 30)) (segment (start 164.075 98.75) (end 163.85 98.975) (width 0.2) (layer F.Cu) (net 21) (status 30)) (segment (start 162.6 98.075) (end 162.7 98.075) (width 0.2) (layer F.Cu) (net 21) (status 30)) (segment (start 162.7 98.075) (end 163.375 98.75) (width 0.2) (layer F.Cu) (net 21) (tstamp 55229832) (status 10)) (segment (start 163.375 98.75) (end 164.075 98.75) (width 0.2) (layer F.Cu) (net 21) (tstamp 55229833) (status 20)) (segment (start 171.525 115.675) (end 171.4 115.8) (width 0.2) (layer F.Cu) (net 22) (status 30)) (segment (start 171.525 114.775) (end 171.525 115.675) (width 0.2) (layer F.Cu) (net 22) (status 30)) (segment (start 159.2 104.95) (end 158.35 105.8) (width 0.2) (layer F.Cu) (net 23) (tstamp 5522B681)) (segment (start 158.35 105.8) (end 158 105.8) (width 0.2) (layer F.Cu) (net 23) (tstamp 5522B682) (status 20)) (segment (start 159.6 104.95) (end 159.2 104.95) (width 0.2) (layer F.Cu) (net 23) (status 10)) (via (at 143.05 101.49) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 24)) (segment (start 143.05 101.49) (end 143.04 101.49) (width 0.15) (layer B.Cu) (net 24)) (segment (start 143.04 101.49) (end 141.88 100.33) (width 0.15) (layer B.Cu) (net 24) (tstamp 55A6AF02) (status 20)) (segment (start 143.29 101.49) (end 143.05 101.49) (width 0.15) (layer In2.Cu) (net 24) (tstamp 55A6AEFD)) (segment (start 143.5 101.7) (end 143.29 101.49) (width 0.15) (layer In2.Cu) (net 24) (tstamp 55A6AEFC)) (segment (start 146.175 102.575) (end 146.95 103.35) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1E86)) (segment (start 145.125 102.575) (end 146.175 102.575) (width 0.15) (layer In2.Cu) (net 24)) (segment (start 146.95 103.35) (end 146.95 105.1) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1E8A)) (segment (start 153.75 106.3) (end 149.7 106.3) (width 0.15) (layer In2.Cu) (net 24)) (segment (start 146.95 105.1) (end 147.225 105.375) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1E8C)) (segment (start 157.04 108.24) (end 155.19 108.24) (width 0.15) (layer In2.Cu) (net 24)) (segment (start 154.3 106.85) (end 153.75 106.3) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1D6D)) (segment (start 154.3 107.35) (end 154.3 106.85) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1D6B)) (segment (start 155.19 108.24) (end 154.3 107.35) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1D6A)) (segment (start 145.125 102.575) (end 144.25 101.7) (width 0.15) (layer In2.Cu) (net 24) (tstamp 5584556B)) (segment (start 148.775 105.375) (end 147.225 105.375) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1ECD)) (segment (start 149.7 106.3) (end 148.775 105.375) (width 0.15) (layer In2.Cu) (net 24) (tstamp 559C1ECB)) (segment (start 144.25 101.7) (end 143.5 101.7) (width 0.15) (layer In2.Cu) (net 24)) (segment (start 158.785257 107.035257) (end 158.825 107.075) (width 0.2) (layer In2.Cu) (net 24) (tstamp 5584765C)) (segment (start 158.289464 107.035257) (end 158.785257 107.035257) (width 0.2) (layer In2.Cu) (net 24)) (segment (start 157.04 108.24) (end 157.98 107.3) (width 0.2) (layer In2.Cu) (net 24) (tstamp 559C1D68)) (segment (start 158.024721 107.3) (end 157.98 107.3) (width 0.2) (layer In2.Cu) (net 24)) (segment (start 158.289464 107.035257) (end 158.024721 107.3) (width 0.2) (layer In2.Cu) (net 24)) (segment (start 158.6 107.3) (end 158.825 107.075) (width 0.15) (layer F.Cu) (net 24) (tstamp 55847657)) (via (at 158.825 107.075) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 24)) (segment (start 158 107.3) (end 158.6 107.3) (width 0.15) (layer F.Cu) (net 24) (status 10)) (segment (start 144.85 100.24) (end 144.85 99.15) (width 0.15) (layer B.Cu) (net 25) (status 30)) (segment (start 144.85 99.15) (end 144.83 99.13) (width 0.15) (layer B.Cu) (net 25) (tstamp 55A6AED6) (status 30)) (segment (start 143.75 100.95) (end 144.14 100.95) (width 0.15) (layer B.Cu) (net 25)) (via (at 143.75 100.95) (size 0.7) (layers F.Cu B.Cu) (net 25)) (segment (start 144.2 100.95) (end 143.75 100.95) (width 0.2) (layer F.Cu) (net 25) (tstamp 55229C49) (status 10)) (segment (start 144.14 100.95) (end 144.85 100.24) (width 0.15) (layer B.Cu) (net 25) (tstamp 55A6AED3) (status 20)) (segment (start 144.25 101) (end 144.2 100.95) (width 0.2) (layer F.Cu) (net 25) (status 30)) (segment (start 146.7 99.45) (end 146.05 99.45) (width 0.2) (layer B.Cu) (net 26)) (segment (start 146.05 99.45) (end 145.73 99.13) (width 0.2) (layer B.Cu) (net 26) (tstamp 55A6AEDB) (status 20)) (segment (start 147.35 99.6) (end 146.85 99.6) (width 0.15) (layer B.Cu) (net 26) (status 10)) (segment (start 146.85 99.6) (end 146.7 99.45) (width 0.15) (layer B.Cu) (net 26) (tstamp 55844727)) (segment (start 146.7 98.85) (end 146.7 99.45) (width 0.2) (layer F.Cu) (net 26) (tstamp 55229BCC)) (via (at 146.7 99.45) (size 0.7) (layers F.Cu B.Cu) (net 26)) (segment (start 146.15 98.3) (end 146.7 98.85) (width 0.2) (layer F.Cu) (net 26) (status 10)) (segment (start 172.975 115.575) (end 172.8 115.75) (width 0.2) (layer F.Cu) (net 27) (status 30)) (segment (start 172.975 114.775) (end 172.975 115.575) (width 0.2) (layer F.Cu) (net 27) (status 30)) (segment (start 155.45 99.95) (end 155.45 100.65) (width 0.34) (layer F.Cu) (net 28) (status 20)) (segment (start 156 99.95) (end 155.45 99.95) (width 0.34) (layer F.Cu) (net 28) (status 10)) (segment (start 155.45 99.95) (end 154.95 99.95) (width 0.34) (layer F.Cu) (net 28) (tstamp 552299B2) (status 20)) (segment (start 153.05 99.95) (end 154.05 99.95) (width 0.34) (layer F.Cu) (net 29) (status 30)) (segment (start 158.1 99.95) (end 156.9 99.95) (width 0.34) (layer F.Cu) (net 30) (status 30)) (segment (start 154.4 106.3) (end 152.95 106.3) (width 0.2) (layer F.Cu) (net 31) (status 30)) (segment (start 152.95 106.3) (end 152.9 106.25) (width 0.2) (layer F.Cu) (net 31) (tstamp 5522C7BF) (status 30)) (segment (start 161.775 100.475) (end 161.575 100.475) (width 0.34) (layer F.Cu) (net 33) (status 30)) (segment (start 161.575 100.475) (end 161.05 99.95) (width 0.34) (layer F.Cu) (net 33) (tstamp 552298B5) (status 10)) (segment (start 161.05 99.95) (end 159.6 99.95) (width 0.34) (layer F.Cu) (net 33) (tstamp 552298B6) (status 20)) (segment (start 164.97 100.973) (end 164.968 100.975) (width 0.34) (layer F.Cu) (net 34) (status 30)) (segment (start 164.968 100.975) (end 164.425 100.975) (width 0.34) (layer F.Cu) (net 34) (tstamp 55A3E4BC) (status 30)) (segment (start 174.86 100.973) (end 176.773 100.973) (width 0.15) (layer F.Cu) (net 35) (status 30)) (segment (start 176.773 100.973) (end 176.8 101) (width 0.15) (layer F.Cu) (net 35) (status 30)) (segment (start 174.152 102.04) (end 174.152 102.238) (width 0.34) (layer F.Cu) (net 36)) (segment (start 174.152 102.238) (end 174.12 102.27) (width 0.34) (layer F.Cu) (net 36) (tstamp 55AA2FB4)) (segment (start 174.102 102.04) (end 174.102 102.252) (width 0.15) (layer F.Cu) (net 36) (status 30)) (segment (start 174.102 102.252) (end 174.12 102.27) (width 0.15) (layer F.Cu) (net 36) (status 30)) (segment (start 151.8 106.25) (end 150.75 106.25) (width 0.2) (layer F.Cu) (net 37) (status 30)) (segment (start 152.617 112.52) (end 155.233 112.52) (width 0.34) (layer F.Cu) (net 38) (status 30)) (segment (start 152.26 116.313) (end 152.26 112.876999) (width 0.34) (layer F.Cu) (net 39) (status 30)) (segment (start 159.167 109.1) (end 163.123 109.1) (width 0.34) (layer F.Cu) (net 40) (status 30)) (segment (start 165.487771 106.991813) (end 163.562437 108.917147) (width 0.34) (layer F.Cu) (net 41) (status 30)) (segment (start 163.562437 108.917147) (end 163.562437 108.91798) (width 0.34) (layer F.Cu) (net 41) (tstamp 55A27F72) (status 30)) (segment (start 165.669792 106.552376) (end 165.67 106.552168) (width 0.34) (layer F.Cu) (net 42) (status 30)) (segment (start 165.67 106.552168) (end 165.67 106) (width 0.34) (layer F.Cu) (net 42) (tstamp 55A27F75) (status 30)) (segment (start 165.727 102.42) (end 165.727 104.443) (width 0.34) (layer F.Cu) (net 43) (status 30)) (segment (start 165.727 104.443) (end 165.67 104.5) (width 0.34) (layer F.Cu) (net 43) (tstamp 55A27F7A) (status 30)) (segment (start 165.677 104.373) (end 165.55 104.5) (width 0.34) (layer F.Cu) (net 43) (tstamp 55295EB1) (status 30)) (segment (start 165.677 104.423) (end 165.55 104.55) (width 0.34) (layer F.Cu) (net 43) (tstamp 5522B4D7) (status 30)) (segment (start 165.677 104.373) (end 165.55 104.5) (width 0.34) (layer F.Cu) (net 43) (tstamp 5522B4F3) (status 30)) (segment (start 165.677 104.373) (end 165.55 104.5) (width 0.34) (layer F.Cu) (net 43) (tstamp 552A49E5) (status 30)) (segment (start 158.710417 109.3) (end 158.710417 109.299166) (width 0.34) (layer F.Cu) (net 44)) (segment (start 155.672437 112.33798) (end 158.710417 109.3) (width 0.34) (layer F.Cu) (net 44) (status 10)) (segment (start 158.710417 109.299166) (end 158.727563 109.28202) (width 0.34) (layer F.Cu) (net 44) (tstamp 559C2368) (status 20)) (segment (start 152.616999 116.67) (end 152.743 116.67) (width 0.34) (layer F.Cu) (net 45) (status 30)) (segment (start 163.48 116.82) (end 163.62 116.96) (width 0.15) (layer B.Cu) (net 46) (status 30)) (segment (start 163.62 116.96) (end 163.62 117.93) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2B14) (status 10)) (segment (start 163.62 117.93) (end 163.32 118.23) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2B1A)) (segment (start 163.32 118.23) (end 160.7 118.23) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2B1B)) (segment (start 160.7 118.23) (end 160.19 117.72) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2B1E)) (segment (start 160.19 117.72) (end 160.19 117.32) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2AFA) (status 20)) (segment (start 160.19 117.32) (end 159.9 117.35) (width 0.15) (layer B.Cu) (net 46) (tstamp 559C2AFC) (status 30)) (segment (start 159.9 116.45) (end 159.9 117.03) (width 0.15) (layer F.Cu) (net 46) (status 10)) (via (at 160.19 117.32) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 46) (status 30)) (segment (start 159.9 117.03) (end 160.19 117.32) (width 0.15) (layer F.Cu) (net 46) (tstamp 559C2A7C) (status 20)) (segment (start 163.55 116.65) (end 163.35 116.45) (width 0.15) (layer B.Cu) (net 46) (tstamp 5584754E) (status 10)) (segment (start 163.35 115.7) (end 163.35 116.45) (width 0.15) (layer B.Cu) (net 46) (status 10)) (segment (start 163.85 115.7) (end 163.35 115.7) (width 0.15) (layer B.Cu) (net 46) (status 30)) (segment (start 161.45 114.9) (end 162.05 114.9) (width 0.34) (layer F.Cu) (net 47) (status 10)) (segment (start 162.05 114.9) (end 162.4 115.25) (width 0.34) (layer F.Cu) (net 47) (tstamp 557304FF) (status 20)) (segment (start 161.45 114.4) (end 162.25 114.4) (width 0.34) (layer F.Cu) (net 48) (status 10)) (segment (start 162.25 114.4) (end 162.4 114.25) (width 0.34) (layer F.Cu) (net 48) (tstamp 557304FC) (status 20)) (segment (start 161.08 117.38) (end 161.34 117.64) (width 0.15) (layer F.Cu) (net 49)) (segment (start 161.34 117.64) (end 161.5 117.64) (width 0.15) (layer F.Cu) (net 49) (tstamp 55AA29FC)) (segment (start 160.4 116.45) (end 160.4 116.7) (width 0.15) (layer F.Cu) (net 49) (status 30)) (segment (start 160.4 116.7) (end 161.08 117.38) (width 0.15) (layer F.Cu) (net 49) (tstamp 559C2A79) (status 10)) (segment (start 161.08 117.38) (end 161.05 117.35) (width 0.15) (layer F.Cu) (net 49) (tstamp 55AA29FA) (status 10)) (segment (start 161.5 117.64) (end 161.56 117.64) (width 0.15) (layer B.Cu) (net 49) (status 30)) (segment (start 161.56 117.64) (end 162.38 116.82) (width 0.15) (layer B.Cu) (net 49) (tstamp 559C2A34) (status 30)) (segment (start 162.38 116.82) (end 162.58 116.82) (width 0.15) (layer B.Cu) (net 49) (tstamp 559C2A35) (status 30)) (segment (start 161.21 117.35) (end 161.05 117.35) (width 0.15) (layer B.Cu) (net 49)) (via (at 161.05 117.35) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 49)) (segment (start 161.21 117.35) (end 161.5 117.64) (width 0.15) (layer B.Cu) (net 49) (tstamp 559C2A1F) (status 20)) (segment (start 169.7875 112.26) (end 170.5 112.26) (width 0.34) (layer F.Cu) (net 50) (status 30)) (segment (start 170.5 112.26) (end 170.65 112.41) (width 0.34) (layer F.Cu) (net 50) (tstamp 55841DFB) (status 30)) (segment (start 169.8925 112.365) (end 169.7875 112.26) (width 0.34) (layer F.Cu) (net 50) (tstamp 557303B7) (status 30)) (segment (start 171.525 113.775) (end 171.265 113.775) (width 0.34) (layer F.Cu) (net 51) (status 10)) (segment (start 171 113.51) (end 170.65 113.51) (width 0.34) (layer F.Cu) (net 51) (tstamp 55841E07) (status 20)) (segment (start 171.265 113.775) (end 171 113.51) (width 0.34) (layer F.Cu) (net 51) (tstamp 55841E04)) (segment (start 166.04 112.85) (end 165.96 112.93) (width 0.34) (layer F.Cu) (net 52) (status 30)) (segment (start 165.96 112.93) (end 165.96 113.7) (width 0.34) (layer F.Cu) (net 52) (tstamp 559C241D) (status 30)) (segment (start 166.91 112.465) (end 166.755 112.465) (width 0.34) (layer F.Cu) (net 53) (status 30)) (segment (start 166.755 112.465) (end 166.04 111.75) (width 0.34) (layer F.Cu) (net 53) (tstamp 559C241A) (status 30)) (segment (start 167.8825 112.26) (end 167.64 112.26) (width 0.34) (layer F.Cu) (net 53) (status 30)) (segment (start 167.64 112.26) (end 167.435 112.465) (width 0.34) (layer F.Cu) (net 53) (tstamp 557303FF) (status 10)) (segment (start 167.435 112.465) (end 166.91 112.465) (width 0.34) (layer F.Cu) (net 53) (tstamp 55730400) (status 20)) (segment (start 140 100) (end 140 98.75) (width 0.34) (layer F.Cu) (net 54) (status 30)) (segment (start 140 98.75) (end 140.05 98.7) (width 0.34) (layer F.Cu) (net 54) (tstamp 55A6AF0D) (status 30)) (segment (start 159.55 111.65) (end 159.52 111.65) (width 0.15) (layer B.Cu) (net 55)) (via (at 159.55 111.65) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 55)) (segment (start 159.52 111.65) (end 158.33 110.46) (width 0.15) (layer B.Cu) (net 55) (tstamp 55A3E501) (status 20)) (segment (start 158.33 110.46) (end 158.16 110.46) (width 0.15) (layer B.Cu) (net 55) (tstamp 55A3E502) (status 30)) (segment (start 160.475 110.525) (end 160.375 110.525) (width 0.15) (layer F.Cu) (net 55) (status 30)) (segment (start 160.375 110.525) (end 159.55 111.35) (width 0.15) (layer F.Cu) (net 55) (tstamp 55A12431) (status 10)) (segment (start 159.55 111.35) (end 159.55 111.65) (width 0.15) (layer F.Cu) (net 55) (tstamp 55A12432)) (segment (start 159.9 112) (end 159.55 111.65) (width 0.15) (layer F.Cu) (net 55) (tstamp 558476E0)) (segment (start 159.9 112) (end 159.9 112.85) (width 0.15) (layer F.Cu) (net 55) (status 20)) (segment (start 160.43 111.505) (end 159.755 110.83) (width 0.15) (layer B.Cu) (net 56)) (segment (start 158.5 109.51) (end 158.16 109.51) (width 0.15) (layer B.Cu) (net 56) (tstamp 55A3E4FE) (status 20)) (segment (start 158.94 109.95) (end 158.5 109.51) (width 0.15) (layer B.Cu) (net 56) (tstamp 55A3E4FD)) (segment (start 158.94 110.5) (end 158.94 109.95) (width 0.15) (layer B.Cu) (net 56) (tstamp 55A3E4FC)) (segment (start 159.27 110.83) (end 158.94 110.5) (width 0.15) (layer B.Cu) (net 56) (tstamp 55A3E4FB)) (segment (start 159.755 110.83) (end 159.27 110.83) (width 0.15) (layer B.Cu) (net 56) (tstamp 55A3E4FA)) (segment (start 158.16 109.51) (end 158.35 109.32) (width 0.15) (layer B.Cu) (net 56) (status 30)) (segment (start 160.43 111.72) (end 160.43 111.505) (width 0.15) (layer B.Cu) (net 56)) (via (at 160.43 111.72) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 56)) (segment (start 160.4 112.85) (end 160.4 111.75) (width 0.15) (layer F.Cu) (net 56) (status 10)) (segment (start 160.4 111.75) (end 160.43 111.72) (width 0.15) (layer F.Cu) (net 56) (tstamp 55843DFD)) (segment (start 160.43 111.72) (end 160.83 111.32) (width 0.34) (layer F.Cu) (net 56)) (segment (start 161.24 111.32) (end 160.83 111.32) (width 0.34) (layer F.Cu) (net 56) (tstamp 55841FC7) (status 10)) (segment (start 160.4 112.85) (end 160.35 112.8) (width 0.15) (layer F.Cu) (net 56) (status 30)) (segment (start 148.15 102.85) (end 148.15 100.95) (width 0.15) (layer In2.Cu) (net 57)) (segment (start 147.75 103.25) (end 148.15 102.85) (width 0.15) (layer F.Cu) (net 57) (tstamp 559C1E96)) (via (at 148.15 102.85) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 57)) (segment (start 146.65 104.2) (end 147.15 103.7) (width 0.15) (layer F.Cu) (net 57)) (segment (start 147.15 103.4) (end 147.3 103.25) (width 0.15) (layer F.Cu) (net 57) (tstamp 559C1E67)) (segment (start 147.15 103.7) (end 147.15 103.4) (width 0.15) (layer F.Cu) (net 57) (tstamp 559C1E5E)) (segment (start 147.3 103.25) (end 147.75 103.25) (width 0.15) (layer F.Cu) (net 57)) (segment (start 145.39 107.25) (end 145.39 107.26) (width 0.15) (layer B.Cu) (net 57) (tstamp 559C2AC1)) (segment (start 145.39 107.26) (end 145.75 107.62) (width 0.15) (layer B.Cu) (net 57) (tstamp 559C2AC2)) (segment (start 144.55 107.25) (end 145.39 107.25) (width 0.15) (layer B.Cu) (net 57) (status 10)) (segment (start 146.65 106.87) (end 146.65 104.2) (width 0.15) (layer F.Cu) (net 57) (tstamp 559C2AD2)) (segment (start 146.76 106.98) (end 146.65 106.87) (width 0.15) (layer F.Cu) (net 57) (tstamp 559C2AD1)) (via (at 146.76 106.98) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 57)) (segment (start 146.76 107.48) (end 146.76 106.98) (width 0.15) (layer B.Cu) (net 57) (tstamp 559C2ACF)) (segment (start 146.62 107.62) (end 146.76 107.48) (width 0.15) (layer B.Cu) (net 57) (tstamp 559C2ACE)) (segment (start 145.75 107.62) (end 146.62 107.62) (width 0.15) (layer B.Cu) (net 57) (tstamp 559C2ACD)) (segment (start 147.45 100.25) (end 147.45 97) (width 0.15) (layer In2.Cu) (net 57) (tstamp 55A679A2)) (segment (start 148.15 100.95) (end 147.45 100.25) (width 0.15) (layer In2.Cu) (net 57) (tstamp 55A6799E)) (segment (start 170.075 103.3) (end 170.66 102.715) (width 0.15) (layer B.Cu) (net 57) (status 10)) (segment (start 169.8 97.3) (end 168.93 97.3) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A3E269)) (segment (start 168.93 97.3) (end 168.57 96.94) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A3E26A)) (segment (start 168.28 96.35) (end 168.57 96.64) (width 0.15) (layer In2.Cu) (net 57)) (segment (start 148.1 96.35) (end 168.28 96.35) (width 0.15) (layer In2.Cu) (net 57) (tstamp 559D719F)) (segment (start 147.45 97) (end 148.1 96.35) (width 0.15) (layer In2.Cu) (net 57) (tstamp 559D719E)) (via (at 168.57 96.94) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 57)) (segment (start 168.57 96.64) (end 168.57 96.94) (width 0.15) (layer In2.Cu) (net 57) (tstamp 55A3E262)) (segment (start 170.075 97.575) (end 169.8 97.3) (width 0.15) (layer B.Cu) (net 57)) (segment (start 170.075 98.985) (end 170.075 97.575) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A3E2AC)) (segment (start 170.66 99.57) (end 170.075 98.985) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A3E2AB)) (segment (start 170.66 102.715) (end 170.66 99.57) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A3E2AA)) (segment (start 171.25 103.19) (end 171.25 103.47) (width 0.15) (layer B.Cu) (net 57) (status 30)) (segment (start 171.25 103.47) (end 172.1 104.32) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A22559) (status 10)) (segment (start 172.1 104.32) (end 172.1 104.7) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A2255A) (status 20)) (segment (start 171.25 103.19) (end 170.185 103.19) (width 0.15) (layer B.Cu) (net 57) (status 30)) (segment (start 170.185 103.19) (end 170.075 103.3) (width 0.15) (layer B.Cu) (net 57) (tstamp 55A22556) (status 30)) (segment (start 144.55 107.75) (end 145.39 107.75) (width 0.15) (layer B.Cu) (net 58) (status 10)) (segment (start 148.00349 107.85349) (end 147.81669 107.85349) (width 0.15) (layer F.Cu) (net 58)) (segment (start 147.81669 107.85349) (end 147.466691 107.503491) (width 0.15) (layer F.Cu) (net 58)) (segment (start 154.4 108.6) (end 148.75 108.6) (width 0.15) (layer F.Cu) (net 58)) (via (at 147.466691 107.503491) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 58)) (segment (start 148.75 108.6) (end 148.00349 107.85349) (width 0.15) (layer F.Cu) (net 58)) (segment (start 154.65 108.35) (end 154.4 108.6) (width 0.15) (layer F.Cu) (net 58)) (segment (start 147.030182 107.94) (end 147.466691 107.503491) (width 0.15) (layer B.Cu) (net 58)) (segment (start 154.65 108.35) (end 154.95 108.35) (width 0.15) (layer F.Cu) (net 58) (status 20)) (segment (start 145.58 107.94) (end 147.030182 107.94) (width 0.15) (layer B.Cu) (net 58) (tstamp 559C2AC8)) (segment (start 145.39 107.75) (end 145.58 107.94) (width 0.15) (layer B.Cu) (net 58) (tstamp 559C2AC7)) (segment (start 148.1 108.5) (end 147.55 108.5) (width 0.15) (layer F.Cu) (net 59)) (segment (start 145.7 109.75) (end 145.85 109.9) (width 0.15) (layer B.Cu) (net 59) (tstamp 559C1D33)) (via (at 145.85 109.9) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 59)) (segment (start 145.7 109.75) (end 144.55 109.75) (width 0.15) (layer B.Cu) (net 59) (status 20)) (segment (start 145.85 109) (end 145.85 109.9) (width 0.15) (layer F.Cu) (net 59)) (segment (start 146.65 108.2) (end 145.85 109) (width 0.15) (layer F.Cu) (net 59) (tstamp 559C1DA7)) (segment (start 147.25 108.2) (end 146.65 108.2) (width 0.15) (layer F.Cu) (net 59) (tstamp 559C1DA5)) (segment (start 147.55 108.5) (end 147.25 108.2) (width 0.15) (layer F.Cu) (net 59) (tstamp 559C1DA4)) (segment (start 155.45 108.35) (end 155.45 108.7) (width 0.15) (layer F.Cu) (net 59) (status 10)) (segment (start 155.2 108.95) (end 148.55 108.95) (width 0.15) (layer F.Cu) (net 59)) (segment (start 155.45 108.7) (end 155.2 108.95) (width 0.15) (layer F.Cu) (net 59)) (segment (start 148.55 108.95) (end 148.1 108.5) (width 0.15) (layer F.Cu) (net 59)) (segment (start 155.45 108.35) (end 155.38 108.42) (width 0.15) (layer F.Cu) (net 59) (status 30)) (segment (start 155.38 108.42) (end 155.38 108.68) (width 0.15) (layer F.Cu) (net 59) (tstamp 5592DF37) (status 30)) (segment (start 146.991416 109.65875) (end 146.826367 109.65875) (width 0.15) (layer F.Cu) (net 60)) (segment (start 148.4 109.35) (end 148.2117 109.1617) (width 0.15) (layer F.Cu) (net 60)) (segment (start 155.331788 109.35) (end 148.4 109.35) (width 0.15) (layer F.Cu) (net 60)) (segment (start 155.95 108.731788) (end 155.331788 109.35) (width 0.15) (layer F.Cu) (net 60)) (segment (start 155.95 108.35) (end 155.95 108.731788) (width 0.15) (layer F.Cu) (net 60) (status 10)) (segment (start 147.488466 109.1617) (end 146.991416 109.65875) (width 0.15) (layer F.Cu) (net 60)) (segment (start 148.2117 109.1617) (end 147.488466 109.1617) (width 0.15) (layer F.Cu) (net 60)) (segment (start 146.467617 109.3) (end 146.826367 109.65875) (width 0.15) (layer B.Cu) (net 60)) (via (at 146.826367 109.65875) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 60)) (segment (start 144.6 109.3) (end 146.467617 109.3) (width 0.15) (layer B.Cu) (net 60) (status 10)) (segment (start 144.55 109.25) (end 144.6 109.3) (width 0.15) (layer B.Cu) (net 60) (status 30)) (segment (start 155.95 108.35) (end 155.95 108.63) (width 0.15) (layer F.Cu) (net 60) (status 30)) (segment (start 156.45 108.35) (end 156.45 108.656066) (width 0.15) (layer F.Cu) (net 61) (status 30)) (segment (start 155.349383 109.756683) (end 147.706683 109.756683) (width 0.15) (layer F.Cu) (net 61)) (segment (start 156.45 108.656066) (end 155.349383 109.756683) (width 0.15) (layer F.Cu) (net 61) (status 10)) (segment (start 148.1 108.61294) (end 148.1 109.363366) (width 0.15) (layer B.Cu) (net 61)) (segment (start 144.55 108.25) (end 147.73706 108.25) (width 0.15) (layer B.Cu) (net 61) (status 10)) (segment (start 148.1 109.363366) (end 147.706683 109.756683) (width 0.15) (layer B.Cu) (net 61)) (via (at 147.706683 109.756683) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 61)) (segment (start 147.73706 108.25) (end 148.1 108.61294) (width 0.15) (layer B.Cu) (net 61)) (segment (start 156.7 108.830344) (end 156.859656 108.830344) (width 0.15) (layer F.Cu) (net 62)) (segment (start 156.95 108.74) (end 156.95 108.35) (width 0.15) (layer F.Cu) (net 62) (tstamp 55A6900D) (status 20)) (segment (start 156.859656 108.830344) (end 156.95 108.74) (width 0.15) (layer F.Cu) (net 62) (tstamp 55A6900C)) (segment (start 155.390344 110.14) (end 148.16 110.14) (width 0.15) (layer F.Cu) (net 62)) (segment (start 147.817442 110.482558) (end 148.16 110.14) (width 0.15) (layer F.Cu) (net 62)) (segment (start 156.7 108.830344) (end 155.390344 110.14) (width 0.15) (layer F.Cu) (net 62) (tstamp 55A6900A)) (segment (start 146.61694 110.482558) (end 147.817442 110.482558) (width 0.15) (layer F.Cu) (net 62)) (via (at 146.61694 110.482558) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 62)) (segment (start 146.549498 110.55) (end 146.61694 110.482558) (width 0.15) (layer B.Cu) (net 62)) (segment (start 145.5 110.55) (end 145.2 110.25) (width 0.15) (layer B.Cu) (net 62) (status 20)) (segment (start 145.5 110.55) (end 146.549498 110.55) (width 0.15) (layer B.Cu) (net 62)) (segment (start 144.55 110.25) (end 145.2 110.25) (width 0.15) (layer B.Cu) (net 62) (status 30)) (segment (start 144.55 110.25) (end 144.65 110.35) (width 0.15) (layer B.Cu) (net 62) (status 30)) (segment (start 152.4 108.25) (end 152.1 107.95) (width 0.15) (layer F.Cu) (net 63)) (via (at 146.991938 108.82502) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 63)) (segment (start 151.62498 108.82502) (end 146.991938 108.82502) (width 0.15) (layer In2.Cu) (net 63)) (segment (start 146.916918 108.75) (end 146.991938 108.82502) (width 0.15) (layer B.Cu) (net 63)) (segment (start 144.55 108.75) (end 146.916918 108.75) (width 0.15) (layer B.Cu) (net 63) (status 10)) (segment (start 153.95 108.25) (end 152.4 108.25) (width 0.15) (layer F.Cu) (net 63) (tstamp 55A12526)) (segment (start 153.95 108.25) (end 154.4 107.8) (width 0.15) (layer F.Cu) (net 63) (status 20)) (segment (start 152.1 108.35) (end 151.62498 108.82502) (width 0.15) (layer In2.Cu) (net 63) (tstamp 55A12536)) (segment (start 152.1 107.725) (end 152.1 108.35) (width 0.15) (layer In2.Cu) (net 63) (tstamp 55A12535)) (via (at 152.1 107.725) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 63)) (segment (start 152.1 107.95) (end 152.1 107.725) (width 0.15) (layer F.Cu) (net 63) (tstamp 55A12532)) (segment (start 154.4 107.8) (end 154.4 107.9) (width 0.15) (layer F.Cu) (net 63) (status 30)) (segment (start 154.4 107.8) (end 154.4 107.84) (width 0.15) (layer F.Cu) (net 63) (status 30)) (segment (start 155.98 118.08) (end 155.37 117.47) (width 0.15) (layer In2.Cu) (net 64)) (segment (start 159.36 118.08) (end 155.98 118.08) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AA7)) (via (at 159.36 118.08) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 64)) (segment (start 159.37 118.07) (end 159.36 118.08) (width 0.15) (layer F.Cu) (net 64) (tstamp 559C2AA5)) (segment (start 159.37 116.48) (end 159.37 118.07) (width 0.15) (layer F.Cu) (net 64) (tstamp 559C2AA4) (status 10)) (segment (start 152.585 114.06) (end 150.77 112.245) (width 0.15) (layer In2.Cu) (net 64) (tstamp 55A3E553)) (segment (start 154.32 114.06) (end 152.585 114.06) (width 0.15) (layer In2.Cu) (net 64) (tstamp 55A3E551)) (segment (start 155.37 115.11) (end 154.32 114.06) (width 0.15) (layer In2.Cu) (net 64) (tstamp 55A3E550)) (segment (start 155.37 117.47) (end 155.37 115.11) (width 0.15) (layer In2.Cu) (net 64) (tstamp 55A3E54E)) (segment (start 150.77 111.79) (end 150.77 112.245) (width 0.15) (layer In2.Cu) (net 64)) (segment (start 145.52 106.84) (end 145.81 106.84) (width 0.15) (layer In2.Cu) (net 64)) (segment (start 150.05 111.07) (end 145.49 111.07) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AB5)) (segment (start 145.49 111.07) (end 145.06 110.64) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AB6)) (segment (start 145.06 110.64) (end 145.06 107.3) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AB7)) (segment (start 145.06 107.3) (end 145.52 106.84) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AB8)) (segment (start 150.77 111.79) (end 150.05 111.07) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AB2)) (segment (start 144.55 106.75) (end 145.72 106.75) (width 0.15) (layer B.Cu) (net 64) (tstamp 559C2AD9) (status 10)) (segment (start 145.89 106.92) (end 145.72 106.75) (width 0.15) (layer B.Cu) (net 64) (tstamp 559C2AD8)) (via (at 145.89 106.92) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 64)) (segment (start 145.81 106.84) (end 145.89 106.92) (width 0.15) (layer In2.Cu) (net 64) (tstamp 559C2AD5)) (segment (start 159.4 116.45) (end 159.37 116.48) (width 0.15) (layer F.Cu) (net 64) (status 30)) (segment (start 155.33 109.48) (end 155.35 109.5) (width 0.15) (layer B.Cu) (net 65) (status 30)) (segment (start 155.35 109.5) (end 155.98 109.5) (width 0.15) (layer B.Cu) (net 65) (tstamp 55842039) (status 30)) (segment (start 155.98 109.5) (end 155.99 109.51) (width 0.15) (layer B.Cu) (net 65) (status 30)) (segment (start 155.99 109.51) (end 157.06 109.51) (width 0.15) (layer B.Cu) (net 65) (tstamp 5584201D) (status 30)) (segment (start 155.35 110.57) (end 155.38 110.6) (width 0.15) (layer B.Cu) (net 66) (status 30)) (segment (start 155.98 110.6) (end 155.2 110.6) (width 0.15) (layer B.Cu) (net 66) (status 30)) (segment (start 155.2 110.6) (end 155.06 110.46) (width 0.15) (layer B.Cu) (net 66) (tstamp 559C2B6A) (status 30)) (segment (start 157.06 110.46) (end 156.92 110.6) (width 0.15) (layer B.Cu) (net 66) (status 30)) (segment (start 156.92 110.6) (end 155.98 110.6) (width 0.15) (layer B.Cu) (net 66) (tstamp 55842020) (status 30)) (segment (start 152.84 109.54) (end 153.53 109.54) (width 0.15) (layer B.Cu) (net 67) (status 30)) (segment (start 153.53 109.54) (end 153.56 109.51) (width 0.15) (layer B.Cu) (net 67) (tstamp 5592DF20) (status 30)) (segment (start 153.55 110.64) (end 153.56 110.65) (width 0.15) (layer B.Cu) (net 68) (tstamp 5592DF23) (status 30)) (segment (start 152.85 110.5) (end 153.52 110.5) (width 0.15) (layer B.Cu) (net 68) (status 30)) (segment (start 153.52 110.5) (end 153.56 110.46) (width 0.15) (layer B.Cu) (net 68) (tstamp 559C2B66) (status 30)) (segment (start 145.3 116.8) (end 145.3 116.1) (width 0.15) (layer B.Cu) (net 69) (status 30)) (segment (start 145.3 116.1) (end 145.45 115.95) (width 0.15) (layer B.Cu) (net 69) (tstamp 559C1A5C) (status 30)) (segment (start 145.45 115.95) (end 146.3 115.95) (width 0.15) (layer B.Cu) (net 69) (status 10)) (segment (start 146.3 115.95) (end 146.65 115.6) (width 0.15) (layer B.Cu) (net 69) (tstamp 559C1A58) (status 20)) (segment (start 148.3 117.05) (end 147.85 117.05) (width 0.15) (layer B.Cu) (net 70) (status 10)) (segment (start 147.5 116.7) (end 146.65 116.7) (width 0.15) (layer B.Cu) (net 70) (tstamp 559C1843) (status 20)) (segment (start 147.85 117.05) (end 147.5 116.7) (width 0.15) (layer B.Cu) (net 70) (tstamp 559C1842)) (segment (start 149.25 117.05) (end 148.3 117.05) (width 0.15) (layer B.Cu) (net 70) (status 30)) (segment (start 149.25 117.1225) (end 149.9225 117.1225) (width 0.15) (layer F.Cu) (net 70) (status 10)) (segment (start 149.85 117.05) (end 149.25 117.05) (width 0.15) (layer B.Cu) (net 70) (tstamp 559C1792) (status 20)) (segment (start 150.25 117.45) (end 149.85 117.05) (width 0.15) (layer B.Cu) (net 70) (tstamp 559C1791)) (via (at 150.25 117.45) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 70)) (segment (start 149.9225 117.1225) (end 150.25 117.45) (width 0.15) (layer F.Cu) (net 70) (tstamp 559C178F)) (segment (start 145.3 113.3) (end 145.3 113.95) (width 0.15) (layer B.Cu) (net 71) (status 30)) (segment (start 145.3 113.95) (end 145.45 114.1) (width 0.15) (layer B.Cu) (net 71) (tstamp 559C1A7F) (status 30)) (segment (start 145.45 114.1) (end 146.6 114.1) (width 0.15) (layer B.Cu) (net 71) (status 30)) (segment (start 146.6 114.1) (end 146.7 114) (width 0.15) (layer B.Cu) (net 71) (tstamp 559C1A7B) (status 30)) (segment (start 146.7 114) (end 146.5 114) (width 0.15) (layer B.Cu) (net 71) (status 30)) (segment (start 149.25 113.3125) (end 150.0175 113.3125) (width 0.15) (layer F.Cu) (net 72) (status 10)) (segment (start 150.18 112.09) (end 149.27 113) (width 0.15) (layer B.Cu) (net 72) (tstamp 559C23A4) (status 20)) (via (at 150.18 112.09) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 72)) (segment (start 150.18 113.15) (end 150.18 112.09) (width 0.15) (layer F.Cu) (net 72) (tstamp 559C23A2)) (segment (start 150.0175 113.3125) (end 150.18 113.15) (width 0.15) (layer F.Cu) (net 72) (tstamp 559C23A1)) (segment (start 149.27 113) (end 149.05 113) (width 0.15) (layer B.Cu) (net 72) (tstamp 559C23A5) (status 30)) (segment (start 148.15 112.8) (end 147.55 112.8) (width 0.15) (layer B.Cu) (net 72) (status 10)) (segment (start 147.45 112.9) (end 146.7 112.9) (width 0.15) (layer B.Cu) (net 72) (tstamp 559C1847) (status 20)) (segment (start 147.55 112.8) (end 147.45 112.9) (width 0.15) (layer B.Cu) (net 72) (tstamp 559C1846)) (segment (start 148.15 112.8) (end 148.85 112.8) (width 0.15) (layer B.Cu) (net 72) (status 30)) (segment (start 148.85 112.8) (end 149.05 113) (width 0.15) (layer B.Cu) (net 72) (tstamp 559C17B9) (status 30)) (segment (start 144.05 115.8525) (end 142.7975 115.8525) (width 0.15) (layer F.Cu) (net 73) (status 10)) (segment (start 142.75 116.2) (end 143.35 116.2) (width 0.15) (layer B.Cu) (net 73) (tstamp 559C1ABB) (status 20)) (segment (start 142.6 116.05) (end 142.75 116.2) (width 0.15) (layer B.Cu) (net 73) (tstamp 559C1ABA)) (via (at 142.6 116.05) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 73)) (segment (start 142.7975 115.8525) (end 142.6 116.05) (width 0.15) (layer F.Cu) (net 73) (tstamp 559C1AB8)) (segment (start 143.35 116.2) (end 144.1 116.2) (width 0.15) (layer B.Cu) (net 73) (status 30)) (segment (start 144.1 116.2) (end 144.35 115.95) (width 0.15) (layer B.Cu) (net 73) (tstamp 559C1A53) (status 30)) (segment (start 144.05 114.5825) (end 143.4325 114.5825) (width 0.15) (layer F.Cu) (net 74) (status 10)) (segment (start 142.75 113.8) (end 143.35 113.8) (width 0.15) (layer B.Cu) (net 74) (tstamp 559C1AC2) (status 20)) (segment (start 142.45 114.1) (end 142.75 113.8) (width 0.15) (layer B.Cu) (net 74) (tstamp 559C1AC1)) (via (at 142.45 114.1) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 74)) (segment (start 142.95 114.1) (end 142.45 114.1) (width 0.15) (layer F.Cu) (net 74) (tstamp 559C1ABF)) (segment (start 143.4325 114.5825) (end 142.95 114.1) (width 0.15) (layer F.Cu) (net 74) (tstamp 559C1ABE)) (segment (start 143.35 113.8) (end 144.05 113.8) (width 0.15) (layer B.Cu) (net 74) (status 10)) (segment (start 144.05 113.8) (end 144.35 114.1) (width 0.15) (layer B.Cu) (net 74) (tstamp 559C1A84) (status 20)) (segment (start 149.75 116.15) (end 149.75 113.4) (width 0.15) (layer B.Cu) (net 75)) (segment (start 151.52 109.86) (end 151.52 111.63) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A3E50E)) (segment (start 151.52 111.63) (end 149.75 113.4) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A3E50F)) (segment (start 151.52 109.86) (end 151.84 109.54) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A3E50D) (status 20)) (segment (start 151.94 109.54) (end 151.84 109.54) (width 0.15) (layer B.Cu) (net 75) (status 30)) (segment (start 151.94 109.54) (end 151.94 109.58) (width 0.15) (layer B.Cu) (net 75) (status 30)) (segment (start 151.94 109.58) (end 151.94 109.69) (width 0.15) (layer B.Cu) (net 75) (tstamp 559C23AD) (status 30)) (segment (start 149.25 116.15) (end 149.75 116.15) (width 0.15) (layer B.Cu) (net 75) (status 10)) (segment (start 149.75 116.15) (end 149.9 116.15) (width 0.15) (layer B.Cu) (net 75) (tstamp 559C17CD)) (segment (start 149.9 116.15) (end 150.3 116.55) (width 0.15) (layer B.Cu) (net 75) (tstamp 559C179A)) (segment (start 148.3 115.95) (end 149.05 115.95) (width 0.15) (layer B.Cu) (net 75) (status 30)) (segment (start 149.05 115.95) (end 149.25 116.15) (width 0.15) (layer B.Cu) (net 75) (tstamp 559C1797) (status 30)) (segment (start 150.2375 116.4875) (end 149.25 116.4875) (width 0.15) (layer F.Cu) (net 75) (tstamp 559C1774) (status 20)) (via (at 150.3 116.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 75)) (segment (start 150.3 116.55) (end 150.2375 116.4875) (width 0.15) (layer F.Cu) (net 75) (tstamp 559C1773)) (segment (start 149.25 113.9475) (end 150.3475 113.9475) (width 0.15) (layer F.Cu) (net 76) (tstamp 559C176A) (status 10)) (segment (start 150.35 113.95) (end 150.3475 113.9475) (width 0.15) (layer F.Cu) (net 76) (tstamp 559C1769)) (via (at 150.35 113.95) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 76)) (segment (start 150.35 113.27) (end 150.35 113.95) (width 0.15) (layer B.Cu) (net 76) (tstamp 559C1766)) (segment (start 151.95 111.67) (end 151.95 110.5) (width 0.15) (layer B.Cu) (net 76) (tstamp 55A3E507) (status 20)) (segment (start 150.35 113.27) (end 151.95 111.67) (width 0.15) (layer B.Cu) (net 76) (tstamp 55A3E506)) (segment (start 149.25 113.9475) (end 148.2925 113.9475) (width 0.2) (layer F.Cu) (net 76) (status 10)) (segment (start 147.95 114.29) (end 148.15 114.09) (width 0.2) (layer B.Cu) (net 76) (tstamp 559C2BE6) (status 20)) (via (at 147.95 114.29) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 76)) (segment (start 148.2925 113.9475) (end 147.95 114.29) (width 0.2) (layer F.Cu) (net 76) (tstamp 559C2BE0)) (segment (start 148.15 114.09) (end 148.15 113.9) (width 0.2) (layer B.Cu) (net 76) (tstamp 559C2BE7) (status 30)) (segment (start 148.15 113.9) (end 149.05 113.9) (width 0.15) (layer B.Cu) (net 76) (status 30)) (segment (start 140.95 108.75) (end 139.74 108.75) (width 0.15) (layer B.Cu) (net 77)) (segment (start 143.76 110.97) (end 145.17 112.38) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A14)) (segment (start 139.55 110.97) (end 143.76 110.97) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A13)) (segment (start 139.450002 110.870002) (end 139.55 110.97) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A12)) (segment (start 139.450002 110.18) (end 139.450002 110.870002) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A0E)) (segment (start 139.84 109.790002) (end 139.450002 110.18) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A0D)) (segment (start 139.84 108.95) (end 139.84 109.790002) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A0C)) (segment (start 139.69 108.8) (end 139.84 108.95) (width 0.15) (layer In2.Cu) (net 77) (tstamp 55AA2A0B)) (via (at 139.69 108.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 77)) (segment (start 139.74 108.75) (end 139.69 108.8) (width 0.15) (layer B.Cu) (net 77) (tstamp 55AA2A07)) (segment (start 144.4 112.7) (end 144.85 112.7) (width 0.15) (layer B.Cu) (net 77) (status 10)) (segment (start 144.85 112.7) (end 145.17 112.38) (width 0.15) (layer B.Cu) (net 77) (tstamp 55A6B00D)) (segment (start 144.4 112.7) (end 144.4 113.3) (width 0.15) (layer B.Cu) (net 77) (status 30)) (segment (start 144.88 113.3) (end 145.17 113.01) (width 0.15) (layer F.Cu) (net 77)) (segment (start 145.17 113.01) (end 145.17 112.38) (width 0.15) (layer F.Cu) (net 77) (tstamp 55A6AFA1)) (segment (start 144.88 113.3) (end 144.0625 113.3) (width 0.15) (layer F.Cu) (net 77) (tstamp 55A6AF6C) (status 20)) (via (at 145.17 112.38) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 77)) (segment (start 144.05 113.3125) (end 144.0625 113.3) (width 0.15) (layer F.Cu) (net 77) (status 30)) (segment (start 144.4 112.48) (end 144.4 113.3) (width 0.15) (layer B.Cu) (net 77) (status 30)) (segment (start 144.8 117.75) (end 144.34 118.21) (width 0.15) (layer In2.Cu) (net 78)) (segment (start 140.01 118.21) (end 139.15 117.35) (width 0.15) (layer In2.Cu) (net 78) (tstamp 55A6AFD7)) (segment (start 144.34 118.21) (end 140.01 118.21) (width 0.15) (layer In2.Cu) (net 78) (tstamp 55A6AFD6)) (segment (start 140.95 109.25) (end 140.15 109.25) (width 0.15) (layer B.Cu) (net 78) (status 30)) (segment (start 140.15 109.25) (end 139.85 109.55) (width 0.15) (layer B.Cu) (net 78) (tstamp 559C1B64) (status 10)) (segment (start 139.15 117.35) (end 139.15 109.6) (width 0.15) (layer In2.Cu) (net 78) (tstamp 55A6AFDB)) (segment (start 139.2 109.55) (end 139.15 109.6) (width 0.15) (layer In2.Cu) (net 78) (tstamp 559C1B68)) (via (at 139.2 109.55) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 78)) (segment (start 139.85 109.55) (end 139.2 109.55) (width 0.15) (layer B.Cu) (net 78) (tstamp 559C1B65)) (segment (start 144.05 117.1225) (end 144.6225 117.1225) (width 0.15) (layer F.Cu) (net 78) (status 30)) (segment (start 144.6225 117.1225) (end 144.8 117.3) (width 0.15) (layer F.Cu) (net 78) (tstamp 559C1AF6) (status 10)) (via (at 144.8 117.75) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 78)) (segment (start 144.8 117.3) (end 144.8 117.75) (width 0.15) (layer F.Cu) (net 78) (tstamp 559C1AF7)) (segment (start 144.4 116.8) (end 144.8 117.2) (width 0.15) (layer B.Cu) (net 78) (status 10)) (segment (start 144.6 117.95) (end 144.8 117.75) (width 0.15) (layer B.Cu) (net 78) (tstamp 559C19DA)) (segment (start 144.6 117.95) (end 144.3 117.95) (width 0.15) (layer B.Cu) (net 78) (status 20)) (segment (start 144.8 117.2) (end 144.8 117.75) (width 0.15) (layer B.Cu) (net 78) (tstamp 559C1AF3)) (segment (start 144.1725 117.1225) (end 144.05 117.1225) (width 0.15) (layer F.Cu) (net 78) (tstamp 559C19DD) (status 30)) (segment (start 144.4 117.85) (end 144.3 117.95) (width 0.15) (layer B.Cu) (net 78) (tstamp 559C19D7) (status 30)) (segment (start 143.01 117.6) (end 143.05 117.6) (width 0.15) (layer B.Cu) (net 79)) (segment (start 143.05 117.6) (end 143.4 117.95) (width 0.15) (layer B.Cu) (net 79) (tstamp 55A6AFD0) (status 20)) (segment (start 143.05 116.85) (end 143.05 117.56) (width 0.15) (layer F.Cu) (net 79)) (segment (start 143.4125 116.4875) (end 143.05 116.85) (width 0.15) (layer F.Cu) (net 79) (tstamp 559C19E5)) (segment (start 144.05 116.4875) (end 143.4125 116.4875) (width 0.15) (layer F.Cu) (net 79) (status 10)) (segment (start 143.01 117.6) (end 142.7 117.91) (width 0.15) (layer B.Cu) (net 79) (tstamp 55A6AFCC) (status 20)) (via (at 143.01 117.6) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 79)) (segment (start 143.05 117.56) (end 143.01 117.6) (width 0.15) (layer F.Cu) (net 79) (tstamp 55A6AFCA)) (segment (start 142.7 117.91) (end 142.7 117.95) (width 0.15) (layer B.Cu) (net 79) (tstamp 55A6AFCD) (status 30)) (segment (start 143.35 117.95) (end 143.4 117.95) (width 0.15) (layer B.Cu) (net 79) (tstamp 559C1AEF) (status 30)) (segment (start 143.5 112.7) (end 143.09 112.7) (width 0.15) (layer B.Cu) (net 80) (status 10)) (segment (start 142.76 112.37) (end 142.76 112.06) (width 0.15) (layer F.Cu) (net 80) (tstamp 55A6B013) (status 20)) (segment (start 142.93 112.54) (end 142.76 112.37) (width 0.15) (layer F.Cu) (net 80) (tstamp 55A6B012)) (via (at 142.93 112.54) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 80)) (segment (start 143.09 112.7) (end 142.93 112.54) (width 0.15) (layer B.Cu) (net 80) (tstamp 55A6B010)) (segment (start 142.76 112.06) (end 142.95 112.25) (width 0.15) (layer F.Cu) (net 80) (status 30)) (segment (start 142.95 112.25) (end 142.95 113.6) (width 0.15) (layer F.Cu) (net 80) (tstamp 55A6AF5A) (status 10)) (segment (start 143.2975 113.9475) (end 142.95 113.6) (width 0.15) (layer F.Cu) (net 80) (tstamp 559C1A1F)) (segment (start 144.05 113.9475) (end 143.2975 113.9475) (width 0.15) (layer F.Cu) (net 80) (status 10)) (segment (start 139.725 115.65) (end 139.8 115.65) (width 0.15) (layer F.Cu) (net 81) (status 30)) (segment (start 139.8 115.65) (end 140.2 115.25) (width 0.15) (layer F.Cu) (net 81) (tstamp 559C1A09) (status 10)) (via (at 140.2 115.25) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 81)) (segment (start 140.2 115.25) (end 140.125 115.325) (width 0.15) (layer B.Cu) (net 81) (tstamp 559C1A0B)) (segment (start 140.125 115.325) (end 140.125 115.925) (width 0.15) (layer B.Cu) (net 81) (tstamp 559C1A0C) (status 20)) (segment (start 142.1 117.075) (end 142.085 117.09) (width 0.15) (layer F.Cu) (net 82) (status 30)) (segment (start 142.085 117.09) (end 141.6 117.09) (width 0.15) (layer F.Cu) (net 82) (tstamp 55A6AFBE) (status 10)) (segment (start 141.8 117.29) (end 141.8 117.95) (width 0.15) (layer B.Cu) (net 82) (tstamp 55A6AFC1) (status 20)) (segment (start 141.6 117.09) (end 141.8 117.29) (width 0.15) (layer B.Cu) (net 82) (tstamp 55A6AFC0)) (via (at 141.6 117.09) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 82)) (segment (start 141.65 114.9) (end 141.61 114.86) (width 0.15) (layer In2.Cu) (net 82)) (segment (start 141.41 111.86) (end 141.66 111.86) (width 0.15) (layer F.Cu) (net 82) (tstamp 55A6AF54) (status 20)) (via (at 141.41 111.86) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 82)) (segment (start 141.61 112.06) (end 141.41 111.86) (width 0.15) (layer In2.Cu) (net 82) (tstamp 55A6AF50)) (segment (start 141.61 114.86) (end 141.61 112.06) (width 0.15) (layer In2.Cu) (net 82) (tstamp 55A6AF4F)) (segment (start 141.66 111.86) (end 141.86 112.06) (width 0.15) (layer F.Cu) (net 82) (tstamp 55A6AF55) (status 30)) (segment (start 141.86 111.86) (end 141.24 111.24) (width 0.15) (layer F.Cu) (net 82) (status 10)) (segment (start 141.24 111.24) (end 140.78 111.24) (width 0.15) (layer F.Cu) (net 82) (tstamp 55A22527) (status 20)) (segment (start 141.86 111.86) (end 141.86 112.06) (width 0.15) (layer F.Cu) (net 82) (tstamp 55A6AF4B) (status 30)) (segment (start 147.8 115.15) (end 147.55 114.9) (width 0.15) (layer B.Cu) (net 82)) (segment (start 147.85 115.2) (end 147.8 115.15) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17F4)) (via (at 147.8 115.15) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 82)) (segment (start 148.35 115.2) (end 147.85 115.2) (width 0.15) (layer F.Cu) (net 82)) (segment (start 143.3 114.95) (end 143.3 114.9) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B1D) (status 20)) (segment (start 144.4 114.95) (end 143.3 114.95) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B1B)) (segment (start 144.75 114.6) (end 144.4 114.95) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B1A)) (segment (start 145.6 114.6) (end 144.75 114.6) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B19)) (segment (start 145.9 114.9) (end 145.6 114.6) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B18)) (segment (start 147.55 114.9) (end 145.9 114.9) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B17)) (segment (start 143.35 114.7) (end 143.45 114.6) (width 0.15) (layer B.Cu) (net 82) (status 30)) (segment (start 141.65 114.9) (end 143.3 114.9) (width 0.15) (layer B.Cu) (net 82) (status 20)) (segment (start 143.3 114.9) (end 143.25 114.9) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B1E) (status 30)) (segment (start 143.25 114.9) (end 143.35 115) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C1B00) (status 10)) (segment (start 141.65 114.9) (end 141.65 115.625) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C1AE1) (status 20)) (via (at 141.65 114.9) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 82)) (segment (start 141.65 115.625) (end 141.625 115.65) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C1AE2) (status 30)) (segment (start 142.1 117.075) (end 142.1 116.9) (width 0.15) (layer F.Cu) (net 82) (status 30)) (segment (start 142.1 116.9) (end 141.625 116.425) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C1AB1) (status 10)) (segment (start 141.625 116.425) (end 141.625 115.65) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C1AB2) (status 20)) (segment (start 142.1 117.15) (end 142.1 117.075) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C1AAD) (status 30)) (segment (start 141.65 115.65) (end 141.625 115.65) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C19D1) (status 30)) (segment (start 143.35 114.7) (end 143.35 115) (width 0.15) (layer B.Cu) (net 82) (status 10)) (segment (start 143.35 115) (end 143.35 115.3) (width 0.15) (layer B.Cu) (net 82) (tstamp 559C19CC) (status 20)) (segment (start 141.6 115.675) (end 141.625 115.65) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17FE) (status 30)) (segment (start 149.25 114.5825) (end 148.5175 114.5825) (width 0.15) (layer F.Cu) (net 82) (status 10)) (segment (start 148.35 114.75) (end 148.35 115.2) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17EA)) (segment (start 148.5175 114.5825) (end 148.35 114.75) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17E9)) (segment (start 148.5525 115.8525) (end 149.25 115.8525) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17EC) (status 20)) (segment (start 148.35 115.65) (end 148.5525 115.8525) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17EB)) (segment (start 148.35 115.2) (end 148.35 115.65) (width 0.15) (layer F.Cu) (net 82) (tstamp 559C17F2)) (segment (start 141.4 101.9) (end 140.58 101.08) (width 0.15) (layer F.Cu) (net 83)) (segment (start 143.3 103.15) (end 142.05 101.9) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C84)) (segment (start 142.05 101.9) (end 141.4 101.9) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C87)) (segment (start 140.95 97.9) (end 142.6 96.25) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C8C)) (segment (start 142.6 96.25) (end 145.4 96.25) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C8E)) (segment (start 145.4 96.25) (end 145.675 96.525) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C90)) (segment (start 145.675 97) (end 145.675 96.525) (width 0.15) (layer F.Cu) (net 83) (tstamp 559C1C91) (status 10)) (segment (start 143.35 103.75) (end 144.55 103.75) (width 0.15) (layer B.Cu) (net 83) (status 20)) (via (at 143.3 103.8) (size 0.7) (drill 0.3) (layers F.Cu B.Cu) (net 83)) (segment (start 143.35 103.75) (end 143.3 103.8) (width 0.15) (layer B.Cu) (net 83) (tstamp 559C1C70)) (segment (start 143.3 103.8) (end 143.3 103.15) (width 0.15) (layer F.Cu) (net 83)) (segment (start 140.95 98.96) (end 140.95 97.9) (width 0.15) (layer F.Cu) (net 83) (tstamp 55A6AF1B)) (segment (start 140.58 99.33) (end 140.95 98.96) (width 0.15) (layer F.Cu) (net 83) (tstamp 55A6AF1A)) (segment (start 140.58 101.08) (end 140.58 99.33) (width 0.15) (layer F.Cu) (net 83) (tstamp 55A6AF19)) (segment (start 144.25 98.3) (end 144.25 97.275) (width 0.2) (layer F.Cu) (net 84) (status 10)) (segment (start 144.25 97.275) (end 143.975 97) (width 0.2) (layer F.Cu) (net 84) (tstamp 559C2B80) (status 20)) (segment (start 144.775 97) (end 143.975 97) (width 0.2) (layer F.Cu) (net 84) (status 30)) (segment (start 144.25 97.275) (end 143.975 97) (width 0.2) (layer F.Cu) (net 84) (tstamp 5584849D) (status 20)) (zone (net 2) (net_name GND) (layer F.Cu) (tstamp 55229853) (hatch edge 0.508) (connect_pads (clearance 0.508)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 188.71 91.99) (xy 188.71 120.99) (xy 123.71 120.99) (xy 123.71 91.99) ) ) (filled_polygon (pts (xy 168.838823 113.008145) (xy 168.962 113.192491) (xy 168.962 113.23663) (xy 168.97556 113.25019) (xy 168.912 113.31375) (xy 168.912 113.915) (xy 169.56125 113.915) (xy 169.72 113.75625) (xy 169.72 113.66369) (xy 169.623327 113.430301) (xy 169.600846 113.40782) (xy 169.75256 113.40782) (xy 169.75256 113.81) (xy 169.801843 114.057765) (xy 169.942191 114.267809) (xy 170.152235 114.408157) (xy 170.4 114.45744) (xy 170.740862 114.45744) (xy 170.737647 114.473603) (xy 170.715 114.49625) (xy 170.715 114.52631) (xy 170.723217 114.546148) (xy 170.70256 114.65) (xy 170.70256 114.9) (xy 170.726309 115.019394) (xy 170.692191 115.042191) (xy 170.551843 115.252235) (xy 170.50256 115.5) (xy 170.50256 116.00256) (xy 169.95 116.00256) (xy 169.702235 116.051843) (xy 169.688084 116.061299) (xy 169.576309 116.015) (xy 169.43575 116.015) (xy 169.277 116.17375) (xy 169.277 116.775) (xy 169.297 116.775) (xy 169.297 117.025) (xy 169.277 117.025) (xy 169.277 117.62625) (xy 169.43575 117.785) (xy 169.576309 117.785) (xy 169.688084 117.738701) (xy 169.702235 117.748157) (xy 169.95 117.79744) (xy 170.55 117.79744) (xy 170.797765 117.748157) (xy 170.812585 117.738254) (xy 170.902235 117.798157) (xy 171.15 117.84744) (xy 171.65 117.84744) (xy 171.897765 117.798157) (xy 172.067224 117.684928) (xy 172.345069 117.68517) (xy 172.707229 117.535529) (xy 172.745384 117.49744) (xy 173.1 117.49744) (xy 173.347765 117.448157) (xy 173.557809 117.307809) (xy 173.698157 117.097765) (xy 173.74744 116.85) (xy 173.74744 116.45) (xy 173.698157 116.202235) (xy 173.696664 116.2) (xy 173.698157 116.197765) (xy 173.74744 115.95) (xy 173.74744 115.55) (xy 173.71 115.361774) (xy 173.71 115.204871) (xy 173.748157 115.147765) (xy 173.79744 114.9) (xy 173.79744 114.730882) (xy 173.860779 114.794221) (xy 174.12194 114.968723) (xy 174.12256 114.968846) (xy 174.12256 114.985) (xy 174.171843 115.232765) (xy 174.312191 115.442809) (xy 174.522235 115.583157) (xy 174.77 115.63244) (xy 178.335 115.63244) (xy 178.335 118.195) (xy 163.460984 118.195) (xy 163.535 118.01631) (xy 163.535 117.92375) (xy 163.37625 117.765) (xy 162.727 117.765) (xy 162.727 117.787) (xy 162.473 117.787) (xy 162.473 117.765) (xy 162.453 117.765) (xy 162.453 117.515) (xy 162.473 117.515) (xy 162.473 117.493) (xy 162.727 117.493) (xy 162.727 117.515) (xy 163.37625 117.515) (xy 163.535 117.35625) (xy 163.535 117.26369) (xy 163.501888 117.18375) (xy 168.215 117.18375) (xy 168.215 117.27631) (xy 168.311673 117.509699) (xy 168.490302 117.688327) (xy 168.723691 117.785) (xy 168.86425 117.785) (xy 169.023 117.62625) (xy 169.023 117.025) (xy 168.37375 117.025) (xy 168.215 117.18375) (xy 163.501888 117.18375) (xy 163.438327 117.030301) (xy 163.403638 116.995612) (xy 163.423 116.97625) (xy 163.423 116.375) (xy 163.403 116.375) (xy 163.403 116.349769) (xy 163.474828 116.176788) (xy 163.474892 116.103) (xy 163.677 116.103) (xy 163.677 116.125) (xy 163.697 116.125) (xy 163.697 116.375) (xy 163.677 116.375) (xy 163.677 116.97625) (xy 163.83575 117.135) (xy 163.976309 117.135) (xy 164.209698 117.038327) (xy 164.388327 116.859699) (xy 164.476914 116.645832) (xy 164.485 116.64744) (xy 164.835 116.64744) (xy 164.972632 116.620064) (xy 165.008691 116.635) (xy 165.06375 116.635) (xy 165.136494 116.562256) (xy 165.292809 116.457809) (xy 165.31 116.432081) (xy 165.327191 116.457809) (xy 165.483506 116.562256) (xy 165.55625 116.635) (xy 165.611309 116.635) (xy 165.647368 116.620064) (xy 165.785 116.64744) (xy 166.135 116.64744) (xy 166.382765 116.598157) (xy 166.494211 116.52369) (xy 168.215 116.52369) (xy 168.215 116.61625) (xy 168.37375 116.775) (xy 169.023 116.775) (xy 169.023 116.17375) (xy 168.86425 116.015) (xy 168.723691 116.015) (xy 168.490302 116.111673) (xy 168.311673 116.290301) (xy 168.215 116.52369) (xy 166.494211 116.52369) (xy 166.592809 116.457809) (xy 166.733157 116.247765) (xy 166.78244 116) (xy 166.78244 115) (xy 166.766599 114.920359) (xy 166.864471 115.157229) (xy 167.141314 115.434555) (xy 167.503212 115.584828) (xy 167.895069 115.58517) (xy 168.257229 115.435529) (xy 168.534555 115.158686) (xy 168.684828 114.796788) (xy 168.68517 114.404931) (xy 168.658 114.339174) (xy 168.658 114.165) (xy 168.912 114.165) (xy 168.912 114.76625) (xy 169.07075 114.925) (xy 169.211309 114.925) (xy 169.444698 114.828327) (xy 169.623327 114.649699) (xy 169.72 114.41631) (xy 169.72 114.32375) (xy 169.56125 114.165) (xy 168.912 114.165) (xy 168.658 114.165) (xy 168.638 114.165) (xy 168.638 113.915) (xy 168.658 113.915) (xy 168.658 113.31375) (xy 168.64444 113.30019) (xy 168.708 113.23663) (xy 168.708 113.192491) (xy 168.831177 113.008145) (xy 168.835 112.988925) ) ) (filled_polygon (pts (xy 157.45 109.354297) (xy 157.534483 109.337492) (xy 155.159458 111.712517) (xy 155.156709 111.714354) (xy 155.153459 111.715) (xy 152.696541 111.715) (xy 152.634 111.70256) (xy 152.6 111.70256) (xy 152.537459 111.715) (xy 152.470801 111.715) (xy 152.227797 111.763336) (xy 152.021788 111.900987) (xy 152.021786 111.90099) (xy 151.64099 112.281785) (xy 151.640987 112.281787) (xy 151.570686 112.387) (xy 151.503336 112.487795) (xy 151.456402 112.72375) (xy 151.455 112.7308) (xy 151.455 112.797458) (xy 151.44256 112.859999) (xy 151.44256 112.893999) (xy 151.455 112.95654) (xy 151.455 116.233459) (xy 151.44256 116.296) (xy 151.44256 116.33) (xy 151.455 116.392541) (xy 151.455 116.459199) (xy 151.503336 116.702203) (xy 151.640987 116.908212) (xy 151.64099 116.908214) (xy 152.021786 117.289012) (xy 152.021787 117.289013) (xy 152.227796 117.426664) (xy 152.422463 117.465385) (xy 152.470799 117.475) (xy 152.537458 117.475) (xy 152.599999 117.48744) (xy 152.633999 117.48744) (xy 152.68 117.47829) (xy 152.726 117.48744) (xy 152.76 117.48744) (xy 152.822541 117.475) (xy 152.889199 117.475) (xy 153.132203 117.426664) (xy 153.338212 117.289013) (xy 153.338214 117.28901) (xy 153.492225 117.135) (xy 153.50375 117.135) (xy 153.576494 117.062256) (xy 153.732809 116.957809) (xy 153.75 116.932081) (xy 153.767191 116.957809) (xy 153.923506 117.062256) (xy 153.99625 117.135) (xy 154.051309 117.135) (xy 154.087368 117.120064) (xy 154.225 117.14744) (xy 154.575 117.14744) (xy 154.822765 117.098157) (xy 155.009041 116.97369) (xy 155.415 116.97369) (xy 155.415 117.06625) (xy 155.57375 117.225) (xy 156.223 117.225) (xy 156.223 116.62375) (xy 156.06425 116.465) (xy 155.923691 116.465) (xy 155.690302 116.561673) (xy 155.511673 116.740301) (xy 155.415 116.97369) (xy 155.009041 116.97369) (xy 155.032809 116.957809) (xy 155.173157 116.747765) (xy 155.22244 116.5) (xy 155.22244 116.316002) (xy 155.341002 116.19744) (xy 155.9 116.19744) (xy 156.147765 116.148157) (xy 156.15 116.146664) (xy 156.152235 116.148157) (xy 156.4 116.19744) (xy 156.909396 116.19744) (xy 156.865445 116.241314) (xy 156.772563 116.465) (xy 156.63575 116.465) (xy 156.477 116.62375) (xy 156.477 117.225) (xy 156.497 117.225) (xy 156.497 117.475) (xy 156.477 117.475) (xy 156.477 117.497) (xy 156.223 117.497) (xy 156.223 117.475) (xy 155.57375 117.475) (xy 155.415 117.63375) (xy 155.415 117.72631) (xy 155.511673 117.959699) (xy 155.690302 118.138327) (xy 155.827123 118.195) (xy 150.897916 118.195) (xy 151.084555 118.008686) (xy 151.234828 117.646788) (xy 151.23517 117.254931) (xy 151.154699 117.060175) (xy 151.284828 116.746788) (xy 151.28517 116.354931) (xy 151.135529 115.992771) (xy 151.067913 115.925037) (xy 151.234555 115.758686) (xy 151.384828 115.396788) (xy 151.38517 115.004931) (xy 151.235529 114.642771) (xy 151.143044 114.550125) (xy 151.184555 114.508686) (xy 151.334828 114.146788) (xy 151.33517 113.754931) (xy 151.185529 113.392771) (xy 150.908686 113.115445) (xy 150.89 113.107686) (xy 150.89 112.773024) (xy 151.014555 112.648686) (xy 151.164828 112.286788) (xy 151.16517 111.894931) (xy 151.015529 111.532771) (xy 150.738686 111.255445) (xy 150.535 111.170867) (xy 150.535 110.85) (xy 155.390344 110.85) (xy 155.662049 110.795954) (xy 155.89239 110.642046) (xy 157.027473 109.506963) (xy 157.131361 109.486298) (xy 157.356693 109.335737) ) ) (filled_polygon (pts (xy 139.425 116.89744) (xy 139.67319 116.89744) (xy 139.72375 116.948) (xy 140.473 116.948) (xy 140.473 116.928) (xy 140.615142 116.928) (xy 140.61483 117.285069) (xy 140.727 117.556542) (xy 140.727 117.92625) (xy 140.88575 118.085) (xy 141.126309 118.085) (xy 141.277195 118.022501) (xy 141.403212 118.074828) (xy 141.587128 118.074989) (xy 141.7 118.09744) (xy 142.149767 118.09744) (xy 142.174471 118.157229) (xy 142.212176 118.195) (xy 139.375 118.195) (xy 139.375 117.36075) (xy 139.565 117.36075) (xy 139.565 117.57631) (xy 139.661673 117.809699) (xy 139.840302 117.988327) (xy 140.073691 118.085) (xy 140.31425 118.085) (xy 140.473 117.92625) (xy 140.473 117.202) (xy 139.72375 117.202) (xy 139.565 117.36075) (xy 139.375 117.36075) (xy 139.375 116.887494) ) ) (filled_polygon (pts (xy 159.777 114.523) (xy 159.797 114.523) (xy 159.797 114.777) (xy 159.777 114.777) (xy 159.777 114.797) (xy 159.523 114.797) (xy 159.523 114.777) (xy 159.503 114.777) (xy 159.503 114.523) (xy 159.523 114.523) (xy 159.523 114.503) (xy 159.777 114.503) ) ) (filled_polygon (pts (xy 140.67756 113.497) (xy 140.67244 113.497) (xy 140.67244 113.203) (xy 140.67756 113.203) ) ) (filled_polygon (pts (xy 178.335 112.81756) (xy 174.77 112.81756) (xy 174.635 112.844413) (xy 174.635 112.78575) (xy 174.47625 112.627) (xy 173.875 112.627) (xy 173.875 112.647) (xy 173.625 112.647) (xy 173.625 112.627) (xy 173.02375 112.627) (xy 172.865 112.78575) (xy 172.865 112.926309) (xy 172.890093 112.986889) (xy 172.81131 113.00256) (xy 172.8 113.00256) (xy 172.611774 113.04) (xy 172.59702 113.04) (xy 172.476309 112.99) (xy 172.45875 112.99) (xy 172.3 113.14875) (xy 172.3 113.255334) (xy 172.25 113.330164) (xy 172.2 113.255334) (xy 172.2 113.14875) (xy 172.04125 112.99) (xy 172.023691 112.99) (xy 171.90298 113.04) (xy 171.888226 113.04) (xy 171.7 113.00256) (xy 171.68869 113.00256) (xy 171.616678 112.988236) (xy 171.569221 112.940779) (xy 171.509476 112.900859) (xy 171.54744 112.71) (xy 171.54744 112.11) (xy 171.540218 112.073691) (xy 172.865 112.073691) (xy 172.865 112.21425) (xy 173.02375 112.373) (xy 173.625 112.373) (xy 173.625 111.72375) (xy 173.875 111.72375) (xy 173.875 112.373) (xy 174.47625 112.373) (xy 174.635 112.21425) (xy 174.635 112.073691) (xy 174.538327 111.840302) (xy 174.359699 111.661673) (xy 174.12631 111.565) (xy 174.03375 111.565) (xy 173.875 111.72375) (xy 173.625 111.72375) (xy 173.46625 111.565) (xy 173.37369 111.565) (xy 173.140301 111.661673) (xy 172.961673 111.840302) (xy 172.865 112.073691) (xy 171.540218 112.073691) (xy 171.498157 111.862235) (xy 171.357809 111.652191) (xy 171.147765 111.511843) (xy 170.9 111.46256) (xy 170.703239 111.46256) (xy 170.595829 111.301811) (xy 170.385785 111.161463) (xy 170.13802 111.11218) (xy 169.43698 111.11218) (xy 169.332141 111.133034) (xy 169.311829 111.12462) (xy 169.12075 111.12462) (xy 168.962 111.28337) (xy 168.962 111.327509) (xy 168.838823 111.511855) (xy 168.835 111.531075) (xy 168.831177 111.511855) (xy 168.708 111.327509) (xy 168.708 111.28337) (xy 168.54925 111.12462) (xy 168.358171 111.12462) (xy 168.337859 111.133034) (xy 168.23302 111.11218) (xy 167.53198 111.11218) (xy 167.284215 111.161463) (xy 167.074171 111.301811) (xy 166.93744 111.506442) (xy 166.93744 111.45) (xy 166.888157 111.202235) (xy 166.747809 110.992191) (xy 166.537765 110.851843) (xy 166.29 110.80256) (xy 165.79 110.80256) (xy 165.542235 110.851843) (xy 165.332191 110.992191) (xy 165.191843 111.202235) (xy 165.14256 111.45) (xy 165.14256 112.05) (xy 165.191843 112.297765) (xy 165.193336 112.3) (xy 165.191843 112.302235) (xy 165.14256 112.55) (xy 165.14256 112.641797) (xy 165.136494 112.637744) (xy 165.06375 112.565) (xy 165.008691 112.565) (xy 164.972632 112.579936) (xy 164.835 112.55256) (xy 164.485 112.55256) (xy 164.402225 112.569025) (xy 164.495 112.47625) (xy 164.495 112.38369) (xy 164.400048 112.154456) (xy 164.559698 112.088327) (xy 164.738327 111.909699) (xy 164.835 111.67631) (xy 164.835 111.58375) (xy 164.67625 111.425) (xy 164.027 111.425) (xy 164.027 111.447) (xy 163.773 111.447) (xy 163.773 111.425) (xy 163.753 111.425) (xy 163.753 111.25225) (xy 163.91075 111.41) (xy 164.051309 111.41) (xy 164.284698 111.313327) (xy 164.423026 111.175) (xy 164.67625 111.175) (xy 164.835 111.01625) (xy 164.835 110.92369) (xy 164.738327 110.690301) (xy 164.56 110.511975) (xy 164.56 110.397998) (xy 164.403252 110.397998) (xy 164.56 110.24125) (xy 164.56 110.14869) (xy 164.500793 110.00575) (xy 166.89698 110.00575) (xy 166.89698 110.34669) (xy 166.993653 110.580079) (xy 167.172282 110.758707) (xy 167.405671 110.85538) (xy 167.59675 110.85538) (xy 167.7555 110.69663) (xy 167.7555 110.00575) (xy 167.84948 110.00575) (xy 167.84948 110.34669) (xy 167.946153 110.580079) (xy 168.0095 110.643426) (xy 168.0095 110.69663) (xy 168.16825 110.85538) (xy 168.54925 110.85538) (xy 168.708 110.69663) (xy 168.708 110.643426) (xy 168.771347 110.580079) (xy 168.835 110.426407) (xy 168.898653 110.580079) (xy 168.962 110.643426) (xy 168.962 110.69663) (xy 169.12075 110.85538) (xy 169.50175 110.85538) (xy 169.6605 110.69663) (xy 169.6605 110.643426) (xy 169.723847 110.580079) (xy 169.82052 110.34669) (xy 169.82052 110.00575) (xy 169.66177 109.847) (xy 168.96073 109.847) (xy 168.835 109.97273) (xy 168.70927 109.847) (xy 168.00823 109.847) (xy 167.84948 110.00575) (xy 167.7555 110.00575) (xy 167.7555 109.847) (xy 167.05573 109.847) (xy 166.89698 110.00575) (xy 164.500793 110.00575) (xy 164.463327 109.915301) (xy 164.284698 109.736673) (xy 164.051309 109.64) (xy 163.953936 109.64) (xy 164.029045 109.589814) (xy 164.075414 109.543444) (xy 164.128433 109.508018) (xy 164.152475 109.483976) (xy 164.189578 109.428448) (xy 164.524716 109.09331) (xy 166.89698 109.09331) (xy 166.89698 109.43425) (xy 167.05573 109.593) (xy 167.7555 109.593) (xy 167.7555 109.09331) (xy 167.84948 109.09331) (xy 167.84948 109.43425) (xy 168.00823 109.593) (xy 168.70927 109.593) (xy 168.835 109.46727) (xy 168.96073 109.593) (xy 169.66177 109.593) (xy 169.82052 109.43425) (xy 169.82052 109.09331) (xy 169.723847 108.859921) (xy 169.6605 108.796574) (xy 169.6605 108.74337) (xy 169.50175 108.58462) (xy 169.12075 108.58462) (xy 168.962 108.74337) (xy 168.962 108.796574) (xy 168.898653 108.859921) (xy 168.835 109.013593) (xy 168.771347 108.859921) (xy 168.708 108.796574) (xy 168.708 108.74337) (xy 168.54925 108.58462) (xy 168.16825 108.58462) (xy 168.0095 108.74337) (xy 168.0095 108.796574) (xy 167.946153 108.859921) (xy 167.84948 109.09331) (xy 167.7555 109.09331) (xy 167.7555 108.74337) (xy 167.59675 108.58462) (xy 167.405671 108.58462) (xy 167.172282 108.681293) (xy 166.993653 108.859921) (xy 166.89698 109.09331) (xy 164.524716 109.09331) (xy 166.00075 107.617276) (xy 166.053767 107.581851) (xy 166.077809 107.557809) (xy 166.113235 107.50479) (xy 166.159599 107.458426) (xy 166.159605 107.458422) (xy 166.248059 107.32604) (xy 166.297256 107.252413) (xy 166.297257 107.252408) (xy 166.388245 107.032745) (xy 166.39369 107.035) (xy 166.58425 107.035) (xy 166.743 106.87625) (xy 166.743 105.377) (xy 166.997 105.377) (xy 166.997 106.87625) (xy 167.15575 107.035) (xy 167.34631 107.035) (xy 167.579699 106.938327) (xy 167.758327 106.759698) (xy 167.855 106.526309) (xy 167.855 106.08575) (xy 167.865 106.08575) (xy 167.865 106.30131) (xy 167.961673 106.534699) (xy 168.140302 106.713327) (xy 168.373691 106.81) (xy 168.61425 106.81) (xy 168.773 106.65125) (xy 168.773 105.927) (xy 168.02375 105.927) (xy 167.865 106.08575) (xy 167.855 106.08575) (xy 167.855 105.53575) (xy 167.69625 105.377) (xy 166.997 105.377) (xy 166.743 105.377) (xy 166.723 105.377) (xy 166.723 105.29869) (xy 167.865 105.29869) (xy 167.865 105.51425) (xy 168.02375 105.673) (xy 168.773 105.673) (xy 168.773 104.94875) (xy 169.027 104.94875) (xy 169.027 105.673) (xy 169.047 105.673) (xy 169.047 105.927) (xy 169.027 105.927) (xy 169.027 106.65125) (xy 169.18575 106.81) (xy 169.426309 106.81) (xy 169.659698 106.713327) (xy 169.660898 106.712127) (xy 169.752235 106.773157) (xy 169.964987 106.815476) (xy 169.96483 106.995069) (xy 170.114471 107.357229) (xy 170.391314 107.634555) (xy 170.753212 107.784828) (xy 170.822998 107.784889) (xy 170.822998 107.924458) (xy 170.66425 107.76571) (xy 170.423641 107.76571) (xy 170.190252 107.862383) (xy 170.011623 108.041011) (xy 169.91495 108.2744) (xy 169.91495 108.51501) (xy 170.028905 108.628965) (xy 169.984112 108.673758) (xy 169.91495 108.673758) (xy 169.91495 108.74292) (xy 169.9145 108.74337) (xy 169.9145 109.593) (xy 169.9345 109.593) (xy 169.9345 109.847) (xy 169.9145 109.847) (xy 169.9145 110.69663) (xy 170.07325 110.85538) (xy 170.264329 110.85538) (xy 170.497718 110.758707) (xy 170.676347 110.580079) (xy 170.77302 110.34669) (xy 170.77302 110.00575) (xy 170.614272 109.847002) (xy 170.77302 109.847002) (xy 170.77302 109.72704) (xy 170.823 109.67706) (xy 170.823 108.92776) (xy 170.803 108.92776) (xy 170.803 108.67376) (xy 170.823 108.67376) (xy 170.823 108.65376) (xy 171.077 108.65376) (xy 171.077 108.67376) (xy 171.097 108.67376) (xy 171.097 108.92776) (xy 171.077 108.92776) (xy 171.077 109.67706) (xy 171.23575 109.83581) (xy 171.476359 109.83581) (xy 171.709748 109.739137) (xy 171.864883 109.584003) (xy 171.86483 109.645069) (xy 172.014471 110.007229) (xy 172.291314 110.284555) (xy 172.653212 110.434828) (xy 173.045069 110.43517) (xy 173.407229 110.285529) (xy 173.684555 110.008686) (xy 173.834828 109.646788) (xy 173.834837 109.636418) (xy 173.927235 109.698157) (xy 174.175 109.74744) (xy 174.925 109.74744) (xy 175.172765 109.698157) (xy 175.382809 109.557809) (xy 175.523157 109.347765) (xy 175.57244 109.1) (xy 175.57244 108.3) (xy 175.523157 108.052235) (xy 175.462127 107.960898) (xy 175.463327 107.959698) (xy 175.56 107.726309) (xy 175.56 107.48575) (xy 175.40125 107.327) (xy 174.677 107.327) (xy 174.677 107.347) (xy 174.423 107.347) (xy 174.423 107.327) (xy 173.69875 107.327) (xy 173.54 107.48575) (xy 173.54 107.726309) (xy 173.599811 107.870705) (xy 173.497815 107.802553) (xy 173.25005 107.75327) (xy 172.617731 107.75327) (xy 172.757859 107.659639) (xy 172.898207 107.449595) (xy 172.94749 107.20183) (xy 172.94749 106.673691) (xy 173.54 106.673691) (xy 173.54 106.91425) (xy 173.69875 107.073) (xy 174.423 107.073) (xy 174.423 106.32375) (xy 174.677 106.32375) (xy 174.677 107.073) (xy 175.40125 107.073) (xy 175.56 106.91425) (xy 175.56 106.673691) (xy 175.463327 106.440302) (xy 175.284699 106.261673) (xy 175.05131 106.165) (xy 174.83575 106.165) (xy 174.677 106.32375) (xy 174.423 106.32375) (xy 174.26425 106.165) (xy 174.04869 106.165) (xy 173.815301 106.261673) (xy 173.636673 106.440302) (xy 173.54 106.673691) (xy 172.94749 106.673691) (xy 172.94749 106.40173) (xy 172.898207 106.153965) (xy 172.757859 105.943921) (xy 172.649623 105.871599) (xy 172.643723 105.84194) (xy 172.469221 105.580779) (xy 172.119221 105.230779) (xy 171.85806 105.056277) (xy 171.55 104.995) (xy 171.276391 104.995) (xy 171.257809 104.967191) (xy 171.047765 104.826843) (xy 170.8 104.77756) (xy 170 104.77756) (xy 169.752235 104.826843) (xy 169.660898 104.887873) (xy 169.659698 104.886673) (xy 169.426309 104.79) (xy 169.18575 104.79) (xy 169.027 104.94875) (xy 168.773 104.94875) (xy 168.61425 104.79) (xy 168.373691 104.79) (xy 168.140302 104.886673) (xy 167.961673 105.065301) (xy 167.865 105.29869) (xy 166.723 105.29869) (xy 166.723 105.123) (xy 166.743 105.123) (xy 166.743 103.62375) (xy 166.997 103.62375) (xy 166.997 105.123) (xy 167.69625 105.123) (xy 167.855 104.96425) (xy 167.855 103.973691) (xy 167.758327 103.740302) (xy 167.579699 103.561673) (xy 167.34631 103.465) (xy 167.15575 103.465) (xy 166.997 103.62375) (xy 166.743 103.62375) (xy 166.58425 103.465) (xy 166.532 103.465) (xy 166.532 103.42875) (xy 173.185 103.42875) (xy 173.185 103.496309) (xy 173.281673 103.729698) (xy 173.460301 103.908327) (xy 173.69369 104.005) (xy 173.83425 104.005) (xy 173.993 103.84625) (xy 173.993 103.27) (xy 174.247 103.27) (xy 174.247 103.84625) (xy 174.40575 104.005) (xy 174.54631 104.005) (xy 174.779699 103.908327) (xy 174.958327 103.729698) (xy 175.055 103.496309) (xy 175.055 103.42875) (xy 174.89625 103.27) (xy 174.247 103.27) (xy 173.993 103.27) (xy 173.34375 103.27) (xy 173.185 103.42875) (xy 166.532 103.42875) (xy 166.532 102.534495) (xy 173.185389 102.534495) (xy 173.221843 102.717765) (xy 173.231299 102.731916) (xy 173.185 102.843691) (xy 173.185 102.91125) (xy 173.34375 103.07) (xy 173.5815 103.07) (xy 173.82 103.11744) (xy 174.42 103.11744) (xy 174.6585 103.07) (xy 174.89625 103.07) (xy 175.055 102.91125) (xy 175.055 102.843691) (xy 175.008701 102.731916) (xy 175.018157 102.717765) (xy 175.06744 102.47) (xy 175.06744 102.40744) (xy 178.335 102.40744) ) ) (filled_polygon (pts (xy 156.76483 112.645069) (xy 156.914471 113.007229) (xy 156.954255 113.047082) (xy 156.89802 113.144391) (xy 156.889944 113.203684) (xy 156.945668 113.25256) (xy 156.4 113.25256) (xy 156.152235 113.301843) (xy 156.15 113.303336) (xy 156.147765 113.301843) (xy 155.9 113.25256) (xy 155.679312 113.25256) (xy 155.933034 113.147465) (xy 155.933036 113.147465) (xy 156.088256 113.04375) (xy 156.139044 113.009815) (xy 156.139045 113.009814) (xy 156.185414 112.963444) (xy 156.238433 112.928018) (xy 156.262475 112.903976) (xy 156.2979 112.850959) (xy 156.765058 112.383801) ) ) (filled_polygon (pts (xy 143.265 109.353026) (xy 143.265 111.200087) (xy 143.207765 111.161843) (xy 142.96 111.11256) (xy 142.56 111.11256) (xy 142.312235 111.161843) (xy 142.31 111.163336) (xy 142.307765 111.161843) (xy 142.130719 111.126627) (xy 141.742046 110.737954) (xy 141.697619 110.708269) (xy 141.715 110.666309) (xy 141.715 110.59875) (xy 141.55625 110.44) (xy 141.3185 110.44) (xy 141.08 110.39256) (xy 140.48 110.39256) (xy 140.2415 110.44) (xy 140.00375 110.44) (xy 139.845 110.59875) (xy 139.845 110.666309) (xy 139.891299 110.778084) (xy 139.881843 110.792235) (xy 139.83256 111.04) (xy 139.83256 111.44) (xy 139.881843 111.687765) (xy 140.022191 111.897809) (xy 140.232235 112.038157) (xy 140.434463 112.078382) (xy 140.492082 112.217832) (xy 140.38925 112.115) (xy 140.248691 112.115) (xy 140.196411 112.136655) (xy 140.025 112.10256) (xy 139.425 112.10256) (xy 139.375 112.112506) (xy 139.375 110.535152) (xy 139.395069 110.53517) (xy 139.757229 110.385529) (xy 139.953425 110.189675) (xy 140.00375 110.24) (xy 140.653 110.24) (xy 140.653 109.66375) (xy 140.907 109.66375) (xy 140.907 110.24) (xy 141.55625 110.24) (xy 141.715 110.08125) (xy 141.715 110.013691) (xy 141.618327 109.780302) (xy 141.439699 109.601673) (xy 141.20631 109.505) (xy 141.06575 109.505) (xy 140.907 109.66375) (xy 140.653 109.66375) (xy 140.49425 109.505) (xy 140.377986 109.505) (xy 140.524555 109.358686) (xy 140.674828 108.996788) (xy 140.67517 108.604931) (xy 140.525529 108.242771) (xy 140.248686 107.965445) (xy 140.131541 107.916802) (xy 140.207229 107.885529) (xy 140.484555 107.608686) (xy 140.634828 107.246788) (xy 140.63517 106.854931) (xy 140.542411 106.630437) ) ) (filled_polygon (pts (xy 159.676843 109.977235) (xy 159.62756 110.225) (xy 159.62756 110.268348) (xy 159.143869 110.752039) (xy 158.992771 110.814471) (xy 158.738363 111.068435) (xy 158.646576 110.976648) (xy 158.660718 110.962505) (xy 158.645162 110.946949) (xy 158.824767 110.767344) (xy 158.840323 110.7829) (xy 159.299412 110.323811) (xy 159.299412 110.099305) (xy 159.412591 110.212483) (xy 159.233962 110.033855) (xy 159.149846 109.999013) (xy 159.243055 109.905804) (xy 159.243291 109.905646) (xy 159.246541 109.905) (xy 159.725109 109.905) ) ) (filled_polygon (pts (xy 163.752 110.4) (xy 163.772 110.4) (xy 163.772 110.57275) (xy 163.61425 110.415) (xy 163.478 110.415) (xy 163.478 110.4) (xy 163.498 110.4) (xy 163.498 110.378) (xy 163.752 110.378) ) ) (filled_polygon (pts (xy 164.922 103.602228) (xy 164.862191 103.642191) (xy 164.721843 103.852235) (xy 164.67256 104.1) (xy 164.67256 104.9) (xy 164.721843 105.147765) (xy 164.790155 105.25) (xy 164.721843 105.352235) (xy 164.67256 105.6) (xy 164.67256 106.4) (xy 164.71712 106.624022) (xy 163.046948 108.294194) (xy 163.046709 108.294354) (xy 163.043459 108.295) (xy 159.246541 108.295) (xy 159.184 108.28256) (xy 159.15 108.28256) (xy 159.087459 108.295) (xy 159.021884 108.295) (xy 158.960037 108.307302) (xy 158.96017 108.154931) (xy 158.940278 108.106788) (xy 158.944542 108.100406) (xy 158.952557 108.060111) (xy 159.020069 108.06017) (xy 159.382229 107.910529) (xy 159.659555 107.633686) (xy 159.809828 107.271788) (xy 159.809944 107.139306) (xy 159.923 107.02625) (xy 159.923 106.51996) (xy 160.018125 106.425) (xy 160.177 106.425) (xy 160.177 107.02625) (xy 160.33575 107.185) (xy 160.476309 107.185) (xy 160.709698 107.088327) (xy 160.888327 106.909699) (xy 160.985 106.67631) (xy 160.985 106.58375) (xy 160.82625 106.425) (xy 160.177 106.425) (xy 160.018125 106.425) (xy 160.084555 106.358686) (xy 160.169963 106.153) (xy 160.177 106.153) (xy 160.177 106.175) (xy 160.82625 106.175) (xy 160.985 106.01625) (xy 160.985 105.92369) (xy 160.948081 105.83456) (xy 161.059698 105.788327) (xy 161.238327 105.609699) (xy 161.335 105.37631) (xy 161.335 105.23575) (xy 161.17625 105.077) (xy 160.6 105.077) (xy 160.6 105.097) (xy 160.44744 105.097) (xy 160.44744 104.803) (xy 160.6 104.803) (xy 160.6 104.823) (xy 161.17625 104.823) (xy 161.335 104.66425) (xy 161.335 104.52369) (xy 161.318974 104.485) (xy 161.451309 104.485) (xy 161.519635 104.456698) (xy 161.664471 104.807229) (xy 161.941314 105.084555) (xy 162.303212 105.234828) (xy 162.695069 105.23517) (xy 163.057229 105.085529) (xy 163.334555 104.808686) (xy 163.484828 104.446788) (xy 163.485012 104.236028) (xy 163.607229 104.185529) (xy 163.884555 103.908686) (xy 164.034828 103.546788) (xy 164.034908 103.455551) (xy 164.197765 103.423157) (xy 164.407809 103.282809) (xy 164.548157 103.072765) (xy 164.59744 102.825) (xy 164.59744 102.72244) (xy 164.7 102.72244) (xy 164.922 102.678282) ) ) (filled_polygon (pts (xy 150.877 107.423) (xy 150.897 107.423) (xy 150.897 107.677) (xy 150.877 107.677) (xy 150.877 107.697) (xy 150.623 107.697) (xy 150.623 107.677) (xy 150.603 107.677) (xy 150.603 107.423) (xy 150.623 107.423) (xy 150.623 107.403) (xy 150.877 107.403) ) ) (filled_polygon (pts (xy 156.327 106.423) (xy 156.347 106.423) (xy 156.347 106.677) (xy 156.327 106.677) (xy 156.327 106.697) (xy 156.073 106.697) (xy 156.073 106.677) (xy 156.053 106.677) (xy 156.053 106.423) (xy 156.073 106.423) (xy 156.073 106.403) (xy 156.327 106.403) ) ) (filled_polygon (pts (xy 148.345 103.83517) (xy 148.345 104.190551) (xy 148.293867 104.313694) (xy 148.17631 104.265) (xy 148.08375 104.265) (xy 147.925 104.42375) (xy 147.925 105.073) (xy 147.947 105.073) (xy 147.947 105.327) (xy 147.925 105.327) (xy 147.925 105.347) (xy 147.675 105.347) (xy 147.675 105.327) (xy 147.653 105.327) (xy 147.653 105.073) (xy 147.675 105.073) (xy 147.675 104.42375) (xy 147.552671 104.301421) (xy 147.652046 104.202046) (xy 147.805954 103.971705) (xy 147.810683 103.947929) (xy 148.021705 103.905954) (xy 148.127925 103.83498) ) ) (filled_polygon (pts (xy 150.724061 103.087308) (xy 150.655172 103.253212) (xy 150.65483 103.645069) (xy 150.714513 103.789513) (xy 150.540302 103.861673) (xy 150.361673 104.040301) (xy 150.265 104.27369) (xy 150.265 104.36625) (xy 150.42375 104.525) (xy 151.073 104.525) (xy 151.073 104.503) (xy 151.327 104.503) (xy 151.327 104.525) (xy 151.347 104.525) (xy 151.347 104.775) (xy 151.327 104.775) (xy 151.327 104.797) (xy 151.073 104.797) (xy 151.073 104.775) (xy 150.42375 104.775) (xy 150.265 104.93375) (xy 150.265 105.02631) (xy 150.317295 105.15256) (xy 150.2 105.15256) (xy 150.067695 105.178877) (xy 150.184828 104.896788) (xy 150.18517 104.504931) (xy 150.035529 104.142771) (xy 149.955 104.062102) (xy 149.955 103.09744) (xy 150.025 103.09744) (xy 150.145 103.073571) (xy 150.265 103.09744) (xy 150.515 103.09744) (xy 150.645 103.071582) ) ) (filled_polygon (pts (xy 145.20256 101.106652) (xy 145.20256 101.525) (xy 145.251843 101.772765) (xy 145.392191 101.982809) (xy 145.602235 102.123157) (xy 145.85 102.17244) (xy 146.45 102.17244) (xy 146.697765 102.123157) (xy 146.907809 101.982809) (xy 147.048157 101.772765) (xy 147.061636 101.705) (xy 147.112817 101.705) (xy 147.252235 101.798157) (xy 147.5 101.84744) (xy 147.869473 101.84744) (xy 147.843058 101.911055) (xy 147.592771 102.014471) (xy 147.315445 102.291314) (xy 147.204275 102.559041) (xy 147.028295 102.594046) (xy 146.797954 102.747954) (xy 146.647954 102.897954) (xy 146.494046 103.128295) (xy 146.44 103.4) (xy 146.44 103.405908) (xy 146.147954 103.697954) (xy 146.022903 103.885108) (xy 145.704931 103.88483) (xy 145.47894 103.978207) (xy 145.35 103.95256) (xy 144.55 103.95256) (xy 144.302235 104.001843) (xy 144.275239 104.019881) (xy 144.284828 103.996788) (xy 144.28517 103.604931) (xy 144.135529 103.242771) (xy 144.001808 103.108817) (xy 143.955954 102.878295) (xy 143.802046 102.647954) (xy 143.516931 102.362839) (xy 143.607229 102.325529) (xy 143.792056 102.141023) (xy 143.95 102.17244) (xy 144.55 102.17244) (xy 144.797765 102.123157) (xy 145.007809 101.982809) (xy 145.148157 101.772765) (xy 145.19744 101.525) (xy 145.19744 101.101532) ) ) (filled_polygon (pts (xy 161.005779 101.044221) (xy 161.26694 101.218723) (xy 161.405683 101.246321) (xy 161.252235 101.276843) (xy 161.042191 101.417191) (xy 160.901843 101.627235) (xy 160.899778 101.637619) (xy 160.592771 101.764471) (xy 160.567197 101.79) (xy 160.635 101.62631) (xy 160.635 101.43575) (xy 160.47625 101.277) (xy 158.977 101.277) (xy 158.977 101.297) (xy 158.723 101.297) (xy 158.723 101.277) (xy 157.22375 101.277) (xy 157.065 101.43575) (xy 157.065 101.62631) (xy 157.161673 101.859699) (xy 157.340302 102.038327) (xy 157.573691 102.135) (xy 158.343158 102.135) (xy 158.265 102.32369) (xy 158.265 102.41625) (xy 158.42375 102.575) (xy 159.073 102.575) (xy 159.073 102.553) (xy 159.327 102.553) (xy 159.327 102.575) (xy 159.347 102.575) (xy 159.347 102.613554) (xy 159.180277 102.780277) (xy 159.167957 102.798716) (xy 159.152235 102.801843) (xy 159.138084 102.811299) (xy 159.026309 102.765) (xy 158.88575 102.765) (xy 158.82575 102.825) (xy 158.42375 102.825) (xy 158.399 102.84975) (xy 158.31425 102.765) (xy 158.173691 102.765) (xy 157.940302 102.861673) (xy 157.761673 103.040301) (xy 157.665 103.27369) (xy 157.665 103.36625) (xy 157.82375 103.525) (xy 158.473 103.525) (xy 158.473 103.421025) (xy 158.540302 103.488327) (xy 158.747 103.573944) (xy 158.747 103.775) (xy 158.727 103.775) (xy 158.727 103.777717) (xy 158.696788 103.765172) (xy 158.304931 103.76483) (xy 158.280318 103.775) (xy 157.82375 103.775) (xy 157.765892 103.832858) (xy 157.705609 103.79802) (xy 157.646316 103.789944) (xy 157.525 103.928257) (xy 157.525 104.019701) (xy 157.473922 103.953078) (xy 157.317466 103.862662) (xy 157.253684 103.789944) (xy 157.2 103.797256) (xy 157.146316 103.789944) (xy 157.09744 103.845668) (xy 157.09744 103.35) (xy 157.048157 103.102235) (xy 157.038701 103.088084) (xy 157.085 102.976309) (xy 157.085 102.83575) (xy 156.92625 102.677) (xy 156.34744 102.677) (xy 156.34744 102.423) (xy 156.92625 102.423) (xy 157.085 102.26425) (xy 157.085 102.123691) (xy 156.988327 101.890302) (xy 156.809699 101.711673) (xy 156.57631 101.615) (xy 156.48375 101.615) (xy 156.39744 101.70131) (xy 156.39744 101.35) (xy 156.348157 101.102235) (xy 156.346664 101.1) (xy 156.348157 101.097765) (xy 156.395749 100.858504) (xy 156.447765 100.848157) (xy 156.45 100.846664) (xy 156.452235 100.848157) (xy 156.7 100.89744) (xy 157.09819 100.89744) (xy 157.22375 101.023) (xy 158.723 101.023) (xy 158.723 101.003) (xy 158.977 101.003) (xy 158.977 101.023) (xy 160.47625 101.023) (xy 160.635 100.86425) (xy 160.635 100.755) (xy 160.716558 100.755) ) ) (filled_polygon (pts (xy 160.953212 103.584828) (xy 161.172 103.585019) (xy 161.172 103.725) (xy 161.152 103.725) (xy 161.152 103.747) (xy 160.898 103.747) (xy 160.898 103.725) (xy 160.878 103.725) (xy 160.878 103.553597) ) ) (filled_polygon (pts (xy 163.227 101.098) (xy 163.247 101.098) (xy 163.247 101.352) (xy 163.227 101.352) (xy 163.227 101.372) (xy 162.973 101.372) (xy 162.973 101.352) (xy 162.953 101.352) (xy 162.953 101.098) (xy 162.973 101.098) (xy 162.973 101.078) (xy 163.227 101.078) ) ) (filled_polygon (pts (xy 178.335 99.59256) (xy 174.77 99.59256) (xy 174.522235 99.641843) (xy 174.312191 99.782191) (xy 174.171843 99.992235) (xy 174.12256 100.24) (xy 174.12256 100.245089) (xy 174.054732 100.272697) (xy 173.91008 100.331575) (xy 173.91006 100.331588) (xy 173.910034 100.331593) (xy 173.804886 100.400932) (xy 173.725494 100.453277) (xy 166.154507 100.453277) (xy 166.068209 100.396378) (xy 165.96997 100.331595) (xy 165.969944 100.33159) (xy 165.969921 100.331575) (xy 165.825271 100.272698) (xy 165.825269 100.272697) (xy 165.680616 100.213819) (xy 165.560866 100.190763) (xy 165.441222 100.166965) (xy 165.301148 100.166965) (xy 165.238327 100.015301) (xy 165.059698 99.836673) (xy 164.826309 99.74) (xy 164.71075 99.74) (xy 164.655 99.79575) (xy 164.655 99.596192) (xy 164.748691 99.635) (xy 164.88925 99.635) (xy 165.048 99.47625) (xy 165.048 98.875) (xy 165.028 98.875) (xy 165.028 98.81) (xy 165.322 98.81) (xy 165.322 98.875) (xy 165.302 98.875) (xy 165.302 99.47625) (xy 165.46075 99.635) (xy 165.601309 99.635) (xy 165.834698 99.538327) (xy 166.013327 99.359699) (xy 166.11 99.12631) (xy 166.11 99.03375) (xy 165.953252 98.877002) (xy 166.11 98.877002) (xy 166.11 98.81) (xy 166.376837 98.81) (xy 166.442191 98.907809) (xy 166.652235 99.048157) (xy 166.9 99.09744) (xy 167.7 99.09744) (xy 167.947765 99.048157) (xy 168.039102 98.987127) (xy 168.040302 98.988327) (xy 168.273691 99.085) (xy 168.51425 99.085) (xy 168.673 98.92625) (xy 168.673 98.202) (xy 168.927 98.202) (xy 168.927 98.92625) (xy 169.08575 99.085) (xy 169.326309 99.085) (xy 169.559698 98.988327) (xy 169.738327 98.809699) (xy 169.835 98.57631) (xy 169.835 98.36075) (xy 169.67625 98.202) (xy 168.927 98.202) (xy 168.673 98.202) (xy 168.653 98.202) (xy 168.653 97.948) (xy 168.673 97.948) (xy 168.673 97.928) (xy 168.927 97.928) (xy 168.927 97.948) (xy 169.67625 97.948) (xy 169.835 97.78925) (xy 169.835 97.57369) (xy 169.738327 97.340301) (xy 169.559698 97.161673) (xy 169.546726 97.1563) (xy 169.554828 97.136788) (xy 169.55517 96.744931) (xy 169.518011 96.655) (xy 178.335 96.655) ) ) (filled_polygon (pts (xy 151.277 100.073) (xy 151.297 100.073) (xy 151.297 100.327) (xy 151.277 100.327) (xy 151.277 100.347) (xy 151.023 100.347) (xy 151.023 100.327) (xy 151.003 100.327) (xy 151.003 100.073) (xy 151.023 100.073) (xy 151.023 100.053) (xy 151.277 100.053) ) ) (filled_polygon (pts (xy 147.641314 99.784555) (xy 147.897 99.890725) (xy 147.897 99.927) (xy 147.875 99.927) (xy 147.875 99.947) (xy 147.625 99.947) (xy 147.625 99.927) (xy 147.603 99.927) (xy 147.603 99.843852) (xy 147.631644 99.774869) ) ) (filled_polygon (pts (xy 167.585172 96.743212) (xy 167.584902 97.05256) (xy 166.9 97.05256) (xy 166.652235 97.101843) (xy 166.442191 97.242191) (xy 166.376837 97.34) (xy 164.225 97.34) (xy 163.96703 97.391314) (xy 163.943728 97.395949) (xy 163.705276 97.555277) (xy 163.633025 97.627529) (xy 163.598157 97.452235) (xy 163.457809 97.242191) (xy 163.247765 97.101843) (xy 163 97.05256) (xy 162.457242 97.05256) (xy 162.246788 96.965172) (xy 161.854931 96.96483) (xy 161.6125 97.065) (xy 161.38575 97.065) (xy 161.227 97.22375) (xy 161.227 97.379779) (xy 161.215445 97.391314) (xy 161.065172 97.753212) (xy 161.06483 98.145069) (xy 161.214471 98.507229) (xy 161.227 98.51978) (xy 161.227 98.92625) (xy 161.38575 99.085) (xy 161.626309 99.085) (xy 161.859698 98.988327) (xy 161.860898 98.987127) (xy 161.952235 99.048157) (xy 162.2 99.09744) (xy 162.39658 99.09744) (xy 162.292191 99.167191) (xy 162.151843 99.377235) (xy 162.10256 99.625) (xy 162.10256 99.738015) (xy 162.089152 99.735348) (xy 162.08306 99.731277) (xy 161.941576 99.703134) (xy 161.619221 99.380779) (xy 161.35806 99.206277) (xy 161.05 99.145) (xy 160.459686 99.145) (xy 160.457809 99.142191) (xy 160.247765 99.001843) (xy 160 98.95256) (xy 159.2 98.95256) (xy 158.952235 99.001843) (xy 158.85 99.070155) (xy 158.747765 99.001843) (xy 158.5 98.95256) (xy 157.7 98.95256) (xy 157.452235 99.001843) (xy 157.362585 99.061746) (xy 157.347765 99.051843) (xy 157.1 99.00256) (xy 156.7 99.00256) (xy 156.452235 99.051843) (xy 156.45 99.053336) (xy 156.447765 99.051843) (xy 156.2 99.00256) (xy 155.8 99.00256) (xy 155.552235 99.051843) (xy 155.475 99.10345) (xy 155.397765 99.051843) (xy 155.15 99.00256) (xy 154.75 99.00256) (xy 154.502235 99.051843) (xy 154.5 99.053336) (xy 154.497765 99.051843) (xy 154.25 99.00256) (xy 154.04744 99.00256) (xy 154.04744 98.825) (xy 153.998157 98.577235) (xy 153.857809 98.367191) (xy 153.84817 98.36075) (xy 160.065 98.36075) (xy 160.065 98.57631) (xy 160.161673 98.809699) (xy 160.340302 98.988327) (xy 160.573691 99.085) (xy 160.81425 99.085) (xy 160.973 98.92625) (xy 160.973 98.202) (xy 160.22375 98.202) (xy 160.065 98.36075) (xy 153.84817 98.36075) (xy 153.647765 98.226843) (xy 153.4 98.17756) (xy 153.17244 98.17756) (xy 153.17244 98.085) (xy 153.177002 98.085) (xy 153.177002 97.926252) (xy 153.33575 98.085) (xy 153.476309 98.085) (xy 153.709698 97.988327) (xy 153.888327 97.809699) (xy 153.985 97.57631) (xy 153.985 97.57369) (xy 160.065 97.57369) (xy 160.065 97.78925) (xy 160.22375 97.948) (xy 160.973 97.948) (xy 160.973 97.22375) (xy 160.81425 97.065) (xy 160.573691 97.065) (xy 160.340302 97.161673) (xy 160.161673 97.340301) (xy 160.065 97.57369) (xy 153.985 97.57369) (xy 153.985 97.48375) (xy 153.82625 97.325) (xy 153.177 97.325) (xy 153.177 97.347) (xy 152.923 97.347) (xy 152.923 97.325) (xy 152.903 97.325) (xy 152.903 97.075) (xy 152.923 97.075) (xy 152.923 97.053) (xy 153.177 97.053) (xy 153.177 97.075) (xy 153.82625 97.075) (xy 153.985 96.91625) (xy 153.985 96.82369) (xy 153.915126 96.655) (xy 167.621801 96.655) ) ) (filled_polygon (pts (xy 145.20256 98.447) (xy 145.19744 98.447) (xy 145.19744 98.153) (xy 145.20256 98.153) ) ) (filled_polygon (pts (xy 140.177 97.073) (xy 140.197 97.073) (xy 140.197 97.327) (xy 140.177 97.327) (xy 140.177 97.347) (xy 139.923 97.347) (xy 139.923 97.327) (xy 139.903 97.327) (xy 139.903 97.073) (xy 139.923 97.073) (xy 139.923 97.053) (xy 140.177 97.053) ) ) ) (zone (net 2) (net_name GND) (layer B.Cu) (tstamp 55229854) (hatch edge 0.508) (connect_pads (clearance 0.508)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 188.45 92.3) (xy 188.45 123.3) (xy 121.45 123.3) (xy 121.45 92.3) ) ) (filled_polygon (pts (xy 139.577235 116.773157) (xy 139.825 116.82244) (xy 140.425 116.82244) (xy 140.664326 116.774836) (xy 140.615172 116.893212) (xy 140.61483 117.285069) (xy 140.764471 117.647229) (xy 140.95256 117.835646) (xy 140.95256 118.195) (xy 139.375 118.195) (xy 139.375 116.638027) ) ) (filled_polygon (pts (xy 178.335 118.195) (xy 164.277288 118.195) (xy 164.33 117.93) (xy 164.33 116.96) (xy 164.32744 116.94713) (xy 164.32744 116.895069) (xy 171.16483 116.895069) (xy 171.314471 117.257229) (xy 171.591314 117.534555) (xy 171.953212 117.684828) (xy 172.345069 117.68517) (xy 172.707229 117.535529) (xy 172.984555 117.258686) (xy 173.134828 116.896788) (xy 173.13517 116.504931) (xy 172.985529 116.142771) (xy 172.708686 115.865445) (xy 172.346788 115.715172) (xy 171.954931 115.71483) (xy 171.592771 115.864471) (xy 171.315445 116.141314) (xy 171.165172 116.503212) (xy 171.16483 116.895069) (xy 164.32744 116.895069) (xy 164.32744 116.595131) (xy 164.423691 116.635) (xy 164.49125 116.635) (xy 164.65 116.47625) (xy 164.65 116.2385) (xy 164.69744 116) (xy 164.69744 115.827) (xy 164.85 115.827) (xy 164.85 116.47625) (xy 165.00875 116.635) (xy 165.076309 116.635) (xy 165.309698 116.538327) (xy 165.488327 116.359699) (xy 165.585 116.12631) (xy 165.585 115.98575) (xy 165.42625 115.827) (xy 164.85 115.827) (xy 164.69744 115.827) (xy 164.69744 115.553) (xy 164.85 115.553) (xy 164.85 115.573) (xy 165.42625 115.573) (xy 165.585 115.41425) (xy 165.585 115.27369) (xy 165.488327 115.040301) (xy 165.309698 114.861673) (xy 165.151769 114.796257) (xy 165.299013 114.649013) (xy 165.436664 114.443004) (xy 165.485 114.2) (xy 165.485 111.073442) (xy 166.895 112.483442) (xy 166.895 114.01181) (xy 166.865445 114.041314) (xy 166.715172 114.403212) (xy 166.71483 114.795069) (xy 166.864471 115.157229) (xy 167.141314 115.434555) (xy 167.503212 115.584828) (xy 167.895069 115.58517) (xy 168.257229 115.435529) (xy 168.534555 115.158686) (xy 168.684828 114.796788) (xy 168.68517 114.404931) (xy 168.535529 114.042771) (xy 168.505 114.012189) (xy 168.505 112.15) (xy 168.443723 111.84194) (xy 168.269221 111.580779) (xy 166.333511 109.645069) (xy 171.86483 109.645069) (xy 172.014471 110.007229) (xy 172.291314 110.284555) (xy 172.653212 110.434828) (xy 173.045069 110.43517) (xy 173.407229 110.285529) (xy 173.684555 110.008686) (xy 173.834828 109.646788) (xy 173.83517 109.254931) (xy 173.685529 108.892771) (xy 173.408686 108.615445) (xy 173.046788 108.465172) (xy 172.654931 108.46483) (xy 172.292771 108.614471) (xy 172.015445 108.891314) (xy 171.865172 109.253212) (xy 171.86483 109.645069) (xy 166.333511 109.645069) (xy 165.369221 108.680779) (xy 165.10806 108.506277) (xy 164.8 108.445) (xy 164.424424 108.445) (xy 162.755 108.369117) (xy 162.755 107.496192) (xy 162.84869 107.535) (xy 163.31425 107.535) (xy 163.473 107.37625) (xy 163.473 106.527) (xy 163.727 106.527) (xy 163.727 107.37625) (xy 163.88575 107.535) (xy 164.35131 107.535) (xy 164.584699 107.438327) (xy 164.763327 107.259698) (xy 164.86 107.026309) (xy 164.86 106.68575) (xy 164.70125 106.527) (xy 163.727 106.527) (xy 163.473 106.527) (xy 163.453 106.527) (xy 163.453 106.273) (xy 163.473 106.273) (xy 163.473 106.253) (xy 163.727 106.253) (xy 163.727 106.273) (xy 164.70125 106.273) (xy 164.86 106.11425) (xy 164.86 105.773691) (xy 164.795566 105.618134) (xy 164.899013 105.549013) (xy 165.036664 105.343004) (xy 165.085 105.1) (xy 165.085 104.0814) (xy 165.309698 103.988327) (xy 165.488327 103.809699) (xy 165.585 103.57631) (xy 165.585 103.48375) (xy 165.51125 103.41) (xy 166.105908 103.41) (xy 167.697664 105.001756) (xy 167.701843 105.022765) (xy 167.842191 105.232809) (xy 168.052235 105.373157) (xy 168.3 105.42244) (xy 168.894328 105.42244) (xy 168.919046 105.546705) (xy 169.072954 105.777046) (xy 169.12756 105.831652) (xy 169.12756 106.175) (xy 169.176843 106.422765) (xy 169.317191 106.632809) (xy 169.527235 106.773157) (xy 169.775 106.82244) (xy 169.964981 106.82244) (xy 169.96483 106.995069) (xy 170.114471 107.357229) (xy 170.391314 107.634555) (xy 170.753212 107.784828) (xy 171.145069 107.78517) (xy 171.507229 107.635529) (xy 171.784555 107.358686) (xy 171.934828 106.996788) (xy 171.935166 106.609027) (xy 172.151705 106.565954) (xy 172.382046 106.412046) (xy 173.146652 105.64744) (xy 173.2 105.64744) (xy 173.447765 105.598157) (xy 173.657809 105.457809) (xy 173.798157 105.247765) (xy 173.84744 105) (xy 173.84744 104.4) (xy 173.798157 104.152235) (xy 173.657809 103.942191) (xy 173.447765 103.801843) (xy 173.2 103.75256) (xy 172.928563 103.75256) (xy 172.985 103.61631) (xy 172.985 103.47575) (xy 172.82625 103.317) (xy 172.25 103.317) (xy 172.25 103.337) (xy 172.121092 103.337) (xy 172.09744 103.313348) (xy 172.09744 102.89) (xy 172.05 102.6515) (xy 172.05 102.41375) (xy 172.25 102.41375) (xy 172.25 103.063) (xy 172.82625 103.063) (xy 172.985 102.90425) (xy 172.985 102.76369) (xy 172.888327 102.530301) (xy 172.709698 102.351673) (xy 172.476309 102.255) (xy 172.40875 102.255) (xy 172.25 102.41375) (xy 172.05 102.41375) (xy 171.89125 102.255) (xy 171.823691 102.255) (xy 171.711916 102.301299) (xy 171.697765 102.291843) (xy 171.45 102.24256) (xy 171.37 102.24256) (xy 171.37 99.57) (xy 171.315954 99.298295) (xy 171.162046 99.067954) (xy 170.785 98.690908) (xy 170.785 97.575) (xy 170.730954 97.303295) (xy 170.577046 97.072954) (xy 170.302046 96.797954) (xy 170.088099 96.655) (xy 178.335 96.655) ) ) (filled_polygon (pts (xy 155.165 117.55) (xy 155.213336 117.793004) (xy 155.350987 117.999013) (xy 155.556996 118.136664) (xy 155.8 118.185) (xy 155.80298 118.185) (xy 155.827123 118.195) (xy 150.897916 118.195) (xy 151.084555 118.008686) (xy 151.234828 117.646788) (xy 151.23517 117.254931) (xy 151.154699 117.060175) (xy 151.248199 116.835) (xy 155.165 116.835) ) ) (filled_polygon (pts (xy 141.372 115.851106) (xy 141.372 116.05) (xy 141.352 116.05) (xy 141.352 116.072) (xy 141.098 116.072) (xy 141.098 116.05) (xy 141.078 116.05) (xy 141.078 115.8) (xy 141.098 115.8) (xy 141.098 115.778) (xy 141.195942 115.778) ) ) (filled_polygon (pts (xy 139.515 110.526309) (xy 139.611673 110.759698) (xy 139.790301 110.938327) (xy 140.02369 111.035) (xy 140.66425 111.035) (xy 140.822998 110.876252) (xy 140.822998 111.035) (xy 140.842224 111.035) (xy 140.575445 111.301314) (xy 140.425172 111.663212) (xy 140.42483 112.055069) (xy 140.574471 112.417229) (xy 140.716372 112.559378) (xy 140.577 112.69875) (xy 140.577 113.3) (xy 140.597 113.3) (xy 140.597 113.55) (xy 140.577 113.55) (xy 140.577 113.572) (xy 140.323 113.572) (xy 140.323 113.55) (xy 139.67375 113.55) (xy 139.515 113.70875) (xy 139.515 113.80131) (xy 139.611673 114.034699) (xy 139.790302 114.213327) (xy 139.95973 114.283507) (xy 139.642771 114.414471) (xy 139.375 114.681776) (xy 139.375 113.04869) (xy 139.515 113.04869) (xy 139.515 113.14125) (xy 139.67375 113.3) (xy 140.323 113.3) (xy 140.323 112.69875) (xy 140.16425 112.54) (xy 140.023691 112.54) (xy 139.790302 112.636673) (xy 139.611673 112.815301) (xy 139.515 113.04869) (xy 139.375 113.04869) (xy 139.375 110.535152) (xy 139.395069 110.53517) (xy 139.515 110.485616) ) ) (filled_polygon (pts (xy 141.077 110.397) (xy 140.823 110.397) (xy 140.823 110.103) (xy 141.077 110.103) ) ) (filled_polygon (pts (xy 160.977 107.425) (xy 160.997 107.425) (xy 160.997 107.675) (xy 160.977 107.675) (xy 160.977 108.27625) (xy 161.13575 108.435) (xy 161.145 108.435) (xy 161.145 108.471578) (xy 161.100987 108.500987) (xy 160.963336 108.706996) (xy 160.955479 108.746495) (xy 160.701747 109.000227) (xy 160.746664 108.933004) (xy 160.795 108.69) (xy 160.795 107.403) (xy 160.977 107.403) ) ) (filled_polygon (pts (xy 156.905 108.61256) (xy 156.76 108.61256) (xy 156.554869 108.653363) (xy 156.477765 108.601843) (xy 156.23 108.55256) (xy 155.73 108.55256) (xy 155.687979 108.560918) (xy 155.47 108.51756) (xy 154.67 108.51756) (xy 154.422235 108.566843) (xy 154.32 108.635155) (xy 154.217765 108.566843) (xy 153.97 108.51756) (xy 153.17 108.51756) (xy 152.922235 108.566843) (xy 152.883747 108.59256) (xy 152.64 108.59256) (xy 152.52374 108.615685) (xy 152.657229 108.560529) (xy 152.934555 108.283686) (xy 153.084828 107.921788) (xy 153.08517 107.529931) (xy 152.935529 107.167771) (xy 152.658686 106.890445) (xy 152.296788 106.740172) (xy 151.904931 106.73983) (xy 151.542771 106.889471) (xy 151.265445 107.166314) (xy 151.175 107.38413) (xy 151.175 106.555) (xy 154.18 106.555) (xy 154.423004 106.506664) (xy 154.629013 106.369013) (xy 154.863026 106.135) (xy 156.905 106.135) ) ) (filled_polygon (pts (xy 161.145 105.143442) (xy 161.145 105.596975) (xy 161.059698 105.511673) (xy 160.826309 105.415) (xy 160.795 105.415) (xy 160.795 105.085) (xy 161.086558 105.085) ) ) (filled_polygon (pts (xy 170.7 104.473) (xy 170.722 104.473) (xy 170.722 104.727) (xy 170.7 104.727) (xy 170.7 104.747) (xy 170.47244 104.747) (xy 170.47244 104.453) (xy 170.7 104.453) ) ) (filled_polygon (pts (xy 167.585172 96.743212) (xy 167.58483 97.135069) (xy 167.734471 97.497229) (xy 168.011314 97.774555) (xy 168.373212 97.924828) (xy 168.612023 97.925036) (xy 168.658295 97.955954) (xy 168.93 98.01) (xy 169.365 98.01) (xy 169.365 98.985) (xy 169.419046 99.256705) (xy 169.572954 99.487046) (xy 169.95 99.864092) (xy 169.95 102.35256) (xy 169.825 102.35256) (xy 169.577235 102.401843) (xy 169.367191 102.542191) (xy 169.226843 102.752235) (xy 169.19545 102.91006) (xy 169.02631 102.84) (xy 168.88575 102.84) (xy 168.727 102.99875) (xy 168.727 103.575) (xy 168.747 103.575) (xy 168.747 103.72756) (xy 168.453 103.72756) (xy 168.453 103.575) (xy 168.473 103.575) (xy 168.473 102.99875) (xy 168.31425 102.84) (xy 168.17369 102.84) (xy 167.940301 102.936673) (xy 167.790533 103.086441) (xy 166.902046 102.197954) (xy 166.671705 102.044046) (xy 166.4 101.99) (xy 165.085 101.99) (xy 165.085 96.655) (xy 167.621801 96.655) ) ) ) (zone (net 2) (net_name GND) (layer In1.Cu) (tstamp 55229855) (hatch edge 0.508) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.3) (thermal_bridge_width 0.3)) (polygon (pts (xy 189.45 91.3) (xy 189.45 124.3) (xy 120.45 124.3) (xy 120.45 91.3) ) ) (filled_polygon (pts (xy 167.954039 96.52765) (xy 167.843126 96.794756) (xy 167.842874 97.083975) (xy 167.95332 97.351275) (xy 168.15765 97.555961) (xy 168.424756 97.666874) (xy 168.713975 97.667126) (xy 168.981275 97.55668) (xy 169.185961 97.35235) (xy 169.296874 97.085244) (xy 169.297126 96.796025) (xy 169.18668 96.528725) (xy 169.055184 96.397) (xy 178.593 96.397) (xy 178.593 99.603) (xy 174.78 99.603) (xy 174.731399 99.612667) (xy 174.690197 99.640197) (xy 174.662667 99.681399) (xy 174.653 99.73) (xy 174.653 102.23) (xy 174.662667 102.278601) (xy 174.690197 102.319803) (xy 174.731399 102.347333) (xy 174.78 102.357) (xy 178.593 102.357) (xy 178.593 112.863) (xy 174.79 112.863) (xy 174.741399 112.872667) (xy 174.700197 112.900197) (xy 174.672667 112.941399) (xy 174.663 112.99) (xy 174.663 115.49) (xy 174.672667 115.538601) (xy 174.700197 115.579803) (xy 174.741399 115.607333) (xy 174.79 115.617) (xy 178.593 115.617) (xy 178.593 118.453) (xy 159.992301 118.453) (xy 160.086874 118.225244) (xy 160.087029 118.046911) (xy 160.333975 118.047126) (xy 160.601275 117.93668) (xy 160.604854 117.933108) (xy 160.63765 117.965961) (xy 160.904756 118.076874) (xy 161.193975 118.077126) (xy 161.461275 117.96668) (xy 161.665961 117.76235) (xy 161.776874 117.495244) (xy 161.777126 117.206025) (xy 161.66668 116.938725) (xy 161.572095 116.843975) (xy 171.422874 116.843975) (xy 171.53332 117.111275) (xy 171.73765 117.315961) (xy 172.004756 117.426874) (xy 172.293975 117.427126) (xy 172.561275 117.31668) (xy 172.765961 117.11235) (xy 172.876874 116.845244) (xy 172.877126 116.556025) (xy 172.76668 116.288725) (xy 172.56235 116.084039) (xy 172.295244 115.973126) (xy 172.006025 115.972874) (xy 171.738725 116.08332) (xy 171.534039 116.28765) (xy 171.423126 116.554756) (xy 171.422874 116.843975) (xy 161.572095 116.843975) (xy 161.46235 116.734039) (xy 161.195244 116.623126) (xy 160.906025 116.622874) (xy 160.638725 116.73332) (xy 160.635146 116.736892) (xy 160.60235 116.704039) (xy 160.335244 116.593126) (xy 160.046025 116.592874) (xy 159.778725 116.70332) (xy 159.574039 116.90765) (xy 159.463126 117.174756) (xy 159.462971 117.353089) (xy 159.216025 117.352874) (xy 158.948725 117.46332) (xy 158.744039 117.66765) (xy 158.633126 117.934756) (xy 158.632874 118.223975) (xy 158.727505 118.453) (xy 145.002364 118.453) (xy 145.211275 118.36668) (xy 145.415961 118.16235) (xy 145.526874 117.895244) (xy 145.527126 117.606025) (xy 145.522148 117.593975) (xy 149.522874 117.593975) (xy 149.63332 117.861275) (xy 149.83765 118.065961) (xy 150.104756 118.176874) (xy 150.393975 118.177126) (xy 150.661275 118.06668) (xy 150.865961 117.86235) (xy 150.976874 117.595244) (xy 150.977126 117.306025) (xy 150.86668 117.038725) (xy 150.85309 117.025111) (xy 150.915961 116.96235) (xy 150.923591 116.943975) (xy 156.972874 116.943975) (xy 157.08332 117.211275) (xy 157.28765 117.415961) (xy 157.554756 117.526874) (xy 157.843975 117.527126) (xy 158.111275 117.41668) (xy 158.315961 117.21235) (xy 158.426874 116.945244) (xy 158.427126 116.656025) (xy 158.31668 116.388725) (xy 158.11235 116.184039) (xy 157.967701 116.123975) (xy 161.762874 116.123975) (xy 161.87332 116.391275) (xy 162.07765 116.595961) (xy 162.344756 116.706874) (xy 162.633975 116.707126) (xy 162.901275 116.59668) (xy 163.105961 116.39235) (xy 163.216874 116.125244) (xy 163.217126 115.836025) (xy 163.10668 115.568725) (xy 162.90235 115.364039) (xy 162.635244 115.253126) (xy 162.346025 115.252874) (xy 162.078725 115.36332) (xy 161.874039 115.56765) (xy 161.763126 115.834756) (xy 161.762874 116.123975) (xy 157.967701 116.123975) (xy 157.845244 116.073126) (xy 157.556025 116.072874) (xy 157.288725 116.18332) (xy 157.084039 116.38765) (xy 156.973126 116.654756) (xy 156.972874 116.943975) (xy 150.923591 116.943975) (xy 151.026874 116.695244) (xy 151.027126 116.406025) (xy 150.91668 116.138725) (xy 150.71235 115.934039) (xy 150.620026 115.895702) (xy 150.811275 115.81668) (xy 151.015961 115.61235) (xy 151.126874 115.345244) (xy 151.127126 115.056025) (xy 151.01668 114.788725) (xy 150.972008 114.743975) (xy 166.972874 114.743975) (xy 167.08332 115.011275) (xy 167.28765 115.215961) (xy 167.554756 115.326874) (xy 167.843975 115.327126) (xy 168.111275 115.21668) (xy 168.315961 115.01235) (xy 168.426874 114.745244) (xy 168.427126 114.456025) (xy 168.31668 114.188725) (xy 168.11235 113.984039) (xy 167.845244 113.873126) (xy 167.556025 113.872874) (xy 167.288725 113.98332) (xy 167.084039 114.18765) (xy 166.973126 114.454756) (xy 166.972874 114.743975) (xy 150.972008 114.743975) (xy 150.81235 114.584039) (xy 150.763998 114.563961) (xy 150.965961 114.36235) (xy 151.076874 114.095244) (xy 151.077126 113.806025) (xy 150.96668 113.538725) (xy 150.76235 113.334039) (xy 150.495244 113.223126) (xy 150.206025 113.222874) (xy 149.938725 113.33332) (xy 149.734039 113.53765) (xy 149.623126 113.804756) (xy 149.622874 114.093975) (xy 149.73332 114.361275) (xy 149.93765 114.565961) (xy 149.986002 114.586039) (xy 149.784039 114.78765) (xy 149.673126 115.054756) (xy 149.672874 115.343975) (xy 149.78332 115.611275) (xy 149.98765 115.815961) (xy 150.079974 115.854298) (xy 149.888725 115.93332) (xy 149.684039 116.13765) (xy 149.573126 116.404756) (xy 149.572874 116.693975) (xy 149.68332 116.961275) (xy 149.69691 116.974889) (xy 149.634039 117.03765) (xy 149.523126 117.304756) (xy 149.522874 117.593975) (xy 145.522148 117.593975) (xy 145.41668 117.338725) (xy 145.21235 117.134039) (xy 144.945244 117.023126) (xy 144.656025 117.022874) (xy 144.388725 117.13332) (xy 144.184039 117.33765) (xy 144.073126 117.604756) (xy 144.072874 117.893975) (xy 144.18332 118.161275) (xy 144.38765 118.365961) (xy 144.597261 118.453) (xy 139.117 118.453) (xy 139.117 117.233975) (xy 140.872874 117.233975) (xy 140.98332 117.501275) (xy 141.18765 117.705961) (xy 141.454756 117.816874) (xy 141.743975 117.817126) (xy 141.921014 117.743975) (xy 142.282874 117.743975) (xy 142.39332 118.011275) (xy 142.59765 118.215961) (xy 142.864756 118.326874) (xy 143.153975 118.327126) (xy 143.421275 118.21668) (xy 143.625961 118.01235) (xy 143.736874 117.745244) (xy 143.737126 117.456025) (xy 143.62668 117.188725) (xy 143.42235 116.984039) (xy 143.155244 116.873126) (xy 142.866025 116.872874) (xy 142.598725 116.98332) (xy 142.394039 117.18765) (xy 142.283126 117.454756) (xy 142.282874 117.743975) (xy 141.921014 117.743975) (xy 142.011275 117.70668) (xy 142.215961 117.50235) (xy 142.326874 117.235244) (xy 142.327126 116.946025) (xy 142.21668 116.678725) (xy 142.21547 116.677513) (xy 142.454756 116.776874) (xy 142.743975 116.777126) (xy 143.011275 116.66668) (xy 143.215961 116.46235) (xy 143.326874 116.195244) (xy 143.327126 115.906025) (xy 143.21668 115.638725) (xy 143.01235 115.434039) (xy 142.745244 115.323126) (xy 142.456025 115.322874) (xy 142.188725 115.43332) (xy 141.984039 115.63765) (xy 141.873126 115.904756) (xy 141.872874 116.193975) (xy 141.98332 116.461275) (xy 141.98453 116.462487) (xy 141.745244 116.363126) (xy 141.456025 116.362874) (xy 141.188725 116.47332) (xy 140.984039 116.67765) (xy 140.873126 116.944756) (xy 140.872874 117.233975) (xy 139.117 117.233975) (xy 139.117 115.393975) (xy 139.472874 115.393975) (xy 139.58332 115.661275) (xy 139.78765 115.865961) (xy 140.054756 115.976874) (xy 140.343975 115.977126) (xy 140.611275 115.86668) (xy 140.815961 115.66235) (xy 140.926874 115.395244) (xy 140.927126 115.106025) (xy 140.901488 115.043975) (xy 140.922874 115.043975) (xy 141.03332 115.311275) (xy 141.23765 115.515961) (xy 141.504756 115.626874) (xy 141.793975 115.627126) (xy 142.061275 115.51668) (xy 142.265961 115.31235) (xy 142.273591 115.293975) (xy 147.072874 115.293975) (xy 147.18332 115.561275) (xy 147.38765 115.765961) (xy 147.654756 115.876874) (xy 147.943975 115.877126) (xy 148.211275 115.76668) (xy 148.415961 115.56235) (xy 148.526874 115.295244) (xy 148.527126 115.006025) (xy 148.449632 114.818476) (xy 148.565961 114.70235) (xy 148.676874 114.435244) (xy 148.677126 114.146025) (xy 148.56668 113.878725) (xy 148.36235 113.674039) (xy 148.095244 113.563126) (xy 147.806025 113.562874) (xy 147.538725 113.67332) (xy 147.334039 113.87765) (xy 147.223126 114.144756) (xy 147.222874 114.433975) (xy 147.300368 114.621524) (xy 147.184039 114.73765) (xy 147.073126 115.004756) (xy 147.072874 115.293975) (xy 142.273591 115.293975) (xy 142.376874 115.045244) (xy 142.377064 114.826937) (xy 142.593975 114.827126) (xy 142.861275 114.71668) (xy 143.065961 114.51235) (xy 143.176874 114.245244) (xy 143.177126 113.956025) (xy 143.06668 113.688725) (xy 142.907855 113.529623) (xy 142.996874 113.315244) (xy 142.996916 113.267059) (xy 143.073975 113.267126) (xy 143.341275 113.15668) (xy 143.545961 112.95235) (xy 143.656874 112.685244) (xy 143.657014 112.523975) (xy 144.442874 112.523975) (xy 144.55332 112.791275) (xy 144.75765 112.995961) (xy 145.024756 113.106874) (xy 145.313975 113.107126) (xy 145.581275 112.99668) (xy 145.785961 112.79235) (xy 145.896874 112.525244) (xy 145.897126 112.236025) (xy 145.78668 111.968725) (xy 145.6322 111.813975) (xy 148.072874 111.813975) (xy 148.18332 112.081275) (xy 148.38765 112.285961) (xy 148.654756 112.396874) (xy 148.943975 112.397126) (xy 149.063841 112.347598) (xy 149.254756 112.426874) (xy 149.532678 112.427116) (xy 149.56332 112.501275) (xy 149.76765 112.705961) (xy 150.034756 112.816874) (xy 150.323975 112.817126) (xy 150.591275 112.70668) (xy 150.704176 112.593975) (xy 157.022874 112.593975) (xy 157.13332 112.861275) (xy 157.33765 113.065961) (xy 157.604756 113.176874) (xy 157.893975 113.177126) (xy 158.161275 113.06668) (xy 158.365961 112.86235) (xy 158.476874 112.595244) (xy 158.477126 112.306025) (xy 158.36668 112.038725) (xy 158.16235 111.834039) (xy 158.065866 111.793975) (xy 158.822874 111.793975) (xy 158.93332 112.061275) (xy 159.13765 112.265961) (xy 159.404756 112.376874) (xy 159.693975 112.377126) (xy 159.952223 112.27042) (xy 160.01765 112.335961) (xy 160.284756 112.446874) (xy 160.573975 112.447126) (xy 160.841275 112.33668) (xy 161.045961 112.13235) (xy 161.156874 111.865244) (xy 161.157126 111.576025) (xy 161.04668 111.308725) (xy 160.84235 111.104039) (xy 160.575244 110.993126) (xy 160.286025 110.992874) (xy 160.027777 111.09958) (xy 159.96235 111.034039) (xy 159.695244 110.923126) (xy 159.406025 110.922874) (xy 159.138725 111.03332) (xy 158.934039 111.23765) (xy 158.823126 111.504756) (xy 158.822874 111.793975) (xy 158.065866 111.793975) (xy 157.895244 111.723126) (xy 157.606025 111.722874) (xy 157.338725 111.83332) (xy 157.134039 112.03765) (xy 157.023126 112.304756) (xy 157.022874 112.593975) (xy 150.704176 112.593975) (xy 150.795961 112.50235) (xy 150.906874 112.235244) (xy 150.907126 111.946025) (xy 150.79668 111.678725) (xy 150.59235 111.474039) (xy 150.325244 111.363126) (xy 150.047322 111.362884) (xy 150.01668 111.288725) (xy 149.81235 111.084039) (xy 149.545244 110.973126) (xy 149.256025 110.972874) (xy 149.136159 111.022402) (xy 148.945244 110.943126) (xy 148.656025 110.942874) (xy 148.388725 111.05332) (xy 148.184039 111.25765) (xy 148.073126 111.524756) (xy 148.072874 111.813975) (xy 145.6322 111.813975) (xy 145.58235 111.764039) (xy 145.315244 111.653126) (xy 145.026025 111.652874) (xy 144.758725 111.76332) (xy 144.554039 111.96765) (xy 144.443126 112.234756) (xy 144.442874 112.523975) (xy 143.657014 112.523975) (xy 143.657126 112.396025) (xy 143.54668 112.128725) (xy 143.34235 111.924039) (xy 143.075244 111.813126) (xy 142.786025 111.812874) (xy 142.518725 111.92332) (xy 142.314039 112.12765) (xy 142.203126 112.394756) (xy 142.203084 112.442941) (xy 142.126025 112.442874) (xy 141.858725 112.55332) (xy 141.654039 112.75765) (xy 141.543126 113.024756) (xy 141.542874 113.313975) (xy 141.65332 113.581275) (xy 141.812145 113.740377) (xy 141.723126 113.954756) (xy 141.722936 114.173063) (xy 141.506025 114.172874) (xy 141.238725 114.28332) (xy 141.034039 114.48765) (xy 140.923126 114.754756) (xy 140.922874 115.043975) (xy 140.901488 115.043975) (xy 140.81668 114.838725) (xy 140.61235 114.634039) (xy 140.345244 114.523126) (xy 140.056025 114.522874) (xy 139.788725 114.63332) (xy 139.584039 114.83765) (xy 139.473126 115.104756) (xy 139.472874 115.393975) (xy 139.117 115.393975) (xy 139.117 112.003975) (xy 140.682874 112.003975) (xy 140.79332 112.271275) (xy 140.99765 112.475961) (xy 141.264756 112.586874) (xy 141.553975 112.587126) (xy 141.821275 112.47668) (xy 142.025961 112.27235) (xy 142.136874 112.005244) (xy 142.137126 111.716025) (xy 142.02668 111.448725) (xy 141.82235 111.244039) (xy 141.555244 111.133126) (xy 141.266025 111.132874) (xy 140.998725 111.24332) (xy 140.794039 111.44765) (xy 140.683126 111.714756) (xy 140.682874 112.003975) (xy 139.117 112.003975) (xy 139.117 110.276928) (xy 139.343975 110.277126) (xy 139.611275 110.16668) (xy 139.734193 110.043975) (xy 145.122874 110.043975) (xy 145.23332 110.311275) (xy 145.43765 110.515961) (xy 145.704756 110.626874) (xy 145.890022 110.627035) (xy 146.00026 110.893833) (xy 146.20459 111.098519) (xy 146.471696 111.209432) (xy 146.760915 111.209684) (xy 147.028215 111.099238) (xy 147.232901 110.894908) (xy 147.316336 110.693975) (xy 161.197874 110.693975) (xy 161.30832 110.961275) (xy 161.51265 111.165961) (xy 161.779756 111.276874) (xy 161.875134 111.276957) (xy 161.738725 111.33332) (xy 161.534039 111.53765) (xy 161.423126 111.804756) (xy 161.422874 112.093975) (xy 161.53332 112.361275) (xy 161.73765 112.565961) (xy 162.004756 112.676874) (xy 162.199061 112.677043) (xy 162.38765 112.865961) (xy 162.654756 112.976874) (xy 162.943975 112.977126) (xy 163.211275 112.86668) (xy 163.415961 112.66235) (xy 163.526874 112.395244) (xy 163.527126 112.106025) (xy 163.41668 111.838725) (xy 163.21235 111.634039) (xy 162.945244 111.523126) (xy 162.750939 111.522957) (xy 162.56235 111.334039) (xy 162.295244 111.223126) (xy 162.199866 111.223043) (xy 162.336275 111.16668) (xy 162.540961 110.96235) (xy 162.651874 110.695244) (xy 162.652126 110.406025) (xy 162.54168 110.138725) (xy 162.33735 109.934039) (xy 162.070244 109.823126) (xy 161.781025 109.822874) (xy 161.513725 109.93332) (xy 161.309039 110.13765) (xy 161.198126 110.404756) (xy 161.197874 110.693975) (xy 147.316336 110.693975) (xy 147.343814 110.627802) (xy 147.344018 110.393275) (xy 147.561439 110.483557) (xy 147.850658 110.483809) (xy 148.117958 110.373363) (xy 148.322644 110.169033) (xy 148.433557 109.901927) (xy 148.433809 109.612708) (xy 148.426069 109.593975) (xy 172.122874 109.593975) (xy 172.23332 109.861275) (xy 172.43765 110.065961) (xy 172.704756 110.176874) (xy 172.993975 110.177126) (xy 173.261275 110.06668) (xy 173.465961 109.86235) (xy 173.576874 109.595244) (xy 173.577126 109.306025) (xy 173.46668 109.038725) (xy 173.26235 108.834039) (xy 172.995244 108.723126) (xy 172.706025 108.722874) (xy 172.438725 108.83332) (xy 172.234039 109.03765) (xy 172.123126 109.304756) (xy 172.122874 109.593975) (xy 148.426069 109.593975) (xy 148.323363 109.345408) (xy 148.119033 109.140722) (xy 147.851927 109.029809) (xy 147.694144 109.029672) (xy 147.718812 108.970264) (xy 147.719064 108.681045) (xy 147.641769 108.493975) (xy 157.247874 108.493975) (xy 157.35832 108.761275) (xy 157.56265 108.965961) (xy 157.829756 109.076874) (xy 158.118975 109.077126) (xy 158.386275 108.96668) (xy 158.590961 108.76235) (xy 158.701874 108.495244) (xy 158.702126 108.206025) (xy 158.59168 107.938725) (xy 158.38735 107.734039) (xy 158.120244 107.623126) (xy 157.831025 107.622874) (xy 157.563725 107.73332) (xy 157.359039 107.93765) (xy 157.248126 108.204756) (xy 157.247874 108.493975) (xy 147.641769 108.493975) (xy 147.608618 108.413745) (xy 147.425648 108.230456) (xy 147.610666 108.230617) (xy 147.877966 108.120171) (xy 148.082652 107.915841) (xy 148.102112 107.868975) (xy 151.372874 107.868975) (xy 151.48332 108.136275) (xy 151.68765 108.340961) (xy 151.954756 108.451874) (xy 152.243975 108.452126) (xy 152.511275 108.34168) (xy 152.715961 108.13735) (xy 152.826874 107.870244) (xy 152.827126 107.581025) (xy 152.71668 107.313725) (xy 152.51235 107.109039) (xy 152.245244 106.998126) (xy 151.956025 106.997874) (xy 151.688725 107.10832) (xy 151.484039 107.31265) (xy 151.373126 107.579756) (xy 151.372874 107.868975) (xy 148.102112 107.868975) (xy 148.193565 107.648735) (xy 148.193817 107.359516) (xy 148.083371 107.092216) (xy 147.879041 106.88753) (xy 147.781182 106.846895) (xy 147.915961 106.71235) (xy 148.026874 106.445244) (xy 148.027126 106.156025) (xy 147.91668 105.888725) (xy 147.71235 105.684039) (xy 147.55566 105.618975) (xy 152.347874 105.618975) (xy 152.45832 105.886275) (xy 152.66265 106.090961) (xy 152.929756 106.201874) (xy 153.218975 106.202126) (xy 153.486275 106.09168) (xy 153.690961 105.88735) (xy 153.801874 105.620244) (xy 153.802126 105.331025) (xy 153.69168 105.063725) (xy 153.505372 104.877092) (xy 153.543975 104.877126) (xy 153.742174 104.795232) (xy 153.88765 104.940961) (xy 154.154756 105.051874) (xy 154.443975 105.052126) (xy 154.711275 104.94168) (xy 154.759063 104.893975) (xy 157.772874 104.893975) (xy 157.88332 105.161275) (xy 158.08765 105.365961) (xy 158.354756 105.476874) (xy 158.596902 105.477085) (xy 158.523126 105.654756) (xy 158.522874 105.943975) (xy 158.63332 106.211275) (xy 158.769759 106.347951) (xy 158.681025 106.347874) (xy 158.413725 106.45832) (xy 158.209039 106.66265) (xy 158.098126 106.929756) (xy 158.097874 107.218975) (xy 158.20832 107.486275) (xy 158.41265 107.690961) (xy 158.679756 107.801874) (xy 158.968975 107.802126) (xy 159.236275 107.69168) (xy 159.440961 107.48735) (xy 159.551874 107.220244) (xy 159.552114 106.943975) (xy 170.222874 106.943975) (xy 170.33332 107.211275) (xy 170.53765 107.415961) (xy 170.804756 107.526874) (xy 171.093975 107.527126) (xy 171.361275 107.41668) (xy 171.565961 107.21235) (xy 171.676874 106.945244) (xy 171.677126 106.656025) (xy 171.56668 106.388725) (xy 171.36235 106.184039) (xy 171.095244 106.073126) (xy 170.806025 106.072874) (xy 170.538725 106.18332) (xy 170.334039 106.38765) (xy 170.223126 106.654756) (xy 170.222874 106.943975) (xy 159.552114 106.943975) (xy 159.552126 106.931025) (xy 159.44168 106.663725) (xy 159.305241 106.527049) (xy 159.393975 106.527126) (xy 159.661275 106.41668) (xy 159.865961 106.21235) (xy 159.976874 105.945244) (xy 159.977126 105.656025) (xy 159.86668 105.388725) (xy 159.66235 105.184039) (xy 159.395244 105.073126) (xy 159.153098 105.072915) (xy 159.226874 104.895244) (xy 159.227126 104.606025) (xy 159.139509 104.393975) (xy 161.772874 104.393975) (xy 161.88332 104.661275) (xy 162.08765 104.865961) (xy 162.354756 104.976874) (xy 162.643975 104.977126) (xy 162.911275 104.86668) (xy 163.115961 104.66235) (xy 163.226874 104.395244) (xy 163.227126 104.106025) (xy 163.212092 104.06964) (xy 163.461275 103.96668) (xy 163.665961 103.76235) (xy 163.776874 103.495244) (xy 163.777126 103.206025) (xy 163.66668 102.938725) (xy 163.46235 102.734039) (xy 163.195244 102.623126) (xy 162.906025 102.622874) (xy 162.638725 102.73332) (xy 162.434039 102.93765) (xy 162.323126 103.204756) (xy 162.322874 103.493975) (xy 162.337908 103.53036) (xy 162.088725 103.63332) (xy 161.884039 103.83765) (xy 161.773126 104.104756) (xy 161.772874 104.393975) (xy 159.139509 104.393975) (xy 159.11668 104.338725) (xy 158.91235 104.134039) (xy 158.645244 104.023126) (xy 158.356025 104.022874) (xy 158.088725 104.13332) (xy 157.884039 104.33765) (xy 157.773126 104.604756) (xy 157.772874 104.893975) (xy 154.759063 104.893975) (xy 154.915961 104.73735) (xy 155.026874 104.470244) (xy 155.027126 104.181025) (xy 154.91668 103.913725) (xy 154.71235 103.709039) (xy 154.445244 103.598126) (xy 154.156025 103.597874) (xy 153.957826 103.679768) (xy 153.81235 103.534039) (xy 153.545244 103.423126) (xy 153.256025 103.422874) (xy 152.988725 103.53332) (xy 152.784039 103.73765) (xy 152.673126 104.004756) (xy 152.672874 104.293975) (xy 152.78332 104.561275) (xy 152.969628 104.747908) (xy 152.931025 104.747874) (xy 152.663725 104.85832) (xy 152.459039 105.06265) (xy 152.348126 105.329756) (xy 152.347874 105.618975) (xy 147.55566 105.618975) (xy 147.445244 105.573126) (xy 147.156025 105.572874) (xy 146.888725 105.68332) (xy 146.684039 105.88765) (xy 146.573126 106.154756) (xy 146.573025 106.270641) (xy 146.357789 106.359575) (xy 146.30235 106.304039) (xy 146.035244 106.193126) (xy 145.746025 106.192874) (xy 145.478725 106.30332) (xy 145.274039 106.50765) (xy 145.163126 106.774756) (xy 145.162874 107.063975) (xy 145.27332 107.331275) (xy 145.47765 107.535961) (xy 145.744756 107.646874) (xy 146.033975 107.647126) (xy 146.292211 107.540425) (xy 146.34765 107.595961) (xy 146.614756 107.706874) (xy 146.764166 107.707004) (xy 146.850011 107.914766) (xy 147.032981 108.098055) (xy 146.847963 108.097894) (xy 146.580663 108.20834) (xy 146.375977 108.41267) (xy 146.265064 108.679776) (xy 146.264812 108.968995) (xy 146.330074 109.12694) (xy 146.210406 109.2464) (xy 146.204715 109.260106) (xy 145.995244 109.173126) (xy 145.706025 109.172874) (xy 145.438725 109.28332) (xy 145.234039 109.48765) (xy 145.123126 109.754756) (xy 145.122874 110.043975) (xy 139.734193 110.043975) (xy 139.815961 109.96235) (xy 139.926874 109.695244) (xy 139.927054 109.488667) (xy 140.101275 109.41668) (xy 140.305961 109.21235) (xy 140.416874 108.945244) (xy 140.417126 108.656025) (xy 140.30668 108.388725) (xy 140.10235 108.184039) (xy 139.835244 108.073126) (xy 139.546025 108.072874) (xy 139.278725 108.18332) (xy 139.117 108.344764) (xy 139.117 107.545101) (xy 139.23765 107.665961) (xy 139.504756 107.776874) (xy 139.793975 107.777126) (xy 140.061275 107.66668) (xy 140.265961 107.46235) (xy 140.376874 107.195244) (xy 140.377126 106.906025) (xy 140.26668 106.638725) (xy 140.06235 106.434039) (xy 139.795244 106.323126) (xy 139.506025 106.322874) (xy 139.238725 106.43332) (xy 139.117 106.554833) (xy 139.117 105.595101) (xy 139.23765 105.715961) (xy 139.504756 105.826874) (xy 139.793975 105.827126) (xy 140.061275 105.71668) (xy 140.265961 105.51235) (xy 140.376874 105.245244) (xy 140.377075 105.013975) (xy 145.172874 105.013975) (xy 145.28332 105.281275) (xy 145.48765 105.485961) (xy 145.754756 105.596874) (xy 146.043975 105.597126) (xy 146.311275 105.48668) (xy 146.515961 105.28235) (xy 146.626874 105.015244) (xy 146.627023 104.843975) (xy 148.472874 104.843975) (xy 148.58332 105.111275) (xy 148.78765 105.315961) (xy 149.054756 105.426874) (xy 149.343975 105.427126) (xy 149.611275 105.31668) (xy 149.815961 105.11235) (xy 149.926874 104.845244) (xy 149.927126 104.556025) (xy 149.81668 104.288725) (xy 149.61235 104.084039) (xy 149.345244 103.973126) (xy 149.056025 103.972874) (xy 148.788725 104.08332) (xy 148.584039 104.28765) (xy 148.473126 104.554756) (xy 148.472874 104.843975) (xy 146.627023 104.843975) (xy 146.627126 104.726025) (xy 146.51668 104.458725) (xy 146.31235 104.254039) (xy 146.045244 104.143126) (xy 145.756025 104.142874) (xy 145.488725 104.25332) (xy 145.284039 104.45765) (xy 145.173126 104.724756) (xy 145.172874 105.013975) (xy 140.377075 105.013975) (xy 140.377126 104.956025) (xy 140.26668 104.688725) (xy 140.252452 104.674472) (xy 140.326874 104.495244) (xy 140.327126 104.206025) (xy 140.23157 103.974761) (xy 140.244353 103.943975) (xy 142.572874 103.943975) (xy 142.68332 104.211275) (xy 142.88765 104.415961) (xy 143.154756 104.526874) (xy 143.443975 104.527126) (xy 143.711275 104.41668) (xy 143.915961 104.21235) (xy 144.026874 103.945244) (xy 144.027126 103.656025) (xy 144.001488 103.593975) (xy 150.912874 103.593975) (xy 151.02332 103.861275) (xy 151.22765 104.065961) (xy 151.494756 104.176874) (xy 151.783975 104.177126) (xy 152.051275 104.06668) (xy 152.255961 103.86235) (xy 152.366874 103.595244) (xy 152.367126 103.306025) (xy 152.25668 103.038725) (xy 152.05235 102.834039) (xy 151.835454 102.743975) (xy 160.422874 102.743975) (xy 160.53332 103.011275) (xy 160.73765 103.215961) (xy 161.004756 103.326874) (xy 161.293975 103.327126) (xy 161.561275 103.21668) (xy 161.765961 103.01235) (xy 161.876874 102.745244) (xy 161.877126 102.456025) (xy 161.76668 102.188725) (xy 161.56235 101.984039) (xy 161.295244 101.873126) (xy 161.006025 101.872874) (xy 160.738725 101.98332) (xy 160.534039 102.18765) (xy 160.423126 102.454756) (xy 160.422874 102.743975) (xy 151.835454 102.743975) (xy 151.785244 102.723126) (xy 151.496025 102.722874) (xy 151.228725 102.83332) (xy 151.024039 103.03765) (xy 150.913126 103.304756) (xy 150.912874 103.593975) (xy 144.001488 103.593975) (xy 143.91668 103.388725) (xy 143.71235 103.184039) (xy 143.445244 103.073126) (xy 143.156025 103.072874) (xy 142.888725 103.18332) (xy 142.684039 103.38765) (xy 142.573126 103.654756) (xy 142.572874 103.943975) (xy 140.244353 103.943975) (xy 140.326874 103.745244) (xy 140.327126 103.456025) (xy 140.21668 103.188725) (xy 140.022269 102.993975) (xy 147.422874 102.993975) (xy 147.53332 103.261275) (xy 147.73765 103.465961) (xy 148.004756 103.576874) (xy 148.293975 103.577126) (xy 148.561275 103.46668) (xy 148.765961 103.26235) (xy 148.876874 102.995244) (xy 148.876955 102.902068) (xy 148.943975 102.902126) (xy 149.211275 102.79168) (xy 149.415961 102.58735) (xy 149.526874 102.320244) (xy 149.527126 102.031025) (xy 149.41668 101.763725) (xy 149.21235 101.559039) (xy 148.945244 101.448126) (xy 148.656025 101.447874) (xy 148.388725 101.55832) (xy 148.184039 101.76265) (xy 148.073126 102.029756) (xy 148.073045 102.122932) (xy 148.006025 102.122874) (xy 147.738725 102.23332) (xy 147.534039 102.43765) (xy 147.423126 102.704756) (xy 147.422874 102.993975) (xy 140.022269 102.993975) (xy 140.01235 102.984039) (xy 139.745244 102.873126) (xy 139.456025 102.872874) (xy 139.188725 102.98332) (xy 139.117 103.05492) (xy 139.117 101.723975) (xy 139.272874 101.723975) (xy 139.38332 101.991275) (xy 139.58765 102.195961) (xy 139.854756 102.306874) (xy 140.143975 102.307126) (xy 140.411275 102.19668) (xy 140.615961 101.99235) (xy 140.726874 101.725244) (xy 140.726953 101.633975) (xy 142.322874 101.633975) (xy 142.43332 101.901275) (xy 142.63765 102.105961) (xy 142.904756 102.216874) (xy 143.193975 102.217126) (xy 143.461275 102.10668) (xy 143.665961 101.90235) (xy 143.759532 101.677009) (xy 143.893975 101.677126) (xy 144.161275 101.56668) (xy 144.365961 101.36235) (xy 144.476874 101.095244) (xy 144.477126 100.806025) (xy 144.36668 100.538725) (xy 144.16235 100.334039) (xy 143.895244 100.223126) (xy 143.606025 100.222874) (xy 143.338725 100.33332) (xy 143.134039 100.53765) (xy 143.040468 100.762991) (xy 142.906025 100.762874) (xy 142.638725 100.87332) (xy 142.434039 101.07765) (xy 142.323126 101.344756) (xy 142.322874 101.633975) (xy 140.726953 101.633975) (xy 140.727126 101.436025) (xy 140.61668 101.168725) (xy 140.41235 100.964039) (xy 140.145244 100.853126) (xy 139.856025 100.852874) (xy 139.588725 100.96332) (xy 139.384039 101.16765) (xy 139.273126 101.434756) (xy 139.272874 101.723975) (xy 139.117 101.723975) (xy 139.117 99.823975) (xy 140.512874 99.823975) (xy 140.62332 100.091275) (xy 140.82765 100.295961) (xy 141.094756 100.406874) (xy 141.383975 100.407126) (xy 141.651275 100.29668) (xy 141.855961 100.09235) (xy 141.966874 99.825244) (xy 141.967126 99.536025) (xy 141.85668 99.268725) (xy 141.65235 99.064039) (xy 141.385244 98.953126) (xy 141.096025 98.952874) (xy 140.828725 99.06332) (xy 140.624039 99.26765) (xy 140.513126 99.534756) (xy 140.512874 99.823975) (xy 139.117 99.823975) (xy 139.117 98.583975) (xy 142.542874 98.583975) (xy 142.65332 98.851275) (xy 142.85765 99.055961) (xy 143.11459 99.162653) (xy 143.043126 99.334756) (xy 143.042874 99.623975) (xy 143.15332 99.891275) (xy 143.35765 100.095961) (xy 143.624756 100.206874) (xy 143.913975 100.207126) (xy 144.181275 100.09668) (xy 144.385961 99.89235) (xy 144.496874 99.625244) (xy 144.496901 99.593975) (xy 145.972874 99.593975) (xy 146.08332 99.861275) (xy 146.28765 100.065961) (xy 146.554756 100.176874) (xy 146.843975 100.177126) (xy 147.111275 100.06668) (xy 147.315961 99.86235) (xy 147.426874 99.595244) (xy 147.427126 99.306025) (xy 147.339509 99.093975) (xy 147.472874 99.093975) (xy 147.58332 99.361275) (xy 147.78765 99.565961) (xy 148.054756 99.676874) (xy 148.343975 99.677126) (xy 148.611275 99.56668) (xy 148.815961 99.36235) (xy 148.926874 99.095244) (xy 148.927126 98.806025) (xy 148.81668 98.538725) (xy 148.61235 98.334039) (xy 148.345244 98.223126) (xy 148.056025 98.222874) (xy 147.788725 98.33332) (xy 147.584039 98.53765) (xy 147.473126 98.804756) (xy 147.472874 99.093975) (xy 147.339509 99.093975) (xy 147.31668 99.038725) (xy 147.11235 98.834039) (xy 146.845244 98.723126) (xy 146.556025 98.722874) (xy 146.288725 98.83332) (xy 146.084039 99.03765) (xy 145.973126 99.304756) (xy 145.972874 99.593975) (xy 144.496901 99.593975) (xy 144.497126 99.336025) (xy 144.38668 99.068725) (xy 144.18235 98.864039) (xy 143.92541 98.757347) (xy 143.996874 98.585244) (xy 143.997126 98.296025) (xy 143.913641 98.093975) (xy 161.322874 98.093975) (xy 161.43332 98.361275) (xy 161.63765 98.565961) (xy 161.904756 98.676874) (xy 162.193975 98.677126) (xy 162.461275 98.56668) (xy 162.665961 98.36235) (xy 162.776874 98.095244) (xy 162.777126 97.806025) (xy 162.66668 97.538725) (xy 162.46235 97.334039) (xy 162.195244 97.223126) (xy 161.906025 97.222874) (xy 161.638725 97.33332) (xy 161.434039 97.53765) (xy 161.323126 97.804756) (xy 161.322874 98.093975) (xy 143.913641 98.093975) (xy 143.88668 98.028725) (xy 143.68235 97.824039) (xy 143.415244 97.713126) (xy 143.126025 97.712874) (xy 142.858725 97.82332) (xy 142.654039 98.02765) (xy 142.543126 98.294756) (xy 142.542874 98.583975) (xy 139.117 98.583975) (xy 139.117 97.443975) (xy 150.547874 97.443975) (xy 150.65832 97.711275) (xy 150.86265 97.915961) (xy 151.129756 98.026874) (xy 151.418975 98.027126) (xy 151.686275 97.91668) (xy 151.890961 97.71235) (xy 152.001874 97.445244) (xy 152.002126 97.156025) (xy 151.89168 96.888725) (xy 151.68735 96.684039) (xy 151.420244 96.573126) (xy 151.131025 96.572874) (xy 150.863725 96.68332) (xy 150.659039 96.88765) (xy 150.548126 97.154756) (xy 150.547874 97.443975) (xy 139.117 97.443975) (xy 139.117 96.397) (xy 168.084917 96.397) ) ) ) (zone (net 3) (net_name /5V) (layer B.Cu) (tstamp 559D7144) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 159.35 96.05) (xy 159.35 99.8) (xy 155.95 103.2) (xy 140.25 103.2) (xy 140.25 105.5) (xy 138.4 105.5) (xy 138.4 96.05) (xy 138.6 96.05) ) ) (filled_polygon (pts (xy 140.26044 96.490908) (xy 140.041676 96.70929) (xy 139.923135 96.994767) (xy 139.922866 97.303877) (xy 140.040908 97.58956) (xy 140.25929 97.808324) (xy 140.544767 97.926865) (xy 140.853877 97.927134) (xy 141.13956 97.809092) (xy 141.358324 97.59071) (xy 141.476865 97.305233) (xy 141.477134 96.996123) (xy 141.359092 96.71044) (xy 141.14071 96.491676) (xy 141.033119 96.447) (xy 148.054075 96.447) (xy 147.991676 96.50929) (xy 147.873135 96.794767) (xy 147.872866 97.103877) (xy 147.990908 97.38956) (xy 148.20929 97.608324) (xy 148.494767 97.726865) (xy 148.803877 97.727134) (xy 149.08956 97.609092) (xy 149.245046 97.453877) (xy 150.497866 97.453877) (xy 150.615908 97.73956) (xy 150.83429 97.958324) (xy 151.119767 98.076865) (xy 151.428877 98.077134) (xy 151.71456 97.959092) (xy 151.933324 97.74071) (xy 152.051865 97.455233) (xy 152.052134 97.146123) (xy 151.934092 96.86044) (xy 151.71571 96.641676) (xy 151.430233 96.523135) (xy 151.121123 96.522866) (xy 150.83544 96.640908) (xy 150.616676 96.85929) (xy 150.498135 97.144767) (xy 150.497866 97.453877) (xy 149.245046 97.453877) (xy 149.308324 97.39071) (xy 149.426865 97.105233) (xy 149.427134 96.796123) (xy 149.309092 96.51044) (xy 149.245763 96.447) (xy 153.337714 96.447) (xy 153.11044 96.540908) (xy 152.891676 96.75929) (xy 152.773135 97.044767) (xy 152.772866 97.353877) (xy 152.890908 97.63956) (xy 153.10929 97.858324) (xy 153.394767 97.976865) (xy 153.546794 97.976997) (xy 153.580908 98.05956) (xy 153.79929 98.278324) (xy 154.084767 98.396865) (xy 154.393877 98.397134) (xy 154.67956 98.279092) (xy 154.699844 98.258844) (xy 154.71929 98.278324) (xy 155.004767 98.396865) (xy 155.313877 98.397134) (xy 155.587361 98.284133) (xy 155.834767 98.386865) (xy 156.143877 98.387134) (xy 156.42956 98.269092) (xy 156.429818 98.268835) (xy 156.43929 98.278324) (xy 156.724767 98.396865) (xy 157.033877 98.397134) (xy 157.284537 98.293563) (xy 157.28929 98.298324) (xy 157.574767 98.416865) (xy 157.830915 98.417088) (xy 157.831675 98.470299) (xy 157.761673 98.540302) (xy 157.665 98.773691) (xy 157.665 98.84125) (xy 157.82375 99) (xy 158.473 99) (xy 158.473 98.987) (xy 158.66913 98.987) (xy 158.45613 99.2) (xy 157.82375 99.2) (xy 157.665 99.35875) (xy 157.665 99.426309) (xy 157.761673 99.659698) (xy 157.879052 99.777078) (xy 157.219224 100.436906) (xy 156.945233 100.323135) (xy 156.636123 100.322866) (xy 156.35044 100.440908) (xy 156.131676 100.65929) (xy 156.013135 100.944767) (xy 156.012866 101.253877) (xy 156.130908 101.53956) (xy 156.34929 101.758324) (xy 156.390202 101.775312) (xy 156.11044 101.890908) (xy 155.897977 102.103) (xy 155.301665 102.103) (xy 155.09071 101.891676) (xy 154.805233 101.773135) (xy 154.610096 101.772965) (xy 154.602225 101.733393) (xy 154.50785 101.59215) (xy 154.366607 101.497775) (xy 154.285152 101.481573) (xy 154.33956 101.459092) (xy 154.558324 101.24071) (xy 154.676865 100.955233) (xy 154.677134 100.646123) (xy 154.559092 100.36044) (xy 154.34071 100.141676) (xy 154.055233 100.023135) (xy 153.746123 100.022866) (xy 153.46044 100.140908) (xy 153.241676 100.35929) (xy 153.123135 100.644767) (xy 153.122866 100.953877) (xy 153.240908 101.23956) (xy 153.45929 101.458324) (xy 153.547527 101.494964) (xy 153.533393 101.497775) (xy 153.39215 101.59215) (xy 153.297775 101.733393) (xy 153.264635 101.9) (xy 153.264635 102.073056) (xy 153.046123 102.072866) (xy 152.76044 102.190908) (xy 152.686584 102.264635) (xy 152.4 102.264635) (xy 152.233393 102.297775) (xy 152.09215 102.39215) (xy 151.998038 102.533) (xy 151.22 102.533) (xy 151.056594 102.565503) (xy 150.918065 102.658065) (xy 150.75313 102.823) (xy 148.927024 102.823) (xy 148.927134 102.696123) (xy 148.809092 102.41044) (xy 148.59071 102.191676) (xy 148.305233 102.073135) (xy 147.996123 102.072866) (xy 147.71044 102.190908) (xy 147.491676 102.40929) (xy 147.373135 102.694767) (xy 147.373023 102.823) (xy 146.82 102.823) (xy 146.656594 102.855503) (xy 146.523216 102.944623) (xy 146.509092 102.91044) (xy 146.29071 102.691676) (xy 146.005233 102.573135) (xy 145.696123 102.572866) (xy 145.502184 102.653) (xy 144.55 102.653) (xy 144.491507 102.664635) (xy 143.75 102.664635) (xy 143.583393 102.697775) (xy 143.44215 102.79215) (xy 143.347775 102.933393) (xy 143.329946 103.023026) (xy 143.146123 103.022866) (xy 143.02479 103.073) (xy 142.255507 103.073) (xy 142.316865 102.925233) (xy 142.317134 102.616123) (xy 142.199092 102.33044) (xy 141.98071 102.111676) (xy 141.695233 101.993135) (xy 141.386123 101.992866) (xy 141.329504 102.016261) (xy 141.105233 101.923135) (xy 140.796123 101.922866) (xy 140.51044 102.040908) (xy 140.291676 102.25929) (xy 140.173135 102.544767) (xy 140.173031 102.664635) (xy 140.15 102.664635) (xy 139.983393 102.697775) (xy 139.84215 102.79215) (xy 139.747775 102.933393) (xy 139.714635 103.1) (xy 139.714635 103.137339) (xy 139.611673 103.240302) (xy 139.515 103.473691) (xy 139.515 103.51625) (xy 139.67375 103.675) (xy 139.676975 103.675) (xy 139.611673 103.740302) (xy 139.515 103.973691) (xy 139.515 104.026309) (xy 139.607656 104.25) (xy 139.515 104.473691) (xy 139.515 104.526309) (xy 139.607656 104.75) (xy 139.515 104.973691) (xy 139.515 105.026309) (xy 139.611673 105.259698) (xy 139.659014 105.307039) (xy 139.627857 105.327857) (xy 139.627855 105.32786) (xy 139.582773 105.372941) (xy 139.496123 105.372866) (xy 139.495799 105.373) (xy 139.167 105.373) (xy 139.167 99.833877) (xy 140.462866 99.833877) (xy 140.580908 100.11956) (xy 140.79929 100.338324) (xy 141.084767 100.456865) (xy 141.144635 100.456917) (xy 141.144635 100.53) (xy 141.177775 100.696607) (xy 141.27215 100.83785) (xy 141.413393 100.932225) (xy 141.58 100.965365) (xy 141.805429 100.965365) (xy 142.27305 101.432985) (xy 142.272866 101.643877) (xy 142.390908 101.92956) (xy 142.60929 102.148324) (xy 142.894767 102.266865) (xy 143.203877 102.267134) (xy 143.48956 102.149092) (xy 143.708324 101.93071) (xy 143.792897 101.727037) (xy 143.903877 101.727134) (xy 144.18956 101.609092) (xy 144.408324 101.39071) (xy 144.424328 101.352168) (xy 144.494968 101.304968) (xy 144.508419 101.291517) (xy 144.610908 101.53956) (xy 144.82929 101.758324) (xy 145.114767 101.876865) (xy 145.423877 101.877134) (xy 145.70956 101.759092) (xy 145.928324 101.54071) (xy 146.046865 101.255233) (xy 146.047028 101.068263) (xy 146.122646 100.992645) (xy 146.188379 100.894269) (xy 146.25785 100.84785) (xy 146.352225 100.706607) (xy 146.385365 100.54) (xy 146.385365 100.160675) (xy 146.544767 100.226865) (xy 146.853877 100.227134) (xy 146.904163 100.206356) (xy 147.05 100.235365) (xy 147.547855 100.235365) (xy 147.590908 100.33956) (xy 147.80929 100.558324) (xy 148.094767 100.676865) (xy 148.22 100.676974) (xy 148.247775 100.816607) (xy 148.34215 100.95785) (xy 148.483393 101.052225) (xy 148.65 101.085365) (xy 149.15 101.085365) (xy 149.316607 101.052225) (xy 149.45785 100.95785) (xy 149.552225 100.816607) (xy 149.585365 100.65) (xy 149.585365 100.344437) (xy 149.660558 100.526417) (xy 149.822729 100.688871) (xy 149.849333 100.699918) (xy 149.823583 100.710558) (xy 149.661129 100.872729) (xy 149.5731 101.084724) (xy 149.5729 101.314269) (xy 149.660558 101.526417) (xy 149.822729 101.688871) (xy 150.034724 101.7769) (xy 150.264269 101.7771) (xy 150.476417 101.689442) (xy 150.638871 101.527271) (xy 150.649918 101.500667) (xy 150.660558 101.526417) (xy 150.822729 101.688871) (xy 151.034724 101.7769) (xy 151.264269 101.7771) (xy 151.476417 101.689442) (xy 151.638871 101.527271) (xy 151.649918 101.500667) (xy 151.660558 101.526417) (xy 151.822729 101.688871) (xy 152.034724 101.7769) (xy 152.264269 101.7771) (xy 152.476417 101.689442) (xy 152.638871 101.527271) (xy 152.7269 101.315276) (xy 152.7271 101.085731) (xy 152.639442 100.873583) (xy 152.477271 100.711129) (xy 152.450667 100.700082) (xy 152.476417 100.689442) (xy 152.638871 100.527271) (xy 152.7269 100.315276) (xy 152.7271 100.085731) (xy 152.639442 99.873583) (xy 152.477271 99.711129) (xy 152.450667 99.700082) (xy 152.476417 99.689442) (xy 152.638871 99.527271) (xy 152.7269 99.315276) (xy 152.7271 99.085731) (xy 152.639442 98.873583) (xy 152.477271 98.711129) (xy 152.265276 98.6231) (xy 152.035731 98.6229) (xy 151.823583 98.710558) (xy 151.661129 98.872729) (xy 151.650082 98.899333) (xy 151.639442 98.873583) (xy 151.477271 98.711129) (xy 151.265276 98.6231) (xy 151.035731 98.6229) (xy 150.823583 98.710558) (xy 150.661129 98.872729) (xy 150.650082 98.899333) (xy 150.639442 98.873583) (xy 150.477271 98.711129) (xy 150.265276 98.6231) (xy 150.035731 98.6229) (xy 149.823583 98.710558) (xy 149.661129 98.872729) (xy 149.585365 99.055187) (xy 149.585365 98.95) (xy 149.552225 98.783393) (xy 149.45785 98.64215) (xy 149.316607 98.547775) (xy 149.15 98.514635) (xy 148.860825 98.514635) (xy 148.859092 98.51044) (xy 148.64071 98.291676) (xy 148.355233 98.173135) (xy 148.046123 98.172866) (xy 147.973826 98.202738) (xy 147.96356 98.200696) (xy 147.95785 98.19215) (xy 147.816607 98.097775) (xy 147.65 98.064635) (xy 147.05 98.064635) (xy 146.883393 98.097775) (xy 146.74215 98.19215) (xy 146.647775 98.333393) (xy 146.614635 98.5) (xy 146.614635 98.672926) (xy 146.546123 98.672866) (xy 146.350211 98.753815) (xy 146.332225 98.663393) (xy 146.23785 98.52215) (xy 146.096607 98.427775) (xy 145.93 98.394635) (xy 145.67406 98.394635) (xy 145.868324 98.20071) (xy 145.986865 97.915233) (xy 145.987134 97.606123) (xy 145.869092 97.32044) (xy 145.65071 97.101676) (xy 145.365233 96.983135) (xy 145.056123 96.982866) (xy 144.77044 97.100908) (xy 144.551676 97.31929) (xy 144.433135 97.604767) (xy 144.432866 97.913877) (xy 144.550908 98.19956) (xy 144.745642 98.394635) (xy 144.63 98.394635) (xy 144.463393 98.427775) (xy 144.32215 98.52215) (xy 144.227775 98.663393) (xy 144.197391 98.816145) (xy 143.990761 98.730345) (xy 144.046865 98.595233) (xy 144.047134 98.286123) (xy 143.929092 98.00044) (xy 143.71071 97.781676) (xy 143.425233 97.663135) (xy 143.116123 97.662866) (xy 142.83044 97.780908) (xy 142.611676 97.99929) (xy 142.493135 98.284767) (xy 142.492866 98.593877) (xy 142.610908 98.87956) (xy 142.82929 99.098324) (xy 143.049239 99.189655) (xy 143.035344 99.223118) (xy 142.746123 99.222866) (xy 142.615365 99.276894) (xy 142.615365 99.23) (xy 142.582225 99.063393) (xy 142.48785 98.92215) (xy 142.346607 98.827775) (xy 142.18 98.794635) (xy 141.58 98.794635) (xy 141.413393 98.827775) (xy 141.300731 98.903053) (xy 141.086123 98.902866) (xy 140.80044 99.020908) (xy 140.581676 99.23929) (xy 140.463135 99.524767) (xy 140.462866 99.833877) (xy 139.167 99.833877) (xy 139.167 96.447) (xy 140.366705 96.447) ) ) ) (zone (net 21) (net_name "Net-(C37-Pad2)") (layer B.Cu) (tstamp 559D724D) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 158.25 97.86) (xy 158.25 95.66) (xy 164.45 95.65) (xy 164.45 105.1) (xy 162.15 105.1) (xy 161 103.95) (xy 161 100.75) (xy 159.56 98.56) (xy 158.26 98.56) ) ) (filled_polygon (pts (xy 163.727 104.273) (xy 163.747 104.273) (xy 163.747 104.527) (xy 163.727 104.527) (xy 163.727 104.547) (xy 163.473 104.547) (xy 163.473 104.527) (xy 163.453 104.527) (xy 163.453 104.273) (xy 163.473 104.273) (xy 163.473 104.253) (xy 163.727 104.253) ) ) (filled_polygon (pts (xy 164.323 97.008349) (xy 164.233135 97.224767) (xy 164.232866 97.533877) (xy 164.323 97.752018) (xy 164.323 99.854267) (xy 164.223135 100.094767) (xy 164.222866 100.403877) (xy 164.323 100.646219) (xy 164.323 102.198) (xy 164.250005 102.198) (xy 164.25 102.197999) (xy 164.057893 102.236212) (xy 163.895032 102.345032) (xy 163.89503 102.345035) (xy 163.72543 102.514635) (xy 163.25 102.514635) (xy 163.083393 102.547775) (xy 163.045647 102.572996) (xy 162.896123 102.572866) (xy 162.61044 102.690908) (xy 162.391676 102.90929) (xy 162.273135 103.194767) (xy 162.272866 103.503877) (xy 162.362203 103.720088) (xy 162.34 103.773691) (xy 162.34 104.11425) (xy 162.498748 104.272998) (xy 162.34 104.272998) (xy 162.34 104.355714) (xy 161.842143 103.857857) (xy 161.648462 103.728444) (xy 161.42 103.683) (xy 161.376928 103.683) (xy 161.377134 103.446123) (xy 161.342102 103.36134) (xy 161.58956 103.259092) (xy 161.808324 103.04071) (xy 161.926865 102.755233) (xy 161.927134 102.446123) (xy 161.809092 102.16044) (xy 161.698931 102.050086) (xy 161.708324 102.04071) (xy 161.826865 101.755233) (xy 161.827134 101.446123) (xy 161.709092 101.16044) (xy 161.640817 101.092046) (xy 161.676865 101.005233) (xy 161.677134 100.696123) (xy 161.559092 100.41044) (xy 161.34071 100.191676) (xy 161.055233 100.073135) (xy 160.746123 100.072866) (xy 160.720193 100.08358) (xy 160.708793 100.075963) (xy 160.546326 99.828877) (xy 161.272866 99.828877) (xy 161.390908 100.11456) (xy 161.60929 100.333324) (xy 161.894767 100.451865) (xy 162.203877 100.452134) (xy 162.294182 100.414821) (xy 162.211129 100.497729) (xy 162.1231 100.709724) (xy 162.1229 100.939269) (xy 162.210558 101.151417) (xy 162.283999 101.224986) (xy 162.211129 101.297729) (xy 162.1231 101.509724) (xy 162.1229 101.739269) (xy 162.210558 101.951417) (xy 162.372729 102.113871) (xy 162.584724 102.2019) (xy 162.814269 102.2021) (xy 163.026417 102.114442) (xy 163.099986 102.041001) (xy 163.172729 102.113871) (xy 163.384724 102.2019) (xy 163.614269 102.2021) (xy 163.826417 102.114442) (xy 163.988871 101.952271) (xy 164.0769 101.740276) (xy 164.0771 101.510731) (xy 163.989442 101.298583) (xy 163.916001 101.225014) (xy 163.988871 101.152271) (xy 164.0769 100.940276) (xy 164.0771 100.710731) (xy 163.989442 100.498583) (xy 163.827271 100.336129) (xy 163.615276 100.2481) (xy 163.385731 100.2479) (xy 163.173583 100.335558) (xy 163.100014 100.408999) (xy 163.027271 100.336129) (xy 162.815276 100.2481) (xy 162.585731 100.2479) (xy 162.568962 100.254829) (xy 162.708324 100.11571) (xy 162.807461 99.876963) (xy 163.003877 99.877134) (xy 163.28956 99.759092) (xy 163.508324 99.54071) (xy 163.626865 99.255233) (xy 163.627134 98.946123) (xy 163.509092 98.66044) (xy 163.29071 98.441676) (xy 163.005233 98.323135) (xy 162.696123 98.322866) (xy 162.41044 98.440908) (xy 162.191676 98.65929) (xy 162.092539 98.898037) (xy 161.896123 98.897866) (xy 161.61044 99.015908) (xy 161.391676 99.23429) (xy 161.273135 99.519767) (xy 161.272866 99.828877) (xy 160.546326 99.828877) (xy 160.448872 99.680666) (xy 160.55785 99.60785) (xy 160.652225 99.466607) (xy 160.685365 99.3) (xy 160.685365 98.9) (xy 160.67917 98.868856) (xy 160.788327 98.759698) (xy 160.885 98.526309) (xy 160.885 98.45875) (xy 160.72625 98.3) (xy 160.077 98.3) (xy 160.077 98.347) (xy 159.823 98.347) (xy 159.823 98.3) (xy 158.727 98.3) (xy 158.727 98.347) (xy 158.473 98.347) (xy 158.473 98.3) (xy 158.453 98.3) (xy 158.453 98.1) (xy 158.473 98.1) (xy 158.473 97.876789) (xy 158.506865 97.795233) (xy 158.507101 97.52375) (xy 158.727 97.52375) (xy 158.727 98.1) (xy 159.823 98.1) (xy 159.823 97.52375) (xy 160.077 97.52375) (xy 160.077 98.1) (xy 160.72625 98.1) (xy 160.885 97.94125) (xy 160.885 97.873691) (xy 160.788327 97.640302) (xy 160.609699 97.461673) (xy 160.37631 97.365) (xy 160.23575 97.365) (xy 160.077 97.52375) (xy 159.823 97.52375) (xy 159.66425 97.365) (xy 159.52369 97.365) (xy 159.290301 97.461673) (xy 159.275 97.476974) (xy 159.259699 97.461673) (xy 159.02631 97.365) (xy 158.88575 97.365) (xy 158.727 97.52375) (xy 158.507101 97.52375) (xy 158.507134 97.486123) (xy 158.389092 97.20044) (xy 158.377 97.188327) (xy 158.377 96.447) (xy 164.323 96.447) ) ) ) (zone (net 0) (net_name "") (layer In1.Cu) (tstamp 559D731C) (hatch edge 0.508) (connect_pads (clearance 0.3)) (min_thickness 0.254) (keepout (tracks allowed) (vias allowed) (copperpour not_allowed)) (fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 174.78 99.73) (xy 174.78 102.23) (xy 179.88 102.23) (xy 179.88 99.73) ) ) ) (zone (net 0) (net_name "") (layer In1.Cu) (tstamp 559D731C) (hatch edge 0.508) (connect_pads (clearance 0.3)) (min_thickness 0.254) (keepout (tracks allowed) (vias allowed) (copperpour not_allowed)) (fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 174.79 112.99) (xy 174.79 115.49) (xy 180.21 115.49) (xy 180.21 112.99) ) ) ) (zone (net 3) (net_name /5V) (layer B.Cu) (tstamp 559D71F7) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 164.85 114.2) (xy 161.5 117.55) (xy 155.8 117.55) (xy 155.8 116.2) (xy 150.05 116.2) (xy 150.05 113.85) (xy 155.8 113.85) (xy 155.8 111.9) (xy 158.7 111.9) (xy 161.55 109.05) (xy 161.55 108.95) (xy 164.85 109.1) (xy 164.85 114.2) ) ) (filled_polygon (pts (xy 157.577 117.225) (xy 157.592105 117.225) (xy 157.563135 117.294767) (xy 157.563023 117.423) (xy 157.303 117.423) (xy 157.303 117.225) (xy 157.323 117.225) (xy 157.323 117.203) (xy 157.577 117.203) ) ) (filled_polygon (pts (xy 164.723 109.221358) (xy 164.723 109.642976) (xy 164.596123 109.642866) (xy 164.416199 109.717209) (xy 164.39071 109.691676) (xy 164.105233 109.573135) (xy 163.796123 109.572866) (xy 163.51044 109.690908) (xy 163.291676 109.90929) (xy 163.173135 110.194767) (xy 163.172866 110.503877) (xy 163.290908 110.78956) (xy 163.50929 111.008324) (xy 163.697363 111.086419) (xy 163.673135 111.144767) (xy 163.672866 111.453877) (xy 163.790908 111.73956) (xy 163.973103 111.922073) (xy 163.972866 112.193877) (xy 164.090908 112.47956) (xy 164.30929 112.698324) (xy 164.443049 112.753866) (xy 164.442866 112.963877) (xy 164.560908 113.24956) (xy 164.723 113.411936) (xy 164.723 114.147394) (xy 163.905759 114.964635) (xy 163.65 114.964635) (xy 163.6 114.974581) (xy 163.55 114.964635) (xy 163.15 114.964635) (xy 163.118856 114.97083) (xy 163.009698 114.861673) (xy 162.776309 114.765) (xy 162.70875 114.765) (xy 162.55 114.92375) (xy 162.55 115.573) (xy 162.597 115.573) (xy 162.597 115.827) (xy 162.55 115.827) (xy 162.55 115.847) (xy 162.35 115.847) (xy 162.35 115.827) (xy 161.77375 115.827) (xy 161.756378 115.844372) (xy 161.705233 115.823135) (xy 161.396123 115.822866) (xy 161.11044 115.940908) (xy 160.891676 116.15929) (xy 160.773135 116.444767) (xy 160.772979 116.623748) (xy 160.64545 116.676442) (xy 160.63071 116.661676) (xy 160.345233 116.543135) (xy 160.036123 116.542866) (xy 159.75044 116.660908) (xy 159.746706 116.664635) (xy 159.6 116.664635) (xy 159.433393 116.697775) (xy 159.35 116.753496) (xy 159.266607 116.697775) (xy 159.1 116.664635) (xy 158.5 116.664635) (xy 158.457433 116.673102) (xy 158.220922 116.672896) (xy 158.109698 116.561673) (xy 157.876309 116.465) (xy 157.73575 116.465) (xy 157.577002 116.623748) (xy 157.577002 116.465) (xy 157.503152 116.465) (xy 157.606865 116.215233) (xy 157.607134 115.906123) (xy 157.489092 115.62044) (xy 157.27071 115.401676) (xy 156.985233 115.283135) (xy 156.676123 115.282866) (xy 156.39044 115.400908) (xy 156.171676 115.61929) (xy 156.053135 115.904767) (xy 156.053019 116.037863) (xy 155.90044 116.100908) (xy 155.890336 116.110994) (xy 155.889803 116.110197) (xy 155.848601 116.082667) (xy 155.8 116.073) (xy 151.856928 116.073) (xy 151.857086 115.890939) (xy 151.938327 115.809698) (xy 152.035 115.576309) (xy 152.035 115.43575) (xy 151.87625 115.277) (xy 151.389036 115.277) (xy 151.235233 115.213135) (xy 150.926123 115.212866) (xy 150.770907 115.277) (xy 150.42375 115.277) (xy 150.265 115.43575) (xy 150.265 115.576309) (xy 150.337639 115.751674) (xy 150.328773 115.773025) (xy 150.252 115.772958) (xy 150.252 114.726915) (xy 150.265 114.726926) (xy 150.265 114.86425) (xy 150.42375 115.023) (xy 151.025 115.023) (xy 151.025 115.003) (xy 151.275 115.003) (xy 151.275 115.023) (xy 151.87625 115.023) (xy 152.035 114.86425) (xy 152.035 114.723691) (xy 151.938327 114.490302) (xy 151.82917 114.381144) (xy 151.835365 114.35) (xy 151.835365 113.977) (xy 153.228108 113.977) (xy 153.30929 114.058324) (xy 153.594767 114.176865) (xy 153.903877 114.177134) (xy 154.18956 114.059092) (xy 154.271795 113.977) (xy 154.453152 113.977) (xy 154.55929 114.083324) (xy 154.844767 114.201865) (xy 155.153877 114.202134) (xy 155.43956 114.084092) (xy 155.441284 114.082371) (xy 155.644767 114.166865) (xy 155.953877 114.167134) (xy 156.23956 114.049092) (xy 156.411943 113.87701) (xy 156.438316 113.877033) (xy 156.61929 114.058324) (xy 156.904767 114.176865) (xy 157.213877 114.177134) (xy 157.366021 114.114269) (xy 158.4229 114.114269) (xy 158.510079 114.325258) (xy 158.4231 114.534724) (xy 158.4229 114.764269) (xy 158.510079 114.975258) (xy 158.4231 115.184724) (xy 158.4229 115.414269) (xy 158.510558 115.626417) (xy 158.672729 115.788871) (xy 158.884724 115.8769) (xy 159.114269 115.8771) (xy 159.325258 115.789921) (xy 159.534724 115.8769) (xy 159.764269 115.8771) (xy 159.975258 115.789921) (xy 160.184724 115.8769) (xy 160.414269 115.8771) (xy 160.626417 115.789442) (xy 160.788871 115.627271) (xy 160.8769 115.415276) (xy 160.877023 115.27369) (xy 161.615 115.27369) (xy 161.615 115.41425) (xy 161.77375 115.573) (xy 162.35 115.573) (xy 162.35 114.92375) (xy 162.19125 114.765) (xy 162.123691 114.765) (xy 161.890302 114.861673) (xy 161.711673 115.040301) (xy 161.615 115.27369) (xy 160.877023 115.27369) (xy 160.8771 115.185731) (xy 160.789921 114.974742) (xy 160.8769 114.765276) (xy 160.8771 114.535731) (xy 160.789921 114.324742) (xy 160.8769 114.115276) (xy 160.8771 113.885731) (xy 160.789442 113.673583) (xy 160.627271 113.511129) (xy 160.415276 113.4231) (xy 160.185731 113.4229) (xy 159.974742 113.510079) (xy 159.765276 113.4231) (xy 159.535731 113.4229) (xy 159.324742 113.510079) (xy 159.115276 113.4231) (xy 158.885731 113.4229) (xy 158.673583 113.510558) (xy 158.511129 113.672729) (xy 158.4231 113.884724) (xy 158.4229 114.114269) (xy 157.366021 114.114269) (xy 157.49956 114.059092) (xy 157.718324 113.84071) (xy 157.836865 113.555233) (xy 157.837134 113.246123) (xy 157.724499 112.973526) (xy 157.788327 112.909699) (xy 157.885 112.67631) (xy 157.885 112.58375) (xy 157.72625 112.425) (xy 157.077 112.425) (xy 157.077 112.447) (xy 156.846025 112.447) (xy 156.84071 112.441676) (xy 156.823 112.434322) (xy 156.823 112.425) (xy 156.803 112.425) (xy 156.803 112.175) (xy 156.823 112.175) (xy 156.823 112.153) (xy 157.077 112.153) (xy 157.077 112.175) (xy 157.72625 112.175) (xy 157.87425 112.027) (xy 158.144665 112.027) (xy 158.133135 112.054767) (xy 158.132866 112.363877) (xy 158.250908 112.64956) (xy 158.46929 112.868324) (xy 158.754767 112.986865) (xy 159.063877 112.987134) (xy 159.34956 112.869092) (xy 159.568324 112.65071) (xy 159.661177 112.427097) (xy 159.703877 112.427134) (xy 159.94044 112.329388) (xy 159.98929 112.378324) (xy 160.274767 112.496865) (xy 160.573002 112.497125) (xy 160.572866 112.653877) (xy 160.690908 112.93956) (xy 160.90929 113.158324) (xy 161.194767 113.276865) (xy 161.503877 113.277134) (xy 161.706796 113.193289) (xy 161.623135 113.394767) (xy 161.622866 113.703877) (xy 161.740908 113.98956) (xy 161.95929 114.208324) (xy 162.244767 114.326865) (xy 162.553877 114.327134) (xy 162.83956 114.209092) (xy 163.025045 114.023931) (xy 163.10929 114.108324) (xy 163.394767 114.226865) (xy 163.703877 114.227134) (xy 163.98956 114.109092) (xy 164.208324 113.89071) (xy 164.326865 113.605233) (xy 164.327134 113.296123) (xy 164.209092 113.01044) (xy 163.99071 112.791676) (xy 163.705233 112.673135) (xy 163.396123 112.672866) (xy 163.11044 112.790908) (xy 162.924955 112.976069) (xy 162.84071 112.891676) (xy 162.555233 112.773135) (xy 162.246123 112.772866) (xy 162.043204 112.856711) (xy 162.126865 112.655233) (xy 162.127134 112.346123) (xy 162.009092 112.06044) (xy 161.79071 111.841676) (xy 161.505233 111.723135) (xy 161.206998 111.722875) (xy 161.207134 111.566123) (xy 161.089092 111.28044) (xy 160.87071 111.061676) (xy 160.585233 110.943135) (xy 160.578064 110.943129) (xy 160.228077 110.593141) (xy 160.257625 110.521981) (xy 161.639803 109.139803) (xy 161.667333 109.098601) (xy 161.670514 109.082609) ) ) ) (zone (net 1) (net_name /3V3) (layer B.Cu) (tstamp 55A2B41C) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 143.78 104.6) (xy 145.47 104.6) (xy 146.82 103.25) (xy 150.93 103.25) (xy 151.22 102.96) (xy 152.97 102.96) (xy 153.4 102.53) (xy 156.75 102.53) (xy 157.07 102.21) (xy 157.07 101.19) (xy 159.19 99.07) (xy 160.16 100.04) (xy 160.16 108.69) (xy 157.54 108.69) (xy 157.54 105.76) (xy 157.28 105.5) (xy 154.6 105.5) (xy 154.18 105.92) (xy 149.24 105.92) (xy 149.24 106.49) (xy 143.76 106.49) (xy 143.76 106.17) ) ) (filled_polygon (pts (xy 155.772866 102.703877) (xy 155.890908 102.98956) (xy 156.10929 103.208324) (xy 156.394767 103.326865) (xy 156.544112 103.326995) (xy 156.51044 103.340908) (xy 156.291676 103.55929) (xy 156.173135 103.844767) (xy 156.172866 104.153877) (xy 156.290908 104.43956) (xy 156.50929 104.658324) (xy 156.794767 104.776865) (xy 157.103877 104.777134) (xy 157.191863 104.740779) (xy 157.25929 104.808324) (xy 157.544767 104.926865) (xy 157.732432 104.927028) (xy 157.840908 105.18956) (xy 158.05929 105.408324) (xy 158.344767 105.526865) (xy 158.522028 105.527019) (xy 158.473135 105.644767) (xy 158.472866 105.953877) (xy 158.564635 106.175975) (xy 158.564635 106.341866) (xy 158.38544 106.415908) (xy 158.166676 106.63429) (xy 158.048135 106.919767) (xy 158.047866 107.228877) (xy 158.165908 107.51456) (xy 158.38429 107.733324) (xy 158.669767 107.851865) (xy 158.815 107.851991) (xy 158.815 107.92631) (xy 158.911673 108.159699) (xy 159.090302 108.338327) (xy 159.323691 108.435) (xy 159.46425 108.435) (xy 159.623 108.27625) (xy 159.623 107.675) (xy 159.603 107.675) (xy 159.603 107.425) (xy 159.623 107.425) (xy 159.623 107.403) (xy 159.877 107.403) (xy 159.877 107.425) (xy 159.897 107.425) (xy 159.897 107.598716) (xy 159.803135 107.824767) (xy 159.802866 108.133877) (xy 159.920908 108.41956) (xy 160.033 108.531848) (xy 160.033 108.563) (xy 157.667 108.563) (xy 157.667 105.76) (xy 157.657333 105.711399) (xy 157.629803 105.670197) (xy 157.369803 105.410197) (xy 157.328601 105.382667) (xy 157.28 105.373) (xy 157.085447 105.373) (xy 156.965276 105.3231) (xy 156.735731 105.3229) (xy 156.61448 105.373) (xy 156.435447 105.373) (xy 156.315276 105.3231) (xy 156.085731 105.3229) (xy 155.96448 105.373) (xy 155.785447 105.373) (xy 155.665276 105.3231) (xy 155.435731 105.3229) (xy 155.31448 105.373) (xy 154.6 105.373) (xy 154.551399 105.382667) (xy 154.510197 105.410197) (xy 154.127394 105.793) (xy 153.128087 105.793) (xy 153.135 105.77631) (xy 153.135 105.68375) (xy 152.97625 105.525) (xy 152.327 105.525) (xy 152.327 105.547) (xy 152.073 105.547) (xy 152.073 105.525) (xy 152.053 105.525) (xy 152.053 105.275) (xy 152.073 105.275) (xy 152.073 105.253) (xy 152.327 105.253) (xy 152.327 105.275) (xy 152.97625 105.275) (xy 153.135 105.11625) (xy 153.135 105.02369) (xy 153.123081 104.994916) (xy 153.259699 104.938327) (xy 153.438327 104.759698) (xy 153.535 104.526309) (xy 153.535 104.38575) (xy 153.376252 104.227002) (xy 153.535 104.227002) (xy 153.535 104.218974) (xy 153.57369 104.235) (xy 153.66625 104.235) (xy 153.825 104.07625) (xy 153.825 103.427) (xy 153.803 103.427) (xy 153.803 103.345938) (xy 153.858324 103.29071) (xy 153.915506 103.153) (xy 154.075 103.153) (xy 154.075 103.173) (xy 154.097 103.173) (xy 154.097 103.427) (xy 154.075 103.427) (xy 154.075 104.07625) (xy 154.23375 104.235) (xy 154.32631 104.235) (xy 154.559699 104.138327) (xy 154.738327 103.959698) (xy 154.835 103.726309) (xy 154.835 103.58575) (xy 154.676252 103.427002) (xy 154.835 103.427002) (xy 154.835 103.314274) (xy 155.08956 103.209092) (xy 155.308324 102.99071) (xy 155.426865 102.705233) (xy 155.426907 102.657) (xy 155.772907 102.657) ) ) (filled_polygon (pts (xy 151.964635 103.3) (xy 151.97083 103.331144) (xy 151.861673 103.440302) (xy 151.765 103.673691) (xy 151.765 103.81425) (xy 151.92375 103.973) (xy 152.525 103.973) (xy 152.525 103.953) (xy 152.775 103.953) (xy 152.775 103.973) (xy 152.797 103.973) (xy 152.797 104.227) (xy 152.775 104.227) (xy 152.775 104.247) (xy 152.525 104.247) (xy 152.525 104.227) (xy 151.92375 104.227) (xy 151.765 104.38575) (xy 151.765 104.5186) (xy 151.540302 104.611673) (xy 151.431144 104.72083) (xy 151.4 104.714635) (xy 150.963367 104.714635) (xy 150.79071 104.541676) (xy 150.505233 104.423135) (xy 150.196123 104.422866) (xy 150.074579 104.473087) (xy 149.906599 104.158749) (xy 149.831935 104.058065) (xy 149.693406 103.965503) (xy 149.53 103.933) (xy 149.37899 103.933) (xy 149.355233 103.923135) (xy 149.046123 103.922866) (xy 149.021597 103.933) (xy 148.66 103.933) (xy 148.496594 103.965503) (xy 148.358065 104.058065) (xy 148.357596 104.058767) (xy 148.24071 103.941676) (xy 147.955233 103.823135) (xy 147.646123 103.822866) (xy 147.36044 103.940908) (xy 147.141676 104.15929) (xy 147.023135 104.444767) (xy 147.022866 104.753877) (xy 147.140908 105.03956) (xy 147.35929 105.258324) (xy 147.644767 105.376865) (xy 147.953877 105.377134) (xy 148.233 105.261803) (xy 148.233 106.363) (xy 147.241962 106.363) (xy 147.20071 106.321676) (xy 146.915233 106.203135) (xy 146.695358 106.202944) (xy 146.706865 106.175233) (xy 146.707134 105.866123) (xy 146.589092 105.58044) (xy 146.37071 105.361676) (xy 146.085233 105.243135) (xy 145.985 105.243048) (xy 145.985 105.122998) (xy 145.94495 105.122998) (xy 145.985 105.026309) (xy 145.985 104.973691) (xy 145.94495 104.877002) (xy 145.985 104.877002) (xy 145.985 104.7571) (xy 146.023877 104.757134) (xy 146.30956 104.639092) (xy 146.528324 104.42071) (xy 146.646865 104.135233) (xy 146.647134 103.826123) (xy 146.581742 103.667864) (xy 146.872606 103.377) (xy 147.578195 103.377) (xy 147.70929 103.508324) (xy 147.994767 103.626865) (xy 148.303877 103.627134) (xy 148.58956 103.509092) (xy 148.721883 103.377) (xy 150.93 103.377) (xy 150.978601 103.367333) (xy 151.019803 103.339803) (xy 151.272606 103.087) (xy 151.964635 103.087) ) ) (filled_polygon (pts (xy 159.290301 99.838327) (xy 159.52369 99.935) (xy 159.66425 99.935) (xy 159.769822 99.829428) (xy 159.822998 99.882604) (xy 159.822998 99.935) (xy 159.875394 99.935) (xy 159.96249 100.022096) (xy 159.833393 100.047775) (xy 159.69215 100.14215) (xy 159.597775 100.283393) (xy 159.564635 100.45) (xy 159.564635 101.05) (xy 159.594094 101.198104) (xy 159.39678 101.197932) (xy 159.29071 101.091676) (xy 159.005233 100.973135) (xy 158.696123 100.972866) (xy 158.41044 101.090908) (xy 158.191676 101.30929) (xy 158.073135 101.594767) (xy 158.072866 101.903877) (xy 158.190908 102.18956) (xy 158.40929 102.408324) (xy 158.694767 102.526865) (xy 158.92822 102.527068) (xy 159.03429 102.633324) (xy 159.064635 102.645924) (xy 159.064635 102.715) (xy 159.05875 102.715) (xy 158.9 102.87375) (xy 158.9 103.523) (xy 158.947 103.523) (xy 158.947 103.777) (xy 158.9 103.777) (xy 158.9 103.797) (xy 158.7 103.797) (xy 158.7 103.777) (xy 158.653 103.777) (xy 158.653 103.523) (xy 158.7 103.523) (xy 158.7 102.87375) (xy 158.54125 102.715) (xy 158.473691 102.715) (xy 158.466707 102.717893) (xy 158.34071 102.591676) (xy 158.055233 102.473135) (xy 157.746123 102.472866) (xy 157.46044 102.590908) (xy 157.313378 102.737713) (xy 157.326865 102.705233) (xy 157.327134 102.396123) (xy 157.209092 102.11044) (xy 157.197 102.098327) (xy 157.197 101.772546) (xy 157.22956 101.759092) (xy 157.448324 101.54071) (xy 157.566865 101.255233) (xy 157.567134 100.946123) (xy 157.5456 100.894006) (xy 158.704241 99.735365) (xy 158.9 99.735365) (xy 159.066607 99.702225) (xy 159.119115 99.66714) ) ) ) (zone (net 3) (net_name /5V) (layer In2.Cu) (tstamp 55A2B486) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 150.8 116.77) (xy 147.34 116.77) (xy 147.34 110.99) (xy 150.8 110.99) ) ) (filled_polygon (pts (xy 149.521676 111.64929) (xy 149.403135 111.934767) (xy 149.402866 112.243877) (xy 149.520908 112.52956) (xy 149.73929 112.748324) (xy 150.024767 112.866865) (xy 150.333877 112.867134) (xy 150.580355 112.765291) (xy 150.608204 112.79314) (xy 150.391676 113.00929) (xy 150.323707 113.172977) (xy 150.196123 113.172866) (xy 149.91044 113.290908) (xy 149.691676 113.50929) (xy 149.573135 113.794767) (xy 149.572866 114.103877) (xy 149.690908 114.38956) (xy 149.90929 114.608324) (xy 150.194767 114.726865) (xy 150.503877 114.727134) (xy 150.673 114.657254) (xy 150.673 115.317454) (xy 150.64044 115.330908) (xy 150.421676 115.54929) (xy 150.328773 115.773025) (xy 150.146123 115.772866) (xy 149.86044 115.890908) (xy 149.641676 116.10929) (xy 149.523135 116.394767) (xy 149.522919 116.643) (xy 147.467 116.643) (xy 147.467 115.853049) (xy 147.644767 115.926865) (xy 147.953877 115.927134) (xy 148.23956 115.809092) (xy 148.458324 115.59071) (xy 148.576865 115.305233) (xy 148.577134 114.996123) (xy 148.5086 114.830259) (xy 148.608324 114.73071) (xy 148.726865 114.445233) (xy 148.727134 114.136123) (xy 148.609092 113.85044) (xy 148.39071 113.631676) (xy 148.105233 113.513135) (xy 147.796123 113.512866) (xy 147.51044 113.630908) (xy 147.467 113.674272) (xy 147.467 111.572) (xy 149.599101 111.572) ) ) ) (zone (net 3) (net_name /5V) (layer B.Cu) (tstamp 55A2B49F) (hatch edge 0.508) (priority 3) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 148.66 104.36) (xy 148.66 107.48) (xy 149.33 108.15) (xy 149.33 109.93) (xy 148.64 110.62) (xy 148.64 112.3) (xy 150.54 110.76) (xy 150.54 106.25) (xy 149.53 104.36) ) ) (filled_polygon (pts (xy 149.651319 104.856481) (xy 149.573135 105.044767) (xy 149.572866 105.353877) (xy 149.690908 105.63956) (xy 149.90929 105.858324) (xy 150.194767 105.976865) (xy 150.250068 105.976913) (xy 150.413 106.281806) (xy 150.413 107.363309) (xy 150.216676 107.55929) (xy 150.098135 107.844767) (xy 150.097866 108.153877) (xy 150.215908 108.43956) (xy 150.413 108.636997) (xy 150.413 110.699459) (xy 148.767 112.033585) (xy 148.767 110.672606) (xy 149.419803 110.019803) (xy 149.447333 109.978601) (xy 149.457 109.93) (xy 149.457 108.15) (xy 149.447333 108.101399) (xy 149.419803 108.060197) (xy 149.087 107.727394) (xy 149.087 107.42) (xy 149.046885 107.218326) (xy 149.046885 107.218325) (xy 148.932645 107.047355) (xy 148.787 106.90171) (xy 148.787 104.487) (xy 149.453871 104.487) ) ) ) (zone (net 3) (net_name /5V) (layer F.Cu) (tstamp 55A2B501) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 138.97 101.41) (xy 138.97 105.35) (xy 138.97 105.57) (xy 140.38 105.57) (xy 143.9 109.09) (xy 143.9 112.18) (xy 149.9 112.18) (xy 149.9 110.81) (xy 146.72 110.81) (xy 145.66 109.75) (xy 145.66 107.32) (xy 140.95 102.61) (xy 140.95 101.41) (xy 140.77 101.41) ) ) (filled_polygon (pts (xy 139.340301 101.638327) (xy 139.57369 101.735) (xy 139.71425 101.735) (xy 139.873 101.57625) (xy 139.873 101.537) (xy 140.127 101.537) (xy 140.127 101.57625) (xy 140.28575 101.735) (xy 140.42631 101.735) (xy 140.49614 101.706076) (xy 140.737254 101.94719) (xy 140.51044 102.040908) (xy 140.291676 102.25929) (xy 140.173135 102.544767) (xy 140.172866 102.853877) (xy 140.290908 103.13956) (xy 140.50929 103.358324) (xy 140.719635 103.445667) (xy 140.719635 104.18) (xy 140.752775 104.346607) (xy 140.84715 104.48785) (xy 140.988393 104.582225) (xy 141.155 104.615365) (xy 142.405 104.615365) (xy 142.571607 104.582225) (xy 142.625308 104.546343) (xy 142.614635 104.6) (xy 142.614635 105.35) (xy 142.647775 105.516607) (xy 142.74215 105.65785) (xy 142.804275 105.699361) (xy 142.723135 105.894767) (xy 142.722866 106.203877) (xy 142.840908 106.48956) (xy 143.05929 106.708324) (xy 143.344767 106.826865) (xy 143.653877 106.827134) (xy 143.93956 106.709092) (xy 144.158324 106.49071) (xy 144.276865 106.205233) (xy 144.276942 106.116548) (xy 145.112972 106.952578) (xy 145.112866 107.073877) (xy 145.230908 107.35956) (xy 145.44929 107.578324) (xy 145.533 107.613084) (xy 145.533 108.607064) (xy 145.495032 108.645032) (xy 145.386212 108.807893) (xy 145.347999 109) (xy 145.348 109.000005) (xy 145.348 109.303239) (xy 145.191676 109.45929) (xy 145.073135 109.744767) (xy 145.072866 110.053877) (xy 145.190908 110.33956) (xy 145.40929 110.558324) (xy 145.694767 110.676865) (xy 145.85657 110.677006) (xy 145.957848 110.922118) (xy 146.17623 111.140882) (xy 146.461707 111.259423) (xy 146.770817 111.259692) (xy 147.0565 111.14165) (xy 147.213867 110.984558) (xy 147.817437 110.984558) (xy 147.817442 110.984559) (xy 148.009549 110.946346) (xy 148.023536 110.937) (xy 149.773 110.937) (xy 149.773 111.417454) (xy 149.74044 111.430908) (xy 149.521676 111.64929) (xy 149.403135 111.934767) (xy 149.403042 112.042135) (xy 148.65 112.042135) (xy 148.595378 112.053) (xy 145.875601 112.053) (xy 145.829092 111.94044) (xy 145.61071 111.721676) (xy 145.325233 111.603135) (xy 145.016123 111.602866) (xy 144.73044 111.720908) (xy 144.511676 111.93929) (xy 144.468971 112.042135) (xy 144.027 112.042135) (xy 144.027 109.09) (xy 144.017333 109.041399) (xy 143.989803 109.000197) (xy 140.469803 105.480197) (xy 140.428601 105.452667) (xy 140.38 105.443) (xy 139.973486 105.443) (xy 139.805233 105.373135) (xy 139.496123 105.372866) (xy 139.326386 105.443) (xy 139.167 105.443) (xy 139.167 101.537) (xy 139.238975 101.537) ) ) ) (zone (net 1) (net_name /3V3) (layer In2.Cu) (tstamp 55A2B8D6) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 171.35 106.13) (xy 171.34 106.31) (xy 171.34 107.26) (xy 168.65 109.95) (xy 153.19 109.95) (xy 150.73 107.49) (xy 146.77 107.49) (xy 146.77 105.72) (xy 152.36 105.72) (xy 155.06 108.42) (xy 166.12 108.42) (xy 168.41 106.13) ) ) (filled_polygon (pts (xy 169.961538 106.361556) (xy 170.19 106.407) (xy 171.213 106.407) (xy 171.213 107.083732) (xy 171.115233 107.043135) (xy 170.806123 107.042866) (xy 170.52044 107.160908) (xy 170.301676 107.37929) (xy 170.189158 107.650261) (xy 170.11071 107.571676) (xy 169.825233 107.453135) (xy 169.516123 107.452866) (xy 169.244223 107.565213) (xy 169.23071 107.551676) (xy 168.945233 107.433135) (xy 168.636123 107.432866) (xy 168.35044 107.550908) (xy 168.131676 107.76929) (xy 168.013135 108.054767) (xy 168.013019 108.18809) (xy 167.756123 108.187866) (xy 167.47044 108.305908) (xy 167.251676 108.52429) (xy 167.133135 108.809767) (xy 167.132888 109.093072) (xy 166.896123 109.092866) (xy 166.61044 109.210908) (xy 166.391676 109.42929) (xy 166.273135 109.714767) (xy 166.273041 109.823) (xy 165.251927 109.823) (xy 165.19071 109.761676) (xy 164.905233 109.643135) (xy 164.596123 109.642866) (xy 164.416199 109.717209) (xy 164.39071 109.691676) (xy 164.105233 109.573135) (xy 163.796123 109.572866) (xy 163.51044 109.690908) (xy 163.378117 109.823) (xy 162.200321 109.823) (xy 162.080233 109.773135) (xy 161.771123 109.772866) (xy 161.64979 109.823) (xy 160.234941 109.823) (xy 160.209092 109.76044) (xy 159.99071 109.541676) (xy 159.705233 109.423135) (xy 159.396123 109.422866) (xy 159.11044 109.540908) (xy 158.891676 109.75929) (xy 158.865221 109.823) (xy 153.242606 109.823) (xy 152.289771 108.870165) (xy 152.454965 108.70497) (xy 152.454968 108.704968) (xy 152.563788 108.542107) (xy 152.571793 108.501865) (xy 152.602001 108.35) (xy 152.602 108.349995) (xy 152.602 108.321761) (xy 152.758324 108.16571) (xy 152.788356 108.093384) (xy 152.790908 108.09956) (xy 153.00929 108.318324) (xy 153.294767 108.436865) (xy 153.603877 108.437134) (xy 153.88956 108.319092) (xy 154.108324 108.10071) (xy 154.176526 107.936462) (xy 154.835032 108.594968) (xy 154.997892 108.703788) (xy 155.19 108.742001) (xy 155.190005 108.742) (xy 156.914314 108.742) (xy 157.04 108.767) (xy 157.241675 108.726885) (xy 157.412645 108.612645) (xy 157.47829 108.547) (xy 160.048125 108.547) (xy 160.13929 108.638324) (xy 160.424767 108.756865) (xy 160.733877 108.757134) (xy 161.01956 108.639092) (xy 161.111813 108.547) (xy 162.308349 108.547) (xy 162.524767 108.636865) (xy 162.833877 108.637134) (xy 163.052018 108.547) (xy 164.946552 108.547) (xy 165.050908 108.79956) (xy 165.26929 109.018324) (xy 165.554767 109.136865) (xy 165.863877 109.137134) (xy 166.14956 109.019092) (xy 166.368324 108.80071) (xy 166.419421 108.677656) (xy 166.60956 108.599092) (xy 166.828324 108.38071) (xy 166.929507 108.137034) (xy 167.043877 108.137134) (xy 167.32956 108.019092) (xy 167.548324 107.80071) (xy 167.603855 107.666977) (xy 167.783877 107.667134) (xy 168.06956 107.549092) (xy 168.288324 107.33071) (xy 168.345113 107.193947) (xy 168.45929 107.308324) (xy 168.744767 107.426865) (xy 169.053877 107.427134) (xy 169.33956 107.309092) (xy 169.558324 107.09071) (xy 169.676865 106.805233) (xy 169.677134 106.496123) (xy 169.57833 106.257) (xy 169.805058 106.257) ) ) (filled_polygon (pts (xy 147.225 105.877001) (xy 147.225005 105.877) (xy 147.931938 105.877) (xy 148.304904 106.233621) (xy 148.406364 106.305571) (xy 148.566742 106.350703) (xy 149.080939 106.390875) (xy 149.34503 106.654965) (xy 149.345032 106.654968) (xy 149.507893 106.763788) (xy 149.7 106.802001) (xy 149.700005 106.802) (xy 152.723129 106.802) (xy 152.722866 107.103877) (xy 152.781089 107.244787) (xy 152.761644 107.291616) (xy 152.759092 107.28544) (xy 152.54071 107.066676) (xy 152.255233 106.948135) (xy 151.946123 106.947866) (xy 151.66044 107.065908) (xy 151.441676 107.28429) (xy 151.387843 107.413935) (xy 151.31571 107.341676) (xy 151.030233 107.223135) (xy 150.721123 107.222866) (xy 150.43544 107.340908) (xy 150.413309 107.363) (xy 148.243813 107.363) (xy 148.243825 107.349614) (xy 148.125783 107.063931) (xy 147.907401 106.845167) (xy 147.621924 106.726626) (xy 147.495977 106.726516) (xy 147.419092 106.54044) (xy 147.20071 106.321676) (xy 146.915233 106.203135) (xy 146.897 106.203119) (xy 146.897 105.847) (xy 147.074177 105.847) ) ) ) (zone (net 1) (net_name /3V3) (layer In2.Cu) (tstamp 55A2B8D7) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 171.36 106.13) (xy 171.35 106.13) (xy 171.36 105.95) ) ) ) (zone (net 3) (net_name /5V) (layer In2.Cu) (tstamp 55A3FEE5) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 158.79 106.4) (xy 159.96 106.4) (xy 159.96 101.18) (xy 148.17 101.18) (xy 148.17 105.5) (xy 153.82 105.5) (xy 154.77 106.45) (xy 154.85 106.45) ) ) (filled_polygon (pts (xy 158.191676 101.30929) (xy 158.073135 101.594767) (xy 158.072866 101.903877) (xy 158.190908 102.18956) (xy 158.40929 102.408324) (xy 158.565046 102.473) (xy 157.900103 102.473) (xy 157.746123 102.472866) (xy 157.745799 102.473) (xy 157.327067 102.473) (xy 157.327134 102.396123) (xy 157.209092 102.11044) (xy 156.99071 101.891676) (xy 156.949798 101.874688) (xy 157.22956 101.759092) (xy 157.448324 101.54071) (xy 157.545369 101.307) (xy 158.19397 101.307) ) ) (filled_polygon (pts (xy 149.5729 101.314269) (xy 149.660558 101.526417) (xy 149.822729 101.688871) (xy 150.034724 101.7769) (xy 150.264269 101.7771) (xy 150.476417 101.689442) (xy 150.638871 101.527271) (xy 150.649918 101.500667) (xy 150.660558 101.526417) (xy 150.822729 101.688871) (xy 151.034724 101.7769) (xy 151.264269 101.7771) (xy 151.476417 101.689442) (xy 151.638871 101.527271) (xy 151.649918 101.500667) (xy 151.660558 101.526417) (xy 151.822729 101.688871) (xy 152.034724 101.7769) (xy 152.264269 101.7771) (xy 152.476417 101.689442) (xy 152.638871 101.527271) (xy 152.7269 101.315276) (xy 152.726907 101.307) (xy 153.30823 101.307) (xy 153.45929 101.458324) (xy 153.744767 101.576865) (xy 154.053877 101.577134) (xy 154.33956 101.459092) (xy 154.491918 101.307) (xy 156.034816 101.307) (xy 156.130908 101.53956) (xy 156.34929 101.758324) (xy 156.390202 101.775312) (xy 156.11044 101.890908) (xy 155.891676 102.10929) (xy 155.773135 102.394767) (xy 155.773067 102.473) (xy 155.427067 102.473) (xy 155.427134 102.396123) (xy 155.309092 102.11044) (xy 155.09071 101.891676) (xy 154.805233 101.773135) (xy 154.496123 101.772866) (xy 154.21044 101.890908) (xy 153.991676 102.10929) (xy 153.873135 102.394767) (xy 153.873092 102.444322) (xy 153.859092 102.41044) (xy 153.64071 102.191676) (xy 153.355233 102.073135) (xy 153.046123 102.072866) (xy 152.76044 102.190908) (xy 152.541676 102.40929) (xy 152.515221 102.473) (xy 148.834941 102.473) (xy 148.809092 102.41044) (xy 148.652 102.253073) (xy 148.652 101.307) (xy 149.572906 101.307) ) ) ) (zone (net 2) (net_name GND) (layer In2.Cu) (tstamp 55A678F6) (hatch edge 0.508) (priority 3) (connect_pads (clearance 0.26)) (min_thickness 0.18) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 159.425 104.425) (xy 159.425 106.05) (xy 150.2 106.05) (xy 148.6 105.925) (xy 142.325 99.925) (xy 142.325 97.325) (xy 146.5 97.325) (xy 147.375 98.2) (xy 147.375 102.075) (xy 148.2 102.9) (xy 159.075 102.9) (xy 159.075 103.225) ) ) (filled_polygon (pts (xy 158.36015 105.449878) (xy 158.637334 105.45012) (xy 158.550122 105.66015) (xy 158.549879 105.938628) (xy 158.55871 105.96) (xy 153.991435 105.96) (xy 153.912641 105.907351) (xy 153.885657 105.901984) (xy 153.75 105.875) (xy 153.665116 105.875) (xy 153.668085 105.872036) (xy 153.774878 105.61485) (xy 153.775065 105.4) (xy 158.24003 105.4) ) ) (filled_polygon (pts (xy 151.051801 105.038197) (xy 151.197791 105.135745) (xy 151.369999 105.169999) (xy 152.443699 105.169999) (xy 152.375122 105.33515) (xy 152.374879 105.613628) (xy 152.481223 105.871) (xy 152.485216 105.875) (xy 149.876041 105.875) (xy 149.382878 105.381837) (xy 149.596 105.293777) (xy 149.793085 105.097036) (xy 149.899878 104.83985) (xy 149.900121 104.561372) (xy 149.793777 104.304) (xy 149.739871 104.25) (xy 150.263604 104.25) ) ) (filled_polygon (pts (xy 159.255749 104.16614) (xy 159.335 104.437857) (xy 159.335 104.979609) (xy 159.214639 105.099969) (xy 159.112666 105.09988) (xy 159.199878 104.88985) (xy 159.200121 104.611372) (xy 159.093777 104.354) (xy 158.897036 104.156915) (xy 158.63985 104.050122) (xy 158.361372 104.049879) (xy 158.104 104.156223) (xy 157.906915 104.352964) (xy 157.84586 104.5) (xy 154.985282 104.5) (xy 154.999878 104.46485) (xy 155.000121 104.186372) (xy 154.893777 103.929) (xy 154.697036 103.731915) (xy 154.43985 103.625122) (xy 154.161372 103.624879) (xy 153.951463 103.711612) (xy 153.797036 103.556915) (xy 153.53985 103.450122) (xy 153.261372 103.449879) (xy 153.004 103.556223) (xy 152.806915 103.752964) (xy 152.700122 104.01015) (xy 152.699895 104.269999) (xy 151.556395 104.269999) (xy 151.390916 104.10452) (xy 151.50015 104.149878) (xy 151.778628 104.150121) (xy 152.036 104.043777) (xy 152.233085 103.847036) (xy 152.339878 103.58985) (xy 152.340121 103.311372) (xy 152.233777 103.054) (xy 152.169889 102.99) (xy 158.079608 102.99) ) ) (filled_polygon (pts (xy 147.831802 104.118198) (xy 147.977792 104.215746) (xy 148.15 104.25) (xy 148.659972 104.25) (xy 148.606915 104.302964) (xy 148.500122 104.56015) (xy 148.499879 104.838628) (xy 148.545897 104.95) (xy 147.710541 104.95) (xy 147.375 104.629164) (xy 147.375 103.661396) ) ) (filled_polygon (pts (xy 147.025 97.97728) (xy 147.025 98.827003) (xy 146.83985 98.750122) (xy 146.561372 98.749879) (xy 146.304 98.856223) (xy 146.106915 99.052964) (xy 146.000122 99.31015) (xy 145.999879 99.588628) (xy 146.106223 99.846) (xy 146.302964 100.043085) (xy 146.56015 100.149878) (xy 146.838628 100.150121) (xy 147.025 100.073114) (xy 147.025 100.25) (xy 147.02973 100.273777) (xy 147.057351 100.412641) (xy 147.14948 100.55052) (xy 147.285 100.68604) (xy 147.285 102.075) (xy 147.291851 102.109442) (xy 147.31136 102.13864) (xy 147.591329 102.418609) (xy 147.556915 102.452964) (xy 147.522424 102.536028) (xy 146.7 101.713604) (xy 146.7 101.01) (xy 146.665746 100.837792) (xy 146.568198 100.691802) (xy 143.998198 98.121802) (xy 143.997005 98.121005) (xy 143.852208 98.024254) (xy 143.842048 98.022233) (xy 143.667036 97.846915) (xy 143.40985 97.740122) (xy 143.131372 97.739879) (xy 142.874 97.846223) (xy 142.676915 98.042964) (xy 142.570122 98.30015) (xy 142.569879 98.578628) (xy 142.651018 98.775) (xy 142.45 98.775) (xy 142.415 98.781962) (xy 142.415 97.415) (xy 146.46272 97.415) ) ) (filled_polygon (pts (xy 143.176223 99.876) (xy 143.372964 100.073085) (xy 143.63015 100.179878) (xy 143.908628 100.180121) (xy 144.166 100.073777) (xy 144.363085 99.877036) (xy 144.397576 99.793972) (xy 145.8 101.196396) (xy 145.8 101.9) (xy 145.834254 102.072208) (xy 145.886233 102.15) (xy 145.30104 102.15) (xy 144.55052 101.39948) (xy 144.412641 101.307351) (xy 144.385657 101.301984) (xy 144.363613 101.297599) (xy 144.449878 101.08985) (xy 144.450121 100.811372) (xy 144.343777 100.554) (xy 144.147036 100.356915) (xy 143.88985 100.250122) (xy 143.611372 100.249879) (xy 143.354 100.356223) (xy 143.156915 100.552964) (xy 143.144143 100.583723) (xy 142.575 100.039523) (xy 142.575 99.67604) (xy 142.62604 99.625) (xy 143.072512 99.625) ) ) ) (zone (net 2) (net_name GND) (layer In2.Cu) (tstamp 55AA31A2) (hatch edge 0.508) (connect_pads (clearance 0.26)) (min_thickness 0.18) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 179.93 120.09) (xy 137.24 120.09) (xy 137.24 95) (xy 179.93 95) ) ) (filled_polygon (pts (xy 178.62 118.48) (xy 159.950116 118.48) (xy 159.953085 118.477036) (xy 160.059878 118.21985) (xy 160.060052 118.019887) (xy 160.328628 118.020121) (xy 160.586 117.913777) (xy 160.604887 117.894923) (xy 160.652964 117.943085) (xy 160.91015 118.049878) (xy 161.188628 118.050121) (xy 161.446 117.943777) (xy 161.643085 117.747036) (xy 161.749878 117.48985) (xy 161.750121 117.211372) (xy 161.643777 116.954) (xy 161.447036 116.756915) (xy 161.18985 116.650122) (xy 160.911372 116.649879) (xy 160.654 116.756223) (xy 160.635113 116.775077) (xy 160.587036 116.726915) (xy 160.32985 116.620122) (xy 160.051372 116.619879) (xy 159.794 116.726223) (xy 159.596915 116.922964) (xy 159.490122 117.18015) (xy 159.489948 117.380113) (xy 159.221372 117.379879) (xy 158.964 117.486223) (xy 158.794928 117.655) (xy 156.156041 117.655) (xy 155.795 117.29396) (xy 155.795 116.938628) (xy 156.999879 116.938628) (xy 157.106223 117.196) (xy 157.302964 117.393085) (xy 157.56015 117.499878) (xy 157.838628 117.500121) (xy 158.096 117.393777) (xy 158.293085 117.197036) (xy 158.399878 116.93985) (xy 158.400121 116.661372) (xy 158.293777 116.404) (xy 158.097036 116.206915) (xy 157.884418 116.118628) (xy 161.789879 116.118628) (xy 161.896223 116.376) (xy 162.092964 116.573085) (xy 162.35015 116.679878) (xy 162.628628 116.680121) (xy 162.886 116.573777) (xy 163.083085 116.377036) (xy 163.189878 116.11985) (xy 163.190121 115.841372) (xy 163.083777 115.584) (xy 162.887036 115.386915) (xy 162.62985 115.280122) (xy 162.351372 115.279879) (xy 162.094 115.386223) (xy 161.896915 115.582964) (xy 161.790122 115.84015) (xy 161.789879 116.118628) (xy 157.884418 116.118628) (xy 157.83985 116.100122) (xy 157.561372 116.099879) (xy 157.304 116.206223) (xy 157.106915 116.402964) (xy 157.000122 116.66015) (xy 156.999879 116.938628) (xy 155.795 116.938628) (xy 155.795 115.11) (xy 155.762649 114.94736) (xy 155.704277 114.86) (xy 155.67052 114.809479) (xy 155.599669 114.738628) (xy 166.999879 114.738628) (xy 167.106223 114.996) (xy 167.302964 115.193085) (xy 167.56015 115.299878) (xy 167.838628 115.300121) (xy 168.096 115.193777) (xy 168.293085 114.997036) (xy 168.399878 114.73985) (xy 168.400121 114.461372) (xy 168.293777 114.204) (xy 168.097036 114.006915) (xy 167.83985 113.900122) (xy 167.561372 113.899879) (xy 167.304 114.006223) (xy 167.106915 114.202964) (xy 167.000122 114.46015) (xy 166.999879 114.738628) (xy 155.599669 114.738628) (xy 154.62052 113.75948) (xy 154.482641 113.667351) (xy 154.455657 113.661984) (xy 154.32 113.635) (xy 152.761041 113.635) (xy 151.714669 112.588628) (xy 157.049879 112.588628) (xy 157.156223 112.846) (xy 157.352964 113.043085) (xy 157.61015 113.149878) (xy 157.888628 113.150121) (xy 158.146 113.043777) (xy 158.343085 112.847036) (xy 158.449878 112.58985) (xy 158.450121 112.311372) (xy 158.343777 112.054) (xy 158.147036 111.856915) (xy 157.982583 111.788628) (xy 158.849879 111.788628) (xy 158.956223 112.046) (xy 159.152964 112.243085) (xy 159.41015 112.349878) (xy 159.688628 112.350121) (xy 159.946 112.243777) (xy 159.954904 112.234889) (xy 160.032964 112.313085) (xy 160.29015 112.419878) (xy 160.568628 112.420121) (xy 160.826 112.313777) (xy 161.023085 112.117036) (xy 161.129878 111.85985) (xy 161.130121 111.581372) (xy 161.023777 111.324) (xy 160.827036 111.126915) (xy 160.56985 111.020122) (xy 160.291372 111.019879) (xy 160.034 111.126223) (xy 160.025096 111.135111) (xy 159.947036 111.056915) (xy 159.68985 110.950122) (xy 159.411372 110.949879) (xy 159.154 111.056223) (xy 158.956915 111.252964) (xy 158.850122 111.51015) (xy 158.849879 111.788628) (xy 157.982583 111.788628) (xy 157.88985 111.750122) (xy 157.611372 111.749879) (xy 157.354 111.856223) (xy 157.156915 112.052964) (xy 157.050122 112.31015) (xy 157.049879 112.588628) (xy 151.714669 112.588628) (xy 151.195 112.06896) (xy 151.195 111.79) (xy 151.19 111.764863) (xy 151.19 110.99) (xy 151.160313 110.840753) (xy 151.075772 110.714228) (xy 150.949247 110.629687) (xy 150.8 110.6) (xy 147.34 110.6) (xy 147.316834 110.604608) (xy 147.317053 110.352843) (xy 147.566833 110.456561) (xy 147.845311 110.456804) (xy 148.102683 110.35046) (xy 148.299768 110.153719) (xy 148.406561 109.896533) (xy 148.406804 109.618055) (xy 148.30046 109.360683) (xy 148.18999 109.25002) (xy 151.62498 109.25002) (xy 151.765565 109.222056) (xy 151.787621 109.217669) (xy 151.858659 109.170203) (xy 152.914228 110.225772) (xy 153.040753 110.310313) (xy 153.19 110.34) (xy 161.254251 110.34) (xy 161.225122 110.41015) (xy 161.224879 110.688628) (xy 161.331223 110.946) (xy 161.527964 111.143085) (xy 161.78515 111.249878) (xy 162.010898 111.250075) (xy 161.754 111.356223) (xy 161.556915 111.552964) (xy 161.450122 111.81015) (xy 161.449879 112.088628) (xy 161.556223 112.346) (xy 161.752964 112.543085) (xy 162.01015 112.649878) (xy 162.210269 112.650053) (xy 162.402964 112.843085) (xy 162.66015 112.949878) (xy 162.938628 112.950121) (xy 163.196 112.843777) (xy 163.393085 112.647036) (xy 163.499878 112.38985) (xy 163.500121 112.111372) (xy 163.393777 111.854) (xy 163.197036 111.656915) (xy 162.93985 111.550122) (xy 162.739731 111.549947) (xy 162.547036 111.356915) (xy 162.28985 111.250122) (xy 162.064102 111.249925) (xy 162.321 111.143777) (xy 162.518085 110.947036) (xy 162.624878 110.68985) (xy 162.625121 110.411372) (xy 162.595631 110.34) (xy 168.65 110.34) (xy 168.799247 110.310313) (xy 168.925772 110.225772) (xy 171.1 108.051544) (xy 171.1 108.665026) (xy 170.732513 109.032513) (xy 170.656642 109.146061) (xy 170.63 109.28) (xy 170.63 111.68) (xy 170.656642 111.813939) (xy 170.732513 111.927487) (xy 170.846061 112.003358) (xy 170.98 112.03) (xy 171.08 112.03) (xy 171.08 116.149995) (xy 171.079999 116.15) (xy 171.119583 116.348995) (xy 171.232304 116.517696) (xy 171.449969 116.735361) (xy 171.449879 116.838628) (xy 171.556223 117.096) (xy 171.752964 117.293085) (xy 172.01015 117.399878) (xy 172.288628 117.400121) (xy 172.546 117.293777) (xy 172.743085 117.097036) (xy 172.849878 116.83985) (xy 172.850121 116.561372) (xy 172.743777 116.304) (xy 172.547036 116.106915) (xy 172.28985 116.000122) (xy 172.185422 116.000031) (xy 172.12 115.934608) (xy 172.12 112.03) (xy 172.36 112.03) (xy 172.493939 112.003358) (xy 172.607487 111.927487) (xy 172.683358 111.813939) (xy 172.71 111.68) (xy 172.71 110.904974) (xy 173.757487 109.857487) (xy 173.833358 109.743939) (xy 173.86 109.61) (xy 173.86 103.89) (xy 173.833358 103.756061) (xy 173.757487 103.642513) (xy 173.643939 103.566642) (xy 173.51 103.54) (xy 170.79 103.54) (xy 170.79 102.4) (xy 170.763358 102.266061) (xy 170.687487 102.152513) (xy 167.427487 98.892513) (xy 167.313939 98.816642) (xy 167.18 98.79) (xy 164.384974 98.79) (xy 162.857487 97.262513) (xy 162.743939 97.186642) (xy 162.61 97.16) (xy 153.294974 97.16) (xy 152.909974 96.775) (xy 167.880565 96.775) (xy 167.870122 96.80015) (xy 167.869879 97.078628) (xy 167.976223 97.336) (xy 168.172964 97.533085) (xy 168.43015 97.639878) (xy 168.708628 97.640121) (xy 168.966 97.533777) (xy 169.163085 97.337036) (xy 169.269878 97.07985) (xy 169.270121 96.801372) (xy 169.163777 96.544) (xy 168.990081 96.37) (xy 178.62 96.37) ) ) (filled_polygon (pts (xy 142.652964 102.083085) (xy 142.91015 102.189878) (xy 143.188628 102.190121) (xy 143.396201 102.104353) (xy 143.5 102.125) (xy 144.07396 102.125) (xy 144.82448 102.87552) (xy 144.962359 102.967649) (xy 145.125 103) (xy 145.410709 103) (xy 146.525 104.065457) (xy 146.525 104.549565) (xy 146.493777 104.474) (xy 146.297036 104.276915) (xy 146.03985 104.170122) (xy 145.761372 104.169879) (xy 145.504 104.276223) (xy 145.306915 104.472964) (xy 145.200122 104.73015) (xy 145.199879 105.008628) (xy 145.306223 105.266) (xy 145.502964 105.463085) (xy 145.76015 105.569878) (xy 146.038628 105.570121) (xy 146.296 105.463777) (xy 146.493085 105.267036) (xy 146.537128 105.16097) (xy 146.546129 105.206223) (xy 146.557351 105.262641) (xy 146.622027 105.359434) (xy 146.620753 105.359687) (xy 146.494228 105.444228) (xy 146.409687 105.570753) (xy 146.38 105.72) (xy 146.38 106.379612) (xy 146.364 106.386223) (xy 146.355105 106.395103) (xy 146.287036 106.326915) (xy 146.02985 106.220122) (xy 145.751372 106.219879) (xy 145.494 106.326223) (xy 145.376468 106.44355) (xy 145.35736 106.447351) (xy 145.343047 106.456915) (xy 145.219479 106.53948) (xy 144.75948 106.99948) (xy 144.667351 107.137359) (xy 144.667351 107.13736) (xy 144.635 107.3) (xy 144.635 110.64) (xy 144.64243 110.677351) (xy 144.667351 110.802641) (xy 144.75948 110.94052) (xy 145.18948 111.370521) (xy 145.327359 111.462649) (xy 145.49 111.495) (xy 146.95 111.495) (xy 146.95 116.77) (xy 146.979687 116.919247) (xy 147.064228 117.045772) (xy 147.190753 117.130313) (xy 147.34 117.16) (xy 149.61247 117.16) (xy 149.550122 117.31015) (xy 149.549879 117.588628) (xy 149.656223 117.846) (xy 149.852964 118.043085) (xy 150.11015 118.149878) (xy 150.388628 118.150121) (xy 150.646 118.043777) (xy 150.843085 117.847036) (xy 150.949878 117.58985) (xy 150.950121 117.311372) (xy 150.880924 117.143903) (xy 150.949247 117.130313) (xy 151.075772 117.045772) (xy 151.160313 116.919247) (xy 151.19 116.77) (xy 151.19 113.26604) (xy 152.28448 114.360521) (xy 152.422359 114.452649) (xy 152.585 114.485) (xy 154.14396 114.485) (xy 154.945 115.286041) (xy 154.945 117.47) (xy 154.96884 117.58985) (xy 154.977351 117.632641) (xy 155.06948 117.77052) (xy 155.679479 118.38052) (xy 155.771608 118.442078) (xy 155.81736 118.472649) (xy 155.854316 118.48) (xy 144.67104 118.48) (xy 144.701126 118.449914) (xy 144.938628 118.450121) (xy 145.196 118.343777) (xy 145.393085 118.147036) (xy 145.499878 117.88985) (xy 145.500121 117.611372) (xy 145.393777 117.354) (xy 145.197036 117.156915) (xy 144.93985 117.050122) (xy 144.661372 117.049879) (xy 144.404 117.156223) (xy 144.206915 117.352964) (xy 144.100122 117.61015) (xy 144.099969 117.785) (xy 143.69113 117.785) (xy 143.709878 117.73985) (xy 143.710121 117.461372) (xy 143.603777 117.204) (xy 143.407036 117.006915) (xy 143.14985 116.900122) (xy 142.871372 116.899879) (xy 142.614 117.006223) (xy 142.416915 117.202964) (xy 142.310122 117.46015) (xy 142.309879 117.738628) (xy 142.32904 117.785) (xy 141.751022 117.785) (xy 141.996 117.683777) (xy 142.193085 117.487036) (xy 142.299878 117.22985) (xy 142.300121 116.951372) (xy 142.193777 116.694) (xy 141.997036 116.496915) (xy 141.73985 116.390122) (xy 141.461372 116.389879) (xy 141.204 116.496223) (xy 141.006915 116.692964) (xy 140.900122 116.95015) (xy 140.899879 117.228628) (xy 141.006223 117.486) (xy 141.202964 117.683085) (xy 141.448402 117.785) (xy 140.186041 117.785) (xy 139.575 117.17396) (xy 139.575 116.188628) (xy 141.899879 116.188628) (xy 142.006223 116.446) (xy 142.202964 116.643085) (xy 142.46015 116.749878) (xy 142.738628 116.750121) (xy 142.996 116.643777) (xy 143.193085 116.447036) (xy 143.299878 116.18985) (xy 143.300121 115.911372) (xy 143.193777 115.654) (xy 142.997036 115.456915) (xy 142.73985 115.350122) (xy 142.461372 115.349879) (xy 142.204 115.456223) (xy 142.006915 115.652964) (xy 141.900122 115.91015) (xy 141.899879 116.188628) (xy 139.575 116.188628) (xy 139.575 115.570435) (xy 139.606223 115.646) (xy 139.802964 115.843085) (xy 140.06015 115.949878) (xy 140.338628 115.950121) (xy 140.596 115.843777) (xy 140.793085 115.647036) (xy 140.899878 115.38985) (xy 140.900121 115.111372) (xy 140.793777 114.854) (xy 140.597036 114.656915) (xy 140.33985 114.550122) (xy 140.061372 114.549879) (xy 139.804 114.656223) (xy 139.606915 114.852964) (xy 139.575 114.929824) (xy 139.575 111.395) (xy 140.884998 111.395) (xy 140.816915 111.462964) (xy 140.710122 111.72015) (xy 140.709879 111.998628) (xy 140.816223 112.256) (xy 141.012964 112.453085) (xy 141.185 112.524521) (xy 141.185 114.375103) (xy 141.056915 114.502964) (xy 140.950122 114.76015) (xy 140.949879 115.038628) (xy 141.056223 115.296) (xy 141.252964 115.493085) (xy 141.51015 115.599878) (xy 141.788628 115.600121) (xy 142.046 115.493777) (xy 142.243085 115.297036) (xy 142.349878 115.03985) (xy 142.350087 114.799913) (xy 142.588628 114.800121) (xy 142.846 114.693777) (xy 143.043085 114.497036) (xy 143.149878 114.23985) (xy 143.150121 113.961372) (xy 143.043777 113.704) (xy 142.876001 113.535931) (xy 142.969878 113.30985) (xy 142.969939 113.240035) (xy 143.068628 113.240121) (xy 143.326 113.133777) (xy 143.523085 112.937036) (xy 143.629878 112.67985) (xy 143.630121 112.401372) (xy 143.523777 112.144) (xy 143.327036 111.946915) (xy 143.06985 111.840122) (xy 142.791372 111.839879) (xy 142.534 111.946223) (xy 142.336915 112.142964) (xy 142.230122 112.40015) (xy 142.230061 112.469965) (xy 142.131372 112.469879) (xy 142.035 112.509699) (xy 142.035 112.180176) (xy 142.109878 111.99985) (xy 142.110121 111.721372) (xy 142.003777 111.464) (xy 141.934897 111.395) (xy 143.58396 111.395) (xy 144.470086 112.281126) (xy 144.469879 112.518628) (xy 144.576223 112.776) (xy 144.772964 112.973085) (xy 145.03015 113.079878) (xy 145.308628 113.080121) (xy 145.566 112.973777) (xy 145.763085 112.777036) (xy 145.869878 112.51985) (xy 145.870121 112.241372) (xy 145.763777 111.984) (xy 145.567036 111.786915) (xy 145.30985 111.680122) (xy 145.070954 111.679914) (xy 144.06052 110.66948) (xy 143.922641 110.577351) (xy 143.895657 110.571984) (xy 143.76 110.545) (xy 139.875002 110.545) (xy 139.875002 110.35604) (xy 140.14052 110.090523) (xy 140.205917 109.992649) (xy 140.232649 109.952642) (xy 140.265 109.790002) (xy 140.265 109.215089) (xy 140.283085 109.197036) (xy 140.389878 108.93985) (xy 140.390121 108.661372) (xy 140.283777 108.404) (xy 140.087036 108.206915) (xy 139.82985 108.100122) (xy 139.551372 108.099879) (xy 139.294 108.206223) (xy 139.096915 108.402964) (xy 139.09 108.419617) (xy 139.09 107.479836) (xy 139.252964 107.643085) (xy 139.51015 107.749878) (xy 139.788628 107.750121) (xy 140.046 107.643777) (xy 140.215072 107.475) (xy 140.25 107.475) (xy 140.390585 107.447036) (xy 140.412641 107.442649) (xy 140.55052 107.35052) (xy 142.450521 105.45052) (xy 142.542649 105.312641) (xy 142.575 105.15) (xy 142.575 103.938628) (xy 142.599879 103.938628) (xy 142.706223 104.196) (xy 142.902964 104.393085) (xy 143.16015 104.499878) (xy 143.438628 104.500121) (xy 143.696 104.393777) (xy 143.893085 104.197036) (xy 143.999878 103.93985) (xy 144.000121 103.661372) (xy 143.893777 103.404) (xy 143.697036 103.206915) (xy 143.43985 103.100122) (xy 143.161372 103.099879) (xy 142.904 103.206223) (xy 142.706915 103.402964) (xy 142.600122 103.66015) (xy 142.599879 103.938628) (xy 142.575 103.938628) (xy 142.575 102.004985) ) ) (filled_polygon (pts (xy 169.5 102.764974) (xy 169.5 105.74) (xy 168.41 105.74) (xy 168.260753 105.769687) (xy 168.134228 105.854228) (xy 165.958456 108.03) (xy 158.60018 108.03) (xy 158.568777 107.954) (xy 158.372036 107.756915) (xy 158.226042 107.696293) (xy 158.342919 107.618198) (xy 158.360557 107.60056) (xy 158.427964 107.668085) (xy 158.68515 107.774878) (xy 158.963628 107.775121) (xy 159.221 107.668777) (xy 159.418085 107.472036) (xy 159.524878 107.21485) (xy 159.525121 106.936372) (xy 159.464641 106.79) (xy 159.96 106.79) (xy 160.109247 106.760313) (xy 160.235772 106.675772) (xy 160.320313 106.549247) (xy 160.35 106.4) (xy 160.35 105.382102) (xy 160.355417 105.373995) (xy 160.395 105.175) (xy 160.395 104.388628) (xy 161.799879 104.388628) (xy 161.906223 104.646) (xy 162.102964 104.843085) (xy 162.36015 104.949878) (xy 162.638628 104.950121) (xy 162.896 104.843777) (xy 163.093085 104.647036) (xy 163.199878 104.38985) (xy 163.200121 104.111372) (xy 163.174808 104.050109) (xy 163.188628 104.050121) (xy 163.446 103.943777) (xy 163.643085 103.747036) (xy 163.749878 103.48985) (xy 163.750121 103.211372) (xy 163.643777 102.954) (xy 163.447036 102.756915) (xy 163.18985 102.650122) (xy 162.911372 102.649879) (xy 162.654 102.756223) (xy 162.456915 102.952964) (xy 162.350122 103.21015) (xy 162.349879 103.488628) (xy 162.375192 103.549891) (xy 162.361372 103.549879) (xy 162.104 103.656223) (xy 161.906915 103.852964) (xy 161.800122 104.11015) (xy 161.799879 104.388628) (xy 160.395 104.388628) (xy 160.395 104.050005) (xy 160.395001 104.05) (xy 160.355417 103.851005) (xy 160.35 103.842898) (xy 160.35 102.738628) (xy 160.449879 102.738628) (xy 160.556223 102.996) (xy 160.752964 103.193085) (xy 161.01015 103.299878) (xy 161.288628 103.300121) (xy 161.546 103.193777) (xy 161.743085 102.997036) (xy 161.849878 102.73985) (xy 161.850121 102.461372) (xy 161.743777 102.204) (xy 161.547036 102.006915) (xy 161.28985 101.900122) (xy 161.011372 101.899879) (xy 160.754 102.006223) (xy 160.556915 102.202964) (xy 160.450122 102.46015) (xy 160.449879 102.738628) (xy 160.35 102.738628) (xy 160.35 101.18) (xy 160.320313 101.030753) (xy 160.235772 100.904228) (xy 160.214478 100.89) (xy 163.51 100.89) (xy 163.643939 100.863358) (xy 163.690799 100.832047) (xy 163.698993 100.830417) (xy 163.867694 100.717696) (xy 164.445389 100.14) (xy 166.875026 100.14) ) ) (filled_polygon (pts (xy 157.796578 106.891747) (xy 157.661802 106.981802) (xy 156.828604 107.815) (xy 155.36604 107.815) (xy 154.725 107.17396) (xy 154.725 106.85) (xy 154.721075 106.830268) (xy 154.77 106.84) (xy 154.85 106.84) (xy 154.854949 106.839969) (xy 157.886832 106.801493) ) ) (filled_polygon (pts (xy 147.14948 96.69948) (xy 147.057351 96.837359) (xy 147.057351 96.83736) (xy 147.025 97) (xy 147.025 97.72272) (xy 146.56364 97.26136) (xy 146.534442 97.241851) (xy 146.5 97.235) (xy 142.325 97.235) (xy 142.290558 97.241851) (xy 142.26136 97.26136) (xy 142.241851 97.290558) (xy 142.235 97.325) (xy 142.235 98.842337) (xy 142.14948 98.89948) (xy 141.84948 99.19948) (xy 141.809353 99.259533) (xy 141.637036 99.086915) (xy 141.37985 98.980122) (xy 141.101372 98.979879) (xy 140.844 99.086223) (xy 140.646915 99.282964) (xy 140.540122 99.54015) (xy 140.539879 99.818628) (xy 140.646223 100.076) (xy 140.842964 100.273085) (xy 141.10015 100.379878) (xy 141.378628 100.380121) (xy 141.636 100.273777) (xy 141.725 100.184932) (xy 141.725 104.973959) (xy 140.144455 106.554505) (xy 140.047036 106.456915) (xy 139.78985 106.350122) (xy 139.511372 106.349879) (xy 139.254 106.456223) (xy 139.09 106.619937) (xy 139.09 105.529836) (xy 139.252964 105.693085) (xy 139.51015 105.799878) (xy 139.788628 105.800121) (xy 140.046 105.693777) (xy 140.243085 105.497036) (xy 140.349878 105.23985) (xy 140.350121 104.961372) (xy 140.243777 104.704) (xy 140.220597 104.68078) (xy 140.299878 104.48985) (xy 140.300121 104.211372) (xy 140.202345 103.974736) (xy 140.299878 103.73985) (xy 140.300121 103.461372) (xy 140.193777 103.204) (xy 139.997036 103.006915) (xy 139.73985 102.900122) (xy 139.461372 102.899879) (xy 139.204 103.006223) (xy 139.09 103.120024) (xy 139.09 101.718628) (xy 139.299879 101.718628) (xy 139.406223 101.976) (xy 139.602964 102.173085) (xy 139.86015 102.279878) (xy 140.138628 102.280121) (xy 140.396 102.173777) (xy 140.593085 101.977036) (xy 140.699878 101.71985) (xy 140.700121 101.441372) (xy 140.593777 101.184) (xy 140.397036 100.986915) (xy 140.13985 100.880122) (xy 139.861372 100.879879) (xy 139.604 100.986223) (xy 139.406915 101.182964) (xy 139.300122 101.44015) (xy 139.299879 101.718628) (xy 139.09 101.718628) (xy 139.09 96.37) (xy 147.478959 96.37) ) ) (filled_polygon (pts (xy 150.296642 96.776061) (xy 150.27 96.91) (xy 150.27 99.68) (xy 150.296642 99.813939) (xy 150.372513 99.927487) (xy 150.486061 100.003358) (xy 150.62 100.03) (xy 158.715026 100.03) (xy 159.472513 100.787487) (xy 159.476274 100.79) (xy 148.543174 100.79) (xy 148.542649 100.78736) (xy 148.467572 100.675) (xy 148.45052 100.649479) (xy 147.875 100.07396) (xy 147.875 99.572997) (xy 148.06015 99.649878) (xy 148.338628 99.650121) (xy 148.596 99.543777) (xy 148.793085 99.347036) (xy 148.899878 99.08985) (xy 148.900121 98.811372) (xy 148.793777 98.554) (xy 148.597036 98.356915) (xy 148.33985 98.250122) (xy 148.061372 98.249879) (xy 147.875 98.326886) (xy 147.875 97.17604) (xy 148.276041 96.775) (xy 150.297351 96.775) ) ) ) (zone (net 16) (net_name /3V0) (layer In2.Cu) (tstamp 55AA323A) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.26)) (min_thickness 0.18) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 150.62 96.91) (xy 150.62 99.68) (xy 158.86 99.68) (xy 159.72 100.54) (xy 163.51 100.54) (xy 164.26 99.79) (xy 167.02 99.79) (xy 169.85 102.62) (xy 169.85 106.01) (xy 171.45 106.01) (xy 171.45 108.81) (xy 170.98 109.28) (xy 170.98 111.68) (xy 172.36 111.68) (xy 172.36 110.76) (xy 173.51 109.61) (xy 173.51 103.89) (xy 170.44 103.89) (xy 170.44 102.4) (xy 167.18 99.14) (xy 164.24 99.14) (xy 162.61 97.51) (xy 153.15 97.51) (xy 152.55 96.91) (xy 152.55 96.8) ) ) (filled_polygon (pts (xy 152.46 96.91) (xy 152.466851 96.944442) (xy 152.48636 96.97364) (xy 152.84988 97.33716) (xy 152.849879 97.338628) (xy 152.956223 97.596) (xy 153.152964 97.793085) (xy 153.41015 97.899878) (xy 153.59831 97.900042) (xy 153.646223 98.016) (xy 153.842964 98.213085) (xy 154.10015 98.319878) (xy 154.378628 98.320121) (xy 154.636 98.213777) (xy 154.699939 98.14995) (xy 154.762964 98.213085) (xy 155.02015 98.319878) (xy 155.298628 98.320121) (xy 155.556 98.213777) (xy 155.57986 98.189958) (xy 155.592964 98.203085) (xy 155.85015 98.309878) (xy 156.128628 98.310121) (xy 156.386 98.203777) (xy 156.429913 98.159941) (xy 156.482964 98.213085) (xy 156.74015 98.319878) (xy 157.018628 98.320121) (xy 157.276 98.213777) (xy 157.294878 98.194932) (xy 157.332964 98.233085) (xy 157.59015 98.339878) (xy 157.868628 98.340121) (xy 158.126 98.233777) (xy 158.323085 98.037036) (xy 158.429878 97.77985) (xy 158.430035 97.6) (xy 161.437384 97.6) (xy 161.350122 97.81015) (xy 161.349879 98.088628) (xy 161.456223 98.346) (xy 161.652964 98.543085) (xy 161.91015 98.649878) (xy 162.188628 98.650121) (xy 162.395462 98.564659) (xy 162.256915 98.702964) (xy 162.150122 98.96015) (xy 162.150109 98.975087) (xy 161.911372 98.974879) (xy 161.654 99.081223) (xy 161.456915 99.277964) (xy 161.350122 99.53515) (xy 161.349879 99.813628) (xy 161.456223 100.071) (xy 161.652964 100.268085) (xy 161.91015 100.374878) (xy 162.188628 100.375121) (xy 162.446 100.268777) (xy 162.643085 100.072036) (xy 162.749878 99.81485) (xy 162.749891 99.799913) (xy 162.988628 99.800121) (xy 163.246 99.693777) (xy 163.443085 99.497036) (xy 163.549878 99.23985) (xy 163.550121 98.961372) (xy 163.443777 98.704) (xy 163.247036 98.506915) (xy 162.98985 98.400122) (xy 162.711372 98.399879) (xy 162.504538 98.485341) (xy 162.643085 98.347036) (xy 162.749878 98.08985) (xy 162.750121 97.811372) (xy 162.726201 97.753481) (xy 164.17636 99.20364) (xy 164.205558 99.223149) (xy 164.24 99.23) (xy 165.04012 99.23) (xy 165.177964 99.368085) (xy 165.43515 99.474878) (xy 165.713628 99.475121) (xy 165.971 99.368777) (xy 166.000965 99.338864) (xy 166.22015 99.429878) (xy 166.498628 99.430121) (xy 166.756 99.323777) (xy 166.849941 99.23) (xy 167.14272 99.23) (xy 167.389906 99.477186) (xy 167.389879 99.508628) (xy 167.496223 99.766) (xy 167.692964 99.963085) (xy 167.95015 100.069878) (xy 167.98 100.069904) (xy 167.979879 100.208628) (xy 168.086223 100.466) (xy 168.282964 100.663085) (xy 168.54015 100.769878) (xy 168.682722 100.770002) (xy 170.35 102.43728) (xy 170.35 103.89) (xy 170.356851 103.924442) (xy 170.37636 103.95364) (xy 170.405558 103.973149) (xy 170.44 103.98) (xy 170.655138 103.98) (xy 170.506915 104.127964) (xy 170.400122 104.38515) (xy 170.399879 104.663628) (xy 170.506223 104.921) (xy 170.702964 105.118085) (xy 170.96015 105.224878) (xy 171.238628 105.225121) (xy 171.496 105.118777) (xy 171.693085 104.922036) (xy 171.799878 104.66485) (xy 171.800121 104.386372) (xy 171.693777 104.129) (xy 171.545037 103.98) (xy 171.640199 103.98) (xy 171.822964 104.163085) (xy 172.08015 104.269878) (xy 172.358628 104.270121) (xy 172.616 104.163777) (xy 172.800098 103.98) (xy 173.229079 103.98) (xy 173.150122 104.17015) (xy 173.149879 104.448628) (xy 173.255179 104.703474) (xy 173.190122 104.86015) (xy 173.189879 105.138628) (xy 173.296223 105.396) (xy 173.42 105.519994) (xy 173.42 105.545947) (xy 173.360122 105.69015) (xy 173.359879 105.968628) (xy 173.377278 106.010737) (xy 173.364 106.016223) (xy 173.166915 106.212964) (xy 173.060122 106.47015) (xy 173.059879 106.748628) (xy 173.148046 106.962009) (xy 173.046915 107.062964) (xy 172.940122 107.32015) (xy 172.939879 107.598628) (xy 173.046223 107.856) (xy 173.242964 108.053085) (xy 173.42 108.126597) (xy 173.42 109.210007) (xy 173.346915 109.282964) (xy 173.240122 109.54015) (xy 173.239936 109.752784) (xy 173.082761 109.909959) (xy 172.991372 109.909879) (xy 172.734 110.016223) (xy 172.536915 110.212964) (xy 172.430122 110.47015) (xy 172.430041 110.562679) (xy 172.29636 110.69636) (xy 172.276851 110.725558) (xy 172.27 110.76) (xy 172.27 110.790111) (xy 172.136915 110.922964) (xy 172.030122 111.18015) (xy 172.029879 111.458628) (xy 172.084161 111.59) (xy 171.399983 111.59) (xy 171.400121 111.431372) (xy 171.348754 111.307054) (xy 171.409878 111.15985) (xy 171.410121 110.881372) (xy 171.313224 110.646863) (xy 171.333085 110.627036) (xy 171.439878 110.36985) (xy 171.440121 110.091372) (xy 171.413339 110.026555) (xy 171.543085 109.897036) (xy 171.649878 109.63985) (xy 171.650121 109.361372) (xy 171.543777 109.104) (xy 171.413642 108.973638) (xy 171.51364 108.87364) (xy 171.533149 108.844442) (xy 171.54 108.81) (xy 171.54 108.45753) (xy 171.69015 108.519878) (xy 171.968628 108.520121) (xy 172.226 108.413777) (xy 172.423085 108.217036) (xy 172.529878 107.95985) (xy 172.530121 107.681372) (xy 172.423777 107.424) (xy 172.227036 107.226915) (xy 171.96985 107.120122) (xy 171.73 107.119913) (xy 171.73 106.320833) (xy 171.73696 106.195558) (xy 171.75 106.13) (xy 171.75 105.95) (xy 171.728037 105.82097) (xy 171.650644 105.68995) (xy 171.529003 105.59852) (xy 171.381633 105.5606) (xy 171.23097 105.581963) (xy 171.09995 105.659356) (xy 171.039335 105.74) (xy 169.94 105.74) (xy 169.94 103.214052) (xy 169.999878 103.06985) (xy 170.000121 102.791372) (xy 169.94 102.645868) (xy 169.94 102.62) (xy 169.933149 102.585558) (xy 169.91364 102.55636) (xy 169.895535 102.538255) (xy 169.893777 102.534) (xy 169.697036 102.336915) (xy 169.692178 102.334898) (xy 167.08364 99.72636) (xy 167.054442 99.706851) (xy 167.02 99.7) (xy 166.839993 99.7) (xy 166.767036 99.626915) (xy 166.50985 99.520122) (xy 166.231372 99.519879) (xy 166.021844 99.606454) (xy 165.78985 99.510122) (xy 165.511372 99.509879) (xy 165.276575 99.606895) (xy 165.13985 99.550122) (xy 164.861372 99.549879) (xy 164.604 99.656223) (xy 164.560146 99.7) (xy 164.26 99.7) (xy 164.225558 99.706851) (xy 164.19636 99.72636) (xy 163.597635 100.325085) (xy 163.40098 100.324913) (xy 163.217143 100.400873) (xy 163.16793 100.45) (xy 163.032145 100.45) (xy 162.983597 100.401367) (xy 162.799893 100.325087) (xy 162.60098 100.324913) (xy 162.417143 100.400873) (xy 162.36793 100.45) (xy 161.489784 100.45) (xy 161.297036 100.256915) (xy 161.03985 100.150122) (xy 160.761372 100.149879) (xy 160.504 100.256223) (xy 160.309884 100.45) (xy 159.75728 100.45) (xy 158.92364 99.61636) (xy 158.894442 99.596851) (xy 158.86 99.59) (xy 152.467044 99.59) (xy 152.573633 99.483597) (xy 152.649913 99.299893) (xy 152.650087 99.10098) (xy 152.574127 98.917143) (xy 152.433597 98.776367) (xy 152.249893 98.700087) (xy 152.05098 98.699913) (xy 151.867143 98.775873) (xy 151.726367 98.916403) (xy 151.650087 99.100107) (xy 151.650086 99.100978) (xy 151.574127 98.917143) (xy 151.433597 98.776367) (xy 151.249893 98.700087) (xy 151.05098 98.699913) (xy 150.867143 98.775873) (xy 150.726367 98.916403) (xy 150.71 98.955819) (xy 150.71 96.995016) (xy 152.46 96.895275) ) ) ) ) ================================================ FILE: hardware/fmcw2/fmcw2.pro ================================================ update=ma 9. marraskuuta 2015 20.03.44 version=1 last_client=kicad [cvpcb] version=1 NetIExt=net [general] version=1 [pcbnew] version=1 PageLayoutDescrFile= LastNetListRead= UseCmpFile=1 PadDrill=0.6 PadDrillOvalY=0.6 PadSizeH=1.5 PadSizeV=1.5 PcbTextSizeV=1.5 PcbTextSizeH=1.5 PcbTextThickness=0.3 ModuleTextSizeV=1 ModuleTextSizeH=1 ModuleTextSizeThickness=0.15 SolderMaskClearance=0 SolderMaskMinWidth=0 DrawSegmentWidth=0.2 BoardOutlineThickness=0.09999999999999999 ModuleOutlineThickness=0.15 [eeschema] version=1 LibDir=libs [eeschema/libraries] LibName1=fmcw2-rescue LibName2=power LibName3=device LibName4=transistors LibName5=conn LibName6=linear LibName7=regul LibName8=74xx LibName9=cmos4000 LibName10=adc-dac LibName11=memory LibName12=xilinx LibName13=special LibName14=microcontrollers LibName15=dsp LibName16=microchip LibName17=analog_switches LibName18=motorola LibName19=texas LibName20=intel LibName21=audio LibName22=interface LibName23=digital-audio LibName24=philips LibName25=display LibName26=cypress LibName27=siliconi LibName28=opto LibName29=atmel LibName30=contrib LibName31=valves LibName32=libs/fmcw2 ================================================ FILE: hardware/fmcw2/fmcw2.sch ================================================ EESchema Schematic File Version 2 LIBS:fmcw2-rescue LIBS:power LIBS:device LIBS:transistors LIBS:conn LIBS:linear LIBS:regul LIBS:74xx LIBS:cmos4000 LIBS:adc-dac LIBS:memory LIBS:xilinx LIBS:special LIBS:microcontrollers LIBS:dsp LIBS:microchip LIBS:analog_switches LIBS:motorola LIBS:texas LIBS:intel LIBS:audio LIBS:interface LIBS:digital-audio LIBS:philips LIBS:display LIBS:cypress LIBS:siliconi LIBS:opto LIBS:atmel LIBS:contrib LIBS:valves LIBS:fmcw2 LIBS:fmcw2-cache EELAYER 25 0 EELAYER END $Descr A3 16535 11693 encoding utf-8 Sheet 1 1 Title "" Date "" Rev "" Comp "" Comment1 "" Comment2 "" Comment3 "" Comment4 "" $EndDescr $Comp L HMC431LP4 U10 U 1 1 54FAAD5A P 9000 3250 F 0 "U10" H 9300 2900 60 0000 C CNN F 1 "HMC431LP4" H 9200 3550 60 0000 C CNN F 2 "fmcw2:VQFN-24" H 9000 3250 60 0001 C CNN F 3 "" H 9000 3250 60 0000 C CNN F 4 "HMC431LP4ETR" H 9000 3250 60 0001 C CNN "manf#" 1 9000 3250 1 0 0 -1 $EndComp $Comp L ADF4158 U1 U 1 1 54FAADA7 P 1400 3700 F 0 "U1" H 3150 3500 60 0000 C CNN F 1 "ADF4158" H 3200 3800 60 0000 C CNN F 2 "fmcw2:VFQFN-24" H 1400 3700 60 0001 C CNN F 3 "" H 1400 3700 60 0000 C CNN F 4 "ADF4158CCPZ" H 1400 3700 60 0001 C CNN "manf#" 1 1400 3700 1 0 0 -1 $EndComp $Comp L SKY65404 U11 U 1 1 54FAB1B7 P 12600 6550 F 0 "U11" H 12950 6250 60 0000 C CNN F 1 "SKY65404" H 12850 6850 60 0000 C CNN F 2 "fmcw2:XFDFN-6" H 12550 6550 60 0001 C CNN F 3 "" H 12550 6550 60 0000 C CNN F 4 "SKY65404-31" H 12600 6550 60 0001 C CNN "manf#" 1 12600 6550 1 0 0 -1 $EndComp $Comp L SMA U15 U 1 1 54FAB57F P 15400 2550 F 0 "U15" H 15550 2550 60 0000 C CNN F 1 "SMA" H 15400 2700 60 0000 C CNN F 2 "fmcw2:CONSMA003.062" H 15400 2550 60 0001 C CNN F 3 "" H 15400 2550 60 0000 C CNN F 4 "CONSMA003.062" H 15400 2550 60 0001 C CNN "manf#" 1 15400 2550 1 0 0 -1 $EndComp $Comp L SMA U13 U 1 1 54FAB614 P 15250 6700 F 0 "U13" H 15400 6700 60 0000 C CNN F 1 "SMA" H 15250 6850 60 0000 C CNN F 2 "fmcw2:CONSMA003.062" H 15250 6700 60 0001 C CNN F 3 "" H 15250 6700 60 0000 C CNN F 4 "CONSMA003.062" H 15250 6700 60 0001 C CNN "manf#" 1 15250 6700 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C3 U 1 1 54FAB814 P 2450 2600 F 0 "C3" H 2450 2700 40 0000 L CNN F 1 "10p" H 2456 2515 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2488 2450 30 0001 C CNN F 3 "" H 2450 2600 60 0000 C CNN 1 2450 2600 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C2 U 1 1 54FAB845 P 2450 2300 F 0 "C2" H 2450 2400 40 0000 L CNN F 1 "100n" H 2456 2215 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2488 2150 30 0001 C CNN F 3 "" H 2450 2300 60 0000 C CNN 1 2450 2300 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR01 U 1 1 54FAB873 P 2200 2600 F 0 "#PWR01" H 2200 2600 30 0001 C CNN F 1 "GND" H 2200 2530 30 0001 C CNN F 2 "" H 2200 2600 60 0000 C CNN F 3 "" H 2200 2600 60 0000 C CNN 1 2200 2600 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR02 U 1 1 54FAB89A P 2200 2300 F 0 "#PWR02" H 2200 2300 30 0001 C CNN F 1 "GND" H 2200 2230 30 0001 C CNN F 2 "" H 2200 2300 60 0000 C CNN F 3 "" H 2200 2300 60 0000 C CNN 1 2200 2300 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C5 U 1 1 54FAB91A P 3300 2550 F 0 "C5" H 3300 2650 40 0000 L CNN F 1 "10p" H 3306 2465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3338 2400 30 0001 C CNN F 3 "" H 3300 2550 60 0000 C CNN 1 3300 2550 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2 C4 U 1 1 54FAB968 P 3300 2300 F 0 "C4" H 3300 2400 40 0000 L CNN F 1 "100n" H 3306 2215 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3338 2150 30 0001 C CNN F 3 "" H 3300 2300 60 0000 C CNN 1 3300 2300 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR03 U 1 1 54FABC47 P 3550 2050 F 0 "#PWR03" H 3550 2050 30 0001 C CNN F 1 "GND" H 3550 1980 30 0001 C CNN F 2 "" H 3550 2050 60 0000 C CNN F 3 "" H 3550 2050 60 0000 C CNN 1 3550 2050 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR04 U 1 1 54FABC64 P 3550 2550 F 0 "#PWR04" H 3550 2550 30 0001 C CNN F 1 "GND" H 3550 2480 30 0001 C CNN F 2 "" H 3550 2550 60 0000 C CNN F 3 "" H 3550 2550 60 0000 C CNN 1 3550 2550 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2 C7 U 1 1 54FABCC1 P 3950 2750 F 0 "C7" H 3950 2850 40 0000 L CNN F 1 "10p" H 3956 2665 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3988 2600 30 0001 C CNN F 3 "" H 3950 2750 60 0000 C CNN 1 3950 2750 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2 C6 U 1 1 54FABD07 P 3950 2450 F 0 "C6" H 3950 2550 40 0000 L CNN F 1 "100n" H 3956 2365 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3988 2300 30 0001 C CNN F 3 "" H 3950 2450 60 0000 C CNN 1 3950 2450 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR05 U 1 1 54FABD8F P 4200 2750 F 0 "#PWR05" H 4200 2750 30 0001 C CNN F 1 "GND" H 4200 2680 30 0001 C CNN F 2 "" H 4200 2750 60 0000 C CNN F 3 "" H 4200 2750 60 0000 C CNN 1 4200 2750 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR06 U 1 1 54FABDB0 P 4200 2450 F 0 "#PWR06" H 4200 2450 30 0001 C CNN F 1 "GND" H 4200 2380 30 0001 C CNN F 2 "" H 4200 2450 60 0000 C CNN F 3 "" H 4200 2450 60 0000 C CNN 1 4200 2450 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR07 U 1 1 54FAC201 P 15400 2750 F 0 "#PWR07" H 15400 2750 30 0001 C CNN F 1 "GND" H 15400 2680 30 0001 C CNN F 2 "" H 15400 2750 60 0000 C CNN F 3 "" H 15400 2750 60 0000 C CNN 1 15400 2750 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR08 U 1 1 54FAC284 P 15250 6900 F 0 "#PWR08" H 15250 6900 30 0001 C CNN F 1 "GND" H 15250 6830 30 0001 C CNN F 2 "" H 15250 6900 60 0000 C CNN F 3 "" H 15250 6900 60 0000 C CNN 1 15250 6900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR09 U 1 1 54FAC740 P 3250 4650 F 0 "#PWR09" H 3250 4650 30 0001 C CNN F 1 "GND" H 3250 4580 30 0001 C CNN F 2 "" H 3250 4650 60 0000 C CNN F 3 "" H 3250 4650 60 0000 C CNN 1 3250 4650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C8 U 1 1 54FAC816 P 4500 4250 F 0 "C8" H 4500 4350 40 0000 L CNN F 1 "100p" H 4506 4165 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4538 4100 30 0001 C CNN F 3 "" H 4500 4250 60 0000 C CNN 1 4500 4250 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR010 U 1 1 54FAC883 P 4750 4250 F 0 "#PWR010" H 4750 4250 30 0001 C CNN F 1 "GND" H 4750 4180 30 0001 C CNN F 2 "" H 4750 4250 60 0000 C CNN F 3 "" H 4750 4250 60 0000 C CNN 1 4750 4250 0 -1 -1 0 $EndComp $Comp L R-RESCUE-fmcw2 R1 U 1 1 54FAC988 P 4150 4550 F 0 "R1" V 4230 4550 40 0000 C CNN F 1 "5.49k" V 4157 4551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4080 4550 30 0001 C CNN F 3 "" H 4150 4550 30 0000 C CNN 1 4150 4550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR011 U 1 1 54FACA45 P 4150 4850 F 0 "#PWR011" H 4150 4850 30 0001 C CNN F 1 "GND" H 4150 4780 30 0001 C CNN F 2 "" H 4150 4850 60 0000 C CNN F 3 "" H 4150 4850 60 0000 C CNN 1 4150 4850 1 0 0 -1 $EndComp Text Label 2150 4050 2 60 ~ 0 ADF_CLK Text Label 2150 4150 2 60 ~ 0 ADF_DATA Text Label 2150 4250 2 60 ~ 0 ADF_LE Text Label 2150 3750 2 60 ~ 0 ADF_CE Text Label 2150 3850 2 60 ~ 0 ADF_TXDATA $Comp L C-RESCUE-fmcw2 C10 U 1 1 54FACE38 P 4950 3650 F 0 "C10" H 4950 3750 40 0000 L CNN F 1 "2.2n" H 4956 3565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4988 3500 30 0001 C CNN F 3 "" H 4950 3650 60 0000 C CNN 1 4950 3650 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R2 U 1 1 54FACF33 P 4450 3700 F 0 "R2" V 4530 3700 40 0000 C CNN F 1 "750" V 4457 3701 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4380 3700 30 0001 C CNN F 3 "" H 4450 3700 30 0000 C CNN 1 4450 3700 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R4 U 1 1 54FACFD7 P 5100 4150 F 0 "R4" V 5180 4150 40 0000 C CNN F 1 "2.2k" V 5107 4151 40 0000 C CNN F 2 "fmcw2:R_0402b" V 5030 4150 30 0001 C CNN F 3 "" H 5100 4150 30 0000 C CNN 1 5100 4150 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR012 U 1 1 54FAD02A P 5100 4450 F 0 "#PWR012" H 5100 4450 30 0001 C CNN F 1 "GND" H 5100 4380 30 0001 C CNN F 2 "" H 5100 4450 60 0000 C CNN F 3 "" H 5100 4450 60 0000 C CNN 1 5100 4450 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C26 U 1 1 54FAD91A P 8000 2550 F 0 "C26" H 8000 2650 40 0000 L CNN F 1 "2.2u" H 8006 2465 40 0000 L CNN F 2 "fmcw2:C_0603b" H 8038 2400 30 0001 C CNN F 3 "" H 8000 2550 60 0000 C CNN 1 8000 2550 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C28 U 1 1 54FAD983 P 8300 2550 F 0 "C28" H 8300 2650 40 0000 L CNN F 1 "10n" H 8306 2465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8338 2400 30 0001 C CNN F 3 "" H 8300 2550 60 0000 C CNN 1 8300 2550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR013 U 1 1 54FADA74 P 8300 2800 F 0 "#PWR013" H 8300 2800 30 0001 C CNN F 1 "GND" H 8300 2730 30 0001 C CNN F 2 "" H 8300 2800 60 0000 C CNN F 3 "" H 8300 2800 60 0000 C CNN 1 8300 2800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR014 U 1 1 54FADAB0 P 8000 2800 F 0 "#PWR014" H 8000 2800 30 0001 C CNN F 1 "GND" H 8000 2730 30 0001 C CNN F 2 "" H 8000 2800 60 0000 C CNN F 3 "" H 8000 2800 60 0000 C CNN 1 8000 2800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR015 U 1 1 54FADCB5 P 9800 3550 F 0 "#PWR015" H 9800 3550 30 0001 C CNN F 1 "GND" H 9800 3480 30 0001 C CNN F 2 "" H 9800 3550 60 0000 C CNN F 3 "" H 9800 3550 60 0000 C CNN 1 9800 3550 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R9 U 1 1 54FADE32 P 10100 3100 F 0 "R9" V 10180 3100 40 0000 C CNN F 1 "18" V 10107 3101 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10030 3100 30 0001 C CNN F 3 "" H 10100 3100 30 0000 C CNN 1 10100 3100 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R11 U 1 1 54FADEF5 P 10450 2800 F 0 "R11" V 10530 2800 40 0000 C CNN F 1 "18" V 10457 2801 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10380 2800 30 0001 C CNN F 3 "" H 10450 2800 30 0000 C CNN 1 10450 2800 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R12 U 1 1 54FADF4C P 10450 3400 F 0 "R12" V 10530 3400 40 0000 C CNN F 1 "18" V 10457 3401 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10380 3400 30 0001 C CNN F 3 "" H 10450 3400 30 0000 C CNN 1 10450 3400 1 0 0 -1 $EndComp Text Notes 9150 2350 0 60 ~ 0 Resistive splitter (-6 dBm) Text Notes 8800 2750 0 60 ~ 0 +2 dBm output Text Notes 4200 4000 0 60 ~ 0 -4 dBm Text Notes 10300 2500 0 60 ~ 0 -4 dBm $Comp L INDUCTOR_SMALL L2 U 1 1 54FAF841 P 13800 5900 F 0 "L2" H 13800 6000 50 0000 C CNN F 1 "0.6n" H 13800 5850 50 0000 C CNN F 2 "Capacitors_SMD:C_0402" H 13800 5900 60 0001 C CNN F 3 "" H 13800 5900 60 0000 C CNN 1 13800 5900 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C35 U 1 1 54FAF898 P 14150 6100 F 0 "C35" H 14150 6200 40 0000 L CNN F 1 "100n" H 14156 6015 40 0000 L CNN F 2 "fmcw2:C_0402b" H 14188 5950 30 0001 C CNN F 3 "" H 14150 6100 60 0000 C CNN 1 14150 6100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR016 U 1 1 54FAF9C1 P 14150 6350 F 0 "#PWR016" H 14150 6350 30 0001 C CNN F 1 "GND" H 14150 6280 30 0001 C CNN F 2 "" H 14150 6350 60 0000 C CNN F 3 "" H 14150 6350 60 0000 C CNN 1 14150 6350 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR017 U 1 1 54FAFB66 P 13450 6550 F 0 "#PWR017" H 13450 6550 30 0001 C CNN F 1 "GND" H 13450 6480 30 0001 C CNN F 2 "" H 13450 6550 60 0000 C CNN F 3 "" H 13450 6550 60 0000 C CNN 1 13450 6550 0 -1 -1 0 $EndComp Text Label 14150 5800 0 60 ~ 0 3V0 $Comp L GND-RESCUE-fmcw2 #PWR018 U 1 1 54FAFFC2 P 12650 7150 F 0 "#PWR018" H 12650 7150 30 0001 C CNN F 1 "GND" H 12650 7080 30 0001 C CNN F 2 "" H 12650 7150 60 0000 C CNN F 3 "" H 12650 7150 60 0000 C CNN 1 12650 7150 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C31 U 1 1 54FB0546 P 13500 7000 F 0 "C31" H 13500 7100 40 0000 L CNN F 1 "0.5p" H 13506 6915 40 0000 L CNN F 2 "fmcw2:C_0402b" H 13538 6850 30 0001 C CNN F 3 "" H 13500 7000 60 0000 C CNN 1 13500 7000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR019 U 1 1 54FB073F P 13500 7250 F 0 "#PWR019" H 13500 7250 30 0001 C CNN F 1 "GND" H 13500 7180 30 0001 C CNN F 2 "" H 13500 7250 60 0000 C CNN F 3 "" H 13500 7250 60 0000 C CNN 1 13500 7250 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR020 U 1 1 54FB0875 P 11850 6550 F 0 "#PWR020" H 11850 6550 30 0001 C CNN F 1 "GND" H 11850 6480 30 0001 C CNN F 2 "" H 11850 6550 60 0000 C CNN F 3 "" H 11850 6550 60 0000 C CNN 1 11850 6550 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R8 U 1 1 54FB095E P 11600 6400 F 0 "R8" V 11680 6400 40 0000 C CNN F 1 "100" V 11607 6401 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11530 6400 30 0001 C CNN F 3 "" H 11600 6400 30 0000 C CNN 1 11600 6400 0 1 1 0 $EndComp Text Label 11300 6400 2 60 ~ 0 3V0 $Comp L PAT1220 U12 U 1 1 54FB1677 P 11100 2550 F 0 "U12" H 11300 2250 60 0000 C CNN F 1 "PAT1220-6dB" H 11150 2650 60 0000 C CNN F 2 "fmcw2:PAT1220" H 11100 2550 60 0001 C CNN F 3 "" H 11100 2550 60 0000 C CNN 1 11100 2550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR021 U 1 1 54FB1848 P 11100 3100 F 0 "#PWR021" H 11100 3100 30 0001 C CNN F 1 "GND" H 11100 3030 30 0001 C CNN F 2 "" H 11100 3100 60 0000 C CNN F 3 "" H 11100 3100 60 0000 C CNN 1 11100 3100 1 0 0 -1 $EndComp Text Notes 8150 2300 0 60 ~ 0 27mA Text Label 8000 2350 2 60 ~ 0 3V0 Text Notes 11550 2500 0 60 ~ 0 -10 dBm Text Label 2850 2200 0 60 ~ 0 3V3 Text Label 3500 2750 0 60 ~ 0 5V $Comp L 5400BL15B050E U8 U 1 1 54FBB9A1 P 13350 9300 F 0 "U8" H 13600 9550 60 0000 C CNN F 1 "5400BL15B050E" H 13400 10050 60 0000 C CNN F 2 "fmcw2:5400BL15B050E" H 13350 9300 60 0001 C CNN F 3 "" H 13350 9300 60 0000 C CNN 1 13350 9300 -1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR022 U 1 1 54FBC166 P 13350 9250 F 0 "#PWR022" H 13350 9250 30 0001 C CNN F 1 "GND" H 13350 9180 30 0001 C CNN F 2 "" H 13350 9250 60 0000 C CNN F 3 "" H 13350 9250 60 0000 C CNN 1 13350 9250 1 0 0 -1 $EndComp $Comp L 5400BL15B050E U4 U 1 1 54FBCF6C P 7250 8200 F 0 "U4" H 7500 8450 60 0000 C CNN F 1 "5400BL15B050E" H 7300 8950 60 0000 C CNN F 2 "fmcw2:5400BL15B050E" H 7250 8200 60 0001 C CNN F 3 "" H 7250 8200 60 0000 C CNN F 4 "5400BL15B050E" H 7250 8200 60 0001 C CNN "manf#" 1 7250 8200 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR023 U 1 1 54FBDD19 P 7250 8150 F 0 "#PWR023" H 7250 8150 30 0001 C CNN F 1 "GND" H 7250 8080 30 0001 C CNN F 2 "" H 7250 8150 60 0000 C CNN F 3 "" H 7250 8150 60 0000 C CNN 1 7250 8150 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C25 U 1 1 54FBF13F P 12550 8850 F 0 "C25" H 12550 8950 40 0000 L CNN F 1 "2p" H 12556 8765 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12588 8700 30 0001 C CNN F 3 "" H 12550 8850 60 0000 C CNN 1 12550 8850 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C24 U 1 1 54FBF1D8 P 12400 8700 F 0 "C24" H 12400 8800 40 0000 L CNN F 1 "2p" H 12406 8615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12438 8550 30 0001 C CNN F 3 "" H 12400 8700 60 0000 C CNN 1 12400 8700 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C12 U 1 1 54FBFC85 P 8300 7650 F 0 "C12" H 8300 7750 40 0000 L CNN F 1 "2p" H 8306 7565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8338 7500 30 0001 C CNN F 3 "" H 8300 7650 60 0000 C CNN 1 8300 7650 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C9 U 1 1 54FBFE64 P 8050 7750 F 0 "C9" H 8050 7850 40 0000 L CNN F 1 "2p" H 8056 7665 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8088 7600 30 0001 C CNN F 3 "" H 8050 7750 60 0000 C CNN 1 8050 7750 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C15 U 1 1 54FC08CD P 8600 8900 F 0 "C15" H 8600 9000 40 0000 L CNN F 1 "100p" H 8606 8815 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8638 8750 30 0001 C CNN F 3 "" H 8600 8900 60 0000 C CNN 1 8600 8900 -1 0 0 1 $EndComp Text Label 9400 8750 2 60 ~ 0 MIX_ENBL $Comp L MGA-25203 U14 U 1 1 5519A425 P 12350 2850 F 0 "U14" H 13000 2650 60 0000 C CNN F 1 "MGA-25203" H 12950 3550 60 0000 C CNN F 2 "fmcw2:MGA-25203" H 12350 2850 60 0001 C CNN F 3 "" H 12350 2850 60 0000 C CNN F 4 "MGA-25203-BLKG" H 12350 2850 60 0001 C CNN "manf#" 1 12350 2850 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR024 U 1 1 5519BF54 P 12550 3300 F 0 "#PWR024" H 12550 3300 30 0001 C CNN F 1 "GND" H 12550 3230 30 0001 C CNN F 2 "" H 12550 3300 60 0000 C CNN F 3 "" H 12550 3300 60 0000 C CNN 1 12550 3300 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C40 U 1 1 5519CCA0 P 12900 1550 F 0 "C40" H 12900 1650 40 0000 L CNN F 1 "100p" H 12906 1465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12938 1400 30 0001 C CNN F 3 "" H 12900 1550 60 0000 C CNN 1 12900 1550 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C39 U 1 1 5519CD31 P 12900 1300 F 0 "C39" H 12900 1400 40 0000 L CNN F 1 "2.2u" H 12906 1215 40 0000 L CNN F 2 "fmcw2:C_0603b" H 12938 1150 30 0001 C CNN F 3 "" H 12900 1300 60 0000 C CNN 1 12900 1300 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C38 U 1 1 5519CDB1 P 12900 1050 F 0 "C38" H 12900 1150 40 0000 L CNN F 1 "10u" H 12906 965 40 0000 L CNN F 2 "fmcw2:C_0805b" H 12938 900 30 0001 C CNN F 3 "" H 12900 1050 60 0000 C CNN 1 12900 1050 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR025 U 1 1 5519D203 P 13150 1550 F 0 "#PWR025" H 13150 1550 30 0001 C CNN F 1 "GND" H 13150 1480 30 0001 C CNN F 2 "" H 13150 1550 60 0000 C CNN F 3 "" H 13150 1550 60 0000 C CNN 1 13150 1550 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR026 U 1 1 5519D27D P 13150 1300 F 0 "#PWR026" H 13150 1300 30 0001 C CNN F 1 "GND" H 13150 1230 30 0001 C CNN F 2 "" H 13150 1300 60 0000 C CNN F 3 "" H 13150 1300 60 0000 C CNN 1 13150 1300 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR027 U 1 1 5519D2F0 P 13150 1050 F 0 "#PWR027" H 13150 1050 30 0001 C CNN F 1 "GND" H 13150 980 30 0001 C CNN F 2 "" H 13150 1050 60 0000 C CNN F 3 "" H 13150 1050 60 0000 C CNN 1 13150 1050 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR028 U 1 1 5519D363 P 13150 850 F 0 "#PWR028" H 13150 850 30 0001 C CNN F 1 "GND" H 13150 780 30 0001 C CNN F 2 "" H 13150 850 60 0000 C CNN F 3 "" H 13150 850 60 0000 C CNN 1 13150 850 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2 C37 U 1 1 5519CE33 P 12900 850 F 0 "C37" H 12900 950 40 0000 L CNN F 1 "DNP" H 12906 765 40 0000 L CNN F 2 "fmcw2:C_0603b" H 12938 700 30 0001 C CNN F 3 "" H 12900 850 60 0000 C CNN 1 12900 850 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C34 U 1 1 5519DDD7 P 11650 1400 F 0 "C34" H 11650 1500 40 0000 L CNN F 1 "100p" H 11656 1315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11688 1250 30 0001 C CNN F 3 "" H 11650 1400 60 0000 C CNN 1 11650 1400 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C33 U 1 1 5519DF17 P 11400 1400 F 0 "C33" H 11400 1500 40 0000 L CNN F 1 "100p" H 11406 1315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11438 1250 30 0001 C CNN F 3 "" H 11400 1400 60 0000 C CNN 1 11400 1400 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C32 U 1 1 5519DF9B P 11150 1400 F 0 "C32" H 11150 1500 40 0000 L CNN F 1 "100n" H 11156 1315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11188 1250 30 0001 C CNN F 3 "" H 11150 1400 60 0000 C CNN 1 11150 1400 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR029 U 1 1 5519E8B2 P 11650 1650 F 0 "#PWR029" H 11650 1650 30 0001 C CNN F 1 "GND" H 11650 1580 30 0001 C CNN F 2 "" H 11650 1650 60 0000 C CNN F 3 "" H 11650 1650 60 0000 C CNN 1 11650 1650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR030 U 1 1 5519E92B P 11400 1650 F 0 "#PWR030" H 11400 1650 30 0001 C CNN F 1 "GND" H 11400 1580 30 0001 C CNN F 2 "" H 11400 1650 60 0000 C CNN F 3 "" H 11400 1650 60 0000 C CNN 1 11400 1650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR031 U 1 1 5519E9A4 P 11150 1650 F 0 "#PWR031" H 11150 1650 30 0001 C CNN F 1 "GND" H 11150 1580 30 0001 C CNN F 2 "" H 11150 1650 60 0000 C CNN F 3 "" H 11150 1650 60 0000 C CNN 1 11150 1650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C41 U 1 1 5519EE3F P 12900 1750 F 0 "C41" H 12900 1850 40 0000 L CNN F 1 "100p" H 12906 1665 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12938 1600 30 0001 C CNN F 3 "" H 12900 1750 60 0000 C CNN 1 12900 1750 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR032 U 1 1 5519F10E P 13150 1750 F 0 "#PWR032" H 13150 1750 30 0001 C CNN F 1 "GND" H 13150 1680 30 0001 C CNN F 2 "" H 13150 1750 60 0000 C CNN F 3 "" H 13150 1750 60 0000 C CNN 1 13150 1750 0 -1 -1 0 $EndComp $Comp L R-RESCUE-fmcw2 R10 U 1 1 5519F3AC P 10300 1100 F 0 "R10" V 10380 1100 40 0000 C CNN F 1 "6.98k" V 10307 1101 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10230 1100 30 0001 C CNN F 3 "" H 10300 1100 30 0000 C CNN 1 10300 1100 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R14 U 1 1 5519F7F5 P 10900 1450 F 0 "R14" V 10980 1450 40 0000 C CNN F 1 "39k" V 10907 1451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10830 1450 30 0001 C CNN F 3 "" H 10900 1450 30 0000 C CNN 1 10900 1450 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR033 U 1 1 5519F939 P 10900 1750 F 0 "#PWR033" H 10900 1750 30 0001 C CNN F 1 "GND" H 10900 1680 30 0001 C CNN F 2 "" H 10900 1750 60 0000 C CNN F 3 "" H 10900 1750 60 0000 C CNN 1 10900 1750 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C36 U 1 1 551A0060 P 11950 1650 F 0 "C36" H 11950 1750 40 0000 L CNN F 1 "100p" H 11956 1565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11988 1500 30 0001 C CNN F 3 "" H 11950 1650 60 0000 C CNN 1 11950 1650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR034 U 1 1 551A0104 P 11950 1900 F 0 "#PWR034" H 11950 1900 30 0001 C CNN F 1 "GND" H 11950 1830 30 0001 C CNN F 2 "" H 11950 1900 60 0000 C CNN F 3 "" H 11950 1900 60 0000 C CNN 1 11950 1900 1 0 0 -1 $EndComp Text Label 12150 1450 2 60 ~ 0 BSW Text Label 11700 650 2 60 ~ 0 3V3 Text Label 10000 1100 2 60 ~ 0 3V3 Text Notes 13150 2000 0 60 ~ 0 Gain: 29 dB - 32 dB Text Notes 13100 2450 0 60 ~ 0 19 - 22 dBm $Comp L TLV271 U7 U 1 1 551C18D2 P 7150 3450 F 0 "U7" H 7300 3600 60 0000 C CNN F 1 "TLV271" H 7350 3250 60 0000 C CNN F 2 "fmcw2:SOT-23-5" H 7150 3450 60 0001 C CNN F 3 "" H 7150 3450 60 0000 C CNN 1 7150 3450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR035 U 1 1 551C19E3 P 7050 3900 F 0 "#PWR035" H 7050 3900 30 0001 C CNN F 1 "GND" H 7050 3830 30 0001 C CNN F 2 "" H 7050 3900 60 0000 C CNN F 3 "" H 7050 3900 60 0000 C CNN 1 7050 3900 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C21 U 1 1 551C1B93 P 6850 2750 F 0 "C21" H 6850 2850 40 0000 L CNN F 1 "100n" H 6856 2665 40 0000 L CNN F 2 "fmcw2:C_0402b" H 6888 2600 30 0001 C CNN F 3 "" H 6850 2750 60 0000 C CNN 1 6850 2750 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR036 U 1 1 551C1BF2 P 6850 3000 F 0 "#PWR036" H 6850 3000 30 0001 C CNN F 1 "GND" H 6850 2930 30 0001 C CNN F 2 "" H 6850 3000 60 0000 C CNN F 3 "" H 6850 3000 60 0000 C CNN 1 6850 3000 1 0 0 -1 $EndComp Text Label 6900 2550 0 60 ~ 0 10V Text Notes 10550 3850 0 60 ~ 0 -4 dBm $Comp L R-RESCUE-fmcw2 R7 U 1 1 551C3AF7 P 7950 3450 F 0 "R7" V 8030 3450 40 0000 C CNN F 1 "4.7k" V 7957 3451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 7880 3450 30 0001 C CNN F 3 "" H 7950 3450 30 0000 C CNN 1 7950 3450 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C29 U 1 1 551C3BFE P 8300 3700 F 0 "C29" H 8300 3800 40 0000 L CNN F 1 "18p" H 8306 3615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8338 3550 30 0001 C CNN F 3 "" H 8300 3700 60 0000 C CNN 1 8300 3700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR037 U 1 1 551C4298 P 8300 3950 F 0 "#PWR037" H 8300 3950 30 0001 C CNN F 1 "GND" H 8300 3880 30 0001 C CNN F 2 "" H 8300 3950 60 0000 C CNN F 3 "" H 8300 3950 60 0000 C CNN 1 8300 3950 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R6 U 1 1 551C477A P 7100 4100 F 0 "R6" V 7180 4100 40 0000 C CNN F 1 "4.7k" V 7107 4101 40 0000 C CNN F 2 "fmcw2:R_0402b" V 7030 4100 30 0001 C CNN F 3 "" H 7100 4100 30 0000 C CNN 1 7100 4100 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R5 U 1 1 551C4A31 P 6650 4400 F 0 "R5" V 6730 4400 40 0000 C CNN F 1 "4.7k" V 6657 4401 40 0000 C CNN F 2 "fmcw2:R_0402b" V 6580 4400 30 0001 C CNN F 3 "" H 6650 4400 30 0000 C CNN 1 6650 4400 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR038 U 1 1 551C4D15 P 6650 4700 F 0 "#PWR038" H 6650 4700 30 0001 C CNN F 1 "GND" H 6650 4630 30 0001 C CNN F 2 "" H 6650 4700 60 0000 C CNN F 3 "" H 6650 4700 60 0000 C CNN 1 6650 4700 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C14 U 1 1 551C586A P 5800 3700 F 0 "C14" H 5800 3800 40 0000 L CNN F 1 "100p" H 5806 3615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 5838 3550 30 0001 C CNN F 3 "" H 5800 3700 60 0000 C CNN 1 5800 3700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR039 U 1 1 551C667D P 5800 3950 F 0 "#PWR039" H 5800 3950 30 0001 C CNN F 1 "GND" H 5800 3880 30 0001 C CNN F 2 "" H 5800 3950 60 0000 C CNN F 3 "" H 5800 3950 60 0000 C CNN 1 5800 3950 1 0 0 -1 $EndComp Text Label 2150 3500 2 60 ~ 0 ADF_MUXOUT Text Notes 4600 2950 0 60 ~ 0 110 kHz BW, 60 deg phase margin $Comp L SG-210STF U2 U 1 1 551CC14C P 1650 1350 F 0 "U2" H 1950 1100 60 0000 C CNN F 1 "SG-210STF 30MHz" H 1800 1650 60 0000 C CNN F 2 "fmcw2:SG-210STF" H 1550 1450 60 0001 C CNN F 3 "" H 1550 1450 60 0000 C CNN F 4 "SG-210STF 30.0000ML" H 1650 1350 60 0001 C CNN "manf#" 1 1650 1350 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR040 U 1 1 551CC8B9 P 1300 1550 F 0 "#PWR040" H 1300 1550 30 0001 C CNN F 1 "GND" H 1300 1480 30 0001 C CNN F 2 "" H 1300 1550 60 0000 C CNN F 3 "" H 1300 1550 60 0000 C CNN 1 1300 1550 1 0 0 -1 $EndComp Text Label 2700 1350 0 60 ~ 0 OSC_REF $Comp L C-RESCUE-fmcw2 C1 U 1 1 551CD660 P 1100 1550 F 0 "C1" H 1100 1650 40 0000 L CNN F 1 "100n" H 1106 1465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 1138 1400 30 0001 C CNN F 3 "" H 1100 1550 60 0000 C CNN 1 1100 1550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR041 U 1 1 551CD7D6 P 1100 1800 F 0 "#PWR041" H 1100 1800 30 0001 C CNN F 1 "GND" H 1100 1730 30 0001 C CNN F 2 "" H 1100 1800 60 0000 C CNN F 3 "" H 1100 1800 60 0000 C CNN 1 1100 1800 1 0 0 -1 $EndComp Text Notes 800 1350 0 60 ~ 0 2mA Text Label 1100 1350 0 60 ~ 0 3V3 Text Label 2150 3300 2 60 ~ 0 OSC_REF Text Label 13050 5100 0 60 ~ 0 LO $Comp L PAT1220 U3 U 1 1 551D3333 P 13750 3400 F 0 "U3" H 13950 3100 60 0000 C CNN F 1 "PAT1220-6dB" H 13800 3500 60 0000 C CNN F 2 "fmcw2:PAT1220" H 13750 3400 60 0001 C CNN F 3 "" H 13750 3400 60 0000 C CNN 1 13750 3400 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR042 U 1 1 551D3CB2 P 14300 3400 F 0 "#PWR042" H 14300 3400 30 0001 C CNN F 1 "GND" H 14300 3330 30 0001 C CNN F 2 "" H 14300 3400 60 0000 C CNN F 3 "" H 14300 3400 60 0000 C CNN 1 14300 3400 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2 C11 U 1 1 54FAE276 P 5100 4900 F 0 "C11" H 5100 5000 40 0000 L CNN F 1 "2p" H 5106 4815 40 0000 L CNN F 2 "fmcw2:C_0402b" H 5138 4750 30 0001 C CNN F 3 "" H 5100 4900 60 0000 C CNN 1 5100 4900 0 1 1 0 $EndComp Text Notes 6750 7200 0 60 ~ 0 LO: -6 dBm to +6 dBm\nMax 15 dBm $Comp L BRANCHLINE Z1 U 1 1 551D7C09 P 14100 2700 F 0 "Z1" H 14200 2500 60 0000 C CNN F 1 "15dB COUPLER" H 14150 3000 60 0000 C CNN F 2 "fmcw2:coupler" H 14150 2550 60 0001 C CNN F 3 "" H 14150 2550 60 0000 C CNN 1 14100 2700 1 0 0 -1 $EndComp $Comp L MCP1700 U9 U 1 1 551EE0A5 P 7100 1450 F 0 "U9" H 7350 1300 60 0000 C CNN F 1 "MCP1700" H 7150 1850 60 0000 C CNN F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23" H 7350 1100 60 0001 C CNN F 3 "" H 7100 1450 60 0000 C CNN F 4 "MCP1700T-3002E/TT" H 7100 1450 60 0001 C CNN "manf#" 1 7100 1450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR043 U 1 1 551EE374 P 7100 1900 F 0 "#PWR043" H 7100 1900 30 0001 C CNN F 1 "GND" H 7100 1830 30 0001 C CNN F 2 "" H 7100 1900 60 0000 C CNN F 3 "" H 7100 1900 60 0000 C CNN 1 7100 1900 1 0 0 -1 $EndComp Text Label 6450 1200 2 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2 C27 U 1 1 551EE94F P 6450 1450 F 0 "C27" H 6450 1550 40 0000 L CNN F 1 "2.2u" H 6456 1365 40 0000 L CNN F 2 "fmcw2:C_0603b" H 6488 1300 30 0001 C CNN F 3 "" H 6450 1450 60 0000 C CNN 1 6450 1450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR044 U 1 1 551EEB03 P 6450 1700 F 0 "#PWR044" H 6450 1700 30 0001 C CNN F 1 "GND" H 6450 1630 30 0001 C CNN F 2 "" H 6450 1700 60 0000 C CNN F 3 "" H 6450 1700 60 0000 C CNN 1 6450 1700 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C30 U 1 1 551EEE4B P 7850 1450 F 0 "C30" H 7850 1550 40 0000 L CNN F 1 "2.2u" H 7856 1365 40 0000 L CNN F 2 "fmcw2:C_0603b" H 7888 1300 30 0001 C CNN F 3 "" H 7850 1450 60 0000 C CNN 1 7850 1450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR045 U 1 1 551EF23C P 7850 1700 F 0 "#PWR045" H 7850 1700 30 0001 C CNN F 1 "GND" H 7850 1630 30 0001 C CNN F 2 "" H 7850 1700 60 0000 C CNN F 3 "" H 7850 1700 60 0000 C CNN 1 7850 1700 1 0 0 -1 $EndComp Text Label 7900 1200 0 60 ~ 0 3V0 Text Notes 2750 2000 0 60 ~ 0 35 mA Text Notes 11800 600 0 60 ~ 0 450 mA Text Notes 14250 5900 0 60 ~ 0 10mA Text Notes 7700 1050 0 60 ~ 0 37 mA Text Notes 6900 7400 0 60 ~ 0 -1dB $Comp L R-RESCUE-fmcw2 R15 U 1 1 551F70C0 P 12050 650 F 0 "R15" V 12130 650 40 0000 C CNN F 1 "0" V 12057 651 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11980 650 30 0001 C CNN F 3 "" H 12050 650 30 0000 C CNN 1 12050 650 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R16 U 1 1 551F721E P 12050 850 F 0 "R16" V 12130 850 40 0000 C CNN F 1 "DNP" V 12057 851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11980 850 30 0001 C CNN F 3 "" H 12050 850 30 0000 C CNN 1 12050 850 0 1 1 0 $EndComp Text Label 11700 850 2 60 ~ 0 5V Text Label 1450 6400 2 60 ~ 0 PA_OFF $Comp L R-RESCUE-fmcw2 R18 U 1 1 551F0348 P 9350 1050 F 0 "R18" V 9430 1050 40 0000 C CNN F 1 "8.25k" V 9357 1051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9280 1050 30 0001 C CNN F 3 "" H 9350 1050 30 0000 C CNN 1 9350 1050 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R19 U 1 1 551F047B P 9350 1600 F 0 "R19" V 9430 1600 40 0000 C CNN F 1 "10k" V 9357 1601 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9280 1600 30 0001 C CNN F 3 "" H 9350 1600 30 0000 C CNN 1 9350 1600 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR046 U 1 1 551F04F4 P 9350 1900 F 0 "#PWR046" H 9350 1900 30 0001 C CNN F 1 "GND" H 9350 1830 30 0001 C CNN F 2 "" H 9350 1900 60 0000 C CNN F 3 "" H 9350 1900 60 0000 C CNN 1 9350 1900 1 0 0 -1 $EndComp Text Label 9350 750 0 60 ~ 0 3V3 Text Label 9500 1350 0 60 ~ 0 BSW Text Label 8700 1600 2 60 ~ 0 PA_OFF Text Notes 9100 1300 0 60 ~ 0 1.8V Text Label 1450 6300 2 60 ~ 0 MIX_ENBL Text Label 1450 7000 2 60 ~ 0 ADF_MUXOUT Text Label 1450 6700 2 60 ~ 0 ADF_TXDATA Text Label 1450 6900 2 60 ~ 0 ADF_CLK Text Label 1450 6800 2 60 ~ 0 ADF_DATA Text Label 1450 6600 2 60 ~ 0 ADF_LE Text Label 2350 5800 0 60 ~ 0 IFF+ Text Label 2350 5900 0 60 ~ 0 IFF- Text Label 2350 6900 0 60 ~ 0 5V $Comp L GND-RESCUE-fmcw2 #PWR047 U 1 1 551F7080 P 2350 7000 F 0 "#PWR047" H 2350 7000 30 0001 C CNN F 1 "GND" H 2350 6930 30 0001 C CNN F 2 "" H 2350 7000 60 0000 C CNN F 3 "" H 2350 7000 60 0000 C CNN 1 2350 7000 0 -1 -1 0 $EndComp Text Label 1450 6500 2 60 ~ 0 ADF_CE $Comp L R-RESCUE-fmcw2 R17 U 1 1 552295DA P 14450 3100 F 0 "R17" V 14530 3100 40 0000 C CNN F 1 "49.9" V 14457 3101 40 0000 C CNN F 2 "fmcw2:R_0402b" V 14380 3100 30 0001 C CNN F 3 "" H 14450 3100 30 0000 C CNN 1 14450 3100 -1 0 0 1 $EndComp $Comp L C-RESCUE-fmcw2 C42 U 1 1 5522DA50 P 2400 1350 F 0 "C42" H 2400 1450 40 0000 L CNN F 1 "470p" H 2406 1265 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2438 1200 30 0001 C CNN F 3 "" H 2400 1350 60 0000 C CNN 1 2400 1350 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR048 U 1 1 55297DBB P 14450 3400 F 0 "#PWR048" H 14450 3400 30 0001 C CNN F 1 "GND" H 14450 3330 30 0001 C CNN F 2 "" H 14450 3400 60 0000 C CNN F 3 "" H 14450 3400 60 0000 C CNN 1 14450 3400 1 0 0 -1 $EndComp $Comp L BEND F5 U 1 1 552A504F P 13750 4150 F 0 "F5" H 13750 4050 60 0000 C CNN F 1 "BEND" H 13900 4300 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_45" H 13750 4150 60 0001 C CNN F 3 "" H 13750 4150 60 0000 C CNN 1 13750 4150 0 -1 -1 0 $EndComp $Comp L BEND F3 U 1 1 552A521C P 13300 4150 F 0 "F3" H 13300 4050 60 0000 C CNN F 1 "BEND" H 13450 4300 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_45" H 13300 4150 60 0001 C CNN F 3 "" H 13300 4150 60 0000 C CNN 1 13300 4150 1 0 0 1 $EndComp $Comp L BEND F4 U 1 1 552A5548 P 13050 4800 F 0 "F4" H 13050 4700 60 0000 C CNN F 1 "BEND" H 13200 4950 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_45" H 13050 4800 60 0001 C CNN F 3 "" H 13050 4800 60 0000 C CNN 1 13050 4800 0 -1 -1 0 $EndComp $Comp L BEND F1 U 1 1 552A5618 P 12550 4800 F 0 "F1" H 12550 4700 60 0000 C CNN F 1 "BEND" H 12700 4950 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_90" H 12550 4800 60 0001 C CNN F 3 "" H 12550 4800 60 0000 C CNN 1 12550 4800 0 1 1 0 $EndComp $Comp L BEND F2 U 1 1 552A56E8 P 12550 5300 F 0 "F2" H 12550 5200 60 0000 C CNN F 1 "BEND" H 12700 5450 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_90" H 12550 5300 60 0001 C CNN F 3 "" H 12550 5300 60 0000 C CNN 1 12550 5300 1 0 0 -1 $EndComp Text Label 6750 7700 2 60 ~ 0 LO $Comp L BEND F6 U 1 1 552A64D7 P 13050 4350 F 0 "F6" H 13050 4250 60 0000 C CNN F 1 "BEND" H 13200 4500 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_45" H 13050 4350 60 0001 C CNN F 3 "" H 13050 4350 60 0000 C CNN 1 13050 4350 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C43 U 1 1 552AB842 P 3300 2050 F 0 "C43" H 3300 2150 40 0000 L CNN F 1 "100n" H 3306 1965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3338 1900 30 0001 C CNN F 3 "" H 3300 2050 60 0000 C CNN 1 3300 2050 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR049 U 1 1 552ABC28 P 3550 2300 F 0 "#PWR049" H 3550 2300 30 0001 C CNN F 1 "GND" H 3550 2230 30 0001 C CNN F 2 "" H 3550 2300 60 0000 C CNN F 3 "" H 3550 2300 60 0000 C CNN 1 3550 2300 0 -1 -1 0 $EndComp $Comp L BEND F7 U 1 1 552FF9E8 P 13000 5300 F 0 "F7" H 13000 5200 60 0000 C CNN F 1 "BEND" H 13150 5450 60 0000 C CNN F 2 "fmcw2:uwmiter_0.34_0.17_90" H 13000 5300 60 0001 C CNN F 3 "" H 13000 5300 60 0000 C CNN 1 13000 5300 0 -1 -1 0 $EndComp $Comp L MOS_N_GSD Q1 U 1 1 55324B1D P 9000 1600 F 0 "Q1" H 9010 1770 60 0000 R CNN F 1 "SSM3K15AFS" H 9010 1450 60 0000 R CNN F 2 "fmcw2:SOT-416" H 9000 1600 60 0001 C CNN F 3 "" H 9000 1600 60 0000 C CNN 1 9000 1600 1 0 0 -1 $EndComp Text Label 2350 6200 0 60 ~ 0 10V NoConn ~ 4150 3300 $Comp L PWR_FLAG #FLG050 U 1 1 553CB68B P 1100 5100 F 0 "#FLG050" H 1100 5195 30 0001 C CNN F 1 "PWR_FLAG" H 1100 5280 30 0000 C CNN F 2 "" H 1100 5100 60 0000 C CNN F 3 "" H 1100 5100 60 0000 C CNN 1 1100 5100 1 0 0 -1 $EndComp $Comp L PWR_FLAG #FLG051 U 1 1 553CBC0D P 1350 5100 F 0 "#FLG051" H 1350 5195 30 0001 C CNN F 1 "PWR_FLAG" H 1350 5280 30 0000 C CNN F 2 "" H 1350 5100 60 0000 C CNN F 3 "" H 1350 5100 60 0000 C CNN 1 1350 5100 1 0 0 -1 $EndComp $Comp L PWR_FLAG #FLG052 U 1 1 553CBCC6 P 1550 5100 F 0 "#FLG052" H 1550 5195 30 0001 C CNN F 1 "PWR_FLAG" H 1550 5280 30 0000 C CNN F 2 "" H 1550 5100 60 0000 C CNN F 3 "" H 1550 5100 60 0000 C CNN 1 1550 5100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR053 U 1 1 553CBD2A P 1100 5150 F 0 "#PWR053" H 1100 5150 30 0001 C CNN F 1 "GND" H 1100 5080 30 0001 C CNN F 2 "" H 1100 5150 60 0000 C CNN F 3 "" H 1100 5150 60 0000 C CNN 1 1100 5150 1 0 0 -1 $EndComp Text Label 1350 5200 2 60 ~ 0 5V Text Label 1550 5200 2 60 ~ 0 10V Text Notes 12600 6150 0 60 ~ 0 Gain: 13 dB\nNF: 1.0 dB\nIIP3: 7 dBm Text Notes 7800 6350 0 60 ~ 0 Gain: -5dB\nNF: 16dB $Comp L ADL5801 U6 U 1 1 556BF1C9 P 9050 8100 F 0 "U6" H 9850 7900 60 0000 C CNN F 1 "ADL5801" H 10000 9100 60 0000 C CNN F 2 "fmcw2:VFQFN-24" H 9050 8150 60 0001 C CNN F 3 "" H 9050 8150 60 0000 C CNN F 4 "ADL5801ACPZ-R7" H 9050 8100 60 0001 C CNN "manf#" 1 9050 8100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR054 U 1 1 556C132D P 8650 7450 F 0 "#PWR054" H 8650 7450 30 0001 C CNN F 1 "GND" H 8650 7380 30 0001 C CNN F 2 "" H 8650 7450 60 0000 C CNN F 3 "" H 8650 7450 60 0000 C CNN 1 8650 7450 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR055 U 1 1 556C1568 P 8650 7550 F 0 "#PWR055" H 8650 7550 30 0001 C CNN F 1 "GND" H 8650 7480 30 0001 C CNN F 2 "" H 8650 7550 60 0000 C CNN F 3 "" H 8650 7550 60 0000 C CNN 1 8650 7550 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR056 U 1 1 556C179D P 8650 7850 F 0 "#PWR056" H 8650 7850 30 0001 C CNN F 1 "GND" H 8650 7780 30 0001 C CNN F 2 "" H 8650 7850 60 0000 C CNN F 3 "" H 8650 7850 60 0000 C CNN 1 8650 7850 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR057 U 1 1 556C1B4E P 8650 7950 F 0 "#PWR057" H 8650 7950 30 0001 C CNN F 1 "GND" H 8650 7880 30 0001 C CNN F 2 "" H 8650 7950 60 0000 C CNN F 3 "" H 8650 7950 60 0000 C CNN 1 8650 7950 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR058 U 1 1 556C1CC7 P 9300 8500 F 0 "#PWR058" H 9300 8500 30 0001 C CNN F 1 "GND" H 9300 8430 30 0001 C CNN F 2 "" H 9300 8500 60 0000 C CNN F 3 "" H 9300 8500 60 0000 C CNN 1 9300 8500 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR059 U 1 1 556C2063 P 9700 8500 F 0 "#PWR059" H 9700 8500 30 0001 C CNN F 1 "GND" H 9700 8430 30 0001 C CNN F 2 "" H 9700 8500 60 0000 C CNN F 3 "" H 9700 8500 60 0000 C CNN 1 9700 8500 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR060 U 1 1 556C229C P 10200 7850 F 0 "#PWR060" H 10200 7850 30 0001 C CNN F 1 "GND" H 10200 7780 30 0001 C CNN F 2 "" H 10200 7850 60 0000 C CNN F 3 "" H 10200 7850 60 0000 C CNN 1 10200 7850 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR061 U 1 1 556C2693 P 10200 7550 F 0 "#PWR061" H 10200 7550 30 0001 C CNN F 1 "GND" H 10200 7480 30 0001 C CNN F 2 "" H 10200 7550 60 0000 C CNN F 3 "" H 10200 7550 60 0000 C CNN 1 10200 7550 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR062 U 1 1 556C2A32 P 9700 6900 F 0 "#PWR062" H 9700 6900 30 0001 C CNN F 1 "GND" H 9700 6830 30 0001 C CNN F 2 "" H 9700 6900 60 0000 C CNN F 3 "" H 9700 6900 60 0000 C CNN 1 9700 6900 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR063 U 1 1 556C2DAF P 9300 6900 F 0 "#PWR063" H 9300 6900 30 0001 C CNN F 1 "GND" H 9300 6830 30 0001 C CNN F 2 "" H 9300 6900 60 0000 C CNN F 3 "" H 9300 6900 60 0000 C CNN 1 9300 6900 -1 0 0 1 $EndComp Text Label 9450 5350 1 60 ~ 0 IF- Text Label 9650 5350 1 60 ~ 0 IF+ Text Label 10200 7650 0 60 ~ 0 RFIP Text Label 10200 7750 0 60 ~ 0 RFIN Text Label 12100 8850 2 60 ~ 0 RFIP Text Label 12100 8700 2 60 ~ 0 RFIN $Comp L R-RESCUE-fmcw2 R3 U 1 1 556C5B94 P 9150 5850 F 0 "R3" V 9230 5850 40 0000 C CNN F 1 "49.9" V 9157 5851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9080 5850 30 0001 C CNN F 3 "" H 9150 5850 30 0000 C CNN 1 9150 5850 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R20 U 1 1 556C6671 P 9950 5850 F 0 "R20" V 10030 5850 40 0000 C CNN F 1 "49.9" V 9957 5851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9880 5850 30 0001 C CNN F 3 "" H 9950 5850 30 0000 C CNN 1 9950 5850 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C50 U 1 1 556C7C47 P 10300 6100 F 0 "C50" H 10300 6200 40 0000 L CNN F 1 "100n" H 10306 6015 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10338 5950 30 0001 C CNN F 3 "" H 10300 6100 60 0000 C CNN 1 10300 6100 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C19 U 1 1 556C7D66 P 8800 6100 F 0 "C19" H 8800 6200 40 0000 L CNN F 1 "100n" H 8806 6015 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8838 5950 30 0001 C CNN F 3 "" H 8800 6100 60 0000 C CNN 1 8800 6100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR064 U 1 1 556C8093 P 8800 6350 F 0 "#PWR064" H 8800 6350 30 0001 C CNN F 1 "GND" H 8800 6280 30 0001 C CNN F 2 "" H 8800 6350 60 0000 C CNN F 3 "" H 8800 6350 60 0000 C CNN 1 8800 6350 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR065 U 1 1 556C845B P 10300 6350 F 0 "#PWR065" H 10300 6350 30 0001 C CNN F 1 "GND" H 10300 6280 30 0001 C CNN F 2 "" H 10300 6350 60 0000 C CNN F 3 "" H 10300 6350 60 0000 C CNN 1 10300 6350 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C51 U 1 1 556CA852 P 10850 7700 F 0 "C51" H 10850 7800 40 0000 L CNN F 1 "100n" H 10856 7615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10888 7550 30 0001 C CNN F 3 "" H 10850 7700 60 0000 C CNN 1 10850 7700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR066 U 1 1 556CAC5B P 10850 7950 F 0 "#PWR066" H 10850 7950 30 0001 C CNN F 1 "GND" H 10850 7880 30 0001 C CNN F 2 "" H 10850 7950 60 0000 C CNN F 3 "" H 10850 7950 60 0000 C CNN 1 10850 7950 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C49 U 1 1 556CB19B P 10200 8200 F 0 "C49" H 10200 8300 40 0000 L CNN F 1 "100n" H 10206 8115 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10238 8050 30 0001 C CNN F 3 "" H 10200 8200 60 0000 C CNN 1 10200 8200 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR067 U 1 1 556CB615 P 10200 8450 F 0 "#PWR067" H 10200 8450 30 0001 C CNN F 1 "GND" H 10200 8380 30 0001 C CNN F 2 "" H 10200 8450 60 0000 C CNN F 3 "" H 10200 8450 60 0000 C CNN 1 10200 8450 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C18 U 1 1 556CC5EB P 8750 6850 F 0 "C18" H 8750 6950 40 0000 L CNN F 1 "100p" H 8756 6765 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8788 6700 30 0001 C CNN F 3 "" H 8750 6850 60 0000 C CNN 1 8750 6850 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C17 U 1 1 556CC82A P 8550 6850 F 0 "C17" H 8550 6950 40 0000 L CNN F 1 "100n" H 8556 6765 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8588 6700 30 0001 C CNN F 3 "" H 8550 6850 60 0000 C CNN 1 8550 6850 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR068 U 1 1 556CC8A5 P 8750 7100 F 0 "#PWR068" H 8750 7100 30 0001 C CNN F 1 "GND" H 8750 7030 30 0001 C CNN F 2 "" H 8750 7100 60 0000 C CNN F 3 "" H 8750 7100 60 0000 C CNN 1 8750 7100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR069 U 1 1 556CCB5D P 8550 7100 F 0 "#PWR069" H 8550 7100 30 0001 C CNN F 1 "GND" H 8550 7030 30 0001 C CNN F 2 "" H 8550 7100 60 0000 C CNN F 3 "" H 8550 7100 60 0000 C CNN 1 8550 7100 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C44 U 1 1 556CE2A3 P 9400 9400 F 0 "C44" H 9400 9500 40 0000 L CNN F 1 "100p" H 9406 9315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9438 9250 30 0001 C CNN F 3 "" H 9400 9400 60 0000 C CNN 1 9400 9400 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C20 U 1 1 556CE3F6 P 9200 9400 F 0 "C20" H 9200 9500 40 0000 L CNN F 1 "100n" H 9206 9315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9238 9250 30 0001 C CNN F 3 "" H 9200 9400 60 0000 C CNN 1 9200 9400 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR070 U 1 1 556CE473 P 9200 9650 F 0 "#PWR070" H 9200 9650 30 0001 C CNN F 1 "GND" H 9200 9580 30 0001 C CNN F 2 "" H 9200 9650 60 0000 C CNN F 3 "" H 9200 9650 60 0000 C CNN 1 9200 9650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR071 U 1 1 556CE6FF P 9400 9650 F 0 "#PWR071" H 9400 9650 30 0001 C CNN F 1 "GND" H 9400 9580 30 0001 C CNN F 2 "" H 9400 9650 60 0000 C CNN F 3 "" H 9400 9650 60 0000 C CNN 1 9400 9650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C48 U 1 1 556CEF2B P 10000 8800 F 0 "C48" H 10000 8900 40 0000 L CNN F 1 "100p" H 10006 8715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10038 8650 30 0001 C CNN F 3 "" H 10000 8800 60 0000 C CNN 1 10000 8800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C47 U 1 1 556CEF31 P 9800 8800 F 0 "C47" H 9800 8900 40 0000 L CNN F 1 "100n" H 9806 8715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9838 8650 30 0001 C CNN F 3 "" H 9800 8800 60 0000 C CNN 1 9800 8800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR072 U 1 1 556CEF37 P 9800 9050 F 0 "#PWR072" H 9800 9050 30 0001 C CNN F 1 "GND" H 9800 8980 30 0001 C CNN F 2 "" H 9800 9050 60 0000 C CNN F 3 "" H 9800 9050 60 0000 C CNN 1 9800 9050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR073 U 1 1 556CEF3E P 10000 9050 F 0 "#PWR073" H 10000 9050 30 0001 C CNN F 1 "GND" H 10000 8980 30 0001 C CNN F 2 "" H 10000 9050 60 0000 C CNN F 3 "" H 10000 9050 60 0000 C CNN 1 10000 9050 1 0 0 -1 $EndComp Text Label 10900 7450 0 60 ~ 0 5V Text Label 10250 7950 0 60 ~ 0 5V Text Label 8500 6600 2 60 ~ 0 5V $Comp L R-RESCUE-fmcw2 R21 U 1 1 556D0F9D P 10500 8950 F 0 "R21" V 10580 8950 40 0000 C CNN F 1 "1k" V 10507 8951 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10430 8950 30 0001 C CNN F 3 "" H 10500 8950 30 0000 C CNN 1 10500 8950 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R22 U 1 1 556D10BE P 10500 9550 F 0 "R22" V 10580 9550 40 0000 C CNN F 1 "DNP" V 10507 9551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10430 9550 30 0001 C CNN F 3 "" H 10500 9550 30 0000 C CNN 1 10500 9550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR074 U 1 1 556D13C9 P 10500 9850 F 0 "#PWR074" H 10500 9850 30 0001 C CNN F 1 "GND" H 10500 9780 30 0001 C CNN F 2 "" H 10500 9850 60 0000 C CNN F 3 "" H 10500 9850 60 0000 C CNN 1 10500 9850 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R13 U 1 1 556D26D0 P 9600 8900 F 0 "R13" V 9680 8900 40 0000 C CNN F 1 "DNP" V 9607 8901 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9530 8900 30 0001 C CNN F 3 "" H 9600 8900 30 0000 C CNN 1 9600 8900 -1 0 0 1 $EndComp $Comp L C-RESCUE-fmcw2 C16 U 1 1 556D4DE9 P 8350 8900 F 0 "C16" H 8350 9000 40 0000 L CNN F 1 "100n" H 8356 8815 40 0000 L CNN F 2 "fmcw2:C_0402b" H 8388 8750 30 0001 C CNN F 3 "" H 8350 8900 60 0000 C CNN 1 8350 8900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR075 U 1 1 556D4EAA P 8350 9150 F 0 "#PWR075" H 8350 9150 30 0001 C CNN F 1 "GND" H 8350 9080 30 0001 C CNN F 2 "" H 8350 9150 60 0000 C CNN F 3 "" H 8350 9150 60 0000 C CNN 1 8350 9150 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR076 U 1 1 556D4F92 P 8600 9150 F 0 "#PWR076" H 8600 9150 30 0001 C CNN F 1 "GND" H 8600 9080 30 0001 C CNN F 2 "" H 8600 9150 60 0000 C CNN F 3 "" H 8600 9150 60 0000 C CNN 1 8600 9150 1 0 0 -1 $EndComp Text Label 8300 8600 2 60 ~ 0 5V Text Notes 8000 6700 0 60 ~ 0 200mA Text Notes 6900 7850 2 60 ~ 0 LO power: -10 dBm to +10dBm $Comp L HMC313 U16 U 1 1 5572F186 P 12700 8450 F 0 "U16" H 13050 8750 60 0000 C CNN F 1 "HMC313" H 12950 9250 60 0000 C CNN F 2 "fmcw2:SOT-23-6" H 12800 8450 60 0001 C CNN F 3 "" H 12800 8450 60 0000 C CNN F 4 "HMC313ETR" H 12700 8450 60 0001 C CNN "manf#" 1 12700 8450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR077 U 1 1 5572FE5F P 12650 8400 F 0 "#PWR077" H 12650 8400 30 0001 C CNN F 1 "GND" H 12650 8330 30 0001 C CNN F 2 "" H 12650 8400 60 0000 C CNN F 3 "" H 12650 8400 60 0000 C CNN 1 12650 8400 1 0 0 -1 $EndComp $Comp L INDUCTOR_SMALL L3 U 1 1 557309E0 P 13750 7550 F 0 "L3" H 13750 7650 50 0000 C CNN F 1 "LQW15AN9N9J80D" H 13750 7500 50 0000 C CNN F 2 "Capacitors_SMD:C_0402" H 13750 7550 60 0001 C CNN F 3 "" H 13750 7550 60 0000 C CNN 1 13750 7550 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C52 U 1 1 55730E18 P 11950 7800 F 0 "C52" H 11950 7900 40 0000 L CNN F 1 "2p" H 11956 7715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11988 7650 30 0001 C CNN F 3 "" H 11950 7800 60 0000 C CNN 1 11950 7800 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C54 U 1 1 55731440 P 14450 7800 F 0 "C54" H 14450 7900 40 0000 L CNN F 1 "2p" H 14456 7715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 14488 7650 30 0001 C CNN F 3 "" H 14450 7800 60 0000 C CNN 1 14450 7800 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C53 U 1 1 557326A2 P 14000 7250 F 0 "C53" H 14000 7350 40 0000 L CNN F 1 "100n" H 14006 7165 40 0000 L CNN F 2 "fmcw2:C_0402b" H 14038 7100 30 0001 C CNN F 3 "" H 14000 7250 60 0000 C CNN 1 14000 7250 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR078 U 1 1 55732ABE P 14250 7250 F 0 "#PWR078" H 14250 7250 30 0001 C CNN F 1 "GND" H 14250 7180 30 0001 C CNN F 2 "" H 14250 7250 60 0000 C CNN F 3 "" H 14250 7250 60 0000 C CNN 1 14250 7250 0 -1 -1 0 $EndComp Text Label 13750 7200 0 60 ~ 0 5V Text Notes 12200 7600 0 60 ~ 0 Gain: 15dB\nNF: 6.5dB\nIIP3: 12 dBm Text Notes 13450 8450 0 60 ~ 0 -1dB Text Notes 13750 7050 0 60 ~ 0 50 mA Text Notes 14750 6400 0 60 ~ 0 Absolute maximum: 1dBm $Comp L LED-RESCUE-fmcw2 D1 U 1 1 557E0B12 P 3350 6500 F 0 "D1" H 3350 6600 50 0000 C CNN F 1 "LED" H 3350 6400 50 0000 C CNN F 2 "fmcw2:LED_0603" H 3350 6500 60 0001 C CNN F 3 "" H 3350 6500 60 0000 C CNN 1 3350 6500 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R23 U 1 1 557E1095 P 3350 6000 F 0 "R23" V 3430 6000 40 0000 C CNN F 1 "549" V 3357 6001 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3280 6000 30 0001 C CNN F 3 "" H 3350 6000 30 0000 C CNN 1 3350 6000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR079 U 1 1 557E1830 P 3350 6750 F 0 "#PWR079" H 3350 6750 30 0001 C CNN F 1 "GND" H 3350 6680 30 0001 C CNN F 2 "" H 3350 6750 60 0000 C CNN F 3 "" H 3350 6750 60 0000 C CNN 1 3350 6750 1 0 0 -1 $EndComp Text Label 3350 5700 0 60 ~ 0 5V Text Notes 1950 5250 0 60 ~ 0 5V current: 850mA\n10V current: 1mA\n3.3V current: 74mA $Comp L INDUCTOR_SMALL L4 U 1 1 55842066 P 1200 8950 F 0 "L4" H 1200 9050 50 0000 C CNN F 1 "2.2u" H 1200 8900 50 0000 C CNN F 2 "Capacitors_SMD:C_0402" H 1200 8950 60 0001 C CNN F 3 "" H 1200 8950 60 0000 C CNN 1 1200 8950 1 0 0 -1 $EndComp $Comp L INDUCTOR_SMALL L5 U 1 1 558422BF P 1200 10250 F 0 "L5" H 1200 10350 50 0000 C CNN F 1 "2.2u" H 1200 10200 50 0000 C CNN F 2 "Capacitors_SMD:C_0402" H 1200 10250 60 0001 C CNN F 3 "" H 1200 10250 60 0000 C CNN 1 1200 10250 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C55 U 1 1 558423BD P 1650 9600 F 0 "C55" H 1650 9700 40 0000 L CNN F 1 "2.2n" H 1656 9515 40 0000 L CNN F 2 "fmcw2:C_0402b" H 1688 9450 30 0001 C CNN F 3 "" H 1650 9600 60 0000 C CNN 1 1650 9600 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C57 U 1 1 55842DB6 P 1900 10250 F 0 "C57" H 1900 10350 40 0000 L CNN F 1 "330n" H 1906 10165 40 0000 L CNN F 2 "fmcw2:C_0603b" H 1938 10100 30 0001 C CNN F 3 "" H 1900 10250 60 0000 C CNN 1 1900 10250 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C56 U 1 1 55842F32 P 1900 8950 F 0 "C56" H 1900 9050 40 0000 L CNN F 1 "330n" H 1906 8865 40 0000 L CNN F 2 "fmcw2:C_0603b" H 1938 8800 30 0001 C CNN F 3 "" H 1900 8950 60 0000 C CNN 1 1900 8950 0 1 1 0 $EndComp Text Label 900 8950 2 60 ~ 0 IF+ Text Label 900 10250 2 60 ~ 0 IF- $Comp L R-RESCUE-fmcw2 R24 U 1 1 5584433C P 2400 8950 F 0 "R24" V 2480 8950 40 0000 C CNN F 1 "549" V 2407 8951 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2330 8950 30 0001 C CNN F 3 "" H 2400 8950 30 0000 C CNN 1 2400 8950 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R25 U 1 1 55844592 P 2400 10250 F 0 "R25" V 2480 10250 40 0000 C CNN F 1 "549" V 2407 10251 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2330 10250 30 0001 C CNN F 3 "" H 2400 10250 30 0000 C CNN 1 2400 10250 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C58 U 1 1 5584601A P 3500 9550 F 0 "C58" H 3500 9650 40 0000 L CNN F 1 "100n" H 3506 9465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3538 9400 30 0001 C CNN F 3 "" H 3500 9550 60 0000 C CNN 1 3500 9550 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR080 U 1 1 558464F3 P 3750 9550 F 0 "#PWR080" H 3750 9550 30 0001 C CNN F 1 "GND" H 3750 9480 30 0001 C CNN F 2 "" H 3750 9550 60 0000 C CNN F 3 "" H 3750 9550 60 0000 C CNN 1 3750 9550 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR081 U 1 1 55847455 P 3250 8600 F 0 "#PWR081" H 3250 8600 30 0001 C CNN F 1 "GND" H 3250 8530 30 0001 C CNN F 2 "" H 3250 8600 60 0000 C CNN F 3 "" H 3250 8600 60 0000 C CNN 1 3250 8600 -1 0 0 1 $EndComp Text Label 2750 9550 2 60 ~ 0 2V5 $Comp L C-RESCUE-fmcw2 C59 U 1 1 5584A310 P 4150 9050 F 0 "C59" H 4150 9150 40 0000 L CNN F 1 "470p" H 4156 8965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4188 8900 30 0001 C CNN F 3 "" H 4150 9050 60 0000 C CNN 1 4150 9050 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C60 U 1 1 5584A4A1 P 4150 10150 F 0 "C60" H 4150 10250 40 0000 L CNN F 1 "470p" H 4156 10065 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4188 10000 30 0001 C CNN F 3 "" H 4150 10150 60 0000 C CNN 1 4150 10150 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C61 U 1 1 5584AD7A P 4650 9050 F 0 "C61" H 4650 9150 40 0000 L CNN F 1 "470p" H 4656 8965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4688 8900 30 0001 C CNN F 3 "" H 4650 9050 60 0000 C CNN 1 4650 9050 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C62 U 1 1 5584AF04 P 4650 10150 F 0 "C62" H 4650 10250 40 0000 L CNN F 1 "470p" H 4656 10065 40 0000 L CNN F 2 "fmcw2:C_0402b" H 4688 10000 30 0001 C CNN F 3 "" H 4650 10150 60 0000 C CNN 1 4650 10150 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R30 U 1 1 5584B249 P 4950 9300 F 0 "R30" V 5030 9300 40 0000 C CNN F 1 "130" V 4957 9301 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4880 9300 30 0001 C CNN F 3 "" H 4950 9300 30 0000 C CNN 1 4950 9300 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R31 U 1 1 5584B42C P 4950 9900 F 0 "R31" V 5030 9900 40 0000 C CNN F 1 "130" V 4957 9901 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4880 9900 30 0001 C CNN F 3 "" H 4950 9900 30 0000 C CNN 1 4950 9900 1 0 0 -1 $EndComp Text Label 5000 9600 0 60 ~ 0 2V5 $Comp L R-RESCUE-fmcw2 R26 U 1 1 5584DD0A P 4400 8750 F 0 "R26" V 4480 8750 40 0000 C CNN F 1 "910" V 4407 8751 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4330 8750 30 0001 C CNN F 3 "" H 4400 8750 30 0000 C CNN 1 4400 8750 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R27 U 1 1 5584DF2F P 4400 10450 F 0 "R27" V 4480 10450 40 0000 C CNN F 1 "910" V 4407 10451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4330 10450 30 0001 C CNN F 3 "" H 4400 10450 30 0000 C CNN 1 4400 10450 1 0 0 -1 $EndComp Wire Wire Line 2250 2300 2200 2300 Wire Wire Line 2250 2600 2200 2600 Wire Wire Line 2750 2900 2750 2850 Wire Wire Line 2750 2850 2950 2850 Wire Wire Line 2850 2200 2850 2900 Wire Wire Line 2950 2850 2950 2900 Connection ~ 2850 2850 Wire Wire Line 2850 2600 2650 2600 Wire Wire Line 2850 2300 2650 2300 Connection ~ 2850 2600 Connection ~ 2850 2300 Wire Wire Line 3100 2900 3250 2900 Wire Wire Line 3100 2050 3100 2900 Connection ~ 3100 2550 Wire Wire Line 3100 2200 2850 2200 Connection ~ 3100 2300 Wire Wire Line 3550 2550 3500 2550 Wire Wire Line 3550 2050 3500 2050 Wire Wire Line 3750 2450 3750 2750 Wire Wire Line 3750 2750 3500 2750 Wire Wire Line 3500 2750 3500 2900 Wire Wire Line 4200 2450 4150 2450 Wire Wire Line 4200 2750 4150 2750 Wire Wire Line 15400 2700 15400 2750 Wire Wire Line 15250 6850 15250 6900 Wire Wire Line 2850 4550 2850 4600 Wire Wire Line 2850 4600 3550 4600 Wire Wire Line 2950 4600 2950 4550 Wire Wire Line 3100 4600 3100 4550 Connection ~ 2950 4600 Wire Wire Line 3250 4550 3250 4650 Connection ~ 3100 4600 Wire Wire Line 3400 4600 3400 4550 Connection ~ 3250 4600 Wire Wire Line 3550 4600 3550 4550 Connection ~ 3400 4600 Wire Wire Line 4150 4100 4300 4100 Wire Wire Line 4750 4250 4700 4250 Wire Wire Line 4150 4250 4150 4300 Wire Wire Line 4150 4800 4150 4850 Wire Wire Line 2200 4050 2150 4050 Wire Wire Line 2200 4150 2150 4150 Wire Wire Line 2200 4250 2150 4250 Wire Wire Line 2200 3750 2150 3750 Wire Wire Line 2200 3850 2150 3850 Wire Wire Line 4700 3900 5100 3900 Wire Wire Line 4950 3900 4950 3850 Wire Wire Line 4700 3900 4700 3700 Connection ~ 4950 3900 Wire Wire Line 4200 3700 4150 3700 Wire Wire Line 4150 3450 5800 3450 Connection ~ 4950 3450 Wire Wire Line 8400 2350 8400 3100 Wire Wire Line 8000 2350 8400 2350 Connection ~ 8300 2350 Wire Wire Line 8000 2800 8000 2750 Wire Wire Line 8300 2750 8300 2800 Wire Wire Line 9800 3350 9800 3550 Wire Wire Line 9800 3350 9700 3350 Wire Wire Line 9700 3450 9800 3450 Connection ~ 9800 3450 Wire Wire Line 9700 3100 9850 3100 Wire Wire Line 10450 3050 10450 3150 Wire Wire Line 10450 3100 10350 3100 Connection ~ 10450 3100 Wire Wire Line 4300 4100 4300 4250 Wire Wire Line 4150 4000 4900 4000 Wire Wire Line 4900 4000 4900 4900 Wire Wire Line 10600 2550 10450 2550 Wire Wire Line 14150 6300 14150 6350 Wire Wire Line 14150 5900 14050 5900 Wire Wire Line 13550 5900 13400 5900 Wire Wire Line 13400 5900 13400 6400 Wire Wire Line 13450 6550 13400 6550 Wire Wire Line 14150 5900 14150 5800 Wire Wire Line 12650 7100 12650 7150 Wire Wire Line 13400 6700 15050 6700 Wire Wire Line 13500 6700 13500 6800 Connection ~ 13500 6700 Wire Wire Line 13500 7200 13500 7250 Wire Wire Line 11900 6550 11850 6550 Wire Wire Line 11900 6400 11850 6400 Wire Wire Line 11350 6400 11300 6400 Wire Wire Line 11100 3050 11100 3100 Wire Wire Line 11600 2550 11850 2550 Wire Wire Line 13800 8800 14800 8800 Wire Wire Line 13350 9250 13350 9200 Wire Wire Line 13300 9200 13400 9200 Connection ~ 13350 9200 Wire Wire Line 7200 8100 7300 8100 Wire Wire Line 7250 8100 7250 8150 Connection ~ 7250 8100 Wire Wire Line 12800 8750 12750 8750 Wire Wire Line 12750 8750 12750 8700 Wire Wire Line 12750 8700 12600 8700 Wire Wire Line 12100 8700 12200 8700 Wire Wire Line 12100 8850 12350 8850 Wire Wire Line 12750 8850 12800 8850 Wire Wire Line 7800 7750 7850 7750 Wire Wire Line 8250 7750 8700 7750 Wire Wire Line 8500 7650 8700 7650 Wire Wire Line 8100 7650 7800 7650 Wire Wire Line 12250 3200 12250 3250 Wire Wire Line 12250 3250 12850 3250 Wire Wire Line 12350 3250 12350 3200 Wire Wire Line 12450 3250 12450 3200 Connection ~ 12350 3250 Wire Wire Line 12550 3200 12550 3300 Connection ~ 12450 3250 Wire Wire Line 12650 3250 12650 3200 Connection ~ 12550 3250 Wire Wire Line 12750 3250 12750 3200 Connection ~ 12650 3250 Wire Wire Line 12850 3250 12850 3200 Connection ~ 12750 3250 Wire Wire Line 12650 650 12650 2000 Wire Wire Line 12300 850 12700 850 Wire Wire Line 12700 1050 12650 1050 Connection ~ 12650 1050 Wire Wire Line 12700 1300 12650 1300 Connection ~ 12650 1300 Wire Wire Line 12700 1550 12650 1550 Connection ~ 12650 1550 Wire Wire Line 13150 850 13100 850 Wire Wire Line 13100 1050 13150 1050 Wire Wire Line 13100 1300 13150 1300 Wire Wire Line 13100 1550 13150 1550 Connection ~ 11650 1200 Wire Wire Line 11650 1600 11650 1650 Wire Wire Line 11400 1600 11400 1650 Wire Wire Line 11150 1600 11150 1650 Wire Wire Line 12500 1750 12700 1750 Wire Wire Line 12500 1750 12500 2000 Connection ~ 12650 1750 Wire Wire Line 13100 1750 13150 1750 Wire Wire Line 10900 1750 10900 1700 Wire Wire Line 10550 1100 12350 1100 Wire Wire Line 10900 1100 10900 1200 Wire Wire Line 11150 1100 11150 1200 Connection ~ 10900 1100 Wire Wire Line 11400 1100 11400 1200 Connection ~ 11150 1100 Wire Wire Line 11650 1100 11650 1200 Connection ~ 11400 1100 Wire Wire Line 12350 1100 12350 2000 Connection ~ 11650 1100 Wire Wire Line 11950 1900 11950 1850 Wire Wire Line 12250 2000 12250 1450 Wire Wire Line 12250 1450 11950 1450 Wire Wire Line 10050 1100 10000 1100 Wire Wire Line 7050 3850 7050 3900 Wire Wire Line 6850 2950 6850 3000 Wire Wire Line 7050 3050 7050 2550 Wire Wire Line 7050 2550 6850 2550 Wire Wire Line 10000 3850 10450 3850 Wire Wire Line 8200 3450 8400 3450 Wire Wire Line 8300 3450 8300 3500 Connection ~ 8300 3450 Wire Wire Line 7700 3450 7650 3450 Wire Wire Line 8300 3900 8300 3950 Wire Wire Line 7650 3450 7650 4100 Wire Wire Line 7650 4100 7350 4100 Wire Wire Line 6850 4100 6650 4100 Wire Wire Line 6650 3550 6650 4150 Connection ~ 6650 4100 Wire Wire Line 6650 4700 6650 4650 Wire Wire Line 5100 4450 5100 4400 Wire Wire Line 5800 3350 5800 3500 Connection ~ 5800 3450 Wire Wire Line 5800 3900 5800 3950 Wire Wire Line 2200 3500 2150 3500 Wire Wire Line 1300 1500 1300 1550 Wire Wire Line 2150 1350 2200 1350 Wire Wire Line 1300 1350 1300 1200 Wire Wire Line 1100 1350 1300 1350 Wire Wire Line 1100 1750 1100 1800 Wire Wire Line 2200 3300 2150 3300 Wire Wire Line 13750 2550 13250 2550 Wire Wire Line 14450 2550 15200 2550 Wire Wire Line 14250 3400 14300 3400 Wire Wire Line 10000 4900 10000 3850 Wire Wire Line 5300 4900 10000 4900 Wire Wire Line 7100 1850 7100 1900 Wire Wire Line 6500 1200 6450 1200 Wire Wire Line 6450 1650 6450 1700 Wire Wire Line 6450 1200 6450 1250 Wire Wire Line 7850 1250 7850 1200 Wire Wire Line 7700 1200 7900 1200 Wire Wire Line 7850 1650 7850 1700 Connection ~ 7850 1200 Wire Wire Line 11700 850 11800 850 Wire Wire Line 11800 650 11700 650 Wire Wire Line 12300 650 12650 650 Connection ~ 12650 850 Wire Wire Line 9350 1850 9350 1900 Wire Wire Line 9350 1350 9350 1300 Wire Wire Line 9350 800 9350 750 Wire Wire Line 9100 1350 9500 1350 Wire Wire Line 9100 1350 9100 1400 Connection ~ 9350 1350 Wire Wire Line 9350 1850 9100 1850 Wire Wire Line 9100 1850 9100 1800 Wire Wire Line 8800 1600 8700 1600 Wire Wire Line 10450 3850 10450 3650 Wire Wire Line 2600 1350 2700 1350 Wire Wire Line 14450 2800 14450 2850 Wire Wire Line 14450 3350 14450 3400 Wire Wire Line 12550 5000 12550 5100 Wire Wire Line 12750 4800 12850 4800 Wire Wire Line 13500 4150 13550 4150 Wire Wire Line 13050 5100 13000 5100 Wire Wire Line 13750 3900 13750 3950 Wire Wire Line 13750 2800 13750 2900 Wire Wire Line 6800 7700 6750 7700 Wire Wire Line 13050 4550 13050 4600 Wire Wire Line 13300 4350 13250 4350 Connection ~ 3100 2200 Wire Wire Line 3550 2300 3500 2300 Wire Wire Line 12800 5300 12750 5300 Wire Wire Line 1100 5100 1100 5150 Wire Wire Line 1350 5100 1350 5200 Wire Wire Line 1550 5100 1550 5200 Wire Wire Line 8700 7450 8650 7450 Wire Wire Line 8650 7550 8700 7550 Wire Wire Line 8650 7850 8700 7850 Wire Wire Line 8700 7950 8650 7950 Wire Wire Line 9300 8450 9300 8500 Wire Wire Line 9700 8450 9700 8500 Wire Wire Line 10200 7850 10150 7850 Wire Wire Line 10200 7550 10150 7550 Wire Wire Line 9700 6900 9700 6950 Wire Wire Line 9300 6900 9300 6950 Wire Wire Line 9450 5350 9450 5850 Wire Wire Line 9650 5350 9650 5850 Wire Wire Line 10150 7650 10200 7650 Wire Wire Line 10150 7750 10200 7750 Wire Wire Line 9200 8600 9200 8450 Wire Wire Line 8300 8600 9200 8600 Wire Wire Line 9400 5850 9500 5850 Wire Wire Line 9600 5850 9700 5850 Connection ~ 9650 5850 Connection ~ 9450 5850 Wire Wire Line 10300 5900 10300 5850 Wire Wire Line 10200 5850 10350 5850 Wire Wire Line 8750 5850 8900 5850 Wire Wire Line 8800 5850 8800 5900 Wire Wire Line 9500 5850 9500 6950 Wire Wire Line 9600 6950 9600 5850 Wire Wire Line 8800 6300 8800 6350 Wire Wire Line 10300 6300 10300 6350 Wire Wire Line 10850 7500 10850 7450 Wire Wire Line 10150 7450 10900 7450 Wire Wire Line 10850 7900 10850 7950 Wire Wire Line 10150 7950 10500 7950 Wire Wire Line 10200 7950 10200 8000 Wire Wire Line 10200 8450 10200 8400 Connection ~ 10200 7950 Connection ~ 10850 7450 Wire Wire Line 9200 6600 9200 6950 Wire Wire Line 8750 7100 8750 7050 Wire Wire Line 8550 7100 8550 7050 Wire Wire Line 8550 6650 8550 6600 Wire Wire Line 8500 6600 9200 6600 Wire Wire Line 8750 6600 8750 6650 Connection ~ 8750 6600 Connection ~ 8550 6600 Wire Wire Line 9400 8450 9400 8750 Wire Wire Line 9200 9650 9200 9600 Wire Wire Line 9400 9600 9400 9650 Wire Wire Line 9800 9050 9800 9000 Wire Wire Line 10000 9000 10000 9050 Wire Wire Line 10500 9850 10500 9800 Wire Wire Line 10500 9200 10500 9300 Connection ~ 10500 9250 Wire Wire Line 10500 7950 10500 8700 Wire Wire Line 9600 8600 10000 8600 Wire Wire Line 9600 8450 9600 8650 Connection ~ 9800 8600 Wire Wire Line 9500 8450 9500 8800 Wire Wire Line 9500 8800 9400 8800 Wire Wire Line 9400 8800 9400 9200 Connection ~ 9600 8600 Wire Wire Line 9200 9150 9600 9150 Connection ~ 9400 9150 Wire Wire Line 10500 9250 9600 9250 Wire Wire Line 9600 9250 9600 9150 Wire Wire Line 9200 9150 9200 9200 Wire Wire Line 8600 9100 8600 9150 Wire Wire Line 8350 9100 8350 9150 Wire Wire Line 8350 8700 8350 8600 Wire Wire Line 8600 8600 8600 8700 Connection ~ 8600 8600 Connection ~ 8350 8600 Wire Wire Line 11600 6700 11900 6700 Wire Wire Line 12650 8300 12650 8400 Wire Wire Line 12650 8350 12950 8350 Wire Wire Line 12750 8350 12750 8300 Connection ~ 12650 8350 Wire Wire Line 12850 8350 12850 8300 Connection ~ 12750 8350 Wire Wire Line 12950 8350 12950 8300 Connection ~ 12850 8350 Wire Wire Line 13300 7800 14250 7800 Connection ~ 13750 7800 Wire Wire Line 12250 7800 12150 7800 Wire Wire Line 11750 7800 11600 7800 Wire Wire Line 11600 7800 11600 6700 Wire Wire Line 14650 7800 14800 7800 Wire Wire Line 14800 7800 14800 8800 Wire Wire Line 13750 7200 13750 7300 Wire Wire Line 13750 7250 13800 7250 Wire Wire Line 14200 7250 14250 7250 Connection ~ 13750 7250 Wire Wire Line 3350 6250 3350 6300 Wire Wire Line 3350 6750 3350 6700 Wire Wire Line 3350 5750 3350 5700 Wire Wire Line 1650 9400 1650 8950 Wire Wire Line 1450 8950 1700 8950 Wire Wire Line 1450 10250 1700 10250 Wire Wire Line 1650 10250 1650 9800 Connection ~ 1650 8950 Connection ~ 1650 10250 Wire Wire Line 950 8950 900 8950 Wire Wire Line 950 10250 900 10250 Wire Wire Line 2150 10250 2100 10250 Wire Wire Line 2150 8950 2100 8950 Wire Wire Line 3700 9550 3750 9550 Wire Wire Line 3250 8600 3250 8650 Connection ~ 3250 9550 Wire Wire Line 3200 9550 3300 9550 Wire Wire Line 2650 8950 2850 8950 Wire Wire Line 2650 10250 2850 10250 Wire Wire Line 2850 9150 2850 10050 Wire Wire Line 3850 10150 3950 10150 Wire Wire Line 3850 9050 3950 9050 Wire Wire Line 4950 9550 4950 9650 Wire Wire Line 4950 9600 5000 9600 Connection ~ 4950 9600 Wire Wire Line 4350 10150 4450 10150 Wire Wire Line 4350 9050 4450 9050 Wire Wire Line 4850 9050 5150 9050 Wire Wire Line 4850 10150 5150 10150 Wire Wire Line 4400 10200 4400 10150 Connection ~ 4400 10150 Wire Wire Line 4400 9000 4400 9050 Connection ~ 4400 9050 Connection ~ 4950 9050 Connection ~ 4950 10150 Wire Wire Line 4400 10700 4400 11000 Wire Wire Line 4400 11000 6250 11000 Wire Wire Line 6250 11000 6250 10250 Wire Wire Line 6150 10250 6400 10250 Wire Wire Line 6150 8950 6400 8950 Wire Wire Line 6250 8200 6250 8950 Wire Wire Line 6250 8200 4400 8200 Wire Wire Line 4400 8200 4400 8500 $Comp L R-RESCUE-fmcw2 R28 U 1 1 5585112C P 4850 8650 F 0 "R28" V 4930 8650 40 0000 C CNN F 1 "1k" V 4857 8651 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4780 8650 30 0001 C CNN F 3 "" H 4850 8650 30 0000 C CNN 1 4850 8650 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R32 U 1 1 558512EC P 5350 8350 F 0 "R32" V 5430 8350 40 0000 C CNN F 1 "4.99k" V 5357 8351 40 0000 C CNN F 2 "fmcw2:R_0402b" V 5280 8350 30 0001 C CNN F 3 "" H 5350 8350 30 0000 C CNN 1 5350 8350 0 1 1 0 $EndComp Wire Wire Line 5100 8350 5100 8850 Wire Wire Line 5100 8850 5150 8850 Connection ~ 5100 8650 Wire Wire Line 5600 8350 6250 8350 Connection ~ 6250 8350 Wire Wire Line 4600 8650 4550 8650 Text Label 4550 8650 1 60 ~ 0 2V5 $Comp L R-RESCUE-fmcw2 R33 U 1 1 55852B38 P 5450 10850 F 0 "R33" V 5530 10850 40 0000 C CNN F 1 "4.99k" V 5457 10851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 5380 10850 30 0001 C CNN F 3 "" H 5450 10850 30 0000 C CNN 1 5450 10850 0 1 1 0 $EndComp Wire Wire Line 5700 10850 6250 10850 Connection ~ 6250 10850 $Comp L R-RESCUE-fmcw2 R29 U 1 1 5585397A P 4850 10700 F 0 "R29" V 4930 10700 40 0000 C CNN F 1 "1k" V 4857 10701 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4780 10700 30 0001 C CNN F 3 "" H 4850 10700 30 0000 C CNN 1 4850 10700 0 1 1 0 $EndComp Wire Wire Line 5150 10850 5200 10850 Wire Wire Line 5150 10350 5150 10850 Wire Wire Line 5100 10700 5150 10700 Connection ~ 5150 10700 Wire Wire Line 4600 10700 4550 10700 Text Label 4550 10700 2 60 ~ 0 2V5 Connection ~ 6250 8950 Connection ~ 6250 10250 Text Label 6400 8950 0 60 ~ 0 IFF+ Text Label 6400 10250 0 60 ~ 0 IFF- $Comp L R-RESCUE-fmcw2 R34 U 1 1 55856708 P 3250 8250 F 0 "R34" V 3330 8250 40 0000 C CNN F 1 "10k" V 3257 8251 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3180 8250 30 0001 C CNN F 3 "" H 3250 8250 30 0000 C CNN 1 3250 8250 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R35 U 1 1 55856908 P 3250 10850 F 0 "R35" V 3330 10850 40 0000 C CNN F 1 "10k" V 3257 10851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3180 10850 30 0001 C CNN F 3 "" H 3250 10850 30 0000 C CNN 1 3250 10850 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C65 U 1 1 55856B9A P 3250 11050 F 0 "C65" H 3250 11150 40 0000 L CNN F 1 "10p" H 3256 10965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3288 10900 30 0001 C CNN F 3 "" H 3250 11050 60 0000 C CNN 1 3250 11050 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2 C64 U 1 1 55856D56 P 3250 8050 F 0 "C64" H 3250 8150 40 0000 L CNN F 1 "10p" H 3256 7965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3288 7900 30 0001 C CNN F 3 "" H 3250 8050 60 0000 C CNN 1 3250 8050 0 1 1 0 $EndComp Wire Wire Line 3900 9050 3900 8250 Wire Wire Line 3900 8250 3500 8250 Connection ~ 3900 9050 Wire Wire Line 3500 8250 3500 8050 Wire Wire Line 3500 8050 3450 8050 Wire Wire Line 3050 8050 2950 8050 Wire Wire Line 2950 8050 2950 8250 Wire Wire Line 2800 8250 3000 8250 Wire Wire Line 2800 8950 2800 8250 Connection ~ 2950 8250 Connection ~ 2800 8950 Wire Wire Line 3900 10850 3900 10150 Wire Wire Line 3500 10850 3900 10850 Connection ~ 3900 10150 Wire Wire Line 3550 10850 3550 11050 Wire Wire Line 3550 11050 3450 11050 Connection ~ 3550 10850 Wire Wire Line 2800 10850 3000 10850 Wire Wire Line 2800 10850 2800 10250 Connection ~ 2800 10250 Wire Wire Line 3050 11050 2950 11050 Wire Wire Line 2950 11050 2950 10850 Connection ~ 2950 10850 $Comp L LDS3985 U19 U 1 1 5585B6AE P 1500 7850 F 0 "U19" H 1750 7650 60 0000 C CNN F 1 "LDS3985" H 1600 8050 60 0000 C CNN F 2 "fmcw2:SOT-23-5L" H 1400 7650 60 0001 C CNN F 3 "" H 1400 7650 60 0000 C CNN F 4 "LDS3985M25R" H 1500 7850 60 0001 C CNN "manf#" 1 1500 7850 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C68 U 1 1 5585BA65 P 2250 8050 F 0 "C68" H 2250 8150 40 0000 L CNN F 1 "2.2u" H 2256 7965 40 0000 L CNN F 2 "fmcw2:C_0603b" H 2288 7900 30 0001 C CNN F 3 "" H 2250 8050 60 0000 C CNN 1 2250 8050 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2 C67 U 1 1 5585BC2A P 2000 8200 F 0 "C67" H 2000 8300 40 0000 L CNN F 1 "10n" H 2006 8115 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2038 8050 30 0001 C CNN F 3 "" H 2000 8200 60 0000 C CNN 1 2000 8200 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR082 U 1 1 5585BD66 P 2000 8450 F 0 "#PWR082" H 2000 8450 30 0001 C CNN F 1 "GND" H 2000 8380 30 0001 C CNN F 2 "" H 2000 8450 60 0000 C CNN F 3 "" H 2000 8450 60 0000 C CNN 1 2000 8450 1 0 0 -1 $EndComp Wire Wire Line 2000 8450 2000 8400 Wire Wire Line 2000 8000 2000 7950 $Comp L GND-RESCUE-fmcw2 #PWR083 U 1 1 5585C5EE P 2250 8300 F 0 "#PWR083" H 2250 8300 30 0001 C CNN F 1 "GND" H 2250 8230 30 0001 C CNN F 2 "" H 2250 8300 60 0000 C CNN F 3 "" H 2250 8300 60 0000 C CNN 1 2250 8300 1 0 0 -1 $EndComp Wire Wire Line 2250 8300 2250 8250 Wire Wire Line 1000 7850 950 7850 Wire Wire Line 950 7850 950 7750 Wire Wire Line 850 7750 1000 7750 Connection ~ 950 7750 Text Label 900 7750 2 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2 C66 U 1 1 5585D5B3 P 850 8050 F 0 "C66" H 850 8150 40 0000 L CNN F 1 "100n" H 856 7965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 888 7900 30 0001 C CNN F 3 "" H 850 8050 60 0000 C CNN 1 850 8050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR084 U 1 1 5585D6F0 P 1000 8300 F 0 "#PWR084" H 1000 8300 30 0001 C CNN F 1 "GND" H 1000 8230 30 0001 C CNN F 2 "" H 1000 8300 60 0000 C CNN F 3 "" H 1000 8300 60 0000 C CNN 1 1000 8300 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR085 U 1 1 5585D8A6 P 850 8300 F 0 "#PWR085" H 850 8300 30 0001 C CNN F 1 "GND" H 850 8230 30 0001 C CNN F 2 "" H 850 8300 60 0000 C CNN F 3 "" H 850 8300 60 0000 C CNN 1 850 8300 1 0 0 -1 $EndComp Wire Wire Line 850 8300 850 8250 Wire Wire Line 1000 7950 1000 8300 Wire Wire Line 850 7750 850 7850 Text Label 2250 7750 0 60 ~ 0 2V5 Wire Wire Line 2000 7750 2500 7750 Wire Wire Line 2250 7750 2250 7850 Wire Wire Line 2750 9550 2850 9550 Connection ~ 2850 9550 Connection ~ 8800 5850 Connection ~ 10300 5850 Text Label 10350 5850 0 60 ~ 0 5V Text Label 8750 5850 2 60 ~ 0 5V Text Notes 12750 4150 0 60 ~ 0 -0.5 dB Text Label 3200 9550 2 60 ~ 0 5V $Comp L GND-RESCUE-fmcw2 #PWR086 U 1 1 55847DF4 P 9100 8500 F 0 "#PWR086" H 9100 8500 30 0001 C CNN F 1 "GND" H 9100 8430 30 0001 C CNN F 2 "" H 9100 8500 60 0000 C CNN F 3 "" H 9100 8500 60 0000 C CNN 1 9100 8500 1 0 0 -1 $EndComp Wire Wire Line 9100 8500 9100 8450 $Comp L R-RESCUE-fmcw2 R36 U 1 1 5584DAA8 P 6050 3350 F 0 "R36" V 6130 3350 40 0000 C CNN F 1 "0" V 6057 3351 40 0000 C CNN F 2 "fmcw2:R_0402b" V 5980 3350 30 0001 C CNN F 3 "" H 6050 3350 30 0000 C CNN 1 6050 3350 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R37 U 1 1 5584DC57 P 6350 3050 F 0 "R37" V 6430 3050 40 0000 C CNN F 1 "DNP" V 6357 3051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 6280 3050 30 0001 C CNN F 3 "" H 6350 3050 30 0000 C CNN 1 6350 3050 -1 0 0 1 $EndComp Wire Wire Line 6350 3300 6350 3350 Wire Wire Line 6300 3350 6650 3350 Connection ~ 6350 3350 Wire Wire Line 6350 2800 6350 2750 Text Label 6350 2750 2 60 ~ 0 VTUNE Text Label 1450 5700 2 60 ~ 0 VTUNE $Comp L LT6232 U5 U 1 1 5592FA6E P 3350 9050 F 0 "U5" H 3500 9200 60 0000 C CNN F 1 "LT6232" H 3550 8850 60 0000 C CNN F 2 "Housings_SSOP:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 3350 9050 60 0001 C CNN F 3 "" H 3350 9050 60 0000 C CNN F 4 "LT6232CGN#PBF" H 3350 9050 60 0001 C CNN "manf#" 1 3350 9050 1 0 0 1 $EndComp $Comp L LT6232 U5 U 2 1 559307A3 P 3350 10150 F 0 "U5" H 3500 10300 60 0000 C CNN F 1 "LT6232" H 3550 9950 60 0000 C CNN F 2 "Housings_SSOP:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 3350 10150 60 0001 C CNN F 3 "" H 3350 10150 60 0000 C CNN 2 3350 10150 1 0 0 -1 $EndComp Wire Wire Line 3250 9550 3250 9450 $Comp L LT6232 U5 U 3 1 559314D6 P 5650 10250 F 0 "U5" H 5800 10400 60 0000 C CNN F 1 "LT6232" H 5850 10050 60 0000 C CNN F 2 "Housings_SSOP:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 5650 10250 60 0001 C CNN F 3 "" H 5650 10250 60 0000 C CNN 3 5650 10250 1 0 0 -1 $EndComp $Comp L LT6232 U5 U 4 1 55931DA7 P 5650 8950 F 0 "U5" H 5800 9100 60 0000 C CNN F 1 "LT6232" H 5850 8750 60 0000 C CNN F 2 "Housings_SSOP:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 5650 8950 60 0001 C CNN F 3 "" H 5650 8950 60 0000 C CNN 4 5650 8950 1 0 0 1 $EndComp $Comp L R-RESCUE-fmcw2 R38 U 1 1 559443A1 P 2500 8050 F 0 "R38" V 2580 8050 40 0000 C CNN F 1 "10k" V 2507 8051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2430 8050 30 0001 C CNN F 3 "" H 2500 8050 30 0000 C CNN 1 2500 8050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR087 U 1 1 559445ED P 2500 8350 F 0 "#PWR087" H 2500 8350 30 0001 C CNN F 1 "GND" H 2500 8280 30 0001 C CNN F 2 "" H 2500 8350 60 0000 C CNN F 3 "" H 2500 8350 60 0000 C CNN 1 2500 8350 1 0 0 -1 $EndComp Wire Wire Line 2500 8350 2500 8300 Wire Wire Line 2500 7750 2500 7800 Connection ~ 2250 7750 $Comp L CONN_15X2 P1 U 1 1 559CA596 P 1900 6300 F 0 "P1" H 1900 7100 60 0000 C CNN F 1 "CONN_15X2" V 1900 6250 50 0000 C CNN F 2 "fmcw2:DF12B(5.0)-30DP-0.5V(86)" H 1900 6450 60 0001 C CNN F 3 "" H 1900 6450 60 0000 C CNN 1 1900 6300 1 0 0 -1 $EndComp Wire Wire Line 2350 7000 2300 7000 Wire Wire Line 2350 6900 2300 6900 Text Label 2350 6800 0 60 ~ 0 5V Text Label 2350 6700 0 60 ~ 0 5V Wire Wire Line 2350 6700 2300 6700 Wire Wire Line 2350 6800 2300 6800 Text Label 2350 6600 0 60 ~ 0 5V Wire Wire Line 2350 6600 2300 6600 $Comp L GND-RESCUE-fmcw2 #PWR088 U 1 1 559CD09A P 2350 6500 F 0 "#PWR088" H 2350 6500 30 0001 C CNN F 1 "GND" H 2350 6430 30 0001 C CNN F 2 "" H 2350 6500 60 0000 C CNN F 3 "" H 2350 6500 60 0000 C CNN 1 2350 6500 0 -1 -1 0 $EndComp Wire Wire Line 2350 6500 2300 6500 $Comp L GND-RESCUE-fmcw2 #PWR089 U 1 1 559CD50C P 2350 6400 F 0 "#PWR089" H 2350 6400 30 0001 C CNN F 1 "GND" H 2350 6330 30 0001 C CNN F 2 "" H 2350 6400 60 0000 C CNN F 3 "" H 2350 6400 60 0000 C CNN 1 2350 6400 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR090 U 1 1 559CD6AC P 2350 6300 F 0 "#PWR090" H 2350 6300 30 0001 C CNN F 1 "GND" H 2350 6230 30 0001 C CNN F 2 "" H 2350 6300 60 0000 C CNN F 3 "" H 2350 6300 60 0000 C CNN 1 2350 6300 0 -1 -1 0 $EndComp Wire Wire Line 2350 6300 2300 6300 Wire Wire Line 2300 6400 2350 6400 Wire Wire Line 2350 6200 2300 6200 $Comp L GND-RESCUE-fmcw2 #PWR091 U 1 1 559CE1D8 P 2350 6100 F 0 "#PWR091" H 2350 6100 30 0001 C CNN F 1 "GND" H 2350 6030 30 0001 C CNN F 2 "" H 2350 6100 60 0000 C CNN F 3 "" H 2350 6100 60 0000 C CNN 1 2350 6100 0 -1 -1 0 $EndComp Wire Wire Line 2350 6100 2300 6100 $Comp L GND-RESCUE-fmcw2 #PWR092 U 1 1 559CE64E P 2350 6000 F 0 "#PWR092" H 2350 6000 30 0001 C CNN F 1 "GND" H 2350 5930 30 0001 C CNN F 2 "" H 2350 6000 60 0000 C CNN F 3 "" H 2350 6000 60 0000 C CNN 1 2350 6000 0 -1 -1 0 $EndComp Wire Wire Line 2350 6000 2300 6000 Wire Wire Line 2350 5900 2300 5900 Wire Wire Line 2350 5800 2300 5800 $Comp L GND-RESCUE-fmcw2 #PWR093 U 1 1 559CF6D2 P 2350 5700 F 0 "#PWR093" H 2350 5700 30 0001 C CNN F 1 "GND" H 2350 5630 30 0001 C CNN F 2 "" H 2350 5700 60 0000 C CNN F 3 "" H 2350 5700 60 0000 C CNN 1 2350 5700 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR094 U 1 1 559CF872 P 2350 5600 F 0 "#PWR094" H 2350 5600 30 0001 C CNN F 1 "GND" H 2350 5530 30 0001 C CNN F 2 "" H 2350 5600 60 0000 C CNN F 3 "" H 2350 5600 60 0000 C CNN 1 2350 5600 0 -1 -1 0 $EndComp Wire Wire Line 2350 5600 2300 5600 Wire Wire Line 2300 5700 2350 5700 $Comp L GND-RESCUE-fmcw2 #PWR095 U 1 1 559D00F7 P 1450 5600 F 0 "#PWR095" H 1450 5600 30 0001 C CNN F 1 "GND" H 1450 5530 30 0001 C CNN F 2 "" H 1450 5600 60 0000 C CNN F 3 "" H 1450 5600 60 0000 C CNN 1 1450 5600 0 1 1 0 $EndComp Wire Wire Line 1500 5600 1450 5600 Wire Wire Line 1450 5700 1500 5700 Wire Wire Line 1450 5900 1500 5900 $Comp L GND-RESCUE-fmcw2 #PWR096 U 1 1 559D1460 P 1450 6200 F 0 "#PWR096" H 1450 6200 30 0001 C CNN F 1 "GND" H 1450 6130 30 0001 C CNN F 2 "" H 1450 6200 60 0000 C CNN F 3 "" H 1450 6200 60 0000 C CNN 1 1450 6200 0 1 1 0 $EndComp Wire Wire Line 1450 6200 1500 6200 Wire Wire Line 1500 6100 1450 6100 Wire Wire Line 1500 6000 1450 6000 Wire Wire Line 1450 6300 1500 6300 Wire Wire Line 1450 6400 1500 6400 Wire Wire Line 1450 6500 1500 6500 Wire Wire Line 1450 6600 1500 6600 Wire Wire Line 1500 6700 1450 6700 Wire Wire Line 1450 6800 1500 6800 Wire Wire Line 1450 6900 1500 6900 Wire Wire Line 1500 7000 1450 7000 Wire Wire Line 1500 5800 1450 5800 Text Label 1450 5900 2 60 ~ 0 3V3 Text Label 1450 6000 2 60 ~ 0 3V3 $Comp L GND-RESCUE-fmcw2 #PWR097 U 1 1 559DB129 P 1450 6100 F 0 "#PWR097" H 1450 6100 30 0001 C CNN F 1 "GND" H 1450 6030 30 0001 C CNN F 2 "" H 1450 6100 60 0000 C CNN F 3 "" H 1450 6100 60 0000 C CNN 1 1450 6100 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR098 U 1 1 559DB2C9 P 1450 5800 F 0 "#PWR098" H 1450 5800 30 0001 C CNN F 1 "GND" H 1450 5730 30 0001 C CNN F 2 "" H 1450 5800 60 0000 C CNN F 3 "" H 1450 5800 60 0000 C CNN 1 1450 5800 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2 R39 U 1 1 55A23ED1 P 8750 1250 F 0 "R39" V 8830 1250 40 0000 C CNN F 1 "47k" V 8757 1251 40 0000 C CNN F 2 "fmcw2:R_0402b" V 8680 1250 30 0001 C CNN F 3 "" H 8750 1250 30 0000 C CNN 1 8750 1250 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2 R40 U 1 1 55A2408C P 8750 1900 F 0 "R40" V 8830 1900 40 0000 C CNN F 1 "DNP" V 8757 1901 40 0000 C CNN F 2 "fmcw2:R_0402b" V 8680 1900 30 0001 C CNN F 3 "" H 8750 1900 30 0000 C CNN 1 8750 1900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR099 U 1 1 55A241D4 P 8750 2200 F 0 "#PWR099" H 8750 2200 30 0001 C CNN F 1 "GND" H 8750 2130 30 0001 C CNN F 2 "" H 8750 2200 60 0000 C CNN F 3 "" H 8750 2200 60 0000 C CNN 1 8750 2200 1 0 0 -1 $EndComp Wire Wire Line 8750 2200 8750 2150 Wire Wire Line 8750 1500 8750 1650 Connection ~ 8750 1600 Wire Wire Line 8750 1000 8750 950 Text Label 8750 950 0 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2 C13 U 1 1 55A69485 P 700 5800 F 0 "C13" H 700 5900 40 0000 L CNN F 1 "1u" H 706 5715 40 0000 L CNN F 2 "fmcw2:C_0603b" H 738 5650 30 0001 C CNN F 3 "" H 700 5800 60 0000 C CNN 1 700 5800 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR0100 U 1 1 55A69E83 P 700 6050 F 0 "#PWR0100" H 700 6050 30 0001 C CNN F 1 "GND" H 700 5980 30 0001 C CNN F 2 "" H 700 6050 60 0000 C CNN F 3 "" H 700 6050 60 0000 C CNN 1 700 6050 1 0 0 -1 $EndComp Wire Wire Line 700 6050 700 6000 Wire Wire Line 700 5600 700 5550 Text Label 700 5550 0 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2 C22 U 1 1 55A8E633 P 4050 5900 F 0 "C22" H 4050 6000 40 0000 L CNN F 1 "DNP" H 4056 5815 40 0000 L CNN F 2 "fmcw2:C_0805b" H 4088 5750 30 0001 C CNN F 3 "" H 4050 5900 60 0000 C CNN 1 4050 5900 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2 #PWR0101 U 1 1 55A8E931 P 4050 6150 F 0 "#PWR0101" H 4050 6150 30 0001 C CNN F 1 "GND" H 4050 6080 30 0001 C CNN F 2 "" H 4050 6150 60 0000 C CNN F 3 "" H 4050 6150 60 0000 C CNN 1 4050 6150 1 0 0 -1 $EndComp Wire Wire Line 4050 6150 4050 6100 Text Label 4050 5650 0 60 ~ 0 5V Wire Wire Line 4050 5650 4050 5700 $EndSCHEMATC ================================================ FILE: hardware/fmcw2/libs/fmcw2.lib ================================================ EESchema-LIBRARY Version 2.3 #encoding utf-8 # # 5400BL15B050E # DEF 5400BL15B050E U 0 40 Y Y 1 F N F0 "U" 250 250 60 H V C CNN F1 "5400BL15B050E" 100 700 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -250 300 350 650 0 1 0 N X IN 1 -450 500 200 R 50 50 1 1 P X GND 2 50 100 200 U 50 50 1 1 W X OUTP 3 550 450 200 L 50 50 1 1 P X OUTN 4 550 550 200 L 50 50 1 1 P X GND 5 -50 100 200 U 50 50 1 1 W ENDDRAW ENDDEF # # AD7266 # DEF AD7266 U 0 40 Y Y 1 F N F0 "U" 650 -700 60 H V C CNN F1 "AD7266" 550 700 60 H V C CNN F2 "" -500 0 60 H V C CNN F3 "" -500 0 60 H V C CNN DRAW S -800 -650 750 650 0 1 0 N X DGND 1 -250 -850 200 U 50 50 1 1 W X REF_SEL 2 950 200 200 L 50 50 1 1 I X AVDD 3 0 850 200 D 50 50 1 1 W X DCAPA 4 950 600 200 L 50 50 1 1 P X AGND 5 -50 -850 200 U 50 50 1 1 W X AGND 6 50 -850 200 U 50 50 1 1 W X VA1 7 -1000 600 200 R 50 50 1 1 I X VA2 8 -1000 500 200 R 50 50 1 1 I X VA3 9 -1000 400 200 R 50 50 1 1 I X VA4 10 -1000 300 200 R 50 50 1 1 I X DCAPB 20 950 500 200 L 50 50 1 1 P X DOUTA 30 950 -100 200 L 50 50 1 1 O X VA5 11 -1000 200 200 R 50 50 1 1 I X RANGE 21 950 400 200 L 50 50 1 1 I X VDRIVE 31 -100 850 200 D 50 50 1 1 W X VA6 12 -1000 100 200 R 50 50 1 1 I X SGL/~DIFF 22 950 300 200 L 50 50 1 1 I X DVDD 32 100 850 200 D 50 50 1 1 W X VB6 13 -1000 -600 200 R 50 50 1 1 I X A2 23 950 -400 200 L 50 50 1 1 I X VB5 14 -1000 -500 200 R 50 50 1 1 I X A1 24 950 -500 200 L 50 50 1 1 I X VB4 15 -1000 -400 200 R 50 50 1 1 I X A0 25 950 -600 200 L 50 50 1 1 I X VB3 16 -1000 -300 200 R 50 50 1 1 I X ~CS 26 950 -200 200 L 50 50 1 1 I X VB2 17 -1000 -200 200 R 50 50 1 1 I X SCLK 27 950 -300 200 L 50 50 1 1 I X VB1 18 -1000 -100 200 R 50 50 1 1 I X DOUTB 28 950 0 200 L 50 50 1 1 O X AGND 19 150 -850 200 U 50 50 1 1 W X DGND 29 -150 -850 200 U 50 50 1 1 W X PAD PAD 250 -850 200 U 50 50 1 1 W ENDDRAW ENDDEF # # ADF4158 # DEF ADF4158 U 0 40 Y Y 1 F N F0 "U" 1750 -200 60 H V C CNN F1 "ADF4158" 1800 100 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST WFQFN-24 $ENDFPLIST DRAW S 1000 600 2550 -650 0 1 0 N X CPGND 1 2000 -850 200 U 50 50 1 1 W X AGND 2 1450 -850 200 U 50 50 1 1 W X AGND 3 1550 -850 200 U 50 50 1 1 W X RFINB 4 2750 -400 200 L 50 50 1 1 I X RFINA 5 2750 -300 200 L 50 50 1 1 I X AVDD 6 1350 800 200 D 50 50 1 1 W X AVDD 7 1450 800 200 D 50 50 1 1 W X AVDD 8 1550 800 200 D 50 50 1 1 W X REFIN 9 800 400 200 R 50 50 1 1 I X DGND 10 1700 -850 200 U 50 50 1 1 W X SW1 20 2750 0 200 L 50 50 1 1 P X SDGND 11 1850 -850 200 U 50 50 1 1 W X SW2 21 2750 400 200 L 50 50 1 1 P X TXDATA 12 800 -150 200 R 50 50 1 1 I X VP 22 2100 800 200 D 50 50 1 1 W X CE 13 800 -50 200 R 50 50 1 1 I X RSET 23 2750 -550 200 L 50 50 1 1 P X CLK 14 800 -350 200 R 50 50 1 1 I X CP 24 2750 250 200 L 50 50 1 1 O X DATA 15 800 -450 200 R 50 50 1 1 I X LE 16 800 -550 200 R 50 50 1 1 I X MUXOUT 17 800 200 200 R 50 50 1 1 O X SDVDD 18 1850 800 200 D 50 50 1 1 W X DVDD 19 1700 800 200 D 50 50 1 1 W X EP PAD 2150 -850 200 U 50 50 1 1 W ENDDRAW ENDDEF # # ADL5380 # DEF ADL5380 U 0 40 Y Y 1 F N F0 "U" 0 100 60 H V C CNN F1 "ADL5380" 0 -150 60 H V C CNN F2 "" 50 -600 60 V V C CNN F3 "" 50 -600 60 V V C CNN DRAW S -750 -600 700 550 0 1 0 N X GND 1 -350 -800 200 U 50 50 1 1 W X GND 2 -250 -800 200 U 50 50 1 1 W X IHI 3 900 350 200 L 50 50 1 1 O X ILO 4 900 250 200 L 50 50 1 1 O X GND 5 -150 -800 200 U 50 50 1 1 W X VCC1 6 250 750 200 D 50 50 1 1 W X ENBL 7 -150 750 200 D 50 50 1 1 I X GND 8 -50 -800 200 U 50 50 1 1 W X LOIP 9 900 50 200 L 50 50 1 1 I X LOIN 10 900 -50 200 L 50 50 1 1 I X GND 20 450 -800 200 U 50 50 1 1 W X GND 11 50 -800 200 U 50 50 1 1 W X RFIN 21 -950 50 200 R 50 50 1 1 I X NC 12 -350 750 200 D 50 50 1 1 N N X RFIP 22 -950 -50 200 R 50 50 1 1 I X VCC2 13 150 750 200 D 50 50 1 1 W X GND 23 550 -800 200 U 50 50 1 1 W X GND 14 150 -800 200 U 50 50 1 1 W X VCC3 24 50 750 200 D 50 50 1 1 W X QLO 15 900 -350 200 L 50 50 1 1 O X EP 25 -450 -800 200 U 50 50 1 1 W X QHI 16 900 -250 200 L 50 50 1 1 O X GND 17 250 -800 200 U 50 50 1 1 W X GND 18 350 -800 200 U 50 50 1 1 W X ADJ 19 -250 750 200 D 50 50 1 1 P ENDDRAW ENDDEF # # ADL5801 # DEF ADL5801 U 0 40 Y Y 1 F N F0 "U" 800 -200 60 H V C CNN F1 "ADL5801" 950 1000 60 H V C CNN F2 "" 0 50 60 H V C CNN F3 "" 0 50 60 H V C CNN DRAW S -150 -150 900 950 0 1 0 N X GND 1 -350 650 200 R 50 50 1 1 W X GND 2 -350 550 200 R 50 50 1 1 W X LOIP 3 -350 450 200 R 50 50 1 1 I X LOIN 4 -350 350 200 R 50 50 1 1 I X GND 5 -350 250 200 R 50 50 1 1 W X GND 6 -350 150 200 R 50 50 1 1 W X VPLO 7 150 -350 200 U 50 50 1 1 W X GND 8 250 -350 200 U 50 50 1 1 W X ENBL 9 350 -350 200 U 50 50 1 1 I X VSET 10 450 -350 200 U 50 50 1 1 I X IFOP 20 550 1150 200 D 50 50 1 1 O X DETO 11 550 -350 200 U 50 50 1 1 O X IFON 21 450 1150 200 D 50 50 1 1 O X GND 12 650 -350 200 U 50 50 1 1 W X NC 22 350 1150 200 D 50 50 1 1 N X VPDT 13 1100 150 200 L 50 50 1 1 W X GND 23 250 1150 200 D 50 50 1 1 W X GND 14 1100 250 200 L 50 50 1 1 W X VPLO 24 150 1150 200 D 50 50 1 1 W X RFIN 15 1100 350 200 L 50 50 1 1 I X RFIP 16 1100 450 200 L 50 50 1 1 I X GND 17 1100 550 200 L 50 50 1 1 W X VPRF 18 1100 650 200 L 50 50 1 1 W X GND 19 650 1150 200 D 50 50 1 1 W X PAD PAD 50 -350 200 U 50 50 1 1 P ENDDRAW ENDDEF # # AOZ1280 # DEF AOZ1280 U 0 40 Y Y 1 F N F0 "U" 300 -200 60 H V C CNN F1 "AOZ1280" 150 250 60 H V C CNN F2 "" -100 -700 60 H V C CNN F3 "" -100 -700 60 H V C CNN DRAW S -300 -150 350 200 0 1 0 N X BST 1 550 150 200 L 50 50 1 1 P X GND 2 0 -350 200 U 50 50 1 1 W X FB 3 550 -100 200 L 50 50 1 1 I X EN 4 -500 50 200 R 50 50 1 1 I X VIN 5 -500 150 200 R 50 50 1 1 W X LX 6 550 50 200 L 50 50 1 1 O ENDDRAW ENDDEF # # AOZ1281 # DEF AOZ1281 U 0 40 Y Y 1 F N F0 "U" 250 -250 60 H V C CNN F1 "AOZ1281" 100 250 60 H V C CNN F2 "" 0 -300 60 H V C CNN F3 "" 0 -300 60 H V C CNN DRAW S -300 200 300 -200 0 1 0 N X LX 1 500 50 200 L 50 50 1 1 w X VIN 2 -500 150 200 R 50 50 1 1 W X VIN 3 -500 50 200 R 50 50 1 1 W X EN 4 -500 -50 200 R 50 50 1 1 I X FB 5 500 -50 200 L 50 50 1 1 I X GND 6 0 -400 200 U 50 50 1 1 W X GND 7 -100 -400 200 U 50 50 1 1 W X BST 8 500 150 200 L 50 50 1 1 O X EP 9 100 -400 200 U 50 50 1 1 P ENDDRAW ENDDEF # # BEND # DEF BEND F 0 40 Y Y 1 F N F0 "F" 0 -100 60 H V C CNN F1 "BEND" 150 150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -25 100 -25 25 25 -25 100 -25 N P 5 0 1 0 100 -25 100 25 25 25 25 100 -25 100 N X ~ 1 0 200 100 D 50 50 1 1 P X ~ 2 200 0 100 L 50 50 1 1 P ENDDRAW ENDDEF # # BRANCHLINE # DEF BRANCHLINE Z 0 40 Y Y 1 F N F0 "Z" 100 -200 60 H V C CNN F1 "BRANCHLINE" 50 300 60 H V C CNN F2 "" 50 -150 60 H V C CNN F3 "" 50 -150 60 H V C CNN DRAW S -150 -100 -150 -100 0 1 0 N S -150 -100 -150 -100 0 1 0 N S 150 150 -150 -100 0 1 20 N X ~ 1 -350 150 200 R 50 50 1 1 P X ~ 2 350 150 200 L 50 50 1 1 P X ~ 3 -350 -100 200 R 50 50 1 1 P X ~ 4 350 -100 200 L 50 50 1 1 P ENDDRAW ENDDEF # # CONN_15X2 # DEF CONN_15X2 P 0 10 Y N 1 F N F0 "P" 0 800 60 H V C CNN F1 "CONN_15X2" 0 -50 50 V V C CNN F2 "" 0 150 60 H V C CNN F3 "" 0 150 60 H V C CNN DRAW S -100 750 100 -750 0 1 0 N X P1 1 -400 700 300 R 60 30 1 1 P I X P2 2 -400 600 300 R 60 30 1 1 P I X P3 3 -400 500 300 R 60 30 1 1 P I X P4 4 -400 400 300 R 60 30 1 1 P I X P5 5 -400 300 300 R 60 30 1 1 P I X P6 6 -400 200 300 R 60 30 1 1 P I X P7 7 -400 100 300 R 60 30 1 1 P I X P8 8 -400 0 300 R 60 30 1 1 P I X P9 9 -400 -100 300 R 60 30 1 1 P I X P10 10 -400 -200 300 R 60 30 1 1 P I X P20 20 400 300 300 L 60 30 1 1 P I X P30 30 400 -700 300 L 60 30 1 1 P I X P11 11 -400 -300 300 R 60 30 1 1 P I X P21 21 400 200 300 L 60 30 1 1 P I X P12 12 -400 -400 300 R 60 30 1 1 P I X P22 22 400 100 300 L 60 30 1 1 P I X P13 13 -400 -500 300 R 60 30 1 1 P I X P23 23 400 0 300 L 60 30 1 1 P I X P14 14 -400 -600 300 R 60 30 1 1 P I X P24 24 400 -100 300 L 60 30 1 1 P I X P15 15 -400 -700 300 R 60 30 1 1 P I X P25 25 400 -200 300 L 60 30 1 1 P I X P16 16 400 700 300 L 60 30 1 1 P I X 26 26 400 -300 300 L 60 30 1 1 I I X P17 17 400 600 300 L 60 30 1 1 P I X P27 27 400 -400 300 L 60 30 1 1 P I X P18 18 400 500 300 L 60 30 1 1 P I X P28 28 400 -500 300 L 60 30 1 1 P I X P19 19 400 400 300 L 60 30 1 1 P I X P29 29 400 -600 300 L 60 30 1 1 P I ENDDRAW ENDDEF # # CRYSTAL_SMD4 # DEF CRYSTAL_SMD4 X 0 40 N N 1 F N F0 "X" 0 150 60 H V C CNN F1 "CRYSTAL_SMD4" 0 -150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 16 -100 100 -100 -100 N P 2 0 1 16 100 100 100 -100 N P 5 0 1 12 -50 50 50 50 50 -50 -50 -50 -50 50 f X 1 1 -300 0 200 R 40 40 1 1 P X 2 2 -100 -200 100 U 40 40 1 1 P X 3 3 300 0 200 L 40 40 1 1 P X 4 4 100 -200 100 U 40 40 1 1 P ENDDRAW ENDDEF # # FDC6329L # DEF FDC6329L U 0 40 Y Y 1 F N F0 "U" 400 -450 60 H V C CNN F1 "FDC6329L" 250 300 60 H V C CNN F2 "" -1200 -500 60 H V C CNN F3 "" -1200 -500 60 H V C CNN $FPLIST 6-SSOT SSOT-6 $ENDFPLIST DRAW S -450 250 450 -350 0 1 0 N S 300 150 450 -50 0 1 0 N P 2 0 1 0 -100 -150 -150 -150 N P 2 0 1 0 -100 -100 -100 -200 N P 2 0 1 0 -100 150 -400 150 N P 2 0 1 0 -50 50 50 50 N P 2 0 1 0 -50 100 50 100 N P 2 0 1 0 0 -50 -400 -50 N P 2 0 1 0 100 150 450 150 N P 2 0 1 0 450 -250 0 -250 N P 3 0 1 0 -150 -150 -400 -150 -400 -250 N P 3 0 1 0 -50 100 -50 150 -100 150 N P 3 0 1 0 50 100 50 150 100 150 N P 6 0 1 0 0 50 0 -100 -50 -100 -50 -200 0 -200 0 -250 N X R2 1 750 -250 300 L 50 50 1 1 P X Vout,C1 2 750 -50 300 L 50 50 1 1 P X Vout,C1 3 750 150 300 L 50 50 1 1 P X Vin,R1 4 -700 150 300 R 50 50 1 1 P X ON/OFF 5 -700 -250 300 R 50 50 1 1 I X R1,C1 6 -700 -50 300 R 50 50 1 1 P ENDDRAW ENDDEF # # HMC313 # DEF HMC313 U 0 40 Y Y 1 F N F0 "U" 350 300 60 H V C CNN F1 "HMC313" 250 800 60 H V C CNN F2 "" 100 0 60 H V C CNN F3 "" 100 0 60 H V C CNN DRAW S -250 350 400 750 0 1 0 N X RFOUT 1 600 650 200 L 50 50 1 1 O X GND 2 -50 150 200 U 50 50 1 1 W X RFIN 3 -450 650 200 R 50 50 1 1 I X GND 4 150 150 200 U 50 50 1 1 W X GND 5 250 150 200 U 50 50 1 1 W X GND 6 50 150 200 U 50 50 1 1 W ENDDRAW ENDDEF # # HMC431LP4 # DEF HMC431LP4 U 0 40 Y Y 1 F N F0 "U" 300 -350 60 H V C CNN F1 "HMC431LP4" 200 300 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST VQFN-24 $ENDFPLIST DRAW S -300 250 400 -300 0 1 0 N X VCC 20 -600 150 300 R 60 60 1 1 W X VTUNE 22 -600 -200 300 R 60 60 1 1 I X GND 15 700 -100 300 L 60 60 1 1 W X RFOUT 16 700 150 300 L 60 60 1 1 O X PAD PAD 700 -200 300 L 60 60 1 1 W ENDDRAW ENDDEF # # L78L-SOT-89 # DEF L78L-SOT-89 U 0 40 Y Y 1 F N F0 "U" 250 -100 60 H V C CNN F1 "L78L-SOT-89" 50 300 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT-89 $ENDFPLIST DRAW S 300 250 -300 -50 0 1 0 N X VOUT 1 500 150 200 L 50 50 1 1 w X GND 2 0 -250 200 U 50 50 1 1 W X VIN 3 -500 150 200 R 50 50 1 1 W ENDDRAW ENDDEF # # LDS3985 # DEF LDS3985 U 0 40 Y Y 1 F N F0 "U" 250 -200 60 H V C CNN F1 "LDS3985" 100 200 60 H V C CNN F2 "" -100 -200 60 H V C CNN F3 "" -100 -200 60 H V C CNN DRAW S -300 -150 300 150 0 1 0 N X VIN 1 -500 100 200 R 50 50 1 1 W X GND 2 -500 -100 200 R 50 50 1 1 W X EN 3 -500 0 200 R 50 50 1 1 I X BYPASS 4 500 -100 200 L 50 50 1 1 P X VOUT 5 500 100 200 L 50 50 1 1 w ENDDRAW ENDDEF # # LP2985 # DEF LP2985 U 0 40 Y Y 1 F N F0 "U" 350 -200 60 H V C CNN F1 "LP2985" 200 200 60 H V C CNN F2 "" -250 -200 60 H V C CNN F3 "" -250 -200 60 H V C CNN $FPLIST SOT-23-5 $ENDFPLIST DRAW S -350 -150 400 150 0 1 0 N X VIN 1 -550 100 200 R 50 50 1 1 W X GND 2 -550 0 200 R 50 50 1 1 W X ON/~OFF~ 3 -550 -100 200 R 50 50 1 1 I X BYPASS 4 600 -100 200 L 50 50 1 1 P X VOUT 5 600 100 200 L 50 50 1 1 w ENDDRAW ENDDEF # # LPC4320 # DEF LPC4320 U 0 40 Y Y 1 F N F0 "U" 0 -100 50 H V C CNN F1 "LPC4320" 0 100 50 H V C CNN F2 "MODULE" 0 0 50 H I C CNN F3 "DOCUMENTATION" 0 0 50 H I C CNN DRAW S -1550 3000 1450 -3800 0 1 0 N X P4_0 1 1750 500 300 L 50 50 1 1 B X ADC1 2 -1850 -350 300 R 50 50 1 1 U X P4_1 3 1750 400 300 L 50 50 1 1 B X VSSIO_4 4 -100 -4100 300 U 50 50 1 1 W X VDDIO_5 5 500 3300 300 D 50 50 1 1 W X ADC0 6 -1850 -250 300 R 50 50 1 1 U X P4_3 7 1750 200 300 L 50 50 1 1 B X P4_2 8 1750 300 300 L 50 50 1 1 B X P4_4 9 1750 100 300 L 50 50 1 1 B X P4_5 10 1750 0 300 L 50 50 1 1 B X USB_DM 20 -1850 -1100 300 R 50 50 1 1 U X TMS 30 -1850 -3650 300 R 50 50 1 1 I X VSSIO_40 40 0 -4100 300 U 50 50 1 1 W X P1_7 50 -1850 1900 300 R 50 50 1 1 B X P1_13 60 -1850 1300 300 R 50 50 1 1 B X P1_20 70 -1850 600 300 R 50 50 1 1 B X P6_4 80 1750 -1800 300 L 50 50 1 1 B X DM1 90 -1850 100 300 R 50 50 1 1 B X P4_6 11 1750 -100 300 L 50 50 1 1 B X USB_VBUS 21 -1850 -1500 300 R 50 50 1 1 U X TDO 31 -1850 -3550 300 R 50 50 1 1 O X VDDIO_41 41 300 3300 300 D 50 50 1 1 W X P1_8 51 -1850 1800 300 R 50 50 1 1 B X P1_14 61 -1850 1200 300 R 50 50 1 1 B X VDDIO_71 71 200 3300 300 D 50 50 1 1 W X P2_1 81 1750 2700 300 L 50 50 1 1 B X P2_5 91 1750 2300 300 L 50 50 1 1 B X XTAL1 12 -1850 -2350 300 R 50 50 1 1 U X USB_ID 22 -1850 -1300 300 R 50 50 1 1 U X P0_0 32 -1850 2800 300 R 50 50 1 1 B X P1_1 42 -1850 2500 300 R 50 50 1 1 B X P1_9 52 -1850 1700 300 R 50 50 1 1 B X P1_15 62 -1850 1100 300 R 50 50 1 1 B X P9_6 72 1750 -3600 300 L 50 50 1 1 B X P6_5 82 1750 -1900 300 L 50 50 1 1 B X SCL 92 -1850 -2200 300 R 50 50 1 1 B X XTAL2 13 -1850 -2450 300 R 50 50 1 1 U X USB_VSSA_REF 23 -1850 -1800 300 R 50 50 1 1 U X P4_9 33 1750 -400 300 L 50 50 1 1 B X P1_2 43 -1850 2400 300 R 50 50 1 1 B X P1_10 53 -1850 1600 300 R 50 50 1 1 B X P5_6 63 1750 -1200 300 L 50 50 1 1 B X P6_0 73 1750 -1400 300 L 50 50 1 1 B X P6_6 83 1750 -2000 300 L 50 50 1 1 B X SDA 93 -1850 -2100 300 R 50 50 1 1 B X P4_7 14 1750 -200 300 L 50 50 1 1 B X USB_RREF 24 -1850 -1400 300 R 50 50 1 1 U X P0_1 34 -1850 2700 300 R 50 50 1 1 B X P1_3 44 -1850 2300 300 R 50 50 1 1 B X P5_3 54 1750 -900 300 L 50 50 1 1 B X P1_16 64 -1850 1000 300 R 50 50 1 1 B X P6_1 74 1750 -1500 300 L 50 50 1 1 B X P2_2 84 1750 2600 300 L 50 50 1 1 B X VDDREG_94 94 -500 3300 300 D 50 50 1 1 W X P4_8 15 1750 -300 300 L 50 50 1 1 B X VDDREG_25 25 -300 3300 300 D 50 50 1 1 W X P4_10 35 1750 -500 300 L 50 50 1 1 B X CLK0 45 -1850 400 300 R 50 50 1 1 B X P1_11 55 -1850 1500 300 R 50 50 1 1 B X P5_7 65 1750 -1300 300 L 50 50 1 1 B X P2_0 75 1750 2800 300 L 50 50 1 1 B X P6_7 85 1750 -2100 300 L 50 50 1 1 B X P2_6 95 1750 2200 300 L 50 50 1 1 B X USB_VDDA3V3_DRIVER 16 -1850 -1700 300 R 50 50 1 1 U X TDI 26 -1850 -3450 300 R 50 50 1 1 I X VDDIO_36 36 400 3300 300 D 50 50 1 1 W X P5_2 46 1750 -800 300 L 50 50 1 1 B X P1_12 56 -1850 1400 300 R 50 50 1 1 B X P1_17 66 -1850 900 300 R 50 50 1 1 B X VSSIO_76 76 100 -4100 300 U 50 50 1 1 W X P6_8 86 1750 -2200 300 L 50 50 1 1 B X P2_7 96 1750 2100 300 L 50 50 1 1 B X USB_VDDA3V3 17 -1850 -1600 300 R 50 50 1 1 U X TCK 27 -1850 -3350 300 R 50 50 1 1 I X P5_0 37 1750 -600 300 L 50 50 1 1 B X P1_4 47 -1850 2200 300 R 50 50 1 1 B X P5_4 57 1750 -1000 300 L 50 50 1 1 B X P1_18 67 -1850 800 300 R 50 50 1 1 B X VDDIO_77 77 100 3300 300 D 50 50 1 1 W X P2_3 87 1750 2500 300 L 50 50 1 1 B X P6_9 97 1750 -2300 300 L 50 50 1 1 B X USB_DP 18 -1850 -1200 300 R 50 50 1 1 U X DBGEN 28 -1850 200 300 R 50 50 1 1 I X P1_0 38 -1850 2600 300 R 50 50 1 1 B X P1_5 48 -1850 2100 300 R 50 50 1 1 B X P5_5 58 1750 -1100 300 L 50 50 1 1 B X P1_19 68 -1850 700 300 R 50 50 1 1 B X P6_2 78 1750 -1600 300 L 50 50 1 1 B X P2_4 88 1750 2400 300 L 50 50 1 1 B X P2_8 98 1750 2000 300 L 50 50 1 1 B X USB_VSSA_TERM 19 -1850 -1900 300 R 50 50 1 1 U X TRSTN 29 -1850 -3250 300 R 50 50 1 1 I X P5_1 39 1750 -700 300 L 50 50 1 1 B X P1_6 49 -1850 2000 300 R 50 50 1 1 B X VDDREG_59 59 -400 3300 300 D 50 50 1 1 W X P9_5 69 1750 -3500 300 L 50 50 1 1 B X P6_3 79 1750 -1700 300 L 50 50 1 1 B X DP1 89 -1850 0 300 R 50 50 1 1 B X CLK2 99 -1850 300 300 R 50 50 1 1 B X P6_10 100 1750 -2400 300 L 50 50 1 1 B X P7_0 110 1750 -2700 300 L 50 50 1 1 B X PF_4 120 1750 -3700 300 L 50 50 1 1 B X WAKEUP0 130 -1850 -2950 300 R 50 50 1 1 U X P7_7 140 1750 -3400 300 L 50 50 1 1 B X P6_11 101 1750 -2500 300 L 50 50 1 1 B X VDDIO_111 111 -100 3300 300 D 50 50 1 1 W X P3_5 121 1750 900 300 L 50 50 1 1 B X VDDREG_131 131 -600 3300 300 D 50 50 1 1 W X VDDIO_141 141 -200 3300 300 D 50 50 1 1 W X P2_9 102 1750 1900 300 L 50 50 1 1 B X P3_0 112 1750 1400 300 L 50 50 1 1 B X P3_6 122 1750 800 300 L 50 50 1 1 B X P7_4 132 1750 -3100 300 L 50 50 1 1 B X ADC6 142 -1850 -850 300 R 50 50 1 1 U X P6_12 103 1750 -2600 300 L 50 50 1 1 B X P7_1 113 1750 -2800 300 L 50 50 1 1 B X P3_7 123 1750 700 300 L 50 50 1 1 B X P7_5 133 1750 -3200 300 L 50 50 1 1 B X ADC2 143 -1850 -450 300 R 50 50 1 1 U X P2_10 104 1750 1800 300 L 50 50 1 1 B X P3_1 114 1750 1300 300 L 50 50 1 1 B X P3_8 124 1750 600 300 L 50 50 1 1 B X P7_6 134 1750 -3300 300 L 50 50 1 1 B X ADC5 144 -1850 -750 300 R 50 50 1 1 U X P2_11 105 1750 1700 300 L 50 50 1 1 B X P7_2 115 1750 -2900 300 L 50 50 1 1 B X RTCX1 125 -1850 -2650 300 R 50 50 1 1 U X VSSA 135 -200 -4100 300 U 50 50 1 1 W X P2_12 106 1750 1600 300 L 50 50 1 1 B X P3_2 116 1750 1200 300 L 50 50 1 1 B X RTCX2 126 -1850 -2750 300 R 50 50 1 1 U X ADC7 136 -1850 -950 300 R 50 50 1 1 U X VDDIO_107 107 0 3300 300 D 50 50 1 1 W X P7_3 117 1750 -3000 300 L 50 50 1 1 B X VBAT 127 -1850 -2850 300 R 50 50 1 1 U X VDDA 137 600 3300 300 D 50 50 1 1 W X P2_13 108 1750 1500 300 L 50 50 1 1 B X P3_3 118 1750 1100 300 L 50 50 1 1 B X NRESET 128 -1850 -100 300 R 50 50 1 1 U X ADC4 138 -1850 -650 300 R 50 50 1 1 U X VSSIO_109 109 200 -4100 300 U 50 50 1 1 W X P3_4 119 1750 1000 300 L 50 50 1 1 B X ALARM 129 -1850 -3050 300 R 50 50 1 1 U X ADC3 139 -1850 -550 300 R 50 50 1 1 U ENDDRAW ENDDEF # # LPC4320_BGA # DEF LPC4320_BGA U 0 40 Y Y 1 F N F0 "U" 0 -100 50 H V C CNN F1 "LPC4320_BGA" 0 100 50 H V C CNN F2 "MODULE" 0 0 50 H I C CNN F3 "DOCUMENTATION" 0 0 50 H I C CNN DRAW S -1550 3000 1450 -3800 0 1 0 N X ADC1 A1 -1850 -350 300 R 50 50 1 1 B X XTAL1 B1 -1850 -2350 300 R 50 50 1 1 I X XTAL2 C1 -1850 -2450 300 R 50 50 1 1 O X USB_VDDA3V3_DRIVER D1 -1850 -1700 300 R 50 50 1 1 I X USB_DP E1 -1850 -1200 300 R 50 50 1 1 B X USB_ID F1 -1850 -1300 300 R 50 50 1 1 I X P0_1 G1 -1850 2700 300 R 50 50 1 1 B X P1_0 H1 -1850 2600 300 R 50 50 1 1 B X P1_3 J1 -1850 2300 300 R 50 50 1 1 B X P1_2 K1 -1850 2400 300 R 50 50 1 1 B X ADC0 A2 -1850 -250 300 R 50 50 1 1 B X VDDA B2 600 3300 300 D 50 50 1 1 W X VSSA C2 -200 -4100 300 U 50 50 1 1 W X USB_VDDA3V3 D2 -1850 -1600 300 R 50 50 1 1 W X USB_DM E2 -1850 -1100 300 R 50 50 1 1 B X USB_VSSA_REF F2 -1850 -1800 300 R 50 50 1 1 I X P0_0 G2 -1850 2800 300 R 50 50 1 1 B X TCK H2 -1850 -3350 300 R 50 50 1 1 I X P1_4 J2 -1850 2200 300 R 50 50 1 1 B X P1_1 K2 -1850 2500 300 R 50 50 1 1 B X ADC3 A3 -1850 -550 300 R 50 50 1 1 B X ADC2 B3 -1850 -450 300 R 50 50 1 1 B X ALARM C3 -1850 -3050 300 R 50 50 1 1 B X USB_VSSA_TERM D3 -1850 -1900 300 R 50 50 1 1 I X USB_VBUS E3 -1850 -1500 300 R 50 50 1 1 I X USB_RREF F3 -1850 -1400 300 R 50 50 1 1 P X TDI G3 -1850 -3450 300 R 50 50 1 1 I X TDO H3 -1850 -3550 300 R 50 50 1 1 O X VSSIO J3 550 -4100 300 U 50 50 1 1 W X CLK0 K3 -1850 400 300 R 50 50 1 1 B X WAKEUP0 A4 -1850 -2950 300 R 50 50 1 1 B X TRSTN B4 -1850 -3250 300 R 50 50 1 1 I X TMS C4 -1850 -3650 300 R 50 50 1 1 I X VSSIO_40 D4 0 -4100 300 U 50 50 1 1 W X VDDREG_94 E4 -500 3300 300 D 50 50 1 1 W X VDDREG_59 F4 -400 3300 300 D 50 50 1 1 W X P1_7 G4 -1850 1900 300 R 50 50 1 1 B X PF_4 H4 1750 -3700 300 L 50 50 1 1 B X P1_5 J4 -1850 2100 300 R 50 50 1 1 B X P1_6 K4 -1850 2000 300 R 50 50 1 1 B X RTCX1 A5 -1850 -2650 300 R 50 50 1 1 I X RTCX2 B5 -1850 -2750 300 R 50 50 1 1 O X VBAT C5 -1850 -2850 300 R 50 50 1 1 W X VSSIO_76 D5 100 -4100 300 U 50 50 1 1 W X VDDREG_131 E5 -600 3300 300 D 50 50 1 1 W X P2_2 F5 1750 2600 300 L 50 50 1 1 B X P6_1 G5 1750 -1500 300 L 50 50 1 1 B X P1_8 H5 -1850 1800 300 R 50 50 1 1 B X P1_9 J5 -1850 1700 300 R 50 50 1 1 B X VDDIO_36 K5 400 3300 300 D 50 50 1 1 W X DBGEN A6 -1850 200 300 R 50 50 1 1 I X NRESET B6 -1850 -100 300 R 50 50 1 1 I X P2_8 C6 1750 2000 300 L 50 50 1 1 B X SCL D6 -1850 -2200 300 R 50 50 1 1 B X SDA E6 -1850 -2100 300 R 50 50 1 1 B X P6_4 F6 1750 -1800 300 L 50 50 1 1 B X P3_2 G6 1750 1200 300 L 50 50 1 1 B X P1_10 H6 -1850 1600 300 R 50 50 1 1 B X VSSIO J6 650 -4100 300 U 50 50 1 1 W X CLK2 K6 -1850 300 300 R 50 50 1 1 B X P3_3 A7 1750 1100 300 L 50 50 1 1 B X P3_5 B7 1750 900 300 L 50 50 1 1 B X P3_6 C7 1750 800 300 L 50 50 1 1 B X P3_7 D7 1750 700 300 L 50 50 1 1 B X P3_8 E7 1750 600 300 L 50 50 1 1 B X P3_1 F7 1750 1300 300 L 50 50 1 1 B X P2_1 G7 1750 2700 300 L 50 50 1 1 B X P6_0 H7 1750 -1400 300 L 50 50 1 1 B X P1_11 J7 -1850 1500 300 R 50 50 1 1 B X P1_12 K7 -1850 1400 300 R 50 50 1 1 B X P3_0 A8 1750 1400 300 L 50 50 1 1 B X P3_4 B8 1750 1000 300 L 50 50 1 1 B X VSSIO_4 C8 -100 -4100 300 U 50 50 1 1 W X P2_3 D8 1750 2500 300 L 50 50 1 1 B X P2_10 E8 1750 1800 300 L 50 50 1 1 B X P6_9 F8 1750 -2300 300 L 50 50 1 1 B X VSSIO_109 G8 200 -4100 300 U 50 50 1 1 W X P1_13 H8 -1850 1300 300 R 50 50 1 1 B X P1_14 J8 -1850 1200 300 R 50 50 1 1 B X P1_15 K8 -1850 1100 300 R 50 50 1 1 B X P2_11 A9 1750 1700 300 L 50 50 1 1 B X P2_12 B9 1750 1600 300 L 50 50 1 1 B X P6_11 C9 1750 -2500 300 L 50 50 1 1 B X P2_4 D9 1750 2400 300 L 50 50 1 1 B X DP1 E9 -1850 0 300 R 50 50 1 1 B X P6_5 F9 1750 -1900 300 L 50 50 1 1 B X P2_6 G9 1750 2200 300 L 50 50 1 1 B X P1_16 H9 -1850 1000 300 R 50 50 1 1 B X P6_2 J9 1750 -1600 300 L 50 50 1 1 B X P1_19 K9 -1850 700 300 R 50 50 1 1 B X P2_13 A10 1750 1500 300 L 50 50 1 1 B X P2_9 B10 1750 1900 300 L 50 50 1 1 B X P2_7 C10 1750 2100 300 L 50 50 1 1 B X P2_5 D10 1750 2300 300 L 50 50 1 1 B X DM1 E10 -1850 100 300 R 50 50 1 1 B X VDDIO_5 F10 500 3300 300 D 50 50 1 1 W X P2_0 G10 1750 2800 300 L 50 50 1 1 B X P1_17 H10 -1850 900 300 R 50 50 1 1 B X P1_18 J10 -1850 800 300 R 50 50 1 1 B X P1_20 K10 -1850 600 300 R 50 50 1 1 B ENDDRAW ENDDEF # # LT1817 # DEF LT1817 U 0 20 Y Y 4 L N F0 "U" 150 150 60 H V C CNN F1 "LT1817" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN ALIAS LM393 DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X _ 2 -500 -100 300 R 40 40 1 1 I X + 3 -500 100 300 R 40 40 1 1 I X V+ 4 -100 400 250 D 40 40 1 1 W X V- 13 -100 -400 250 U 40 40 1 1 W X + 5 -500 100 300 R 40 40 2 1 I X _ 6 -500 -100 300 R 40 40 2 1 I X ~ 7 500 0 300 L 40 40 2 1 C X ~ 10 500 0 300 L 40 40 3 1 C X _ 11 -500 -100 300 R 40 40 3 1 I X + 12 -500 100 300 R 40 40 3 1 I X + 14 -500 100 300 R 40 40 4 1 I X _ 15 -500 -100 300 R 40 40 4 1 I X ~ 16 500 0 300 L 40 40 4 1 C ENDDRAW ENDDEF # # LT6230 # DEF LT6230 U 0 20 Y Y 1 F N F0 "U" 150 150 60 H V C CNN F1 "LT6230" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT23-6 SOT-23-6 $ENDFPLIST DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X V- 2 -100 -400 250 U 40 40 1 1 W X + 3 -500 100 300 R 40 40 1 1 I X _ 4 -500 -100 300 R 40 40 1 1 I X ~EN 5 0 -400 300 U 40 40 1 1 I X V+ 6 -100 400 250 D 40 40 1 1 W ENDDRAW ENDDEF # # LT6232 # DEF LT6232 U 0 20 Y Y 4 L N F0 "U" 150 150 60 H V C CNN F1 "LT6232" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT23-6 SOT-23-6 $ENDFPLIST DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X - 2 -500 -100 300 R 40 40 1 1 I X + 3 -500 100 300 R 40 40 1 1 I X V+ 4 -100 400 250 D 40 40 1 1 W X V- 13 -100 -400 250 U 40 40 1 1 W X + 5 -500 100 300 R 40 40 2 1 I X - 6 -500 -100 300 R 40 40 2 1 I X ~ 7 500 0 300 L 40 40 2 1 C X ~ 10 500 0 300 L 40 40 3 1 C X - 11 -500 -100 300 R 40 40 3 1 I X + 12 -500 100 300 R 40 40 3 1 I X + 14 -500 100 300 R 40 40 4 1 I X - 15 -500 -100 300 R 40 40 4 1 I X ~ 16 500 0 300 L 40 40 4 1 C ENDDRAW ENDDEF # # MAX1426 # DEF MAX1426 U 0 40 Y Y 1 F N F0 "U" 350 -750 60 H V C CNN F1 "MAX1426" 200 750 60 H V C CNN F2 "" -200 150 60 H V C CNN F3 "" -200 150 60 H V C CNN $FPLIST SSOP-28 $ENDFPLIST DRAW S -400 -700 400 700 0 1 0 N X AGND 1 -600 650 200 R 50 50 1 1 W X AVDD 2 -600 550 200 R 50 50 1 1 W X REFP 3 -600 450 200 R 50 50 1 1 O X REFIN 4 -600 350 200 R 50 50 1 1 I X REFN 5 -600 250 200 R 50 50 1 1 O X CML 6 -600 150 200 R 50 50 1 1 O X AGND 7 -600 50 200 R 50 50 1 1 W X AVDD 8 -600 -50 200 R 50 50 1 1 W X INP 9 -600 -150 200 R 50 50 1 1 I X INN 10 -600 -250 200 R 50 50 1 1 I X DVDD 20 600 -150 200 L 50 50 1 1 W X CMLP 11 -600 -350 200 R 50 50 1 1 I X DGND 21 600 -50 200 L 50 50 1 1 W X CMLN 12 -600 -450 200 R 50 50 1 1 I X DVDD 22 600 50 200 L 50 50 1 1 W X CLK 13 -600 -550 200 R 50 50 1 1 I X DGND 23 600 150 200 L 50 50 1 1 W X ~OE~/PD 14 -600 -650 200 R 50 50 1 1 I X D4 24 600 250 200 L 50 50 1 1 O X D9 15 600 -650 200 L 50 50 1 1 O X D3 25 600 350 200 L 50 50 1 1 O X D8 16 600 -550 200 L 50 50 1 1 O X D2 26 600 450 200 L 50 50 1 1 O X D7 17 600 -450 200 L 50 50 1 1 O X D1 27 600 550 200 L 50 50 1 1 O X D6 18 600 -350 200 L 50 50 1 1 O X D0 28 600 650 200 L 50 50 1 1 O X D5 19 600 -250 200 L 50 50 1 1 O ENDDRAW ENDDEF # # MAX4489 # DEF MAX4489 U 0 20 Y Y 2 F N F0 "U" 150 300 60 H V C CNN F1 "MAX4489" 150 200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST TSSOP-8 $ENDFPLIST DRAW P 2 0 1 0 -200 -200 -200 200 N P 2 0 1 0 -200 200 200 0 N P 2 0 1 0 200 0 -200 -200 N X V- 4 -100 -400 250 U 40 40 0 1 I X V+ 8 -100 400 250 D 40 40 0 1 I X ~ 1 500 0 300 L 40 40 1 1 O X - 2 -500 -100 300 R 40 40 1 1 I X + 3 -500 100 300 R 40 40 1 1 I X + 5 -500 100 300 R 40 40 2 1 I X - 6 -500 -100 300 R 40 40 2 1 I X ~ 7 500 0 300 L 40 40 2 1 O ENDDRAW ENDDEF # # MAX9939 # DEF MAX9939 U 0 40 Y Y 1 F N F0 "U" 1275 -450 60 H V C CNN F1 "MAX9939" 1150 1200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S 1350 1150 0 -350 0 1 0 N P 2 0 1 0 250 450 0 450 N P 2 0 1 0 250 650 0 650 N P 2 0 1 0 270 450 290 450 N P 2 0 1 0 270 650 290 650 N P 2 0 1 0 525 675 575 675 N P 2 0 1 0 525 900 575 900 N P 2 0 1 0 550 700 550 675 N P 2 0 1 0 550 850 550 825 N P 2 0 1 0 550 850 550 900 N P 2 0 1 0 550 1025 550 1050 N P 2 0 1 0 550 1050 550 1075 N P 2 0 1 0 550 1075 525 1050 N P 2 0 1 0 550 1075 575 1050 N P 2 0 1 0 625 475 725 600 N P 2 0 1 0 750 550 860 550 N P 2 0 1 0 820 -300 870 -300 N P 2 0 1 0 845 -275 845 -300 N P 2 0 1 0 845 -125 845 -175 N P 2 0 1 0 845 -125 845 -100 N P 2 0 1 0 845 0 845 25 N P 2 0 1 0 845 25 845 50 N P 2 0 1 0 845 50 820 25 N P 2 0 1 0 845 50 870 25 N P 2 0 1 0 874 743 894 743 N P 2 0 1 0 877 281 977 406 N P 2 0 1 0 879 558 899 558 N P 2 0 1 0 884 753 884 733 N P 2 0 1 0 945 -125 845 -125 N P 2 0 1 0 965 -130 985 -130 N P 2 0 1 0 965 20 985 20 N P 2 0 1 0 975 30 975 10 N P 2 0 1 0 1152 751 1152 726 N P 2 0 1 0 1152 901 1152 876 N P 2 0 1 0 1152 901 1152 926 N P 2 0 1 0 1152 1051 1152 1026 N P 2 0 1 0 1152 1076 1127 1051 N P 2 0 1 0 1152 1076 1152 1051 N P 2 0 1 0 1152 1076 1177 1051 N P 2 0 1 0 1350 650 1070 650 N P 2 0 1 0 1355 -50 1145 -50 N P 3 0 1 0 200 450 200 300 300 300 N P 3 0 1 0 200 650 200 850 550 850 N P 3 0 1 0 280 660 280 650 280 640 N P 3 0 1 0 350 300 325 300 300 300 N P 3 0 1 0 700 600 725 600 725 575 N P 3 0 1 0 875 355 800 355 800 550 N P 3 0 1 0 910 110 910 20 940 20 N P 3 0 1 0 952 406 977 406 977 381 N P 3 0 1 0 1005 355 1125 355 1125 645 N P 3 0 1 0 1127 726 1152 726 1177 726 N P 3 0 1 0 1350 150 910 150 910 110 N P 4 0 1 0 250 700 250 400 500 550 250 700 N P 4 0 1 0 575 900 575 1025 525 1025 525 900 N P 4 0 1 0 860 800 860 500 1070 650 860 800 N P 4 0 1 0 1150 905 805 905 805 745 860 745 N P 5 0 1 0 350 325 350 275 500 275 500 325 350 325 N P 5 0 1 0 500 550 550 550 550 350 550 300 500 300 N P 5 0 1 0 525 825 525 700 575 700 575 825 525 825 N P 5 0 1 0 820 -175 870 -175 870 -275 820 -275 820 -175 N P 5 0 1 0 820 0 820 -100 870 -100 870 0 820 0 N P 5 0 1 0 877 381 877 331 1002 331 1002 381 877 381 N P 5 0 1 0 945 -50 945 75 1145 -50 945 -175 945 -50 N P 5 0 1 0 1127 876 1177 876 1177 751 1127 751 1127 876 N P 5 0 1 0 1127 1026 1127 926 1177 926 1177 1026 1127 1026 N P 7 0 1 0 550 550 625 550 625 575 750 575 750 525 625 525 625 550 N X SCLK 1 -200 50 200 R 50 50 1 1 I X DIN 2 -200 -50 200 R 50 50 1 1 I X GND 3 700 -550 200 U 50 50 1 1 W X INA- 4 -200 450 200 R 50 50 1 1 I X INA+ 5 -200 650 200 R 50 50 1 1 I X OUTB 6 1550 -50 200 L 50 50 1 1 O X INB 7 1550 150 200 L 50 50 1 1 I X OUTA 8 1550 650 200 L 50 50 1 1 O X VCC 9 700 1350 200 D 50 50 1 1 W X ~CS 10 -200 -150 200 R 50 50 1 1 I ENDDRAW ENDDEF # # MCP1700 # DEF MCP1700 U 0 40 Y Y 1 F N F0 "U" 250 -150 60 H V C CNN F1 "MCP1700" 50 400 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT-23 $ENDFPLIST DRAW S -300 350 300 -100 0 1 0 N X GND 1 0 -400 300 U 60 60 1 1 W X VOUT 2 600 250 300 L 60 60 1 1 w X VIN 3 -600 250 300 R 60 60 1 1 W ENDDRAW ENDDEF # # MCP4022 # DEF MCP4022 U 0 40 Y Y 1 F N F0 "U" 150 -200 60 H V C CNN F1 "MCP4022" 0 200 60 H V C CNN F2 "" -100 -300 60 H V C CNN F3 "" -100 -300 60 H V C CNN $FPLIST SOT-23-6 $ENDFPLIST DRAW S -250 -150 200 150 0 1 0 N X VDD 1 -450 100 200 R 50 50 1 1 W X VSS 2 -450 0 200 R 50 50 1 1 W X U/~D~ 3 -450 -100 200 R 50 50 1 1 I X ~CS~ 4 400 -100 200 L 50 50 1 1 I X W 5 400 0 200 L 50 50 1 1 P X A 6 400 100 200 L 50 50 1 1 P ENDDRAW ENDDEF # # MGA-25203 # DEF MGA-25203 U 0 40 Y Y 1 F N F0 "U" 650 -200 60 H V C CNN F1 "MGA-25203" 600 700 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -300 -150 700 650 0 1 0 N X RFIN 1 -500 300 200 R 50 50 1 1 I X GND 2 0 -350 200 U 50 50 1 1 W X GND 3 -100 -350 200 U 50 50 1 1 W X BCTRL 4 0 850 200 D 50 50 1 1 I X BSPLY 5 150 850 200 D 50 50 1 1 W X BSW 6 -100 850 200 D 50 50 1 1 I X GND 10 200 -350 200 U 50 50 1 1 W X RFOUT 11 900 300 200 L 50 50 1 1 O X GND 12 300 -350 200 U 50 50 1 1 W X VCC 13 300 850 200 D 50 50 1 1 W X GND 14 400 -350 200 U 50 50 1 1 W X GND 16 100 -350 200 U 50 50 1 1 W X GND EP 500 -350 200 U 50 50 1 1 W ENDDRAW ENDDEF # # MITER # DEF MITER F 0 40 Y Y 1 F N F0 "F" 0 -100 60 H V C CNN F1 "MITER" 150 150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -25 100 -25 25 25 -25 100 -25 N P 5 0 1 0 100 -25 100 25 25 25 25 100 -25 100 N X ~ 1 0 200 100 D 50 50 1 1 P X ~ 2 200 0 100 L 50 50 1 1 P ENDDRAW ENDDEF # # MOS_N # DEF MOS_N Q 0 0 Y Y 1 F N F0 "Q" 10 170 60 H V R CNN F1 "MOS_N" 10 -150 60 H V R CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN ALIAS MOSFET_N DRAW P 2 0 1 8 -50 -100 -50 100 N P 2 0 1 10 0 -150 0 150 N P 2 0 1 0 100 -100 0 -100 N P 2 0 1 0 100 100 0 100 N P 3 0 1 8 100 -100 100 0 50 0 N P 5 0 1 8 50 30 50 -30 0 0 50 30 50 30 N X G 1 -200 0 150 R 40 40 1 1 I X S 2 100 -200 100 U 40 40 1 1 P X D 3 100 200 100 D 40 40 1 1 P ENDDRAW ENDDEF # # MOS_N_GSD # DEF MOS_N_GSD Q 0 0 Y Y 1 F N F0 "Q" 10 170 60 H V R CNN F1 "MOS_N_GSD" 10 -150 60 H V R CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 8 -50 -100 -50 100 N P 2 0 1 10 0 -150 0 150 N P 2 0 1 0 100 -100 0 -100 N P 2 0 1 0 100 100 0 100 N P 3 0 1 8 100 -100 100 0 50 0 N P 5 0 1 8 50 30 50 -30 0 0 50 30 50 30 N X G 1 -200 0 150 R 40 40 1 1 I X S 2 100 -200 100 U 40 40 1 1 P X D 3 100 200 100 D 40 40 1 1 P ENDDRAW ENDDEF # # MOS_P_BSS84 # DEF MOS_P_BSS84 Q 0 40 Y N 1 F N F0 "Q" 0 190 60 H V R CNN F1 "MOS_P_BSS84" 0 -180 60 H V R CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN ALIAS MOSFET_P DRAW P 2 0 1 8 -50 -100 -50 100 N P 2 0 1 10 0 -150 0 150 N P 2 0 1 8 30 0 0 0 N P 2 0 1 0 100 -100 0 -100 N P 2 0 1 0 100 100 0 100 N P 3 0 1 0 80 0 100 0 100 -100 N P 5 0 1 8 30 40 30 -30 80 0 30 40 30 40 N X G 1 -200 0 150 R 40 40 1 1 I X S 2 100 -200 100 U 40 40 1 1 P X D 3 100 200 100 D 40 40 1 1 P ENDDRAW ENDDEF # # PAT1220 # DEF PAT1220 U 0 40 Y Y 1 F N F0 "U" 200 -300 60 H V C CNN F1 "PAT1220" 50 100 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST PAT1220 $ENDFPLIST DRAW S -250 50 250 -250 0 1 0 N S -175 -50 -125 -150 0 1 0 N S -150 -150 -150 -200 0 1 0 N S -150 0 -150 -50 0 1 0 N S -60 0 -200 0 0 1 0 N S -60 25 65 -25 0 1 0 N S 125 -50 175 -150 0 1 0 N S 150 -200 -150 -200 0 1 0 N S 150 -150 150 -200 0 1 0 N S 150 -50 150 0 0 1 0 N S 200 0 65 0 0 1 0 N X ~ 1 -500 0 300 R 60 60 1 1 P X ~ 2 500 0 300 L 60 60 1 1 P X ~ 3 0 -500 300 U 60 60 1 1 P ENDDRAW ENDDEF # # POWER_DIVIDER # DEF POWER_DIVIDER U 0 40 Y Y 1 F N F0 "U" 0 400 60 H V C CNN F1 "POWER_DIVIDER" 50 -350 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 0 -200 0 50 250 N P 2 0 1 0 50 -250 -200 0 N P 2 0 1 0 150 -250 50 -250 N P 2 0 1 0 150 250 50 250 N X ~ 1 -400 0 200 R 50 50 1 1 P X ~ 2 350 250 200 L 50 50 1 1 P X ~ 3 350 -250 200 L 50 50 1 1 P X R1 4 50 250 0 L 50 50 1 1 P X R2 5 50 -250 0 L 50 50 1 1 P ENDDRAW ENDDEF # # SC189 # DEF SC189 U 0 40 Y Y 1 F N F0 "U" 100 -200 60 H V C CNN F1 "SC189" 0 200 60 H V C CNN F2 "" 0 -150 60 H V C CNN F3 "" 0 -150 60 H V C CNN $FPLIST SOT-23-5 $ENDFPLIST DRAW S -200 150 200 -150 0 1 0 N X VIN 1 -350 100 150 R 40 40 1 1 W X GND 2 -350 -100 150 R 40 40 1 1 W X EN 3 -350 0 150 R 40 40 1 1 I X VOUT 4 350 0 150 L 40 40 1 1 w X LX 5 350 100 150 L 40 40 1 1 P ENDDRAW ENDDEF # # SG-210STF # DEF SG-210STF U 0 40 Y Y 1 F N F0 "U" 300 -250 60 H V C CNN F1 "SG-210STF" 150 300 60 H V C CNN F2 "" -100 100 60 H V C CNN F3 "" -100 100 60 H V C CNN DRAW S -150 -200 300 200 0 1 0 N X ~ST 1 -350 150 200 R 50 50 1 1 I X GND 2 -350 -150 200 R 50 50 1 1 W X OUT 3 500 0 200 L 50 50 1 1 O X VCC 4 -350 0 200 R 50 50 1 1 W ENDDRAW ENDDEF # # SKY65404 # DEF SKY65404 U 0 40 Y Y 1 F N F0 "U" 350 -300 60 H V C CNN F1 "SKY65404" 250 300 60 H V C CNN F2 "" -50 0 60 H V C CNN F3 "" -50 0 60 H V C CNN $FPLIST QFN-6 $ENDFPLIST DRAW S -400 250 500 -250 0 1 0 N X V_ENABLE 1 -700 150 300 R 60 60 1 1 I X GND 2 -700 0 300 R 60 60 1 1 W X RF_IN 3 800 -150 300 L 60 60 1 1 I X RF_OUT 4 -700 -150 300 R 60 60 1 1 O X GND 5 800 0 300 L 60 60 1 1 W X VCC 6 800 150 300 L 60 60 1 1 W X PAD PAD 50 -550 300 U 60 60 1 1 P ENDDRAW ENDDEF # # SMA # DEF SMA U 0 40 Y Y 1 F N F0 "U" 150 0 60 H V C CNN F1 "SMA" 0 150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW C 0 0 22 0 1 0 N S -50 -50 50 50 0 1 0 N P 2 0 1 0 -100 0 -50 0 N X ~ 1 -200 0 100 R 50 50 1 1 P X ~ 2 0 -150 100 U 50 50 1 1 P ENDDRAW ENDDEF # # SST11LP12 # DEF SST11LP12 U 0 40 Y Y 1 F N F0 "U" 400 -350 60 H V C CNN F1 "SST11LP12" 600 550 60 H V C CNN F2 "" -250 -150 60 H V C CNN F3 "" -250 -150 60 H V C CNN $FPLIST WQFN-16 $ENDFPLIST DRAW S -450 500 500 -300 0 1 0 N X RFIN 2 -750 150 300 R 60 60 1 1 I X RFIN 3 -750 50 300 R 60 60 1 1 I X VCCb 4 -150 800 300 D 60 60 1 1 W X VREF 6 -750 -100 300 R 60 60 1 1 W X VREF 7 -750 -200 300 R 60 60 1 1 W X Det_ref 8 800 -100 300 L 60 60 1 1 O X Det 9 800 -200 300 L 60 60 1 1 O X RFOUT 10 800 150 300 L 60 60 1 1 O X RFOUT 11 800 50 300 L 60 60 1 1 O X VCC3 14 150 800 300 D 60 60 1 1 W X VCC2 15 50 800 300 D 60 60 1 1 W X VCC1 16 -50 800 300 D 60 60 1 1 W X GND PAD 0 -600 300 U 60 60 1 1 W ENDDRAW ENDDEF # # TLV271 # DEF TLV271 U 0 20 Y Y 1 F N F0 "U" 150 150 60 H V C CNN F1 "TLV271" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SOT-23-5 $ENDFPLIST DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X V- 2 -100 -400 250 U 40 40 1 1 W X + 3 -500 100 300 R 40 40 1 1 I X _ 4 -500 -100 300 R 40 40 1 1 I X V+ 5 -100 400 250 D 40 40 1 1 W ENDDRAW ENDDEF # # USB-MICRO # DEF USB-MICRO U 0 40 Y Y 1 F N F0 "U" -50 50 60 H V C CNN F1 "USB-MICRO" -150 300 60 H V C CNN F2 "" 50 -250 60 H V C CNN F3 "" 50 -250 60 H V C CNN $FPLIST MICRO-B_USB *MICRO*USB $ENDFPLIST DRAW S -450 350 350 -350 0 1 0 N X VCC 1 650 250 300 L 50 50 1 1 w X D- 2 650 150 300 L 50 50 1 1 B X D+ 3 650 50 300 L 50 50 1 1 B X ID 4 650 -50 300 L 50 50 1 1 B X GND 5 650 -150 300 L 50 50 1 1 w X SHIELD SH 650 -250 300 L 60 60 1 1 B ENDDRAW ENDDEF # # W25Q32FV # DEF W25Q32FV U 0 40 Y Y 1 F N F0 "U" 300 -250 60 H V C CNN F1 "W25Q32FV" 150 250 60 H V C CNN F2 "" -200 -200 60 H V C CNN F3 "" -200 -200 60 H V C CNN DRAW S -300 -200 350 200 0 1 0 N X ~CS 1 -500 150 200 R 40 40 1 1 I X DO/IO1 2 -500 50 200 R 40 40 1 1 B X ~WP~/IO2 3 -500 -50 200 R 40 40 1 1 B X GND 4 -500 -150 200 R 40 40 1 1 W X DI/IO0 5 550 -150 200 L 40 40 1 1 B X CLK 6 550 -50 200 L 40 40 1 1 I X ~HOLD~/IO3 7 550 50 200 L 40 40 1 1 B X VCC 8 550 150 200 L 40 40 1 1 W ENDDRAW ENDDEF # #End Library ================================================ FILE: hardware/fmcw2_mcu/fmcw2_mcu-cache.lib ================================================ EESchema-LIBRARY Version 2.3 #encoding utf-8 # # AOZ1281 # DEF AOZ1281 U 0 40 Y Y 1 F N F0 "U" 250 -250 60 H V C CNN F1 "AOZ1281" 100 250 60 H V C CNN F2 "" 0 -300 60 H V C CNN F3 "" 0 -300 60 H V C CNN DRAW S -300 200 300 -200 0 1 0 N X LX 1 500 50 200 L 50 50 1 1 w X VIN 2 -500 150 200 R 50 50 1 1 W X VIN 3 -500 50 200 R 50 50 1 1 W X EN 4 -500 -50 200 R 50 50 1 1 I X FB 5 500 -50 200 L 50 50 1 1 I X GND 6 0 -400 200 U 50 50 1 1 W X GND 7 -100 -400 200 U 50 50 1 1 W X BST 8 500 150 200 L 50 50 1 1 O X EP 9 100 -400 200 U 50 50 1 1 P ENDDRAW ENDDEF # # BARREL_JACK # DEF BARREL_JACK CON 0 40 Y Y 1 F N F0 "CON" 0 250 60 H V C CNN F1 "BARREL_JACK" 0 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW A -300 99 49 -900 1788 0 1 0 N -300 50 -350 100 A -300 101 49 900 -1788 0 1 0 N -300 150 -350 100 S 100 150 0 50 0 1 0 N P 2 0 1 0 -300 50 0 50 N P 2 0 1 0 0 150 -300 150 N P 3 0 1 0 100 0 -50 0 -50 -100 N P 5 0 1 0 100 -100 -150 -100 -200 -50 -250 -100 -350 -100 N X ~ 1 300 100 200 L 50 50 1 1 P X ~ 2 300 -100 200 L 50 50 1 1 P X ~ 3 300 0 200 L 50 50 1 1 P ENDDRAW ENDDEF # # C-RESCUE-fmcw2_mcu # DEF C-RESCUE-fmcw2_mcu C 0 10 N Y 1 F N F0 "C" 0 100 40 H V L CNN F1 "C-RESCUE-fmcw2_mcu" 6 -85 40 H V L CNN F2 "" 38 -150 30 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW P 2 0 1 20 -80 -30 80 -30 N P 2 0 1 20 -80 30 80 30 N X ~ 1 0 200 170 D 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P ENDDRAW ENDDEF # # CONN_1 # DEF ~CONN_1 P 0 30 N N 1 F N F0 "P" 80 0 40 H V L CNN F1 "CONN_1" 0 55 30 H I C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW C 0 0 31 0 1 0 N P 2 0 1 0 -30 0 -50 0 N X 1 1 -150 0 100 R 60 60 1 1 P ENDDRAW ENDDEF # # CONN_15X2 # DEF CONN_15X2 P 0 10 Y N 1 F N F0 "P" 0 800 60 H V C CNN F1 "CONN_15X2" 0 -50 50 V V C CNN F2 "" 0 150 60 H V C CNN F3 "" 0 150 60 H V C CNN DRAW S -100 750 100 -750 0 1 0 N X P1 1 -400 700 300 R 60 30 1 1 P I X P2 2 -400 600 300 R 60 30 1 1 P I X P3 3 -400 500 300 R 60 30 1 1 P I X P4 4 -400 400 300 R 60 30 1 1 P I X P5 5 -400 300 300 R 60 30 1 1 P I X P6 6 -400 200 300 R 60 30 1 1 P I X P7 7 -400 100 300 R 60 30 1 1 P I X P8 8 -400 0 300 R 60 30 1 1 P I X P9 9 -400 -100 300 R 60 30 1 1 P I X P10 10 -400 -200 300 R 60 30 1 1 P I X P20 20 400 300 300 L 60 30 1 1 P I X P30 30 400 -700 300 L 60 30 1 1 P I X P11 11 -400 -300 300 R 60 30 1 1 P I X P21 21 400 200 300 L 60 30 1 1 P I X P12 12 -400 -400 300 R 60 30 1 1 P I X P22 22 400 100 300 L 60 30 1 1 P I X P13 13 -400 -500 300 R 60 30 1 1 P I X P23 23 400 0 300 L 60 30 1 1 P I X P14 14 -400 -600 300 R 60 30 1 1 P I X P24 24 400 -100 300 L 60 30 1 1 P I X P15 15 -400 -700 300 R 60 30 1 1 P I X P25 25 400 -200 300 L 60 30 1 1 P I X P16 16 400 700 300 L 60 30 1 1 P I X 26 26 400 -300 300 L 60 30 1 1 I I X P17 17 400 600 300 L 60 30 1 1 P I X P27 27 400 -400 300 L 60 30 1 1 P I X P18 18 400 500 300 L 60 30 1 1 P I X P28 28 400 -500 300 L 60 30 1 1 P I X P19 19 400 400 300 L 60 30 1 1 P I X P29 29 400 -600 300 L 60 30 1 1 P I ENDDRAW ENDDEF # # CONN_5 # DEF CONN_5 P 0 40 Y Y 1 F N F0 "P" -50 0 50 V V C CNN F1 "CONN_5" 50 0 50 V V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -100 250 100 -250 0 1 0 f X ~ 1 -400 200 300 R 60 60 1 1 P I X ~ 2 -400 100 300 R 60 60 1 1 P I X ~ 3 -400 0 300 R 60 60 1 1 P I X ~ 4 -400 -100 300 R 60 60 1 1 P I X ~ 5 -400 -200 300 R 60 60 1 1 P I ENDDRAW ENDDEF # # CONN_6 # DEF CONN_6 P 0 30 Y N 1 F N F0 "P" -50 0 60 V V C CNN F1 "CONN_6" 50 0 60 V V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -100 300 100 -300 0 1 0 N X 1 1 -350 250 250 R 60 60 1 1 P I X 2 2 -350 150 250 R 60 60 1 1 P I X 3 3 -350 50 250 R 60 60 1 1 P I X 4 4 -350 -50 250 R 60 60 1 1 P I X 5 5 -350 -150 250 R 60 60 1 1 P I X 6 6 -350 -250 250 R 60 60 1 1 P I ENDDRAW ENDDEF # # CRYSTAL_SMD4 # DEF CRYSTAL_SMD4 X 0 40 N N 1 F N F0 "X" 0 150 60 H V C CNN F1 "CRYSTAL_SMD4" 0 -150 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 16 -100 100 -100 -100 N P 2 0 1 16 100 100 100 -100 N P 5 0 1 12 -50 50 50 50 50 -50 -50 -50 -50 50 f X 1 1 -300 0 200 R 40 40 1 1 P X 2 2 -100 -200 100 U 40 40 1 1 P X 3 3 300 0 200 L 40 40 1 1 P X 4 4 100 -200 100 U 40 40 1 1 P ENDDRAW ENDDEF # # DIODESCH # DEF DIODESCH D 0 40 N N 1 F N F0 "D" 0 100 40 H V C CNN F1 "DIODESCH" 0 -100 40 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST D? S* $ENDFPLIST DRAW P 3 0 1 0 -50 50 50 0 -50 -50 F P 6 0 1 8 75 25 75 50 50 50 50 -50 25 -50 25 -25 N X A 1 -200 0 150 R 40 40 1 1 P X K 2 200 0 150 L 40 40 1 1 P ENDDRAW ENDDEF # # FDC6329L # DEF FDC6329L U 0 40 Y Y 1 F N F0 "U" 400 -450 60 H V C CNN F1 "FDC6329L" 250 300 60 H V C CNN F2 "" -1200 -500 60 H V C CNN F3 "" -1200 -500 60 H V C CNN $FPLIST 6-SSOT SSOT-6 $ENDFPLIST DRAW S -450 250 450 -350 0 1 0 N S 300 150 450 -50 0 1 0 N P 2 0 1 0 -100 -150 -150 -150 N P 2 0 1 0 -100 -100 -100 -200 N P 2 0 1 0 -100 150 -400 150 N P 2 0 1 0 -50 50 50 50 N P 2 0 1 0 -50 100 50 100 N P 2 0 1 0 0 -50 -400 -50 N P 2 0 1 0 100 150 450 150 N P 2 0 1 0 450 -250 0 -250 N P 3 0 1 0 -150 -150 -400 -150 -400 -250 N P 3 0 1 0 -50 100 -50 150 -100 150 N P 3 0 1 0 50 100 50 150 100 150 N P 6 0 1 0 0 50 0 -100 -50 -100 -50 -200 0 -200 0 -250 N X R2 1 750 -250 300 L 50 50 1 1 P X Vout,C1 2 750 -50 300 L 50 50 1 1 P X Vout,C1 3 750 150 300 L 50 50 1 1 P X Vin,R1 4 -700 150 300 R 50 50 1 1 P X ON/OFF 5 -700 -250 300 R 50 50 1 1 I X R1,C1 6 -700 -50 300 R 50 50 1 1 P ENDDRAW ENDDEF # # GND-RESCUE-fmcw2_mcu # DEF ~GND-RESCUE-fmcw2_mcu #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 0 30 H I C CNN F1 "GND-RESCUE-fmcw2_mcu" 0 -70 30 H I C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X GND 1 0 0 0 U 30 30 1 1 W N ENDDRAW ENDDEF # # INDUCTOR_SMALL # DEF INDUCTOR_SMALL L 0 0 N N 1 F N F0 "L" 0 100 50 H V C CNN F1 "INDUCTOR_SMALL" 0 -50 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW A -150 0 50 1 1799 0 1 0 N -100 0 -200 0 A -50 0 50 1 1799 0 1 0 N 0 0 -100 0 A 50 0 50 1 1799 0 1 0 N 100 0 0 0 A 150 0 50 1 1799 0 1 0 N 200 0 100 0 X 1 1 -250 0 50 R 30 30 1 1 I X 2 2 250 0 50 L 30 30 1 1 I ENDDRAW ENDDEF # # LED-RESCUE-fmcw2_mcu # DEF LED-RESCUE-fmcw2_mcu D 0 40 Y N 1 F N F0 "D" 0 100 50 H V C CNN F1 "LED-RESCUE-fmcw2_mcu" 0 -100 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST LED-3MM LED-5MM LED-10MM LED-0603 LED-0805 LED-1206 LEDV $ENDFPLIST DRAW P 2 0 1 0 50 50 50 -50 N P 3 0 1 0 -50 50 50 0 -50 -50 F P 3 0 1 0 65 -40 110 -80 105 -55 N P 3 0 1 0 80 -25 125 -65 120 -40 N X A 1 -200 0 150 R 40 40 1 1 P X K 2 200 0 150 L 40 40 1 1 P ENDDRAW ENDDEF # # LP2985 # DEF LP2985 U 0 40 Y Y 1 F N F0 "U" 350 -200 60 H V C CNN F1 "LP2985" 200 200 60 H V C CNN F2 "" -250 -200 60 H V C CNN F3 "" -250 -200 60 H V C CNN $FPLIST SOT-23-5 $ENDFPLIST DRAW S -350 -150 400 150 0 1 0 N X VIN 1 -550 100 200 R 50 50 1 1 W X GND 2 -550 0 200 R 50 50 1 1 W X ON/~OFF~ 3 -550 -100 200 R 50 50 1 1 I X BYPASS 4 600 -100 200 L 50 50 1 1 P X VOUT 5 600 100 200 L 50 50 1 1 w ENDDRAW ENDDEF # # LPC4320_BGA # DEF LPC4320_BGA U 0 40 Y Y 1 F N F0 "U" 0 -100 50 H V C CNN F1 "LPC4320_BGA" 0 100 50 H V C CNN F2 "MODULE" 0 0 50 H I C CNN F3 "DOCUMENTATION" 0 0 50 H I C CNN DRAW S -1550 3000 1450 -3800 0 1 0 N X ADC1 A1 -1850 -350 300 R 50 50 1 1 B X XTAL1 B1 -1850 -2350 300 R 50 50 1 1 I X XTAL2 C1 -1850 -2450 300 R 50 50 1 1 O X USB_VDDA3V3_DRIVER D1 -1850 -1700 300 R 50 50 1 1 I X USB_DP E1 -1850 -1200 300 R 50 50 1 1 B X USB_ID F1 -1850 -1300 300 R 50 50 1 1 I X P0_1 G1 -1850 2700 300 R 50 50 1 1 B X P1_0 H1 -1850 2600 300 R 50 50 1 1 B X P1_3 J1 -1850 2300 300 R 50 50 1 1 B X P1_2 K1 -1850 2400 300 R 50 50 1 1 B X ADC0 A2 -1850 -250 300 R 50 50 1 1 B X VDDA B2 600 3300 300 D 50 50 1 1 W X VSSA C2 -200 -4100 300 U 50 50 1 1 W X USB_VDDA3V3 D2 -1850 -1600 300 R 50 50 1 1 W X USB_DM E2 -1850 -1100 300 R 50 50 1 1 B X USB_VSSA_REF F2 -1850 -1800 300 R 50 50 1 1 I X P0_0 G2 -1850 2800 300 R 50 50 1 1 B X TCK H2 -1850 -3350 300 R 50 50 1 1 I X P1_4 J2 -1850 2200 300 R 50 50 1 1 B X P1_1 K2 -1850 2500 300 R 50 50 1 1 B X ADC3 A3 -1850 -550 300 R 50 50 1 1 B X ADC2 B3 -1850 -450 300 R 50 50 1 1 B X ALARM C3 -1850 -3050 300 R 50 50 1 1 B X USB_VSSA_TERM D3 -1850 -1900 300 R 50 50 1 1 I X USB_VBUS E3 -1850 -1500 300 R 50 50 1 1 I X USB_RREF F3 -1850 -1400 300 R 50 50 1 1 P X TDI G3 -1850 -3450 300 R 50 50 1 1 I X TDO H3 -1850 -3550 300 R 50 50 1 1 O X VSSIO J3 550 -4100 300 U 50 50 1 1 W X CLK0 K3 -1850 400 300 R 50 50 1 1 B X WAKEUP0 A4 -1850 -2950 300 R 50 50 1 1 B X TRSTN B4 -1850 -3250 300 R 50 50 1 1 I X TMS C4 -1850 -3650 300 R 50 50 1 1 I X VSSIO_40 D4 0 -4100 300 U 50 50 1 1 W X VDDREG_94 E4 -500 3300 300 D 50 50 1 1 W X VDDREG_59 F4 -400 3300 300 D 50 50 1 1 W X P1_7 G4 -1850 1900 300 R 50 50 1 1 B X PF_4 H4 1750 -3700 300 L 50 50 1 1 B X P1_5 J4 -1850 2100 300 R 50 50 1 1 B X P1_6 K4 -1850 2000 300 R 50 50 1 1 B X RTCX1 A5 -1850 -2650 300 R 50 50 1 1 I X RTCX2 B5 -1850 -2750 300 R 50 50 1 1 O X VBAT C5 -1850 -2850 300 R 50 50 1 1 W X VSSIO_76 D5 100 -4100 300 U 50 50 1 1 W X VDDREG_131 E5 -600 3300 300 D 50 50 1 1 W X P2_2 F5 1750 2600 300 L 50 50 1 1 B X P6_1 G5 1750 -1500 300 L 50 50 1 1 B X P1_8 H5 -1850 1800 300 R 50 50 1 1 B X P1_9 J5 -1850 1700 300 R 50 50 1 1 B X VDDIO_36 K5 400 3300 300 D 50 50 1 1 W X DBGEN A6 -1850 200 300 R 50 50 1 1 I X NRESET B6 -1850 -100 300 R 50 50 1 1 I X P2_8 C6 1750 2000 300 L 50 50 1 1 B X SCL D6 -1850 -2200 300 R 50 50 1 1 B X SDA E6 -1850 -2100 300 R 50 50 1 1 B X P6_4 F6 1750 -1800 300 L 50 50 1 1 B X P3_2 G6 1750 1200 300 L 50 50 1 1 B X P1_10 H6 -1850 1600 300 R 50 50 1 1 B X VSSIO J6 650 -4100 300 U 50 50 1 1 W X CLK2 K6 -1850 300 300 R 50 50 1 1 B X P3_3 A7 1750 1100 300 L 50 50 1 1 B X P3_5 B7 1750 900 300 L 50 50 1 1 B X P3_6 C7 1750 800 300 L 50 50 1 1 B X P3_7 D7 1750 700 300 L 50 50 1 1 B X P3_8 E7 1750 600 300 L 50 50 1 1 B X P3_1 F7 1750 1300 300 L 50 50 1 1 B X P2_1 G7 1750 2700 300 L 50 50 1 1 B X P6_0 H7 1750 -1400 300 L 50 50 1 1 B X P1_11 J7 -1850 1500 300 R 50 50 1 1 B X P1_12 K7 -1850 1400 300 R 50 50 1 1 B X P3_0 A8 1750 1400 300 L 50 50 1 1 B X P3_4 B8 1750 1000 300 L 50 50 1 1 B X VSSIO_4 C8 -100 -4100 300 U 50 50 1 1 W X P2_3 D8 1750 2500 300 L 50 50 1 1 B X P2_10 E8 1750 1800 300 L 50 50 1 1 B X P6_9 F8 1750 -2300 300 L 50 50 1 1 B X VSSIO_109 G8 200 -4100 300 U 50 50 1 1 W X P1_13 H8 -1850 1300 300 R 50 50 1 1 B X P1_14 J8 -1850 1200 300 R 50 50 1 1 B X P1_15 K8 -1850 1100 300 R 50 50 1 1 B X P2_11 A9 1750 1700 300 L 50 50 1 1 B X P2_12 B9 1750 1600 300 L 50 50 1 1 B X P6_11 C9 1750 -2500 300 L 50 50 1 1 B X P2_4 D9 1750 2400 300 L 50 50 1 1 B X DP1 E9 -1850 0 300 R 50 50 1 1 B X P6_5 F9 1750 -1900 300 L 50 50 1 1 B X P2_6 G9 1750 2200 300 L 50 50 1 1 B X P1_16 H9 -1850 1000 300 R 50 50 1 1 B X P6_2 J9 1750 -1600 300 L 50 50 1 1 B X P1_19 K9 -1850 700 300 R 50 50 1 1 B X P2_13 A10 1750 1500 300 L 50 50 1 1 B X P2_9 B10 1750 1900 300 L 50 50 1 1 B X P2_7 C10 1750 2100 300 L 50 50 1 1 B X P2_5 D10 1750 2300 300 L 50 50 1 1 B X DM1 E10 -1850 100 300 R 50 50 1 1 B X VDDIO_5 F10 500 3300 300 D 50 50 1 1 W X P2_0 G10 1750 2800 300 L 50 50 1 1 B X P1_17 H10 -1850 900 300 R 50 50 1 1 B X P1_18 J10 -1850 800 300 R 50 50 1 1 B X P1_20 K10 -1850 600 300 R 50 50 1 1 B ENDDRAW ENDDEF # # LT1817 # DEF LT1817 U 0 20 Y Y 4 L N F0 "U" 150 150 60 H V C CNN F1 "LT1817" 200 -200 60 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN ALIAS LM393 DRAW P 4 0 1 0 -200 200 200 0 -200 -200 -200 200 N X ~ 1 500 0 300 L 40 40 1 1 C X _ 2 -500 -100 300 R 40 40 1 1 I X + 3 -500 100 300 R 40 40 1 1 I X V+ 4 -100 400 250 D 40 40 1 1 W X V- 13 -100 -400 250 U 40 40 1 1 W X + 5 -500 100 300 R 40 40 2 1 I X _ 6 -500 -100 300 R 40 40 2 1 I X ~ 7 500 0 300 L 40 40 2 1 C X ~ 10 500 0 300 L 40 40 3 1 C X _ 11 -500 -100 300 R 40 40 3 1 I X + 12 -500 100 300 R 40 40 3 1 I X + 14 -500 100 300 R 40 40 4 1 I X _ 15 -500 -100 300 R 40 40 4 1 I X ~ 16 500 0 300 L 40 40 4 1 C ENDDRAW ENDDEF # # MAX1426 # DEF MAX1426 U 0 40 Y Y 1 F N F0 "U" 350 -750 60 H V C CNN F1 "MAX1426" 200 750 60 H V C CNN F2 "" -200 150 60 H V C CNN F3 "" -200 150 60 H V C CNN $FPLIST SSOP-28 $ENDFPLIST DRAW S -400 -700 400 700 0 1 0 N X AGND 1 -600 650 200 R 50 50 1 1 W X AVDD 2 -600 550 200 R 50 50 1 1 W X REFP 3 -600 450 200 R 50 50 1 1 O X REFIN 4 -600 350 200 R 50 50 1 1 I X REFN 5 -600 250 200 R 50 50 1 1 O X CML 6 -600 150 200 R 50 50 1 1 O X AGND 7 -600 50 200 R 50 50 1 1 W X AVDD 8 -600 -50 200 R 50 50 1 1 W X INP 9 -600 -150 200 R 50 50 1 1 I X INN 10 -600 -250 200 R 50 50 1 1 I X DVDD 20 600 -150 200 L 50 50 1 1 W X CMLP 11 -600 -350 200 R 50 50 1 1 I X DGND 21 600 -50 200 L 50 50 1 1 W X CMLN 12 -600 -450 200 R 50 50 1 1 I X DVDD 22 600 50 200 L 50 50 1 1 W X CLK 13 -600 -550 200 R 50 50 1 1 I X DGND 23 600 150 200 L 50 50 1 1 W X ~OE~/PD 14 -600 -650 200 R 50 50 1 1 I X D4 24 600 250 200 L 50 50 1 1 O X D9 15 600 -650 200 L 50 50 1 1 O X D3 25 600 350 200 L 50 50 1 1 O X D8 16 600 -550 200 L 50 50 1 1 O X D2 26 600 450 200 L 50 50 1 1 O X D7 17 600 -450 200 L 50 50 1 1 O X D1 27 600 550 200 L 50 50 1 1 O X D6 18 600 -350 200 L 50 50 1 1 O X D0 28 600 650 200 L 50 50 1 1 O X D5 19 600 -250 200 L 50 50 1 1 O ENDDRAW ENDDEF # # MCP4022 # DEF MCP4022 U 0 40 Y Y 1 F N F0 "U" 150 -200 60 H V C CNN F1 "MCP4022" 0 200 60 H V C CNN F2 "" -100 -300 60 H V C CNN F3 "" -100 -300 60 H V C CNN $FPLIST SOT-23-6 $ENDFPLIST DRAW S -250 -150 200 150 0 1 0 N X VDD 1 -450 100 200 R 50 50 1 1 W X VSS 2 -450 0 200 R 50 50 1 1 W X U/~D~ 3 -450 -100 200 R 50 50 1 1 I X ~CS~ 4 400 -100 200 L 50 50 1 1 I X W 5 400 0 200 L 50 50 1 1 P X A 6 400 100 200 L 50 50 1 1 P ENDDRAW ENDDEF # # MOS_N_GSD # DEF MOS_N_GSD Q 0 0 Y Y 1 F N F0 "Q" 10 170 60 H V R CNN F1 "MOS_N_GSD" 10 -150 60 H V R CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 8 -50 -100 -50 100 N P 2 0 1 10 0 -150 0 150 N P 2 0 1 0 100 -100 0 -100 N P 2 0 1 0 100 100 0 100 N P 3 0 1 8 100 -100 100 0 50 0 N P 5 0 1 8 50 30 50 -30 0 0 50 30 50 30 N X G 1 -200 0 150 R 40 40 1 1 I X S 2 100 -200 100 U 40 40 1 1 P X D 3 100 200 100 D 40 40 1 1 P ENDDRAW ENDDEF # # PWR_FLAG # DEF PWR_FLAG #FLG 0 0 N N 1 F P F0 "#FLG" 0 95 50 H I C CNN F1 "PWR_FLAG" 0 180 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW X pwr 1 0 0 0 U 20 20 0 0 w P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N ENDDRAW ENDDEF # # R-RESCUE-fmcw2_mcu # DEF R-RESCUE-fmcw2_mcu R 0 0 N Y 1 F N F0 "R" 80 0 40 V V C CNN F1 "R-RESCUE-fmcw2_mcu" 7 1 40 V V C CNN F2 "" -70 0 30 V V C CNN F3 "" 0 0 30 H V C CNN $FPLIST R? SM0603 SM0805 R?-* SM1206 $ENDFPLIST DRAW S -40 150 40 -150 0 1 12 N X ~ 1 0 250 100 D 60 60 1 1 P X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW ENDDEF # # SW_PUSH # DEF SW_PUSH SW 0 40 N N 1 F N F0 "SW" 150 110 50 H V C CNN F1 "SW_PUSH" 0 -80 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW S -170 50 170 60 0 1 0 N P 4 0 1 0 -40 60 -30 90 30 90 40 60 N X 1 1 -300 0 200 R 60 60 0 1 P I X 2 2 300 0 200 L 60 60 0 1 P I ENDDRAW ENDDEF # # USB-MICRO # DEF USB-MICRO U 0 40 Y Y 1 F N F0 "U" -50 50 60 H V C CNN F1 "USB-MICRO" -150 300 60 H V C CNN F2 "" 50 -250 60 H V C CNN F3 "" 50 -250 60 H V C CNN $FPLIST MICRO-B_USB *MICRO*USB $ENDFPLIST DRAW S -450 350 350 -350 0 1 0 N X VCC 1 650 250 300 L 50 50 1 1 w X D- 2 650 150 300 L 50 50 1 1 B X D+ 3 650 50 300 L 50 50 1 1 B X ID 4 650 -50 300 L 50 50 1 1 B X GND 5 650 -150 300 L 50 50 1 1 w X SHIELD SH 650 -250 300 L 60 60 1 1 B ENDDRAW ENDDEF # # W25Q32FV # DEF W25Q32FV U 0 40 Y Y 1 F N F0 "U" 300 -250 60 H V C CNN F1 "W25Q32FV" 150 250 60 H V C CNN F2 "" -200 -200 60 H V C CNN F3 "" -200 -200 60 H V C CNN DRAW S -300 -200 350 200 0 1 0 N X ~CS 1 -500 150 200 R 40 40 1 1 I X DO/IO1 2 -500 50 200 R 40 40 1 1 B X ~WP~/IO2 3 -500 -50 200 R 40 40 1 1 B X GND 4 -500 -150 200 R 40 40 1 1 W X DI/IO0 5 550 -150 200 L 40 40 1 1 B X CLK 6 550 -50 200 L 40 40 1 1 I X ~HOLD~/IO3 7 550 50 200 L 40 40 1 1 B X VCC 8 550 150 200 L 40 40 1 1 W ENDDRAW ENDDEF # #End Library ================================================ FILE: hardware/fmcw2_mcu/fmcw2_mcu-rescue.lib ================================================ EESchema-LIBRARY Version 2.3 #encoding utf-8 # # C-RESCUE-fmcw2_mcu # DEF C-RESCUE-fmcw2_mcu C 0 10 N Y 1 F N F0 "C" 0 100 40 H V L CNN F1 "C-RESCUE-fmcw2_mcu" 6 -85 40 H V L CNN F2 "" 38 -150 30 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW P 2 0 1 20 -80 -30 80 -30 N P 2 0 1 20 -80 30 80 30 N X ~ 1 0 200 170 D 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P ENDDRAW ENDDEF # # GND-RESCUE-fmcw2_mcu # DEF ~GND-RESCUE-fmcw2_mcu #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 0 30 H I C CNN F1 "GND-RESCUE-fmcw2_mcu" 0 -70 30 H I C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X GND 1 0 0 0 U 30 30 1 1 W N ENDDRAW ENDDEF # # LED-RESCUE-fmcw2_mcu # DEF LED-RESCUE-fmcw2_mcu D 0 40 Y N 1 F N F0 "D" 0 100 50 H V C CNN F1 "LED-RESCUE-fmcw2_mcu" 0 -100 50 H V C CNN F2 "" 0 0 60 H V C CNN F3 "" 0 0 60 H V C CNN $FPLIST LED-3MM LED-5MM LED-10MM LED-0603 LED-0805 LED-1206 LEDV $ENDFPLIST DRAW P 2 0 1 0 50 50 50 -50 N P 3 0 1 0 -50 50 50 0 -50 -50 F P 3 0 1 0 65 -40 110 -80 105 -55 N P 3 0 1 0 80 -25 125 -65 120 -40 N X A 1 -200 0 150 R 40 40 1 1 P X K 2 200 0 150 L 40 40 1 1 P ENDDRAW ENDDEF # # R-RESCUE-fmcw2_mcu # DEF R-RESCUE-fmcw2_mcu R 0 0 N Y 1 F N F0 "R" 80 0 40 V V C CNN F1 "R-RESCUE-fmcw2_mcu" 7 1 40 V V C CNN F2 "" -70 0 30 V V C CNN F3 "" 0 0 30 H V C CNN $FPLIST R? SM0603 SM0805 R?-* SM1206 $ENDFPLIST DRAW S -40 150 40 -150 0 1 12 N X ~ 1 0 250 100 D 60 60 1 1 P X ~ 2 0 -250 100 U 60 60 1 1 P ENDDRAW ENDDEF # #End Library ================================================ FILE: hardware/fmcw2_mcu/fmcw2_mcu.kicad_pcb ================================================ (kicad_pcb (version 4) (host pcbnew "(2015-10-24 BZR 6277)-product") (general (links 336) (no_connects 0) (area 117.699999 68.099999 150.100001 101.550001) (thickness 1.6) (drawings 4) (tracks 2150) (zones 0) (modules 124) (nets 100) ) (page A4) (layers (0 F.Cu signal) (1 In1.Cu signal) (2 In2.Cu signal) (31 B.Cu signal) (32 B.Adhes user) (33 F.Adhes user) (34 B.Paste user) (35 F.Paste user) (36 B.SilkS user) (37 F.SilkS user) (38 B.Mask user) (39 F.Mask user) (40 Dwgs.User user) (41 Cmts.User user) (42 Eco1.User user) (43 Eco2.User user) (44 Edge.Cuts user) (45 Margin user) (46 B.CrtYd user) (47 F.CrtYd user) (48 B.Fab user) (49 F.Fab user) ) (setup (last_trace_width 0.15) (user_trace_width 0.3) (trace_clearance 0.13) (zone_clearance 0.26) (zone_45_only yes) (trace_min 0.13) (segment_width 0.2) (edge_width 0.1) (via_size 0.458) (via_drill 0.254) (via_min_size 0.458) (via_min_drill 0.254) (uvia_size 0.69) (uvia_drill 0.34) (uvias_allowed no) (uvia_min_size 0.69) (uvia_min_drill 0.3) (pcb_text_width 0.3) (pcb_text_size 1.5 1.5) (mod_edge_width 0.15) (mod_text_size 1 1) (mod_text_width 0.15) (pad_size 4.6 4.6) (pad_drill 3.56) (pad_to_mask_clearance 0) (aux_axis_origin 0 0) (visible_elements FFFEFF7F) (pcbplotparams (layerselection 0x010fc_80000007) (usegerberextensions true) (excludeedgelayer true) (linewidth 0.100000) (plotframeref false) (viasonmask false) (mode 1) (useauxorigin false) (hpglpennumber 1) (hpglpenspeed 20) (hpglpendiameter 15) (hpglpenoverlay 2) (psnegative false) (psa4output false) (plotreference false) (plotvalue false) (plotinvisibletext false) (padsonsilk false) (subtractmaskfromsilk false) (outputformat 1) (mirror false) (drillshape 0) (scaleselection 1) (outputdirectory gerbers)) ) (net 0 "") (net 1 GND) (net 2 /3V3) (net 3 /XTAL1) (net 4 /XTAL2) (net 5 /USBV) (net 6 "Net-(C45-Pad1)") (net 7 /USB-) (net 8 "Net-(R19-Pad2)") (net 9 /USB+) (net 10 "Net-(R20-Pad2)") (net 11 "Net-(R21-Pad1)") (net 12 /SPIFI_CS) (net 13 /SPIFI_MISO) (net 14 /SPIFI_IO2) (net 15 /SPIFI_MOSI) (net 16 /SPIFI_CLK) (net 17 /SPIFI_IO3) (net 18 /USBID) (net 19 /SCL) (net 20 /SDA) (net 21 /5V) (net 22 /ADC_IN+) (net 23 /ADC_IN-) (net 24 "Net-(R6-Pad2)") (net 25 /P2_9) (net 26 /P2_8) (net 27 /P1_2) (net 28 /P1_1) (net 29 /SSP1_MOSI) (net 30 /ADC_CLK) (net 31 /12V) (net 32 "Net-(C23-Pad1)") (net 33 "Net-(C23-Pad2)") (net 34 "Net-(C26-Pad1)") (net 35 "Net-(C26-Pad2)") (net 36 /10V) (net 37 /LED1) (net 38 "Net-(R15-Pad2)") (net 39 "Net-(R17-Pad2)") (net 40 /D9) (net 41 /D8) (net 42 /D7) (net 43 /D6) (net 44 /D5) (net 45 /D4) (net 46 /D3) (net 47 /D2) (net 48 /D1) (net 49 /D0) (net 50 /REFP) (net 51 /REFIN) (net 52 /REFN) (net 53 /CML) (net 54 "Net-(D1-Pad1)") (net 55 "Net-(D2-Pad1)") (net 56 "Net-(P4-Pad1)") (net 57 "Net-(R24-Pad1)") (net 58 /SSP1_CLK) (net 59 "Net-(R26-Pad1)") (net 60 /SSP1_MISO) (net 61 /ADF_TXDATA) (net 62 /ADF_LE) (net 63 /ADF_CE) (net 64 /MIX_ENBL) (net 65 /PA_OFF) (net 66 /IFF-) (net 67 /IFF+) (net 68 "Net-(C10-Pad2)") (net 69 "Net-(C11-Pad1)") (net 70 "Net-(C11-Pad2)") (net 71 "Net-(C17-Pad2)") (net 72 /CMLP) (net 73 "Net-(C8-Pad2)") (net 74 /W_IN) (net 75 /CM) (net 76 "Net-(C18-Pad1)") (net 77 "Net-(C18-Pad2)") (net 78 "Net-(R2-Pad1)") (net 79 "Net-(R14-Pad1)") (net 80 "Net-(R28-Pad1)") (net 81 "Net-(R31-Pad1)") (net 82 "Net-(R34-Pad2)") (net 83 /MCP_U~D~_5V) (net 84 /MCP_~CS~_5V) (net 85 /A_OUT) (net 86 /GPIO0) (net 87 /ADC_~OE~) (net 88 /MCP_~U~D_3.3V) (net 89 /MCP_CS_3.3V) (net 90 /GPIO1) (net 91 "Net-(C48-Pad2)") (net 92 /VTUNE) (net 93 "Net-(R40-Pad1)") (net 94 /USBV_3V) (net 95 /OTG_USBV) (net 96 "Net-(P3-Pad1)") (net 97 /NRESET) (net 98 "Net-(C51-Pad1)") (net 99 /~RAMP) (net_class Default "This is the default net class." (clearance 0.13) (trace_width 0.15) (via_dia 0.458) (via_drill 0.254) (uvia_dia 0.69) (uvia_drill 0.34) (add_net /10V) (add_net /12V) (add_net /3V3) (add_net /5V) (add_net /ADC_CLK) (add_net /ADC_IN+) (add_net /ADC_IN-) (add_net /ADC_~OE~) (add_net /ADF_CE) (add_net /ADF_LE) (add_net /ADF_TXDATA) (add_net /A_OUT) (add_net /CM) (add_net /CML) (add_net /CMLP) (add_net /D0) (add_net /D1) (add_net /D2) (add_net /D3) (add_net /D4) (add_net /D5) (add_net /D6) (add_net /D7) (add_net /D8) (add_net /D9) (add_net /GPIO0) (add_net /GPIO1) (add_net /IFF+) (add_net /IFF-) (add_net /LED1) (add_net /MCP_CS_3.3V) (add_net /MCP_U~D~_5V) (add_net /MCP_~CS~_5V) (add_net /MCP_~U~D_3.3V) (add_net /MIX_ENBL) (add_net /NRESET) (add_net /OTG_USBV) (add_net /P1_1) (add_net /P1_2) (add_net /P2_8) (add_net /P2_9) (add_net /PA_OFF) (add_net /REFIN) (add_net /REFN) (add_net /REFP) (add_net /SCL) (add_net /SDA) (add_net /SPIFI_CLK) (add_net /SPIFI_CS) (add_net /SPIFI_IO2) (add_net /SPIFI_IO3) (add_net /SPIFI_MISO) (add_net /SPIFI_MOSI) (add_net /SSP1_CLK) (add_net /SSP1_MISO) (add_net /SSP1_MOSI) (add_net /USB+) (add_net /USB-) (add_net /USBID) (add_net /USBV) (add_net /USBV_3V) (add_net /VTUNE) (add_net /W_IN) (add_net /XTAL1) (add_net /XTAL2) (add_net /~RAMP) (add_net GND) (add_net "Net-(C10-Pad2)") (add_net "Net-(C11-Pad1)") (add_net "Net-(C11-Pad2)") (add_net "Net-(C17-Pad2)") (add_net "Net-(C18-Pad1)") (add_net "Net-(C18-Pad2)") (add_net "Net-(C23-Pad1)") (add_net "Net-(C23-Pad2)") (add_net "Net-(C26-Pad1)") (add_net "Net-(C26-Pad2)") (add_net "Net-(C45-Pad1)") (add_net "Net-(C48-Pad2)") (add_net "Net-(C51-Pad1)") (add_net "Net-(C8-Pad2)") (add_net "Net-(D1-Pad1)") (add_net "Net-(D2-Pad1)") (add_net "Net-(P3-Pad1)") (add_net "Net-(P4-Pad1)") (add_net "Net-(R14-Pad1)") (add_net "Net-(R15-Pad2)") (add_net "Net-(R17-Pad2)") (add_net "Net-(R19-Pad2)") (add_net "Net-(R2-Pad1)") (add_net "Net-(R20-Pad2)") (add_net "Net-(R21-Pad1)") (add_net "Net-(R24-Pad1)") (add_net "Net-(R26-Pad1)") (add_net "Net-(R28-Pad1)") (add_net "Net-(R31-Pad1)") (add_net "Net-(R34-Pad2)") (add_net "Net-(R40-Pad1)") (add_net "Net-(R6-Pad2)") ) (module SOIC_Packages:SOIJ-8_5.3x5.3mm_Pitch1.27mm (layer F.Cu) (tedit 55A258C7) (tstamp 5532B56D) (at 123.72 84.53 270) (descr "8-Lead Plastic Small Outline (SM) - Medium, 5.28 mm Body [SOIC] (see Microchip Packaging Specification 00000049BS.pdf)") (tags "SOIC 1.27") (path /5532C8CF) (attr smd) (fp_text reference U3 (at 0.07 -0.105 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value W25Q32FV (at 0 3.68 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -4.75 -2.95) (end -4.75 2.95) (layer F.CrtYd) (width 0.05)) (fp_line (start 4.75 -2.95) (end 4.75 2.95) (layer F.CrtYd) (width 0.05)) (fp_line (start -4.75 -2.95) (end 4.75 -2.95) (layer F.CrtYd) (width 0.05)) (fp_line (start -4.75 2.95) (end 4.75 2.95) (layer F.CrtYd) (width 0.05)) (fp_line (start -2.75 -2.755) (end -2.75 -2.455) (layer F.SilkS) (width 0.15)) (fp_line (start 2.75 -2.755) (end 2.75 -2.455) (layer F.SilkS) (width 0.15)) (fp_line (start 2.75 2.755) (end 2.75 2.455) (layer F.SilkS) (width 0.15)) (fp_line (start -2.75 2.755) (end -2.75 2.455) (layer F.SilkS) (width 0.15)) (fp_line (start -2.75 -2.755) (end 2.75 -2.755) (layer F.SilkS) (width 0.15)) (fp_line (start -2.75 2.755) (end 2.75 2.755) (layer F.SilkS) (width 0.15)) (fp_line (start -2.75 -2.455) (end -4.5 -2.455) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -3.65 -1.905 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 12 /SPIFI_CS)) (pad 2 smd rect (at -3.65 -0.635 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 13 /SPIFI_MISO)) (pad 3 smd rect (at -3.65 0.635 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 14 /SPIFI_IO2)) (pad 4 smd rect (at -3.65 1.905 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 5 smd rect (at 3.65 1.905 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 15 /SPIFI_MOSI)) (pad 6 smd rect (at 3.65 0.635 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 16 /SPIFI_CLK)) (pad 7 smd rect (at 3.65 -0.635 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 17 /SPIFI_IO3)) (pad 8 smd rect (at 3.65 -1.905 270) (size 1.7 0.65) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (model Housings_SOIC.3dshapes/SOIJ-8_5.3x5.3mm_Pitch1.27mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:USB_MICRO (layer F.Cu) (tedit 55A403E5) (tstamp 5532B57C) (at 121.9 96.6 270) (path /5504F1F2) (fp_text reference U16 (at -1.15 2.5 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value USB-MICRO (at 0.1 7.3 270) (layer F.SilkS) hide (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -3.6 4.9) (end -3.6 -0.1) (layer F.SilkS) (width 0.15)) (fp_line (start -3.6 -0.1) (end 3.4 -0.1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.4 -0.1) (end 3.4 4.9) (layer F.SilkS) (width 0.15)) (fp_line (start 3.4 4.9) (end -3.6 4.9) (layer F.SilkS) (width 0.15)) (fp_line (start -4.95 4.125) (end 4.75 4.125) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.3 0 270) (size 0.4 1.35) (layers F.Cu F.Paste F.Mask) (net 5 /USBV)) (pad 5 smd rect (at 1.3 0 270) (size 0.4 1.35) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at 0 0 270) (size 0.4 1.35) (layers F.Cu F.Paste F.Mask) (net 10 "Net-(R20-Pad2)")) (pad 2 smd rect (at -0.65 0 270) (size 0.4 1.35) (layers F.Cu F.Paste F.Mask) (net 8 "Net-(R19-Pad2)")) (pad 4 smd rect (at 0.65 0 270) (size 0.4 1.35) (layers F.Cu F.Paste F.Mask) (net 18 /USBID)) (pad ~ smd rect (at -3.1 0.12 270) (size 2.1 1.6) (layers F.Cu F.Paste F.Mask)) (pad ~ smd rect (at 3.1 0.12 270) (size 2.1 1.6) (layers F.Cu F.Paste F.Mask)) (pad SH smd rect (at 3.8 2.675 270) (size 1.8 1.9) (layers F.Cu F.Paste F.Mask) (net 6 "Net-(C45-Pad1)")) (pad ~ smd rect (at -3.8 2.675 270) (size 1.8 1.9) (layers F.Cu F.Paste F.Mask)) (pad ~ smd rect (at 1.2 2.675 270) (size 1.9 1.9) (layers F.Cu F.Paste F.Mask)) (pad ~ smd rect (at -1.2 2.675 270) (size 1.9 1.9) (layers F.Cu F.Paste F.Mask)) ) (module fmcw2:TFBGA-100 (layer F.Cu) (tedit 5533863A) (tstamp 5532C732) (at 128.64 87.62 90) (path /5533B965) (fp_text reference U4 (at 4.2 9.4 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LPC4320_BGA (at 3.6 -2.3 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.2 -1.2) (end -1.7 -1.8) (layer F.SilkS) (width 0.15)) (fp_line (start -1.2 8.4) (end -1.2 -1.2) (layer F.SilkS) (width 0.15)) (fp_line (start -1.2 -1.2) (end 8.4 -1.2) (layer F.SilkS) (width 0.15)) (fp_line (start 8.4 -1.2) (end 8.4 8.4) (layer F.SilkS) (width 0.15)) (fp_line (start 8.4 8.4) (end -1.2 8.4) (layer F.SilkS) (width 0.15)) (pad A1 smd circle (at 0 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 96 "Net-(P3-Pad1)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B1 smd circle (at 0 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 3 /XTAL1) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C1 smd circle (at 0 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 4 /XTAL2) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D1 smd circle (at 0 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E1 smd circle (at 0 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 9 /USB+) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F1 smd circle (at 0 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 18 /USBID) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G1 smd circle (at 0 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 46 /D3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H1 smd circle (at 0 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 40 /D9) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J1 smd circle (at 0 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 60 /SSP1_MISO) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K1 smd circle (at 0 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 27 /P1_2) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A2 smd circle (at 0.8 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 92 /VTUNE) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B2 smd circle (at 0.8 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C2 smd circle (at 0.8 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D2 smd circle (at 0.8 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E2 smd circle (at 0.8 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 7 /USB-) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F2 smd circle (at 0.8 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G2 smd circle (at 0.8 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 47 /D2) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H2 smd circle (at 0.8 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J2 smd circle (at 0.8 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 29 /SSP1_MOSI) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K2 smd circle (at 0.8 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 28 /P1_1) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A3 smd circle (at 1.6 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B3 smd circle (at 1.6 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C3 smd circle (at 1.6 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D3 smd circle (at 1.6 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E3 smd circle (at 1.6 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 94 /USBV_3V) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F3 smd circle (at 1.6 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 11 "Net-(R21-Pad1)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G3 smd circle (at 1.6 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H3 smd circle (at 1.6 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J3 smd circle (at 1.6 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K3 smd circle (at 1.6 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A4 smd circle (at 2.4 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 24 "Net-(R6-Pad2)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B4 smd circle (at 2.4 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C4 smd circle (at 2.4 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D4 smd circle (at 2.4 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E4 smd circle (at 2.4 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F4 smd circle (at 2.4 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G4 smd circle (at 2.4 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 61 /ADF_TXDATA) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H4 smd circle (at 2.4 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J4 smd circle (at 2.4 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 56 "Net-(P4-Pad1)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K4 smd circle (at 2.4 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 99 /~RAMP) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A5 smd circle (at 3.2 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B5 smd circle (at 3.2 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C5 smd circle (at 3.2 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D5 smd circle (at 3.2 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E5 smd circle (at 3.2 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F5 smd circle (at 3.2 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 41 /D8) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G5 smd circle (at 3.2 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H5 smd circle (at 3.2 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 62 /ADF_LE) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J5 smd circle (at 3.2 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 63 /ADF_CE) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K5 smd circle (at 3.2 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A6 smd circle (at 4 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B6 smd circle (at 4 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 97 /NRESET) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C6 smd circle (at 4 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 26 /P2_8) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D6 smd circle (at 4 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 19 /SCL) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E6 smd circle (at 4 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 20 /SDA) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F6 smd circle (at 4 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G6 smd circle (at 4 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 64 /MIX_ENBL) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H6 smd circle (at 4 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J6 smd circle (at 4 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K6 smd circle (at 4 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A7 smd circle (at 4.8 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 16 /SPIFI_CLK) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B7 smd circle (at 4.8 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 14 /SPIFI_IO2) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C7 smd circle (at 4.8 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 13 /SPIFI_MISO) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D7 smd circle (at 4.8 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 15 /SPIFI_MOSI) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E7 smd circle (at 4.8 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 12 /SPIFI_CS) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F7 smd circle (at 4.8 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 65 /PA_OFF) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G7 smd circle (at 4.8 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 42 /D7) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H7 smd circle (at 4.8 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J7 smd circle (at 4.8 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K7 smd circle (at 4.8 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 57 "Net-(R24-Pad1)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A8 smd circle (at 5.6 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B8 smd circle (at 5.6 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 17 /SPIFI_IO3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C8 smd circle (at 5.6 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D8 smd circle (at 5.6 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 95 /OTG_USBV) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E8 smd circle (at 5.6 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F8 smd circle (at 5.6 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 88 /MCP_~U~D_3.3V) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G8 smd circle (at 5.6 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 1 GND) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H8 smd circle (at 5.6 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 30 /ADC_CLK) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J8 smd circle (at 5.6 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 49 /D0) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K8 smd circle (at 5.6 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 45 /D4) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A9 smd circle (at 6.4 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 86 /GPIO0) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B9 smd circle (at 6.4 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C9 smd circle (at 6.4 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D9 smd circle (at 6.4 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E9 smd circle (at 6.4 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F9 smd circle (at 6.4 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 89 /MCP_CS_3.3V) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G9 smd circle (at 6.4 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H9 smd circle (at 6.4 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 44 /D5) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J9 smd circle (at 6.4 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K9 smd circle (at 6.4 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 59 "Net-(R26-Pad1)") (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad A10 smd circle (at 7.2 0 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad B10 smd circle (at 7.2 0.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 25 /P2_9) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad C10 smd circle (at 7.2 1.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 90 /GPIO1) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad D10 smd circle (at 7.2 2.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 37 /LED1) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad E10 smd circle (at 7.2 3.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad F10 smd circle (at 7.2 4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 2 /3V3) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad G10 smd circle (at 7.2 4.8 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 43 /D6) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad H10 smd circle (at 7.2 5.6 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 48 /D1) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad J10 smd circle (at 7.2 6.4 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) (pad K10 smd circle (at 7.2 7.2 90) (size 0.33 0.33) (layers F.Cu F.Paste F.Mask) (net 87 /ADC_~OE~) (solder_mask_margin 0.075) (solder_paste_margin 0.035)) ) (module SSOP_Packages:SSOP-28_5.3x10.2mm_Pitch0.65mm (layer F.Cu) (tedit 55A25946) (tstamp 55773794) (at 143.5 85.1 180) (descr "28-Lead Plastic Shrink Small Outline (SS)-5.30 mm Body [SSOP] (see Microchip Packaging Specification 00000049BS.pdf)") (tags "SSOP 0.65") (path /5575E525) (attr smd) (fp_text reference U1 (at -0.3 0.3 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value MAX1426 (at 0 6.25 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -4.75 -5.5) (end -4.75 5.5) (layer F.CrtYd) (width 0.05)) (fp_line (start 4.75 -5.5) (end 4.75 5.5) (layer F.CrtYd) (width 0.05)) (fp_line (start -4.75 -5.5) (end 4.75 -5.5) (layer F.CrtYd) (width 0.05)) (fp_line (start -4.75 5.5) (end 4.75 5.5) (layer F.CrtYd) (width 0.05)) (fp_line (start -2.875 -5.325) (end -2.875 -4.675) (layer F.SilkS) (width 0.15)) (fp_line (start 2.875 -5.325) (end 2.875 -4.675) (layer F.SilkS) (width 0.15)) (fp_line (start 2.875 5.325) (end 2.875 4.675) (layer F.SilkS) (width 0.15)) (fp_line (start -2.875 5.325) (end -2.875 4.675) (layer F.SilkS) (width 0.15)) (fp_line (start -2.875 -5.325) (end 2.875 -5.325) (layer F.SilkS) (width 0.15)) (fp_line (start -2.875 5.325) (end 2.875 5.325) (layer F.SilkS) (width 0.15)) (fp_line (start -2.875 -4.675) (end -4.475 -4.675) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -3.6 -4.225 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 2 smd rect (at -3.6 -3.575 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 3 smd rect (at -3.6 -2.925 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 50 /REFP)) (pad 4 smd rect (at -3.6 -2.275 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 51 /REFIN)) (pad 5 smd rect (at -3.6 -1.625 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 52 /REFN)) (pad 6 smd rect (at -3.6 -0.975 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 53 /CML)) (pad 7 smd rect (at -3.6 -0.325 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 8 smd rect (at -3.6 0.325 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 9 smd rect (at -3.6 0.975 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 22 /ADC_IN+)) (pad 10 smd rect (at -3.6 1.625 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 23 /ADC_IN-)) (pad 11 smd rect (at -3.6 2.275 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 72 /CMLP)) (pad 12 smd rect (at -3.6 2.925 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 13 smd rect (at -3.6 3.575 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 30 /ADC_CLK)) (pad 14 smd rect (at -3.6 4.225 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 87 /ADC_~OE~)) (pad 15 smd rect (at 3.6 4.225 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 40 /D9)) (pad 16 smd rect (at 3.6 3.575 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 41 /D8)) (pad 17 smd rect (at 3.6 2.925 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 42 /D7)) (pad 18 smd rect (at 3.6 2.275 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 43 /D6)) (pad 19 smd rect (at 3.6 1.625 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 44 /D5)) (pad 20 smd rect (at 3.6 0.975 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 21 smd rect (at 3.6 0.325 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 22 smd rect (at 3.6 -0.325 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 23 smd rect (at 3.6 -0.975 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 24 smd rect (at 3.6 -1.625 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 45 /D4)) (pad 25 smd rect (at 3.6 -2.275 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 46 /D3)) (pad 26 smd rect (at 3.6 -2.925 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 47 /D2)) (pad 27 smd rect (at 3.6 -3.575 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 48 /D1)) (pad 28 smd rect (at 3.6 -4.225 180) (size 1.75 0.45) (layers F.Cu F.Paste F.Mask) (net 49 /D0)) (model Housings_SSOP.3dshapes/SSOP-28_5.3x10.2mm_Pitch0.65mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:XTAL_3.2x2.5 (layer F.Cu) (tedit 55A403C2) (tstamp 5579C11D) (at 128.8 92.1) (path /557A8B2B) (fp_text reference X1 (at 0.05 -0.15) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 12MHz (at 0 -2.5) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.6 1.2) (end -1.6 -1.3) (layer F.SilkS) (width 0.15)) (fp_line (start -1.6 -1.3) (end 1.6 -1.3) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 -1.3) (end 1.6 1.2) (layer F.SilkS) (width 0.15)) (fp_line (start 1.6 1.2) (end -1.6 1.2) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.4 0.8) (size 1.4 1.2) (layers F.Cu F.Paste F.Mask) (net 3 /XTAL1)) (pad 2 smd rect (at 1.2 0.8) (size 1.4 1.2) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at 1.2 -0.9) (size 1.4 1.2) (layers F.Cu F.Paste F.Mask) (net 4 /XTAL2)) (pad 4 smd rect (at -1.4 -0.9) (size 1.4 1.2) (layers F.Cu F.Paste F.Mask) (net 1 GND)) ) (module fmcw2:LED_0603 (layer F.Cu) (tedit 55A40384) (tstamp 557DB230) (at 124.5 72.05) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5534D328) (attr smd) (fp_text reference D1 (at -2.33 0.12 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LED (at 0 1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 0.6) (end 0.3 0) (layer F.SilkS) (width 0.15)) (fp_line (start 0.3 0) (end -0.4 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 54 "Net-(D1-Pad1)")) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:LED_0603 (layer F.Cu) (tedit 55A4037F) (tstamp 557DB236) (at 119.1 74.9 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5534CA56) (attr smd) (fp_text reference D2 (at -2.31 -0.42 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LED (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 0.6) (end 0.3 0) (layer F.SilkS) (width 0.15)) (fp_line (start 0.3 0) (end -0.4 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 55 "Net-(D2-Pad1)")) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:EVP-AWBA2A (layer F.Cu) (tedit 55A403D3) (tstamp 5582FE9E) (at 121.81 90.99) (path /55344760) (fp_text reference SW1 (at 1.59 -0.04) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value DFU_PUSH (at 1 -1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start 0.1 1) (end 0.1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 0.1 -1) (end 3.1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.1 -1) (end 3.1 1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.1 1) (end 0.1 1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0) (size 0.55 1.5) (layers F.Cu F.Mask) (net 26 /P2_8)) (pad 2 smd rect (at 3.25 0) (size 0.55 1.5) (layers F.Cu F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 3.25 -0.4) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 3.25 0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 1 smd rect (at 0 -0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 26 /P2_8)) (pad 1 smd rect (at 0 0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 26 /P2_8)) ) (module fmcw2:SRN4018 (layer F.Cu) (tedit 55A65E29) (tstamp 5585934F) (at 127.94 73.3 270) (path /55773209) (fp_text reference L1 (at 1.45 -0.135 360) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 4.7u/SRN4018-4R7M (at 1.5 -2.5 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.5 2.1) (end -0.5 -1.9) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 -1.9) (end 3.5 -1.9) (layer F.SilkS) (width 0.15)) (fp_line (start 3.5 -1.9) (end 3.5 2.1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.5 2.1) (end -0.5 2.1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 270) (size 1.5 3.6) (layers F.Cu F.Paste F.Mask) (net 32 "Net-(C23-Pad1)")) (pad 2 smd rect (at 3.05 0 270) (size 1.5 3.6) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) ) (module SSOP_Packages:SSOP-16_3.9x4.9mm_Pitch0.635mm (layer F.Cu) (tedit 55A25949) (tstamp 5595664C) (at 144.92 95.3) (descr "SSOP16: plastic shrink small outline package; 16 leads; body width 3.9 mm; lead pitch 0.635; (see NXP SSOP-TSSOP-VSO-REFLOW.pdf and sot519-1_po.pdf)") (tags "SSOP 0.635") (path /5589E977) (attr smd) (fp_text reference U2 (at 0.13 -0.25) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LT1817 (at 0 3.5) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -3.45 -2.75) (end -3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 3.45 -2.75) (end 3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -3.45 -2.75) (end 3.45 -2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -3.45 2.75) (end 3.45 2.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -2 2.6475) (end 2 2.6475) (layer F.SilkS) (width 0.15)) (fp_line (start -3.275 -2.6475) (end 2 -2.6475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -2.6 -2.2225) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 68 "Net-(C10-Pad2)")) (pad 2 smd rect (at -2.6 -1.5875) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 73 "Net-(C8-Pad2)")) (pad 3 smd rect (at -2.6 -0.9525) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 78 "Net-(R2-Pad1)")) (pad 4 smd rect (at -2.6 -0.3175) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 5 smd rect (at -2.6 0.3175) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 82 "Net-(R34-Pad2)")) (pad 6 smd rect (at -2.6 0.9525) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 77 "Net-(C18-Pad2)")) (pad 7 smd rect (at -2.6 1.5875) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 76 "Net-(C18-Pad1)")) (pad 8 smd rect (at -2.6 2.2225) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask)) (pad 9 smd rect (at 2.6 2.2225) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask)) (pad 10 smd rect (at 2.6 1.5875) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 71 "Net-(C17-Pad2)")) (pad 11 smd rect (at 2.6 0.9525) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 81 "Net-(R31-Pad1)")) (pad 12 smd rect (at 2.6 0.3175) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 79 "Net-(R14-Pad1)")) (pad 13 smd rect (at 2.6 -0.3175) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 14 smd rect (at 2.6 -0.9525) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 80 "Net-(R28-Pad1)")) (pad 15 smd rect (at 2.6 -1.5875) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 70 "Net-(C11-Pad2)")) (pad 16 smd rect (at 2.6 -2.2225) (size 1.2 0.4) (layers F.Cu F.Paste F.Mask) (net 69 "Net-(C11-Pad1)")) (model Housings_SSOP.3dshapes/SSOP-16_3.9x4.9mm_Pitch0.635mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module Housings_SOT-23_SOT-143_TSOT-6:SOT-23-6 (layer F.Cu) (tedit 55A40452) (tstamp 55956665) (at 146.45 99.9) (descr "6-pin SOT-23 package") (tags SOT-23-6) (path /5589FDED) (attr smd) (fp_text reference U8 (at 2.65 0.3 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value MCP4022-202 (at 0 2.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_circle (center -0.4 -1.7) (end -0.3 -1.7) (layer F.SilkS) (width 0.15)) (fp_line (start 0.25 -1.45) (end -0.25 -1.45) (layer F.SilkS) (width 0.15)) (fp_line (start 0.25 1.45) (end 0.25 -1.45) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 1.45) (end 0.25 1.45) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 -1.45) (end -0.25 1.45) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.1 -0.95) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at -1.1 0) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at -1.1 0.95) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 83 /MCP_U~D~_5V)) (pad 4 smd rect (at 1.1 0.95) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 84 /MCP_~CS~_5V)) (pad 6 smd rect (at 1.1 -0.95) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 85 /A_OUT)) (pad 5 smd rect (at 1.1 0) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 74 /W_IN)) (model Housings_SOT-23_SOT-143_TSOT-6.3dshapes/SOT-23-6.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:SOT-416 (layer F.Cu) (tedit 55A403F9) (tstamp 55982BDE) (at 135.65 99.6 90) (path /55982DAE) (fp_text reference Q1 (at 0.5 -0.45 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value RE1C002UN (at -0.05 -1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 0.05) (end -0.4 -0.95) (layer F.SilkS) (width 0.15)) (fp_line (start -0.4 -0.95) (end 1.3 -0.95) (layer F.SilkS) (width 0.15)) (fp_line (start 1.3 -0.95) (end 1.3 0.05) (layer F.SilkS) (width 0.15)) (fp_line (start 1.3 0.05) (end -0.4 0.05) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 88 /MCP_~U~D_3.3V)) (pad 2 smd rect (at 1 0 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at 0.5 -1.05 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 83 /MCP_U~D~_5V)) ) (module fmcw2:SOT-416 (layer F.Cu) (tedit 55A403F7) (tstamp 55982BE9) (at 133.15 99.6 90) (path /559833C0) (fp_text reference Q2 (at 0.45 -0.4 90) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value RE1C002UN (at -0.05 -1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.4 0.05) (end -0.4 -0.95) (layer F.SilkS) (width 0.15)) (fp_line (start -0.4 -0.95) (end 1.3 -0.95) (layer F.SilkS) (width 0.15)) (fp_line (start 1.3 -0.95) (end 1.3 0.05) (layer F.SilkS) (width 0.15)) (fp_line (start 1.3 0.05) (end -0.4 0.05) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 89 /MCP_CS_3.3V)) (pad 2 smd rect (at 1 0 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at 0.5 -1.05 90) (size 0.46 0.65) (layers F.Cu F.Paste F.Mask) (net 84 /MCP_~CS~_5V)) ) (module Pin_Headers:Pin_Header_Straight_1x06 (layer F.Cu) (tedit 55A258E7) (tstamp 559947B0) (at 119.3 77.25) (descr "Through hole pin header") (tags "pin header") (path /55994889) (fp_text reference P7 (at 0 0.1) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_6 (at 0 -3.1) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.75 -1.75) (end -1.75 14.45) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.75 -1.75) (end 1.75 14.45) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.75 -1.75) (end 1.75 -1.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.75 14.45) (end 1.75 14.45) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.27 1.27) (end 1.27 13.97) (layer F.SilkS) (width 0.15)) (fp_line (start 1.27 13.97) (end -1.27 13.97) (layer F.SilkS) (width 0.15)) (fp_line (start -1.27 13.97) (end -1.27 1.27) (layer F.SilkS) (width 0.15)) (fp_line (start 1.55 -1.55) (end 1.55 0) (layer F.SilkS) (width 0.15)) (fp_line (start 1.27 1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.15)) (fp_line (start -1.55 0) (end -1.55 -1.55) (layer F.SilkS) (width 0.15)) (fp_line (start -1.55 -1.55) (end 1.55 -1.55) (layer F.SilkS) (width 0.15)) (pad 1 thru_hole rect (at 0 0) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (pad 2 thru_hole oval (at 0 2.54) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 58 /SSP1_CLK)) (pad 3 thru_hole oval (at 0 5.08) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 29 /SSP1_MOSI)) (pad 4 thru_hole oval (at 0 7.62) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 60 /SSP1_MISO)) (pad 5 thru_hole oval (at 0 10.16) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 86 /GPIO0)) (pad 6 thru_hole oval (at 0 12.7) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 2 /3V3)) (model Pin_Headers.3dshapes/Pin_Header_Straight_1x06.wrl (at (xyz 0 -0.25 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) (module fmcw2:EJ508A (layer F.Cu) (tedit 55AA2B22) (tstamp 559AE301) (at 147.75 70.45 90) (path /559B4A5F) (fp_text reference CON1 (at -2.68 0.18 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value BARREL_JACK (at -0.7 -7.6 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -6.5 7.7) (end -6.5 4.9) (layer F.SilkS) (width 0.15)) (fp_line (start -6.5 4.9) (end -2.9 4.9) (layer F.SilkS) (width 0.15)) (fp_line (start -2.9 4.9) (end -2.9 7.7) (layer F.SilkS) (width 0.15)) (fp_line (start -9 -6.7) (end 0 -6.7) (layer F.SilkS) (width 0.15)) (fp_line (start 0 7.7) (end -9 7.7) (layer F.SilkS) (width 0.15)) (fp_line (start -9 7.7) (end -9 -6.7) (layer F.SilkS) (width 0.15)) (fp_line (start 0 -6.7) (end 0 7.7) (layer F.SilkS) (width 0.15)) (pad 3 thru_hole circle (at 0 -3 90) (size 4.2 4.2) (drill 3.05) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (pad 1 thru_hole circle (at -5.9 -6 90) (size 4.6 4.6) (drill 3.56) (layers *.Cu *.Mask F.SilkS) (net 31 /12V) (thermal_width 2) (thermal_gap 0.2)) (pad 2 thru_hole circle (at -5.9 0 90) (size 4.2 4.2) (drill 3.05) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) ) (module Pin_Headers:Pin_Header_Straight_1x05 (layer F.Cu) (tedit 55A258EB) (tstamp 559C0EF1) (at 129.2 69.45 270) (descr "Through hole pin header") (tags "pin header") (path /559C61C6) (fp_text reference P6 (at -0.05 0 270) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value CONN_5 (at 0 -3.1 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.55 0) (end -1.55 -1.55) (layer F.SilkS) (width 0.15)) (fp_line (start -1.55 -1.55) (end 1.55 -1.55) (layer F.SilkS) (width 0.15)) (fp_line (start 1.55 -1.55) (end 1.55 0) (layer F.SilkS) (width 0.15)) (fp_line (start -1.75 -1.75) (end -1.75 11.95) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.75 -1.75) (end 1.75 11.95) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.75 -1.75) (end 1.75 -1.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.75 11.95) (end 1.75 11.95) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.27 1.27) (end 1.27 11.43) (layer F.SilkS) (width 0.15)) (fp_line (start 1.27 11.43) (end -1.27 11.43) (layer F.SilkS) (width 0.15)) (fp_line (start -1.27 11.43) (end -1.27 1.27) (layer F.SilkS) (width 0.15)) (fp_line (start 1.27 1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.15)) (pad 1 thru_hole rect (at 0 0 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 1 GND)) (pad 2 thru_hole oval (at 0 2.54 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 90 /GPIO1)) (pad 3 thru_hole oval (at 0 5.08 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 19 /SCL)) (pad 4 thru_hole oval (at 0 7.62 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 20 /SDA)) (pad 5 thru_hole oval (at 0 10.16 270) (size 2.032 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS) (net 2 /3V3)) (model Pin_Headers.3dshapes/Pin_Header_Straight_1x05.wrl (at (xyz 0 -0.2 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) (module fmcw2:SSOT-6 (layer F.Cu) (tedit 55A403DC) (tstamp 559D5A61) (at 124.53 99.19 180) (path /559E2CA6) (fp_text reference U9 (at -0.07 -0.06 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value FDC6329L (at -0.7 -2.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_circle (center -1.3 0.4) (end -1.1 0.3) (layer F.SilkS) (width 0.15)) (fp_line (start -1.6 0.7) (end -1.6 -0.9) (layer F.SilkS) (width 0.15)) (fp_line (start -1.6 -0.9) (end 1.4 -0.9) (layer F.SilkS) (width 0.15)) (fp_line (start 1.4 -0.9) (end 1.4 0.7) (layer F.SilkS) (width 0.15)) (fp_line (start 1.4 0.7) (end -1.6 0.7) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.1 1.2 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 93 "Net-(R40-Pad1)")) (pad 2 smd rect (at -0.15 1.2 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 5 /USBV)) (pad 3 smd rect (at 0.8 1.2 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 5 /USBV)) (pad 4 smd rect (at 0.8 -1.39 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 5 smd rect (at -0.15 -1.39 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 95 /OTG_USBV)) (pad 6 smd rect (at -1.1 -1.39 180) (size 0.69 0.99) (layers F.Cu F.Paste F.Mask) (net 91 "Net-(C48-Pad2)")) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4050D) (tstamp 55A40CB3) (at 131.15 84.05 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225B59) (attr smd) (fp_text reference C1 (at -1.55 0.05 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A404AC) (tstamp 55A40CBE) (at 131.5 86.2 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225B8F) (attr smd) (fp_text reference C2 (at -0.2 1.6 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A404CF) (tstamp 55A40CC9) (at 132.4 86.4 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225BC7) (attr smd) (fp_text reference C3 (at -0.95 -1.05 450) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A40CD4) (at 135.85 83.85 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225C01) (attr smd) (fp_text reference C4 (at 0 1.7 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40511) (tstamp 55A40CDF) (at 132.1 80.85 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225C73) (attr smd) (fp_text reference C5 (at 0.55 0.95 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A404A0) (tstamp 55A40CEA) (at 128.5 86.85 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225CB1) (attr smd) (fp_text reference C6 (at -0.4 1.15 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A404C2) (tstamp 55A40CF5) (at 134.55 90.15) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55225CF1) (attr smd) (fp_text reference C7 (at -0.1 1) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4043D) (tstamp 55A40D00) (at 140.03 93.02 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /559467F9) (attr smd) (fp_text reference C8 (at -1.57 0.03 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 33p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 68 "Net-(C10-Pad2)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 73 "Net-(C8-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4042D) (tstamp 55A40D0B) (at 140.64 94.99 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5588C8D2) (attr smd) (fp_text reference C9 (at 0.14 -3.01 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40443) (tstamp 55A40D16) (at 143.16 91.6 180) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55891C93) (attr smd) (fp_text reference C10 (at 0.01 0.05 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 180) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 74 /W_IN)) (pad 2 smd rect (at 1 0 180) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 68 "Net-(C10-Pad2)")) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40475) (tstamp 55A40D21) (at 148.44 94.39 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5594BC04) (attr smd) (fp_text reference C11 (at 1.19 -0.91 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 69 "Net-(C11-Pad1)")) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 70 "Net-(C11-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A402FE) (tstamp 55A40D2C) (at 132.45 78.25 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55225E57) (attr smd) (fp_text reference C12 (at -0.77 1 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40393) (tstamp 55A40D37) (at 148.7 84.95 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557625A4) (attr smd) (fp_text reference C13 (at -2.65 0.04 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100p (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A403AA) (tstamp 55A40D42) (at 148.23 91.76) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5594B7C4) (attr smd) (fp_text reference C14 (at -0.47 -0.82) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 75 /CM)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A65DC0) (tstamp 55A40D4D) (at 146.59 89.49 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55762323) (attr smd) (fp_text reference C15 (at 0.36 1.24 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100p (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4051D) (tstamp 55A40D58) (at 140.475 84.05 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5575F5A9) (attr smd) (fp_text reference C16 (at -1.6 0.15 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer B.Cu) (tedit 55A4045B) (tstamp 55A40D63) (at 146.4 97.65) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /559481CE) (attr smd) (fp_text reference C17 (at 0.5 1) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1u (at 0 -1.9) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end -1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.45 0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.35 0.6) (end 0.35 0.6) (layer B.SilkS) (width 0.15)) (fp_line (start 0.35 -0.6) (end -0.35 -0.6) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 23 /ADC_IN-)) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 71 "Net-(C17-Pad2)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4040C) (tstamp 55A40D6E) (at 140.65 96.55 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5588FD27) (attr smd) (fp_text reference C18 (at 1.15 -1.5 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 33p (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 76 "Net-(C18-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 77 "Net-(C18-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40495) (tstamp 55A40D79) (at 125.57 87.13 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5532D414) (attr smd) (fp_text reference C19 (at -1.02 -0.87 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40521) (tstamp 55A40D84) (at 140.45 86.35 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5575F6E3) (attr smd) (fp_text reference C20 (at 0.05 -1.6 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40321) (tstamp 55A40D8F) (at 141.1 69.06) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55779A04) (attr smd) (fp_text reference C21 (at 1.215 1.39) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 2 smd rect (at 1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A4038A) (tstamp 55A40D9A) (at 122.39 75.26 270) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /5577633D) (attr smd) (fp_text reference C22 (at 0.08 -1.52 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 2 smd rect (at 1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40537) (tstamp 55A40DA5) (at 125.23 74.63 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55772FF9) (attr smd) (fp_text reference C23 (at -0.84 1.03 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 32 "Net-(C23-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 33 "Net-(C23-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40379) (tstamp 55A40DB0) (at 132.17 75.44 90) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /557759D8) (attr smd) (fp_text reference C24 (at -0.68 1.81 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 90) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 1 0 90) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40337) (tstamp 55A40DBB) (at 131.69 71.59 270) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55779E88) (attr smd) (fp_text reference C25 (at -0.07 -1.79 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 2 smd rect (at 1 0 270) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4056A) (tstamp 55A40DC6) (at 134.96 71.06 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55779E4F) (attr smd) (fp_text reference C26 (at -0.13 1.105 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 34 "Net-(C26-Pad1)")) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 35 "Net-(C26-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40D61) (tstamp 55A40DD1) (at 137.4 75.95) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55779E7A) (attr smd) (fp_text reference C27 (at 2.1 2.65) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40433) (tstamp 55A40DF2) (at 138.65 99.3 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5577468C) (attr smd) (fp_text reference C30 (at 0.05 -1.1 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40408) (tstamp 55A40DFD) (at 137.05 97.4 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55774069) (attr smd) (fp_text reference C31 (at -0.05 -0.6 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4041D) (tstamp 55A40E08) (at 139 97.2 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557A0F09) (attr smd) (fp_text reference C32 (at 0.05 0.7 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A403A1) (tstamp 55A40E13) (at 148.85 89.6 270) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /557AD0D4) (attr smd) (fp_text reference C33 (at -0.63 -0.84 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 270) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.75 0 270) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A65DBB) (tstamp 55A40E1E) (at 147.84 89.49 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557ABE14) (attr smd) (fp_text reference C34 (at -0.39 -1.185 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40395) (tstamp 55A40E29) (at 149.54 84.96 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557ABF49) (attr smd) (fp_text reference C35 (at -2.68 -0.04 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40378) (tstamp 55A40E34) (at 130.93 75.44 90) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /557B430B) (attr smd) (fp_text reference C36 (at 0.15 3.05 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0 90) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 1 0 90) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4057F) (tstamp 55A40E3F) (at 149.45 87.15 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557AF0BB) (attr smd) (fp_text reference C37 (at 0.8 -5.5 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 50 /REFP)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40581) (tstamp 55A40E4A) (at 148.7 87 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557B1280) (attr smd) (fp_text reference C38 (at -0.2 -4.8 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 51 /REFIN)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A65DA5) (tstamp 55A40E55) (at 146.85 87.575 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557B13D1) (attr smd) (fp_text reference C39 (at -0.1 -1.175 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 52 /REFN)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40188) (tstamp 55A40E60) (at 147 85.25 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /557B1647) (attr smd) (fp_text reference C40 (at 0 1.7 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 53 /CML)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer B.Cu) (tedit 55A4045D) (tstamp 55A40E6B) (at 143.3 97.65 180) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55949CA9) (attr smd) (fp_text reference C41 (at -0.5 1.2 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1u (at 0 -1.9 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end -1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.45 0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.35 0.6) (end 0.35 0.6) (layer B.SilkS) (width 0.15)) (fp_line (start 0.35 -0.6) (end -0.35 -0.6) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 180) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 22 /ADC_IN+)) (pad 2 smd rect (at 0.75 0 180) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 76 "Net-(C18-Pad1)")) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A404BE) (tstamp 55A40E76) (at 127.6 89.9 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5504C027) (attr smd) (fp_text reference C42 (at 1.45 -0.05 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 18p (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 3 /XTAL1)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A404B9) (tstamp 55A40E81) (at 129.9 89.9) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5504C044) (attr smd) (fp_text reference C43 (at 0.05 -1.6) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 18p (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 4 /XTAL2)) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A403EC) (tstamp 55A40E8C) (at 123.73 94.55 90) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55050326) (attr smd) (fp_text reference C44 (at 1.4 0.07 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 2.2u (at 0 1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 5 /USBV)) (pad 2 smd rect (at 0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A4048C) (tstamp 55A40E97) (at 120.7 99.6 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55050AD9) (attr smd) (fp_text reference C45 (at 0.1 1.25 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.7 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 6 "Net-(C45-Pad1)")) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A40505) (tstamp 55A40EA2) (at 131 89.1 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55051EC2) (attr smd) (fp_text reference C46 (at -0.25 -1.45 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100n (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A4044C) (tstamp 55A40EAD) (at 144.1 99.55 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55954AD4) (attr smd) (fp_text reference C47 (at -0.3 1.05 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer B.Cu) (tedit 55A65DF8) (tstamp 55A40EB8) (at 125.76 99.2 270) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /559E4B2E) (attr smd) (fp_text reference C48 (at 1.625 0.56 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.7 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end -1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.15 0.6) (end 1.15 -0.6) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.475) (end -0.25 0.475) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.475) (end 0.25 -0.475) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 5 /USBV)) (pad 2 smd rect (at 0.55 0 270) (size 0.6 0.5) (layers B.Cu B.Paste B.Mask) (net 91 "Net-(C48-Pad2)")) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40438) (tstamp 55A40EC3) (at 136.64 93.47 180) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /559F4786) (attr smd) (fp_text reference C49 (at -0.01 -1.13 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 100n (at 0 1.7 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.55 0 180) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0805b (layer F.Cu) (tedit 55A40D5F) (tstamp 55A40ECE) (at 137.4 77.125) (descr "Capacitor SMD 0805, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0805") (path /55A33FDC) (attr smd) (fp_text reference C50 (at 0.55 1.475) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10u (at 0 2.1) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1) (end 1.8 -1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 -1) (end -1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1) (end 1.8 1) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.5 -0.85) (end -0.5 -0.85) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 0.85) (end 0.5 0.85) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) (pad 2 smd rect (at 1 0) (size 1 1.25) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0805.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D76) (tstamp 55A40ED9) (at 124.5 71.05 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5534D322) (attr smd) (fp_text reference R1 (at -1.425 -0.1 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 240 (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 54 "Net-(D1-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40596) (tstamp 55A40EE4) (at 140.15 99.8 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55888994) (attr smd) (fp_text reference R2 (at -0.05 -1.05 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 78 "Net-(R2-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 67 /IFF+)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40532) (tstamp 55A40EEF) (at 120.15 71.5) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5534F1E2) (attr smd) (fp_text reference R3 (at -1.6 -0.4) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 20 /SDA)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40598) (tstamp 55A40EFA) (at 140.15 98.9 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55888AB4) (attr smd) (fp_text reference R4 (at 0 1.1 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 1k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 73 "Net-(C8-Pad2)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 66 /IFF-)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D79) (tstamp 55A40F05) (at 122.7 71.65) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5534F375) (attr smd) (fp_text reference R5 (at 0.05 -0.9) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 19 /SCL)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A4049C) (tstamp 55A40F10) (at 127.42 85.08 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5534E6BF) (attr smd) (fp_text reference R6 (at -1.33 0.02 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 24 "Net-(R6-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A40F1B) (at 146.87 81.72 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5586DC10) (attr smd) (fp_text reference R7 (at 0 1.4 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 72 /CMLP)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A40F26) (at 146.04 84.11 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5586DD6F) (attr smd) (fp_text reference R8 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 0 (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 72 /CMLP)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A402F8) (tstamp 55A40F31) (at 129.85 78.2) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55343DC1) (attr smd) (fp_text reference R9 (at 0.78 -0.78) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10k (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 25 /P2_9)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A4038D) (tstamp 55A40F3C) (at 127.65 78.15 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55344451) (attr smd) (fp_text reference R10 (at 1.23 -1.17 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10k (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 26 /P2_8)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403B3) (tstamp 55A40F47) (at 136.3 90 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55344FFD) (attr smd) (fp_text reference R11 (at 0.2 -1.7 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10k (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 27 /P1_2)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A404C9) (tstamp 55A40F52) (at 136.3 85.925 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /553454A8) (attr smd) (fp_text reference R12 (at -0.325 1.35 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 28 /P1_1)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D68) (tstamp 55A40F5D) (at 119.7 74.95) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5534CA02) (attr smd) (fp_text reference R13 (at -0.3 -1.425) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 240 (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 37 /LED1)) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 55 "Net-(D2-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A401B2) (tstamp 55A40F68) (at 149.01 95.64) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5589412C) (attr smd) (fp_text reference R14 (at 0 -1.4) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 4.7k (at 0 1.8) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 79 "Net-(R14-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 75 /CM)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D6C) (tstamp 55A40F73) (at 123.9 77.34 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /557736B3) (attr smd) (fp_text reference R15 (at -0.04 -1.63 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 9.53k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 38 "Net-(R15-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D57) (tstamp 55A40F7E) (at 123.92 76.52 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /557735AB) (attr smd) (fp_text reference R16 (at 1.285 0.33 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 49.9k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 38 "Net-(R15-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40571) (tstamp 55A40F89) (at 132.62 71.58 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55779E66) (attr smd) (fp_text reference R17 (at -0.75 -1.05 450) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 15.83k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 39 "Net-(R17-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A4048A) (tstamp 55A40F94) (at 119.53 99.7 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55050A8E) (attr smd) (fp_text reference R18 (at 0 -1.13 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value DNP (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 6 "Net-(C45-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403CE) (tstamp 55A40F9F) (at 124.95 95.5 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5504F70F) (attr smd) (fp_text reference R19 (at -1.55 -0.7 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 0 (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 7 /USB-)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 8 "Net-(R19-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403CB) (tstamp 55A40FAA) (at 126.28 95.17 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5504F6CA) (attr smd) (fp_text reference R20 (at -1.75 -0.45 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 0 (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 9 /USB+)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 10 "Net-(R20-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403BA) (tstamp 55A40FB5) (at 132.3 90.5 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55052452) (attr smd) (fp_text reference R21 (at 1.2 -0.6 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value "12k, 1%" (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 11 "Net-(R21-Pad1)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A404A6) (tstamp 55A40FC0) (at 128.625 84.475 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5505315D) (attr smd) (fp_text reference R22 (at 1.275 0.075 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 97 /NRESET)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A4056E) (tstamp 55A40FCB) (at 134.83 73.08 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55779E60) (attr smd) (fp_text reference R23 (at 0.15 1.05 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 49.9k (at 0 -1.8 180) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 39 "Net-(R17-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40518) (tstamp 55A40FD6) (at 137.5 82.7 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5579FBBD) (attr smd) (fp_text reference R24 (at 0.05 1.15 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 33 (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 57 "Net-(R24-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 30 /ADC_CLK)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65DEA) (tstamp 55A40FE1) (at 125.93 97.61) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559E35D5) (attr smd) (fp_text reference R25 (at -1.555 0.165) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 47k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 91 "Net-(C48-Pad2)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40302) (tstamp 55A40FEC) (at 134.95 78.25 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5579E934) (attr smd) (fp_text reference R26 (at 0.08 1.06 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 33 (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 59 "Net-(R26-Pad1)")) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 58 /SSP1_CLK)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A4046C) (tstamp 55A40FF7) (at 143.75 93.05 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55889F08) (attr smd) (fp_text reference R27 (at 0 1.05 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 78 "Net-(R2-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 /CM)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65D95) (tstamp 55A41002) (at 145.15 87.09 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5594B139) (attr smd) (fp_text reference R28 (at -0.035 -0.95 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.49k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 80 "Net-(R28-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 53 /CML)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A4043F) (tstamp 55A4100D) (at 140.82 93.03 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5588E096) (attr smd) (fp_text reference R29 (at -1.68 -0.13 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 1k (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 68 "Net-(C10-Pad2)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 73 "Net-(C8-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40466) (tstamp 55A41018) (at 147.95 92.66 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5594B6BC) (attr smd) (fp_text reference R30 (at 0.24 1.2 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.49k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 /CM)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 70 "Net-(C11-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40447) (tstamp 55A41023) (at 148.87 97.11 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55894F5E) (attr smd) (fp_text reference R31 (at 1.44 -0.38 360) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10k (at 0 1.8 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 81 "Net-(R31-Pad1)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 76 "Net-(C18-Pad1)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65DD1) (tstamp 55A4102E) (at 148.86 97.1 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /55896BAA) (attr smd) (fp_text reference R32 (at -0.85 1.535 360) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 81 "Net-(R31-Pad1)")) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 71 "Net-(C17-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40463) (tstamp 55A41039) (at 148.86 92.59 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5594B526) (attr smd) (fp_text reference R33 (at -0.61 0.79 90) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 49.9 (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 69 "Net-(C11-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 /CM)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A41044) (at 143.72 95.16 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5588EDCF) (attr smd) (fp_text reference R34 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 75 /CM)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 82 "Net-(R34-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A40429) (tstamp 55A4104F) (at 141.3 96.55 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5588F5C6) (attr smd) (fp_text reference R35 (at -2.15 0.35 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 4.7k (at 0 1.8 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 76 "Net-(C18-Pad1)")) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 77 "Net-(C18-Pad2)")) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403FC) (tstamp 55A4105A) (at 136.9 99.55 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5595814E) (attr smd) (fp_text reference R36 (at -1.3 0 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 47k (at 0 1.8 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 83 /MCP_U~D~_5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer F.Cu) (tedit 55A403F1) (tstamp 55A41065) (at 132.6 100.65 180) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5595836F) (attr smd) (fp_text reference R37 (at -1.85 -0.25 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 47k (at 0 1.8 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end -0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.95 -0.65) (end 0.95 0.65) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.525) (end -0.25 -0.525) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.525) (end 0.25 0.525) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.45 0 180) (size 0.4 0.6) (layers F.Cu F.Paste F.Mask) (net 84 /MCP_~CS~_5V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A40457) (tstamp 55A41070) (at 143.2 99) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /5595E9CA) (attr smd) (fp_text reference R38 (at -0.6 0.9 180) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 100 (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 77 "Net-(C18-Pad2)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 85 /A_OUT)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65DFE) (tstamp 55A4107B) (at 124.79 99.24 90) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559EC170) (attr smd) (fp_text reference R39 (at -0.535 -1.24 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 10k (at 0 -1.8 90) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 95 /OTG_USBV)) (pad 2 smd rect (at 0.45 0 90) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A65DF1) (tstamp 55A41086) (at 126.15 96.71) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559E4200) (attr smd) (fp_text reference R40 (at -0.775 -0.935) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 4.7k (at 0 -1.8) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 93 "Net-(R40-Pad1)")) (pad 2 smd rect (at 0.45 0) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A41091) (at 122.07 93.73 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559DEE7C) (attr smd) (fp_text reference R41 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 24k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 5 /USBV)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 94 /USBV_3V)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:R_0402b (layer B.Cu) (tedit 55A401B2) (tstamp 55A4109C) (at 122.08 95.54 270) (descr "Resistor SMD 0402, reflow soldering, Vishay (see dcrcw.pdf)") (tags "resistor 0402") (path /559DF022) (attr smd) (fp_text reference R42 (at 0 1.4 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 39k (at 0 -1.8 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.95 0.65) (end 0.95 0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 -0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.95 0.65) (end -0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.95 0.65) (end 0.95 -0.65) (layer B.CrtYd) (width 0.05)) (fp_line (start 0.25 0.525) (end -0.25 0.525) (layer B.SilkS) (width 0.15)) (fp_line (start -0.25 -0.525) (end 0.25 -0.525) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 94 /USBV_3V)) (pad 2 smd rect (at 0.45 0 270) (size 0.4 0.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Resistors_SMD.3dshapes/R_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:XDFN-2 (layer F.Cu) (tedit 55A40374) (tstamp 5582FE94) (at 135.12 73.62 180) (path /5577D53F) (fp_text reference D4 (at 1.86 0.04 270) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value SDM2U30CSP-7 (at 0 -1.2 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.2 0.4) (end -0.2 -0.4) (layer F.SilkS) (width 0.15)) (fp_line (start -0.2 -0.4) (end 1.4 -0.4) (layer F.SilkS) (width 0.15)) (fp_line (start 1.4 -0.4) (end 1.4 0.4) (layer F.SilkS) (width 0.15)) (fp_line (start 1.4 0.4) (end -0.2 0.4) (layer F.SilkS) (width 0.15)) (pad 2 smd rect (at 0 0 180) (size 0.385 0.69) (layers F.Cu F.Paste F.Mask) (net 34 "Net-(C26-Pad1)")) (pad 1 smd rect (at 0.912 0 180) (size 1.035 0.69) (layers F.Cu F.Paste F.Mask) (net 1 GND)) ) (module fmcw2:XDFN-2 (layer B.Cu) (tedit 55A40369) (tstamp 5582FE8E) (at 126.37 73.37 270) (path /5577E22F) (fp_text reference D3 (at 0.475 -1 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value SDM2U30CSP-7 (at 0 1.2 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.2 -0.4) (end -0.2 0.4) (layer B.SilkS) (width 0.15)) (fp_line (start -0.2 0.4) (end 1.4 0.4) (layer B.SilkS) (width 0.15)) (fp_line (start 1.4 0.4) (end 1.4 -0.4) (layer B.SilkS) (width 0.15)) (fp_line (start 1.4 -0.4) (end -0.2 -0.4) (layer B.SilkS) (width 0.15)) (pad 2 smd rect (at 0 0 270) (size 0.385 0.69) (layers B.Cu B.Paste B.Mask) (net 32 "Net-(C23-Pad1)")) (pad 1 smd rect (at 0.912 0 270) (size 1.035 0.69) (layers B.Cu B.Paste B.Mask) (net 1 GND)) ) (module fmcw2:TP_1.00 (layer B.Cu) (tedit 55A404EB) (tstamp 559D6E42) (at 129.97 88.62) (path /559F79B0) (fp_text reference P3 (at 0.125 -0.05) (layer B.SilkS) hide (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value CONN_1 (at 0 0.5) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (pad 1 smd circle (at 0 0) (size 1 1) (layers B.Cu B.Paste B.Mask) (net 96 "Net-(P3-Pad1)")) ) (module fmcw2:TP_1.00 (layer B.Cu) (tedit 55A404EB) (tstamp 557DB245) (at 134.45 83.85) (path /55797EE5) (fp_text reference P4 (at 0.125 -0.05) (layer B.SilkS) hide (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value CONN_1 (at 0 0.5) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (pad 1 smd circle (at 0 0) (size 1 1) (layers B.Cu B.Paste B.Mask) (net 56 "Net-(P4-Pad1)")) ) (module fmcw2:TP_1.00 (layer F.Cu) (tedit 55A404EB) (tstamp 557DB240) (at 148.82 69.27) (path /55345B4C) (fp_text reference P2 (at 0.125 0.05) (layer F.SilkS) hide (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value CONN_1 (at 0 -0.5) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (pad 1 smd circle (at 0 0) (size 1 1) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) ) (module fmcw2:SRN4018 (layer F.Cu) (tedit 55A65E1A) (tstamp 55A40FCC) (at 137.76 71.16 270) (path /55A425CB) (fp_text reference L2 (at 1.54 -0.015 360) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value 4.7u/SRN4018-4R7M (at 1.5 -2.5 270) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -0.5 2.1) (end -0.5 -1.9) (layer F.SilkS) (width 0.15)) (fp_line (start -0.5 -1.9) (end 3.5 -1.9) (layer F.SilkS) (width 0.15)) (fp_line (start 3.5 -1.9) (end 3.5 2.1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.5 2.1) (end -0.5 2.1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0 270) (size 1.5 3.6) (layers F.Cu F.Paste F.Mask) (net 34 "Net-(C26-Pad1)")) (pad 2 smd rect (at 3.05 0 270) (size 1.5 3.6) (layers F.Cu F.Paste F.Mask) (net 2 /3V3)) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A40F22) (tstamp 55A412A3) (at 128.51 100.74) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /5578116A) (attr smd) (fp_text reference C28 (at 2.15 -0.15) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 1u (at 0 1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 2 smd rect (at 0.75 0) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:EVP-AWBA2A (layer F.Cu) (tedit 55A41A18) (tstamp 55A41AE9) (at 118.2 72.35) (path /55A51005) (fp_text reference SW2 (at 1.55 0.075) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value DFU_PUSH (at 1 -1.9) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start 0.1 1) (end 0.1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 0.1 -1) (end 3.1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.1 -1) (end 3.1 1) (layer F.SilkS) (width 0.15)) (fp_line (start 3.1 1) (end 0.1 1) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0) (size 0.55 1.5) (layers F.Cu F.Mask) (net 1 GND)) (pad 2 smd rect (at 3.25 0) (size 0.55 1.5) (layers F.Cu F.Mask) (net 97 /NRESET)) (pad 2 smd rect (at 3.25 -0.4) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 97 /NRESET)) (pad 2 smd rect (at 3.25 0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 97 /NRESET)) (pad 1 smd rect (at 0 -0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 1 smd rect (at 0 0.5) (size 0.55 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) ) (module "fmcw2:DF12A-30DS-0.5V(81)" (layer B.Cu) (tedit 55A69A7A) (tstamp 55A6C13F) (at 135.38 95.53) (path /5582FA0D) (fp_text reference P1 (at 0.2 0) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_text value CONN_15X2 (at -0.3 3.7) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -4.85 -2.3) (end 4.85 -2.3) (layer B.SilkS) (width 0.15)) (fp_line (start -4.85 2.3) (end 4.85 2.3) (layer B.SilkS) (width 0.15)) (fp_line (start 4.85 2.3) (end 4.85 -2.3) (layer B.SilkS) (width 0.15)) (fp_line (start -4.85 2.3) (end -4.85 -2.3) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -3.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 60 /SSP1_MISO)) (pad 2 smd rect (at -3 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 58 /SSP1_CLK)) (pad 3 smd rect (at -2.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 29 /SSP1_MOSI)) (pad 4 smd rect (at -2 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 61 /ADF_TXDATA)) (pad 5 smd rect (at -1.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 62 /ADF_LE)) (pad 6 smd rect (at -1 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 63 /ADF_CE)) (pad 7 smd rect (at -0.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 65 /PA_OFF)) (pad 8 smd rect (at 0 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 64 /MIX_ENBL)) (pad 9 smd rect (at 0.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 10 smd rect (at 1 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 11 smd rect (at 1.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 12 smd rect (at 2 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 2 /3V3)) (pad 13 smd rect (at 2.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 14 smd rect (at 3 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 92 /VTUNE)) (pad 15 smd rect (at 3.5 -1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 16 smd rect (at 3.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 17 smd rect (at 3 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 18 smd rect (at 2.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 19 smd rect (at 2 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 20 smd rect (at 1.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 21 /5V)) (pad 21 smd rect (at 1 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 22 smd rect (at 0.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 23 smd rect (at 0 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 24 smd rect (at -0.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 36 /10V)) (pad 25 smd rect (at -1 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 26 smd rect (at -1.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 27 smd rect (at -2 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 66 /IFF-)) (pad 28 smd rect (at -2.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 67 /IFF+)) (pad 29 smd rect (at -3 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 30 smd rect (at -3.5 1.8) (size 0.3 1.6) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad "" np_thru_hole circle (at -4.55 1.5) (size 0.6 0.6) (drill 0.6) (layers *.Cu *.Mask B.SilkS)) (pad "" np_thru_hole circle (at 4.55 1.5) (size 0.6 0.6) (drill 0.6) (layers *.Cu *.Mask B.SilkS)) ) (module fmcw2:C_0603b (layer B.Cu) (tedit 55A401E5) (tstamp 55A7F626) (at 127.87 97.63 270) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55781271) (attr smd) (fp_text reference C29 (at 0 1.425 270) (layer B.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125)) (justify mirror)) ) (fp_text value 2.2u (at 0 -1.9 270) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end -1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start 1.45 0.75) (end 1.45 -0.75) (layer B.CrtYd) (width 0.05)) (fp_line (start -0.35 0.6) (end 0.35 0.6) (layer B.SilkS) (width 0.15)) (fp_line (start 0.35 -0.6) (end -0.35 -0.6) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 270) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 36 /10V)) (pad 2 smd rect (at 0.75 0 270) (size 0.8 0.75) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40188) (tstamp 55A7F630) (at 129.39 95.42) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /55A81A63) (attr smd) (fp_text reference C51 (at 0 -1.7) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value 10n (at 0 1.7) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 98 "Net-(C51-Pad1)")) (pad 2 smd rect (at 0.55 0) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module Housings_SOT-23_SOT-143_TSOT-6:SOT-23-5 (layer F.Cu) (tedit 55A7F633) (tstamp 55A7F631) (at 128.64 97.95 90) (descr "5-pin SOT23 package") (tags SOT-23-5) (path /55A80584) (attr smd) (fp_text reference U7 (at -0.01 0.08 180) (layer F.SilkS) (effects (font (size 1 1) (thickness 0.15))) ) (fp_text value LP2985 (at -0.05 2.35 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.8 -1.6) (end 1.8 -1.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 -1.6) (end 1.8 1.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.8 1.6) (end -1.8 1.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.8 1.6) (end -1.8 -1.6) (layer F.CrtYd) (width 0.05)) (fp_circle (center -0.3 -1.7) (end -0.2 -1.7) (layer F.SilkS) (width 0.15)) (fp_line (start 0.25 -1.45) (end -0.25 -1.45) (layer F.SilkS) (width 0.15)) (fp_line (start 0.25 1.45) (end 0.25 -1.45) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 1.45) (end 0.25 1.45) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 -1.45) (end -0.25 1.45) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -1.1 -0.95 90) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 2 smd rect (at -1.1 0 90) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 3 smd rect (at -1.1 0.95 90) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 4 smd rect (at 1.1 0.95 90) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 98 "Net-(C51-Pad1)")) (pad 5 smd rect (at 1.1 -0.95 90) (size 1.06 0.65) (layers F.Cu F.Paste F.Mask) (net 36 /10V)) (model Housings_SOT-23_SOT-143_TSOT-6.3dshapes/SOT-23-5.wrl (at (xyz 0 0 0)) (scale (xyz 0.11 0.11 0.11)) (rotate (xyz 0 0 90)) ) ) (module fmcw2:C_0603b (layer F.Cu) (tedit 55A401E5) (tstamp 55A809B0) (at 134.97 93.63 90) (descr "Capacitor SMD 0603, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0603") (path /55A89734) (attr smd) (fp_text reference C52 (at 0 -1.425 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value DNP (at 0 1.9 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.45 -0.75) (end 1.45 -0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.45 -0.75) (end -1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.45 -0.75) (end 1.45 0.75) (layer F.CrtYd) (width 0.05)) (fp_line (start -0.35 -0.6) (end 0.35 -0.6) (layer F.SilkS) (width 0.15)) (fp_line (start 0.35 0.6) (end -0.35 0.6) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 21 /5V)) (pad 2 smd rect (at 0.75 0 90) (size 0.8 0.75) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0603.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (module fmcw2:WFDFN-8 (layer F.Cu) (tedit 55A927D3) (tstamp 55A935E1) (at 124.3 74.25 180) (path /55A92C94) (fp_text reference U5 (at 0.025 1.775 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value AOZ1281 (at 0.075 -1.875 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1 1) (end -1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start -1 -1) (end 1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 1 -1) (end 1 1) (layer F.SilkS) (width 0.15)) (fp_line (start 1 1) (end -1 1) (layer F.SilkS) (width 0.15)) (pad 9 smd rect (at 0 0 180) (size 1.5 0.9) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 1 smd rect (at -0.75 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 32 "Net-(C23-Pad1)")) (pad 2 smd rect (at -0.25 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 3 smd rect (at 0.25 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 4 smd rect (at 0.75 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 5 smd rect (at 0.75 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 38 "Net-(R15-Pad2)")) (pad 6 smd rect (at 0.25 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 7 smd rect (at -0.25 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 8 smd rect (at -0.75 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 33 "Net-(C23-Pad2)")) (model Housings_DFN_QFN.3dshapes/DFN-6-1EP_2x2mm_Pitch0.5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) (module fmcw2:WFDFN-8 (layer F.Cu) (tedit 55A927D3) (tstamp 55A935F1) (at 133.95 71.81 180) (path /55A9353B) (fp_text reference U6 (at 0.025 1.775 180) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value AOZ1281 (at 0.075 -1.875 180) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1 1) (end -1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start -1 -1) (end 1 -1) (layer F.SilkS) (width 0.15)) (fp_line (start 1 -1) (end 1 1) (layer F.SilkS) (width 0.15)) (fp_line (start 1 1) (end -1 1) (layer F.SilkS) (width 0.15)) (pad 9 smd rect (at 0 0 180) (size 1.5 0.9) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 1 smd rect (at -0.75 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 34 "Net-(C26-Pad1)")) (pad 2 smd rect (at -0.25 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 3 smd rect (at 0.25 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 4 smd rect (at 0.75 0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 31 /12V)) (pad 5 smd rect (at 0.75 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 39 "Net-(R17-Pad2)")) (pad 6 smd rect (at 0.25 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 7 smd rect (at -0.25 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (pad 8 smd rect (at -0.75 -0.95 180) (size 0.25 0.5) (layers F.Cu F.Paste F.Mask) (net 35 "Net-(C26-Pad2)")) (model Housings_DFN_QFN.3dshapes/DFN-6-1EP_2x2mm_Pitch0.5mm.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 90)) ) ) (module fmcw2:SOT-416 (layer B.Cu) (tedit 559825CE) (tstamp 5640E762) (at 137.37 84.32) (path /5641656E) (fp_text reference Q3 (at 0.05 -1.15) (layer B.SilkS) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_text value RE1C002UN (at -0.05 1.9) (layer B.Fab) (effects (font (size 1 1) (thickness 0.15)) (justify mirror)) ) (fp_line (start -0.4 -0.05) (end -0.4 0.95) (layer B.SilkS) (width 0.15)) (fp_line (start -0.4 0.95) (end 1.3 0.95) (layer B.SilkS) (width 0.15)) (fp_line (start 1.3 0.95) (end 1.3 -0.05) (layer B.SilkS) (width 0.15)) (fp_line (start 1.3 -0.05) (end -0.4 -0.05) (layer B.SilkS) (width 0.15)) (pad 1 smd rect (at 0 0) (size 0.46 0.65) (layers B.Cu B.Paste B.Mask) (net 60 /SSP1_MISO)) (pad 2 smd rect (at 1 0) (size 0.46 0.65) (layers B.Cu B.Paste B.Mask) (net 1 GND)) (pad 3 smd rect (at 0.5 1.05) (size 0.46 0.65) (layers B.Cu B.Paste B.Mask) (net 99 /~RAMP)) ) (module fmcw2:C_0402b (layer F.Cu) (tedit 55A40188) (tstamp 5640E97F) (at 138.37 84.99 90) (descr "Capacitor SMD 0402, reflow soldering, AVX (see smccp.pdf)") (tags "capacitor 0402") (path /5641E8A7) (attr smd) (fp_text reference C53 (at 0 -1.7 90) (layer F.SilkS) (effects (font (size 0.5 0.5) (thickness 0.125))) ) (fp_text value DNP (at 0 1.7 90) (layer F.Fab) (effects (font (size 1 1) (thickness 0.15))) ) (fp_line (start -1.15 -0.6) (end 1.15 -0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start -1.15 -0.6) (end -1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 1.15 -0.6) (end 1.15 0.6) (layer F.CrtYd) (width 0.05)) (fp_line (start 0.25 -0.475) (end -0.25 -0.475) (layer F.SilkS) (width 0.15)) (fp_line (start -0.25 0.475) (end 0.25 0.475) (layer F.SilkS) (width 0.15)) (pad 1 smd rect (at -0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 99 /~RAMP)) (pad 2 smd rect (at 0.55 0 90) (size 0.6 0.5) (layers F.Cu F.Paste F.Mask) (net 1 GND)) (model Capacitors_SMD.3dshapes/C_0402.wrl (at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0)) ) ) (gr_line (start 117.75 101.5) (end 117.75 68.15) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 150.05 101.5) (end 117.75 101.5) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 150.05 68.15) (end 117.75 68.15) (angle 90) (layer Edge.Cuts) (width 0.1)) (gr_line (start 150.05 101.5) (end 150.05 68.15) (angle 90) (layer Edge.Cuts) (width 0.1)) (segment (start 138.37 84.44) (end 138.42 84.49) (width 0.15) (layer F.Cu) (net 1)) (segment (start 138.42 84.49) (end 138.42 84.84) (width 0.15) (layer F.Cu) (net 1) (tstamp 5640E9C0)) (segment (start 139.9 84.775) (end 138.485 84.775) (width 0.15) (layer F.Cu) (net 1)) (segment (start 138.38 84.8) (end 138.37 84.8) (width 0.15) (layer B.Cu) (net 1) (tstamp 5640E993)) (segment (start 138.42 84.84) (end 138.38 84.8) (width 0.15) (layer B.Cu) (net 1) (tstamp 5640E992)) (via (at 138.42 84.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 138.485 84.775) (end 138.42 84.84) (width 0.15) (layer F.Cu) (net 1) (tstamp 5640E98E)) (segment (start 138.37 84.32) (end 138.37 84.8) (width 0.15) (layer B.Cu) (net 1)) (segment (start 138.37 84.8) (end 138.41 84.84) (width 0.15) (layer B.Cu) (net 1) (tstamp 5640E780)) (segment (start 125.46 71.54) (end 125.51 71.54) (width 0.3) (layer F.Cu) (net 1)) (segment (start 128.75 69.45) (end 127.4 70.8) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A41B1F) (status 10)) (segment (start 126.25 70.8) (end 127.4 70.8) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A41B1E)) (via (at 125.46 71.54) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 125.46 71.54) (end 125.25 71.75) (width 0.3) (layer F.Cu) (net 1) (tstamp 55AA1F64) (status 20)) (segment (start 125.51 71.54) (end 126.25 70.8) (width 0.3) (layer F.Cu) (net 1) (tstamp 55AA1F68)) (segment (start 125.25 72.05) (end 125.25 71.75) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 126.37 74.282) (end 126.37 74.93) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 126.28 75.02) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 126.37 74.93) (end 126.28 75.02) (width 0.3) (layer B.Cu) (net 1) (tstamp 55AA1F51)) (segment (start 124.05 75.2) (end 124.05 75.72) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 124.1 75.77) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 124.05 75.72) (end 124.1 75.77) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93CFE)) (segment (start 124.35 77.34) (end 124.67 77.34) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 124.68 77.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 124.67 77.34) (end 124.68 77.35) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93CE9)) (via (at 124.3 74.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1) (status 30)) (segment (start 124.55 75.2) (end 124.55 75.72) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 124.55 75.72) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 124.05 75.72) (end 124.1 75.77) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93CB5)) (segment (start 122.39 76.26) (end 122.39 75.42) (width 0.3) (layer F.Cu) (net 1) (status 10)) (segment (start 122.32 75.29) (end 122.31 75.29) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93C75)) (via (at 122.32 75.29) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 122.32 75.35) (end 122.32 75.29) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93C71)) (segment (start 122.39 75.42) (end 122.32 75.35) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93C6F)) (segment (start 122.39 76.26) (end 122.39 76.95) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 122.47 77.03) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 122.39 76.95) (end 122.47 77.03) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93C6B)) (segment (start 132.62 71.13) (end 132.52 71.13) (width 0.3) (layer B.Cu) (net 1) (status 30)) (segment (start 132.52 71.13) (end 131.85 71.8) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93BD6) (status 10)) (via (at 131.85 71.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (via (at 133.95 71.81) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1) (status 30)) (segment (start 133.95 71.81) (end 133.96 71.8) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93BA5)) (segment (start 134.208 73.62) (end 134.208 74.232) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 134.2 74.24) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 134.208 74.232) (end 134.2 74.24) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B80)) (segment (start 133.7 73.1) (end 133.7 73.112) (width 0.3) (layer F.Cu) (net 1)) (segment (start 133.7 73.112) (end 134.208 73.62) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B7D) (status 20)) (segment (start 134.2 72.76) (end 134.2 73.612) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 134.2 73.612) (end 134.208 73.62) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B78) (status 30)) (segment (start 133.7 72.76) (end 133.7 73.1) (width 0.3) (layer F.Cu) (net 1) (status 10)) (segment (start 133.7 73.1) (end 133.7 73.11) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B7B)) (via (at 133.41 73.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 133.7 73.11) (end 133.41 73.4) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B74)) (via (at 130.9 72.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.5 72.65) (end 130.9 72.65) (width 0.3) (layer F.Cu) (net 1) (tstamp 559C0F13) (status 10)) (segment (start 130.88 72.63) (end 130.84 72.63) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93B71)) (segment (start 130.9 72.65) (end 130.88 72.63) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A93B70)) (segment (start 131.69 72.59) (end 131.69 73.16) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 131.7 73.17) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.69 73.16) (end 131.7 73.17) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A93B6B)) (segment (start 135.8 92.57) (end 135.88 92.65) (width 0.3) (layer B.Cu) (net 1)) (segment (start 135.88 92.65) (end 136.28 92.65) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A809EC)) (segment (start 134.97 92.88) (end 135.28 92.57) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 135.28 92.57) (end 135.8 92.57) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A809E5) (status 10)) (segment (start 126.6 96.71) (end 126.6 96.48) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 126.6 96.48) (end 126.41 96.29) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A7F6FB) (status 10)) (via (at 126.41 96.29) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 127.87 98.38) (end 127.23 98.38) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 126.99 98.62) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 127.23 98.38) (end 126.99 98.62) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A7F6F1)) (segment (start 129.94 95.42) (end 129.94 95.19) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 129.94 95.19) (end 129.9 95.15) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A7F6CD) (status 10)) (via (at 129.9 95.15) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 129.26 100.74) (end 129.75 100.74) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 129.78 100.71) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 129.75 100.74) (end 129.78 100.71) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A7F6BA)) (segment (start 128.64 99.05) (end 128.66 99.07) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 128.66 99.07) (end 128.66 99.8) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A7F666) (status 10)) (via (at 128.66 99.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.85 79.53) (end 146.39 79.53) (width 0.15) (layer F.Cu) (net 1)) (segment (start 143.3 79.48) (end 143.25 79.48) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1D7)) (segment (start 143.33 79.51) (end 143.3 79.48) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1D6)) (via (at 143.33 79.51) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 143.94 79.51) (end 143.33 79.51) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1D4)) (segment (start 143.95 79.52) (end 143.94 79.51) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1D3)) (via (at 143.95 79.52) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 144.57 79.52) (end 143.95 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1D0)) (via (at 144.57 79.52) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 145.23 79.52) (end 144.57 79.52) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1CD)) (via (at 145.23 79.52) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 145.79 79.52) (end 145.23 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1CB)) (segment (start 145.8 79.53) (end 145.79 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1CA)) (via (at 145.8 79.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.37 79.53) (end 145.8 79.53) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1C8)) (segment (start 146.38 79.54) (end 146.37 79.53) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1C7)) (via (at 146.38 79.54) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.39 79.53) (end 146.38 79.54) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1C5)) (segment (start 146.87 81.27) (end 146.87 79.55) (width 0.15) (layer B.Cu) (net 1) (status 10)) (via (at 149.61 79.52) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 149.07 79.52) (end 149.61 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1C1)) (segment (start 149.06 79.51) (end 149.07 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1C0)) (via (at 149.06 79.51) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 148.45 79.51) (end 149.06 79.51) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1BE)) (segment (start 148.44 79.52) (end 148.45 79.51) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1BD)) (via (at 148.44 79.52) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.9 79.52) (end 148.44 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1BB)) (segment (start 147.89 79.53) (end 147.9 79.52) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1BA)) (via (at 147.89 79.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.36 79.53) (end 147.89 79.53) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1B7)) (via (at 147.36 79.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.85 79.53) (end 147.36 79.53) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A6C1B4)) (via (at 146.85 79.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.87 79.55) (end 146.85 79.53) (width 0.15) (layer B.Cu) (net 1) (tstamp 55A6C1B2)) (segment (start 135.85 93.7) (end 135.85 92.62) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 135.8 92.57) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.85 92.62) (end 135.8 92.57) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5DFD)) (segment (start 132.35 97.3) (end 132.35 96.28) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 132.35 96.28) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 140.475 84.6) (end 140.85 84.6) (width 0.3) (layer B.Cu) (net 1) (status 10)) (segment (start 140.85 84.6) (end 141.05 84.8) (width 0.3) (layer B.Cu) (net 1) (tstamp 55A65E74)) (segment (start 145.375 93.725) (end 145.375 93.425) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 147.425 90.6) (end 147.425 91.675) (width 0.15) (layer In2.Cu) (net 1) (tstamp 55A41CD5)) (segment (start 147.425 91.675) (end 145.375 93.725) (width 0.15) (layer In2.Cu) (net 1) (tstamp 55A41CD6)) (segment (start 148.43 94.96) (end 148.43 94.78) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 148.4075 94.9825) (end 148.43 94.96) (width 0.15) (layer F.Cu) (net 1) (tstamp 55995F79)) (via (at 148.43 94.96) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.52 94.9825) (end 148.4075 94.9825) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 145.375 93.725) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 148.43 94.78) (end 146.725 93.075) (width 0.15) (layer In1.Cu) (net 1) (tstamp 55A41CBA)) (via (at 147.3 90.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.425 90.6) (end 147.375 90.55) (width 0.15) (layer In2.Cu) (net 1)) (segment (start 145.725 93.075) (end 146.725 93.075) (width 0.15) (layer In1.Cu) (net 1) (tstamp 55A41CFA)) (segment (start 145.375 93.425) (end 145.725 93.075) (width 0.15) (layer In1.Cu) (net 1) (tstamp 55A41CF9)) (segment (start 148.475 94.875) (end 147.925 94.325) (width 0.15) (layer In2.Cu) (net 1)) (segment (start 148.78 91.32) (end 148.8 91.3) (width 0.15) (layer F.Cu) (net 1) (tstamp 55997A38)) (via (at 148.8 91.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 148.78 91.32) (end 148.78 91.76) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 148.8 92.625) (end 148.8 91.3) (width 0.15) (layer In2.Cu) (net 1) (tstamp 55A41CDE)) (segment (start 147.925 93.5) (end 148.8 92.625) (width 0.15) (layer In2.Cu) (net 1) (tstamp 55A41CDD)) (segment (start 147.925 94.325) (end 147.925 93.5) (width 0.15) (layer In2.Cu) (net 1) (tstamp 55A41CDC)) (segment (start 118.35 74.9) (end 118.262348 74.9) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 118.218101 74.944247) (end 118.218101 75.268101) (width 0.3) (layer F.Cu) (net 1) (status 30)) (via (at 118.218101 75.268101) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1) (status 30)) (segment (start 118.262348 74.9) (end 118.218101 74.944247) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 118.2 72.35) (end 118.2 73.3) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 118.2 73.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 128.75 69.45) (end 129.2 69.45) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A41B20) (status 30)) (segment (start 143.29 68.99) (end 142.78 68.99) (width 0.3) (layer F.Cu) (net 1) (status 10)) (segment (start 142.71 69.06) (end 142.78 68.99) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A41036)) (via (at 142.78 68.99) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 142.71 69.06) (end 142.1 69.06) (width 0.3) (layer F.Cu) (net 1) (status 20)) (segment (start 143.29 68.99) (end 144.75 70.45) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A4103A) (status 30)) (segment (start 123.73 93.8) (end 123.29 93.8) (width 0.3) (layer F.Cu) (net 1) (status 10)) (segment (start 123.29 93.8) (end 123.28 93.79) (width 0.3) (layer F.Cu) (net 1) (tstamp 55A410C1)) (via (at 123.28 93.79) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 137.5 76.85) (end 138.675 76.85) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 135.7 78.95) (end 135.7 78.65) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE7B)) (segment (start 135.7 78.65) (end 137.5 76.85) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE75)) (segment (start 138.95 77.125) (end 139 77.175) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A25509)) (via (at 139 77.175) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 138.95 77.125) (end 138.4 77.125) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 138.675 76.85) (end 139 77.175) (width 0.15) (layer In1.Cu) (net 1) (tstamp 55A25519)) (segment (start 138.4 77.125) (end 138.4 77.25) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 138.4 77.25) (end 138.925 77.775) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A2550D) (status 10)) (via (at 138.925 77.775) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 138.4 75.95) (end 138.875 75.95) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 138.875 75.95) (end 138.975 75.85) (width 0.15) (layer F.Cu) (net 1) (tstamp 55A25505) (status 10)) (via (at 138.975 75.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.85 97.3) (end 131.85 96.44) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 131.76 96.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.85 96.44) (end 131.76 96.35) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5E09)) (segment (start 132.17 74.44) (end 132.17 74.27) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 132.17 74.27) (end 132.61 73.83) (width 0.3) (layer F.Cu) (net 1) (tstamp 559EA019) (status 10)) (via (at 132.61 73.83) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 132.17 74.44) (end 132.17 74.36) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 132.17 74.36) (end 131.64 73.83) (width 0.3) (layer F.Cu) (net 1) (tstamp 559EA015) (status 10)) (via (at 131.64 73.83) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 130.93 74.44) (end 130.93 74.07) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 130.93 74.07) (end 131.2 73.8) (width 0.3) (layer F.Cu) (net 1) (tstamp 559EA011) (status 10)) (via (at 131.2 73.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 130.93 74.44) (end 130.93 74.18) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 130.93 74.18) (end 130.55 73.8) (width 0.3) (layer F.Cu) (net 1) (tstamp 559EA00D) (status 10)) (via (at 130.55 73.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 132.17 74.44) (end 132.17 73.84) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 132.17 73.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 132.17 74.44) (end 130.94 74.44) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 130.94 74.44) (end 130.93 74.45) (width 0.3) (layer F.Cu) (net 1) (tstamp 559E9FF2) (status 30)) (segment (start 128.1 87.3) (end 126.9 87.3) (width 0.3) (layer In1.Cu) (net 1)) (segment (start 125.57 86.58) (end 125.57 86.08) (width 0.15) (layer B.Cu) (net 1) (status 10)) (via (at 125.57 86.08) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 128.1 87.3) (end 128.1 87) (width 0.15) (layer B.Cu) (net 1) (tstamp 5580BFF4) (status 20)) (via (at 128.1 87.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 126.19 86.7) (end 125.57 86.08) (width 0.3) (layer In1.Cu) (net 1) (tstamp 559D5E20)) (segment (start 126.3 86.7) (end 126.19 86.7) (width 0.3) (layer In1.Cu) (net 1) (tstamp 559D5E1F)) (segment (start 126.9 87.3) (end 126.3 86.7) (width 0.3) (layer In1.Cu) (net 1) (tstamp 559D5E1E)) (via (at 136.75 90.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 136.75 90.45) (end 136.3 90.45) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 136.75 91.21) (end 136.75 90.45) (width 0.3) (layer In1.Cu) (net 1) (tstamp 559D5E1A)) (via (at 138.857924 92.599864) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 138.85 93.7) (end 138.85 92.6) (width 0.3) (layer B.Cu) (net 1) (status 10)) (segment (start 138.850136 92.599864) (end 138.857924 92.599864) (width 0.3) (layer B.Cu) (net 1)) (segment (start 138.85 92.6) (end 138.850136 92.599864) (width 0.3) (layer B.Cu) (net 1)) (segment (start 138.857924 92.347924) (end 138.857924 92.599864) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5E16)) (segment (start 138.58 92.07) (end 138.857924 92.347924) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5E15)) (segment (start 136.28 93.28) (end 136.28 92.65) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 136.28 92.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 136.35 92.72) (end 136.28 92.65) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5DF9)) (segment (start 136.35 92.72) (end 136.35 93.7) (width 0.3) (layer B.Cu) (net 1) (status 20)) (segment (start 136.28 93.28) (end 136.09 93.47) (width 0.3) (layer F.Cu) (net 1) (tstamp 559D5E01) (status 30)) (segment (start 124.79 98.79) (end 124.55 98.79) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 124.55 98.79) (end 124.34 99) (width 0.15) (layer B.Cu) (net 1) (tstamp 559D5BCD) (status 10)) (via (at 124.34 99) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 122.08 95.99) (end 122.08 96.57) (width 0.3) (layer B.Cu) (net 1) (status 10)) (via (at 122.95 97.9) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 122.95 97.9) (end 121.9 97.9) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 122.95 97.44) (end 122.95 97.9) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5B7B)) (segment (start 122.08 96.57) (end 122.95 97.44) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5B7A)) (segment (start 135.4 83.25) (end 135.6 83.25) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 140.4 84.8) (end 141.05 84.8) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE96)) (segment (start 138.65 83.05) (end 140.4 84.8) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE94)) (segment (start 137.25 83.05) (end 138.65 83.05) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE93)) (segment (start 136.75 83.55) (end 137.25 83.05) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE91)) (segment (start 135.9 83.55) (end 136.75 83.55) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE90)) (segment (start 135.6 83.25) (end 135.9 83.55) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE8F)) (segment (start 135.4 83.25) (end 135.95 82.7) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 135.95 82.7) (end 135.95 80.95) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE6B)) (segment (start 135.7 78.95) (end 135.45 78.95) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 133.35 80.15) (end 132.55 80.95) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE80)) (segment (start 134.25 80.15) (end 133.35 80.15) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE7E)) (segment (start 135.45 78.95) (end 134.25 80.15) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE7D)) (segment (start 138.4 76.85) (end 138.4 75.95) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 135.7 80.7) (end 135.7 78.95) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE6F)) (segment (start 135.95 80.95) (end 135.7 80.7) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559BFE6D)) (segment (start 136.4 98.55) (end 136.45 98.5) (width 0.15) (layer F.Cu) (net 1)) (via (at 136.4 98.55) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 136.4 97.5) (end 136.4 98.55) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BFC83) (status 10)) (via (at 137 98.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 136.45 98.5) (end 137 98.5) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BFC87)) (segment (start 136.5 97.4) (end 136.4 97.5) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 136.5 97.4) (end 136.3 97.2) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 136.3 97.2) (end 136.3 96.25) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BFC80) (status 10)) (via (at 136.3 96.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 140.09 94.99) (end 139.84 94.99) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 139.84 94.99) (end 139.6 94.75) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BFACA) (status 10)) (via (at 139.6 94.75) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 144.15 100.05) (end 144.55 100.05) (width 0.15) (layer F.Cu) (net 1) (status 10)) (segment (start 144.7 99.9) (end 144.55 100.05) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BF1FC)) (via (at 144.55 100.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 144.7 99.9) (end 145.35 99.9) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 144.15 100.05) (end 144.1 100.1) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BF200) (status 30)) (segment (start 144.1 100.1) (end 143.7 100.1) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 143.6 100) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 143.7 100.1) (end 143.6 100) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BF1F8)) (segment (start 134.35 97.3) (end 134.35 98.15) (width 0.15) (layer B.Cu) (net 1) (status 10)) (segment (start 134.2 98.6) (end 134.3 98.5) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BF054)) (segment (start 134.3 98.5) (end 134.3 98.45) (width 0.15) (layer F.Cu) (net 1) (tstamp 559BF056)) (segment (start 134.2 98.6) (end 133.15 98.6) (width 0.15) (layer F.Cu) (net 1) (status 20)) (segment (start 134.35 98.15) (end 134.3 98.2) (width 0.15) (layer B.Cu) (net 1) (tstamp 559BF05A)) (segment (start 133.15 98.6) (end 133.25 98.6) (width 0.15) (layer F.Cu) (net 1) (status 30)) (via (at 133.85 82.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 133.47 82.02) (end 133.85 82.4) (width 0.15) (layer F.Cu) (net 1) (tstamp 559ACF6E) (status 10)) (segment (start 132.55 81) (end 132.55 80.95) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD99A)) (segment (start 132.475 81.025) (end 132.525 81.025) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD998)) (segment (start 132.525 81.025) (end 132.55 81) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD999)) (segment (start 133 87.2) (end 132.75 87.2) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 133.95 84.7) (end 135.4 83.25) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD992)) (segment (start 133.9 84.7) (end 133.95 84.7) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD991)) (segment (start 132.35 86.25) (end 133.9 84.7) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD990)) (segment (start 132.35 86.8) (end 132.35 86.25) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD98F)) (segment (start 132.75 87.2) (end 132.35 86.8) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD98E)) (segment (start 130.6 83.95) (end 129.75 83.1) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 129.1 81.65) (end 130.65 81.65) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD98A)) (segment (start 128.95 81.8) (end 129.1 81.65) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD989)) (segment (start 128.95 82.7) (end 128.95 81.8) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD988)) (segment (start 129.35 83.1) (end 128.95 82.7) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD986)) (segment (start 129.75 83.1) (end 129.35 83.1) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD984)) (segment (start 130.65 81.65) (end 131.85 81.65) (width 0.15) (layer In1.Cu) (net 1)) (segment (start 131.85 81.65) (end 132.55 80.95) (width 0.15) (layer In1.Cu) (net 1) (tstamp 559AD959)) (segment (start 131.5 86.75) (end 131.45 86.8) (width 0.3) (layer B.Cu) (net 1) (status 30)) (via (at 129.85 87.25) (size 0.458) (layers F.Cu B.Cu) (net 1)) (segment (start 130.24 86.86) (end 129.85 87.25) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC334) (status 10)) (segment (start 131.5 86.75) (end 131.7 86.95) (width 0.3) (layer B.Cu) (net 1) (status 30)) (segment (start 131.7 86.95) (end 132.4 86.95) (width 0.3) (layer B.Cu) (net 1) (tstamp 559AD7FE) (status 30)) (segment (start 138.65 99.85) (end 138.65 100.3) (width 0.3) (layer F.Cu) (net 1) (status 10)) (via (at 138.65 100.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 139 97.75) (end 139.4 97.75) (width 0.3) (layer F.Cu) (net 1) (status 10)) (segment (start 132.55 86.9) (end 132.85 87.2) (width 0.15) (layer B.Cu) (net 1) (status 10)) (segment (start 132.85 87.2) (end 133 87.2) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AD445)) (segment (start 133 87.2) (end 132.64 86.84) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC338) (status 20)) (via (at 133 87.2) (size 0.458) (layers F.Cu B.Cu) (net 1)) (segment (start 135.35 84.95) (end 135.35 83.3) (width 0.15) (layer B.Cu) (net 1)) (segment (start 135.35 83.3) (end 135.4 83.25) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AD409)) (segment (start 134.5 85.45) (end 134.85 85.45) (width 0.15) (layer B.Cu) (net 1)) (segment (start 134.85 85.45) (end 135.35 84.95) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AD3F9)) (segment (start 134.5 85.45) (end 134.5 85.5) (width 0.15) (layer B.Cu) (net 1)) (segment (start 134.5 85.5) (end 135.4 86.4) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AD390)) (via (at 135.4 86.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.04 86.04) (end 135.4 86.4) (width 0.15) (layer F.Cu) (net 1) (tstamp 559AD38C) (status 10)) (segment (start 135.04 86.02) (end 135.04 86.04) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 131.55 80.85) (end 131.45 80.85) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 131.45 80.85) (end 130.65 81.65) (width 0.15) (layer B.Cu) (net 1) (tstamp 559ACFF7) (status 10)) (segment (start 133.44 82.02) (end 133.47 82.02) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 133.44 82.02) (end 133.42 82.02) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 135.1 90.15) (end 135.15 90.2) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 135.15 90.2) (end 135.15 90.65) (width 0.15) (layer F.Cu) (net 1) (tstamp 559AB153) (status 10)) (via (at 135.15 90.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 119.53 99.25) (end 119.73 99.05) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 119.73 99.05) (end 120.7 99.05) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AB131) (status 30)) (segment (start 120.7 99.05) (end 120.7 98.5) (width 0.15) (layer B.Cu) (net 1) (status 10)) (via (at 120.9 98.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 120.7 98.5) (end 120.9 98.3) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AB120)) (segment (start 147 84.7) (end 147 84.85) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 147 84.85) (end 146.3 85.55) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AB0C7) (status 10)) (segment (start 146.3 85.55) (end 145.95 85.55) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AB0C8)) (segment (start 147.1 85.425) (end 146.075 85.425) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 145.95 85.55) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.075 85.425) (end 145.95 85.55) (width 0.15) (layer F.Cu) (net 1) (tstamp 559AB0C3)) (segment (start 149.45 86.6) (end 149.45 86.05) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 149.48 86.02) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 149.48 86.02) (end 149.48 85.57) (width 0.15) (layer F.Cu) (net 1) (tstamp 55996053) (status 20)) (segment (start 149.45 86.05) (end 149.48 86.02) (width 0.15) (layer F.Cu) (net 1) (tstamp 559AB0BA)) (segment (start 127.2 78.15) (end 127.15 78.2) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 127.15 78.2) (end 126.8 78.2) (width 0.3) (layer F.Cu) (net 1) (tstamp 559AADBF) (status 10)) (via (at 126.8 78.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 132.62 74.45) (end 132.52 74.45) (width 0.3) (layer F.Cu) (net 1) (status 30)) (segment (start 148.7 86.45) (end 148.7 85.98) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 148.71 85.97) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 148.71 85.97) (end 148.71 85.51) (width 0.15) (layer F.Cu) (net 1) (tstamp 5599604F) (status 20)) (segment (start 148.7 85.98) (end 148.71 85.97) (width 0.15) (layer F.Cu) (net 1) (tstamp 559AA455)) (segment (start 135.65 98.6) (end 135.3 98.6) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 135.25 98.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.3 98.6) (end 135.25 98.65) (width 0.15) (layer F.Cu) (net 1) (tstamp 55997AFC)) (segment (start 147.1 89.325) (end 146.275 89.325) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 146.275 89.325) (end 146 89.6) (width 0.15) (layer F.Cu) (net 1) (tstamp 559979A0) (status 10)) (via (at 146 89.6) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.84 90.04) (end 147.76 90.04) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 147.76 90.04) (end 147.3 90.5) (width 0.15) (layer B.Cu) (net 1) (tstamp 5599799C) (status 10)) (segment (start 146.59 90.04) (end 146.59 90.54) (width 0.15) (layer B.Cu) (net 1) (status 10)) (via (at 146.6 90.55) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 146.59 90.54) (end 146.6 90.55) (width 0.15) (layer B.Cu) (net 1) (tstamp 55997998)) (segment (start 148.85 90.15) (end 149.3 90.15) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 149.3 90.15) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 147.1 82.175) (end 147.095 82.17) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 147.095 82.17) (end 145.99 82.17) (width 0.15) (layer F.Cu) (net 1) (tstamp 5599605E) (status 10)) (via (at 145.99 82.17) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 149.54 85.51) (end 149.48 85.57) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 148.7 85.5) (end 148.71 85.51) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 130.65 84.85) (end 130.65 84.1) (width 0.15) (layer B.Cu) (net 1) (status 20)) (via (at 130.65 84.85) (size 0.458) (layers F.Cu B.Cu) (net 1)) (segment (start 130.65 84.1) (end 130.6 84.05) (width 0.15) (layer B.Cu) (net 1) (tstamp 55994556) (status 30)) (segment (start 130.6 84.05) (end 130.6 83.93) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 132.3 90.95) (end 132.8 90.95) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 132.8 90.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131 89.65) (end 131.6 89.65) (width 0.15) (layer B.Cu) (net 1) (status 10)) (via (at 131.75 89.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.6 89.65) (end 131.75 89.5) (width 0.15) (layer B.Cu) (net 1) (tstamp 5580C51E)) (segment (start 130.4 89.4) (end 130.4 89.85) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580BFEC) (status 20)) (via (at 130.4 89.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 130.3 78.2) (end 130.7 78.2) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 130.7 78.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 131.7 78.25) (end 131.7 78.8) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 131.7 78.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 130.24 82.02) (end 130.28 82.02) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 130.28 82.02) (end 130.65 81.65) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC36F) (status 10)) (via (at 130.65 81.65) (size 0.458) (layers F.Cu B.Cu) (net 1)) (segment (start 130.65 84.85) (end 130.65 84.81) (width 0.15) (layer F.Cu) (net 1)) (segment (start 131.02 85.22) (end 130.65 84.85) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC343) (status 10)) (segment (start 130.65 84.81) (end 131.04 84.42) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC347) (status 20)) (segment (start 131.04 85.22) (end 131.02 85.22) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 130.7 85.65) (end 130.7 85.56) (width 0.15) (layer F.Cu) (net 1)) (via (at 130.7 85.65) (size 0.458) (layers F.Cu B.Cu) (net 1)) (segment (start 131.04 85.99) (end 130.7 85.65) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC33C) (status 10)) (segment (start 130.7 85.56) (end 131.04 85.22) (width 0.15) (layer F.Cu) (net 1) (tstamp 557DC340) (status 20)) (segment (start 131.04 86.02) (end 131.04 85.99) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 132.64 86.82) (end 132.64 86.84) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 130.24 86.82) (end 130.24 86.86) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 134.5 85.45) (end 134.7 85.65) (width 0.15) (layer B.Cu) (net 1)) (segment (start 131.5 86.75) (end 131.45 86.7) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 131.07 86.02) (end 131.04 86.02) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580BFCD) (status 30)) (segment (start 130.45 89.9) (end 130.4 89.85) (width 0.15) (layer F.Cu) (net 1) (status 30)) (via (at 127.1 89.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 127.1 89.85) (end 127.1 89.35) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580BFF0) (status 10)) (segment (start 127.05 89.9) (end 127.1 89.85) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 127.95 86.85) (end 128.1 87) (width 0.15) (layer B.Cu) (net 1) (status 30)) (via (at 126.45 91.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 127.4 91.2) (end 126.45 91.2) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 128.95 92.9) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 130 92.9) (end 128.95 92.9) (width 0.15) (layer F.Cu) (net 1) (status 10)) (segment (start 133.44 82.02) (end 133.44 82.01) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 135.45 83.3) (end 135.85 83.3) (width 0.15) (layer B.Cu) (net 1) (tstamp 5580C0E1) (status 20)) (segment (start 135.4 83.25) (end 135.45 83.3) (width 0.15) (layer B.Cu) (net 1) (tstamp 5580C0E0)) (via (at 135.4 83.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.04 83.61) (end 135.4 83.25) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580C0DE) (status 10)) (segment (start 135.04 83.62) (end 135.04 83.61) (width 0.15) (layer F.Cu) (net 1) (status 30)) (segment (start 141.025 84.775) (end 141.05 84.8) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580C1C1)) (segment (start 139.9 84.775) (end 141.025 84.775) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 141.05 84.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 141.075 86.075) (end 141.1 86.1) (width 0.15) (layer F.Cu) (net 1) (tstamp 5580C1C4)) (segment (start 139.9 86.075) (end 141.075 86.075) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 141.1 86.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 140.45 86.75) (end 141.1 86.1) (width 0.15) (layer B.Cu) (net 1) (tstamp 5580C1C9) (status 10)) (segment (start 140.45 86.9) (end 140.45 86.75) (width 0.15) (layer B.Cu) (net 1) (status 30)) (via (at 121.82 82.03) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 121.815 82.025) (end 121.82 82.03) (width 0.15) (layer F.Cu) (net 1)) (segment (start 121.815 80.88) (end 121.815 82.025) (width 0.15) (layer F.Cu) (net 1) (status 10)) (via (at 134.3 98.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 134.3 98.2) (end 134.3 98.45) (width 0.15) (layer B.Cu) (net 1) (tstamp 559BF05B)) (via (at 139.4 97.75) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.8 96.25) (end 136.3 96.25) (width 0.15) (layer B.Cu) (net 1)) (segment (start 136.35 96.3) (end 136.3 96.25) (width 0.3) (layer B.Cu) (net 1) (tstamp 559BF075)) (segment (start 137.82 92.2) (end 137.74 92.2) (width 0.3) (layer In1.Cu) (net 1)) (via (at 137.82 92.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 137.74 92.2) (end 136.75 91.21) (width 0.3) (layer In1.Cu) (net 1) (tstamp 559D5E19)) (segment (start 137.82 92.2) (end 137.95 92.07) (width 0.3) (layer B.Cu) (net 1)) (segment (start 137.95 92.07) (end 138.58 92.07) (width 0.3) (layer B.Cu) (net 1) (tstamp 559D5E14)) (segment (start 133.85 97.3) (end 133.85 98.3) (width 0.15) (layer B.Cu) (net 1) (status 10)) (segment (start 134 98.45) (end 134.3 98.45) (width 0.15) (layer B.Cu) (net 1) (tstamp 559BF05F)) (segment (start 133.85 98.3) (end 134 98.45) (width 0.15) (layer B.Cu) (net 1) (tstamp 559BF05E)) (segment (start 138.85 97.3) (end 138.95 97.3) (width 0.3) (layer B.Cu) (net 1) (status 30)) (segment (start 138.95 97.3) (end 139.4 97.75) (width 0.3) (layer B.Cu) (net 1) (tstamp 559AD732) (status 10)) (segment (start 136.35 97.3) (end 136.35 96.3) (width 0.3) (layer B.Cu) (net 1) (status 10)) (segment (start 136.35 98) (end 136.35 97.3) (width 0.15) (layer B.Cu) (net 1) (tstamp 559AD844) (status 30)) (segment (start 135.35 96.25) (end 135.35 97.3) (width 0.3) (layer B.Cu) (net 1) (status 20)) (segment (start 135.8 96.25) (end 135.35 96.25) (width 0.15) (layer B.Cu) (net 1)) (via (at 135.35 96.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (via (at 135.8 96.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 1)) (segment (start 135.85 96.3) (end 135.8 96.25) (width 0.3) (layer B.Cu) (net 1) (tstamp 559BF079)) (segment (start 135.85 96.3) (end 135.85 97.3) (width 0.3) (layer B.Cu) (net 1) (status 20)) (segment (start 137.82 92.2) (end 137.82 93.67) (width 0.15) (layer B.Cu) (net 1) (tstamp 559D5CF0) (status 20)) (segment (start 137.85 93.7) (end 137.82 93.67) (width 0.15) (layer B.Cu) (net 1) (status 30)) (segment (start 131.67 72.82) (end 131.5 72.65) (width 0.3) (layer F.Cu) (net 1) (tstamp 559AAD2B) (status 30)) (segment (start 131.2 72.65) (end 131.5 72.65) (width 0.3) (layer F.Cu) (net 1) (tstamp 559AAC55) (status 30)) (segment (start 132.3 80.05) (end 131.99 80.36) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 131.99 84.54) (end 132.25 84.8) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55AA2BDF)) (segment (start 131.99 80.36) (end 131.99 84.54) (width 0.15) (layer In2.Cu) (net 2) (tstamp 55AA2BDE)) (segment (start 130.64 87.21) (end 130.64 87.16) (width 0.15) (layer B.Cu) (net 2)) (segment (start 129.88 86.4) (end 129.05 86.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55AA2BB8)) (segment (start 130.64 87.16) (end 129.88 86.4) (width 0.15) (layer B.Cu) (net 2) (tstamp 55AA2BB7)) (segment (start 131.45 84.8) (end 132.25 84.8) (width 0.15) (layer B.Cu) (net 2)) (segment (start 135.28 73.08) (end 135.92 73.08) (width 0.3) (layer B.Cu) (net 2) (status 10)) (segment (start 135.92 73.08) (end 136.05 73.21) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A93BC5)) (segment (start 140.475 83.5) (end 140.5 83.5) (width 0.3) (layer B.Cu) (net 2) (status 30)) (segment (start 140.5 83.5) (end 141.05 84.05) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A65E79) (status 10)) (segment (start 122.25 71.65) (end 121.8 71.65) (width 0.3) (layer B.Cu) (net 2) (status 10)) (segment (start 120.3 72.1) (end 119.7 71.5) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A41B44) (status 20)) (segment (start 121.35 72.1) (end 120.3 72.1) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A41B43)) (segment (start 121.8 71.65) (end 121.35 72.1) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A41B42)) (segment (start 124.95 71.05) (end 124.95 70.6) (width 0.3) (layer B.Cu) (net 2) (status 10)) (segment (start 125.3 70.25) (end 125.3 70.95) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41B39)) (segment (start 125.35 70.2) (end 125.3 70.25) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41B38)) (via (at 125.35 70.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 124.95 70.6) (end 125.35 70.2) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A41B36)) (segment (start 146.57 73.32) (end 140.97 73.32) (width 0.3) (layer In2.Cu) (net 2)) (segment (start 140.16 72.51) (end 136.75 72.51) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41072)) (segment (start 140.97 73.32) (end 140.16 72.51) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41070)) (segment (start 136.05 73.21) (end 136.75 72.51) (width 0.3) (layer In2.Cu) (net 2)) (segment (start 136.75 69.6) (end 135.75 68.6) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41067)) (segment (start 136.75 72.51) (end 136.75 69.6) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41066)) (segment (start 147.78 69.27) (end 148.82 69.27) (width 0.3) (layer F.Cu) (net 2) (tstamp 55A41027) (status 20)) (segment (start 147.76 69.29) (end 147.78 69.27) (width 0.3) (layer F.Cu) (net 2) (tstamp 55A41026)) (via (at 147.76 69.29) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 147.76 72.13) (end 147.76 69.29) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41024)) (segment (start 146.57 73.32) (end 147.76 72.13) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41022)) (segment (start 135.75 68.6) (end 131.35 68.6) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A4106A)) (segment (start 120.54 70.95) (end 119.04 69.45) (width 0.3) (layer In2.Cu) (net 2) (tstamp 559C0F83) (status 20)) (segment (start 130.4 70.95) (end 125.3 70.95) (width 0.3) (layer In2.Cu) (net 2) (tstamp 559C0F82)) (segment (start 125.3 70.95) (end 120.54 70.95) (width 0.3) (layer In2.Cu) (net 2) (tstamp 55A41B3C)) (segment (start 130.6 70.75) (end 130.4 70.95) (width 0.3) (layer In2.Cu) (net 2) (tstamp 559C0F81)) (segment (start 130.6 69.35) (end 130.6 70.75) (width 0.3) (layer In2.Cu) (net 2) (tstamp 559C0F80)) (segment (start 131.35 68.6) (end 130.6 69.35) (width 0.3) (layer In2.Cu) (net 2) (tstamp 559C0F7F)) (segment (start 137 74.16) (end 136.05 73.21) (width 0.3) (layer F.Cu) (net 2) (status 10)) (via (at 136.05 73.21) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 136.05 73.21) (end 136.05 74.35) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A40FEA)) (segment (start 136.05 74.35) (end 135.45 74.95) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A40FEB)) (segment (start 137 74.16) (end 137.56 74.16) (width 0.3) (layer F.Cu) (net 2) (tstamp 55A40FF8) (status 30)) (segment (start 135.8 76.5) (end 135.8 77.1) (width 0.3) (layer B.Cu) (net 2)) (segment (start 135.825 77.125) (end 135.8 77.1) (width 0.15) (layer F.Cu) (net 2) (tstamp 55A254FD)) (via (at 135.8 77.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 135.825 77.125) (end 136.4 77.125) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 135.75 75.95) (end 135.8 76) (width 0.3) (layer B.Cu) (net 2)) (segment (start 135.8 76) (end 135.8 76.5) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A40FF1)) (segment (start 135.45 74.95) (end 135.75 75.25) (width 0.3) (layer B.Cu) (net 2)) (segment (start 135.75 75.25) (end 135.75 75.95) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A40FEE)) (via (at 135.75 75.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 135.75 75.95) (end 136.4 75.95) (width 0.3) (layer F.Cu) (net 2) (status 20)) (segment (start 135.9 78.25) (end 136.475 77.675) (width 0.15) (layer B.Cu) (net 2)) (segment (start 133.25 79.4) (end 134.4 78.25) (width 0.15) (layer B.Cu) (net 2) (tstamp 559ADA35)) (segment (start 134.4 78.25) (end 135.9 78.25) (width 0.15) (layer B.Cu) (net 2) (tstamp 559ADA36)) (segment (start 133.2 79.4) (end 133.25 79.4) (width 0.15) (layer B.Cu) (net 2)) (segment (start 136.475 77.675) (end 136.475 76.5) (width 0.15) (layer B.Cu) (net 2) (tstamp 55A25514)) (segment (start 139.31 78.94) (end 136.87 76.5) (width 0.3) (layer B.Cu) (net 2)) (segment (start 136.87 76.5) (end 136.475 76.5) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A25511)) (segment (start 138.88 91.3) (end 138.86 91.3) (width 0.3) (layer F.Cu) (net 2)) (segment (start 139.31 90.85) (end 138.86 91.3) (width 0.3) (layer B.Cu) (net 2) (tstamp 559D5E27)) (segment (start 139.31 78.94) (end 139.31 90.85) (width 0.3) (layer B.Cu) (net 2) (tstamp 559D5E25)) (via (at 138.86 91.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (via (at 135.8 76.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 135.8 76.5) (end 136.35 75.95) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AAD14) (status 20)) (segment (start 136.475 76.5) (end 135.8 76.5) (width 0.3) (layer B.Cu) (net 2) (tstamp 55A25517)) (segment (start 131.034764 88.084764) (end 131.034764 87.604764) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 131.034764 87.604764) (end 130.64 87.21) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559D6E86)) (segment (start 131.04 86.82) (end 131.03 86.82) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 131.03 86.82) (end 130.64 87.21) (width 0.15) (layer F.Cu) (net 2) (tstamp 559D6E81) (status 10)) (via (at 130.64 87.21) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 137.37 92.66) (end 137.37 93.29) (width 0.3) (layer F.Cu) (net 2) (status 20)) (segment (start 137.37 93.29) (end 137.19 93.47) (width 0.3) (layer F.Cu) (net 2) (tstamp 559D5DF6) (status 30)) (segment (start 137.19 93.47) (end 137.35 93.31) (width 0.3) (layer F.Cu) (net 2) (status 30)) (segment (start 131.04 88.079528) (end 131.034764 88.084764) (width 0.15) (layer F.Cu) (net 2)) (segment (start 131.04 87.62) (end 131.04 88.079528) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 131 88.1) (end 131.015236 88.084764) (width 0.15) (layer B.Cu) (net 2)) (segment (start 131 88.55) (end 131 88.1) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 131.034764 89.884764) (end 131.034764 88.084764) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 133.91598 89.65) (end 133.41598 90.15) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 131.3 90.15) (end 131.034764 89.884764) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 133.41598 90.15) (end 131.3 90.15) (width 0.15) (layer In2.Cu) (net 2)) (via (at 131.034764 88.084764) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 131.015236 88.084764) (end 131.034764 88.084764) (width 0.15) (layer B.Cu) (net 2)) (segment (start 125.06 89.975) (end 125.06 90.99) (width 0.15) (layer F.Cu) (net 2) (status 20)) (segment (start 125.625 89.41) (end 125.06 89.975) (width 0.15) (layer F.Cu) (net 2)) (segment (start 141.05 84.05) (end 138.15 84.05) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 136.85 84.3) (end 136.6 84.05) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559BFB68)) (segment (start 137.9 84.3) (end 136.85 84.3) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559BFB67)) (segment (start 138.15 84.05) (end 137.9 84.3) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559BFB66)) (segment (start 132.15 83.55) (end 132.15 81.35) (width 0.15) (layer B.Cu) (net 2)) (segment (start 131.7 84) (end 132.15 83.55) (width 0.15) (layer B.Cu) (net 2) (tstamp 559ADA2A) (status 10)) (segment (start 132.15 81.35) (end 132.65 80.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 559BF360) (status 20)) (segment (start 131.7 84.05) (end 131.7 84) (width 0.15) (layer B.Cu) (net 2) (status 30)) (segment (start 141.05 85.45) (end 140.65 85.45) (width 0.15) (layer In2.Cu) (net 2)) (segment (start 140.65 85.45) (end 140.4 85.2) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559AD85B)) (segment (start 140.4 85.2) (end 140.4 84.7) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559AD85E)) (segment (start 140.4 84.7) (end 141.05 84.05) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559AD85F)) (via (at 133.91598 89.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 134 89.73402) (end 133.91598 89.65) (width 0.15) (layer F.Cu) (net 2)) (segment (start 134 90.15) (end 134 89.73402) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 132.64 85.22) (end 132.26 85.6) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 132.25 85.6) (end 132.35 85.6) (width 0.15) (layer B.Cu) (net 2) (tstamp 559AD456) (status 30)) (via (at 132.25 85.6) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2) (status 30)) (segment (start 132.26 85.6) (end 132.25 85.6) (width 0.15) (layer F.Cu) (net 2) (tstamp 559AD452)) (segment (start 132.35 85.6) (end 132.55 85.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 559AD457) (status 30)) (segment (start 135.85 84.4) (end 136.3 84.4) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 136.3 84.4) (end 136.3 84.35) (width 0.15) (layer B.Cu) (net 2) (tstamp 559AD337)) (segment (start 136.3 85.475) (end 136.3 84.35) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 136.23 84.42) (end 135.84 84.42) (width 0.15) (layer F.Cu) (net 2) (tstamp 559AD334) (status 20)) (segment (start 136.6 84.05) (end 136.23 84.42) (width 0.15) (layer F.Cu) (net 2) (tstamp 559AD333)) (via (at 136.6 84.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 136.3 84.35) (end 136.6 84.05) (width 0.15) (layer B.Cu) (net 2) (tstamp 559AD32C)) (segment (start 132.65 80.85) (end 132.65 80.4) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 132.65 80.4) (end 132.3 80.05) (width 0.15) (layer B.Cu) (net 2) (tstamp 559ACFF4)) (segment (start 133.2 78.25) (end 133.2 79.4) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 132.64 80.42) (end 132.64 80.39) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 132.64 80.39) (end 132.3 80.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 559ACF92) (status 10)) (via (at 132.3 80.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 132.64 85.22) (end 132.64 85.24) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 125.05 89.4) (end 125.05 90) (width 0.3) (layer F.Cu) (net 2)) (segment (start 125.06 90.01) (end 125.05 90) (width 0.15) (layer F.Cu) (net 2) (tstamp 559AB191)) (via (at 125.05 90) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 125.06 90.99) (end 125.06 90.01) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 120.8 89.95) (end 121.4 89.35) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AB1AE)) (segment (start 121.4 89.35) (end 125 89.35) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AB1AF)) (segment (start 125 89.35) (end 125.05 89.4) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AB1B4)) (via (at 125.05 89.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 120.8 89.95) (end 119.3 89.95) (width 0.3) (layer F.Cu) (net 2) (status 20)) (segment (start 119.7 70.62) (end 119.7 71.45) (width 0.3) (layer B.Cu) (net 2) (tstamp 559AADDC) (status 20)) (segment (start 135.45 74.95) (end 136.1 74.3) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AAD5D) (status 20)) (via (at 135.45 74.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 136.1 74.3) (end 137 74.3) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AAD5E) (status 30)) (segment (start 136.4 75.95) (end 136.35 75.95) (width 0.3) (layer F.Cu) (net 2) (status 30)) (segment (start 137 74.3) (end 137 74.4) (width 0.3) (layer F.Cu) (net 2) (status 30)) (segment (start 137 74.4) (end 136.4 75) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AAD10) (status 10)) (segment (start 136.4 75) (end 136.4 75.95) (width 0.3) (layer F.Cu) (net 2) (tstamp 559AAD11) (status 20)) (segment (start 127.42 84.63) (end 128.33 84.63) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 128.33 84.63) (end 128.625 84.925) (width 0.15) (layer B.Cu) (net 2) (tstamp 559944BB) (status 20)) (segment (start 128.625 84.925) (end 129.775 84.925) (width 0.15) (layer B.Cu) (net 2) (status 10)) (via (at 129.85 84.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 129.85 84.85) (end 130.24 84.46) (width 0.15) (layer F.Cu) (net 2) (tstamp 5580C4BF) (status 20)) (segment (start 129.775 84.925) (end 129.85 84.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 5585A37B)) (segment (start 125.625 89.41) (end 125.625 88.18) (width 0.15) (layer F.Cu) (net 2) (tstamp 55994951) (status 20)) (segment (start 130.24 84.42) (end 130.24 84.46) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 129.44 86.82) (end 129.05 86.43) (width 0.15) (layer F.Cu) (net 2) (status 10)) (segment (start 129.05 86.43) (end 129.05 86.4) (width 0.15) (layer F.Cu) (net 2) (tstamp 557DD23E)) (via (at 129.05 86.4) (size 0.458) (layers F.Cu B.Cu) (net 2)) (segment (start 129.05 86.4) (end 129.05 86.85) (width 0.15) (layer B.Cu) (net 2) (tstamp 557DD240) (status 20)) (segment (start 132.64 85.22) (end 132.64 85.21) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 131.84 85.22) (end 131.84 85.21) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 131.84 85.21) (end 132.25 84.8) (width 0.15) (layer F.Cu) (net 2) (tstamp 557DC34E) (status 10)) (segment (start 131.84 84.42) (end 131.83 84.42) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 130.24 84.42) (end 130.22 84.42) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 131.7 84.55) (end 131.45 84.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 5580BFAE)) (segment (start 131.45 84.8) (end 131.83 84.42) (width 0.15) (layer F.Cu) (net 2) (tstamp 557DC34A) (status 20)) (segment (start 131.7 84.05) (end 131.7 84.55) (width 0.15) (layer B.Cu) (net 2) (status 10)) (segment (start 131.5 85.55) (end 132.25 84.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 5580BFB1) (status 10)) (segment (start 131.5 85.65) (end 131.5 85.55) (width 0.15) (layer B.Cu) (net 2) (status 30)) (segment (start 131.04 86.82) (end 131.04 87.62) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 126.22 87.68) (end 125.57 87.68) (width 0.15) (layer B.Cu) (net 2) (tstamp 5580C09E) (status 20)) (via (at 126.22 87.68) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 125.72 88.18) (end 126.22 87.68) (width 0.15) (layer F.Cu) (net 2) (tstamp 5580C09B) (status 10)) (segment (start 125.625 88.18) (end 125.72 88.18) (width 0.15) (layer F.Cu) (net 2) (status 30)) (segment (start 140.7 85.8) (end 140.45 85.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 5580C1BA) (status 30)) (segment (start 141.025 85.425) (end 141.05 85.45) (width 0.15) (layer F.Cu) (net 2) (tstamp 5580C1B4)) (segment (start 139.9 85.425) (end 141.025 85.425) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 141.05 85.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 141.05 85.45) (end 140.7 85.8) (width 0.15) (layer B.Cu) (net 2) (tstamp 5580C1B9) (status 20)) (segment (start 140.975 84.125) (end 141.05 84.05) (width 0.15) (layer F.Cu) (net 2) (tstamp 5580C1CC)) (segment (start 139.9 84.125) (end 140.975 84.125) (width 0.15) (layer F.Cu) (net 2) (status 10)) (via (at 141.05 84.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 118.98 69.9) (end 119.7 70.62) (width 0.3) (layer B.Cu) (net 2) (status 10)) (segment (start 136.85 92.69) (end 136.88 92.66) (width 0.3) (layer B.Cu) (net 2) (tstamp 559D5DF0)) (segment (start 136.85 92.69) (end 136.85 93.7) (width 0.3) (layer B.Cu) (net 2) (status 20)) (segment (start 138.88 91.3) (end 138.88 90.92) (width 0.15) (layer F.Cu) (net 2)) (via (at 138.87 90.91) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 138.88 90.92) (end 138.87 90.91) (width 0.15) (layer F.Cu) (net 2) (tstamp 559D5E67)) (segment (start 138.88 91.3) (end 137.72 91.3) (width 0.3) (layer F.Cu) (net 2) (tstamp 559D5E65)) (segment (start 136.88 92.14) (end 136.88 92.66) (width 0.3) (layer F.Cu) (net 2) (tstamp 559D5E4E)) (segment (start 137.72 91.3) (end 136.88 92.14) (width 0.3) (layer F.Cu) (net 2) (tstamp 559D5E4D)) (segment (start 136.88 92.66) (end 137.37 92.66) (width 0.3) (layer F.Cu) (net 2)) (via (at 136.88 92.66) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 137.35 92.68) (end 137.37 92.66) (width 0.3) (layer B.Cu) (net 2) (tstamp 559D5DEC)) (via (at 137.37 92.66) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 133.2 79.4) (end 133.2 79.7) (width 0.15) (layer In2.Cu) (net 2)) (via (at 133.2 79.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 2)) (segment (start 132.85 80.05) (end 132.3 80.05) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559ACF9C)) (segment (start 133.2 79.7) (end 132.85 80.05) (width 0.15) (layer In2.Cu) (net 2) (tstamp 559ACF9B)) (via (at 132.25 84.8) (size 0.458) (layers F.Cu B.Cu) (net 2)) (via (at 131.45 84.8) (size 0.458) (layers F.Cu B.Cu) (net 2)) (segment (start 137.35 93.7) (end 137.35 92.68) (width 0.3) (layer B.Cu) (net 2) (status 10)) (segment (start 128.3 89.9) (end 129.44 88.76) (width 0.15) (layer F.Cu) (net 3) (tstamp 557DC32A) (status 10)) (segment (start 128.15 89.9) (end 128.3 89.9) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 129.44 88.76) (end 129.44 87.62) (width 0.15) (layer F.Cu) (net 3) (tstamp 557DC32B) (status 20)) (segment (start 127.4 92.9) (end 127.75 92.9) (width 0.15) (layer F.Cu) (net 3) (status 30)) (segment (start 127.75 92.9) (end 128.5 92.15) (width 0.15) (layer F.Cu) (net 3) (tstamp 557DC320) (status 10)) (segment (start 128.5 92.15) (end 128.5 90.25) (width 0.15) (layer F.Cu) (net 3) (tstamp 557DC321)) (segment (start 128.5 90.25) (end 128.15 89.9) (width 0.15) (layer F.Cu) (net 3) (tstamp 557DC323) (status 20)) (segment (start 129.35 89.9) (end 129.35 89.4) (width 0.15) (layer F.Cu) (net 4) (status 10)) (segment (start 129.8 88.06) (end 130.24 87.62) (width 0.15) (layer F.Cu) (net 4) (tstamp 557DC331) (status 20)) (segment (start 129.8 88.95) (end 129.8 88.06) (width 0.15) (layer F.Cu) (net 4) (tstamp 557DC330)) (segment (start 129.35 89.4) (end 129.8 88.95) (width 0.15) (layer F.Cu) (net 4) (tstamp 557DC32F)) (segment (start 130 91.2) (end 130 91.1) (width 0.15) (layer F.Cu) (net 4) (status 30)) (segment (start 130 91.1) (end 129.35 90.45) (width 0.15) (layer F.Cu) (net 4) (tstamp 557DC326) (status 10)) (segment (start 129.35 90.45) (end 129.35 89.9) (width 0.15) (layer F.Cu) (net 4) (tstamp 557DC327) (status 20)) (segment (start 123.11 95.3) (end 123.73 95.3) (width 0.3) (layer F.Cu) (net 5) (status 20)) (segment (start 123.73 98.82) (end 123.73 98.58) (width 0.15) (layer B.Cu) (net 5)) (segment (start 125.39 98.28) (end 125.76 98.65) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5BD4) (status 20)) (segment (start 124.03 98.28) (end 125.39 98.28) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5BD3)) (segment (start 123.73 98.58) (end 124.03 98.28) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5BD2)) (segment (start 122.07 93.28) (end 121.91 93.28) (width 0.15) (layer B.Cu) (net 5) (status 30)) (segment (start 121.91 93.28) (end 121.45 93.74) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5B81) (status 10)) (segment (start 121.45 93.74) (end 121.45 95.45) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5B82)) (segment (start 121.45 95.45) (end 121.57 95.57) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5B83)) (segment (start 121.57 95.57) (end 122.81 95.57) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5B84)) (segment (start 122.81 95.57) (end 123.12 95.26) (width 0.15) (layer B.Cu) (net 5) (tstamp 559D5B85)) (segment (start 123.73 97.99) (end 123.73 98.82) (width 0.3) (layer F.Cu) (net 5) (status 10)) (segment (start 123.16 95.3) (end 123.11 95.3) (width 0.3) (layer F.Cu) (net 5) (tstamp 559D5B3C)) (segment (start 123.11 95.3) (end 121.9 95.3) (width 0.3) (layer F.Cu) (net 5) (tstamp 55A410BD) (status 20)) (segment (start 123.12 95.26) (end 123.16 95.3) (width 0.3) (layer F.Cu) (net 5) (tstamp 559D5B3B)) (via (at 123.12 95.26) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 5)) (segment (start 123.75 95.89) (end 123.12 95.26) (width 0.3) (layer B.Cu) (net 5) (tstamp 559D5B39)) (segment (start 123.75 98.8) (end 123.75 95.89) (width 0.3) (layer B.Cu) (net 5) (tstamp 559D5B38)) (segment (start 123.73 98.82) (end 123.75 98.8) (width 0.3) (layer B.Cu) (net 5) (tstamp 559D5B37)) (via (at 123.73 98.82) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 5)) (segment (start 123.73 97.99) (end 124.68 97.99) (width 0.3) (layer F.Cu) (net 5) (status 30)) (segment (start 120.7 100.15) (end 119.53 100.15) (width 0.15) (layer B.Cu) (net 6) (status 30)) (segment (start 119.225 100.4) (end 120.1 100.4) (width 0.15) (layer F.Cu) (net 6) (status 30)) (segment (start 120.1 100.4) (end 120.5 100.8) (width 0.15) (layer F.Cu) (net 6) (tstamp 559AB128) (status 10)) (via (at 120.5 100.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 6)) (segment (start 120.5 100.8) (end 120.7 100.6) (width 0.15) (layer B.Cu) (net 6) (tstamp 559AB12A)) (segment (start 120.7 100.6) (end 120.7 100.15) (width 0.15) (layer B.Cu) (net 6) (tstamp 559AB12B) (status 20)) (segment (start 119.63 100.25) (end 119.53 100.15) (width 0.15) (layer B.Cu) (net 6) (tstamp 55994730) (status 30)) (segment (start 130.969111 88.764213) (end 130.969111 93.930889) (width 0.15) (layer F.Cu) (net 7)) (segment (start 131.84 86.82) (end 131.45 87.21) (width 0.15) (layer F.Cu) (net 7) (status 10)) (segment (start 131.45 87.21) (end 131.45 87.9) (width 0.15) (layer F.Cu) (net 7)) (segment (start 126.02999 94.07001) (end 125.05 95.05) (width 0.15) (layer F.Cu) (net 7) (status 20)) (segment (start 131.5 88.233324) (end 130.969111 88.764213) (width 0.15) (layer F.Cu) (net 7)) (segment (start 131.5 87.95) (end 131.5 88.233324) (width 0.15) (layer F.Cu) (net 7)) (segment (start 131.45 87.9) (end 131.5 87.95) (width 0.15) (layer F.Cu) (net 7)) (segment (start 130.82999 94.07001) (end 126.02999 94.07001) (width 0.15) (layer F.Cu) (net 7)) (segment (start 130.969111 93.930889) (end 130.82999 94.07001) (width 0.15) (layer F.Cu) (net 7)) (segment (start 125.05 95.05) (end 124.95 95.05) (width 0.15) (layer F.Cu) (net 7) (status 30)) (segment (start 121.9 95.95) (end 124.95 95.95) (width 0.15) (layer F.Cu) (net 8) (status 30)) (segment (start 126.28 94.72) (end 126.6 94.4) (width 0.15) (layer F.Cu) (net 9) (status 10)) (segment (start 131.84 88.36) (end 131.84 87.62) (width 0.15) (layer F.Cu) (net 9) (status 20)) (segment (start 131.84 88.36) (end 131.299101 88.900899) (width 0.15) (layer F.Cu) (net 9)) (segment (start 131.299101 88.900899) (end 131.299101 94.100899) (width 0.15) (layer F.Cu) (net 9)) (segment (start 131 94.4) (end 126.6 94.4) (width 0.15) (layer F.Cu) (net 9)) (segment (start 131 94.4) (end 131.299101 94.100899) (width 0.15) (layer F.Cu) (net 9)) (segment (start 126.28 95.62) (end 126.21 95.62) (width 0.15) (layer F.Cu) (net 10) (status 30)) (segment (start 126.21 95.62) (end 125.46 96.37) (width 0.15) (layer F.Cu) (net 10) (tstamp 55A7F701) (status 10)) (segment (start 125.46 96.37) (end 124.07 96.37) (width 0.15) (layer F.Cu) (net 10) (tstamp 55A7F702)) (segment (start 124.07 96.37) (end 123.84 96.6) (width 0.15) (layer F.Cu) (net 10) (tstamp 559D5DE2)) (segment (start 121.9 96.6) (end 123.84 96.6) (width 0.15) (layer F.Cu) (net 10) (tstamp 559D5DE3) (status 10)) (segment (start 132.64 86.02) (end 132.25 86.41) (width 0.15) (layer F.Cu) (net 11) (status 10)) (segment (start 132.25 86.41) (end 132.25 90) (width 0.15) (layer F.Cu) (net 11) (tstamp 557DC660) (status 20)) (segment (start 132.25 90) (end 132.3 90.05) (width 0.15) (layer F.Cu) (net 11) (tstamp 557DC661) (status 30)) (segment (start 128.25 81.1) (end 126.7 81.1) (width 0.15) (layer In2.Cu) (net 12)) (via (at 131.48 82.47) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 12)) (segment (start 131.48 82.47) (end 131.44 82.43) (width 0.15) (layer In2.Cu) (net 12) (tstamp 55994529)) (segment (start 131.44 82.43) (end 130.66 82.43) (width 0.15) (layer In2.Cu) (net 12) (tstamp 5599452A)) (segment (start 130.66 82.43) (end 130.18 81.95) (width 0.15) (layer In2.Cu) (net 12) (tstamp 5599452B)) (segment (start 131.83 82.82) (end 131.48 82.47) (width 0.15) (layer F.Cu) (net 12) (tstamp 55994526) (status 10)) (segment (start 128.25 81.1) (end 129.1 81.95) (width 0.15) (layer In2.Cu) (net 12) (tstamp 559AB261)) (segment (start 129.1 81.95) (end 130.18 81.95) (width 0.15) (layer In2.Cu) (net 12) (tstamp 559AB263)) (segment (start 126.22 80.88) (end 125.625 80.88) (width 0.15) (layer F.Cu) (net 12) (tstamp 559AB282) (status 20)) (segment (start 126.35 80.75) (end 126.22 80.88) (width 0.15) (layer F.Cu) (net 12) (tstamp 559AB281)) (via (at 126.35 80.75) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 12)) (segment (start 126.7 81.1) (end 126.35 80.75) (width 0.15) (layer In2.Cu) (net 12) (tstamp 559AB27F)) (segment (start 131.84 82.82) (end 131.83 82.82) (width 0.15) (layer F.Cu) (net 12) (status 30)) (segment (start 125.76 80.88) (end 125.625 80.88) (width 0.15) (layer F.Cu) (net 12) (tstamp 55994531) (status 30)) (segment (start 127.69 83.51) (end 126.51 83.51) (width 0.15) (layer F.Cu) (net 13)) (segment (start 127.69 83.51) (end 128 83.2) (width 0.15) (layer F.Cu) (net 13) (tstamp 5599451B)) (segment (start 124.27 80.965) (end 124.27 82.82) (width 0.15) (layer F.Cu) (net 13) (tstamp 5580C04A) (status 10)) (segment (start 129.95 83.2) (end 128 83.2) (width 0.15) (layer F.Cu) (net 13) (tstamp 557DC35C)) (segment (start 129.95 83.2) (end 130.24 82.91) (width 0.15) (layer F.Cu) (net 13) (tstamp 557DC35B) (status 20)) (segment (start 124.45 83) (end 124.27 82.82) (width 0.15) (layer F.Cu) (net 13) (tstamp 559ACDDF)) (segment (start 126 83) (end 124.45 83) (width 0.15) (layer F.Cu) (net 13) (tstamp 559ACDDE)) (segment (start 126.51 83.51) (end 126 83) (width 0.15) (layer F.Cu) (net 13) (tstamp 559ACDDC)) (segment (start 130.24 82.82) (end 130.24 82.91) (width 0.15) (layer F.Cu) (net 13) (status 30)) (segment (start 124.27 80.965) (end 124.355 80.88) (width 0.15) (layer F.Cu) (net 13) (tstamp 5580C04B) (status 30)) (segment (start 127.75 82.02) (end 124.03 82.02) (width 0.15) (layer In2.Cu) (net 14)) (segment (start 129.44 82.74) (end 129.11 82.41) (width 0.15) (layer F.Cu) (net 14) (tstamp 559944E5) (status 10)) (via (at 128.09 82.36) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 14)) (segment (start 128.14 82.41) (end 128.09 82.36) (width 0.15) (layer F.Cu) (net 14) (tstamp 559944E7)) (segment (start 129.11 82.41) (end 128.14 82.41) (width 0.15) (layer F.Cu) (net 14) (tstamp 559944E6)) (segment (start 128.09 82.36) (end 127.75 82.02) (width 0.15) (layer In2.Cu) (net 14)) (segment (start 123.8 82.25) (end 123.085 81.535) (width 0.15) (layer F.Cu) (net 14) (tstamp 559ACE2D) (status 20)) (via (at 123.8 82.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 14)) (segment (start 124.03 82.02) (end 123.8 82.25) (width 0.15) (layer In2.Cu) (net 14) (tstamp 559ACE2B)) (segment (start 123.085 81.535) (end 123.085 80.88) (width 0.15) (layer F.Cu) (net 14) (tstamp 559ACE2E) (status 30)) (segment (start 129.44 82.82) (end 129.44 82.74) (width 0.15) (layer F.Cu) (net 14) (status 30)) (segment (start 129.44 82.82) (end 129.44 82.79) (width 0.15) (layer F.Cu) (net 14) (status 30)) (segment (start 125.2 85) (end 123.6 85) (width 0.15) (layer F.Cu) (net 15)) (segment (start 121.815 86.785) (end 121.815 88.18) (width 0.15) (layer F.Cu) (net 15) (tstamp 55A41C34) (status 20)) (segment (start 123.6 85) (end 121.815 86.785) (width 0.15) (layer F.Cu) (net 15) (tstamp 55A41C32)) (segment (start 125.2 83.505302) (end 125.2 85) (width 0.15) (layer In2.Cu) (net 15)) (segment (start 126.762585 82.359359) (end 126.345943 82.359359) (width 0.15) (layer In2.Cu) (net 15)) (segment (start 127.832225 83.428999) (end 126.762585 82.359359) (width 0.15) (layer In2.Cu) (net 15)) (segment (start 130.65 83.2) (end 130.421001 83.428999) (width 0.15) (layer In2.Cu) (net 15)) (segment (start 126.345943 82.359359) (end 125.2 83.505302) (width 0.15) (layer In2.Cu) (net 15)) (segment (start 130.421001 83.428999) (end 127.832225 83.428999) (width 0.15) (layer In2.Cu) (net 15)) (via (at 125.2 85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 15)) (via (at 130.65 83.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 15)) (segment (start 131.03 82.82) (end 130.65 83.2) (width 0.15) (layer F.Cu) (net 15) (tstamp 5580C057) (status 10)) (segment (start 131.04 82.82) (end 131.03 82.82) (width 0.15) (layer F.Cu) (net 15) (status 30)) (segment (start 123.085 86.015) (end 123.5 85.6) (width 0.15) (layer F.Cu) (net 16)) (segment (start 123.085 88.18) (end 123.085 86.015) (width 0.15) (layer F.Cu) (net 16) (tstamp 5580C096) (status 10)) (segment (start 126.2 85.15) (end 126.2 83.147624) (width 0.15) (layer In2.Cu) (net 16) (tstamp 55A41C08)) (segment (start 126.15 85.2) (end 126.2 85.15) (width 0.15) (layer In2.Cu) (net 16) (tstamp 55A41C07)) (via (at 126.15 85.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 16)) (segment (start 126.15 85.2) (end 125.75 85.6) (width 0.15) (layer F.Cu) (net 16)) (segment (start 123.5 85.6) (end 125.75 85.6) (width 0.15) (layer F.Cu) (net 16) (tstamp 55A41C20)) (segment (start 126.2 83.147624) (end 126.554264 82.79336) (width 0.15) (layer In2.Cu) (net 16)) (via (at 126.554264 82.79336) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 16)) (segment (start 126.580904 82.82) (end 128.64 82.82) (width 0.15) (layer F.Cu) (net 16) (status 20)) (segment (start 126.580904 82.82) (end 126.554264 82.79336) (width 0.15) (layer F.Cu) (net 16)) (segment (start 129.44 82.02) (end 129.02 81.6) (width 0.15) (layer F.Cu) (net 17) (status 10)) (segment (start 127.105302 81.6) (end 126.175302 82.53) (width 0.15) (layer F.Cu) (net 17)) (segment (start 126.175302 82.53) (end 124.72 82.53) (width 0.15) (layer F.Cu) (net 17)) (segment (start 129.02 81.6) (end 127.105302 81.6) (width 0.15) (layer F.Cu) (net 17)) (via (at 124.72 82.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 17)) (segment (start 124.72 82.53) (end 124.72 86.78) (width 0.15) (layer In2.Cu) (net 17) (tstamp 5580C009)) (segment (start 124.72 86.78) (end 124.37 87.13) (width 0.15) (layer In2.Cu) (net 17) (tstamp 5580C00A)) (via (at 124.37 87.13) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 17)) (segment (start 124.37 88.165) (end 124.37 87.13) (width 0.15) (layer F.Cu) (net 17) (tstamp 5580C00C) (status 10)) (segment (start 124.37 88.165) (end 124.355 88.18) (width 0.15) (layer F.Cu) (net 17) (tstamp 5580C00D) (status 30)) (segment (start 133.3 92.6) (end 133.3 89.3) (width 0.15) (layer F.Cu) (net 18) (tstamp 559BF114)) (segment (start 132.65 88.65) (end 133.3 89.3) (width 0.15) (layer F.Cu) (net 18) (tstamp 559AB163)) (segment (start 132.65 87.63) (end 132.65 88.65) (width 0.15) (layer F.Cu) (net 18) (tstamp 559AB15F) (status 10)) (segment (start 124.16 97.2) (end 121.95 97.2) (width 0.15) (layer F.Cu) (net 18) (tstamp 559AB134) (status 20)) (segment (start 124.16 97.2) (end 124.7 96.66) (width 0.15) (layer F.Cu) (net 18) (tstamp 559D5DDA)) (segment (start 132.64 87.62) (end 132.65 87.63) (width 0.15) (layer F.Cu) (net 18) (status 30)) (segment (start 121.9 97.25) (end 121.95 97.2) (width 0.15) (layer F.Cu) (net 18) (status 30)) (segment (start 124.7 96.66) (end 125.16 96.66) (width 0.15) (layer F.Cu) (net 18) (tstamp 559D5DDB)) (segment (start 127.269998 94.680002) (end 131.219998 94.680002) (width 0.15) (layer F.Cu) (net 18)) (segment (start 127 96.75) (end 127 94.95) (width 0.15) (layer F.Cu) (net 18) (tstamp 559AB17E)) (segment (start 127 94.95) (end 127.269998 94.680002) (width 0.15) (layer F.Cu) (net 18) (tstamp 559AB17F)) (segment (start 131.219998 94.680002) (end 133.3 92.6) (width 0.15) (layer F.Cu) (net 18) (tstamp 559ACE68)) (segment (start 126.67 97.08) (end 127 96.75) (width 0.15) (layer F.Cu) (net 18) (tstamp 559D5DDE)) (segment (start 125.58 97.08) (end 126.67 97.08) (width 0.15) (layer F.Cu) (net 18) (tstamp 559D5DDD)) (segment (start 125.16 96.66) (end 125.58 97.08) (width 0.15) (layer F.Cu) (net 18) (tstamp 559D5DDC)) (segment (start 120.15 72.95) (end 121.2 74) (width 0.15) (layer F.Cu) (net 19) (tstamp 55A41BC5)) (segment (start 120.15 71.6) (end 120.15 72.95) (width 0.15) (layer F.Cu) (net 19)) (segment (start 120.15 71.6) (end 120.85 70.9) (width 0.15) (layer F.Cu) (net 19) (tstamp 55A41B9D)) (segment (start 120.85 70.9) (end 122.67 70.9) (width 0.15) (layer F.Cu) (net 19) (tstamp 55A41B9F)) (segment (start 124.12 69.45) (end 122.67 70.9) (width 0.15) (layer F.Cu) (net 19) (tstamp 55A41BA1) (status 10)) (segment (start 121.2 77.32) (end 121.2 74) (width 0.15) (layer F.Cu) (net 19)) (segment (start 125.3 78.15) (end 125.6 77.85) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559ACC5E)) (via (at 125.6 77.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 19)) (segment (start 125.3 80.7) (end 125.3 78.15) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559ACC64)) (segment (start 131 82.75) (end 130.15 82.75) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559AB230)) (segment (start 131.45 83.2) (end 131 82.75) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559AB22F)) (via (at 131.45 83.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 19)) (segment (start 131.04 83.61) (end 131.45 83.2) (width 0.15) (layer F.Cu) (net 19) (tstamp 559AB22D) (status 10)) (segment (start 129.9 83) (end 129.6 83) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559AB23C)) (segment (start 130.15 82.75) (end 129.9 83) (width 0.15) (layer In2.Cu) (net 19) (tstamp 559AB23B)) (segment (start 129.6 83) (end 128.15 81.55) (width 0.15) (layer In2.Cu) (net 19)) (segment (start 128.15 81.55) (end 126.15 81.55) (width 0.15) (layer In2.Cu) (net 19)) (segment (start 126.15 81.55) (end 125.3 80.7) (width 0.15) (layer In2.Cu) (net 19)) (segment (start 125.14 78.31) (end 122.19 78.31) (width 0.15) (layer F.Cu) (net 19) (tstamp 559E9E16)) (segment (start 121.2 77.32) (end 122.19 78.31) (width 0.15) (layer F.Cu) (net 19) (tstamp 559E9DEB)) (segment (start 125.6 77.85) (end 125.14 78.31) (width 0.15) (layer F.Cu) (net 19)) (segment (start 124.06 69.9) (end 124.06 70.0524) (width 0.15) (layer F.Cu) (net 19) (status 30)) (segment (start 123.15 71.65) (end 123.15 70.81) (width 0.15) (layer B.Cu) (net 19) (status 10)) (segment (start 123.15 71.7) (end 123.15 71.65) (width 0.15) (layer B.Cu) (net 19) (tstamp 559AB22A) (status 30)) (segment (start 131.04 83.62) (end 131.04 83.61) (width 0.15) (layer F.Cu) (net 19) (status 30)) (segment (start 123.15 70.81) (end 124.06 69.9) (width 0.15) (layer B.Cu) (net 19) (tstamp 559AB338) (status 20)) (segment (start 120.88 74.18) (end 119.7 73) (width 0.15) (layer F.Cu) (net 20) (tstamp 55A41B91)) (segment (start 120.88 77.42) (end 120.88 74.18) (width 0.15) (layer F.Cu) (net 20)) (via (at 125.9 78.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 20)) (segment (start 128.858021 81.208021) (end 128.4 80.75) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 125.95 80.2) (end 125.9 80.15) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 128.4 80.75) (end 127 80.75) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 130.65 80.8) (end 130.241979 81.208021) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 130.241979 81.208021) (end 128.858021 81.208021) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 127 80.75) (end 126.45 80.2) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 126.45 80.2) (end 125.95 80.2) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 125.9 80.15) (end 125.9 78.4) (width 0.15) (layer In2.Cu) (net 20)) (segment (start 122.06 78.6) (end 125.7 78.6) (width 0.15) (layer F.Cu) (net 20) (tstamp 559E9E0F)) (segment (start 125.7 78.6) (end 125.9 78.4) (width 0.15) (layer F.Cu) (net 20) (tstamp 559E9E12)) (segment (start 120.88 77.42) (end 122.06 78.6) (width 0.15) (layer F.Cu) (net 20)) (segment (start 131.25 80.8) (end 130.65 80.8) (width 0.15) (layer F.Cu) (net 20) (tstamp 559ACFC3)) (segment (start 131.45 81) (end 131.25 80.8) (width 0.15) (layer F.Cu) (net 20) (tstamp 559ACFC2)) (segment (start 131.45 81.45) (end 131.45 81) (width 0.15) (layer F.Cu) (net 20) (tstamp 559AD003)) (via (at 130.65 80.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 20)) (segment (start 131.6 81.6) (end 131.45 81.45) (width 0.15) (layer F.Cu) (net 20) (tstamp 559AD000)) (segment (start 132.25 83.2) (end 132.25 81.8) (width 0.15) (layer F.Cu) (net 20) (tstamp 559AB211)) (segment (start 131.84 83.61) (end 132.25 83.2) (width 0.15) (layer F.Cu) (net 20) (tstamp 559AB20E) (status 10)) (segment (start 132.25 81.8) (end 132.05 81.6) (width 0.15) (layer F.Cu) (net 20) (tstamp 559ACFBB)) (segment (start 132.05 81.6) (end 131.6 81.6) (width 0.15) (layer F.Cu) (net 20)) (segment (start 119.7 71.33) (end 121.58 69.45) (width 0.15) (layer F.Cu) (net 20) (tstamp 55A41B95) (status 20)) (segment (start 119.7 73) (end 119.7 71.33) (width 0.15) (layer F.Cu) (net 20) (tstamp 55A41B93)) (segment (start 121.52 69.9) (end 121.52 70.58) (width 0.15) (layer B.Cu) (net 20) (status 10)) (segment (start 121.52 70.58) (end 120.6 71.5) (width 0.15) (layer B.Cu) (net 20) (tstamp 559AB334) (status 20)) (segment (start 131.84 83.62) (end 131.84 83.61) (width 0.15) (layer F.Cu) (net 20) (status 30)) (segment (start 125.75 76.46) (end 125.75 77.01) (width 0.15) (layer In2.Cu) (net 21)) (segment (start 124.05 78.71) (end 121.15 78.71) (width 0.15) (layer In2.Cu) (net 21) (tstamp 55AA2B6C)) (segment (start 125.75 77.01) (end 124.05 78.71) (width 0.15) (layer In2.Cu) (net 21) (tstamp 55AA2B6B)) (segment (start 121.15 76.66) (end 121.4 76.41) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 125.67 76.54) (end 125.75 76.46) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA062E)) (segment (start 123.19 76.54) (end 125.67 76.54) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA062B)) (segment (start 123.06 76.41) (end 123.19 76.54) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA062A)) (segment (start 121.4 76.41) (end 123.06 76.41) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA0628)) (segment (start 124.37 76.52) (end 125.69 76.52) (width 0.3) (layer B.Cu) (net 21) (status 10)) (segment (start 125.69 76.52) (end 125.75 76.46) (width 0.3) (layer B.Cu) (net 21) (tstamp 55A93CFA)) (segment (start 137.3 95.45) (end 137.9 95.45) (width 0.3) (layer F.Cu) (net 21)) (segment (start 134.97 94.38) (end 134.97 94.69) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 134.97 94.69) (end 135.73 95.45) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A809D5) (status 10)) (segment (start 135.73 95.45) (end 137.3 95.45) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A809D6)) (segment (start 130.93 76.44) (end 130.73 76.64) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 130.73 76.64) (end 128.23 76.64) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A7DD23) (status 30)) (segment (start 128.23 76.64) (end 127.94 76.35) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A7DD24) (status 30)) (segment (start 130.93 76.44) (end 130.57 76.08) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 130.57 76.08) (end 128.21 76.08) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A7DD1F) (status 30)) (segment (start 128.21 76.08) (end 127.94 76.35) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A7DD20) (status 30)) (segment (start 127.94 76.35) (end 130.84 76.35) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 130.84 76.35) (end 130.93 76.44) (width 0.3) (layer F.Cu) (net 21) (tstamp 55A7DD1C) (status 30)) (segment (start 141.59 94.98) (end 141.59 96.64) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 143.95 99) (end 144.65 99) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55A41C8C)) (segment (start 141.59 96.64) (end 143.95 99) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55A41C8B)) (segment (start 138 95.55) (end 138 96.1) (width 0.15) (layer B.Cu) (net 21) (tstamp 559BFEE4)) (segment (start 137.9 95.45) (end 138 95.55) (width 0.15) (layer B.Cu) (net 21) (tstamp 559BFEE3)) (segment (start 137.85 96.25) (end 138 96.1) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD6F5)) (via (at 138 96.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (via (at 137.9 95.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 137.9 95.4) (end 137.9 96) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 137.9 96) (end 138 96.1) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD6EB)) (segment (start 137.3 95.4) (end 137.3 96.2) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 137.3 96.2) (end 137.35 96.25) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD6E6)) (segment (start 131.35 95.4) (end 137.3 95.4) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 137.3 95.4) (end 137.9 95.4) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD6E4)) (segment (start 137.35 96.25) (end 137.35 95.5) (width 0.15) (layer B.Cu) (net 21)) (via (at 137.3 95.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 137.35 95.5) (end 137.3 95.45) (width 0.15) (layer B.Cu) (net 21) (tstamp 559BFEDD)) (segment (start 137.35 96.25) (end 137.35 97.3) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD6E1) (status 20)) (segment (start 128.45 76.86) (end 127.94 76.35) (width 0.3) (layer F.Cu) (net 21) (tstamp 559EA028) (status 30)) (segment (start 130.93 76.44) (end 130.6 76.11) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 128.18 76.11) (end 127.94 76.35) (width 0.3) (layer F.Cu) (net 21) (tstamp 559EA024) (status 30)) (segment (start 130.93 76.44) (end 130.72 76.65) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 128.24 76.65) (end 127.94 76.35) (width 0.3) (layer F.Cu) (net 21) (tstamp 559EA020) (status 30)) (segment (start 132.17 76.44) (end 130.94 76.44) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 130.94 76.44) (end 130.93 76.45) (width 0.3) (layer F.Cu) (net 21) (tstamp 559E9FEF) (status 30)) (segment (start 130.83 76.35) (end 130.93 76.45) (width 0.3) (layer F.Cu) (net 21) (tstamp 559E9FEC) (status 30)) (segment (start 127.94 76.35) (end 126.19 76.35) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 126.19 76.35) (end 125.82 75.98) (width 0.3) (layer F.Cu) (net 21) (tstamp 559E9FC5) (status 10)) (segment (start 125.82 75.98) (end 125.75 76.05) (width 0.3) (layer B.Cu) (net 21) (tstamp 559E9FC7)) (segment (start 125.75 76.05) (end 125.75 76.46) (width 0.3) (layer B.Cu) (net 21) (tstamp 559E9FC8)) (via (at 125.82 75.98) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 127.94 76.35) (end 125.86 76.35) (width 0.3) (layer F.Cu) (net 21) (status 10)) (segment (start 125.86 76.35) (end 125.75 76.46) (width 0.3) (layer F.Cu) (net 21) (tstamp 559E9FC2)) (via (at 125.75 76.46) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 126.86 97.53) (end 126.86 94.25) (width 0.15) (layer In2.Cu) (net 21)) (segment (start 126.38 97.61) (end 126.78 97.61) (width 0.15) (layer B.Cu) (net 21) (status 10)) (via (at 126.86 97.53) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 126.78 97.61) (end 126.86 97.53) (width 0.15) (layer B.Cu) (net 21) (tstamp 559D5C08)) (segment (start 123.73 100.58) (end 123.06 100.58) (width 0.3) (layer F.Cu) (net 21) (status 10)) (via (at 123.06 100.58) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (via (at 144.65 99) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 144.65 99) (end 144.65 98.95) (width 0.15) (layer In2.Cu) (net 21) (tstamp 559BF1F5)) (segment (start 144.1 99) (end 144.65 99) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 144.65 99) (end 145.3 99) (width 0.15) (layer F.Cu) (net 21) (tstamp 559BF1F2) (status 20)) (segment (start 145.3 99) (end 145.35 98.95) (width 0.15) (layer F.Cu) (net 21) (tstamp 559BF1EF) (status 30)) (segment (start 133.5 100.65) (end 136.75 100.65) (width 0.3) (layer In2.Cu) (net 21)) (via (at 133.5 100.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 133.05 100.65) (end 133.5 100.65) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 136.75 100.65) (end 137.4 100) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD739)) (segment (start 138.55 96.1) (end 138.55 96.2) (width 0.3) (layer F.Cu) (net 21)) (segment (start 138.55 96.2) (end 139 96.65) (width 0.3) (layer F.Cu) (net 21) (tstamp 559AD72A) (status 20)) (via (at 138.55 96.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 137.9 98.5) (end 138.4 98.5) (width 0.3) (layer F.Cu) (net 21) (status 20)) (segment (start 138.4 98.5) (end 138.65 98.75) (width 0.3) (layer F.Cu) (net 21) (tstamp 559AD6FB) (status 30)) (segment (start 137.6 97.4) (end 137.6 96.5) (width 0.3) (layer F.Cu) (net 21) (status 10)) (segment (start 137.4 100) (end 137.4 99) (width 0.3) (layer In2.Cu) (net 21)) (via (at 137.4 100) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 136.9 100) (end 137.4 100) (width 0.15) (layer F.Cu) (net 21) (status 10)) (via (at 137.9 98.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 137.4 99) (end 137.9 98.5) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD6B3)) (segment (start 145.8 84.95) (end 145.3 84.95) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 144.55 85.7) (end 144.55 88.6) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 145.3 84.95) (end 144.55 85.7) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD690)) (segment (start 145.89 88.85) (end 144.8 88.85) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 144.8 88.85) (end 144.55 88.6) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD687)) (segment (start 147.1 84.775) (end 145.975 84.775) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 145.8 84.95) (end 146.04 84.71) (width 0.15) (layer B.Cu) (net 21) (tstamp 559AB0BF) (status 20)) (via (at 145.8 84.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 145.975 84.775) (end 145.8 84.95) (width 0.15) (layer F.Cu) (net 21) (tstamp 559AB0BD)) (segment (start 146.04 84.71) (end 146.04 84.56) (width 0.15) (layer B.Cu) (net 21) (tstamp 559AB0C0) (status 30)) (segment (start 131.37 76.45) (end 132.62 76.45) (width 0.3) (layer F.Cu) (net 21) (status 30)) (segment (start 131.32 76.4) (end 131.37 76.45) (width 0.3) (layer F.Cu) (net 21) (tstamp 559AACEF) (status 30)) (segment (start 148.85 89.05) (end 148.6 89.05) (width 0.15) (layer F.Cu) (net 21) (status 30)) (segment (start 148.6 89.05) (end 148.225 88.675) (width 0.15) (layer F.Cu) (net 21) (tstamp 55997990) (status 10)) (segment (start 148.225 88.675) (end 147.1 88.675) (width 0.15) (layer F.Cu) (net 21) (tstamp 55997991) (status 20)) (segment (start 148.7 84.4) (end 148.71 84.41) (width 0.15) (layer F.Cu) (net 21) (status 30)) (segment (start 148.71 84.41) (end 149.54 84.41) (width 0.15) (layer F.Cu) (net 21) (tstamp 5599604C) (status 30)) (segment (start 148.7 84.4) (end 148.325 84.775) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 148.325 84.775) (end 147.1 84.775) (width 0.15) (layer F.Cu) (net 21) (tstamp 5599603C) (status 20)) (segment (start 146.59 88.94) (end 147.84 88.94) (width 0.15) (layer B.Cu) (net 21) (status 30)) (segment (start 147.1 88.675) (end 146.065 88.675) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 146.065 88.675) (end 145.89 88.85) (width 0.15) (layer F.Cu) (net 21) (tstamp 55995FFC)) (segment (start 145.98 88.94) (end 146.59 88.94) (width 0.15) (layer B.Cu) (net 21) (tstamp 55995FFF) (status 20)) (segment (start 145.89 88.85) (end 145.98 88.94) (width 0.15) (layer B.Cu) (net 21) (tstamp 55995FFE)) (via (at 145.89 88.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 142.3175 94.98) (end 141.59 94.98) (width 0.15) (layer F.Cu) (net 21) (status 10)) (segment (start 141.58 94.99) (end 141.19 94.99) (width 0.15) (layer F.Cu) (net 21) (status 20)) (segment (start 142.3175 94.98) (end 142.32 94.9825) (width 0.15) (layer F.Cu) (net 21) (tstamp 55995DFF) (status 30)) (segment (start 138.35 96.3) (end 138.55 96.1) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD722)) (segment (start 137.9 98.5) (end 137.85 98.45) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD6B6)) (segment (start 126.35 94) (end 126.61 94) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559ACE4D)) (segment (start 121.15 78.71) (end 121.15 84.45) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA2B70)) (segment (start 121.15 84.45) (end 123.3 86.6) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559ACE44)) (segment (start 123.3 86.6) (end 123.3 90.95) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559ACE45)) (segment (start 123.3 90.95) (end 126.35 94) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559ACE4B)) (segment (start 121.15 76.7) (end 121.15 76.66) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559ACE42)) (segment (start 121.15 76.66) (end 121.15 78.71) (width 0.3) (layer In2.Cu) (net 21) (tstamp 55AA0626)) (segment (start 126.86 94.25) (end 126.61 94) (width 0.15) (layer In2.Cu) (net 21) (tstamp 559D5C0D)) (segment (start 138.5 95.4) (end 141.17 95.4) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 141.17 95.4) (end 141.59 94.98) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559BFAC6)) (segment (start 138.5 96.05) (end 138.5 95.4) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD725)) (segment (start 138.55 96.1) (end 138.5 96.05) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD724)) (segment (start 144.55 88.6) (end 144.55 90.75) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD68A)) (segment (start 141.87 94.98) (end 141.59 94.98) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 141.87 94.98) (end 142.45 94.4) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD67A)) (segment (start 142.45 94.4) (end 142.45 93) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD67B)) (segment (start 142.45 93) (end 144.55 90.9) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD67C)) (segment (start 126.61 94) (end 129.95 94) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559D5C10)) (via (at 141.59 94.98) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 141.58 94.99) (end 141.59 94.98) (width 0.15) (layer F.Cu) (net 21) (tstamp 55995DFB)) (segment (start 137.6 96.5) (end 137.35 96.25) (width 0.3) (layer F.Cu) (net 21) (tstamp 559AD6DF)) (segment (start 137.85 97.3) (end 137.85 96.25) (width 0.3) (layer B.Cu) (net 21) (status 10)) (segment (start 137.85 98.45) (end 137.85 97.3) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD6B7) (status 20)) (segment (start 129.95 94) (end 131.35 95.4) (width 0.3) (layer In2.Cu) (net 21)) (segment (start 137.9 95.4) (end 138.5 95.4) (width 0.3) (layer In2.Cu) (net 21) (tstamp 559AD6E9)) (segment (start 138.35 97.3) (end 138.35 96.3) (width 0.3) (layer B.Cu) (net 21) (status 10)) (segment (start 138.35 97.3) (end 138.35 98.05) (width 0.3) (layer B.Cu) (net 21) (status 30)) (segment (start 138.35 98.05) (end 137.9 98.5) (width 0.3) (layer B.Cu) (net 21) (tstamp 559AD6F8) (status 10)) (via (at 137.35 96.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 136.9 96.25) (end 137.35 96.25) (width 0.3) (layer F.Cu) (net 21) (tstamp 559BF072)) (segment (start 136.85 97.3) (end 136.85 96.3) (width 0.3) (layer B.Cu) (net 21) (status 10)) (via (at 136.9 96.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 21)) (segment (start 136.85 96.3) (end 136.9 96.25) (width 0.3) (layer B.Cu) (net 21) (tstamp 559BF070)) (segment (start 136.85 98) (end 136.85 97.3) (width 0.15) (layer B.Cu) (net 21) (tstamp 559AD841) (status 30)) (segment (start 146.75 95.05) (end 145.3 95.05) (width 0.15) (layer In2.Cu) (net 22)) (segment (start 147.85 92.55) (end 147.85 84.35) (width 0.15) (layer In2.Cu) (net 22)) (segment (start 148 84.1) (end 148.4 83.7) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559979D9)) (via (at 148.4 83.7) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 22)) (segment (start 147.975 84.125) (end 148.4 83.7) (width 0.15) (layer F.Cu) (net 22) (tstamp 559979DB) (status 10)) (segment (start 146.75 95.05) (end 147.25 94.55) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559979B9)) (segment (start 147.25 94.55) (end 147.25 93.15) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559979BA)) (segment (start 147.25 93.15) (end 147.85 92.55) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559979BB)) (segment (start 147.85 84.35) (end 148 84.2) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559979CC)) (segment (start 148 84.2) (end 148 84.1) (width 0.15) (layer In2.Cu) (net 22)) (segment (start 144.669998 95.680002) (end 144.669998 96.730002) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559BFBF5)) (segment (start 145.3 95.05) (end 144.669998 95.680002) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559BFBF0)) (segment (start 144.05 97.1) (end 144.3 97.1) (width 0.15) (layer In2.Cu) (net 22)) (segment (start 144.3 97.1) (end 144.669998 96.730002) (width 0.15) (layer In2.Cu) (net 22) (tstamp 559BFBE6)) (segment (start 144.05 97.1) (end 144.05 97.65) (width 0.15) (layer B.Cu) (net 22) (status 20)) (via (at 144.05 97.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 22)) (segment (start 147.975 84.125) (end 147.1 84.125) (width 0.15) (layer F.Cu) (net 22) (tstamp 559979DC) (status 30)) (segment (start 145.65 97.1) (end 145.3 97.1) (width 0.15) (layer In2.Cu) (net 23)) (segment (start 148.15 84.75) (end 148.15 92.7) (width 0.15) (layer In2.Cu) (net 23)) (segment (start 148.85 83.4) (end 148.7 83.25) (width 0.15) (layer F.Cu) (net 23) (tstamp 559979DF)) (segment (start 148.7 83.25) (end 148.2 83.25) (width 0.15) (layer F.Cu) (net 23) (tstamp 559979E0)) (segment (start 147.975 83.475) (end 148.2 83.25) (width 0.15) (layer F.Cu) (net 23) (tstamp 559979E1) (status 10)) (segment (start 148.15 84.75) (end 149 83.9) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559979CF)) (segment (start 149 83.9) (end 149 83.4) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559979D0)) (via (at 149 83.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 23)) (via (at 145.65 97.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 23)) (segment (start 145.65 97.1) (end 145.65 97.65) (width 0.15) (layer B.Cu) (net 23) (status 20)) (segment (start 147.55 93.3) (end 148.15 92.7) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559979C7)) (segment (start 147.55 94.7) (end 147.55 93.3) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559979C5)) (segment (start 146.9 95.35) (end 147.55 94.7) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559979C3)) (segment (start 149 83.4) (end 148.85 83.4) (width 0.15) (layer F.Cu) (net 23)) (segment (start 145.4 95.35) (end 146.9 95.35) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559BFBEC)) (segment (start 144.95 95.8) (end 145.4 95.35) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559BFBEB)) (segment (start 144.95 96.75) (end 144.95 95.8) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559BFBEA)) (segment (start 145.3 97.1) (end 144.95 96.75) (width 0.15) (layer In2.Cu) (net 23) (tstamp 559BFBE9)) (segment (start 147.975 83.475) (end 147.1 83.475) (width 0.15) (layer F.Cu) (net 23) (tstamp 559979E2) (status 30)) (segment (start 147.175 83.4) (end 147.1 83.475) (width 0.15) (layer F.Cu) (net 23) (tstamp 559979D4) (status 30)) (segment (start 128.64 85.22) (end 128.54 85.22) (width 0.15) (layer F.Cu) (net 24) (status 30)) (segment (start 128.54 85.22) (end 128.08 85.68) (width 0.15) (layer F.Cu) (net 24) (tstamp 559944B5) (status 10)) (segment (start 127.93 85.53) (end 127.42 85.53) (width 0.15) (layer B.Cu) (net 24) (tstamp 559944B8) (status 20)) (segment (start 128.08 85.68) (end 127.93 85.53) (width 0.15) (layer B.Cu) (net 24) (tstamp 559944B7)) (via (at 128.08 85.68) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 24)) (segment (start 128.56 85.3) (end 128.64 85.22) (width 0.15) (layer F.Cu) (net 24) (tstamp 5580C0AA) (status 30)) (segment (start 129.44 80.42) (end 128.65 79.63) (width 0.15) (layer F.Cu) (net 25) (status 10)) (segment (start 128.85 78.2) (end 129.4 78.2) (width 0.15) (layer F.Cu) (net 25) (tstamp 559C0F41) (status 20)) (segment (start 128.65 78.4) (end 128.85 78.2) (width 0.15) (layer F.Cu) (net 25) (tstamp 559C0F40)) (segment (start 128.65 79.63) (end 128.65 78.4) (width 0.15) (layer F.Cu) (net 25) (tstamp 559C0F3E)) (segment (start 129.4 80.38) (end 129.44 80.42) (width 0.15) (layer F.Cu) (net 25) (tstamp 5580C4AA) (status 30)) (segment (start 121.81 90.99) (end 121.745 90.925) (width 0.15) (layer F.Cu) (net 26) (status 30)) (segment (start 121.745 90.925) (end 120.3 90.925) (width 0.15) (layer F.Cu) (net 26) (tstamp 55A41C78) (status 10)) (via (at 120.75 89.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 123.76 79.68) (end 128.1 79.68) (width 0.15) (layer F.Cu) (net 26) (tstamp 559946FF)) (segment (start 123.73 79.71) (end 123.76 79.68) (width 0.15) (layer F.Cu) (net 26) (tstamp 559946FE)) (via (at 123.73 79.71) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 120.75 89.2) (end 120.75 86.313797) (width 0.15) (layer F.Cu) (net 26)) (segment (start 122.267218 81.172782) (end 122.267218 84.796579) (width 0.15) (layer B.Cu) (net 26)) (segment (start 120.75 86.313797) (end 122.267218 84.796579) (width 0.15) (layer F.Cu) (net 26)) (via (at 122.267218 84.796579) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 123.73 79.71) (end 122.267218 81.172782) (width 0.15) (layer B.Cu) (net 26)) (segment (start 120.575 89.375) (end 120.75 89.2) (width 0.15) (layer B.Cu) (net 26) (tstamp 55A41C7C)) (segment (start 120.575 90.65) (end 120.575 89.375) (width 0.15) (layer B.Cu) (net 26) (tstamp 55A41C7B)) (segment (start 120.3 90.925) (end 120.575 90.65) (width 0.15) (layer B.Cu) (net 26) (tstamp 55A41C7A)) (via (at 120.3 90.925) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 129.01402 80.8) (end 129.04 80.77402) (width 0.15) (layer F.Cu) (net 26)) (via (at 129.85 84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 129.85 84) (end 130.23 83.62) (width 0.15) (layer F.Cu) (net 26) (tstamp 5580C4C3) (status 20)) (segment (start 128.1 79.68) (end 128.1 80.5) (width 0.15) (layer F.Cu) (net 26)) (via (at 129.04 80.77402) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 26)) (segment (start 129.85 84) (end 129.04 83.19) (width 0.15) (layer B.Cu) (net 26)) (segment (start 128.1 80.5) (end 128.4 80.8) (width 0.15) (layer F.Cu) (net 26)) (segment (start 128.4 80.8) (end 129.01402 80.8) (width 0.15) (layer F.Cu) (net 26)) (segment (start 129.04 83.19) (end 129.04 80.77402) (width 0.15) (layer B.Cu) (net 26)) (segment (start 121.81 90.99) (end 121.81 90.34) (width 0.15) (layer F.Cu) (net 26) (status 30)) (segment (start 130.24 83.62) (end 130.23 83.62) (width 0.15) (layer F.Cu) (net 26) (status 30)) (segment (start 128.1 79.68) (end 128.1 78.15) (width 0.15) (layer F.Cu) (net 26) (tstamp 55994702) (status 20)) (segment (start 136.3 87.8) (end 136.3 89) (width 0.15) (layer B.Cu) (net 27)) (via (at 136.3 87.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 27)) (segment (start 136.12 87.62) (end 136.3 87.8) (width 0.15) (layer F.Cu) (net 27) (tstamp 5580C19D)) (segment (start 135.84 87.62) (end 136.12 87.62) (width 0.15) (layer F.Cu) (net 27) (status 10)) (segment (start 136.3 89) (end 136.3 89.55) (width 0.15) (layer F.Cu) (net 27) (tstamp 559AD364) (status 20)) (via (at 136.3 89) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 27)) (segment (start 135.84 86.82) (end 136.28 86.82) (width 0.15) (layer F.Cu) (net 28) (status 10)) (segment (start 136.3 86.7) (end 136.3 86.375) (width 0.15) (layer B.Cu) (net 28) (tstamp 559AD388) (status 20)) (segment (start 136.35 86.75) (end 136.3 86.7) (width 0.15) (layer B.Cu) (net 28) (tstamp 559AD387)) (via (at 136.35 86.75) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 28)) (segment (start 136.28 86.82) (end 136.35 86.75) (width 0.15) (layer F.Cu) (net 28) (tstamp 559AD385)) (segment (start 135.84 86.82) (end 135.84 86.79) (width 0.15) (layer F.Cu) (net 28) (status 30)) (segment (start 126.68402 86.98402) (end 126.68402 84.13402) (width 0.15) (layer B.Cu) (net 29)) (segment (start 132.34 87.64) (end 130.8 87.64) (width 0.15) (layer B.Cu) (net 29)) (segment (start 121.436 83.3) (end 125.85 83.3) (width 0.15) (layer F.Cu) (net 29)) (segment (start 130.8 87.64) (end 130.7 87.74) (width 0.15) (layer B.Cu) (net 29)) (segment (start 125.85 83.3) (end 126.68402 84.13402) (width 0.15) (layer F.Cu) (net 29)) (segment (start 120.466 82.33) (end 121.436 83.3) (width 0.15) (layer F.Cu) (net 29)) (segment (start 119.3 82.33) (end 120.466 82.33) (width 0.15) (layer F.Cu) (net 29) (status 10)) (segment (start 130.7 87.74) (end 127.44 87.74) (width 0.15) (layer B.Cu) (net 29)) (segment (start 133.1 88.4) (end 132.34 87.64) (width 0.15) (layer B.Cu) (net 29)) (segment (start 127.44 87.74) (end 126.68402 86.98402) (width 0.15) (layer B.Cu) (net 29)) (via (at 126.68402 84.13402) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 29)) (segment (start 133.328999 91.382987) (end 133.328999 88.628999) (width 0.15) (layer B.Cu) (net 29)) (segment (start 132.85 93.7) (end 132.85 91.861986) (width 0.15) (layer B.Cu) (net 29) (status 10)) (segment (start 132.85 91.861986) (end 133.328999 91.382987) (width 0.15) (layer B.Cu) (net 29)) (segment (start 133.328999 88.628999) (end 133.1 88.4) (width 0.15) (layer B.Cu) (net 29)) (segment (start 134.65 86.85) (end 133.1 88.4) (width 0.15) (layer In2.Cu) (net 29) (tstamp 559ACEFF)) (via (at 133.1 88.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 29)) (segment (start 134.65 86.4) (end 134.65 86.85) (width 0.15) (layer In2.Cu) (net 29)) (via (at 134.65 86.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 29)) (segment (start 135.04 86.79) (end 134.65 86.4) (width 0.15) (layer F.Cu) (net 29) (tstamp 559ACD84) (status 10)) (segment (start 135.04 86.82) (end 135.04 86.79) (width 0.15) (layer F.Cu) (net 29) (status 30)) (segment (start 142.75 79.85) (end 138.8 79.85) (width 0.15) (layer In2.Cu) (net 30)) (segment (start 145.3 80.95) (end 143.85 80.95) (width 0.15) (layer In2.Cu) (net 30)) (segment (start 145.875 81.525) (end 145.85 81.5) (width 0.15) (layer F.Cu) (net 30) (tstamp 559AB051)) (via (at 145.85 81.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 30)) (segment (start 145.85 81.5) (end 145.3 80.95) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559AB055)) (segment (start 147.1 81.525) (end 145.875 81.525) (width 0.15) (layer F.Cu) (net 30) (status 10)) (segment (start 143.85 80.95) (end 142.75 79.85) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559AB05E)) (segment (start 138.8 79.85) (end 138.6 79.65) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559BFBAA)) (segment (start 134.2 79.4) (end 138.35 79.4) (width 0.15) (layer In2.Cu) (net 30)) (segment (start 137.25 81) (end 138.6 79.65) (width 0.15) (layer B.Cu) (net 30) (tstamp 559AB100)) (segment (start 137.25 81.8) (end 137.25 81) (width 0.15) (layer B.Cu) (net 30) (tstamp 559AB0FF)) (segment (start 137.5 82.05) (end 137.25 81.8) (width 0.15) (layer B.Cu) (net 30) (tstamp 559AB0FE) (status 10)) (segment (start 134.15 79.45) (end 134.2 79.4) (width 0.15) (layer In2.Cu) (net 30) (tstamp 5580C563)) (via (at 134.15 79.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 30)) (segment (start 133.35 81.1) (end 133.35 80.25) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559ABBBF)) (segment (start 133.35 80.25) (end 134.15 79.45) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559ABBC0)) (segment (start 133.85 81.6) (end 133.35 81.1) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559ABBBE)) (via (at 133.85 81.6) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 30)) (segment (start 133.85 81.6) (end 134.24 81.99) (width 0.15) (layer F.Cu) (net 30) (tstamp 559ABBBA) (status 20)) (via (at 138.6 79.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 30)) (segment (start 138.35 79.4) (end 138.6 79.65) (width 0.15) (layer In2.Cu) (net 30) (tstamp 559BFBA6)) (segment (start 134.24 82.02) (end 134.24 81.99) (width 0.15) (layer F.Cu) (net 30) (status 30)) (segment (start 137.5 82.25) (end 137.5 82.05) (width 0.15) (layer B.Cu) (net 30) (status 30)) (segment (start 134.24 82.02) (end 134.24 82.06) (width 0.15) (layer F.Cu) (net 30) (status 30)) (segment (start 127.76 71.84) (end 127.76 71.65) (width 0.3) (layer F.Cu) (net 31)) (segment (start 127.76 71.65) (end 127.76 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B64)) (via (at 127.76 71.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 127.76 71.8) (end 127.76 71.73) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B65)) (segment (start 127.76 71.73) (end 127.76 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B67)) (segment (start 127.35 71.83) (end 127.35 71.65) (width 0.3) (layer F.Cu) (net 31)) (segment (start 127.35 71.77) (end 127.38 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B5F)) (segment (start 127.35 71.65) (end 127.35 71.77) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B5E)) (via (at 127.35 71.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 126.87 71.85) (end 126.87 71.84) (width 0.3) (layer F.Cu) (net 31)) (segment (start 126.87 71.84) (end 126.87 71.64) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B59)) (via (at 126.87 71.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 127.38 71.83) (end 127.38 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B51)) (segment (start 127.38 71.83) (end 127.38 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B54)) (segment (start 126.87 71.83) (end 126.87 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B4A)) (segment (start 126.87 71.83) (end 126.87 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B4D)) (segment (start 141.75 76.35) (end 142.22 75.88) (width 0.3) (layer F.Cu) (net 31)) (segment (start 142.22 75.88) (end 142.22 73.8) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B45)) (segment (start 142.22 73.8) (end 141.75 73.33) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B46)) (segment (start 141.75 76.35) (end 141.22 75.82) (width 0.3) (layer F.Cu) (net 31)) (segment (start 141.22 75.82) (end 141.22 73.6) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B41)) (segment (start 141.22 73.6) (end 141.44 73.38) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B42)) (segment (start 141.75 76.35) (end 142 76.1) (width 0.3) (layer F.Cu) (net 31)) (segment (start 142 76.1) (end 142 73.58) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B3D)) (segment (start 142 73.58) (end 141.75 73.33) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B3E)) (segment (start 141.75 76.35) (end 141.46 76.06) (width 0.3) (layer F.Cu) (net 31)) (segment (start 141.46 76.06) (end 141.46 73.62) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B37)) (segment (start 141.46 73.62) (end 141.75 73.33) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B38)) (segment (start 124.47 72.84) (end 125.2 72.84) (width 0.3) (layer B.Cu) (net 31)) (segment (start 126.24 71.8) (end 126.35 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F86)) (segment (start 125.2 72.84) (end 126.24 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F85)) (segment (start 124.02 72.84) (end 124.47 72.84) (width 0.3) (layer B.Cu) (net 31)) (segment (start 123.57 72.84) (end 124.02 72.84) (width 0.3) (layer B.Cu) (net 31)) (via (at 124.02 72.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 124.05 72.81) (end 124.05 72.78) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F7E)) (segment (start 124.02 72.84) (end 124.05 72.81) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F7D)) (via (at 124.47 72.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 124.51 72.79) (end 124.51 72.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F76)) (segment (start 124.51 72.8) (end 124.47 72.84) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA1F75)) (segment (start 124.55 72.92) (end 124.55 73.3) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA1F71) (status 20)) (segment (start 124.47 72.84) (end 124.55 72.92) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA1F70)) (segment (start 124.05 72.87) (end 124.05 73.11) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA1F6D) (status 20)) (segment (start 124.02 72.84) (end 124.05 72.87) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA1F6C)) (segment (start 124.05 73.11) (end 124.05 73.3) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA1F6F) (status 30)) (via (at 126.35 71.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 130.5 69.5) (end 130.5 71.9) (width 0.3) (layer F.Cu) (net 31) (tstamp 559C0F11)) (segment (start 131 69) (end 130.5 69.5) (width 0.3) (layer F.Cu) (net 31) (tstamp 559C0F10)) (segment (start 134.22 69) (end 131 69) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B4E)) (segment (start 130.25 71.65) (end 130.5 71.9) (width 0.3) (layer F.Cu) (net 31) (tstamp 559C0F16)) (segment (start 126.35 71.8) (end 126.5 71.65) (width 0.3) (layer F.Cu) (net 31) (tstamp 559AACC9)) (segment (start 126.5 71.65) (end 130.25 71.65) (width 0.3) (layer F.Cu) (net 31)) (segment (start 126.35 71.8) (end 126.87 71.8) (width 0.3) (layer B.Cu) (net 31)) (segment (start 126.87 71.8) (end 127.38 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B4E)) (segment (start 127.38 71.8) (end 127.76 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B55)) (segment (start 127.76 71.8) (end 129.7 71.8) (width 0.3) (layer B.Cu) (net 31) (tstamp 55AA2B68)) (segment (start 140.75 75.35) (end 140.75 73.05) (width 0.3) (layer B.Cu) (net 31) (tstamp 559BFC8B) (status 10)) (segment (start 140 73.05) (end 140.75 73.05) (width 0.3) (layer B.Cu) (net 31)) (segment (start 140 73.05) (end 135.85 68.9) (width 0.3) (layer B.Cu) (net 31) (tstamp 559BFC93)) (segment (start 135.85 68.9) (end 130.75 68.9) (width 0.3) (layer B.Cu) (net 31) (tstamp 559BFC96)) (segment (start 129.7 71.8) (end 130.75 70.75) (width 0.3) (layer B.Cu) (net 31) (tstamp 559C0F0A)) (segment (start 130.75 70.75) (end 130.75 68.9) (width 0.3) (layer B.Cu) (net 31) (tstamp 559C0F0B)) (segment (start 123.64 72.77) (end 123.64 72.42) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A93C32)) (segment (start 123.57 72.84) (end 123.64 72.77) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A93C31)) (segment (start 122.28 72.42) (end 120.9 73.8) (width 0.3) (layer B.Cu) (net 31)) (segment (start 120.9 87.85) (end 121.35 88.3) (width 0.3) (layer B.Cu) (net 31) (tstamp 559ACCB7)) (segment (start 121.35 88.3) (end 121.35 91.95) (width 0.3) (layer B.Cu) (net 31) (tstamp 559ACCB8)) (segment (start 121.35 91.95) (end 120.7 92.6) (width 0.3) (layer B.Cu) (net 31) (tstamp 559ACCB9)) (segment (start 120.9 87.85) (end 120.9 73.8) (width 0.3) (layer B.Cu) (net 31)) (segment (start 122.28 72.42) (end 123.64 72.42) (width 0.3) (layer B.Cu) (net 31)) (segment (start 122.39 74.26) (end 122.39 74) (width 0.3) (layer F.Cu) (net 31) (status 30)) (segment (start 122.39 74) (end 123.09 73.3) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93C67) (status 10)) (segment (start 123.09 73.3) (end 123.55 73.3) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93C68) (status 20)) (segment (start 123.55 73.3) (end 123.55 72.86) (width 0.3) (layer F.Cu) (net 31) (status 10)) (via (at 123.57 72.84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 123.55 72.86) (end 123.57 72.84) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93C2F)) (segment (start 131.69 70.59) (end 133.12 70.59) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 133.12 70.59) (end 133.2 70.51) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B68)) (segment (start 133.2 70.86) (end 133.2 70.51) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 133.2 70.51) (end 133.7 70.01) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B55)) (segment (start 133.7 70.86) (end 133.7 70.01) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 133.7 70.01) (end 134.2 69.51) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B50)) (segment (start 134.2 70.86) (end 134.2 69.51) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 134.2 69.51) (end 134.2 69) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B53)) (segment (start 134.22 69.02) (end 134.22 69) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B4D)) (segment (start 134.2 69) (end 134.22 69.02) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A93B4B)) (segment (start 129.59 99.05) (end 129.59 98.41) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 127.69 98.47) (end 127.69 99.05) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6C1) (status 20)) (segment (start 128.05 98.11) (end 127.69 98.47) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6C0)) (segment (start 129.29 98.11) (end 128.05 98.11) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6BF)) (segment (start 129.59 98.41) (end 129.29 98.11) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6BE)) (segment (start 127.69 99.05) (end 127.69 99.71) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 127.69 99.71) (end 128.06 100.08) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6B7)) (segment (start 124.75 101.01) (end 127.55 101.01) (width 0.3) (layer B.Cu) (net 31)) (segment (start 128.06 100.08) (end 127.76 100.38) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6B3) (status 20)) (via (at 128.06 100.08) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 31)) (segment (start 128.06 100.5) (end 128.06 100.08) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A7F6B1)) (segment (start 127.55 101.01) (end 128.06 100.5) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A7F6B0)) (segment (start 127.76 100.38) (end 127.76 100.74) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7F6B4) (status 30)) (segment (start 139.48 69.9) (end 139.74 70.16) (width 0.3) (layer F.Cu) (net 31)) (segment (start 139.74 70.16) (end 140.42 70.16) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7DD42)) (segment (start 124.75 101) (end 124.75 101.01) (width 0.3) (layer B.Cu) (net 31)) (segment (start 124.75 101.01) (end 124.75 101) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A7F6AE)) (segment (start 124.75 101) (end 120.7 96.95) (width 0.3) (layer B.Cu) (net 31) (tstamp 55A7F681)) (segment (start 120.7 96.95) (end 120.7 92.6) (width 0.3) (layer B.Cu) (net 31) (tstamp 559ACCBE)) (segment (start 139.48 69.9) (end 138.95 69.9) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7DD40)) (segment (start 138.35 69.3) (end 138.35 69) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A41058)) (segment (start 138.95 69.9) (end 138.35 69.3) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A41057)) (segment (start 137.9 69) (end 138.35 69) (width 0.3) (layer F.Cu) (net 31)) (segment (start 140.1 69.06) (end 140.1 69.84) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 140.1 69.84) (end 140.42 70.16) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A41046)) (segment (start 140.42 70.16) (end 141.75 71.49) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A7DD45)) (segment (start 141.75 71.49) (end 141.75 73.33) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A41047) (status 20)) (segment (start 141.75 73.33) (end 141.75 76.35) (width 0.3) (layer F.Cu) (net 31) (tstamp 55AA2B3B) (status 20)) (segment (start 140.04 69) (end 137.9 69) (width 0.3) (layer F.Cu) (net 31) (status 10)) (segment (start 137.9 69) (end 134.22 69) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A4104D)) (segment (start 140.04 69) (end 140.1 69.06) (width 0.3) (layer F.Cu) (net 31) (tstamp 55A41043) (status 30)) (segment (start 141.75 76.35) (end 140.75 75.35) (width 0.3) (layer B.Cu) (net 31) (status 30)) (segment (start 126.37 73.37) (end 125.66 73.37) (width 0.3) (layer B.Cu) (net 32) (status 10)) (segment (start 125.55 73.48) (end 125.55 73.85) (width 0.3) (layer B.Cu) (net 32) (tstamp 55AA1F56)) (segment (start 125.66 73.37) (end 125.55 73.48) (width 0.3) (layer B.Cu) (net 32) (tstamp 55AA1F55)) (segment (start 125.54 73.3) (end 125.56 73.3) (width 0.3) (layer F.Cu) (net 32)) (segment (start 125.81 73.55) (end 127.69 73.55) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CDF) (status 20)) (segment (start 125.56 73.3) (end 125.81 73.55) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CDE)) (segment (start 127.69 73.55) (end 127.94 73.3) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CE0) (status 30)) (segment (start 125.54 73.3) (end 125.54 73.23) (width 0.3) (layer F.Cu) (net 32)) (segment (start 125.74 73.03) (end 127.67 73.03) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CDA) (status 20)) (segment (start 125.54 73.23) (end 125.74 73.03) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CD9)) (segment (start 127.67 73.03) (end 127.94 73.3) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CDB) (status 30)) (segment (start 125.23 74.08) (end 125.32 74.08) (width 0.3) (layer B.Cu) (net 32) (status 30)) (segment (start 125.32 74.08) (end 125.55 73.85) (width 0.3) (layer B.Cu) (net 32) (tstamp 55A93CD1) (status 10)) (via (at 125.55 73.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 32)) (segment (start 125.55 73.85) (end 125.54 73.84) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CD3)) (segment (start 125.54 73.84) (end 125.54 73.3) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CD4)) (segment (start 125.05 73.3) (end 125.54 73.3) (width 0.3) (layer F.Cu) (net 32) (status 10)) (segment (start 125.54 73.3) (end 127.94 73.3) (width 0.3) (layer F.Cu) (net 32) (tstamp 55A93CD7) (status 20)) (segment (start 125.05 75.2) (end 125.52 75.2) (width 0.3) (layer F.Cu) (net 33) (status 10)) (segment (start 125.54 75.18) (end 125.23 75.18) (width 0.3) (layer B.Cu) (net 33) (tstamp 55A93CC0) (status 20)) (segment (start 125.56 75.16) (end 125.54 75.18) (width 0.3) (layer B.Cu) (net 33) (tstamp 55A93CBF)) (via (at 125.56 75.16) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 33)) (segment (start 125.52 75.2) (end 125.56 75.16) (width 0.3) (layer F.Cu) (net 33) (tstamp 55A93CBD)) (segment (start 134.96 70.51) (end 135.15 70.51) (width 0.3) (layer B.Cu) (net 34) (status 30)) (segment (start 135.15 70.51) (end 135.39 70.27) (width 0.3) (layer B.Cu) (net 34) (tstamp 55A93B9C) (status 10)) (via (at 135.39 70.27) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 34)) (segment (start 135.39 70.27) (end 135.34 70.32) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93B9E)) (segment (start 135.34 70.32) (end 135.34 70.86) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93B9F)) (segment (start 135.12 73.62) (end 135.12 72.99) (width 0.3) (layer F.Cu) (net 34) (status 10)) (segment (start 135.12 72.99) (end 136.95 71.16) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93B84) (status 20)) (segment (start 136.95 71.16) (end 137.76 71.16) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93B85) (status 30)) (segment (start 134.7 70.86) (end 135.34 70.86) (width 0.3) (layer F.Cu) (net 34) (status 10)) (segment (start 135.34 70.86) (end 137.46 70.86) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93BA2) (status 20)) (segment (start 137.46 70.86) (end 137.76 71.16) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A93B48) (status 30)) (segment (start 136.19 71.11) (end 137.56 71.11) (width 0.3) (layer F.Cu) (net 34) (tstamp 55A40FE2) (status 30)) (segment (start 134.7 72.76) (end 134.7 72.66) (width 0.3) (layer F.Cu) (net 35) (status 30)) (segment (start 134.7 72.66) (end 135.07 72.29) (width 0.3) (layer F.Cu) (net 35) (tstamp 55A93B95) (status 10)) (via (at 135.07 72.29) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 35)) (segment (start 135.07 72.29) (end 134.96 72.18) (width 0.3) (layer B.Cu) (net 35) (tstamp 55A93B97)) (segment (start 134.96 72.18) (end 134.96 71.61) (width 0.3) (layer B.Cu) (net 35) (tstamp 55A93B98) (status 20)) (segment (start 127.87 96.88) (end 128 96.88) (width 0.3) (layer B.Cu) (net 36) (status 30)) (segment (start 128 96.88) (end 128.31 96.57) (width 0.3) (layer B.Cu) (net 36) (tstamp 55A7F6EB) (status 10)) (segment (start 128.03 96.85) (end 127.69 96.85) (width 0.3) (layer F.Cu) (net 36) (tstamp 55A7F6EE) (status 20)) (segment (start 128.31 96.57) (end 128.03 96.85) (width 0.3) (layer F.Cu) (net 36) (tstamp 55A7F6ED)) (via (at 128.31 96.57) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 36)) (segment (start 130.1 98.05) (end 129.66 98.05) (width 0.3) (layer B.Cu) (net 36)) (via (at 130.1 98.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 36)) (segment (start 130.35 97.8) (end 130.1 98.05) (width 0.3) (layer F.Cu) (net 36) (tstamp 559BF277)) (segment (start 134.85 97.3) (end 134.85 96.35) (width 0.3) (layer B.Cu) (net 36) (status 10)) (segment (start 134.7 96.9) (end 133.8 97.8) (width 0.3) (layer F.Cu) (net 36) (tstamp 559BF088)) (segment (start 134.7 96.2) (end 134.7 96.9) (width 0.3) (layer F.Cu) (net 36) (tstamp 559BF087)) (via (at 134.7 96.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 36)) (segment (start 134.85 96.35) (end 134.7 96.2) (width 0.3) (layer B.Cu) (net 36) (tstamp 559BF085)) (segment (start 133.8 97.8) (end 130.35 97.8) (width 0.3) (layer F.Cu) (net 36)) (segment (start 128.49 96.88) (end 127.87 96.88) (width 0.3) (layer B.Cu) (net 36) (tstamp 55A7F6E8) (status 20)) (segment (start 129.66 98.05) (end 128.49 96.88) (width 0.3) (layer B.Cu) (net 36) (tstamp 55A7F6E7)) (segment (start 119.976995 75.686995) (end 119.276802 75.686995) (width 0.15) (layer F.Cu) (net 37)) (via (at 119.276802 75.686995) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 37)) (segment (start 126.45 78.8) (end 126.126146 78.8) (width 0.15) (layer F.Cu) (net 37)) (segment (start 119.25 74.95) (end 119.25 75.660193) (width 0.15) (layer B.Cu) (net 37) (status 10)) (segment (start 126.126146 78.8) (end 126.026146 78.9) (width 0.15) (layer F.Cu) (net 37)) (segment (start 126.026146 78.9) (end 121.9 78.9) (width 0.15) (layer F.Cu) (net 37)) (segment (start 121.9 78.9) (end 120.57 77.57) (width 0.15) (layer F.Cu) (net 37)) (segment (start 120.57 77.57) (end 120.57 76.28) (width 0.15) (layer F.Cu) (net 37)) (segment (start 120.57 76.28) (end 119.976995 75.686995) (width 0.15) (layer F.Cu) (net 37)) (segment (start 119.25 75.660193) (end 119.276802 75.686995) (width 0.15) (layer B.Cu) (net 37)) (segment (start 126.45 79.1) (end 126.45 78.8) (width 0.15) (layer In2.Cu) (net 37) (tstamp 559ACC80)) (via (at 126.45 78.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 37)) (segment (start 130.3 79.65) (end 127 79.65) (width 0.15) (layer In2.Cu) (net 37)) (segment (start 130.7 80.05) (end 130.3 79.65) (width 0.15) (layer In2.Cu) (net 37) (tstamp 559ACB90)) (via (at 130.7 80.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 37)) (segment (start 131.04 80.39) (end 130.7 80.05) (width 0.15) (layer F.Cu) (net 37) (tstamp 559ACB86) (status 10)) (segment (start 127 79.65) (end 126.45 79.1) (width 0.15) (layer In2.Cu) (net 37) (tstamp 559ACC2C)) (segment (start 119.25 75.05) (end 119.25 74.95) (width 0.15) (layer B.Cu) (net 37) (status 30)) (segment (start 131.04 80.42) (end 131.04 80.39) (width 0.15) (layer F.Cu) (net 37) (status 30)) (segment (start 123.47 76.52) (end 123.47 76.05) (width 0.3) (layer B.Cu) (net 38) (status 10)) (segment (start 123.54 75.98) (end 123.55 75.98) (width 0.3) (layer F.Cu) (net 38) (tstamp 55A93CF3)) (segment (start 123.5 76.02) (end 123.54 75.98) (width 0.3) (layer F.Cu) (net 38) (tstamp 55A93CF2)) (via (at 123.5 76.02) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 38)) (segment (start 123.47 76.05) (end 123.5 76.02) (width 0.3) (layer B.Cu) (net 38) (tstamp 55A93CF0)) (segment (start 123.45 77.34) (end 123.45 76.54) (width 0.3) (layer B.Cu) (net 38) (status 30)) (segment (start 123.45 76.54) (end 123.47 76.52) (width 0.3) (layer B.Cu) (net 38) (tstamp 55A93CED) (status 30)) (segment (start 123.55 75.98) (end 123.55 75.2) (width 0.3) (layer F.Cu) (net 38) (tstamp 55A93CF6) (status 20)) (segment (start 132.73 72.74) (end 132.73 72.14) (width 0.3) (layer B.Cu) (net 39) (status 20)) (segment (start 132.73 72.14) (end 132.62 72.03) (width 0.3) (layer B.Cu) (net 39) (tstamp 55A93BD2) (status 30)) (segment (start 133.2 72.76) (end 132.75 72.76) (width 0.3) (layer F.Cu) (net 39) (status 10)) (segment (start 132.75 72.76) (end 132.73 72.74) (width 0.3) (layer F.Cu) (net 39) (tstamp 55A93BCF)) (segment (start 134.38 73.08) (end 134.05 73.08) (width 0.3) (layer B.Cu) (net 39) (status 10)) (via (at 132.73 72.74) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 39)) (segment (start 133.71 72.74) (end 132.73 72.74) (width 0.3) (layer B.Cu) (net 39) (tstamp 55A93BC9)) (segment (start 134.05 73.08) (end 133.71 72.74) (width 0.3) (layer B.Cu) (net 39) (tstamp 55A93BC8)) (segment (start 137.1 88.3) (end 140.3 88.3) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 139.9 80.875) (end 141.125 80.875) (width 0.15) (layer F.Cu) (net 40) (status 10)) (segment (start 141.125 80.875) (end 141.3 81.05) (width 0.15) (layer F.Cu) (net 40)) (via (at 141.3 81.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 40)) (segment (start 135.459788 87.25) (end 134.682785 88.027003) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 141.3 81.05) (end 142.15 81.9) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 134.647003 88.027003) (end 134.682785 88.027003) (width 0.15) (layer F.Cu) (net 40)) (segment (start 137.1 88.3) (end 136.75 87.95) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 141.7 83.8) (end 141.7 86.9) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 142.15 81.9) (end 142.15 83.35) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 142.15 83.35) (end 141.7 83.8) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 136.75 87.95) (end 136.75 87.35) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 136.75 87.35) (end 136.65 87.25) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 134.647003 88.027003) (end 134.24 87.62) (width 0.15) (layer F.Cu) (net 40) (status 20)) (via (at 134.682785 88.027003) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 40)) (segment (start 136.65 87.25) (end 135.459788 87.25) (width 0.15) (layer In2.Cu) (net 40)) (segment (start 140.3 88.3) (end 141.7 86.9) (width 0.15) (layer In2.Cu) (net 40) (tstamp 559BFB6F)) (segment (start 136.4 83.6) (end 136.42 83.58) (width 0.15) (layer F.Cu) (net 41)) (segment (start 135.950001 84.049999) (end 136.4 83.6) (width 0.15) (layer F.Cu) (net 41) (tstamp 559AD315)) (segment (start 132.64 84.42) (end 133.010001 84.049999) (width 0.15) (layer F.Cu) (net 41) (status 20)) (segment (start 133.010001 84.049999) (end 135.950001 84.049999) (width 0.15) (layer F.Cu) (net 41)) (segment (start 138.13 83.59) (end 138.13 83.61) (width 0.15) (layer B.Cu) (net 41) (tstamp 5640E7BE)) (via (at 138.13 83.61) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 41)) (segment (start 138.13 83.59) (end 138.5 83.22) (width 0.15) (layer B.Cu) (net 41)) (segment (start 138.1 83.58) (end 138.13 83.61) (width 0.15) (layer F.Cu) (net 41) (tstamp 5640E7C5)) (segment (start 136.42 83.58) (end 138.1 83.58) (width 0.15) (layer F.Cu) (net 41) (tstamp 5640E7C4)) (segment (start 139.9 81.525) (end 138.825 81.525) (width 0.15) (layer F.Cu) (net 41) (status 10)) (segment (start 138.825 81.525) (end 138.65 81.35) (width 0.15) (layer F.Cu) (net 41) (tstamp 559BFB5C)) (via (at 138.65 81.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 41)) (segment (start 138.65 81.35) (end 138.5 81.5) (width 0.15) (layer B.Cu) (net 41) (tstamp 559BFB5E)) (segment (start 138.5 81.5) (end 138.5 83.22) (width 0.15) (layer B.Cu) (net 41) (tstamp 559BFB5F)) (segment (start 138.5 83.22) (end 138.5 83.2) (width 0.15) (layer B.Cu) (net 41) (tstamp 5640E7BC)) (segment (start 132.64 84.42) (end 132.64 84.41) (width 0.15) (layer F.Cu) (net 41) (status 30)) (segment (start 139.9 82.175) (end 138.675 82.175) (width 0.15) (layer F.Cu) (net 42) (status 10)) (segment (start 138.675 82.175) (end 137.8 81.3) (width 0.15) (layer F.Cu) (net 42) (tstamp 559BFB62)) (segment (start 134.65 81.6) (end 134.65 83) (width 0.15) (layer F.Cu) (net 42)) (segment (start 133.82 83.2) (end 133.44 82.82) (width 0.15) (layer F.Cu) (net 42) (tstamp 5580C552) (status 20)) (segment (start 134.45 83.2) (end 133.82 83.2) (width 0.15) (layer F.Cu) (net 42) (tstamp 5580C551)) (segment (start 134.65 83) (end 134.45 83.2) (width 0.15) (layer F.Cu) (net 42) (tstamp 5580C550)) (segment (start 134.65 81.6) (end 135.1 81.15) (width 0.15) (layer In2.Cu) (net 42)) (segment (start 137.8 81.3) (end 136.5 81.3) (width 0.15) (layer In2.Cu) (net 42)) (via (at 137.8 81.3) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 42)) (segment (start 136.35 81.15) (end 136.5 81.3) (width 0.15) (layer In2.Cu) (net 42) (tstamp 5580C479)) (segment (start 135.1 81.15) (end 136.35 81.15) (width 0.15) (layer In2.Cu) (net 42) (tstamp 5580C478)) (via (at 134.65 81.6) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 42)) (segment (start 139.9 82.825) (end 138.675 82.825) (width 0.15) (layer F.Cu) (net 43) (status 10)) (segment (start 133.805415 80.844434) (end 133.805415 80.785415) (width 0.15) (layer F.Cu) (net 43)) (segment (start 133.44 80.42) (end 133.805415 80.785415) (width 0.15) (layer F.Cu) (net 43) (status 10)) (segment (start 136.5 80.65) (end 133.999849 80.65) (width 0.15) (layer In2.Cu) (net 43)) (segment (start 133.999849 80.65) (end 133.805415 80.844434) (width 0.15) (layer In2.Cu) (net 43)) (via (at 133.805415 80.844434) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 43)) (via (at 136.5 80.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 43)) (segment (start 138.675 82.825) (end 136.5 80.65) (width 0.15) (layer F.Cu) (net 43) (tstamp 559BFB3F)) (segment (start 136.017601 80.849999) (end 138.642602 83.475) (width 0.15) (layer F.Cu) (net 44)) (segment (start 134.610001 80.849999) (end 134.24 81.22) (width 0.15) (layer F.Cu) (net 44) (status 20)) (segment (start 136.017601 80.849999) (end 134.610001 80.849999) (width 0.15) (layer F.Cu) (net 44)) (segment (start 138.642602 83.475) (end 139.9 83.475) (width 0.15) (layer F.Cu) (net 44) (tstamp 559BFB46) (status 20)) (segment (start 139.9 86.725) (end 141.325 86.725) (width 0.15) (layer F.Cu) (net 45) (status 10)) (segment (start 141.55 83.55) (end 141.136313 83.136313) (width 0.15) (layer F.Cu) (net 45)) (segment (start 141.55 86.5) (end 141.55 83.55) (width 0.15) (layer F.Cu) (net 45)) (segment (start 141.136313 83.136313) (end 141.136313 81.963687) (width 0.15) (layer F.Cu) (net 45)) (segment (start 141.325 86.725) (end 141.55 86.5) (width 0.15) (layer F.Cu) (net 45)) (segment (start 136.242663 82.02) (end 136.408234 81.854429) (width 0.15) (layer F.Cu) (net 45)) (segment (start 136.242663 82.02) (end 135.84 82.02) (width 0.15) (layer F.Cu) (net 45) (status 20)) (via (at 136.408234 81.854429) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 45)) (segment (start 141.054429 81.854429) (end 136.408234 81.854429) (width 0.15) (layer In2.Cu) (net 45) (tstamp 559BFB94)) (segment (start 141.15 81.95) (end 141.054429 81.854429) (width 0.15) (layer In2.Cu) (net 45) (tstamp 559BFB93)) (via (at 141.15 81.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 45)) (segment (start 141.136313 81.963687) (end 141.15 81.95) (width 0.15) (layer F.Cu) (net 45) (tstamp 559BFB91)) (segment (start 139.9 87.375) (end 137.525 87.375) (width 0.15) (layer F.Cu) (net 46) (status 10)) (segment (start 134 88.5) (end 137.15 88.5) (width 0.15) (layer F.Cu) (net 46)) (segment (start 133.44 87.94) (end 134 88.5) (width 0.15) (layer F.Cu) (net 46)) (segment (start 133.44 87.94) (end 133.44 87.62) (width 0.15) (layer F.Cu) (net 46) (status 20)) (segment (start 137.5 87.35) (end 137.525 87.375) (width 0.15) (layer F.Cu) (net 46) (tstamp 559BFB85)) (via (at 137.5 87.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 46)) (segment (start 137.5 88.75) (end 137.5 87.35) (width 0.15) (layer B.Cu) (net 46) (tstamp 559BFB83)) (segment (start 137.45 88.8) (end 137.5 88.75) (width 0.15) (layer B.Cu) (net 46) (tstamp 559BFB82)) (via (at 137.45 88.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 46)) (segment (start 137.15 88.5) (end 137.45 88.8) (width 0.15) (layer F.Cu) (net 46) (tstamp 559BFB80)) (segment (start 139.9 88.025) (end 137.325 88.025) (width 0.15) (layer F.Cu) (net 47) (status 10)) (segment (start 133.845 87.225) (end 133.44 86.82) (width 0.15) (layer F.Cu) (net 47) (tstamp 559AB205) (status 20)) (segment (start 136.525 87.225) (end 133.845 87.225) (width 0.15) (layer F.Cu) (net 47)) (segment (start 137.325 88.025) (end 136.525 87.225) (width 0.15) (layer F.Cu) (net 47) (tstamp 559BFB7A)) (segment (start 134.9 79.5) (end 136.8 79.5) (width 0.15) (layer F.Cu) (net 48)) (segment (start 142.528999 88.421001) (end 142.528999 80.678999) (width 0.15) (layer In2.Cu) (net 48)) (segment (start 142.528999 80.678999) (end 142.35 80.5) (width 0.15) (layer In2.Cu) (net 48)) (segment (start 142.3 88.65) (end 142.528999 88.421001) (width 0.15) (layer In2.Cu) (net 48)) (segment (start 139.9 88.675) (end 141.175 88.675) (width 0.15) (layer F.Cu) (net 48) (status 10)) (segment (start 134.24 80.16) (end 134.24 80.42) (width 0.15) (layer F.Cu) (net 48) (tstamp 5580C185) (status 20)) (segment (start 134.9 79.5) (end 134.24 80.16) (width 0.15) (layer F.Cu) (net 48) (tstamp 5580C184)) (segment (start 142.35 80.5) (end 142.15 80.3) (width 0.15) (layer F.Cu) (net 48) (tstamp 5580C182)) (via (at 142.35 80.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 48)) (via (at 142.3 88.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 48)) (segment (start 141.2 88.65) (end 142.3 88.65) (width 0.15) (layer B.Cu) (net 48) (tstamp 5580C174)) (via (at 141.2 88.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 48)) (segment (start 141.175 88.675) (end 141.2 88.65) (width 0.15) (layer F.Cu) (net 48) (tstamp 5580C16D)) (segment (start 137.6 80.3) (end 142.15 80.3) (width 0.15) (layer F.Cu) (net 48) (tstamp 559BFBB1)) (segment (start 136.8 79.5) (end 137.6 80.3) (width 0.15) (layer F.Cu) (net 48) (tstamp 559BFBAF)) (segment (start 141.624408 82.885118) (end 141.085118 82.885118) (width 0.15) (layer In2.Cu) (net 49)) (via (at 141.624408 82.885118) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 49)) (segment (start 141.8 86.645992) (end 141.853407 86.592585) (width 0.15) (layer F.Cu) (net 49)) (segment (start 139.9 89.325) (end 141.325 89.325) (width 0.15) (layer F.Cu) (net 49) (status 10)) (segment (start 141.325 89.325) (end 141.8 88.85) (width 0.15) (layer F.Cu) (net 49)) (segment (start 141.853407 86.592585) (end 141.853407 83.114117) (width 0.15) (layer F.Cu) (net 49)) (segment (start 141.853407 83.114117) (end 141.624408 82.885118) (width 0.15) (layer F.Cu) (net 49)) (segment (start 141.8 88.85) (end 141.8 86.645992) (width 0.15) (layer F.Cu) (net 49)) (segment (start 135.4 82.4) (end 135.04 82.04) (width 0.15) (layer F.Cu) (net 49) (tstamp 5580C164) (status 20)) (segment (start 136.55 82.4) (end 135.4 82.4) (width 0.15) (layer F.Cu) (net 49) (tstamp 5580C163)) (segment (start 136.6 82.45) (end 136.55 82.4) (width 0.15) (layer F.Cu) (net 49) (tstamp 5580C162)) (via (at 136.6 82.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 49)) (segment (start 140.65 82.45) (end 136.6 82.45) (width 0.15) (layer In2.Cu) (net 49) (tstamp 559BFB98)) (segment (start 141.085118 82.885118) (end 140.65 82.45) (width 0.15) (layer In2.Cu) (net 49) (tstamp 559BFB97)) (segment (start 135.04 82.04) (end 135.04 82.02) (width 0.15) (layer F.Cu) (net 49) (tstamp 5580C165) (status 30)) (segment (start 147.1 88.025) (end 148.275 88.025) (width 0.15) (layer F.Cu) (net 50) (status 10)) (segment (start 149 88.15) (end 149.45 87.7) (width 0.15) (layer F.Cu) (net 50) (tstamp 559AA44C) (status 20)) (segment (start 148.4 88.15) (end 149 88.15) (width 0.15) (layer F.Cu) (net 50) (tstamp 559AA44B)) (segment (start 148.275 88.025) (end 148.4 88.15) (width 0.15) (layer F.Cu) (net 50) (tstamp 559AA44A)) (segment (start 148.7 87.55) (end 148.4 87.55) (width 0.15) (layer F.Cu) (net 51) (status 10)) (segment (start 148.225 87.375) (end 147.1 87.375) (width 0.15) (layer F.Cu) (net 51) (tstamp 559AA452) (status 20)) (segment (start 148.4 87.55) (end 148.225 87.375) (width 0.15) (layer F.Cu) (net 51) (tstamp 559AA451)) (segment (start 146.85 87.025) (end 146.025 87.025) (width 0.15) (layer B.Cu) (net 52) (status 10)) (segment (start 145.975 86.725) (end 147.1 86.725) (width 0.15) (layer F.Cu) (net 52) (tstamp 559AD8CF) (status 20)) (segment (start 145.85 86.85) (end 145.975 86.725) (width 0.15) (layer F.Cu) (net 52) (tstamp 559AD8CE)) (via (at 145.85 86.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 52)) (segment (start 146.025 87.025) (end 145.85 86.85) (width 0.15) (layer B.Cu) (net 52) (tstamp 559AD8CB)) (segment (start 145.15 86.64) (end 145.59 86.2) (width 0.15) (layer B.Cu) (net 53) (status 10)) (segment (start 145.59 86.2) (end 145.9 86.2) (width 0.15) (layer B.Cu) (net 53) (tstamp 559AD888)) (segment (start 147.1 86.075) (end 146.025 86.075) (width 0.15) (layer F.Cu) (net 53) (status 10)) (segment (start 146.7 85.8) (end 146.3 86.2) (width 0.15) (layer B.Cu) (net 53) (tstamp 559AD875)) (segment (start 146.7 85.8) (end 147 85.8) (width 0.15) (layer B.Cu) (net 53) (status 20)) (segment (start 145.9 86.2) (end 146.3 86.2) (width 0.15) (layer B.Cu) (net 53) (tstamp 559AD884)) (via (at 145.9 86.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 53)) (segment (start 146.025 86.075) (end 145.9 86.2) (width 0.15) (layer F.Cu) (net 53) (tstamp 559AD881)) (segment (start 123.75 72.05) (end 123.75 71.69) (width 0.3) (layer F.Cu) (net 54) (status 30)) (segment (start 123.75 71.69) (end 123.94 71.5) (width 0.3) (layer F.Cu) (net 54) (tstamp 55AA1F5E) (status 10)) (via (at 123.94 71.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 54)) (segment (start 123.94 71.5) (end 124.05 71.39) (width 0.3) (layer B.Cu) (net 54) (tstamp 55AA1F60)) (segment (start 124.05 71.39) (end 124.05 71.35) (width 0.3) (layer B.Cu) (net 54) (tstamp 55AA1F61) (status 20)) (segment (start 124.05 71.35) (end 124.05 71.05) (width 0.3) (layer B.Cu) (net 54) (tstamp 55AA1F63) (status 30)) (segment (start 120.15 74.95) (end 120.15 74.34) (width 0.15) (layer B.Cu) (net 55) (status 10)) (segment (start 119.85 74.46) (end 119.85 74.9) (width 0.15) (layer F.Cu) (net 55) (tstamp 559E9DE0) (status 20)) (segment (start 120.06 74.25) (end 119.85 74.46) (width 0.15) (layer F.Cu) (net 55) (tstamp 559E9DDF)) (via (at 120.06 74.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 55)) (segment (start 120.15 74.34) (end 120.06 74.25) (width 0.15) (layer B.Cu) (net 55) (tstamp 559E9DDD)) (segment (start 134.65 83.9) (end 134.65 84.79) (width 0.15) (layer B.Cu) (net 56) (status 10)) (via (at 134.66 84.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 56)) (segment (start 134.66 84.8) (end 135.04 85.18) (width 0.15) (layer F.Cu) (net 56) (tstamp 5585A485) (status 20)) (segment (start 134.65 84.79) (end 134.66 84.8) (width 0.15) (layer B.Cu) (net 56) (tstamp 559ACFAB)) (segment (start 135.04 85.22) (end 135.04 85.18) (width 0.15) (layer F.Cu) (net 56) (status 30)) (segment (start 137.5 83.15) (end 136.6 83.15) (width 0.15) (layer B.Cu) (net 57) (status 10)) (segment (start 136.27 82.82) (end 135.84 82.82) (width 0.15) (layer F.Cu) (net 57) (tstamp 559AD328) (status 20)) (segment (start 136.5 83.05) (end 136.27 82.82) (width 0.15) (layer F.Cu) (net 57) (tstamp 559AD327)) (via (at 136.5 83.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 57)) (segment (start 136.6 83.15) (end 136.5 83.05) (width 0.15) (layer B.Cu) (net 57) (tstamp 559AD325)) (segment (start 131.129216 92.25) (end 131.759216 91.62) (width 0.15) (layer B.Cu) (net 58)) (segment (start 123.75 84) (end 123.35 84.4) (width 0.15) (layer B.Cu) (net 58)) (segment (start 123.75 83.5) (end 123.75 84) (width 0.15) (layer B.Cu) (net 58)) (segment (start 123.35 91.65) (end 123.95 92.25) (width 0.15) (layer B.Cu) (net 58)) (segment (start 123.35 84.4) (end 123.35 91.65) (width 0.15) (layer B.Cu) (net 58)) (segment (start 123.95 92.25) (end 131.129216 92.25) (width 0.15) (layer B.Cu) (net 58)) (segment (start 124.25 83) (end 123.75 83.5) (width 0.15) (layer B.Cu) (net 58)) (via (at 132.398903 92.690276) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 58)) (segment (start 132.35 92.739179) (end 132.35 93.7) (width 0.15) (layer B.Cu) (net 58) (status 20)) (segment (start 132.35 92.739179) (end 132.398903 92.690276) (width 0.15) (layer B.Cu) (net 58)) (segment (start 132.398903 91.958903) (end 132.398903 92.690276) (width 0.15) (layer F.Cu) (net 58)) (segment (start 132.06 91.62) (end 132.398903 91.958903) (width 0.15) (layer F.Cu) (net 58) (tstamp 559D5CCB)) (segment (start 131.77 91.62) (end 132.06 91.62) (width 0.15) (layer F.Cu) (net 58) (tstamp 559D5CCA)) (via (at 131.77 91.62) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 58)) (segment (start 131.759216 91.62) (end 131.77 91.62) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5CC8)) (segment (start 134.11 77.59) (end 134.5 77.98) (width 0.15) (layer F.Cu) (net 58) (status 20)) (segment (start 134.5 77.98) (end 134.5 78.25) (width 0.15) (layer F.Cu) (net 58) (tstamp 559EA174) (status 30)) (segment (start 124.25 82.89) (end 124.25 83) (width 0.15) (layer B.Cu) (net 58)) (segment (start 119.3 79.79) (end 120.96 81.45) (width 0.15) (layer F.Cu) (net 58) (status 10)) (segment (start 123.77 82.89) (end 124.25 82.89) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C84)) (segment (start 123.74 82.86) (end 123.77 82.89) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C83)) (via (at 123.74 82.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 58)) (segment (start 121.8 82.86) (end 123.74 82.86) (width 0.15) (layer F.Cu) (net 58) (tstamp 559D5C7E)) (segment (start 120.96 82.02) (end 121.8 82.86) (width 0.15) (layer F.Cu) (net 58) (tstamp 559D5C7D)) (segment (start 120.96 81.45) (end 120.96 82.02) (width 0.15) (layer F.Cu) (net 58) (tstamp 559D5C7B)) (segment (start 128 78.45) (end 127.5 78.45) (width 0.15) (layer B.Cu) (net 58) (tstamp 559BF3C5)) (segment (start 124.25 82.89) (end 124.25 81.7) (width 0.15) (layer B.Cu) (net 58)) (segment (start 124.25 81.7) (end 127.5 78.45) (width 0.15) (layer B.Cu) (net 58) (tstamp 559BF3DE)) (segment (start 128.82 77.63) (end 128 78.45) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C78)) (via (at 134.11 77.59) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 58)) (segment (start 134.11 77.59) (end 128.86 77.59) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C74)) (segment (start 128.86 77.59) (end 128.86 77.61) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C75)) (segment (start 128.86 77.61) (end 128.82 77.65) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C76)) (segment (start 128.82 77.65) (end 128.82 77.63) (width 0.15) (layer B.Cu) (net 58) (tstamp 559D5C77)) (segment (start 119.3 79.79) (end 119.39 79.7) (width 0.15) (layer F.Cu) (net 58) (status 30)) (segment (start 119.44 79.65) (end 119.3 79.79) (width 0.15) (layer F.Cu) (net 58) (tstamp 559ACEC2) (status 30)) (segment (start 135.4 78.25) (end 136.025 78.875) (width 0.15) (layer F.Cu) (net 59) (status 10)) (segment (start 135.7 81.35) (end 135.45 81.6) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA18A)) (segment (start 136.45 81.35) (end 135.7 81.35) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA189)) (segment (start 136.975 80.825) (end 136.45 81.35) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA188)) (segment (start 136.975 80.225) (end 136.975 80.825) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA185)) (segment (start 136.575 79.825) (end 136.975 80.225) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA182)) (segment (start 136.575 78.875) (end 136.575 79.825) (width 0.15) (layer B.Cu) (net 59) (tstamp 559EA181)) (via (at 136.575 78.875) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 59)) (segment (start 136.025 78.875) (end 136.575 78.875) (width 0.15) (layer F.Cu) (net 59) (tstamp 559EA177)) (segment (start 135.83 81.22) (end 135.45 81.6) (width 0.15) (layer F.Cu) (net 59) (tstamp 5580C46B) (status 10)) (via (at 135.45 81.6) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 59)) (segment (start 135.84 81.22) (end 135.83 81.22) (width 0.15) (layer F.Cu) (net 59) (status 30)) (segment (start 136.73 84.78) (end 137.19 84.32) (width 0.15) (layer B.Cu) (net 60)) (segment (start 137.19 84.32) (end 137.37 84.32) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E7AF)) (segment (start 137.25 85.54) (end 137.25 86.33) (width 0.15) (layer B.Cu) (net 60)) (segment (start 136.73 85.03) (end 137.24 85.54) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E78F)) (segment (start 137.24 85.54) (end 137.25 85.54) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E790)) (segment (start 136.73 84.8) (end 136.73 84.78) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E785)) (segment (start 136.73 84.78) (end 136.73 84.93) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E7AD)) (segment (start 136.73 84.93) (end 136.73 85.03) (width 0.15) (layer B.Cu) (net 60)) (segment (start 134.24 87.77) (end 134.24 89) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A5)) (segment (start 135.1 86.91) (end 134.24 87.77) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A4)) (segment (start 135.53 86.91) (end 135.1 86.91) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A3)) (segment (start 136.21 86.23) (end 135.53 86.91) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A2)) (segment (start 137.15 86.23) (end 136.21 86.23) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A1)) (segment (start 137.51 86.59) (end 137.15 86.23) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A0)) (via (at 137.51 86.59) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 60)) (segment (start 137.25 86.33) (end 137.51 86.59) (width 0.15) (layer B.Cu) (net 60) (tstamp 5640E79E)) (segment (start 137.37 84.32) (end 137.21 84.32) (width 0.15) (layer B.Cu) (net 60)) (segment (start 122.234016 83.819992) (end 122.465984 83.819992) (width 0.15) (layer F.Cu) (net 60)) (segment (start 122.495992 83.85) (end 125.8 83.85) (width 0.15) (layer F.Cu) (net 60)) (segment (start 126.25 84.4) (end 126.65 84.8) (width 0.15) (layer F.Cu) (net 60)) (segment (start 127.691001 88.141001) (end 127.92 88.37) (width 0.15) (layer F.Cu) (net 60)) (segment (start 127.691001 88.065008) (end 127.691001 88.141001) (width 0.15) (layer F.Cu) (net 60)) (segment (start 122.465984 83.819992) (end 122.495992 83.85) (width 0.15) (layer F.Cu) (net 60)) (segment (start 121.184008 84.87) (end 122.234016 83.819992) (width 0.15) (layer F.Cu) (net 60)) (segment (start 126.25 84.3) (end 126.25 84.4) (width 0.15) (layer F.Cu) (net 60)) (segment (start 126.65 84.8) (end 126.65 87.024007) (width 0.15) (layer F.Cu) (net 60)) (segment (start 125.8 83.85) (end 126.25 84.3) (width 0.15) (layer F.Cu) (net 60)) (segment (start 126.65 87.024007) (end 127.691001 88.065008) (width 0.15) (layer F.Cu) (net 60)) (segment (start 119.3 84.87) (end 121.184008 84.87) (width 0.15) (layer F.Cu) (net 60) (status 10)) (via (at 127.92 88.37) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 60)) (segment (start 127.92 88.37) (end 128.33 88.37) (width 0.15) (layer B.Cu) (net 60)) (segment (start 128.33 88.37) (end 130.16 90.2) (width 0.15) (layer B.Cu) (net 60) (tstamp 559D6E59)) (segment (start 130.16 90.2) (end 132 90.2) (width 0.15) (layer B.Cu) (net 60) (tstamp 559D6E5A)) (segment (start 132 90.2) (end 132.3 89.9) (width 0.15) (layer B.Cu) (net 60) (tstamp 559BF125)) (segment (start 132.56001 91.324018) (end 132.3 91.064008) (width 0.15) (layer B.Cu) (net 60)) (segment (start 131.85 93.7) (end 131.85 92.575993) (width 0.15) (layer B.Cu) (net 60) (status 10)) (segment (start 131.85 92.575993) (end 132.56001 91.865983) (width 0.15) (layer B.Cu) (net 60)) (segment (start 132.56001 91.865983) (end 132.56001 91.324018) (width 0.15) (layer B.Cu) (net 60)) (segment (start 132.3 91.064008) (end 132.3 89.9) (width 0.15) (layer B.Cu) (net 60)) (segment (start 133.2 89) (end 132.75 89.45) (width 0.15) (layer In2.Cu) (net 60) (tstamp 559AD4D9)) (segment (start 134.24 89) (end 133.2 89) (width 0.15) (layer In2.Cu) (net 60) (tstamp 5640E7A9)) (segment (start 132.75 89.45) (end 132.3 89.9) (width 0.15) (layer B.Cu) (net 60) (tstamp 559AD4DB)) (via (at 132.75 89.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 60)) (segment (start 134.5 89) (end 134.24 89) (width 0.15) (layer In2.Cu) (net 60)) (segment (start 135.45 88.05) (end 135.04 87.64) (width 0.15) (layer F.Cu) (net 60) (tstamp 559ACEEB) (status 20)) (via (at 135.45 88.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 60)) (segment (start 135.45 88.05) (end 134.5 89) (width 0.15) (layer In2.Cu) (net 60)) (segment (start 135.04 87.62) (end 135.04 87.64) (width 0.15) (layer F.Cu) (net 60) (status 30)) (segment (start 134.35 89.1) (end 134.35 91.05) (width 0.15) (layer B.Cu) (net 61)) (segment (start 134.35 91.05) (end 133.35 92.05) (width 0.15) (layer B.Cu) (net 61)) (segment (start 133.35 93.7) (end 133.35 92.05) (width 0.15) (layer B.Cu) (net 61) (status 10)) (segment (start 133.6 87.1) (end 133.6 88.35) (width 0.15) (layer B.Cu) (net 61)) (segment (start 133.6 88.35) (end 134.35 89.1) (width 0.15) (layer B.Cu) (net 61)) (segment (start 133.05 86.4) (end 133.05 86.55) (width 0.15) (layer B.Cu) (net 61)) (segment (start 133.05 86.55) (end 133.6 87.1) (width 0.15) (layer B.Cu) (net 61)) (via (at 133.05 86.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 61)) (segment (start 133.05 85.61) (end 133.05 86.4) (width 0.15) (layer F.Cu) (net 61) (tstamp 559AD45A)) (segment (start 133.44 85.22) (end 133.05 85.61) (width 0.15) (layer F.Cu) (net 61) (status 10)) (segment (start 136.9 86.1) (end 136.9 86.82) (width 0.15) (layer F.Cu) (net 62)) (segment (start 136.4 85.6) (end 136.9 86.1) (width 0.15) (layer F.Cu) (net 62) (tstamp 559AD399)) (segment (start 134.18 84.42) (end 133.85 84.75) (width 0.15) (layer F.Cu) (net 62) (tstamp 559AD375) (status 10)) (segment (start 133.85 84.75) (end 133.85 85.45) (width 0.15) (layer F.Cu) (net 62) (tstamp 559AD378)) (segment (start 133.85 85.45) (end 134 85.6) (width 0.15) (layer F.Cu) (net 62) (tstamp 559AD379)) (segment (start 134 85.6) (end 136.4 85.6) (width 0.15) (layer F.Cu) (net 62)) (segment (start 136.9 89.35) (end 137.45 89.9) (width 0.15) (layer B.Cu) (net 62) (tstamp 559AD3A1)) (via (at 137.45 89.9) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 62)) (segment (start 135.45 91.16) (end 135.67 90.94) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5E55)) (segment (start 135.67 90.94) (end 136.91 90.94) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5E56)) (segment (start 136.91 90.94) (end 137.21 90.64) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5E57)) (segment (start 137.21 90.64) (end 137.21 90.14) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5E58)) (segment (start 137.21 90.14) (end 137.45 89.9) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5E59)) (segment (start 133.9 92.4) (end 133.91 92.39) (width 0.15) (layer F.Cu) (net 62)) (via (at 133.9 92.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 62)) (segment (start 133.9 92.4) (end 133.85 92.45) (width 0.15) (layer B.Cu) (net 62) (tstamp 559AD3BE)) (segment (start 133.85 92.45) (end 133.85 93.7) (width 0.15) (layer B.Cu) (net 62) (tstamp 559AD3BF) (status 20)) (segment (start 133.91 91.43) (end 134.18 91.16) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5D06)) (segment (start 133.91 92.39) (end 133.91 91.43) (width 0.15) (layer F.Cu) (net 62) (tstamp 559D5D05)) (segment (start 134.18 91.16) (end 135.45 91.16) (width 0.15) (layer F.Cu) (net 62)) (segment (start 136.9 86.94) (end 136.9 89.35) (width 0.15) (layer B.Cu) (net 62) (tstamp 5640E79A)) (segment (start 136.96 86.88) (end 136.9 86.94) (width 0.15) (layer B.Cu) (net 62) (tstamp 5640E799)) (via (at 136.96 86.88) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 62)) (segment (start 136.9 86.82) (end 136.96 86.88) (width 0.15) (layer F.Cu) (net 62) (tstamp 5640E797)) (segment (start 134.24 84.42) (end 134.18 84.42) (width 0.15) (layer F.Cu) (net 62) (status 30)) (segment (start 136.6 84.5) (end 137.57 84.5) (width 0.15) (layer F.Cu) (net 63)) (segment (start 136.3 84.8) (end 136.6 84.5) (width 0.15) (layer F.Cu) (net 63) (tstamp 559AD33C)) (segment (start 135.5 84.8) (end 136.3 84.8) (width 0.15) (layer F.Cu) (net 63) (tstamp 559AD33B)) (segment (start 135.12 84.42) (end 135.5 84.8) (width 0.15) (layer F.Cu) (net 63) (tstamp 559AD33A) (status 20)) (segment (start 138.06 89.21) (end 137.9 89.37) (width 0.15) (layer B.Cu) (net 63) (tstamp 5640E9BC)) (segment (start 138.06 86.93) (end 138.06 89.21) (width 0.15) (layer B.Cu) (net 63) (tstamp 5640E9BB)) (via (at 138.06 86.93) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 63)) (segment (start 138.06 86.48) (end 138.06 86.93) (width 0.15) (layer F.Cu) (net 63) (tstamp 5640E9B9)) (segment (start 137.82 86.24) (end 138.06 86.48) (width 0.15) (layer F.Cu) (net 63) (tstamp 5640E9B8)) (segment (start 137.82 84.75) (end 137.82 86.24) (width 0.15) (layer F.Cu) (net 63) (tstamp 5640E9B7)) (segment (start 137.57 84.5) (end 137.82 84.75) (width 0.15) (layer F.Cu) (net 63) (tstamp 5640E9B6)) (segment (start 137.96 89.31) (end 137.9 89.37) (width 0.15) (layer B.Cu) (net 63) (tstamp 5640E7D9)) (segment (start 134.4 91.8) (end 134.9 91.3) (width 0.15) (layer In2.Cu) (net 63)) (segment (start 134.35 93.7) (end 134.35 91.85) (width 0.15) (layer B.Cu) (net 63) (tstamp 559AD3B7) (status 10)) (segment (start 134.4 91.8) (end 134.35 91.85) (width 0.15) (layer B.Cu) (net 63) (tstamp 559AD3B6)) (via (at 134.4 91.8) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 63)) (segment (start 136.07 90.16) (end 136.86 89.37) (width 0.15) (layer In2.Cu) (net 63) (tstamp 559D5E41)) (segment (start 136.07 90.69) (end 136.07 90.16) (width 0.15) (layer In2.Cu) (net 63) (tstamp 559D5E3F)) (segment (start 135.46 91.3) (end 136.07 90.69) (width 0.15) (layer In2.Cu) (net 63) (tstamp 559D5E3E)) (segment (start 134.9 91.3) (end 135.46 91.3) (width 0.15) (layer In2.Cu) (net 63) (tstamp 559D5E3D)) (via (at 137.9 89.37) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 63)) (segment (start 136.86 89.37) (end 137.9 89.37) (width 0.15) (layer In2.Cu) (net 63) (tstamp 559D5E42)) (segment (start 137.9 89.37) (end 138.01 89.26) (width 0.15) (layer B.Cu) (net 63) (tstamp 559D5E45)) (segment (start 135.04 84.42) (end 135.12 84.42) (width 0.15) (layer F.Cu) (net 63) (status 30)) (segment (start 135.7 89.658015) (end 135.7 91.8) (width 0.15) (layer B.Cu) (net 64)) (segment (start 135.35 92.15) (end 135.35 93.7) (width 0.15) (layer B.Cu) (net 64) (status 20)) (segment (start 134.210018 86.918032) (end 134.210018 88.168033) (width 0.15) (layer B.Cu) (net 64)) (segment (start 133.994999 86.703013) (end 134.210018 86.918032) (width 0.15) (layer B.Cu) (net 64)) (segment (start 135.7 91.8) (end 135.35 92.15) (width 0.15) (layer B.Cu) (net 64)) (segment (start 134.210018 88.168033) (end 135.7 89.658015) (width 0.15) (layer B.Cu) (net 64)) (segment (start 133.994999 84.994999) (end 133.994999 86.703013) (width 0.15) (layer B.Cu) (net 64)) (segment (start 133.1 84.1) (end 133.994999 84.994999) (width 0.15) (layer B.Cu) (net 64)) (segment (start 133.1 83.25) (end 133.1 84.1) (width 0.15) (layer B.Cu) (net 64)) (segment (start 133.44 83.59) (end 133.1 83.25) (width 0.15) (layer F.Cu) (net 64) (tstamp 559ABB38) (status 10)) (via (at 133.1 83.25) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 64)) (segment (start 133.44 83.62) (end 133.44 83.59) (width 0.15) (layer F.Cu) (net 64) (status 30)) (segment (start 134.7 91.2) (end 134.85 91.35) (width 0.15) (layer B.Cu) (net 65)) (segment (start 134.7 89.845993) (end 134.7 91.2) (width 0.15) (layer B.Cu) (net 65)) (segment (start 134.73001 89.084017) (end 134.73001 89.815983) (width 0.15) (layer B.Cu) (net 65)) (segment (start 134.85 91.35) (end 134.85 93.7) (width 0.15) (layer B.Cu) (net 65) (status 20)) (segment (start 133.930008 88.284016) (end 134.73001 89.084017) (width 0.15) (layer B.Cu) (net 65)) (segment (start 133.930008 87.034015) (end 133.930008 88.284016) (width 0.15) (layer B.Cu) (net 65)) (segment (start 133.55 86.654007) (end 133.930008 87.034015) (width 0.15) (layer B.Cu) (net 65)) (segment (start 134.73001 89.815983) (end 134.7 89.845993) (width 0.15) (layer B.Cu) (net 65)) (segment (start 133.55 85.2) (end 133.55 86.654007) (width 0.15) (layer B.Cu) (net 65)) (segment (start 132.55 84.2) (end 133.55 85.2) (width 0.15) (layer B.Cu) (net 65)) (segment (start 132.55 82.9) (end 132.55 84.2) (width 0.15) (layer B.Cu) (net 65)) (segment (start 133 82.45) (end 132.55 82.9) (width 0.15) (layer B.Cu) (net 65) (tstamp 559ABBC8)) (via (at 133 82.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 65)) (segment (start 132.64 82.81) (end 133 82.45) (width 0.15) (layer F.Cu) (net 65) (tstamp 559ABBC6) (status 10)) (segment (start 132.64 82.82) (end 132.64 82.81) (width 0.15) (layer F.Cu) (net 65) (status 30)) (segment (start 133.35 98.35) (end 133.35 97.3) (width 0.15) (layer B.Cu) (net 66) (tstamp 559BF049) (status 20)) (segment (start 134.15 99.15) (end 139.45 99.15) (width 0.15) (layer B.Cu) (net 66)) (segment (start 134.15 99.15) (end 133.35 98.35) (width 0.15) (layer B.Cu) (net 66) (tstamp 559BF047)) (segment (start 139.45 99.15) (end 139.7 98.9) (width 0.15) (layer B.Cu) (net 66) (tstamp 559BFB04) (status 20)) (segment (start 132.85 97.3) (end 132.85 98.3) (width 0.15) (layer B.Cu) (net 67) (status 10)) (segment (start 134 99.45) (end 139.35 99.45) (width 0.15) (layer B.Cu) (net 67)) (segment (start 132.85 98.3) (end 134 99.45) (width 0.15) (layer B.Cu) (net 67) (tstamp 559BF04E)) (segment (start 139.35 99.45) (end 139.7 99.8) (width 0.15) (layer B.Cu) (net 67) (tstamp 559BFB09) (status 20)) (segment (start 142.16 91.6) (end 142.16 92.9175) (width 0.15) (layer F.Cu) (net 68) (status 30)) (segment (start 142.16 92.9175) (end 142.32 93.0775) (width 0.15) (layer F.Cu) (net 68) (tstamp 55995E7B) (status 30)) (segment (start 140.82 92.58) (end 140.14 92.58) (width 0.15) (layer F.Cu) (net 68) (status 30)) (segment (start 140.14 92.58) (end 140.03 92.47) (width 0.15) (layer F.Cu) (net 68) (tstamp 55995E6C) (status 30)) (segment (start 142.32 93.0775) (end 141.5675 93.0775) (width 0.15) (layer F.Cu) (net 68) (status 10)) (segment (start 141.5675 93.0775) (end 141.07 92.58) (width 0.15) (layer F.Cu) (net 68) (tstamp 55995E56) (status 20)) (segment (start 141.07 92.58) (end 140.82 92.58) (width 0.15) (layer F.Cu) (net 68) (tstamp 55995E57) (status 30)) (segment (start 149.02 93.46) (end 149.02 94.36) (width 0.15) (layer B.Cu) (net 69) (status 20)) (segment (start 149.02 94.36) (end 148.99 94.39) (width 0.15) (layer B.Cu) (net 69) (tstamp 55995DD7) (status 30)) (segment (start 148.86 93.04) (end 148.86 93.3) (width 0.15) (layer B.Cu) (net 69) (status 10)) (segment (start 148.6375 93.0775) (end 147.52 93.0775) (width 0.15) (layer F.Cu) (net 69) (tstamp 55995DC5) (status 20)) (segment (start 149.02 93.46) (end 148.6375 93.0775) (width 0.15) (layer F.Cu) (net 69) (tstamp 55995DC4)) (via (at 149.02 93.46) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 69)) (segment (start 148.86 93.3) (end 149.02 93.46) (width 0.15) (layer B.Cu) (net 69) (tstamp 55995DC2)) (segment (start 147.89 94.39) (end 147.89 94.2) (width 0.15) (layer B.Cu) (net 70) (status 30)) (segment (start 147.89 94.2) (end 148.37 93.72) (width 0.15) (layer B.Cu) (net 70) (tstamp 55995DDA) (status 10)) (segment (start 147.52 93.7125) (end 148.3625 93.7125) (width 0.15) (layer F.Cu) (net 70) (status 10)) (segment (start 148.37 93.72) (end 147.95 93.3) (width 0.15) (layer B.Cu) (net 70) (tstamp 55995DBE) (status 20)) (via (at 148.37 93.72) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 70)) (segment (start 148.3625 93.7125) (end 148.37 93.72) (width 0.15) (layer F.Cu) (net 70) (tstamp 55995DBC)) (segment (start 147.95 93.3) (end 147.95 93.11) (width 0.15) (layer B.Cu) (net 70) (tstamp 55995DBF) (status 30)) (segment (start 147.52 96.8875) (end 146.6625 96.8875) (width 0.15) (layer F.Cu) (net 71) (status 10)) (segment (start 146.55 97) (end 147.15 97.6) (width 0.15) (layer B.Cu) (net 71) (tstamp 559AD8C3) (status 20)) (via (at 146.55 97) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 71)) (segment (start 146.6625 96.8875) (end 146.55 97) (width 0.15) (layer F.Cu) (net 71) (tstamp 559AD8C1)) (segment (start 147.15 97.6) (end 147.15 97.65) (width 0.15) (layer B.Cu) (net 71) (tstamp 559AD8C4) (status 30)) (segment (start 147.15 97.65) (end 148.76 97.65) (width 0.15) (layer B.Cu) (net 71) (status 30)) (segment (start 148.76 97.65) (end 148.86 97.55) (width 0.15) (layer B.Cu) (net 71) (tstamp 55997962) (status 30)) (segment (start 148.86 97.55) (end 148.86 97.61) (width 0.15) (layer B.Cu) (net 71) (status 30)) (segment (start 146.87 82.17) (end 146.78 82.17) (width 0.15) (layer B.Cu) (net 72) (status 30)) (segment (start 146.78 82.17) (end 145.9 83.05) (width 0.15) (layer B.Cu) (net 72) (tstamp 559AB080) (status 10)) (segment (start 147.1 82.825) (end 147.085 82.84) (width 0.15) (layer F.Cu) (net 72) (status 30)) (segment (start 147.085 82.84) (end 146.11 82.84) (width 0.15) (layer F.Cu) (net 72) (tstamp 55996057) (status 10)) (segment (start 146.11 82.84) (end 145.9 83.05) (width 0.15) (layer F.Cu) (net 72) (tstamp 55996058)) (via (at 145.9 83.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 72)) (segment (start 145.9 83.05) (end 145.9 83.52) (width 0.15) (layer B.Cu) (net 72) (tstamp 5599605A) (status 20)) (segment (start 145.9 83.52) (end 146.04 83.66) (width 0.15) (layer B.Cu) (net 72) (tstamp 5599605B) (status 30)) (segment (start 140.45 98.4) (end 140.45 94.1) (width 0.15) (layer B.Cu) (net 73)) (via (at 140.5 94.05) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 73)) (segment (start 140.45 94.1) (end 140.5 94.05) (width 0.15) (layer B.Cu) (net 73) (tstamp 559AA25C)) (segment (start 140.6 98.9) (end 140.6 98.55) (width 0.15) (layer B.Cu) (net 73) (status 10)) (segment (start 140.82 93.73) (end 140.82 93.48) (width 0.15) (layer F.Cu) (net 73) (tstamp 559AA25F) (status 20)) (segment (start 140.5 94.05) (end 140.82 93.73) (width 0.15) (layer F.Cu) (net 73) (tstamp 559AA25E)) (segment (start 140.6 98.55) (end 140.45 98.4) (width 0.15) (layer B.Cu) (net 73) (tstamp 559BFB0C)) (segment (start 140.03 93.57) (end 140.73 93.57) (width 0.15) (layer F.Cu) (net 73) (status 30)) (segment (start 140.73 93.57) (end 140.82 93.48) (width 0.15) (layer F.Cu) (net 73) (tstamp 55995E69) (status 30)) (segment (start 142.32 93.7125) (end 141.0525 93.7125) (width 0.15) (layer F.Cu) (net 73) (status 10)) (segment (start 141.0525 93.7125) (end 140.82 93.48) (width 0.15) (layer F.Cu) (net 73) (tstamp 55995E5A) (status 20)) (segment (start 147.55 99.9) (end 146.3 99.9) (width 0.15) (layer F.Cu) (net 74) (status 10)) (segment (start 144.85 93.45) (end 144.85 97.35) (width 0.15) (layer F.Cu) (net 74)) (segment (start 144.16 92.76) (end 144.85 93.45) (width 0.15) (layer F.Cu) (net 74) (tstamp 559979E5)) (segment (start 144.16 92.76) (end 144.16 91.6) (width 0.15) (layer F.Cu) (net 74) (status 20)) (segment (start 145.4 97.9) (end 145.55 97.9) (width 0.15) (layer F.Cu) (net 74) (tstamp 55997A08)) (segment (start 144.85 97.35) (end 145.4 97.9) (width 0.15) (layer F.Cu) (net 74) (tstamp 55997A06)) (segment (start 146.1 98.45) (end 145.55 97.9) (width 0.15) (layer F.Cu) (net 74) (tstamp 559BFABF)) (segment (start 146.1 99.7) (end 146.1 98.45) (width 0.15) (layer F.Cu) (net 74) (tstamp 559BFABE)) (segment (start 146.3 99.9) (end 146.1 99.7) (width 0.15) (layer F.Cu) (net 74) (tstamp 559BFABD)) (segment (start 146.85 91.125) (end 147.485 91.76) (width 0.15) (layer F.Cu) (net 75)) (segment (start 147.485 91.76) (end 147.68 91.76) (width 0.15) (layer F.Cu) (net 75) (tstamp 55AA2944)) (segment (start 146.95 91.2) (end 146.925 91.2) (width 0.15) (layer B.Cu) (net 75)) (segment (start 146.4 91.125) (end 144.825 92.7) (width 0.15) (layer In2.Cu) (net 75) (tstamp 55A41CB1)) (via (at 144.825 92.7) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 75)) (segment (start 144.825 92.7) (end 144.625 92.9) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A41CB5)) (segment (start 144.625 92.9) (end 144.4 92.9) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A41CB6)) (segment (start 146.85 91.125) (end 146.4 91.125) (width 0.15) (layer In2.Cu) (net 75) (tstamp 55A41CC6)) (via (at 146.85 91.125) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 75)) (segment (start 146.925 91.2) (end 146.85 91.125) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A41CC4)) (segment (start 147.95 92.21) (end 147.95 92.2) (width 0.15) (layer B.Cu) (net 75) (status 30)) (segment (start 147.95 92.2) (end 146.95 91.2) (width 0.15) (layer B.Cu) (net 75) (tstamp 55A41CAA) (status 10)) (segment (start 147.51 91.76) (end 147.68 91.76) (width 0.15) (layer F.Cu) (net 75) (tstamp 55A41CAE) (status 30)) (segment (start 143.75 92.6) (end 144.1 92.6) (width 0.15) (layer B.Cu) (net 75) (status 10)) (segment (start 144.1 92.6) (end 144.4 92.9) (width 0.15) (layer B.Cu) (net 75) (tstamp 55997A32)) (segment (start 144.4 94.46) (end 144.15 94.71) (width 0.15) (layer B.Cu) (net 75) (tstamp 55997A34)) (segment (start 144.4 92.9) (end 144.4 94.46) (width 0.15) (layer B.Cu) (net 75) (tstamp 55997A33)) (segment (start 143.72 94.71) (end 144.15 94.71) (width 0.15) (layer B.Cu) (net 75) (status 10)) (segment (start 149.46 95.64) (end 149.46 95.09) (width 0.15) (layer F.Cu) (net 75) (status 10)) (segment (start 149.38 92.14) (end 148.86 92.14) (width 0.15) (layer B.Cu) (net 75) (tstamp 55995F85) (status 20)) (segment (start 149.44 92.2) (end 149.38 92.14) (width 0.15) (layer B.Cu) (net 75) (tstamp 55995F84)) (via (at 149.44 92.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 75)) (segment (start 149.54 92.3) (end 149.44 92.2) (width 0.15) (layer F.Cu) (net 75) (tstamp 55995F82)) (segment (start 149.54 95.01) (end 149.54 92.3) (width 0.15) (layer F.Cu) (net 75) (tstamp 55995F81)) (segment (start 149.46 95.09) (end 149.54 95.01) (width 0.15) (layer F.Cu) (net 75) (tstamp 55995F80)) (segment (start 147.68 91.76) (end 147.68 91.86) (width 0.15) (layer F.Cu) (net 75) (status 30)) (segment (start 148.86 92.14) (end 148.02 92.14) (width 0.15) (layer B.Cu) (net 75) (status 30)) (segment (start 148.02 92.14) (end 147.95 92.21) (width 0.15) (layer B.Cu) (net 75) (tstamp 55995DC8) (status 30)) (segment (start 148.87 97.56) (end 148.87 97.63) (width 0.15) (layer F.Cu) (net 76) (status 30)) (segment (start 148.87 97.63) (end 148.35 98.15) (width 0.15) (layer F.Cu) (net 76) (tstamp 559BFC73) (status 10)) (segment (start 148.25 98.25) (end 148.35 98.15) (width 0.15) (layer B.Cu) (net 76) (tstamp 559AD8B9)) (via (at 148.35 98.15) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 76)) (segment (start 142.55 97.65) (end 143.15 98.25) (width 0.15) (layer B.Cu) (net 76) (status 10)) (segment (start 143.15 98.25) (end 148.25 98.25) (width 0.15) (layer B.Cu) (net 76) (tstamp 559AD896)) (segment (start 140.65 97.1) (end 141.2 97.1) (width 0.15) (layer F.Cu) (net 76) (status 30)) (segment (start 141.2 97.1) (end 141.3 97) (width 0.15) (layer F.Cu) (net 76) (tstamp 559BFC6F) (status 30)) (segment (start 142.32 96.8875) (end 141.4125 96.8875) (width 0.15) (layer F.Cu) (net 76) (status 30)) (segment (start 141.4125 96.8875) (end 141.3 97) (width 0.15) (layer F.Cu) (net 76) (tstamp 559BFC6C) (status 30)) (segment (start 142.55 97.65) (end 141.3 97.65) (width 0.15) (layer B.Cu) (net 76) (status 10)) (segment (start 141.14 97.49) (end 141.14 97.11) (width 0.15) (layer F.Cu) (net 76) (tstamp 55997968) (status 20)) (segment (start 141.3 97.65) (end 141.14 97.49) (width 0.15) (layer F.Cu) (net 76) (tstamp 55997967)) (via (at 141.3 97.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 76)) (segment (start 141.11 97.14) (end 141.14 97.11) (width 0.15) (layer F.Cu) (net 76) (tstamp 55995EB7) (status 30)) (segment (start 141.14 97.11) (end 141.27 97.11) (width 0.15) (layer F.Cu) (net 76) (status 30)) (segment (start 141.27 97.11) (end 141.4925 96.8875) (width 0.15) (layer F.Cu) (net 76) (tstamp 55995EA4) (status 30)) (segment (start 141.3 96.1) (end 140.75 96.1) (width 0.15) (layer F.Cu) (net 77) (status 30)) (segment (start 140.75 96.1) (end 140.65 96) (width 0.15) (layer F.Cu) (net 77) (tstamp 559BFC69) (status 30)) (segment (start 142.32 96.2525) (end 141.4525 96.2525) (width 0.15) (layer F.Cu) (net 77) (status 30)) (segment (start 141.4525 96.2525) (end 141.3 96.1) (width 0.15) (layer F.Cu) (net 77) (tstamp 559BFC66) (status 30)) (segment (start 142.75 99) (end 142.4 99) (width 0.15) (layer B.Cu) (net 77) (status 10)) (segment (start 143.0525 96.2525) (end 142.32 96.2525) (width 0.15) (layer F.Cu) (net 77) (tstamp 55997A03) (status 20)) (segment (start 143.25 96.45) (end 143.0525 96.2525) (width 0.15) (layer F.Cu) (net 77) (tstamp 55997A02)) (segment (start 143.25 98.05) (end 143.25 96.45) (width 0.15) (layer F.Cu) (net 77) (tstamp 55997A00)) (segment (start 142.35 98.95) (end 143.25 98.05) (width 0.15) (layer F.Cu) (net 77) (tstamp 559BFAB5)) (via (at 142.35 98.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 77)) (segment (start 142.4 99) (end 142.35 98.95) (width 0.15) (layer B.Cu) (net 77) (tstamp 559BFAB3)) (segment (start 142.2775 96.21) (end 142.32 96.2525) (width 0.15) (layer F.Cu) (net 77) (tstamp 55995E9F) (status 30)) (via (at 141.1 94.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 78)) (segment (start 140.8 94.65) (end 141.1 94.35) (width 0.15) (layer B.Cu) (net 78) (tstamp 559AA262)) (segment (start 140.8 98.15) (end 140.8 94.65) (width 0.15) (layer B.Cu) (net 78)) (segment (start 140.8 98.15) (end 141.05 98.4) (width 0.15) (layer B.Cu) (net 78) (tstamp 559BFB10)) (segment (start 142.32 94.3475) (end 141.1025 94.3475) (width 0.15) (layer F.Cu) (net 78) (tstamp 559AA265) (status 10)) (segment (start 141.1 94.35) (end 141.1025 94.3475) (width 0.15) (layer F.Cu) (net 78) (tstamp 559AA264)) (segment (start 141.05 99.35) (end 140.6 99.8) (width 0.15) (layer B.Cu) (net 78) (tstamp 559BFB12) (status 20)) (segment (start 141.05 98.4) (end 141.05 99.35) (width 0.15) (layer B.Cu) (net 78) (tstamp 559BFB11)) (segment (start 143.75 93.5) (end 143.75 93.6) (width 0.15) (layer B.Cu) (net 78) (status 30)) (segment (start 143.75 93.6) (end 143.4 93.95) (width 0.15) (layer B.Cu) (net 78) (tstamp 55997A2C) (status 10)) (via (at 143.4 93.95) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 78)) (segment (start 143.4 93.95) (end 143.0025 94.3475) (width 0.15) (layer F.Cu) (net 78) (tstamp 55997A2E)) (segment (start 143.0025 94.3475) (end 142.32 94.3475) (width 0.15) (layer F.Cu) (net 78) (tstamp 55997A2F) (status 20)) (segment (start 148.56 95.64) (end 147.5425 95.64) (width 0.15) (layer F.Cu) (net 79) (status 30)) (segment (start 147.5425 95.64) (end 147.52 95.6175) (width 0.15) (layer F.Cu) (net 79) (tstamp 55995F7D) (status 30)) (segment (start 146.075 93.825) (end 146.075 91.75) (width 0.15) (layer B.Cu) (net 80)) (segment (start 145.15 87.54) (end 145.15 90.825) (width 0.15) (layer B.Cu) (net 80) (status 10)) (segment (start 146.075 94.15) (end 146.075 93.825) (width 0.15) (layer F.Cu) (net 80) (tstamp 55A41D04)) (via (at 146.075 93.825) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 80)) (segment (start 146.2725 94.3475) (end 147.52 94.3475) (width 0.15) (layer F.Cu) (net 80) (status 20)) (segment (start 146.2725 94.3475) (end 146.075 94.15) (width 0.15) (layer F.Cu) (net 80)) (segment (start 146.075 91.75) (end 145.15 90.825) (width 0.15) (layer B.Cu) (net 80) (tstamp 55A41D12)) (segment (start 148.86 96.65) (end 148.86 96.42) (width 0.15) (layer B.Cu) (net 81) (status 10)) (segment (start 148.87 96.41) (end 148.87 96.66) (width 0.15) (layer F.Cu) (net 81) (tstamp 55995FA7) (status 20)) (segment (start 148.92 96.36) (end 148.87 96.41) (width 0.15) (layer F.Cu) (net 81) (tstamp 55995FA6)) (via (at 148.92 96.36) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 81)) (segment (start 148.86 96.42) (end 148.92 96.36) (width 0.15) (layer B.Cu) (net 81) (tstamp 55995FA4)) (segment (start 148.87 96.66) (end 148.8 96.66) (width 0.15) (layer F.Cu) (net 81) (status 30)) (segment (start 148.8 96.66) (end 148.3925 96.2525) (width 0.15) (layer F.Cu) (net 81) (tstamp 55995FA0) (status 10)) (segment (start 148.3925 96.2525) (end 147.52 96.2525) (width 0.15) (layer F.Cu) (net 81) (tstamp 55995FA1) (status 20)) (segment (start 143.72 95.61) (end 143.19 95.61) (width 0.15) (layer B.Cu) (net 82) (status 10)) (segment (start 143.1825 95.6175) (end 142.32 95.6175) (width 0.15) (layer F.Cu) (net 82) (tstamp 55995EC9) (status 20)) (segment (start 143.19 95.61) (end 143.1825 95.6175) (width 0.15) (layer F.Cu) (net 82) (tstamp 55995EC8)) (via (at 143.19 95.61) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 82)) (segment (start 136.9 99.1) (end 137.55 99.1) (width 0.15) (layer F.Cu) (net 83) (status 10)) (segment (start 143.75 100.85) (end 143.25 100.35) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF1DF)) (segment (start 143.25 100.35) (end 141.9 100.35) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF1E0)) (segment (start 141.9 100.35) (end 141.4 100.85) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF1E1)) (segment (start 143.75 100.85) (end 145.35 100.85) (width 0.15) (layer F.Cu) (net 83) (status 20)) (segment (start 138.35 100.85) (end 141.4 100.85) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF234)) (segment (start 137.95 100.45) (end 138.35 100.85) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF233)) (segment (start 137.95 99.5) (end 137.95 100.45) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF232)) (segment (start 137.55 99.1) (end 137.95 99.5) (width 0.15) (layer F.Cu) (net 83) (tstamp 559BF231)) (segment (start 134.6 99.1) (end 136.9 99.1) (width 0.15) (layer F.Cu) (net 83) (status 30)) (segment (start 132.15 100.65) (end 131.5 100.65) (width 0.15) (layer F.Cu) (net 84) (status 10)) (segment (start 131.1 99) (end 132 99) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF2C2) (status 20)) (segment (start 130.95 99.15) (end 131.1 99) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF2C1)) (segment (start 130.95 100.1) (end 130.95 99.15) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF2C0)) (segment (start 131.5 100.65) (end 130.95 100.1) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF2BF)) (segment (start 132 99) (end 132.1 99.1) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF2C3) (status 30)) (via (at 142.5 100.9) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 84)) (segment (start 142.5 100.9) (end 146.5 100.9) (width 0.15) (layer B.Cu) (net 84) (tstamp 559BF1E7)) (via (at 146.5 100.9) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 84)) (segment (start 146.5 100.9) (end 146.55 100.85) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF1EA)) (segment (start 147.55 100.85) (end 146.55 100.85) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF1EB) (status 10)) (segment (start 132.3 101.25) (end 142.380002 101.25) (width 0.15) (layer F.Cu) (net 84)) (segment (start 142.380002 101.25) (end 142.5 101.130002) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF1DB)) (segment (start 142.5 101.130002) (end 142.5 100.9) (width 0.15) (layer F.Cu) (net 84)) (segment (start 132.15 101.1) (end 132.15 100.65) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF29D) (status 20)) (segment (start 132.3 101.25) (end 132.15 101.1) (width 0.15) (layer F.Cu) (net 84) (tstamp 559BF29C)) (segment (start 132.15 99.15) (end 132.1 99.1) (width 0.15) (layer F.Cu) (net 84) (tstamp 55997AE4) (status 30)) (segment (start 147.55 98.95) (end 147 98.95) (width 0.15) (layer F.Cu) (net 85) (status 10)) (segment (start 144.15 99.5) (end 143.65 99) (width 0.15) (layer B.Cu) (net 85) (tstamp 559BFAB0) (status 20)) (segment (start 146.45 99.5) (end 144.15 99.5) (width 0.15) (layer B.Cu) (net 85) (tstamp 559BFAAF)) (segment (start 146.6 99.35) (end 146.45 99.5) (width 0.15) (layer B.Cu) (net 85) (tstamp 559BFAAE)) (via (at 146.6 99.35) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 85)) (segment (start 147 98.95) (end 146.6 99.35) (width 0.15) (layer F.Cu) (net 85) (tstamp 559BFAAC)) (segment (start 147.55 98.95) (end 147.35 98.95) (width 0.15) (layer F.Cu) (net 85) (status 30)) (via (at 127.589761 80.146282) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 86)) (segment (start 128.64 81.22) (end 128.406655 81.22) (width 0.15) (layer F.Cu) (net 86) (status 10)) (segment (start 128.406655 81.22) (end 127.589761 80.403106) (width 0.15) (layer F.Cu) (net 86)) (segment (start 127.589761 80.403106) (end 127.589761 80.146282) (width 0.15) (layer F.Cu) (net 86)) (segment (start 127.6 79.2) (end 127.6 80.136043) (width 0.15) (layer B.Cu) (net 86)) (segment (start 127.6 80.136043) (end 127.589761 80.146282) (width 0.15) (layer B.Cu) (net 86)) (segment (start 119.11 87.41) (end 118.05 86.35) (width 0.15) (layer F.Cu) (net 86) (status 10)) (via (at 127.6 79.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 86)) (segment (start 127.55 79.25) (end 127.6 79.2) (width 0.15) (layer F.Cu) (net 86) (tstamp 559AADF1)) (segment (start 127.55 79.25) (end 121.75 79.25) (width 0.15) (layer F.Cu) (net 86)) (segment (start 121.05 78.55) (end 121.75 79.25) (width 0.15) (layer F.Cu) (net 86) (tstamp 559ACDCE)) (segment (start 118.45 78.55) (end 121.05 78.55) (width 0.15) (layer F.Cu) (net 86) (tstamp 559ACDCD)) (segment (start 118.05 78.95) (end 118.45 78.55) (width 0.15) (layer F.Cu) (net 86) (tstamp 559ACDCC)) (segment (start 118.05 86.35) (end 118.05 78.95) (width 0.15) (layer F.Cu) (net 86) (tstamp 559ACDCA)) (segment (start 119.11 87.41) (end 119.3 87.41) (width 0.15) (layer F.Cu) (net 86) (tstamp 559C0F1D) (status 30)) (segment (start 140.63 80.87) (end 138.52 80.87) (width 0.15) (layer In2.Cu) (net 87)) (via (at 136.21 80.07) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 87)) (segment (start 136.19 80.07) (end 136.21 80.07) (width 0.15) (layer F.Cu) (net 87) (tstamp 55996066)) (segment (start 136.19 80.07) (end 135.84 80.42) (width 0.15) (layer F.Cu) (net 87) (status 20)) (segment (start 137.72 80.07) (end 136.21 80.07) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559BFB38)) (segment (start 138.52 80.87) (end 137.72 80.07) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559BFB36)) (via (at 145.95 80.87) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 87)) (segment (start 145.58 80.5) (end 145.95 80.87) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB07C)) (segment (start 144.05 80.5) (end 145.58 80.5) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB07B)) (segment (start 143.7 80.15) (end 144.05 80.5) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB07A)) (via (at 143.7 80.15) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 87)) (segment (start 142.9 80.95) (end 143.7 80.15) (width 0.15) (layer B.Cu) (net 87) (tstamp 559AB076)) (segment (start 142 80.95) (end 142.9 80.95) (width 0.15) (layer B.Cu) (net 87) (tstamp 559AB074)) (segment (start 141.95 81) (end 142 80.95) (width 0.15) (layer B.Cu) (net 87) (tstamp 559AB073)) (via (at 141.95 81) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 87)) (segment (start 141.5 80.55) (end 141.95 81) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB06E)) (segment (start 140.95 80.55) (end 141.5 80.55) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB06D)) (segment (start 140.63 80.87) (end 140.95 80.55) (width 0.15) (layer In2.Cu) (net 87) (tstamp 559AB06B)) (segment (start 147.1 80.875) (end 145.955 80.875) (width 0.15) (layer F.Cu) (net 87) (status 10)) (segment (start 145.955 80.875) (end 145.95 80.87) (width 0.15) (layer F.Cu) (net 87) (tstamp 55996256)) (segment (start 147.1 80.875) (end 146.715 80.875) (width 0.15) (layer F.Cu) (net 87) (status 30)) (segment (start 145.95 80.87) (end 145.955 80.875) (width 0.15) (layer F.Cu) (net 87) (tstamp 55996071)) (segment (start 131.1 100.1) (end 131 100) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF2CA)) (segment (start 131 100) (end 131 98.25) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF2CB)) (segment (start 131 98.25) (end 130.1 97.35) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF2CC)) (segment (start 131.65 100.1) (end 131.1 100.1) (width 0.15) (layer B.Cu) (net 88)) (segment (start 126.28 91.81) (end 125.6 91.13) (width 0.15) (layer B.Cu) (net 88)) (segment (start 125.6 91.13) (end 125.6 88.85) (width 0.15) (layer B.Cu) (net 88)) (segment (start 125.6 88.85) (end 125.05 88.3) (width 0.15) (layer B.Cu) (net 88)) (segment (start 125.05 88.3) (end 125.05 86.95) (width 0.15) (layer B.Cu) (net 88)) (segment (start 125.05 86.95) (end 124.25 86.15) (width 0.15) (layer B.Cu) (net 88)) (segment (start 124.85 94.2) (end 125.05 94.2) (width 0.15) (layer F.Cu) (net 88) (tstamp 559BF44C)) (segment (start 130.1 96.1) (end 129.8 95.8) (width 0.15) (layer B.Cu) (net 88)) (segment (start 130.1 97.35) (end 130.1 96.1) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF2CE)) (segment (start 126.45 95.8) (end 124.85 94.2) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF446)) (segment (start 129.8 95.8) (end 126.45 95.8) (width 0.15) (layer B.Cu) (net 88) (tstamp 559BF445)) (via (at 124.85 94.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 88)) (segment (start 126.32 92.93) (end 125.05 94.2) (width 0.15) (layer F.Cu) (net 88) (tstamp 559D5C47)) (segment (start 126.32 91.85) (end 126.32 92.93) (width 0.15) (layer F.Cu) (net 88) (tstamp 559D5C46)) (segment (start 126.28 91.81) (end 126.32 91.85) (width 0.15) (layer F.Cu) (net 88) (tstamp 559D5C45)) (via (at 126.28 91.81) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 88)) (via (at 131.65 100.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 88)) (segment (start 130.05 80.03) (end 130.78 79.3) (width 0.15) (layer B.Cu) (net 88)) (segment (start 124.25 86.15) (end 124.25 84.455302) (width 0.15) (layer B.Cu) (net 88)) (segment (start 128.27999 80.414017) (end 128.68 80.014007) (width 0.15) (layer B.Cu) (net 88)) (segment (start 133.278999 80.228999) (end 133.278999 81.421001) (width 0.15) (layer B.Cu) (net 88)) (segment (start 130.78 79.3) (end 132.35 79.3) (width 0.15) (layer B.Cu) (net 88)) (segment (start 128.68 80.014007) (end 128.695993 80.03) (width 0.15) (layer B.Cu) (net 88)) (segment (start 132.35 79.3) (end 133.278999 80.228999) (width 0.15) (layer B.Cu) (net 88)) (segment (start 128.695993 80.03) (end 130.05 80.03) (width 0.15) (layer B.Cu) (net 88)) (segment (start 128.27999 80.57001) (end 128.27999 80.414017) (width 0.15) (layer B.Cu) (net 88)) (segment (start 126.490641 82.359359) (end 128.27999 80.57001) (width 0.15) (layer B.Cu) (net 88)) (segment (start 124.25 84.455302) (end 126.345943 82.359359) (width 0.15) (layer B.Cu) (net 88)) (segment (start 133.278999 81.421001) (end 133.05 81.65) (width 0.15) (layer B.Cu) (net 88)) (segment (start 126.345943 82.359359) (end 126.490641 82.359359) (width 0.15) (layer B.Cu) (net 88)) (segment (start 133.01 81.65) (end 133.05 81.65) (width 0.15) (layer F.Cu) (net 88) (tstamp 559C0F37)) (via (at 133.05 81.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 88)) (segment (start 132.64 82.02) (end 133.01 81.65) (width 0.15) (layer F.Cu) (net 88) (status 10)) (segment (start 135.2 100.05) (end 135.65 99.6) (width 0.15) (layer F.Cu) (net 88) (status 20)) (segment (start 135.2 100.05) (end 131.7 100.05) (width 0.15) (layer F.Cu) (net 88)) (segment (start 131.7 100.05) (end 131.65 100.1) (width 0.15) (layer F.Cu) (net 88) (tstamp 559BF2BB)) (segment (start 123.9 90.7) (end 123.9 84.409309) (width 0.15) (layer B.Cu) (net 89)) (segment (start 123.9 90.7) (end 123.9 92.36) (width 0.15) (layer F.Cu) (net 89)) (segment (start 123.9 92.36) (end 123.67 92.59) (width 0.15) (layer F.Cu) (net 89) (tstamp 55A410C5)) (via (at 123.67 92.59) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 89)) (segment (start 123.67 92.59) (end 123.78 92.7) (width 0.15) (layer B.Cu) (net 89) (tstamp 55A410C7)) (segment (start 123.78 92.7) (end 125.75 92.7) (width 0.15) (layer B.Cu) (net 89) (tstamp 55A410C8)) (via (at 123.9 90.7) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 89)) (segment (start 127.71 94.54) (end 127.71 94.55) (width 0.15) (layer B.Cu) (net 89) (tstamp 559D5C2F)) (segment (start 127.59 94.54) (end 127.71 94.54) (width 0.15) (layer B.Cu) (net 89) (tstamp 559D5C2D)) (segment (start 125.75 92.7) (end 127.59 94.54) (width 0.15) (layer B.Cu) (net 89) (tstamp 559D5C2C)) (segment (start 127.71 94.55) (end 130 94.55) (width 0.15) (layer B.Cu) (net 89) (tstamp 559D5C30)) (segment (start 131.45 96.8) (end 130.7 96.05) (width 0.15) (layer B.Cu) (net 89) (tstamp 559BF2C6)) (segment (start 131.45 99.5) (end 131.45 96.8) (width 0.15) (layer B.Cu) (net 89)) (segment (start 130.7 95.25) (end 130.7 96.05) (width 0.15) (layer B.Cu) (net 89) (tstamp 559BF441)) (segment (start 130 94.55) (end 130.7 95.25) (width 0.15) (layer B.Cu) (net 89) (tstamp 559BF43F)) (segment (start 128.558034 79.72998) (end 129.453874 79.72998) (width 0.15) (layer B.Cu) (net 89)) (segment (start 126.288665 82.079349) (end 127.99998 80.368034) (width 0.15) (layer B.Cu) (net 89)) (segment (start 126.22996 82.079349) (end 126.288665 82.079349) (width 0.15) (layer B.Cu) (net 89)) (segment (start 123.9 84.409309) (end 126.22996 82.079349) (width 0.15) (layer B.Cu) (net 89)) (segment (start 129.453874 79.72998) (end 129.75 79.433854) (width 0.15) (layer B.Cu) (net 89)) (segment (start 127.999981 80.288033) (end 128.558034 79.72998) (width 0.15) (layer B.Cu) (net 89)) (segment (start 129.75 79.433854) (end 129.75 79.11) (width 0.15) (layer B.Cu) (net 89)) (segment (start 127.99998 80.368034) (end 127.999981 80.288033) (width 0.15) (layer B.Cu) (net 89)) (segment (start 132.35 79.3) (end 129.94 79.3) (width 0.15) (layer F.Cu) (net 89)) (segment (start 132.35 79.3) (end 133.05 80) (width 0.15) (layer F.Cu) (net 89) (tstamp 559D5ADF)) (segment (start 133.05 80.8) (end 133.05 80) (width 0.15) (layer F.Cu) (net 89) (tstamp 559BF371)) (segment (start 132.64 81.21) (end 133.05 80.8) (width 0.15) (layer F.Cu) (net 89) (tstamp 559BF370) (status 10)) (segment (start 129.75 79.11) (end 129.94 79.3) (width 0.15) (layer F.Cu) (net 89) (tstamp 559D5AD3)) (via (at 129.75 79.11) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 89)) (segment (start 131.55 99.6) (end 133.15 99.6) (width 0.15) (layer F.Cu) (net 89) (status 20)) (via (at 131.45 99.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 89)) (segment (start 131.55 99.6) (end 131.45 99.5) (width 0.15) (layer F.Cu) (net 89) (tstamp 559BF2B7)) (segment (start 132.64 81.22) (end 132.64 81.21) (width 0.15) (layer F.Cu) (net 89) (status 30)) (segment (start 133.15 99.6) (end 132.9 99.6) (width 0.15) (layer F.Cu) (net 89) (status 30)) (segment (start 120.85 73.25) (end 120.45 72.85) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BC0)) (segment (start 121 73.25) (end 120.85 73.25) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BBF)) (segment (start 121.53 73.78) (end 121 73.25) (width 0.15) (layer F.Cu) (net 90)) (segment (start 120.45 71.95) (end 121.05 71.35) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BA9)) (segment (start 121.05 71.35) (end 123 71.35) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BAA)) (segment (start 123 71.35) (end 123.66 70.69) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BAB)) (segment (start 123.66 70.69) (end 125.5724 70.69) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BAC)) (segment (start 126.66 69.6024) (end 125.5724 70.69) (width 0.15) (layer F.Cu) (net 90) (tstamp 559E9E5B) (status 10)) (segment (start 129.8 79.98) (end 129.8 79.9) (width 0.15) (layer F.Cu) (net 90)) (segment (start 129.8 79.98) (end 130.24 80.42) (width 0.15) (layer F.Cu) (net 90) (status 20)) (segment (start 126.5 77.6) (end 126.25 77.85) (width 0.15) (layer In2.Cu) (net 90) (tstamp 559C0F52)) (segment (start 127.1 77.6) (end 126.5 77.6) (width 0.15) (layer In2.Cu) (net 90) (tstamp 559C0F50)) (segment (start 128.15 78.65) (end 127.1 77.6) (width 0.15) (layer In2.Cu) (net 90) (tstamp 559C0F4F)) (segment (start 128.55 78.65) (end 128.15 78.65) (width 0.15) (layer In2.Cu) (net 90) (tstamp 559C0F4E)) (segment (start 129.1 79.2) (end 128.55 78.65) (width 0.15) (layer In2.Cu) (net 90) (tstamp 559C0F4D)) (via (at 129.1 79.2) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 90)) (segment (start 129.8 79.9) (end 129.1 79.2) (width 0.15) (layer F.Cu) (net 90) (tstamp 559C0F4B)) (segment (start 124.65 78.15) (end 124.65 78.11) (width 0.15) (layer B.Cu) (net 90)) (segment (start 124.65 78.15) (end 122.69 78.15) (width 0.15) (layer B.Cu) (net 90)) (via (at 126.25 77.85) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 90)) (segment (start 122.4 77.86) (end 121.53 76.99) (width 0.15) (layer F.Cu) (net 90) (tstamp 559E9E45)) (via (at 122.4 77.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 90)) (segment (start 122.69 78.15) (end 122.4 77.86) (width 0.15) (layer B.Cu) (net 90) (tstamp 559E9E3F)) (segment (start 126.25 77.71) (end 126.25 77.85) (width 0.15) (layer B.Cu) (net 90) (tstamp 559E9EA8)) (segment (start 125.86 77.32) (end 126.25 77.71) (width 0.15) (layer B.Cu) (net 90) (tstamp 559E9EA7)) (segment (start 125.44 77.32) (end 125.86 77.32) (width 0.15) (layer B.Cu) (net 90) (tstamp 559E9EA6)) (segment (start 124.65 78.11) (end 125.44 77.32) (width 0.15) (layer B.Cu) (net 90) (tstamp 559E9EA5)) (segment (start 121.53 76.99) (end 121.53 73.78) (width 0.15) (layer F.Cu) (net 90)) (segment (start 120.45 72.85) (end 120.45 71.95) (width 0.15) (layer F.Cu) (net 90) (tstamp 55A41BC1)) (segment (start 126.66 69.6024) (end 126.66 69.45) (width 0.15) (layer F.Cu) (net 90) (status 30)) (segment (start 125.48 97.61) (end 125.58 97.61) (width 0.15) (layer B.Cu) (net 91) (status 30)) (segment (start 125.58 97.61) (end 126.31 98.34) (width 0.15) (layer B.Cu) (net 91) (tstamp 559D5C03) (status 10)) (segment (start 126.31 98.34) (end 126.31 99.43) (width 0.15) (layer B.Cu) (net 91) (tstamp 559D5C04)) (segment (start 125.76 99.75) (end 125.99 99.75) (width 0.15) (layer B.Cu) (net 91) (status 30)) (segment (start 125.99 99.75) (end 126.31 99.43) (width 0.15) (layer B.Cu) (net 91) (tstamp 559D5BED) (status 10)) (segment (start 125.63 100.58) (end 126.13 100.58) (width 0.15) (layer F.Cu) (net 91) (status 10)) (segment (start 126.24 100.47) (end 125.76 99.99) (width 0.15) (layer B.Cu) (net 91) (tstamp 559D5BAD) (status 20)) (via (at 126.24 100.47) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 91)) (segment (start 126.13 100.58) (end 126.24 100.47) (width 0.15) (layer F.Cu) (net 91) (tstamp 559D5BAB)) (segment (start 125.76 99.99) (end 125.76 99.75) (width 0.15) (layer B.Cu) (net 91) (tstamp 559D5BAE) (status 30)) (segment (start 131.26 95.94) (end 133.57 93.63) (width 0.15) (layer F.Cu) (net 92)) (segment (start 138.27 94.49) (end 138.27 92.61) (width 0.15) (layer F.Cu) (net 92)) (segment (start 138.01 94.75) (end 138.27 94.49) (width 0.15) (layer F.Cu) (net 92)) (segment (start 136.41 94.75) (end 138.01 94.75) (width 0.15) (layer F.Cu) (net 92) (tstamp 55A809E1)) (segment (start 135.29 93.63) (end 136.41 94.75) (width 0.15) (layer F.Cu) (net 92) (tstamp 55A809E0)) (segment (start 133.57 93.63) (end 135.29 93.63) (width 0.15) (layer F.Cu) (net 92) (tstamp 55A809DE)) (segment (start 131.17 92.86) (end 131.17 95.85) (width 0.15) (layer B.Cu) (net 92)) (segment (start 132.28 91.75) (end 131.17 92.86) (width 0.15) (layer B.Cu) (net 92)) (via (at 131.26 95.94) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 92)) (segment (start 131.17 95.85) (end 131.26 95.94) (width 0.15) (layer B.Cu) (net 92) (tstamp 559D6E68)) (segment (start 138.27 92.61) (end 138.27 93.62) (width 0.15) (layer B.Cu) (net 92) (status 20)) (via (at 138.27 92.61) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 92)) (segment (start 138.27 93.62) (end 138.35 93.7) (width 0.15) (layer B.Cu) (net 92) (status 30)) (via (at 138.27 92.61) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 92)) (segment (start 132.28 91.49) (end 132.28 91.75) (width 0.15) (layer B.Cu) (net 92)) (segment (start 128.08 89.13) (end 129.69 90.74) (width 0.15) (layer B.Cu) (net 92) (tstamp 559D6E5F)) (segment (start 129.69 90.74) (end 131.53 90.74) (width 0.15) (layer B.Cu) (net 92) (tstamp 559D6E60)) (segment (start 128.36 88.68) (end 128.08 88.96) (width 0.15) (layer F.Cu) (net 92) (tstamp 559D5CA2)) (via (at 128.08 88.96) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 92)) (segment (start 131.53 90.74) (end 132.28 91.49) (width 0.15) (layer B.Cu) (net 92) (tstamp 559D5CBF)) (segment (start 128.08 88.96) (end 128.08 89.13) (width 0.15) (layer B.Cu) (net 92)) (segment (start 127.74 86.82) (end 127.61 86.95) (width 0.15) (layer F.Cu) (net 92) (tstamp 559D5C8D)) (segment (start 127.61 86.95) (end 127.61 87.43) (width 0.15) (layer F.Cu) (net 92) (tstamp 559D5C8E)) (segment (start 127.61 87.43) (end 128.36 88.18) (width 0.15) (layer F.Cu) (net 92) (tstamp 559D5C8F)) (segment (start 128.64 86.82) (end 127.74 86.82) (width 0.15) (layer F.Cu) (net 92) (status 10)) (segment (start 128.36 88.18) (end 128.36 88.68) (width 0.15) (layer F.Cu) (net 92)) (segment (start 125.7 96.71) (end 125.38 96.71) (width 0.15) (layer B.Cu) (net 93) (status 10)) (segment (start 124.97 97.12) (end 125.63 97.78) (width 0.15) (layer F.Cu) (net 93) (tstamp 559D5DD6) (status 20)) (via (at 124.97 97.12) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 93)) (segment (start 125.38 96.71) (end 124.97 97.12) (width 0.15) (layer B.Cu) (net 93) (tstamp 559D5DD4)) (segment (start 125.63 97.78) (end 125.63 97.99) (width 0.15) (layer F.Cu) (net 93) (tstamp 559D5DD7) (status 30)) (segment (start 126.52001 88.623787) (end 126.955874 88.187923) (width 0.15) (layer F.Cu) (net 94)) (segment (start 126.52001 89.855983) (end 126.52001 88.623787) (width 0.15) (layer F.Cu) (net 94)) (segment (start 125.83001 90.545983) (end 126.52001 89.855983) (width 0.15) (layer F.Cu) (net 94)) (segment (start 125.08 93.45) (end 125.83001 92.69999) (width 0.15) (layer F.Cu) (net 94)) (segment (start 127.15 87.993797) (end 126.955874 88.187923) (width 0.15) (layer In2.Cu) (net 94)) (segment (start 127.15 86.5) (end 127.15 87.993797) (width 0.15) (layer In2.Cu) (net 94)) (segment (start 125.83001 92.69999) (end 125.83001 90.545983) (width 0.15) (layer F.Cu) (net 94)) (via (at 126.955874 88.187923) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 94)) (segment (start 124.6 93.45) (end 125.08 93.45) (width 0.15) (layer B.Cu) (net 94) (tstamp 559D5C33)) (via (at 125.08 93.45) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 94)) (segment (start 122.65 94.18) (end 122.86 94.39) (width 0.15) (layer B.Cu) (net 94) (tstamp 559D5B89)) (segment (start 122.86 94.39) (end 123.66 94.39) (width 0.15) (layer B.Cu) (net 94) (tstamp 559D5B8A)) (segment (start 123.66 94.39) (end 124.6 93.45) (width 0.15) (layer B.Cu) (net 94) (tstamp 559D5B8B)) (segment (start 122.07 94.18) (end 122.65 94.18) (width 0.15) (layer B.Cu) (net 94) (status 10)) (via (at 130.65 86.4) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 94)) (segment (start 131.46 86.4) (end 130.65 86.4) (width 0.15) (layer F.Cu) (net 94) (tstamp 559AD80B)) (segment (start 131.46 86.4) (end 131.84 86.02) (width 0.15) (layer F.Cu) (net 94) (status 20)) (segment (start 130.05 85.8) (end 128.85 85.8) (width 0.15) (layer B.Cu) (net 94) (tstamp 559AD8E7)) (segment (start 130.65 86.4) (end 130.05 85.8) (width 0.15) (layer B.Cu) (net 94) (tstamp 559AD8E6)) (segment (start 128.85 85.8) (end 128.4 86.25) (width 0.15) (layer B.Cu) (net 94) (tstamp 559AD8E9)) (segment (start 128.4 86.25) (end 127.4 86.25) (width 0.15) (layer B.Cu) (net 94) (tstamp 559AD8EB)) (segment (start 127.4 86.25) (end 127.15 86.5) (width 0.15) (layer B.Cu) (net 94) (tstamp 559AD8EC)) (via (at 127.15 86.5) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 94)) (segment (start 122.07 94.18) (end 122.07 95.08) (width 0.3) (layer B.Cu) (net 94) (status 30)) (segment (start 122.07 95.08) (end 122.08 95.09) (width 0.3) (layer B.Cu) (net 94) (tstamp 559D5B77) (status 30)) (segment (start 126.12 85.86) (end 125.86 85.6) (width 0.15) (layer B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 127.85 83.25) (end 127.9 83.3) (width 0.15) (layer B.Cu) (net 95)) (segment (start 124.65 84.5) (end 124.65 85.45) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41BE0)) (segment (start 125.9 83.25) (end 124.65 84.5) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41BDE)) (segment (start 127.85 83.25) (end 125.9 83.25) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41BDD)) (segment (start 124.8 85.6) (end 124.65 85.45) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41C24)) (segment (start 125.86 85.6) (end 124.8 85.6) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41C23)) (segment (start 129.83 80.78) (end 129.83 82.41) (width 0.15) (layer B.Cu) (net 95)) (via (at 129.83 82.41) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 130.69 82.41) (end 129.83 82.41) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5A84)) (segment (start 131.04 82.06) (end 130.69 82.41) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5A83) (status 10)) (segment (start 127.9 83.3) (end 128.56 82.64) (width 0.15) (layer B.Cu) (net 95) (tstamp 55A41BDB)) (segment (start 129.39 80.34) (end 129.83 80.78) (width 0.15) (layer B.Cu) (net 95)) (segment (start 128.56 82.64) (end 128.56 80.53) (width 0.15) (layer B.Cu) (net 95)) (segment (start 128.56 80.53) (end 128.75 80.34) (width 0.15) (layer B.Cu) (net 95)) (segment (start 128.75 80.34) (end 129.39 80.34) (width 0.15) (layer B.Cu) (net 95)) (segment (start 123.08 92.42) (end 123.08 92.66) (width 0.15) (layer F.Cu) (net 95)) (segment (start 123.08 92.66) (end 123.47 93.05) (width 0.15) (layer F.Cu) (net 95) (tstamp 55A410CB)) (segment (start 123.47 93.05) (end 124.394002 93.05) (width 0.15) (layer F.Cu) (net 95) (tstamp 55A410CC)) (segment (start 124.394002 93.05) (end 125.55 91.894002) (width 0.15) (layer F.Cu) (net 95) (tstamp 55A410CD)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 126.33 87.11) (end 126.33 86.07) (width 0.15) (layer F.Cu) (net 95)) (segment (start 125.55 91.894002) (end 125.55 90.43) (width 0.15) (layer F.Cu) (net 95)) (segment (start 125.55 90.43) (end 126.24 89.74) (width 0.15) (layer F.Cu) (net 95)) (segment (start 126.24 89.74) (end 126.24 88.29) (width 0.15) (layer F.Cu) (net 95)) (segment (start 126.24 88.29) (end 126.77 87.76) (width 0.15) (layer F.Cu) (net 95)) (segment (start 126.77 87.76) (end 126.77 87.55) (width 0.15) (layer F.Cu) (net 95)) (segment (start 126.77 87.55) (end 126.33 87.11) (width 0.15) (layer F.Cu) (net 95)) (segment (start 126.33 86.07) (end 126.12 85.86) (width 0.15) (layer F.Cu) (net 95)) (via (at 126.12 85.86) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 118.51 91.42) (end 120.35 91.42) (width 0.15) (layer F.Cu) (net 95)) (segment (start 124.14 100.57) (end 123.59 101.12) (width 0.15) (layer In2.Cu) (net 95) (tstamp 559D5C13)) (segment (start 123.59 101.12) (end 122.14 101.12) (width 0.15) (layer In2.Cu) (net 95) (tstamp 559D5C14)) (segment (start 122.14 101.12) (end 118.48 97.46) (width 0.15) (layer In2.Cu) (net 95) (tstamp 559D5C15)) (segment (start 118.48 97.46) (end 118.48 91.45) (width 0.15) (layer In2.Cu) (net 95) (tstamp 559D5C17)) (segment (start 118.48 91.45) (end 118.51 91.42) (width 0.15) (layer In2.Cu) (net 95) (tstamp 559D5C19)) (via (at 118.51 91.42) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 124.14 100.57) (end 124.14 99.65) (width 0.15) (layer In2.Cu) (net 95)) (segment (start 122.72 92.06) (end 123.08 92.42) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5C23)) (segment (start 120.99 92.06) (end 122.72 92.06) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5C21)) (segment (start 120.35 91.42) (end 120.99 92.06) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5C1F)) (segment (start 124.68 100.58) (end 124.68 100.19) (width 0.15) (layer F.Cu) (net 95) (status 30)) (segment (start 124.68 100.19) (end 124.14 99.65) (width 0.15) (layer F.Cu) (net 95) (tstamp 559D5BB1) (status 10)) (via (at 124.14 99.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 95)) (segment (start 124.14 99.65) (end 124.18 99.69) (width 0.15) (layer B.Cu) (net 95) (tstamp 559D5BB3)) (segment (start 124.18 99.69) (end 124.79 99.69) (width 0.15) (layer B.Cu) (net 95) (tstamp 559D5BB4) (status 20)) (segment (start 131.04 82.02) (end 131.04 82.06) (width 0.15) (layer F.Cu) (net 95) (status 30)) (via (at 128.91 88.28) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 96)) (segment (start 128.64 88.01) (end 128.91 88.28) (width 0.15) (layer F.Cu) (net 96) (tstamp 559D6E48)) (segment (start 128.64 87.62) (end 128.64 88.01) (width 0.15) (layer F.Cu) (net 96) (status 10)) (segment (start 129.25 88.62) (end 129.97 88.62) (width 0.15) (layer B.Cu) (net 96) (tstamp 559D6E73) (status 20)) (segment (start 128.91 88.28) (end 129.25 88.62) (width 0.15) (layer B.Cu) (net 96) (tstamp 559D6E72)) (segment (start 118.07899 76.02101) (end 118.9 75.2) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 118.9 75.2) (end 118.9 73.8) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 118.9 73.8) (end 120.05 72.65) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 120.05 72.65) (end 120.9 72.65) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 118.07899 85.67899) (end 118.07899 76.02101) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 118.5 86.1) (end 118.07899 85.67899) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 120.25 86.1) (end 118.5 86.1) (width 0.15) (layer In2.Cu) (net 97)) (segment (start 122.1 84.35) (end 120.35 86.1) (width 0.15) (layer F.Cu) (net 97)) (segment (start 120.35 86.1) (end 120.25 86.1) (width 0.15) (layer F.Cu) (net 97)) (via (at 120.25 86.1) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 97)) (segment (start 125.45 84.35) (end 122.1 84.35) (width 0.15) (layer F.Cu) (net 97)) (segment (start 121.2 72.35) (end 120.9 72.65) (width 0.15) (layer F.Cu) (net 97) (tstamp 55A41BB6) (status 10)) (via (at 120.9 72.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 97)) (segment (start 126.2 83.6) (end 125.75 84.05) (width 0.15) (layer B.Cu) (net 97)) (segment (start 128.2 83.6) (end 126.2 83.6) (width 0.15) (layer B.Cu) (net 97)) (segment (start 125.75 84.65) (end 125.45 84.35) (width 0.15) (layer F.Cu) (net 97) (tstamp 55A41C2B)) (via (at 125.75 84.65) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 97)) (segment (start 125.75 84.05) (end 125.75 84.65) (width 0.15) (layer B.Cu) (net 97) (tstamp 55A41C29)) (segment (start 128.625 84.025) (end 128.2 83.6) (width 0.15) (layer B.Cu) (net 97) (status 10)) (segment (start 121.45 72.35) (end 121.2 72.35) (width 0.15) (layer F.Cu) (net 97) (status 30)) (segment (start 128.625 84.025) (end 129 84.025) (width 0.15) (layer B.Cu) (net 97) (status 10)) (segment (start 129 84.025) (end 129.025 84) (width 0.15) (layer B.Cu) (net 97) (tstamp 5585A378)) (segment (start 129.44 83.62) (end 129.405 83.62) (width 0.15) (layer F.Cu) (net 97) (status 30)) (segment (start 129.405 83.62) (end 129.025 84) (width 0.15) (layer F.Cu) (net 97) (tstamp 5585A364) (status 10)) (segment (start 129.025 84) (end 129 84.025) (width 0.15) (layer B.Cu) (net 97) (tstamp 5585A368)) (via (at 129.025 84) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 97)) (segment (start 129 84.025) (end 128.825 84.025) (width 0.15) (layer B.Cu) (net 97) (tstamp 5585A369) (status 20)) (segment (start 129.44 83.62) (end 129.44 83.54) (width 0.15) (layer F.Cu) (net 97) (status 30)) (segment (start 128.84 95.42) (end 128.84 96.1) (width 0.3) (layer F.Cu) (net 98) (status 10)) (segment (start 128.84 96.1) (end 129.59 96.85) (width 0.3) (layer F.Cu) (net 98) (tstamp 55A7F6CA) (status 20)) (segment (start 138.37 85.54) (end 138.37 85.93) (width 0.15) (layer F.Cu) (net 99)) (segment (start 138.28 86.02) (end 137.87 85.61) (width 0.15) (layer B.Cu) (net 99) (tstamp 5640E9AF)) (via (at 138.28 86.02) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 99)) (segment (start 138.37 85.93) (end 138.28 86.02) (width 0.15) (layer F.Cu) (net 99) (tstamp 5640E9AD)) (segment (start 137.87 85.61) (end 137.87 85.37) (width 0.15) (layer B.Cu) (net 99) (tstamp 5640E9B0)) (segment (start 137.51 85.02) (end 137.35 85.02) (width 0.15) (layer B.Cu) (net 99)) (segment (start 137.86 85.37) (end 137.51 85.02) (width 0.15) (layer B.Cu) (net 99) (tstamp 5640E789)) (segment (start 137.13 85.22) (end 135.84 85.22) (width 0.15) (layer F.Cu) (net 99) (tstamp 5640E9A7)) (segment (start 137.34 85.01) (end 137.13 85.22) (width 0.15) (layer F.Cu) (net 99) (tstamp 5640E9A6)) (via (at 137.34 85.01) (size 0.458) (drill 0.254) (layers F.Cu B.Cu) (net 99)) (segment (start 137.35 85.02) (end 137.34 85.01) (width 0.15) (layer B.Cu) (net 99) (tstamp 5640E9A2)) (segment (start 137.87 85.37) (end 137.86 85.37) (width 0.15) (layer B.Cu) (net 99)) (zone (net 2) (net_name /3V3) (layer In2.Cu) (tstamp 5580BF6F) (hatch edge 0.508) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 140.85 86.9) (xy 136.75 91) (xy 124.75 91) (xy 124.75 79) (xy 127.4 76.35) (xy 133.9 76.35) (xy 133.9 68.05) (xy 134.05 68.05) (xy 141.65 68.05) (xy 141.65 86.9) ) ) (filled_polygon (pts (xy 141.523 73.622801) (xy 141.209946 73.622528) (xy 140.207297 74.036814) (xy 139.43951 74.803262) (xy 139.252043 75.254732) (xy 139.106059 75.194114) (xy 138.845086 75.193886) (xy 138.603891 75.293546) (xy 138.419194 75.477921) (xy 138.319114 75.718941) (xy 138.318886 75.979914) (xy 138.418546 76.221109) (xy 138.602921 76.405806) (xy 138.843941 76.505886) (xy 139.022863 76.506042) (xy 139.022852 76.519019) (xy 138.870086 76.518886) (xy 138.628891 76.618546) (xy 138.444194 76.802921) (xy 138.344114 77.043941) (xy 138.343886 77.304914) (xy 138.379947 77.392187) (xy 138.369194 77.402921) (xy 138.269114 77.643941) (xy 138.268886 77.904914) (xy 138.368546 78.146109) (xy 138.552921 78.330806) (xy 138.793941 78.430886) (xy 139.054914 78.431114) (xy 139.296109 78.331454) (xy 139.480806 78.147079) (xy 139.542479 77.998553) (xy 140.203262 78.66049) (xy 141.205186 79.076526) (xy 141.523 79.076803) (xy 141.523 79.348) (xy 139.185009 79.348) (xy 139.156454 79.278891) (xy 138.972079 79.094194) (xy 138.731059 78.994114) (xy 138.62863 78.994025) (xy 138.542107 78.936212) (xy 138.35 78.897999) (xy 138.349995 78.898) (xy 137.23098 78.898) (xy 137.231114 78.745086) (xy 137.131454 78.503891) (xy 136.947079 78.319194) (xy 136.706059 78.219114) (xy 136.445086 78.218886) (xy 136.203891 78.318546) (xy 136.019194 78.502921) (xy 135.919114 78.743941) (xy 135.918979 78.898) (xy 134.525878 78.898) (xy 134.522079 78.894194) (xy 134.281059 78.794114) (xy 134.020086 78.793886) (xy 133.778891 78.893546) (xy 133.594194 79.077921) (xy 133.494114 79.318941) (xy 133.494047 79.396018) (xy 132.995032 79.895032) (xy 132.886212 80.057893) (xy 132.847999 80.25) (xy 132.848 80.250005) (xy 132.848 81.023671) (xy 132.678891 81.093546) (xy 132.494194 81.277921) (xy 132.394114 81.518941) (xy 132.393886 81.779914) (xy 132.493546 82.021109) (xy 132.497319 82.024889) (xy 132.444194 82.077921) (xy 132.344114 82.318941) (xy 132.343886 82.579914) (xy 132.443546 82.821109) (xy 132.531287 82.909004) (xy 132.444114 83.118941) (xy 132.443886 83.379914) (xy 132.543546 83.621109) (xy 132.727921 83.805806) (xy 132.968941 83.905886) (xy 133.229914 83.906114) (xy 133.471109 83.806454) (xy 133.655806 83.622079) (xy 133.755886 83.381059) (xy 133.756114 83.120086) (xy 133.729591 83.055895) (xy 133.979914 83.056114) (xy 134.221109 82.956454) (xy 134.405806 82.772079) (xy 134.505886 82.531059) (xy 134.506114 82.270086) (xy 134.496375 82.246516) (xy 134.518941 82.255886) (xy 134.779914 82.256114) (xy 135.021109 82.156454) (xy 135.049889 82.127725) (xy 135.077921 82.155806) (xy 135.318941 82.255886) (xy 135.579914 82.256114) (xy 135.821109 82.156454) (xy 135.822614 82.154951) (xy 135.85178 82.225538) (xy 135.94438 82.3183) (xy 135.944114 82.318941) (xy 135.943886 82.579914) (xy 135.972646 82.649519) (xy 135.944194 82.677921) (xy 135.88886 82.811179) (xy 135.772079 82.694194) (xy 135.531059 82.594114) (xy 135.270086 82.593886) (xy 135.028891 82.693546) (xy 134.844194 82.877921) (xy 134.744114 83.118941) (xy 134.743886 83.379914) (xy 134.843546 83.621109) (xy 135.027921 83.805806) (xy 135.268941 83.905886) (xy 135.529914 83.906114) (xy 135.771109 83.806454) (xy 135.955806 83.622079) (xy 136.01114 83.488821) (xy 136.127921 83.605806) (xy 136.368941 83.705886) (xy 136.629914 83.706114) (xy 136.871109 83.606454) (xy 137.055806 83.422079) (xy 137.155886 83.181059) (xy 137.156086 82.952) (xy 140.442064 82.952) (xy 140.730148 83.240083) (xy 140.73015 83.240086) (xy 140.866301 83.331059) (xy 140.893011 83.348906) (xy 141.085118 83.387119) (xy 141.085123 83.387118) (xy 141.198617 83.387118) (xy 141.252329 83.440924) (xy 141.327046 83.471949) (xy 141.236212 83.607893) (xy 141.197999 83.8) (xy 141.198 83.800005) (xy 141.198 84.151149) (xy 141.181059 84.144114) (xy 140.920086 84.143886) (xy 140.678891 84.243546) (xy 140.494194 84.427921) (xy 140.394114 84.668941) (xy 140.393886 84.929914) (xy 140.493546 85.171109) (xy 140.677921 85.355806) (xy 140.918941 85.455886) (xy 140.940997 85.455905) (xy 140.728891 85.543546) (xy 140.544194 85.727921) (xy 140.444114 85.968941) (xy 140.443886 86.229914) (xy 140.543546 86.471109) (xy 140.709139 86.636991) (xy 139.54813 87.798) (xy 137.979752 87.798) (xy 138.055806 87.722079) (xy 138.112292 87.586046) (xy 138.189914 87.586114) (xy 138.431109 87.486454) (xy 138.615806 87.302079) (xy 138.715886 87.061059) (xy 138.716114 86.800086) (xy 138.627706 86.586124) (xy 138.651109 86.576454) (xy 138.835806 86.392079) (xy 138.935886 86.151059) (xy 138.936114 85.890086) (xy 138.836454 85.648891) (xy 138.652079 85.464194) (xy 138.639653 85.459034) (xy 138.791109 85.396454) (xy 138.975806 85.212079) (xy 139.075886 84.971059) (xy 139.076114 84.710086) (xy 138.976454 84.468891) (xy 138.792079 84.284194) (xy 138.551059 84.184114) (xy 138.458564 84.184033) (xy 138.501109 84.166454) (xy 138.685806 83.982079) (xy 138.785886 83.741059) (xy 138.786114 83.480086) (xy 138.686454 83.238891) (xy 138.502079 83.054194) (xy 138.261059 82.954114) (xy 138.000086 82.953886) (xy 137.758891 83.053546) (xy 137.574194 83.237921) (xy 137.474114 83.478941) (xy 137.473886 83.739914) (xy 137.573546 83.981109) (xy 137.757921 84.165806) (xy 137.998941 84.265886) (xy 138.091436 84.265967) (xy 138.048891 84.283546) (xy 137.864194 84.467921) (xy 137.823533 84.565843) (xy 137.712079 84.454194) (xy 137.471059 84.354114) (xy 137.210086 84.353886) (xy 136.968891 84.453546) (xy 136.784194 84.637921) (xy 136.684114 84.878941) (xy 136.683886 85.139914) (xy 136.783546 85.381109) (xy 136.967921 85.565806) (xy 137.208941 85.665886) (xy 137.469914 85.666114) (xy 137.711109 85.566454) (xy 137.895806 85.382079) (xy 137.936467 85.284157) (xy 138.047921 85.395806) (xy 138.060347 85.400966) (xy 137.908891 85.463546) (xy 137.724194 85.647921) (xy 137.624114 85.888941) (xy 137.624075 85.934099) (xy 137.563983 85.934047) (xy 137.504968 85.875032) (xy 137.342107 85.766212) (xy 137.15 85.727999) (xy 137.149995 85.728) (xy 136.21 85.728) (xy 136.017892 85.766212) (xy 135.95266 85.8098) (xy 135.855032 85.875032) (xy 135.85503 85.875035) (xy 135.828925 85.90114) (xy 135.772079 85.844194) (xy 135.531059 85.744114) (xy 135.270086 85.743886) (xy 135.028891 85.843546) (xy 135.025155 85.847275) (xy 135.022079 85.844194) (xy 134.781059 85.744114) (xy 134.520086 85.743886) (xy 134.278891 85.843546) (xy 134.094194 86.027921) (xy 133.994114 86.268941) (xy 133.993886 86.529914) (xy 134.071737 86.718327) (xy 133.656058 87.134006) (xy 133.656114 87.070086) (xy 133.556454 86.828891) (xy 133.552681 86.825111) (xy 133.605806 86.772079) (xy 133.705886 86.531059) (xy 133.706114 86.270086) (xy 133.606454 86.028891) (xy 133.422079 85.844194) (xy 133.181059 85.744114) (xy 132.920086 85.743886) (xy 132.678891 85.843546) (xy 132.494194 86.027921) (xy 132.394114 86.268941) (xy 132.393886 86.529914) (xy 132.493546 86.771109) (xy 132.497319 86.774889) (xy 132.444194 86.827921) (xy 132.344114 87.068941) (xy 132.343886 87.329914) (xy 132.443546 87.571109) (xy 132.627921 87.755806) (xy 132.784193 87.820696) (xy 132.728891 87.843546) (xy 132.544194 88.027921) (xy 132.444114 88.268941) (xy 132.443886 88.529914) (xy 132.543546 88.771109) (xy 132.581995 88.809625) (xy 132.378891 88.893546) (xy 132.224937 89.047232) (xy 132.122079 88.944194) (xy 131.881059 88.844114) (xy 131.620086 88.843886) (xy 131.378891 88.943546) (xy 131.194194 89.127921) (xy 131.094114 89.368941) (xy 131.093886 89.629914) (xy 131.193546 89.871109) (xy 131.377921 90.055806) (xy 131.618941 90.155886) (xy 131.879914 90.156114) (xy 132.121109 90.056454) (xy 132.275063 89.902768) (xy 132.377921 90.005806) (xy 132.618941 90.105886) (xy 132.879914 90.106114) (xy 133.121109 90.006454) (xy 133.305806 89.822079) (xy 133.405886 89.581059) (xy 133.405953 89.503983) (xy 133.407936 89.502) (xy 134.499995 89.502) (xy 134.5 89.502001) (xy 134.692107 89.463788) (xy 134.854968 89.354968) (xy 135.503888 88.706048) (xy 135.579914 88.706114) (xy 135.739024 88.640371) (xy 135.644114 88.868941) (xy 135.643886 89.129914) (xy 135.743546 89.371109) (xy 135.927921 89.555806) (xy 135.953597 89.566467) (xy 135.715032 89.805032) (xy 135.606212 89.967893) (xy 135.571284 90.143485) (xy 135.522079 90.094194) (xy 135.281059 89.994114) (xy 135.020086 89.993886) (xy 134.778891 90.093546) (xy 134.594194 90.277921) (xy 134.494114 90.518941) (xy 134.493979 90.673) (xy 133.395339 90.673) (xy 133.356454 90.578891) (xy 133.172079 90.394194) (xy 132.931059 90.294114) (xy 132.670086 90.293886) (xy 132.428891 90.393546) (xy 132.244194 90.577921) (xy 132.204714 90.673) (xy 126.850835 90.673) (xy 126.822079 90.644194) (xy 126.581059 90.544114) (xy 126.320086 90.543886) (xy 126.078891 90.643546) (xy 126.049386 90.673) (xy 125.127 90.673) (xy 125.127 87.057096) (xy 125.183788 86.972107) (xy 125.186902 86.956454) (xy 125.222001 86.78) (xy 125.222 86.779995) (xy 125.222 86.645804) (xy 125.438941 86.735886) (xy 125.699914 86.736114) (xy 125.941109 86.636454) (xy 126.061824 86.51595) (xy 126.249914 86.516114) (xy 126.491109 86.416454) (xy 126.494075 86.413493) (xy 126.493886 86.629914) (xy 126.593546 86.871109) (xy 126.648 86.925658) (xy 126.648 87.605341) (xy 126.584765 87.631469) (xy 126.400068 87.815844) (xy 126.299988 88.056864) (xy 126.29976 88.317837) (xy 126.39942 88.559032) (xy 126.583795 88.743729) (xy 126.721511 88.800913) (xy 126.544194 88.977921) (xy 126.444114 89.218941) (xy 126.443886 89.479914) (xy 126.543546 89.721109) (xy 126.727921 89.905806) (xy 126.968941 90.005886) (xy 127.229914 90.006114) (xy 127.471109 89.906454) (xy 127.655806 89.722079) (xy 127.736526 89.527684) (xy 127.948941 89.615886) (xy 128.209914 89.616114) (xy 128.418533 89.529914) (xy 129.743886 89.529914) (xy 129.843546 89.771109) (xy 130.027921 89.955806) (xy 130.268941 90.055886) (xy 130.529914 90.056114) (xy 130.771109 89.956454) (xy 130.955806 89.772079) (xy 131.055886 89.531059) (xy 131.056114 89.270086) (xy 130.956454 89.028891) (xy 130.772079 88.844194) (xy 130.531059 88.744114) (xy 130.270086 88.743886) (xy 130.028891 88.843546) (xy 129.844194 89.027921) (xy 129.744114 89.268941) (xy 129.743886 89.529914) (xy 128.418533 89.529914) (xy 128.451109 89.516454) (xy 128.635806 89.332079) (xy 128.735886 89.091059) (xy 128.736037 88.918071) (xy 128.778941 88.935886) (xy 129.039914 88.936114) (xy 129.281109 88.836454) (xy 129.465806 88.652079) (xy 129.565886 88.411059) (xy 129.566114 88.150086) (xy 129.466454 87.908891) (xy 129.282079 87.724194) (xy 129.041059 87.624114) (xy 128.780086 87.623886) (xy 128.650407 87.677468) (xy 128.655806 87.672079) (xy 128.755886 87.431059) (xy 128.756114 87.170086) (xy 128.656454 86.928891) (xy 128.472079 86.744194) (xy 128.231059 86.644114) (xy 127.970086 86.643886) (xy 127.76545 86.72844) (xy 127.805886 86.631059) (xy 127.806114 86.370086) (xy 127.759476 86.257213) (xy 127.948941 86.335886) (xy 128.209914 86.336114) (xy 128.451109 86.236454) (xy 128.635806 86.052079) (xy 128.735886 85.811059) (xy 128.736114 85.550086) (xy 128.636454 85.308891) (xy 128.452079 85.124194) (xy 128.211059 85.024114) (xy 127.950086 85.023886) (xy 127.708891 85.123546) (xy 127.524194 85.307921) (xy 127.424114 85.548941) (xy 127.423886 85.809914) (xy 127.470524 85.922787) (xy 127.281059 85.844114) (xy 127.020086 85.843886) (xy 126.778891 85.943546) (xy 126.775925 85.946507) (xy 126.776114 85.730086) (xy 126.708323 85.566019) (xy 126.805886 85.331059) (xy 126.806114 85.070086) (xy 126.706454 84.828891) (xy 126.702 84.824429) (xy 126.702 84.790036) (xy 126.813934 84.790134) (xy 127.055129 84.690474) (xy 127.239826 84.506099) (xy 127.339906 84.265079) (xy 127.340134 84.004106) (xy 127.240474 83.762911) (xy 127.056099 83.578214) (xy 126.815079 83.478134) (xy 126.702 83.478035) (xy 126.702 83.44211) (xy 126.925373 83.349814) (xy 126.98429 83.291) (xy 127.477255 83.783964) (xy 127.477257 83.783967) (xy 127.574885 83.849199) (xy 127.640117 83.892787) (xy 127.832225 83.930999) (xy 128.36906 83.930999) (xy 128.368886 84.129914) (xy 128.468546 84.371109) (xy 128.652921 84.555806) (xy 128.893941 84.655886) (xy 129.154914 84.656114) (xy 129.396109 84.556454) (xy 129.43741 84.515225) (xy 129.477921 84.555806) (xy 129.718941 84.655886) (xy 129.979914 84.656114) (xy 130.028546 84.63602) (xy 129.994114 84.718941) (xy 129.993886 84.979914) (xy 130.093546 85.221109) (xy 130.147232 85.274889) (xy 130.144194 85.277921) (xy 130.044114 85.518941) (xy 130.043886 85.779914) (xy 130.131127 85.991053) (xy 130.094194 86.027921) (xy 129.994114 86.268941) (xy 129.993886 86.529914) (xy 130.028563 86.61384) (xy 129.981059 86.594114) (xy 129.720086 86.593886) (xy 129.478891 86.693546) (xy 129.294194 86.877921) (xy 129.194114 87.118941) (xy 129.193886 87.379914) (xy 129.293546 87.621109) (xy 129.477921 87.805806) (xy 129.718941 87.905886) (xy 129.979914 87.906114) (xy 130.221109 87.806454) (xy 130.405806 87.622079) (xy 130.505886 87.381059) (xy 130.506114 87.120086) (xy 130.471437 87.03616) (xy 130.518941 87.055886) (xy 130.779914 87.056114) (xy 131.021109 86.956454) (xy 131.205806 86.772079) (xy 131.305886 86.531059) (xy 131.306114 86.270086) (xy 131.218873 86.058947) (xy 131.255806 86.022079) (xy 131.355886 85.781059) (xy 131.356114 85.520086) (xy 131.256454 85.278891) (xy 131.202768 85.225111) (xy 131.205806 85.222079) (xy 131.305886 84.981059) (xy 131.30593 84.929914) (xy 134.003886 84.929914) (xy 134.103546 85.171109) (xy 134.287921 85.355806) (xy 134.528941 85.455886) (xy 134.789914 85.456114) (xy 135.031109 85.356454) (xy 135.215806 85.172079) (xy 135.315886 84.931059) (xy 135.316114 84.670086) (xy 135.216454 84.428891) (xy 135.032079 84.244194) (xy 134.791059 84.144114) (xy 134.530086 84.143886) (xy 134.288891 84.243546) (xy 134.104194 84.427921) (xy 134.004114 84.668941) (xy 134.003886 84.929914) (xy 131.30593 84.929914) (xy 131.306114 84.720086) (xy 131.206454 84.478891) (xy 131.022079 84.294194) (xy 130.781059 84.194114) (xy 130.520086 84.193886) (xy 130.471454 84.21398) (xy 130.505886 84.131059) (xy 130.506076 83.914077) (xy 130.613108 83.892787) (xy 130.668139 83.856016) (xy 130.779914 83.856114) (xy 131.021109 83.756454) (xy 131.049889 83.727725) (xy 131.077921 83.755806) (xy 131.318941 83.855886) (xy 131.579914 83.856114) (xy 131.821109 83.756454) (xy 132.005806 83.572079) (xy 132.105886 83.331059) (xy 132.106114 83.070086) (xy 132.018883 82.858972) (xy 132.035806 82.842079) (xy 132.135886 82.601059) (xy 132.136114 82.340086) (xy 132.036454 82.098891) (xy 131.852079 81.914194) (xy 131.611059 81.814114) (xy 131.350086 81.813886) (xy 131.280278 81.84273) (xy 131.305886 81.781059) (xy 131.306114 81.520086) (xy 131.206454 81.278891) (xy 131.152725 81.225068) (xy 131.205806 81.172079) (xy 131.305886 80.931059) (xy 131.306114 80.670086) (xy 131.218873 80.458947) (xy 131.255806 80.422079) (xy 131.355886 80.181059) (xy 131.356114 79.920086) (xy 131.256454 79.678891) (xy 131.072079 79.494194) (xy 130.831059 79.394114) (xy 130.753982 79.394047) (xy 130.654968 79.295032) (xy 130.492107 79.186212) (xy 130.405949 79.169074) (xy 130.406114 78.980086) (xy 130.306454 78.738891) (xy 130.122079 78.554194) (xy 129.881059 78.454114) (xy 129.620086 78.453886) (xy 129.378891 78.553546) (xy 129.342136 78.590237) (xy 129.231059 78.544114) (xy 129.153982 78.544047) (xy 128.904968 78.295032) (xy 128.742107 78.186212) (xy 128.55 78.147999) (xy 128.549995 78.148) (xy 128.357935 78.148) (xy 128.236935 78.027) (xy 130.061529 78.027) (xy 130.044114 78.068941) (xy 130.043886 78.329914) (xy 130.143546 78.571109) (xy 130.327921 78.755806) (xy 130.568941 78.855886) (xy 130.829914 78.856114) (xy 131.044028 78.767644) (xy 131.043886 78.929914) (xy 131.143546 79.171109) (xy 131.327921 79.355806) (xy 131.568941 79.455886) (xy 131.829914 79.456114) (xy 132.071109 79.356454) (xy 132.255806 79.172079) (xy 132.355886 78.931059) (xy 132.356114 78.670086) (xy 132.256454 78.428891) (xy 132.072079 78.244194) (xy 131.831059 78.144114) (xy 131.570086 78.143886) (xy 131.355972 78.232356) (xy 131.356114 78.070086) (xy 131.338311 78.027) (xy 133.619322 78.027) (xy 133.737921 78.145806) (xy 133.978941 78.245886) (xy 134.239914 78.246114) (xy 134.481109 78.146454) (xy 134.665806 77.962079) (xy 134.765886 77.721059) (xy 134.766114 77.460086) (xy 134.666454 77.218891) (xy 134.482079 77.034194) (xy 134.241059 76.934114) (xy 134.077 76.933971) (xy 134.077 74.895893) (xy 134.329914 74.896114) (xy 134.571109 74.796454) (xy 134.755806 74.612079) (xy 134.855886 74.371059) (xy 134.856114 74.110086) (xy 134.756454 73.868891) (xy 134.572079 73.684194) (xy 134.331059 73.584114) (xy 134.077 73.583892) (xy 134.077 72.466111) (xy 134.079914 72.466114) (xy 134.321109 72.366454) (xy 134.414014 72.273711) (xy 134.413886 72.419914) (xy 134.513546 72.661109) (xy 134.697921 72.845806) (xy 134.938941 72.945886) (xy 135.199914 72.946114) (xy 135.441109 72.846454) (xy 135.625806 72.662079) (xy 135.725886 72.421059) (xy 135.726114 72.160086) (xy 135.626454 71.918891) (xy 135.442079 71.734194) (xy 135.201059 71.634114) (xy 134.940086 71.633886) (xy 134.698891 71.733546) (xy 134.605986 71.826289) (xy 134.606114 71.680086) (xy 134.506454 71.438891) (xy 134.322079 71.254194) (xy 134.081059 71.154114) (xy 134.068364 71.154103) (xy 134.047798 71.044804) (xy 134.027 71.012483) (xy 134.027 70.399914) (xy 134.733886 70.399914) (xy 134.833546 70.641109) (xy 135.017921 70.825806) (xy 135.258941 70.925886) (xy 135.519914 70.926114) (xy 135.761109 70.826454) (xy 135.945806 70.642079) (xy 136.045886 70.401059) (xy 136.046114 70.140086) (xy 135.946454 69.898891) (xy 135.762079 69.714194) (xy 135.521059 69.614114) (xy 135.260086 69.613886) (xy 135.018891 69.713546) (xy 134.834194 69.897921) (xy 134.734114 70.138941) (xy 134.733886 70.399914) (xy 134.027 70.399914) (xy 134.027 68.627) (xy 141.523 68.627) ) ) ) (zone (net 1) (net_name GND) (layer In1.Cu) (tstamp 559AAAFD) (hatch edge 0.508) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 114.2 103.6) (xy 114.2 65.45) (xy 152.45 65.45) (xy 152.45 103.6) (xy 151.7 103.6) ) ) (filled_polygon (pts (xy 120.433835 68.795553) (xy 120.3394 69.27031) (xy 120.3394 69.62969) (xy 120.433835 70.104447) (xy 120.702763 70.506927) (xy 121.105243 70.775855) (xy 121.58 70.87029) (xy 122.054757 70.775855) (xy 122.457237 70.506927) (xy 122.726165 70.104447) (xy 122.8206 69.62969) (xy 122.8206 69.27031) (xy 122.726165 68.795553) (xy 122.580133 68.577) (xy 123.119867 68.577) (xy 122.973835 68.795553) (xy 122.8794 69.27031) (xy 122.8794 69.62969) (xy 122.973835 70.104447) (xy 123.242763 70.506927) (xy 123.645243 70.775855) (xy 124.12 70.87029) (xy 124.594757 70.775855) (xy 124.878995 70.585934) (xy 125.006281 70.713442) (xy 125.22893 70.805894) (xy 125.470012 70.806105) (xy 125.692823 70.714041) (xy 125.853171 70.553972) (xy 126.185243 70.775855) (xy 126.66 70.87029) (xy 127.134757 70.775855) (xy 127.537237 70.506927) (xy 127.7014 70.261239) (xy 127.7014 70.592309) (xy 127.798073 70.825698) (xy 127.976701 71.004327) (xy 128.21009 71.101) (xy 128.91425 71.101) (xy 129.073 70.94225) (xy 129.073 69.577) (xy 129.327 69.577) (xy 129.327 70.94225) (xy 129.48575 71.101) (xy 130.18991 71.101) (xy 130.423299 71.004327) (xy 130.601927 70.825698) (xy 130.6986 70.592309) (xy 130.6986 70.390012) (xy 134.783895 70.390012) (xy 134.875959 70.612823) (xy 135.046281 70.783442) (xy 135.26893 70.875894) (xy 135.510012 70.876105) (xy 135.732823 70.784041) (xy 135.903442 70.613719) (xy 135.995894 70.39107) (xy 135.996105 70.149988) (xy 135.904041 69.927177) (xy 135.733719 69.756558) (xy 135.51107 69.664106) (xy 135.269988 69.663895) (xy 135.047177 69.755959) (xy 134.876558 69.926281) (xy 134.784106 70.14893) (xy 134.783895 70.390012) (xy 130.6986 70.390012) (xy 130.6986 69.73575) (xy 130.53985 69.577) (xy 129.327 69.577) (xy 129.073 69.577) (xy 129.053 69.577) (xy 129.053 69.323) (xy 129.073 69.323) (xy 129.073 69.303) (xy 129.327 69.303) (xy 129.327 69.323) (xy 130.53985 69.323) (xy 130.6986 69.16425) (xy 130.6986 68.577) (xy 142.697392 68.577) (xy 142.802793 68.682401) (xy 142.421682 68.915358) (xy 142.011633 69.923184) (xy 142.018475 71.011214) (xy 142.421682 71.984642) (xy 142.802795 72.2176) (xy 144.570395 70.45) (xy 144.556253 70.435858) (xy 144.735858 70.256253) (xy 144.75 70.270395) (xy 144.764143 70.256253) (xy 144.943748 70.435858) (xy 144.929605 70.45) (xy 146.697205 72.2176) (xy 147.078318 71.984642) (xy 147.488367 70.976816) (xy 147.481525 69.888786) (xy 147.452384 69.818433) (xy 147.63893 69.895894) (xy 147.880012 69.896105) (xy 148.102823 69.804041) (xy 148.273442 69.633719) (xy 148.365894 69.41107) (xy 148.366105 69.169988) (xy 148.274041 68.947177) (xy 148.103719 68.776558) (xy 147.88107 68.684106) (xy 147.639988 68.683895) (xy 147.417177 68.775959) (xy 147.246558 68.946281) (xy 147.168747 69.133672) (xy 147.078318 68.915358) (xy 146.697207 68.682401) (xy 146.802608 68.577) (xy 149.623 68.577) (xy 149.623 74.297392) (xy 149.517599 74.402793) (xy 149.284642 74.021682) (xy 148.276816 73.611633) (xy 147.188786 73.618475) (xy 146.215358 74.021682) (xy 145.9824 74.402795) (xy 147.75 76.170395) (xy 147.764143 76.156253) (xy 147.943748 76.335858) (xy 147.929605 76.35) (xy 147.943748 76.364143) (xy 147.764143 76.543748) (xy 147.75 76.529605) (xy 145.9824 78.297205) (xy 146.215358 78.678318) (xy 147.223184 79.088367) (xy 148.311214 79.081525) (xy 149.284642 78.678318) (xy 149.517599 78.297207) (xy 149.623 78.402608) (xy 149.623 91.619822) (xy 149.56107 91.594106) (xy 149.319988 91.593895) (xy 149.097177 91.685959) (xy 148.926558 91.856281) (xy 148.834106 92.07893) (xy 148.833895 92.320012) (xy 148.925959 92.542823) (xy 149.096281 92.713442) (xy 149.31893 92.805894) (xy 149.560012 92.806105) (xy 149.623 92.780079) (xy 149.623 93.332473) (xy 149.534041 93.117177) (xy 149.363719 92.946558) (xy 149.14107 92.854106) (xy 148.899988 92.853895) (xy 148.677177 92.945959) (xy 148.506558 93.116281) (xy 148.505051 93.119911) (xy 148.49107 93.114106) (xy 148.249988 93.113895) (xy 148.027177 93.205959) (xy 147.856558 93.376281) (xy 147.764106 93.59893) (xy 147.763895 93.840012) (xy 147.855959 94.062823) (xy 148.026281 94.233442) (xy 148.24893 94.325894) (xy 148.490012 94.326105) (xy 148.712823 94.234041) (xy 148.883442 94.063719) (xy 148.884949 94.060089) (xy 148.89893 94.065894) (xy 149.140012 94.066105) (xy 149.362823 93.974041) (xy 149.533442 93.803719) (xy 149.623 93.58804) (xy 149.623 101.073) (xy 147.084331 101.073) (xy 147.105894 101.02107) (xy 147.106105 100.779988) (xy 147.014041 100.557177) (xy 146.843719 100.386558) (xy 146.62107 100.294106) (xy 146.379988 100.293895) (xy 146.157177 100.385959) (xy 145.986558 100.556281) (xy 145.894106 100.77893) (xy 145.893895 101.020012) (xy 145.915789 101.073) (xy 143.084331 101.073) (xy 143.105894 101.02107) (xy 143.106105 100.779988) (xy 143.014041 100.557177) (xy 142.843719 100.386558) (xy 142.62107 100.294106) (xy 142.379988 100.293895) (xy 142.157177 100.385959) (xy 141.986558 100.556281) (xy 141.894106 100.77893) (xy 141.893895 101.020012) (xy 141.915789 101.073) (xy 133.934023 101.073) (xy 134.013442 100.993719) (xy 134.105894 100.77107) (xy 134.106105 100.529988) (xy 134.014041 100.307177) (xy 133.843719 100.136558) (xy 133.803872 100.120012) (xy 136.793895 100.120012) (xy 136.885959 100.342823) (xy 137.056281 100.513442) (xy 137.27893 100.605894) (xy 137.520012 100.606105) (xy 137.742823 100.514041) (xy 137.913442 100.343719) (xy 138.005894 100.12107) (xy 138.006105 99.879988) (xy 137.914041 99.657177) (xy 137.743719 99.486558) (xy 137.52107 99.394106) (xy 137.279988 99.393895) (xy 137.057177 99.485959) (xy 136.886558 99.656281) (xy 136.794106 99.87893) (xy 136.793895 100.120012) (xy 133.803872 100.120012) (xy 133.62107 100.044106) (xy 133.379988 100.043895) (xy 133.157177 100.135959) (xy 132.986558 100.306281) (xy 132.894106 100.52893) (xy 132.893895 100.770012) (xy 132.985959 100.992823) (xy 133.065996 101.073) (xy 126.367527 101.073) (xy 126.582823 100.984041) (xy 126.753442 100.813719) (xy 126.845894 100.59107) (xy 126.846105 100.349988) (xy 126.784136 100.200012) (xy 127.453895 100.200012) (xy 127.545959 100.422823) (xy 127.716281 100.593442) (xy 127.93893 100.685894) (xy 128.180012 100.686105) (xy 128.402823 100.594041) (xy 128.573442 100.423719) (xy 128.665894 100.20107) (xy 128.666105 99.959988) (xy 128.574041 99.737177) (xy 128.45708 99.620012) (xy 130.843895 99.620012) (xy 130.935959 99.842823) (xy 131.05225 99.959317) (xy 131.044106 99.97893) (xy 131.043895 100.220012) (xy 131.135959 100.442823) (xy 131.306281 100.613442) (xy 131.52893 100.705894) (xy 131.770012 100.706105) (xy 131.992823 100.614041) (xy 132.163442 100.443719) (xy 132.255894 100.22107) (xy 132.256105 99.979988) (xy 132.164041 99.757177) (xy 132.04775 99.640683) (xy 132.055894 99.62107) (xy 132.056105 99.379988) (xy 131.964041 99.157177) (xy 131.793719 98.986558) (xy 131.57107 98.894106) (xy 131.329988 98.893895) (xy 131.107177 98.985959) (xy 130.936558 99.156281) (xy 130.844106 99.37893) (xy 130.843895 99.620012) (xy 128.45708 99.620012) (xy 128.403719 99.566558) (xy 128.18107 99.474106) (xy 127.939988 99.473895) (xy 127.717177 99.565959) (xy 127.546558 99.736281) (xy 127.454106 99.95893) (xy 127.453895 100.200012) (xy 126.784136 100.200012) (xy 126.754041 100.127177) (xy 126.583719 99.956558) (xy 126.36107 99.864106) (xy 126.119988 99.863895) (xy 125.897177 99.955959) (xy 125.726558 100.126281) (xy 125.634106 100.34893) (xy 125.633895 100.590012) (xy 125.725959 100.812823) (xy 125.896281 100.983442) (xy 126.11196 101.073) (xy 123.423901 101.073) (xy 123.573442 100.923719) (xy 123.665894 100.70107) (xy 123.666105 100.459988) (xy 123.574041 100.237177) (xy 123.403719 100.066558) (xy 123.18107 99.974106) (xy 122.939988 99.973895) (xy 122.717177 100.065959) (xy 122.546558 100.236281) (xy 122.454106 100.45893) (xy 122.453895 100.700012) (xy 122.545959 100.922823) (xy 122.695875 101.073) (xy 121.042807 101.073) (xy 121.105894 100.92107) (xy 121.106105 100.679988) (xy 121.014041 100.457177) (xy 120.843719 100.286558) (xy 120.62107 100.194106) (xy 120.379988 100.193895) (xy 120.157177 100.285959) (xy 119.986558 100.456281) (xy 119.894106 100.67893) (xy 119.893895 100.920012) (xy 119.957109 101.073) (xy 118.177 101.073) (xy 118.177 98.940012) (xy 123.123895 98.940012) (xy 123.215959 99.162823) (xy 123.386281 99.333442) (xy 123.581602 99.414547) (xy 123.534106 99.52893) (xy 123.533895 99.770012) (xy 123.625959 99.992823) (xy 123.796281 100.163442) (xy 124.01893 100.255894) (xy 124.260012 100.256105) (xy 124.482823 100.164041) (xy 124.653442 99.993719) (xy 124.745894 99.77107) (xy 124.746105 99.529988) (xy 124.654041 99.307177) (xy 124.483719 99.136558) (xy 124.288398 99.055453) (xy 124.335894 98.94107) (xy 124.336105 98.699988) (xy 124.244041 98.477177) (xy 124.073719 98.306558) (xy 123.85107 98.214106) (xy 123.609988 98.213895) (xy 123.387177 98.305959) (xy 123.216558 98.476281) (xy 123.124106 98.69893) (xy 123.123895 98.940012) (xy 118.177 98.940012) (xy 118.177 98.170012) (xy 129.493895 98.170012) (xy 129.585959 98.392823) (xy 129.756281 98.563442) (xy 129.97893 98.655894) (xy 130.220012 98.656105) (xy 130.307363 98.620012) (xy 137.293895 98.620012) (xy 137.385959 98.842823) (xy 137.556281 99.013442) (xy 137.77893 99.105894) (xy 138.020012 99.106105) (xy 138.107363 99.070012) (xy 141.743895 99.070012) (xy 141.835959 99.292823) (xy 142.006281 99.463442) (xy 142.22893 99.555894) (xy 142.470012 99.556105) (xy 142.692823 99.464041) (xy 142.863442 99.293719) (xy 142.935571 99.120012) (xy 144.043895 99.120012) (xy 144.135959 99.342823) (xy 144.306281 99.513442) (xy 144.52893 99.605894) (xy 144.770012 99.606105) (xy 144.992823 99.514041) (xy 145.036928 99.470012) (xy 145.993895 99.470012) (xy 146.085959 99.692823) (xy 146.256281 99.863442) (xy 146.47893 99.955894) (xy 146.720012 99.956105) (xy 146.942823 99.864041) (xy 147.113442 99.693719) (xy 147.205894 99.47107) (xy 147.206105 99.229988) (xy 147.114041 99.007177) (xy 146.943719 98.836558) (xy 146.72107 98.744106) (xy 146.479988 98.743895) (xy 146.257177 98.835959) (xy 146.086558 99.006281) (xy 145.994106 99.22893) (xy 145.993895 99.470012) (xy 145.036928 99.470012) (xy 145.163442 99.343719) (xy 145.255894 99.12107) (xy 145.256105 98.879988) (xy 145.164041 98.657177) (xy 144.993719 98.486558) (xy 144.77107 98.394106) (xy 144.529988 98.393895) (xy 144.307177 98.485959) (xy 144.136558 98.656281) (xy 144.044106 98.87893) (xy 144.043895 99.120012) (xy 142.935571 99.120012) (xy 142.955894 99.07107) (xy 142.956105 98.829988) (xy 142.864041 98.607177) (xy 142.693719 98.436558) (xy 142.47107 98.344106) (xy 142.229988 98.343895) (xy 142.007177 98.435959) (xy 141.836558 98.606281) (xy 141.744106 98.82893) (xy 141.743895 99.070012) (xy 138.107363 99.070012) (xy 138.242823 99.014041) (xy 138.413442 98.843719) (xy 138.505894 98.62107) (xy 138.506105 98.379988) (xy 138.460664 98.270012) (xy 147.743895 98.270012) (xy 147.835959 98.492823) (xy 148.006281 98.663442) (xy 148.22893 98.755894) (xy 148.470012 98.756105) (xy 148.692823 98.664041) (xy 148.863442 98.493719) (xy 148.955894 98.27107) (xy 148.956105 98.029988) (xy 148.864041 97.807177) (xy 148.693719 97.636558) (xy 148.47107 97.544106) (xy 148.229988 97.543895) (xy 148.007177 97.635959) (xy 147.836558 97.806281) (xy 147.744106 98.02893) (xy 147.743895 98.270012) (xy 138.460664 98.270012) (xy 138.414041 98.157177) (xy 138.243719 97.986558) (xy 138.02107 97.894106) (xy 137.779988 97.893895) (xy 137.557177 97.985959) (xy 137.386558 98.156281) (xy 137.294106 98.37893) (xy 137.293895 98.620012) (xy 130.307363 98.620012) (xy 130.442823 98.564041) (xy 130.613442 98.393719) (xy 130.705894 98.17107) (xy 130.706105 97.929988) (xy 130.640004 97.770012) (xy 140.693895 97.770012) (xy 140.785959 97.992823) (xy 140.956281 98.163442) (xy 141.17893 98.255894) (xy 141.420012 98.256105) (xy 141.642823 98.164041) (xy 141.813442 97.993719) (xy 141.905894 97.77107) (xy 141.906105 97.529988) (xy 141.814041 97.307177) (xy 141.727028 97.220012) (xy 143.443895 97.220012) (xy 143.535959 97.442823) (xy 143.706281 97.613442) (xy 143.92893 97.705894) (xy 144.170012 97.706105) (xy 144.392823 97.614041) (xy 144.563442 97.443719) (xy 144.655894 97.22107) (xy 144.655894 97.220012) (xy 145.043895 97.220012) (xy 145.135959 97.442823) (xy 145.306281 97.613442) (xy 145.52893 97.705894) (xy 145.770012 97.706105) (xy 145.992823 97.614041) (xy 146.150037 97.4571) (xy 146.206281 97.513442) (xy 146.42893 97.605894) (xy 146.670012 97.606105) (xy 146.892823 97.514041) (xy 147.063442 97.343719) (xy 147.155894 97.12107) (xy 147.156105 96.879988) (xy 147.064041 96.657177) (xy 146.893719 96.486558) (xy 146.877955 96.480012) (xy 148.313895 96.480012) (xy 148.405959 96.702823) (xy 148.576281 96.873442) (xy 148.79893 96.965894) (xy 149.040012 96.966105) (xy 149.262823 96.874041) (xy 149.433442 96.703719) (xy 149.525894 96.48107) (xy 149.526105 96.239988) (xy 149.434041 96.017177) (xy 149.263719 95.846558) (xy 149.04107 95.754106) (xy 148.799988 95.753895) (xy 148.577177 95.845959) (xy 148.406558 96.016281) (xy 148.314106 96.23893) (xy 148.313895 96.480012) (xy 146.877955 96.480012) (xy 146.67107 96.394106) (xy 146.429988 96.393895) (xy 146.207177 96.485959) (xy 146.049963 96.6429) (xy 145.993719 96.586558) (xy 145.77107 96.494106) (xy 145.529988 96.493895) (xy 145.307177 96.585959) (xy 145.136558 96.756281) (xy 145.044106 96.97893) (xy 145.043895 97.220012) (xy 144.655894 97.220012) (xy 144.656105 96.979988) (xy 144.564041 96.757177) (xy 144.393719 96.586558) (xy 144.17107 96.494106) (xy 143.929988 96.493895) (xy 143.707177 96.585959) (xy 143.536558 96.756281) (xy 143.444106 96.97893) (xy 143.443895 97.220012) (xy 141.727028 97.220012) (xy 141.643719 97.136558) (xy 141.42107 97.044106) (xy 141.179988 97.043895) (xy 140.957177 97.135959) (xy 140.786558 97.306281) (xy 140.694106 97.52893) (xy 140.693895 97.770012) (xy 130.640004 97.770012) (xy 130.614041 97.707177) (xy 130.556401 97.649436) (xy 130.694746 97.706882) (xy 130.964073 97.707117) (xy 131.212989 97.604267) (xy 131.403598 97.41399) (xy 131.506882 97.165254) (xy 131.506883 97.164073) (xy 139.252883 97.164073) (xy 139.355733 97.412989) (xy 139.54601 97.603598) (xy 139.794746 97.706882) (xy 140.064073 97.707117) (xy 140.312989 97.604267) (xy 140.503598 97.41399) (xy 140.606882 97.165254) (xy 140.607117 96.895927) (xy 140.504267 96.647011) (xy 140.31399 96.456402) (xy 140.065254 96.353118) (xy 139.795927 96.352883) (xy 139.547011 96.455733) (xy 139.356402 96.64601) (xy 139.253118 96.894746) (xy 139.252883 97.164073) (xy 131.506883 97.164073) (xy 131.507117 96.895927) (xy 131.404267 96.647011) (xy 131.30347 96.546038) (xy 131.380012 96.546105) (xy 131.602823 96.454041) (xy 131.737085 96.320012) (xy 134.093895 96.320012) (xy 134.185959 96.542823) (xy 134.356281 96.713442) (xy 134.57893 96.805894) (xy 134.820012 96.806105) (xy 135.042823 96.714041) (xy 135.213442 96.543719) (xy 135.285571 96.370012) (xy 136.293895 96.370012) (xy 136.385959 96.592823) (xy 136.556281 96.763442) (xy 136.77893 96.855894) (xy 137.020012 96.856105) (xy 137.124983 96.812732) (xy 137.22893 96.855894) (xy 137.470012 96.856105) (xy 137.692823 96.764041) (xy 137.788632 96.668399) (xy 137.87893 96.705894) (xy 138.120012 96.706105) (xy 138.275107 96.642021) (xy 138.42893 96.705894) (xy 138.670012 96.706105) (xy 138.892823 96.614041) (xy 139.063442 96.443719) (xy 139.155894 96.22107) (xy 139.156105 95.979988) (xy 139.064041 95.757177) (xy 139.036924 95.730012) (xy 142.583895 95.730012) (xy 142.675959 95.952823) (xy 142.846281 96.123442) (xy 143.06893 96.215894) (xy 143.310012 96.216105) (xy 143.532823 96.124041) (xy 143.703442 95.953719) (xy 143.795894 95.73107) (xy 143.796105 95.489988) (xy 143.704041 95.267177) (xy 143.533719 95.096558) (xy 143.31107 95.004106) (xy 143.069988 95.003895) (xy 142.847177 95.095959) (xy 142.676558 95.266281) (xy 142.584106 95.48893) (xy 142.583895 95.730012) (xy 139.036924 95.730012) (xy 138.893719 95.586558) (xy 138.67107 95.494106) (xy 138.505961 95.493961) (xy 138.506105 95.329988) (xy 138.414041 95.107177) (xy 138.243719 94.936558) (xy 138.02107 94.844106) (xy 137.779988 94.843895) (xy 137.599832 94.918334) (xy 137.42107 94.844106) (xy 137.179988 94.843895) (xy 136.957177 94.935959) (xy 136.786558 95.106281) (xy 136.694106 95.32893) (xy 136.693895 95.570012) (xy 136.732526 95.663506) (xy 136.557177 95.735959) (xy 136.386558 95.906281) (xy 136.294106 96.12893) (xy 136.293895 96.370012) (xy 135.285571 96.370012) (xy 135.305894 96.32107) (xy 135.306105 96.079988) (xy 135.214041 95.857177) (xy 135.043719 95.686558) (xy 134.82107 95.594106) (xy 134.579988 95.593895) (xy 134.357177 95.685959) (xy 134.186558 95.856281) (xy 134.094106 96.07893) (xy 134.093895 96.320012) (xy 131.737085 96.320012) (xy 131.773442 96.283719) (xy 131.865894 96.06107) (xy 131.866105 95.819988) (xy 131.774041 95.597177) (xy 131.603719 95.426558) (xy 131.38107 95.334106) (xy 131.139988 95.333895) (xy 130.917177 95.425959) (xy 130.746558 95.596281) (xy 130.654106 95.81893) (xy 130.653895 96.060012) (xy 130.745959 96.282823) (xy 130.816002 96.352988) (xy 130.695927 96.352883) (xy 130.447011 96.455733) (xy 130.256402 96.64601) (xy 130.153118 96.894746) (xy 130.152883 97.164073) (xy 130.255733 97.412989) (xy 130.333328 97.49072) (xy 130.22107 97.444106) (xy 129.979988 97.443895) (xy 129.757177 97.535959) (xy 129.586558 97.706281) (xy 129.494106 97.92893) (xy 129.493895 98.170012) (xy 118.177 98.170012) (xy 118.177 97.240012) (xy 124.363895 97.240012) (xy 124.455959 97.462823) (xy 124.626281 97.633442) (xy 124.84893 97.725894) (xy 125.090012 97.726105) (xy 125.27417 97.650012) (xy 126.253895 97.650012) (xy 126.345959 97.872823) (xy 126.516281 98.043442) (xy 126.73893 98.135894) (xy 126.980012 98.136105) (xy 127.202823 98.044041) (xy 127.373442 97.873719) (xy 127.465894 97.65107) (xy 127.466105 97.409988) (xy 127.374041 97.187177) (xy 127.203719 97.016558) (xy 126.98107 96.924106) (xy 126.739988 96.923895) (xy 126.517177 97.015959) (xy 126.346558 97.186281) (xy 126.254106 97.40893) (xy 126.253895 97.650012) (xy 125.27417 97.650012) (xy 125.312823 97.634041) (xy 125.483442 97.463719) (xy 125.575894 97.24107) (xy 125.576105 96.999988) (xy 125.484041 96.777177) (xy 125.397028 96.690012) (xy 127.703895 96.690012) (xy 127.795959 96.912823) (xy 127.966281 97.083442) (xy 128.18893 97.175894) (xy 128.430012 97.176105) (xy 128.652823 97.084041) (xy 128.823442 96.913719) (xy 128.915894 96.69107) (xy 128.916105 96.449988) (xy 128.824041 96.227177) (xy 128.653719 96.056558) (xy 128.43107 95.964106) (xy 128.189988 95.963895) (xy 127.967177 96.055959) (xy 127.796558 96.226281) (xy 127.704106 96.44893) (xy 127.703895 96.690012) (xy 125.397028 96.690012) (xy 125.313719 96.606558) (xy 125.09107 96.514106) (xy 124.849988 96.513895) (xy 124.627177 96.605959) (xy 124.456558 96.776281) (xy 124.364106 96.99893) (xy 124.363895 97.240012) (xy 118.177 97.240012) (xy 118.177 95.380012) (xy 122.513895 95.380012) (xy 122.605959 95.602823) (xy 122.776281 95.773442) (xy 122.99893 95.865894) (xy 123.240012 95.866105) (xy 123.462823 95.774041) (xy 123.633442 95.603719) (xy 123.725894 95.38107) (xy 123.726105 95.139988) (xy 123.634041 94.917177) (xy 123.463719 94.746558) (xy 123.24107 94.654106) (xy 122.999988 94.653895) (xy 122.777177 94.745959) (xy 122.606558 94.916281) (xy 122.514106 95.13893) (xy 122.513895 95.380012) (xy 118.177 95.380012) (xy 118.177 94.320012) (xy 124.243895 94.320012) (xy 124.335959 94.542823) (xy 124.506281 94.713442) (xy 124.72893 94.805894) (xy 124.970012 94.806105) (xy 125.192823 94.714041) (xy 125.363442 94.543719) (xy 125.455894 94.32107) (xy 125.456026 94.170012) (xy 139.893895 94.170012) (xy 139.985959 94.392823) (xy 140.156281 94.563442) (xy 140.37893 94.655894) (xy 140.57077 94.656062) (xy 140.585959 94.692823) (xy 140.756281 94.863442) (xy 140.97893 94.955894) (xy 140.984021 94.955898) (xy 140.983895 95.100012) (xy 141.075959 95.322823) (xy 141.246281 95.493442) (xy 141.46893 95.585894) (xy 141.710012 95.586105) (xy 141.932823 95.494041) (xy 142.103442 95.323719) (xy 142.195894 95.10107) (xy 142.196105 94.859988) (xy 142.104041 94.637177) (xy 141.933719 94.466558) (xy 141.71107 94.374106) (xy 141.705979 94.374102) (xy 141.706105 94.229988) (xy 141.640004 94.070012) (xy 142.793895 94.070012) (xy 142.885959 94.292823) (xy 143.056281 94.463442) (xy 143.27893 94.555894) (xy 143.520012 94.556105) (xy 143.742823 94.464041) (xy 143.913442 94.293719) (xy 144.005894 94.07107) (xy 144.006004 93.945012) (xy 145.468895 93.945012) (xy 145.560959 94.167823) (xy 145.731281 94.338442) (xy 145.95393 94.430894) (xy 146.195012 94.431105) (xy 146.417823 94.339041) (xy 146.588442 94.168719) (xy 146.680894 93.94607) (xy 146.681105 93.704988) (xy 146.589041 93.482177) (xy 146.418719 93.311558) (xy 146.19607 93.219106) (xy 145.954988 93.218895) (xy 145.732177 93.310959) (xy 145.561558 93.481281) (xy 145.469106 93.70393) (xy 145.468895 93.945012) (xy 144.006004 93.945012) (xy 144.006105 93.829988) (xy 143.914041 93.607177) (xy 143.743719 93.436558) (xy 143.52107 93.344106) (xy 143.279988 93.343895) (xy 143.057177 93.435959) (xy 142.886558 93.606281) (xy 142.794106 93.82893) (xy 142.793895 94.070012) (xy 141.640004 94.070012) (xy 141.614041 94.007177) (xy 141.443719 93.836558) (xy 141.22107 93.744106) (xy 141.02923 93.743938) (xy 141.014041 93.707177) (xy 140.843719 93.536558) (xy 140.62107 93.444106) (xy 140.379988 93.443895) (xy 140.157177 93.535959) (xy 139.986558 93.706281) (xy 139.894106 93.92893) (xy 139.893895 94.170012) (xy 125.456026 94.170012) (xy 125.456105 94.079988) (xy 125.410329 93.969203) (xy 125.422823 93.964041) (xy 125.593442 93.793719) (xy 125.685894 93.57107) (xy 125.686105 93.329988) (xy 125.594041 93.107177) (xy 125.423719 92.936558) (xy 125.20107 92.844106) (xy 124.959988 92.843895) (xy 124.737177 92.935959) (xy 124.566558 93.106281) (xy 124.474106 93.32893) (xy 124.473895 93.570012) (xy 124.519671 93.680797) (xy 124.507177 93.685959) (xy 124.336558 93.856281) (xy 124.244106 94.07893) (xy 124.243895 94.320012) (xy 118.177 94.320012) (xy 118.177 92.710012) (xy 123.063895 92.710012) (xy 123.155959 92.932823) (xy 123.326281 93.103442) (xy 123.54893 93.195894) (xy 123.790012 93.196105) (xy 124.012823 93.104041) (xy 124.183442 92.933719) (xy 124.234695 92.810288) (xy 131.792798 92.810288) (xy 131.884862 93.033099) (xy 132.055184 93.203718) (xy 132.277833 93.29617) (xy 132.518915 93.296381) (xy 132.741726 93.204317) (xy 132.912345 93.033995) (xy 133.004797 92.811346) (xy 133.005008 92.570264) (xy 132.984245 92.520012) (xy 133.293895 92.520012) (xy 133.385959 92.742823) (xy 133.556281 92.913442) (xy 133.77893 93.005894) (xy 134.020012 93.006105) (xy 134.242823 92.914041) (xy 134.377085 92.780012) (xy 136.273895 92.780012) (xy 136.365959 93.002823) (xy 136.536281 93.173442) (xy 136.75893 93.265894) (xy 137.000012 93.266105) (xy 137.125033 93.214447) (xy 137.24893 93.265894) (xy 137.490012 93.266105) (xy 137.712823 93.174041) (xy 137.845037 93.042057) (xy 137.926281 93.123442) (xy 138.14893 93.215894) (xy 138.390012 93.216105) (xy 138.612823 93.124041) (xy 138.783442 92.953719) (xy 138.838962 92.820012) (xy 144.218895 92.820012) (xy 144.310959 93.042823) (xy 144.481281 93.213442) (xy 144.70393 93.305894) (xy 144.945012 93.306105) (xy 145.167823 93.214041) (xy 145.338442 93.043719) (xy 145.430894 92.82107) (xy 145.431105 92.579988) (xy 145.339041 92.357177) (xy 145.168719 92.186558) (xy 144.94607 92.094106) (xy 144.704988 92.093895) (xy 144.482177 92.185959) (xy 144.311558 92.356281) (xy 144.219106 92.57893) (xy 144.218895 92.820012) (xy 138.838962 92.820012) (xy 138.875894 92.73107) (xy 138.876105 92.489988) (xy 138.784041 92.267177) (xy 138.613719 92.096558) (xy 138.39107 92.004106) (xy 138.149988 92.003895) (xy 137.927177 92.095959) (xy 137.794963 92.227943) (xy 137.713719 92.146558) (xy 137.49107 92.054106) (xy 137.249988 92.053895) (xy 137.124967 92.105553) (xy 137.00107 92.054106) (xy 136.759988 92.053895) (xy 136.537177 92.145959) (xy 136.366558 92.316281) (xy 136.274106 92.53893) (xy 136.273895 92.780012) (xy 134.377085 92.780012) (xy 134.413442 92.743719) (xy 134.505894 92.52107) (xy 134.505995 92.406093) (xy 134.520012 92.406105) (xy 134.742823 92.314041) (xy 134.913442 92.143719) (xy 135.005894 91.92107) (xy 135.006105 91.679988) (xy 134.914041 91.457177) (xy 134.876941 91.420012) (xy 138.253895 91.420012) (xy 138.345959 91.642823) (xy 138.516281 91.813442) (xy 138.73893 91.905894) (xy 138.980012 91.906105) (xy 139.202823 91.814041) (xy 139.373442 91.643719) (xy 139.465894 91.42107) (xy 139.466048 91.245012) (xy 146.243895 91.245012) (xy 146.335959 91.467823) (xy 146.506281 91.638442) (xy 146.72893 91.730894) (xy 146.970012 91.731105) (xy 147.192823 91.639041) (xy 147.363442 91.468719) (xy 147.455894 91.24607) (xy 147.456105 91.004988) (xy 147.364041 90.782177) (xy 147.193719 90.611558) (xy 146.97107 90.519106) (xy 146.729988 90.518895) (xy 146.507177 90.610959) (xy 146.336558 90.781281) (xy 146.244106 91.00393) (xy 146.243895 91.245012) (xy 139.466048 91.245012) (xy 139.466105 91.179988) (xy 139.440146 91.117162) (xy 139.475894 91.03107) (xy 139.476105 90.789988) (xy 139.384041 90.567177) (xy 139.213719 90.396558) (xy 138.99107 90.304106) (xy 138.749988 90.303895) (xy 138.527177 90.395959) (xy 138.356558 90.566281) (xy 138.264106 90.78893) (xy 138.263895 91.030012) (xy 138.289854 91.092838) (xy 138.254106 91.17893) (xy 138.253895 91.420012) (xy 134.876941 91.420012) (xy 134.743719 91.286558) (xy 134.52107 91.194106) (xy 134.279988 91.193895) (xy 134.057177 91.285959) (xy 133.886558 91.456281) (xy 133.794106 91.67893) (xy 133.794005 91.793907) (xy 133.779988 91.793895) (xy 133.557177 91.885959) (xy 133.386558 92.056281) (xy 133.294106 92.27893) (xy 133.293895 92.520012) (xy 132.984245 92.520012) (xy 132.912944 92.347453) (xy 132.742622 92.176834) (xy 132.519973 92.084382) (xy 132.278891 92.084171) (xy 132.05608 92.176235) (xy 131.885461 92.346557) (xy 131.793009 92.569206) (xy 131.792798 92.810288) (xy 124.234695 92.810288) (xy 124.275894 92.71107) (xy 124.276105 92.469988) (xy 124.184041 92.247177) (xy 124.013719 92.076558) (xy 123.79107 91.984106) (xy 123.549988 91.983895) (xy 123.327177 92.075959) (xy 123.156558 92.246281) (xy 123.064106 92.46893) (xy 123.063895 92.710012) (xy 118.177 92.710012) (xy 118.177 91.937893) (xy 118.38893 92.025894) (xy 118.630012 92.026105) (xy 118.852823 91.934041) (xy 118.856859 91.930012) (xy 125.673895 91.930012) (xy 125.765959 92.152823) (xy 125.936281 92.323442) (xy 126.15893 92.415894) (xy 126.400012 92.416105) (xy 126.622823 92.324041) (xy 126.793442 92.153719) (xy 126.885894 91.93107) (xy 126.886061 91.740012) (xy 131.163895 91.740012) (xy 131.255959 91.962823) (xy 131.426281 92.133442) (xy 131.64893 92.225894) (xy 131.890012 92.226105) (xy 132.112823 92.134041) (xy 132.283442 91.963719) (xy 132.375894 91.74107) (xy 132.376105 91.499988) (xy 132.284041 91.277177) (xy 132.113719 91.106558) (xy 131.89107 91.014106) (xy 131.649988 91.013895) (xy 131.427177 91.105959) (xy 131.256558 91.276281) (xy 131.164106 91.49893) (xy 131.163895 91.740012) (xy 126.886061 91.740012) (xy 126.886105 91.689988) (xy 126.794041 91.467177) (xy 126.623719 91.296558) (xy 126.40107 91.204106) (xy 126.159988 91.203895) (xy 125.937177 91.295959) (xy 125.766558 91.466281) (xy 125.674106 91.68893) (xy 125.673895 91.930012) (xy 118.856859 91.930012) (xy 119.023442 91.763719) (xy 119.115894 91.54107) (xy 119.116105 91.299988) (xy 119.066483 91.179893) (xy 119.12031 91.1906) (xy 119.47969 91.1906) (xy 119.733214 91.140171) (xy 119.785959 91.267823) (xy 119.956281 91.438442) (xy 120.17893 91.530894) (xy 120.420012 91.531105) (xy 120.642823 91.439041) (xy 120.813442 91.268719) (xy 120.905894 91.04607) (xy 120.906091 90.820012) (xy 123.293895 90.820012) (xy 123.385959 91.042823) (xy 123.556281 91.213442) (xy 123.77893 91.305894) (xy 124.020012 91.306105) (xy 124.242823 91.214041) (xy 124.413442 91.043719) (xy 124.505894 90.82107) (xy 124.506105 90.579988) (xy 124.414041 90.357177) (xy 124.243719 90.186558) (xy 124.02107 90.094106) (xy 123.779988 90.093895) (xy 123.557177 90.185959) (xy 123.386558 90.356281) (xy 123.294106 90.57893) (xy 123.293895 90.820012) (xy 120.906091 90.820012) (xy 120.906105 90.804988) (xy 120.814041 90.582177) (xy 120.643719 90.411558) (xy 120.629643 90.405713) (xy 120.72029 89.95) (xy 120.691636 89.805949) (xy 120.870012 89.806105) (xy 121.092823 89.714041) (xy 121.263442 89.543719) (xy 121.273286 89.520012) (xy 124.443895 89.520012) (xy 124.518334 89.700168) (xy 124.444106 89.87893) (xy 124.443895 90.120012) (xy 124.535959 90.342823) (xy 124.706281 90.513442) (xy 124.92893 90.605894) (xy 125.170012 90.606105) (xy 125.392823 90.514041) (xy 125.563442 90.343719) (xy 125.655894 90.12107) (xy 125.656105 89.879988) (xy 125.581666 89.699832) (xy 125.635571 89.570012) (xy 132.143895 89.570012) (xy 132.235959 89.792823) (xy 132.406281 89.963442) (xy 132.62893 90.055894) (xy 132.870012 90.056105) (xy 133.092823 89.964041) (xy 133.263442 89.793719) (xy 133.309952 89.68171) (xy 133.309875 89.770012) (xy 133.401939 89.992823) (xy 133.572261 90.163442) (xy 133.79491 90.255894) (xy 134.035992 90.256105) (xy 134.258803 90.164041) (xy 134.429422 89.993719) (xy 134.521874 89.77107) (xy 134.522085 89.529988) (xy 134.430021 89.307177) (xy 134.259699 89.136558) (xy 134.03705 89.044106) (xy 133.795968 89.043895) (xy 133.573157 89.135959) (xy 133.402538 89.306281) (xy 133.356028 89.41829) (xy 133.356105 89.329988) (xy 133.264041 89.107177) (xy 133.163095 89.006055) (xy 133.220012 89.006105) (xy 133.442823 88.914041) (xy 133.613442 88.743719) (xy 133.705894 88.52107) (xy 133.706105 88.279988) (xy 133.651162 88.147015) (xy 134.07668 88.147015) (xy 134.168744 88.369826) (xy 134.339066 88.540445) (xy 134.561715 88.632897) (xy 134.802797 88.633108) (xy 135.025608 88.541044) (xy 135.054816 88.511887) (xy 135.106281 88.563442) (xy 135.32893 88.655894) (xy 135.570012 88.656105) (xy 135.792823 88.564041) (xy 135.963442 88.393719) (xy 135.990821 88.327784) (xy 136.164974 88.400099) (xy 135.957177 88.485959) (xy 135.786558 88.656281) (xy 135.694106 88.87893) (xy 135.693895 89.120012) (xy 135.785959 89.342823) (xy 135.956281 89.513442) (xy 136.17893 89.605894) (xy 136.420012 89.606105) (xy 136.642823 89.514041) (xy 136.813442 89.343719) (xy 136.905894 89.12107) (xy 136.905939 89.070168) (xy 136.935959 89.142823) (xy 137.106281 89.313442) (xy 137.194263 89.349975) (xy 137.107177 89.385959) (xy 136.936558 89.556281) (xy 136.844106 89.77893) (xy 136.843895 90.020012) (xy 136.935959 90.242823) (xy 137.106281 90.413442) (xy 137.32893 90.505894) (xy 137.570012 90.506105) (xy 137.792823 90.414041) (xy 137.963442 90.243719) (xy 138.055894 90.02107) (xy 138.055946 89.961257) (xy 138.242823 89.884041) (xy 138.413442 89.713719) (xy 138.505894 89.49107) (xy 138.506105 89.249988) (xy 138.414041 89.027177) (xy 138.243719 88.856558) (xy 138.056019 88.778618) (xy 138.056026 88.770012) (xy 140.593895 88.770012) (xy 140.685959 88.992823) (xy 140.856281 89.163442) (xy 141.07893 89.255894) (xy 141.320012 89.256105) (xy 141.542823 89.164041) (xy 141.713442 88.993719) (xy 141.749975 88.905737) (xy 141.785959 88.992823) (xy 141.956281 89.163442) (xy 142.17893 89.255894) (xy 142.420012 89.256105) (xy 142.642823 89.164041) (xy 142.813442 88.993719) (xy 142.823286 88.970012) (xy 145.283895 88.970012) (xy 145.375959 89.192823) (xy 145.546281 89.363442) (xy 145.76893 89.455894) (xy 146.010012 89.456105) (xy 146.232823 89.364041) (xy 146.403442 89.193719) (xy 146.495894 88.97107) (xy 146.496105 88.729988) (xy 146.404041 88.507177) (xy 146.233719 88.336558) (xy 146.01107 88.244106) (xy 145.769988 88.243895) (xy 145.547177 88.335959) (xy 145.376558 88.506281) (xy 145.284106 88.72893) (xy 145.283895 88.970012) (xy 142.823286 88.970012) (xy 142.905894 88.77107) (xy 142.906105 88.529988) (xy 142.814041 88.307177) (xy 142.643719 88.136558) (xy 142.42107 88.044106) (xy 142.179988 88.043895) (xy 141.957177 88.135959) (xy 141.786558 88.306281) (xy 141.750025 88.394263) (xy 141.714041 88.307177) (xy 141.543719 88.136558) (xy 141.32107 88.044106) (xy 141.079988 88.043895) (xy 140.857177 88.135959) (xy 140.686558 88.306281) (xy 140.594106 88.52893) (xy 140.593895 88.770012) (xy 138.056026 88.770012) (xy 138.056105 88.679988) (xy 137.964041 88.457177) (xy 137.793719 88.286558) (xy 137.57107 88.194106) (xy 137.329988 88.193895) (xy 137.107177 88.285959) (xy 136.936558 88.456281) (xy 136.844106 88.67893) (xy 136.844061 88.729832) (xy 136.814041 88.657177) (xy 136.643719 88.486558) (xy 136.435026 88.399901) (xy 136.642823 88.314041) (xy 136.813442 88.143719) (xy 136.905894 87.92107) (xy 136.906105 87.679988) (xy 136.823209 87.479366) (xy 136.83893 87.485894) (xy 136.90048 87.485948) (xy 136.985959 87.692823) (xy 137.156281 87.863442) (xy 137.37893 87.955894) (xy 137.620012 87.956105) (xy 137.842823 87.864041) (xy 138.013442 87.693719) (xy 138.078926 87.536017) (xy 138.180012 87.536105) (xy 138.402823 87.444041) (xy 138.573442 87.273719) (xy 138.665894 87.05107) (xy 138.665964 86.970012) (xy 145.243895 86.970012) (xy 145.335959 87.192823) (xy 145.506281 87.363442) (xy 145.72893 87.455894) (xy 145.970012 87.456105) (xy 146.192823 87.364041) (xy 146.363442 87.193719) (xy 146.455894 86.97107) (xy 146.456105 86.729988) (xy 146.389157 86.567962) (xy 146.413442 86.543719) (xy 146.505894 86.32107) (xy 146.506105 86.079988) (xy 146.414041 85.857177) (xy 146.243719 85.686558) (xy 146.02107 85.594106) (xy 145.779988 85.593895) (xy 145.557177 85.685959) (xy 145.386558 85.856281) (xy 145.294106 86.07893) (xy 145.293895 86.320012) (xy 145.360843 86.482038) (xy 145.336558 86.506281) (xy 145.244106 86.72893) (xy 145.243895 86.970012) (xy 138.665964 86.970012) (xy 138.666105 86.809988) (xy 138.574041 86.587177) (xy 138.550733 86.563828) (xy 138.622823 86.534041) (xy 138.793442 86.363719) (xy 138.885894 86.14107) (xy 138.886105 85.899988) (xy 138.794041 85.677177) (xy 138.687063 85.570012) (xy 140.443895 85.570012) (xy 140.535959 85.792823) (xy 140.706281 85.963442) (xy 140.92893 86.055894) (xy 141.170012 86.056105) (xy 141.392823 85.964041) (xy 141.563442 85.793719) (xy 141.655894 85.57107) (xy 141.656105 85.329988) (xy 141.564041 85.107177) (xy 141.526941 85.070012) (xy 145.193895 85.070012) (xy 145.285959 85.292823) (xy 145.456281 85.463442) (xy 145.67893 85.555894) (xy 145.920012 85.556105) (xy 146.142823 85.464041) (xy 146.313442 85.293719) (xy 146.405894 85.07107) (xy 146.406105 84.829988) (xy 146.314041 84.607177) (xy 146.143719 84.436558) (xy 145.92107 84.344106) (xy 145.679988 84.343895) (xy 145.457177 84.435959) (xy 145.286558 84.606281) (xy 145.194106 84.82893) (xy 145.193895 85.070012) (xy 141.526941 85.070012) (xy 141.393719 84.936558) (xy 141.17107 84.844106) (xy 140.929988 84.843895) (xy 140.707177 84.935959) (xy 140.536558 85.106281) (xy 140.444106 85.32893) (xy 140.443895 85.570012) (xy 138.687063 85.570012) (xy 138.623719 85.506558) (xy 138.40107 85.414106) (xy 138.159988 85.413895) (xy 137.937177 85.505959) (xy 137.766558 85.676281) (xy 137.674106 85.89893) (xy 137.674016 86.001939) (xy 137.63107 85.984106) (xy 137.389988 85.983895) (xy 137.167177 86.075959) (xy 136.996558 86.246281) (xy 136.985039 86.274022) (xy 136.839988 86.273895) (xy 136.762821 86.30578) (xy 136.693719 86.236558) (xy 136.47107 86.144106) (xy 136.229988 86.143895) (xy 136.007177 86.235959) (xy 135.836558 86.406281) (xy 135.744106 86.62893) (xy 135.743895 86.870012) (xy 135.835959 87.092823) (xy 136.006281 87.263442) (xy 136.00897 87.264559) (xy 135.957177 87.285959) (xy 135.786558 87.456281) (xy 135.759179 87.522216) (xy 135.57107 87.444106) (xy 135.329988 87.443895) (xy 135.107177 87.535959) (xy 135.077969 87.565116) (xy 135.026504 87.513561) (xy 134.803855 87.421109) (xy 134.562773 87.420898) (xy 134.339962 87.512962) (xy 134.169343 87.683284) (xy 134.076891 87.905933) (xy 134.07668 88.147015) (xy 133.651162 88.147015) (xy 133.614041 88.057177) (xy 133.443719 87.886558) (xy 133.22107 87.794106) (xy 132.979988 87.793895) (xy 132.757177 87.885959) (xy 132.586558 88.056281) (xy 132.494106 88.27893) (xy 132.493895 88.520012) (xy 132.585959 88.742823) (xy 132.686905 88.843945) (xy 132.629988 88.843895) (xy 132.407177 88.935959) (xy 132.236558 89.106281) (xy 132.144106 89.32893) (xy 132.143895 89.570012) (xy 125.635571 89.570012) (xy 125.655894 89.52107) (xy 125.656105 89.279988) (xy 125.564041 89.057177) (xy 125.393719 88.886558) (xy 125.17107 88.794106) (xy 124.929988 88.793895) (xy 124.707177 88.885959) (xy 124.536558 89.056281) (xy 124.444106 89.27893) (xy 124.443895 89.520012) (xy 121.273286 89.520012) (xy 121.355894 89.32107) (xy 121.356105 89.079988) (xy 121.264041 88.857177) (xy 121.093719 88.686558) (xy 120.87107 88.594106) (xy 120.629988 88.593895) (xy 120.407177 88.685959) (xy 120.236558 88.856281) (xy 120.192333 88.962785) (xy 119.954447 88.803835) (xy 119.47969 88.7094) (xy 119.12031 88.7094) (xy 118.645553 88.803835) (xy 118.243073 89.072763) (xy 118.177 89.171648) (xy 118.177 88.188352) (xy 118.243073 88.287237) (xy 118.645553 88.556165) (xy 119.12031 88.6506) (xy 119.47969 88.6506) (xy 119.954447 88.556165) (xy 120.356927 88.287237) (xy 120.625855 87.884757) (xy 120.642711 87.800012) (xy 125.613895 87.800012) (xy 125.705959 88.022823) (xy 125.876281 88.193442) (xy 126.09893 88.285894) (xy 126.340012 88.286105) (xy 126.349792 88.282064) (xy 126.349769 88.307935) (xy 126.441833 88.530746) (xy 126.612155 88.701365) (xy 126.834804 88.793817) (xy 127.075886 88.794028) (xy 127.298697 88.701964) (xy 127.371459 88.629328) (xy 127.405959 88.712823) (xy 127.491068 88.798081) (xy 127.474106 88.83893) (xy 127.473895 89.080012) (xy 127.565959 89.302823) (xy 127.736281 89.473442) (xy 127.95893 89.565894) (xy 128.200012 89.566105) (xy 128.422823 89.474041) (xy 128.593442 89.303719) (xy 128.685894 89.08107) (xy 128.686102 88.843196) (xy 128.78893 88.885894) (xy 129.030012 88.886105) (xy 129.252823 88.794041) (xy 129.423442 88.623719) (xy 129.515894 88.40107) (xy 129.516105 88.159988) (xy 129.424041 87.937177) (xy 129.253719 87.766558) (xy 129.03107 87.674106) (xy 128.789988 87.673895) (xy 128.567177 87.765959) (xy 128.396558 87.936281) (xy 128.380914 87.973957) (xy 128.263719 87.856558) (xy 128.04107 87.764106) (xy 127.799988 87.763895) (xy 127.577177 87.855959) (xy 127.504415 87.928595) (xy 127.469915 87.8451) (xy 127.299593 87.674481) (xy 127.076944 87.582029) (xy 126.835862 87.581818) (xy 126.826082 87.585859) (xy 126.826105 87.559988) (xy 126.734041 87.337177) (xy 126.726889 87.330012) (xy 130.033895 87.330012) (xy 130.125959 87.552823) (xy 130.296281 87.723442) (xy 130.494461 87.805734) (xy 130.42887 87.963694) (xy 130.428659 88.204776) (xy 130.520723 88.427587) (xy 130.691045 88.598206) (xy 130.913694 88.690658) (xy 131.154776 88.690869) (xy 131.377587 88.598805) (xy 131.548206 88.428483) (xy 131.640658 88.205834) (xy 131.640869 87.964752) (xy 131.548805 87.741941) (xy 131.378483 87.571322) (xy 131.180303 87.48903) (xy 131.245894 87.33107) (xy 131.246105 87.089988) (xy 131.154041 86.867177) (xy 131.097004 86.810041) (xy 131.163442 86.743719) (xy 131.255894 86.52107) (xy 131.256105 86.279988) (xy 131.164041 86.057177) (xy 130.993719 85.886558) (xy 130.77107 85.794106) (xy 130.529988 85.793895) (xy 130.307177 85.885959) (xy 130.136558 86.056281) (xy 130.044106 86.27893) (xy 130.043895 86.520012) (xy 130.135959 86.742823) (xy 130.192996 86.799959) (xy 130.126558 86.866281) (xy 130.034106 87.08893) (xy 130.033895 87.330012) (xy 126.726889 87.330012) (xy 126.563719 87.166558) (xy 126.34107 87.074106) (xy 126.099988 87.073895) (xy 125.877177 87.165959) (xy 125.706558 87.336281) (xy 125.614106 87.55893) (xy 125.613895 87.800012) (xy 120.642711 87.800012) (xy 120.72029 87.41) (xy 120.688467 87.250012) (xy 123.763895 87.250012) (xy 123.855959 87.472823) (xy 124.026281 87.643442) (xy 124.24893 87.735894) (xy 124.490012 87.736105) (xy 124.712823 87.644041) (xy 124.883442 87.473719) (xy 124.975894 87.25107) (xy 124.976105 87.009988) (xy 124.884041 86.787177) (xy 124.713719 86.616558) (xy 124.49107 86.524106) (xy 124.249988 86.523895) (xy 124.027177 86.615959) (xy 123.856558 86.786281) (xy 123.764106 87.00893) (xy 123.763895 87.250012) (xy 120.688467 87.250012) (xy 120.625855 86.935243) (xy 120.450522 86.672839) (xy 120.592823 86.614041) (xy 120.763442 86.443719) (xy 120.855894 86.22107) (xy 120.856105 85.979988) (xy 120.764041 85.757177) (xy 120.593719 85.586558) (xy 120.4924 85.544487) (xy 120.625855 85.344757) (xy 120.711022 84.916591) (xy 121.661113 84.916591) (xy 121.753177 85.139402) (xy 121.923499 85.310021) (xy 122.146148 85.402473) (xy 122.38723 85.402684) (xy 122.610041 85.31062) (xy 122.78066 85.140298) (xy 122.789083 85.120012) (xy 124.593895 85.120012) (xy 124.685959 85.342823) (xy 124.856281 85.513442) (xy 125.07893 85.605894) (xy 125.320012 85.606105) (xy 125.542823 85.514041) (xy 125.600342 85.456623) (xy 125.619609 85.503253) (xy 125.606558 85.516281) (xy 125.514106 85.73893) (xy 125.513895 85.980012) (xy 125.605959 86.202823) (xy 125.776281 86.373442) (xy 125.99893 86.465894) (xy 126.240012 86.466105) (xy 126.462823 86.374041) (xy 126.60512 86.231991) (xy 126.544106 86.37893) (xy 126.543895 86.620012) (xy 126.635959 86.842823) (xy 126.806281 87.013442) (xy 127.02893 87.105894) (xy 127.270012 87.106105) (xy 127.492823 87.014041) (xy 127.663442 86.843719) (xy 127.755894 86.62107) (xy 127.756105 86.379988) (xy 127.664041 86.157177) (xy 127.493719 85.986558) (xy 127.27107 85.894106) (xy 127.029988 85.893895) (xy 126.807177 85.985959) (xy 126.66488 86.128009) (xy 126.725894 85.98107) (xy 126.726052 85.800012) (xy 127.473895 85.800012) (xy 127.565959 86.022823) (xy 127.736281 86.193442) (xy 127.95893 86.285894) (xy 128.200012 86.286105) (xy 128.422823 86.194041) (xy 128.519379 86.097653) (xy 128.444106 86.27893) (xy 128.443895 86.520012) (xy 128.535959 86.742823) (xy 128.706281 86.913442) (xy 128.92893 87.005894) (xy 129.170012 87.006105) (xy 129.392823 86.914041) (xy 129.563442 86.743719) (xy 129.655894 86.52107) (xy 129.656105 86.279988) (xy 129.564041 86.057177) (xy 129.393719 85.886558) (xy 129.17107 85.794106) (xy 128.929988 85.793895) (xy 128.707177 85.885959) (xy 128.610621 85.982347) (xy 128.685894 85.80107) (xy 128.686105 85.559988) (xy 128.594041 85.337177) (xy 128.423719 85.166558) (xy 128.20107 85.074106) (xy 127.959988 85.073895) (xy 127.737177 85.165959) (xy 127.566558 85.336281) (xy 127.474106 85.55893) (xy 127.473895 85.800012) (xy 126.726052 85.800012) (xy 126.726105 85.739988) (xy 126.650391 85.556747) (xy 126.663442 85.543719) (xy 126.755894 85.32107) (xy 126.756105 85.079988) (xy 126.664041 84.857177) (xy 126.535677 84.728589) (xy 126.56295 84.739914) (xy 126.804032 84.740125) (xy 127.026843 84.648061) (xy 127.197462 84.477739) (xy 127.289914 84.25509) (xy 127.290032 84.120012) (xy 128.418895 84.120012) (xy 128.510959 84.342823) (xy 128.681281 84.513442) (xy 128.90393 84.605894) (xy 129.145012 84.606105) (xy 129.326193 84.531242) (xy 129.244106 84.72893) (xy 129.243895 84.970012) (xy 129.335959 85.192823) (xy 129.506281 85.363442) (xy 129.72893 85.455894) (xy 129.970012 85.456105) (xy 130.192823 85.364041) (xy 130.363442 85.193719) (xy 130.455894 84.97107) (xy 130.455938 84.920012) (xy 130.843895 84.920012) (xy 130.935959 85.142823) (xy 131.106281 85.313442) (xy 131.32893 85.405894) (xy 131.570012 85.406105) (xy 131.695954 85.354067) (xy 131.644106 85.47893) (xy 131.643895 85.720012) (xy 131.735959 85.942823) (xy 131.906281 86.113442) (xy 132.12893 86.205894) (xy 132.370012 86.206105) (xy 132.495954 86.154067) (xy 132.444106 86.27893) (xy 132.443895 86.520012) (xy 132.535959 86.742823) (xy 132.706281 86.913442) (xy 132.92893 87.005894) (xy 133.170012 87.006105) (xy 133.392823 86.914041) (xy 133.563442 86.743719) (xy 133.655894 86.52107) (xy 133.655894 86.520012) (xy 134.043895 86.520012) (xy 134.135959 86.742823) (xy 134.306281 86.913442) (xy 134.52893 87.005894) (xy 134.770012 87.006105) (xy 134.992823 86.914041) (xy 135.163442 86.743719) (xy 135.255894 86.52107) (xy 135.256105 86.279988) (xy 135.164041 86.057177) (xy 134.993719 85.886558) (xy 134.77107 85.794106) (xy 134.529988 85.793895) (xy 134.307177 85.885959) (xy 134.136558 86.056281) (xy 134.044106 86.27893) (xy 134.043895 86.520012) (xy 133.655894 86.520012) (xy 133.656105 86.279988) (xy 133.564041 86.057177) (xy 133.393719 85.886558) (xy 133.17107 85.794106) (xy 132.929988 85.793895) (xy 132.804046 85.845933) (xy 132.855894 85.72107) (xy 132.856105 85.479988) (xy 132.764041 85.257177) (xy 132.707013 85.20005) (xy 132.763442 85.143719) (xy 132.855894 84.92107) (xy 132.855894 84.920012) (xy 134.053895 84.920012) (xy 134.145959 85.142823) (xy 134.316281 85.313442) (xy 134.53893 85.405894) (xy 134.780012 85.406105) (xy 135.002823 85.314041) (xy 135.173442 85.143719) (xy 135.265894 84.92107) (xy 135.266105 84.679988) (xy 135.174041 84.457177) (xy 135.003719 84.286558) (xy 134.78107 84.194106) (xy 134.539988 84.193895) (xy 134.317177 84.285959) (xy 134.146558 84.456281) (xy 134.054106 84.67893) (xy 134.053895 84.920012) (xy 132.855894 84.920012) (xy 132.856105 84.679988) (xy 132.764041 84.457177) (xy 132.593719 84.286558) (xy 132.37107 84.194106) (xy 132.129988 84.193895) (xy 131.907177 84.285959) (xy 131.85005 84.342987) (xy 131.793719 84.286558) (xy 131.57107 84.194106) (xy 131.329988 84.193895) (xy 131.107177 84.285959) (xy 130.936558 84.456281) (xy 130.844106 84.67893) (xy 130.843895 84.920012) (xy 130.455938 84.920012) (xy 130.456105 84.729988) (xy 130.364041 84.507177) (xy 130.282013 84.425006) (xy 130.363442 84.343719) (xy 130.455894 84.12107) (xy 130.456105 83.879988) (xy 130.404067 83.754046) (xy 130.52893 83.805894) (xy 130.770012 83.806105) (xy 130.992823 83.714041) (xy 131.04995 83.657013) (xy 131.106281 83.713442) (xy 131.32893 83.805894) (xy 131.570012 83.806105) (xy 131.792823 83.714041) (xy 131.963442 83.543719) (xy 132.055894 83.32107) (xy 132.056105 83.079988) (xy 131.964041 82.857177) (xy 131.956987 82.850111) (xy 131.993442 82.813719) (xy 132.085894 82.59107) (xy 132.085912 82.570012) (xy 132.393895 82.570012) (xy 132.485959 82.792823) (xy 132.5929 82.89995) (xy 132.586558 82.906281) (xy 132.494106 83.12893) (xy 132.493895 83.370012) (xy 132.585959 83.592823) (xy 132.756281 83.763442) (xy 132.97893 83.855894) (xy 133.220012 83.856105) (xy 133.442823 83.764041) (xy 133.613442 83.593719) (xy 133.705894 83.37107) (xy 133.706105 83.129988) (xy 133.614041 82.907177) (xy 133.5071 82.80005) (xy 133.513442 82.793719) (xy 133.605894 82.57107) (xy 133.606105 82.329988) (xy 133.518773 82.118629) (xy 133.72893 82.205894) (xy 133.970012 82.206105) (xy 134.192823 82.114041) (xy 134.24995 82.057013) (xy 134.306281 82.113442) (xy 134.52893 82.205894) (xy 134.770012 82.206105) (xy 134.992823 82.114041) (xy 135.04995 82.057013) (xy 135.106281 82.113442) (xy 135.32893 82.205894) (xy 135.570012 82.206105) (xy 135.792823 82.114041) (xy 135.840249 82.066698) (xy 135.894193 82.197252) (xy 136.00337 82.30662) (xy 135.994106 82.32893) (xy 135.993895 82.570012) (xy 136.031615 82.661302) (xy 135.986558 82.706281) (xy 135.894106 82.92893) (xy 135.893895 83.170012) (xy 135.985959 83.392823) (xy 136.156281 83.563442) (xy 136.208094 83.584957) (xy 136.086558 83.706281) (xy 135.994106 83.92893) (xy 135.993895 84.170012) (xy 136.085959 84.392823) (xy 136.256281 84.563442) (xy 136.47893 84.655894) (xy 136.720012 84.656105) (xy 136.919197 84.573803) (xy 136.826558 84.666281) (xy 136.734106 84.88893) (xy 136.733895 85.130012) (xy 136.825959 85.352823) (xy 136.996281 85.523442) (xy 137.21893 85.615894) (xy 137.460012 85.616105) (xy 137.682823 85.524041) (xy 137.853442 85.353719) (xy 137.945894 85.13107) (xy 137.946105 84.889988) (xy 137.854041 84.667177) (xy 137.683719 84.496558) (xy 137.46107 84.404106) (xy 137.219988 84.403895) (xy 137.020803 84.486197) (xy 137.113442 84.393719) (xy 137.205894 84.17107) (xy 137.206105 83.929988) (xy 137.123477 83.730012) (xy 137.523895 83.730012) (xy 137.615959 83.952823) (xy 137.786281 84.123442) (xy 138.00893 84.215894) (xy 138.250012 84.216105) (xy 138.361565 84.170012) (xy 140.443895 84.170012) (xy 140.535959 84.392823) (xy 140.706281 84.563442) (xy 140.92893 84.655894) (xy 141.170012 84.656105) (xy 141.392823 84.564041) (xy 141.563442 84.393719) (xy 141.655894 84.17107) (xy 141.656105 83.929988) (xy 141.610664 83.820012) (xy 147.793895 83.820012) (xy 147.885959 84.042823) (xy 148.056281 84.213442) (xy 148.27893 84.305894) (xy 148.520012 84.306105) (xy 148.742823 84.214041) (xy 148.913442 84.043719) (xy 148.92913 84.005938) (xy 149.120012 84.006105) (xy 149.342823 83.914041) (xy 149.513442 83.743719) (xy 149.605894 83.52107) (xy 149.606105 83.279988) (xy 149.514041 83.057177) (xy 149.343719 82.886558) (xy 149.12107 82.794106) (xy 148.879988 82.793895) (xy 148.657177 82.885959) (xy 148.486558 83.056281) (xy 148.47087 83.094062) (xy 148.279988 83.093895) (xy 148.057177 83.185959) (xy 147.886558 83.356281) (xy 147.794106 83.57893) (xy 147.793895 83.820012) (xy 141.610664 83.820012) (xy 141.564041 83.707177) (xy 141.393719 83.536558) (xy 141.17107 83.444106) (xy 140.929988 83.443895) (xy 140.707177 83.535959) (xy 140.536558 83.706281) (xy 140.444106 83.92893) (xy 140.443895 84.170012) (xy 138.361565 84.170012) (xy 138.472823 84.124041) (xy 138.643442 83.953719) (xy 138.735894 83.73107) (xy 138.736105 83.489988) (xy 138.644041 83.267177) (xy 138.473719 83.096558) (xy 138.25107 83.004106) (xy 138.009988 83.003895) (xy 137.787177 83.095959) (xy 137.616558 83.266281) (xy 137.524106 83.48893) (xy 137.523895 83.730012) (xy 137.123477 83.730012) (xy 137.114041 83.707177) (xy 136.943719 83.536558) (xy 136.891906 83.515043) (xy 137.013442 83.393719) (xy 137.105894 83.17107) (xy 137.106105 82.929988) (xy 137.068385 82.838698) (xy 137.113442 82.793719) (xy 137.205894 82.57107) (xy 137.206105 82.329988) (xy 137.114041 82.107177) (xy 137.076941 82.070012) (xy 140.543895 82.070012) (xy 140.635959 82.292823) (xy 140.806281 82.463442) (xy 141.02893 82.555894) (xy 141.10492 82.555961) (xy 141.018514 82.764048) (xy 141.018303 83.00513) (xy 141.110367 83.227941) (xy 141.280689 83.39856) (xy 141.503338 83.491012) (xy 141.74442 83.491223) (xy 141.967231 83.399159) (xy 142.13785 83.228837) (xy 142.162276 83.170012) (xy 145.293895 83.170012) (xy 145.385959 83.392823) (xy 145.556281 83.563442) (xy 145.77893 83.655894) (xy 146.020012 83.656105) (xy 146.242823 83.564041) (xy 146.413442 83.393719) (xy 146.505894 83.17107) (xy 146.506105 82.929988) (xy 146.414041 82.707177) (xy 146.243719 82.536558) (xy 146.02107 82.444106) (xy 145.779988 82.443895) (xy 145.557177 82.535959) (xy 145.386558 82.706281) (xy 145.294106 82.92893) (xy 145.293895 83.170012) (xy 142.162276 83.170012) (xy 142.230302 83.006188) (xy 142.230513 82.765106) (xy 142.138449 82.542295) (xy 141.968127 82.371676) (xy 141.745478 82.279224) (xy 141.669488 82.279157) (xy 141.755894 82.07107) (xy 141.756105 81.829988) (xy 141.669345 81.620012) (xy 145.243895 81.620012) (xy 145.335959 81.842823) (xy 145.506281 82.013442) (xy 145.72893 82.105894) (xy 145.970012 82.106105) (xy 146.192823 82.014041) (xy 146.363442 81.843719) (xy 146.455894 81.62107) (xy 146.456105 81.379988) (xy 146.409609 81.267459) (xy 146.463442 81.213719) (xy 146.555894 80.99107) (xy 146.556105 80.749988) (xy 146.464041 80.527177) (xy 146.293719 80.356558) (xy 146.07107 80.264106) (xy 145.829988 80.263895) (xy 145.607177 80.355959) (xy 145.436558 80.526281) (xy 145.344106 80.74893) (xy 145.343895 80.990012) (xy 145.390391 81.102541) (xy 145.336558 81.156281) (xy 145.244106 81.37893) (xy 145.243895 81.620012) (xy 141.669345 81.620012) (xy 141.664041 81.607177) (xy 141.627359 81.570431) (xy 141.642823 81.564041) (xy 141.667885 81.539022) (xy 141.82893 81.605894) (xy 142.070012 81.606105) (xy 142.292823 81.514041) (xy 142.463442 81.343719) (xy 142.555894 81.12107) (xy 142.555938 81.070601) (xy 142.692823 81.014041) (xy 142.863442 80.843719) (xy 142.955894 80.62107) (xy 142.956105 80.379988) (xy 142.910664 80.270012) (xy 143.093895 80.270012) (xy 143.185959 80.492823) (xy 143.356281 80.663442) (xy 143.57893 80.755894) (xy 143.820012 80.756105) (xy 144.042823 80.664041) (xy 144.213442 80.493719) (xy 144.305894 80.27107) (xy 144.306105 80.029988) (xy 144.214041 79.807177) (xy 144.043719 79.636558) (xy 143.82107 79.544106) (xy 143.579988 79.543895) (xy 143.357177 79.635959) (xy 143.186558 79.806281) (xy 143.094106 80.02893) (xy 143.093895 80.270012) (xy 142.910664 80.270012) (xy 142.864041 80.157177) (xy 142.693719 79.986558) (xy 142.47107 79.894106) (xy 142.229988 79.893895) (xy 142.007177 79.985959) (xy 141.836558 80.156281) (xy 141.744106 80.37893) (xy 141.744062 80.429399) (xy 141.607177 80.485959) (xy 141.582115 80.510978) (xy 141.42107 80.444106) (xy 141.179988 80.443895) (xy 140.957177 80.535959) (xy 140.786558 80.706281) (xy 140.694106 80.92893) (xy 140.693895 81.170012) (xy 140.785959 81.392823) (xy 140.822641 81.429569) (xy 140.807177 81.435959) (xy 140.636558 81.606281) (xy 140.544106 81.82893) (xy 140.543895 82.070012) (xy 137.076941 82.070012) (xy 137.004864 81.997809) (xy 137.014128 81.975499) (xy 137.014339 81.734417) (xy 136.922275 81.511606) (xy 136.830841 81.420012) (xy 137.193895 81.420012) (xy 137.285959 81.642823) (xy 137.456281 81.813442) (xy 137.67893 81.905894) (xy 137.920012 81.906105) (xy 138.142823 81.814041) (xy 138.199994 81.75697) (xy 138.306281 81.863442) (xy 138.52893 81.955894) (xy 138.770012 81.956105) (xy 138.992823 81.864041) (xy 139.163442 81.693719) (xy 139.255894 81.47107) (xy 139.256105 81.229988) (xy 139.164041 81.007177) (xy 138.993719 80.836558) (xy 138.77107 80.744106) (xy 138.529988 80.743895) (xy 138.307177 80.835959) (xy 138.250006 80.89303) (xy 138.143719 80.786558) (xy 137.92107 80.694106) (xy 137.679988 80.693895) (xy 137.457177 80.785959) (xy 137.286558 80.956281) (xy 137.194106 81.17893) (xy 137.193895 81.420012) (xy 136.830841 81.420012) (xy 136.751953 81.340987) (xy 136.547381 81.256041) (xy 136.620012 81.256105) (xy 136.842823 81.164041) (xy 137.013442 80.993719) (xy 137.105894 80.77107) (xy 137.106105 80.529988) (xy 137.014041 80.307177) (xy 136.843719 80.136558) (xy 136.815952 80.125028) (xy 136.816105 79.949988) (xy 136.741741 79.770012) (xy 137.993895 79.770012) (xy 138.085959 79.992823) (xy 138.256281 80.163442) (xy 138.47893 80.255894) (xy 138.720012 80.256105) (xy 138.942823 80.164041) (xy 139.113442 79.993719) (xy 139.205894 79.77107) (xy 139.206105 79.529988) (xy 139.114041 79.307177) (xy 138.943719 79.136558) (xy 138.72107 79.044106) (xy 138.479988 79.043895) (xy 138.257177 79.135959) (xy 138.086558 79.306281) (xy 137.994106 79.52893) (xy 137.993895 79.770012) (xy 136.741741 79.770012) (xy 136.724041 79.727177) (xy 136.553719 79.556558) (xy 136.33107 79.464106) (xy 136.089988 79.463895) (xy 135.867177 79.555959) (xy 135.696558 79.726281) (xy 135.604106 79.94893) (xy 135.603895 80.190012) (xy 135.695959 80.412823) (xy 135.866281 80.583442) (xy 135.894048 80.594972) (xy 135.893895 80.770012) (xy 135.985959 80.992823) (xy 136.156281 81.163442) (xy 136.360853 81.248388) (xy 136.288222 81.248324) (xy 136.065411 81.340388) (xy 136.017985 81.387731) (xy 135.964041 81.257177) (xy 135.793719 81.086558) (xy 135.57107 80.994106) (xy 135.329988 80.993895) (xy 135.107177 81.085959) (xy 135.05005 81.142987) (xy 134.993719 81.086558) (xy 134.77107 80.994106) (xy 134.529988 80.993895) (xy 134.372499 81.058968) (xy 134.411309 80.965504) (xy 134.41152 80.724422) (xy 134.319456 80.501611) (xy 134.149134 80.330992) (xy 133.926485 80.23854) (xy 133.685403 80.238329) (xy 133.462592 80.330393) (xy 133.291973 80.500715) (xy 133.199521 80.723364) (xy 133.19931 80.964446) (xy 133.244891 81.074759) (xy 133.17107 81.044106) (xy 132.929988 81.043895) (xy 132.707177 81.135959) (xy 132.536558 81.306281) (xy 132.444106 81.52893) (xy 132.443895 81.770012) (xy 132.535959 81.992823) (xy 132.56803 82.02495) (xy 132.486558 82.106281) (xy 132.394106 82.32893) (xy 132.393895 82.570012) (xy 132.085912 82.570012) (xy 132.086105 82.349988) (xy 131.994041 82.127177) (xy 131.823719 81.956558) (xy 131.60107 81.864106) (xy 131.359988 81.863895) (xy 131.137177 81.955959) (xy 130.966558 82.126281) (xy 130.874106 82.34893) (xy 130.873895 82.590012) (xy 130.897233 82.646493) (xy 130.77107 82.594106) (xy 130.529988 82.593895) (xy 130.384916 82.653838) (xy 130.435894 82.53107) (xy 130.436105 82.289988) (xy 130.344041 82.067177) (xy 130.173719 81.896558) (xy 129.95107 81.804106) (xy 129.709988 81.803895) (xy 129.487177 81.895959) (xy 129.316558 82.066281) (xy 129.224106 82.28893) (xy 129.223895 82.530012) (xy 129.315959 82.752823) (xy 129.486281 82.923442) (xy 129.70893 83.015894) (xy 129.950012 83.016105) (xy 130.095084 82.956162) (xy 130.044106 83.07893) (xy 130.043895 83.320012) (xy 130.095933 83.445954) (xy 129.97107 83.394106) (xy 129.729988 83.393895) (xy 129.507177 83.485959) (xy 129.437528 83.555487) (xy 129.368719 83.486558) (xy 129.14607 83.394106) (xy 128.904988 83.393895) (xy 128.682177 83.485959) (xy 128.511558 83.656281) (xy 128.419106 83.87893) (xy 128.418895 84.120012) (xy 127.290032 84.120012) (xy 127.290125 84.014008) (xy 127.198061 83.791197) (xy 127.027739 83.620578) (xy 126.80509 83.528126) (xy 126.564008 83.527915) (xy 126.341197 83.619979) (xy 126.170578 83.790301) (xy 126.078126 84.01295) (xy 126.078024 84.130041) (xy 125.87107 84.044106) (xy 125.629988 84.043895) (xy 125.407177 84.135959) (xy 125.236558 84.306281) (xy 125.200134 84.394) (xy 125.079988 84.393895) (xy 124.857177 84.485959) (xy 124.686558 84.656281) (xy 124.594106 84.87893) (xy 124.593895 85.120012) (xy 122.789083 85.120012) (xy 122.873112 84.917649) (xy 122.873323 84.676567) (xy 122.781259 84.453756) (xy 122.610937 84.283137) (xy 122.388288 84.190685) (xy 122.147206 84.190474) (xy 121.924395 84.282538) (xy 121.753776 84.45286) (xy 121.661324 84.675509) (xy 121.661113 84.916591) (xy 120.711022 84.916591) (xy 120.72029 84.87) (xy 120.625855 84.395243) (xy 120.356927 83.992763) (xy 119.954447 83.723835) (xy 119.47969 83.6294) (xy 119.12031 83.6294) (xy 118.645553 83.723835) (xy 118.243073 83.992763) (xy 118.177 84.091648) (xy 118.177 83.108352) (xy 118.243073 83.207237) (xy 118.645553 83.476165) (xy 119.12031 83.5706) (xy 119.47969 83.5706) (xy 119.954447 83.476165) (xy 120.356927 83.207237) (xy 120.508753 82.980012) (xy 123.133895 82.980012) (xy 123.225959 83.202823) (xy 123.396281 83.373442) (xy 123.61893 83.465894) (xy 123.860012 83.466105) (xy 124.082823 83.374041) (xy 124.253442 83.203719) (xy 124.33653 83.003621) (xy 124.376281 83.043442) (xy 124.59893 83.135894) (xy 124.840012 83.136105) (xy 125.062823 83.044041) (xy 125.193719 82.913372) (xy 125.948159 82.913372) (xy 126.040223 83.136183) (xy 126.210545 83.306802) (xy 126.433194 83.399254) (xy 126.674276 83.399465) (xy 126.897087 83.307401) (xy 127.067706 83.137079) (xy 127.160158 82.91443) (xy 127.160369 82.673348) (xy 127.080484 82.480012) (xy 127.483895 82.480012) (xy 127.575959 82.702823) (xy 127.746281 82.873442) (xy 127.96893 82.965894) (xy 128.210012 82.966105) (xy 128.432823 82.874041) (xy 128.603442 82.703719) (xy 128.695894 82.48107) (xy 128.696105 82.239988) (xy 128.604041 82.017177) (xy 128.433719 81.846558) (xy 128.21107 81.754106) (xy 127.969988 81.753895) (xy 127.747177 81.845959) (xy 127.576558 82.016281) (xy 127.484106 82.23893) (xy 127.483895 82.480012) (xy 127.080484 82.480012) (xy 127.068305 82.450537) (xy 126.897983 82.279918) (xy 126.675334 82.187466) (xy 126.434252 82.187255) (xy 126.211441 82.279319) (xy 126.040822 82.449641) (xy 125.94837 82.67229) (xy 125.948159 82.913372) (xy 125.193719 82.913372) (xy 125.233442 82.873719) (xy 125.325894 82.65107) (xy 125.326105 82.409988) (xy 125.234041 82.187177) (xy 125.063719 82.016558) (xy 124.84107 81.924106) (xy 124.599988 81.923895) (xy 124.377177 82.015959) (xy 124.3643 82.028813) (xy 124.314041 81.907177) (xy 124.143719 81.736558) (xy 123.92107 81.644106) (xy 123.679988 81.643895) (xy 123.457177 81.735959) (xy 123.286558 81.906281) (xy 123.194106 82.12893) (xy 123.193895 82.370012) (xy 123.246222 82.496652) (xy 123.226558 82.516281) (xy 123.134106 82.73893) (xy 123.133895 82.980012) (xy 120.508753 82.980012) (xy 120.625855 82.804757) (xy 120.72029 82.33) (xy 120.625855 81.855243) (xy 120.356927 81.452763) (xy 119.954447 81.183835) (xy 119.47969 81.0894) (xy 119.12031 81.0894) (xy 118.645553 81.183835) (xy 118.243073 81.452763) (xy 118.177 81.551648) (xy 118.177 80.568352) (xy 118.243073 80.667237) (xy 118.645553 80.936165) (xy 119.12031 81.0306) (xy 119.47969 81.0306) (xy 119.954447 80.936165) (xy 120.053452 80.870012) (xy 125.743895 80.870012) (xy 125.835959 81.092823) (xy 126.006281 81.263442) (xy 126.22893 81.355894) (xy 126.470012 81.356105) (xy 126.692823 81.264041) (xy 126.863442 81.093719) (xy 126.946359 80.894032) (xy 128.433895 80.894032) (xy 128.525959 81.116843) (xy 128.696281 81.287462) (xy 128.91893 81.379914) (xy 129.160012 81.380125) (xy 129.382823 81.288061) (xy 129.553442 81.117739) (xy 129.635545 80.920012) (xy 130.043895 80.920012) (xy 130.135959 81.142823) (xy 130.306281 81.313442) (xy 130.52893 81.405894) (xy 130.770012 81.406105) (xy 130.992823 81.314041) (xy 131.163442 81.143719) (xy 131.255894 80.92107) (xy 131.256105 80.679988) (xy 131.164041 80.457177) (xy 131.15697 80.450093) (xy 131.213442 80.393719) (xy 131.305894 80.17107) (xy 131.305894 80.170012) (xy 131.693895 80.170012) (xy 131.785959 80.392823) (xy 131.956281 80.563442) (xy 132.17893 80.655894) (xy 132.420012 80.656105) (xy 132.642823 80.564041) (xy 132.813442 80.393719) (xy 132.905894 80.17107) (xy 132.906101 79.934129) (xy 133.07893 80.005894) (xy 133.320012 80.006105) (xy 133.542823 79.914041) (xy 133.650081 79.80697) (xy 133.806281 79.963442) (xy 134.02893 80.055894) (xy 134.270012 80.056105) (xy 134.492823 79.964041) (xy 134.663442 79.793719) (xy 134.755894 79.57107) (xy 134.756105 79.329988) (xy 134.664041 79.107177) (xy 134.552072 78.995012) (xy 135.968895 78.995012) (xy 136.060959 79.217823) (xy 136.231281 79.388442) (xy 136.45393 79.480894) (xy 136.695012 79.481105) (xy 136.917823 79.389041) (xy 137.088442 79.218719) (xy 137.180894 78.99607) (xy 137.181105 78.754988) (xy 137.089041 78.532177) (xy 136.918719 78.361558) (xy 136.69607 78.269106) (xy 136.454988 78.268895) (xy 136.232177 78.360959) (xy 136.061558 78.531281) (xy 135.969106 78.75393) (xy 135.968895 78.995012) (xy 134.552072 78.995012) (xy 134.493719 78.936558) (xy 134.27107 78.844106) (xy 134.029988 78.843895) (xy 133.807177 78.935959) (xy 133.699919 79.04303) (xy 133.543719 78.886558) (xy 133.32107 78.794106) (xy 133.079988 78.793895) (xy 132.857177 78.885959) (xy 132.686558 79.056281) (xy 132.594106 79.27893) (xy 132.593899 79.515871) (xy 132.42107 79.444106) (xy 132.179988 79.443895) (xy 131.957177 79.535959) (xy 131.786558 79.706281) (xy 131.694106 79.92893) (xy 131.693895 80.170012) (xy 131.305894 80.170012) (xy 131.306105 79.929988) (xy 131.214041 79.707177) (xy 131.043719 79.536558) (xy 130.82107 79.444106) (xy 130.579988 79.443895) (xy 130.357177 79.535959) (xy 130.186558 79.706281) (xy 130.094106 79.92893) (xy 130.093895 80.170012) (xy 130.185959 80.392823) (xy 130.19303 80.399907) (xy 130.136558 80.456281) (xy 130.044106 80.67893) (xy 130.043895 80.920012) (xy 129.635545 80.920012) (xy 129.645894 80.89509) (xy 129.646105 80.654008) (xy 129.554041 80.431197) (xy 129.383719 80.260578) (xy 129.16107 80.168126) (xy 128.919988 80.167915) (xy 128.697177 80.259979) (xy 128.526558 80.430301) (xy 128.434106 80.65295) (xy 128.433895 80.894032) (xy 126.946359 80.894032) (xy 126.955894 80.87107) (xy 126.956105 80.629988) (xy 126.864041 80.407177) (xy 126.723404 80.266294) (xy 126.983656 80.266294) (xy 127.07572 80.489105) (xy 127.246042 80.659724) (xy 127.468691 80.752176) (xy 127.709773 80.752387) (xy 127.932584 80.660323) (xy 128.103203 80.490001) (xy 128.195655 80.267352) (xy 128.195866 80.02627) (xy 128.103802 79.803459) (xy 127.978744 79.678183) (xy 128.113442 79.543719) (xy 128.205894 79.32107) (xy 128.205894 79.320012) (xy 128.493895 79.320012) (xy 128.585959 79.542823) (xy 128.756281 79.713442) (xy 128.97893 79.805894) (xy 129.220012 79.806105) (xy 129.442823 79.714041) (xy 129.496184 79.660773) (xy 129.62893 79.715894) (xy 129.870012 79.716105) (xy 130.092823 79.624041) (xy 130.263442 79.453719) (xy 130.355894 79.23107) (xy 130.356105 78.989988) (xy 130.264041 78.767177) (xy 130.093719 78.596558) (xy 129.87107 78.504106) (xy 129.629988 78.503895) (xy 129.407177 78.595959) (xy 129.353816 78.649227) (xy 129.22107 78.594106) (xy 128.979988 78.593895) (xy 128.757177 78.685959) (xy 128.586558 78.856281) (xy 128.494106 79.07893) (xy 128.493895 79.320012) (xy 128.205894 79.320012) (xy 128.206105 79.079988) (xy 128.114041 78.857177) (xy 127.943719 78.686558) (xy 127.72107 78.594106) (xy 127.479988 78.593895) (xy 127.257177 78.685959) (xy 127.086558 78.856281) (xy 126.994106 79.07893) (xy 126.993895 79.320012) (xy 127.085959 79.542823) (xy 127.211017 79.668099) (xy 127.076319 79.802563) (xy 126.983867 80.025212) (xy 126.983656 80.266294) (xy 126.723404 80.266294) (xy 126.693719 80.236558) (xy 126.47107 80.144106) (xy 126.229988 80.143895) (xy 126.007177 80.235959) (xy 125.836558 80.406281) (xy 125.744106 80.62893) (xy 125.743895 80.870012) (xy 120.053452 80.870012) (xy 120.356927 80.667237) (xy 120.625855 80.264757) (xy 120.712331 79.830012) (xy 123.123895 79.830012) (xy 123.215959 80.052823) (xy 123.386281 80.223442) (xy 123.60893 80.315894) (xy 123.850012 80.316105) (xy 124.072823 80.224041) (xy 124.243442 80.053719) (xy 124.335894 79.83107) (xy 124.336105 79.589988) (xy 124.244041 79.367177) (xy 124.073719 79.196558) (xy 123.85107 79.104106) (xy 123.609988 79.103895) (xy 123.387177 79.195959) (xy 123.216558 79.366281) (xy 123.124106 79.58893) (xy 123.123895 79.830012) (xy 120.712331 79.830012) (xy 120.72029 79.79) (xy 120.625855 79.315243) (xy 120.356927 78.912763) (xy 120.111239 78.7486) (xy 120.442309 78.7486) (xy 120.675698 78.651927) (xy 120.854327 78.473299) (xy 120.951 78.23991) (xy 120.951 77.980012) (xy 121.793895 77.980012) (xy 121.885959 78.202823) (xy 122.056281 78.373442) (xy 122.27893 78.465894) (xy 122.520012 78.466105) (xy 122.742823 78.374041) (xy 122.913442 78.203719) (xy 123.005894 77.98107) (xy 123.005903 77.970012) (xy 124.993895 77.970012) (xy 125.085959 78.192823) (xy 125.256281 78.363442) (xy 125.294018 78.379112) (xy 125.293895 78.520012) (xy 125.385959 78.742823) (xy 125.556281 78.913442) (xy 125.77893 79.005894) (xy 125.879417 79.005982) (xy 125.935959 79.142823) (xy 126.106281 79.313442) (xy 126.32893 79.405894) (xy 126.570012 79.406105) (xy 126.792823 79.314041) (xy 126.963442 79.143719) (xy 127.055894 78.92107) (xy 127.056105 78.679988) (xy 126.964041 78.457177) (xy 126.793719 78.286558) (xy 126.706656 78.250406) (xy 126.763442 78.193719) (xy 126.855894 77.97107) (xy 126.856105 77.729988) (xy 126.847852 77.710012) (xy 133.503895 77.710012) (xy 133.595959 77.932823) (xy 133.766281 78.103442) (xy 133.98893 78.195894) (xy 134.230012 78.196105) (xy 134.452823 78.104041) (xy 134.623442 77.933719) (xy 134.715894 77.71107) (xy 134.716105 77.469988) (xy 134.624041 77.247177) (xy 134.453719 77.076558) (xy 134.23107 76.984106) (xy 133.989988 76.983895) (xy 133.767177 77.075959) (xy 133.596558 77.246281) (xy 133.504106 77.46893) (xy 133.503895 77.710012) (xy 126.847852 77.710012) (xy 126.764041 77.507177) (xy 126.593719 77.336558) (xy 126.37107 77.244106) (xy 126.129988 77.243895) (xy 125.92477 77.32869) (xy 125.72107 77.244106) (xy 125.479988 77.243895) (xy 125.257177 77.335959) (xy 125.086558 77.506281) (xy 124.994106 77.72893) (xy 124.993895 77.970012) (xy 123.005903 77.970012) (xy 123.006105 77.739988) (xy 122.914041 77.517177) (xy 122.743719 77.346558) (xy 122.52107 77.254106) (xy 122.279988 77.253895) (xy 122.057177 77.345959) (xy 121.886558 77.516281) (xy 121.794106 77.73893) (xy 121.793895 77.980012) (xy 120.951 77.980012) (xy 120.951 77.53575) (xy 120.79225 77.377) (xy 119.427 77.377) (xy 119.427 77.397) (xy 119.173 77.397) (xy 119.173 77.377) (xy 119.153 77.377) (xy 119.153 77.123) (xy 119.173 77.123) (xy 119.173 77.103) (xy 119.427 77.103) (xy 119.427 77.123) (xy 120.79225 77.123) (xy 120.951 76.96425) (xy 120.951 76.26009) (xy 120.901263 76.140012) (xy 122.893895 76.140012) (xy 122.985959 76.362823) (xy 123.156281 76.533442) (xy 123.37893 76.625894) (xy 123.620012 76.626105) (xy 123.842823 76.534041) (xy 124.013442 76.363719) (xy 124.105894 76.14107) (xy 124.106105 75.899988) (xy 124.014041 75.677177) (xy 123.843719 75.506558) (xy 123.62107 75.414106) (xy 123.379988 75.413895) (xy 123.157177 75.505959) (xy 122.986558 75.676281) (xy 122.894106 75.89893) (xy 122.893895 76.140012) (xy 120.901263 76.140012) (xy 120.854327 76.026701) (xy 120.675698 75.848073) (xy 120.442309 75.7514) (xy 119.882746 75.7514) (xy 119.882907 75.566983) (xy 119.790843 75.344172) (xy 119.726795 75.280012) (xy 124.953895 75.280012) (xy 125.045959 75.502823) (xy 125.216281 75.673442) (xy 125.28012 75.69995) (xy 125.214106 75.85893) (xy 125.213895 76.100012) (xy 125.228568 76.135523) (xy 125.144106 76.33893) (xy 125.143895 76.580012) (xy 125.235959 76.802823) (xy 125.406281 76.973442) (xy 125.62893 77.065894) (xy 125.870012 77.066105) (xy 126.092823 76.974041) (xy 126.263442 76.803719) (xy 126.355894 76.58107) (xy 126.356105 76.339988) (xy 126.341432 76.304477) (xy 126.425894 76.10107) (xy 126.426105 75.859988) (xy 126.334041 75.637177) (xy 126.163719 75.466558) (xy 126.09988 75.44005) (xy 126.165894 75.28107) (xy 126.166078 75.070012) (xy 134.843895 75.070012) (xy 134.935959 75.292823) (xy 135.106281 75.463442) (xy 135.299341 75.543607) (xy 135.236558 75.606281) (xy 135.144106 75.82893) (xy 135.143895 76.070012) (xy 135.232917 76.285462) (xy 135.194106 76.37893) (xy 135.193895 76.620012) (xy 135.268334 76.800168) (xy 135.194106 76.97893) (xy 135.193895 77.220012) (xy 135.285959 77.442823) (xy 135.456281 77.613442) (xy 135.67893 77.705894) (xy 135.920012 77.706105) (xy 136.142823 77.614041) (xy 136.313442 77.443719) (xy 136.405894 77.22107) (xy 136.406105 76.979988) (xy 136.364854 76.880152) (xy 139.072536 76.880152) (xy 139.479226 77.864418) (xy 140.231621 78.618127) (xy 141.215176 79.026535) (xy 142.280152 79.027464) (xy 143.264418 78.620774) (xy 144.018127 77.868379) (xy 144.426535 76.884824) (xy 144.427461 75.823184) (xy 145.011633 75.823184) (xy 145.018475 76.911214) (xy 145.421682 77.884642) (xy 145.802795 78.1176) (xy 147.570395 76.35) (xy 145.802795 74.5824) (xy 145.421682 74.815358) (xy 145.011633 75.823184) (xy 144.427461 75.823184) (xy 144.427464 75.819848) (xy 144.020774 74.835582) (xy 143.268379 74.081873) (xy 142.284824 73.673465) (xy 141.219848 73.672536) (xy 140.235582 74.079226) (xy 139.481873 74.831621) (xy 139.073465 75.815176) (xy 139.072536 76.880152) (xy 136.364854 76.880152) (xy 136.331666 76.799832) (xy 136.405894 76.62107) (xy 136.406105 76.379988) (xy 136.317083 76.164538) (xy 136.355894 76.07107) (xy 136.356105 75.829988) (xy 136.264041 75.607177) (xy 136.093719 75.436558) (xy 135.900659 75.356393) (xy 135.963442 75.293719) (xy 136.055894 75.07107) (xy 136.056105 74.829988) (xy 135.964041 74.607177) (xy 135.793719 74.436558) (xy 135.57107 74.344106) (xy 135.329988 74.343895) (xy 135.107177 74.435959) (xy 134.936558 74.606281) (xy 134.844106 74.82893) (xy 134.843895 75.070012) (xy 126.166078 75.070012) (xy 126.166105 75.039988) (xy 126.074041 74.817177) (xy 125.903719 74.646558) (xy 125.68107 74.554106) (xy 125.439988 74.553895) (xy 125.217177 74.645959) (xy 125.046558 74.816281) (xy 124.954106 75.03893) (xy 124.953895 75.280012) (xy 119.726795 75.280012) (xy 119.620521 75.173553) (xy 119.397872 75.081101) (xy 119.15679 75.08089) (xy 118.933979 75.172954) (xy 118.76336 75.343276) (xy 118.670908 75.565925) (xy 118.670746 75.7514) (xy 118.177 75.7514) (xy 118.177 74.370012) (xy 119.453895 74.370012) (xy 119.545959 74.592823) (xy 119.716281 74.763442) (xy 119.93893 74.855894) (xy 120.180012 74.856105) (xy 120.402823 74.764041) (xy 120.573442 74.593719) (xy 120.665894 74.37107) (xy 120.666105 74.129988) (xy 120.600004 73.970012) (xy 124.943895 73.970012) (xy 125.035959 74.192823) (xy 125.206281 74.363442) (xy 125.42893 74.455894) (xy 125.670012 74.456105) (xy 125.892823 74.364041) (xy 126.063442 74.193719) (xy 126.155894 73.97107) (xy 126.156105 73.729988) (xy 126.064041 73.507177) (xy 125.893719 73.336558) (xy 125.67107 73.244106) (xy 125.429988 73.243895) (xy 125.207177 73.335959) (xy 125.036558 73.506281) (xy 124.944106 73.72893) (xy 124.943895 73.970012) (xy 120.600004 73.970012) (xy 120.574041 73.907177) (xy 120.403719 73.736558) (xy 120.18107 73.644106) (xy 119.939988 73.643895) (xy 119.717177 73.735959) (xy 119.546558 73.906281) (xy 119.454106 74.12893) (xy 119.453895 74.370012) (xy 118.177 74.370012) (xy 118.177 72.770012) (xy 120.293895 72.770012) (xy 120.385959 72.992823) (xy 120.556281 73.163442) (xy 120.77893 73.255894) (xy 121.020012 73.256105) (xy 121.242823 73.164041) (xy 121.413442 72.993719) (xy 121.427438 72.960012) (xy 122.963895 72.960012) (xy 123.055959 73.182823) (xy 123.226281 73.353442) (xy 123.44893 73.445894) (xy 123.690012 73.446105) (xy 123.794983 73.402732) (xy 123.89893 73.445894) (xy 124.140012 73.446105) (xy 124.244983 73.402732) (xy 124.34893 73.445894) (xy 124.590012 73.446105) (xy 124.812823 73.354041) (xy 124.983442 73.183719) (xy 125.075894 72.96107) (xy 125.075982 72.860012) (xy 132.123895 72.860012) (xy 132.215959 73.082823) (xy 132.386281 73.253442) (xy 132.60893 73.345894) (xy 132.850012 73.346105) (xy 132.888959 73.330012) (xy 135.443895 73.330012) (xy 135.535959 73.552823) (xy 135.706281 73.723442) (xy 135.92893 73.815894) (xy 136.170012 73.816105) (xy 136.392823 73.724041) (xy 136.563442 73.553719) (xy 136.655894 73.33107) (xy 136.656105 73.089988) (xy 136.564041 72.867177) (xy 136.393719 72.696558) (xy 136.17107 72.604106) (xy 135.929988 72.603895) (xy 135.707177 72.695959) (xy 135.536558 72.866281) (xy 135.444106 73.08893) (xy 135.443895 73.330012) (xy 132.888959 73.330012) (xy 133.072823 73.254041) (xy 133.243442 73.083719) (xy 133.335894 72.86107) (xy 133.336105 72.619988) (xy 133.249345 72.410012) (xy 134.463895 72.410012) (xy 134.555959 72.632823) (xy 134.726281 72.803442) (xy 134.94893 72.895894) (xy 135.190012 72.896105) (xy 135.412823 72.804041) (xy 135.583442 72.633719) (xy 135.675894 72.41107) (xy 135.675906 72.397205) (xy 142.9824 72.397205) (xy 143.215358 72.778318) (xy 144.223184 73.188367) (xy 145.311214 73.181525) (xy 146.284642 72.778318) (xy 146.5176 72.397205) (xy 144.75 70.629605) (xy 142.9824 72.397205) (xy 135.675906 72.397205) (xy 135.676105 72.169988) (xy 135.584041 71.947177) (xy 135.413719 71.776558) (xy 135.19107 71.684106) (xy 134.949988 71.683895) (xy 134.727177 71.775959) (xy 134.556558 71.946281) (xy 134.464106 72.16893) (xy 134.463895 72.410012) (xy 133.249345 72.410012) (xy 133.244041 72.397177) (xy 133.073719 72.226558) (xy 132.85107 72.134106) (xy 132.609988 72.133895) (xy 132.387177 72.225959) (xy 132.216558 72.396281) (xy 132.124106 72.61893) (xy 132.123895 72.860012) (xy 125.075982 72.860012) (xy 125.076105 72.719988) (xy 124.984041 72.497177) (xy 124.813719 72.326558) (xy 124.59107 72.234106) (xy 124.349988 72.233895) (xy 124.245017 72.277268) (xy 124.14107 72.234106) (xy 123.899988 72.233895) (xy 123.795017 72.277268) (xy 123.69107 72.234106) (xy 123.449988 72.233895) (xy 123.227177 72.325959) (xy 123.056558 72.496281) (xy 122.964106 72.71893) (xy 122.963895 72.960012) (xy 121.427438 72.960012) (xy 121.505894 72.77107) (xy 121.506105 72.529988) (xy 121.414041 72.307177) (xy 121.243719 72.136558) (xy 121.02107 72.044106) (xy 120.779988 72.043895) (xy 120.557177 72.135959) (xy 120.386558 72.306281) (xy 120.294106 72.52893) (xy 120.293895 72.770012) (xy 118.177 72.770012) (xy 118.177 71.620012) (xy 123.333895 71.620012) (xy 123.425959 71.842823) (xy 123.596281 72.013442) (xy 123.81893 72.105894) (xy 124.060012 72.106105) (xy 124.282823 72.014041) (xy 124.377015 71.920012) (xy 125.743895 71.920012) (xy 125.835959 72.142823) (xy 126.006281 72.313442) (xy 126.22893 72.405894) (xy 126.470012 72.406105) (xy 126.561786 72.368185) (xy 126.74893 72.445894) (xy 126.990012 72.446105) (xy 127.212823 72.354041) (xy 127.311069 72.255966) (xy 127.470012 72.256105) (xy 127.554934 72.221016) (xy 127.63893 72.255894) (xy 127.880012 72.256105) (xy 128.102823 72.164041) (xy 128.273442 71.993719) (xy 128.365894 71.77107) (xy 128.366105 71.529988) (xy 128.274041 71.307177) (xy 128.103719 71.136558) (xy 127.88107 71.044106) (xy 127.639988 71.043895) (xy 127.555066 71.078984) (xy 127.47107 71.044106) (xy 127.229988 71.043895) (xy 127.007177 71.135959) (xy 126.908931 71.234034) (xy 126.749988 71.233895) (xy 126.658214 71.271815) (xy 126.47107 71.194106) (xy 126.229988 71.193895) (xy 126.007177 71.285959) (xy 125.836558 71.456281) (xy 125.744106 71.67893) (xy 125.743895 71.920012) (xy 124.377015 71.920012) (xy 124.453442 71.843719) (xy 124.545894 71.62107) (xy 124.546105 71.379988) (xy 124.454041 71.157177) (xy 124.283719 70.986558) (xy 124.06107 70.894106) (xy 123.819988 70.893895) (xy 123.597177 70.985959) (xy 123.426558 71.156281) (xy 123.334106 71.37893) (xy 123.333895 71.620012) (xy 118.177 71.620012) (xy 118.177 70.51644) (xy 118.565243 70.775855) (xy 119.04 70.87029) (xy 119.514757 70.775855) (xy 119.917237 70.506927) (xy 120.186165 70.104447) (xy 120.2806 69.62969) (xy 120.2806 69.27031) (xy 120.186165 68.795553) (xy 120.040133 68.577) (xy 120.579867 68.577) ) ) ) (zone (net 1) (net_name GND) (layer B.Cu) (tstamp 559AAB1F) (hatch edge 0.508) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 113.2 64.6) (xy 153.5 64.6) (xy 153.5 104.55) (xy 113.25 104.55) ) ) (filled_polygon (pts (xy 119.743546 91.296109) (xy 119.927921 91.480806) (xy 120.168941 91.580886) (xy 120.429914 91.581114) (xy 120.671109 91.481454) (xy 120.773 91.379741) (xy 120.773 91.710999) (xy 120.291999 92.191999) (xy 120.166922 92.379192) (xy 120.122999 92.6) (xy 120.123 92.600005) (xy 120.123 96.949995) (xy 120.122999 96.95) (xy 120.166922 97.170808) (xy 120.291999 97.358001) (xy 121.048998 98.115) (xy 120.98375 98.115) (xy 120.825 98.27375) (xy 120.825 98.923) (xy 121.42625 98.923) (xy 121.585 98.76425) (xy 121.585 98.651002) (xy 122.878995 99.944997) (xy 122.688891 100.023546) (xy 122.504194 100.207921) (xy 122.404114 100.448941) (xy 122.403886 100.709914) (xy 122.503546 100.951109) (xy 122.575312 101.023) (xy 121.117709 101.023) (xy 121.155886 100.931059) (xy 121.155979 100.82487) (xy 121.253567 100.762073) (xy 121.351064 100.619381) (xy 121.385365 100.45) (xy 121.385365 99.85) (xy 121.379452 99.818574) (xy 121.488327 99.709698) (xy 121.585 99.476309) (xy 121.585 99.33575) (xy 121.42625 99.177) (xy 120.825 99.177) (xy 120.825 99.197) (xy 120.575 99.197) (xy 120.575 99.177) (xy 120.553 99.177) (xy 120.553 98.923) (xy 120.575 98.923) (xy 120.575 98.27375) (xy 120.41625 98.115) (xy 120.32369 98.115) (xy 120.090301 98.211673) (xy 119.911673 98.390302) (xy 119.901443 98.415) (xy 119.81575 98.415) (xy 119.657 98.57375) (xy 119.657 99.15) (xy 119.677 99.15) (xy 119.677 99.35) (xy 119.657 99.35) (xy 119.657 99.397) (xy 119.403 99.397) (xy 119.403 99.35) (xy 118.75375 99.35) (xy 118.595 99.50875) (xy 118.595 99.576309) (xy 118.691673 99.809698) (xy 118.800923 99.918949) (xy 118.794635 99.95) (xy 118.794635 100.35) (xy 118.824409 100.508237) (xy 118.917927 100.653567) (xy 119.060619 100.751064) (xy 119.23 100.785365) (xy 119.83 100.785365) (xy 119.844015 100.782728) (xy 119.843886 100.929914) (xy 119.882348 101.023) (xy 118.227 101.023) (xy 118.227 98.923691) (xy 118.595 98.923691) (xy 118.595 98.99125) (xy 118.75375 99.15) (xy 119.403 99.15) (xy 119.403 98.57375) (xy 119.24425 98.415) (xy 119.10369 98.415) (xy 118.870301 98.511673) (xy 118.691673 98.690302) (xy 118.595 98.923691) (xy 118.227 98.923691) (xy 118.227 92.012795) (xy 118.378941 92.075886) (xy 118.639914 92.076114) (xy 118.881109 91.976454) (xy 119.065806 91.792079) (xy 119.165886 91.551059) (xy 119.166114 91.290086) (xy 119.145667 91.2406) (xy 119.48067 91.2406) (xy 119.702387 91.196498) ) ) (filled_polygon (pts (xy 149.573 101.023) (xy 147.155893 101.023) (xy 147.156114 100.770086) (xy 147.056454 100.528891) (xy 146.872079 100.344194) (xy 146.631059 100.244114) (xy 146.370086 100.243886) (xy 146.128891 100.343546) (xy 146.074342 100.398) (xy 142.925791 100.398) (xy 142.872079 100.344194) (xy 142.631059 100.244114) (xy 142.370086 100.243886) (xy 142.128891 100.343546) (xy 141.944194 100.527921) (xy 141.844114 100.768941) (xy 141.843892 101.023) (xy 134.054883 101.023) (xy 134.055806 101.022079) (xy 134.155886 100.781059) (xy 134.156114 100.520086) (xy 134.056454 100.278891) (xy 133.872079 100.094194) (xy 133.631059 99.994114) (xy 133.370086 99.993886) (xy 133.128891 100.093546) (xy 132.944194 100.277921) (xy 132.844114 100.518941) (xy 132.843886 100.779914) (xy 132.943546 101.021109) (xy 132.945434 101.023) (xy 128.353002 101.023) (xy 128.468001 100.908001) (xy 128.593078 100.720808) (xy 128.637001 100.5) (xy 128.637 100.499995) (xy 128.637 100.401038) (xy 128.715886 100.211059) (xy 128.716114 99.950086) (xy 128.616454 99.708891) (xy 128.432079 99.524194) (xy 128.191059 99.424114) (xy 127.930086 99.423886) (xy 127.688891 99.523546) (xy 127.504194 99.707921) (xy 127.404114 99.948941) (xy 127.403886 100.209914) (xy 127.441954 100.302044) (xy 127.310998 100.433) (xy 126.896033 100.433) (xy 126.896114 100.340086) (xy 126.796454 100.098891) (xy 126.612079 99.914194) (xy 126.558139 99.891796) (xy 126.664965 99.78497) (xy 126.664968 99.784968) (xy 126.740451 99.671999) (xy 126.773788 99.622108) (xy 126.812 99.43) (xy 126.812 98.66575) (xy 126.86 98.66575) (xy 126.86 98.906309) (xy 126.956673 99.139698) (xy 127.135301 99.318327) (xy 127.36869 99.415) (xy 127.58425 99.415) (xy 127.743 99.25625) (xy 127.743 98.507) (xy 127.997 98.507) (xy 127.997 99.25625) (xy 128.15575 99.415) (xy 128.37131 99.415) (xy 128.604699 99.318327) (xy 128.783327 99.139698) (xy 128.88 98.906309) (xy 128.88 98.66575) (xy 128.72125 98.507) (xy 127.997 98.507) (xy 127.743 98.507) (xy 127.01875 98.507) (xy 126.86 98.66575) (xy 126.812 98.66575) (xy 126.812 98.340005) (xy 126.812001 98.34) (xy 126.799326 98.276281) (xy 126.883567 98.222073) (xy 126.908185 98.186043) (xy 126.951831 98.186081) (xy 127.01875 98.253) (xy 127.743 98.253) (xy 127.743 98.233) (xy 127.997 98.233) (xy 127.997 98.253) (xy 128.72125 98.253) (xy 128.88 98.09425) (xy 128.88 98.086002) (xy 129.251999 98.458001) (xy 129.439192 98.583078) (xy 129.66 98.627001) (xy 129.660005 98.627) (xy 129.778962 98.627) (xy 129.968941 98.705886) (xy 130.229914 98.706114) (xy 130.471109 98.606454) (xy 130.498 98.57961) (xy 130.498 99.999995) (xy 130.497999 100) (xy 130.536212 100.192107) (xy 130.645032 100.354968) (xy 130.74503 100.454965) (xy 130.745032 100.454968) (xy 130.820795 100.505591) (xy 130.907892 100.563788) (xy 131.1 100.602) (xy 131.224209 100.602) (xy 131.277921 100.655806) (xy 131.518941 100.755886) (xy 131.779914 100.756114) (xy 132.021109 100.656454) (xy 132.205806 100.472079) (xy 132.305886 100.231059) (xy 132.306114 99.970086) (xy 132.206454 99.728891) (xy 132.105889 99.62815) (xy 132.106114 99.370086) (xy 132.006454 99.128891) (xy 131.952 99.074342) (xy 131.952 98.765) (xy 132.007002 98.765) (xy 132.007002 98.72495) (xy 132.103691 98.765) (xy 132.156309 98.765) (xy 132.389698 98.668327) (xy 132.455 98.603025) (xy 132.455 98.60625) (xy 132.477541 98.628791) (xy 132.495032 98.654968) (xy 133.64503 99.804965) (xy 133.645032 99.804968) (xy 133.807531 99.913546) (xy 133.807893 99.913788) (xy 134 99.952001) (xy 134.000005 99.952) (xy 136.744041 99.952) (xy 136.743886 100.129914) (xy 136.843546 100.371109) (xy 137.027921 100.555806) (xy 137.268941 100.655886) (xy 137.529914 100.656114) (xy 137.771109 100.556454) (xy 137.955806 100.372079) (xy 138.055886 100.131059) (xy 138.056042 99.952) (xy 139.064635 99.952) (xy 139.064635 100.1) (xy 139.094409 100.258237) (xy 139.187927 100.403567) (xy 139.330619 100.501064) (xy 139.5 100.535365) (xy 139.9 100.535365) (xy 140.058237 100.505591) (xy 140.150424 100.44627) (xy 140.230619 100.501064) (xy 140.4 100.535365) (xy 140.8 100.535365) (xy 140.958237 100.505591) (xy 141.103567 100.412073) (xy 141.201064 100.269381) (xy 141.235365 100.1) (xy 141.235365 99.874571) (xy 141.404968 99.704968) (xy 141.513788 99.542108) (xy 141.552 99.35) (xy 141.552 98.4) (xy 141.545822 98.368941) (xy 141.525472 98.26663) (xy 141.671109 98.206454) (xy 141.725658 98.152) (xy 141.738531 98.152) (xy 141.744409 98.183237) (xy 141.837927 98.328567) (xy 141.960255 98.41215) (xy 141.794194 98.577921) (xy 141.694114 98.818941) (xy 141.693886 99.079914) (xy 141.793546 99.321109) (xy 141.977921 99.505806) (xy 142.218941 99.605886) (xy 142.24135 99.605906) (xy 142.380619 99.701064) (xy 142.55 99.735365) (xy 142.95 99.735365) (xy 143.108237 99.705591) (xy 143.200424 99.64627) (xy 143.280619 99.701064) (xy 143.45 99.735365) (xy 143.67543 99.735365) (xy 143.79503 99.854965) (xy 143.795032 99.854968) (xy 143.957893 99.963788) (xy 144.15 100.002001) (xy 144.150005 100.002) (xy 146.449995 100.002) (xy 146.45 100.002001) (xy 146.45648 100.000712) (xy 146.468941 100.005886) (xy 146.729914 100.006114) (xy 146.971109 99.906454) (xy 147.155806 99.722079) (xy 147.255886 99.481059) (xy 147.256114 99.220086) (xy 147.156454 98.978891) (xy 146.972079 98.794194) (xy 146.870464 98.752) (xy 148.089169 98.752) (xy 148.218941 98.805886) (xy 148.479914 98.806114) (xy 148.721109 98.706454) (xy 148.905806 98.522079) (xy 149.005886 98.281059) (xy 149.00597 98.185365) (xy 149.16 98.185365) (xy 149.318237 98.155591) (xy 149.463567 98.062073) (xy 149.561064 97.919381) (xy 149.573 97.86044) ) ) (filled_polygon (pts (xy 124.937 98.89) (xy 124.917 98.89) (xy 124.917 98.937) (xy 124.663 98.937) (xy 124.663 98.89) (xy 124.643 98.89) (xy 124.643 98.782) (xy 124.937 98.782) ) ) (filled_polygon (pts (xy 123.173 96.129001) (xy 123.173 98.450796) (xy 123.12717 98.561168) (xy 121.277 96.710998) (xy 121.277 96.585025) (xy 121.420301 96.728327) (xy 121.65369 96.825) (xy 121.79425 96.825) (xy 121.953 96.66625) (xy 121.953 96.09) (xy 121.933 96.09) (xy 121.933 96.072) (xy 122.227 96.072) (xy 122.227 96.09) (xy 122.207 96.09) (xy 122.207 96.66625) (xy 122.36575 96.825) (xy 122.50631 96.825) (xy 122.739699 96.728327) (xy 122.918327 96.549698) (xy 123.015 96.316309) (xy 123.015 96.24875) (xy 122.883252 96.117002) (xy 123.015 96.117002) (xy 123.015 96.025173) (xy 123.047474 96.003475) ) ) (filled_polygon (pts (xy 136.027 97.457) (xy 135.733 97.457) (xy 135.733 97.203) (xy 136.027 97.203) ) ) (filled_polygon (pts (xy 142.802793 68.682401) (xy 142.421682 68.915358) (xy 142.011633 69.923184) (xy 142.018475 71.011214) (xy 142.421682 71.984642) (xy 142.802795 72.2176) (xy 144.570395 70.45) (xy 144.556253 70.435858) (xy 144.735858 70.256253) (xy 144.75 70.270395) (xy 144.764143 70.256253) (xy 144.943748 70.435858) (xy 144.929605 70.45) (xy 146.697205 72.2176) (xy 147.078318 71.984642) (xy 147.488367 70.976816) (xy 147.481525 69.888786) (xy 147.479468 69.883819) (xy 147.628941 69.945886) (xy 147.889914 69.946114) (xy 148.131109 69.846454) (xy 148.315806 69.662079) (xy 148.415886 69.421059) (xy 148.416114 69.160086) (xy 148.316454 68.918891) (xy 148.132079 68.734194) (xy 147.891059 68.634114) (xy 147.630086 68.633886) (xy 147.388891 68.733546) (xy 147.204194 68.917921) (xy 147.14171 69.0684) (xy 147.078318 68.915358) (xy 146.697207 68.682401) (xy 146.752608 68.627) (xy 149.573 68.627) (xy 149.573 74.347392) (xy 149.517599 74.402793) (xy 149.284642 74.021682) (xy 148.276816 73.611633) (xy 147.188786 73.618475) (xy 146.215358 74.021682) (xy 145.9824 74.402795) (xy 147.75 76.170395) (xy 147.764143 76.156253) (xy 147.943748 76.335858) (xy 147.929605 76.35) (xy 147.943748 76.364143) (xy 147.764143 76.543748) (xy 147.75 76.529605) (xy 145.9824 78.297205) (xy 146.215358 78.678318) (xy 147.223184 79.088367) (xy 148.311214 79.081525) (xy 149.284642 78.678318) (xy 149.517599 78.297207) (xy 149.573 78.352608) (xy 149.573 83.068935) (xy 149.556454 83.028891) (xy 149.372079 82.844194) (xy 149.131059 82.744114) (xy 148.870086 82.743886) (xy 148.628891 82.843546) (xy 148.444194 83.027921) (xy 148.437504 83.044032) (xy 148.270086 83.043886) (xy 148.028891 83.143546) (xy 147.844194 83.327921) (xy 147.744114 83.568941) (xy 147.743886 83.829914) (xy 147.843546 84.071109) (xy 148.027921 84.255806) (xy 148.268941 84.355886) (xy 148.529914 84.356114) (xy 148.771109 84.256454) (xy 148.955806 84.072079) (xy 148.962496 84.055968) (xy 149.129914 84.056114) (xy 149.371109 83.956454) (xy 149.555806 83.772079) (xy 149.573 83.730671) (xy 149.573 91.54492) (xy 149.571059 91.544114) (xy 149.33666 91.543909) (xy 149.329381 91.538936) (xy 149.16 91.504635) (xy 148.56 91.504635) (xy 148.401763 91.534409) (xy 148.317886 91.588383) (xy 148.25 91.574635) (xy 148.03457 91.574635) (xy 147.506069 91.046134) (xy 147.506114 90.995086) (xy 147.497815 90.975) (xy 147.55625 90.975) (xy 147.715 90.81625) (xy 147.715 90.167) (xy 147.965 90.167) (xy 147.965 90.81625) (xy 148.12375 90.975) (xy 148.21631 90.975) (xy 148.449699 90.878327) (xy 148.628327 90.699698) (xy 148.725 90.466309) (xy 148.725 90.32575) (xy 148.56625 90.167) (xy 147.965 90.167) (xy 147.715 90.167) (xy 146.715 90.167) (xy 146.715 90.187) (xy 146.465 90.187) (xy 146.465 90.167) (xy 145.86375 90.167) (xy 145.705 90.32575) (xy 145.705 90.466309) (xy 145.801673 90.699698) (xy 145.980301 90.878327) (xy 146.203698 90.970861) (xy 146.194114 90.993941) (xy 146.19397 91.159035) (xy 145.652 90.617064) (xy 145.652 89.46148) (xy 145.751017 89.502596) (xy 145.705 89.613691) (xy 145.705 89.75425) (xy 145.86375 89.913) (xy 146.465 89.913) (xy 146.465 89.893) (xy 146.715 89.893) (xy 146.715 89.913) (xy 147.715 89.913) (xy 147.715 89.893) (xy 147.965 89.893) (xy 147.965 89.913) (xy 148.56625 89.913) (xy 148.725 89.75425) (xy 148.725 89.613691) (xy 148.628327 89.380302) (xy 148.519077 89.271051) (xy 148.525365 89.24) (xy 148.525365 88.64) (xy 148.495591 88.481763) (xy 148.402073 88.336433) (xy 148.259381 88.238936) (xy 148.09 88.204635) (xy 147.59 88.204635) (xy 147.431763 88.234409) (xy 147.404426 88.252) (xy 147.028501 88.252) (xy 147.009381 88.238936) (xy 146.84 88.204635) (xy 146.34 88.204635) (xy 146.181763 88.234409) (xy 146.156794 88.250476) (xy 146.021059 88.194114) (xy 145.760086 88.193886) (xy 145.652 88.238546) (xy 145.652 88.11743) (xy 145.753567 88.052073) (xy 145.851064 87.909381) (xy 145.885365 87.74) (xy 145.885365 87.506031) (xy 145.919733 87.506061) (xy 146.025 87.527) (xy 146.036117 87.527) (xy 145.965 87.698691) (xy 145.965 87.83925) (xy 146.12375 87.998) (xy 146.725 87.998) (xy 146.725 87.978) (xy 146.975 87.978) (xy 146.975 87.998) (xy 147.57625 87.998) (xy 147.735 87.83925) (xy 147.735 87.698691) (xy 147.638327 87.465302) (xy 147.529077 87.356051) (xy 147.535365 87.325) (xy 147.535365 86.725) (xy 147.505591 86.566763) (xy 147.449247 86.479202) (xy 147.553567 86.412073) (xy 147.651064 86.269381) (xy 147.685365 86.1) (xy 147.685365 85.5) (xy 147.679452 85.468574) (xy 147.788327 85.359698) (xy 147.885 85.126309) (xy 147.885 84.98575) (xy 147.72625 84.827) (xy 147.125 84.827) (xy 147.125 84.847) (xy 146.875 84.847) (xy 146.875 84.827) (xy 146.853 84.827) (xy 146.853 84.573) (xy 146.875 84.573) (xy 146.875 83.92375) (xy 147.125 83.92375) (xy 147.125 84.573) (xy 147.72625 84.573) (xy 147.885 84.41425) (xy 147.885 84.273691) (xy 147.788327 84.040302) (xy 147.609699 83.861673) (xy 147.37631 83.765) (xy 147.28375 83.765) (xy 147.125 83.92375) (xy 146.875 83.92375) (xy 146.775365 83.824115) (xy 146.775365 83.46) (xy 146.745591 83.301763) (xy 146.652073 83.156433) (xy 146.56381 83.096126) (xy 146.854571 82.805365) (xy 147.17 82.805365) (xy 147.328237 82.775591) (xy 147.473567 82.682073) (xy 147.571064 82.539381) (xy 147.605365 82.37) (xy 147.605365 81.97) (xy 147.599452 81.938574) (xy 147.708327 81.829698) (xy 147.805 81.596309) (xy 147.805 81.52875) (xy 147.64625 81.37) (xy 146.997 81.37) (xy 146.997 81.417) (xy 146.743 81.417) (xy 146.743 81.37) (xy 146.723 81.37) (xy 146.723 81.17) (xy 146.743 81.17) (xy 146.743 80.59375) (xy 146.997 80.59375) (xy 146.997 81.17) (xy 147.64625 81.17) (xy 147.805 81.01125) (xy 147.805 80.943691) (xy 147.708327 80.710302) (xy 147.529699 80.531673) (xy 147.29631 80.435) (xy 147.15575 80.435) (xy 146.997 80.59375) (xy 146.743 80.59375) (xy 146.58425 80.435) (xy 146.44369 80.435) (xy 146.442971 80.435298) (xy 146.322079 80.314194) (xy 146.081059 80.214114) (xy 145.820086 80.213886) (xy 145.578891 80.313546) (xy 145.394194 80.497921) (xy 145.294114 80.738941) (xy 145.293886 80.999914) (xy 145.331422 81.090758) (xy 145.294194 81.127921) (xy 145.194114 81.368941) (xy 145.193886 81.629914) (xy 145.293546 81.871109) (xy 145.477921 82.055806) (xy 145.718941 82.155886) (xy 145.979914 82.156114) (xy 146.134635 82.092184) (xy 146.134635 82.105429) (xy 145.846112 82.393952) (xy 145.770086 82.393886) (xy 145.528891 82.493546) (xy 145.344194 82.677921) (xy 145.244114 82.918941) (xy 145.243886 83.179914) (xy 145.322718 83.370703) (xy 145.304635 83.46) (xy 145.304635 83.86) (xy 145.334409 84.018237) (xy 145.39373 84.110424) (xy 145.338936 84.190619) (xy 145.304635 84.36) (xy 145.304635 84.517585) (xy 145.244194 84.577921) (xy 145.144114 84.818941) (xy 145.143886 85.079914) (xy 145.243546 85.321109) (xy 145.427921 85.505806) (xy 145.644548 85.595757) (xy 145.528891 85.643546) (xy 145.445562 85.72673) (xy 145.397893 85.736212) (xy 145.235032 85.845032) (xy 145.075429 86.004635) (xy 144.85 86.004635) (xy 144.691763 86.034409) (xy 144.546433 86.127927) (xy 144.448936 86.270619) (xy 144.414635 86.44) (xy 144.414635 86.84) (xy 144.444409 86.998237) (xy 144.50373 87.090424) (xy 144.448936 87.170619) (xy 144.414635 87.34) (xy 144.414635 87.74) (xy 144.444409 87.898237) (xy 144.537927 88.043567) (xy 144.648 88.118776) (xy 144.648 90.824995) (xy 144.647999 90.825) (xy 144.686212 91.017107) (xy 144.795032 91.179968) (xy 145.573 91.957935) (xy 145.573 93.399209) (xy 145.519194 93.452921) (xy 145.419114 93.693941) (xy 145.418886 93.954914) (xy 145.518546 94.196109) (xy 145.702921 94.380806) (xy 145.943941 94.480886) (xy 146.204914 94.481114) (xy 146.446109 94.381454) (xy 146.630806 94.197079) (xy 146.730886 93.956059) (xy 146.731114 93.695086) (xy 146.631454 93.453891) (xy 146.577 93.399342) (xy 146.577 91.750005) (xy 146.577001 91.75) (xy 146.570919 91.719422) (xy 146.718941 91.780886) (xy 146.821039 91.780975) (xy 147.214635 92.17457) (xy 147.214635 92.41) (xy 147.244409 92.568237) (xy 147.30373 92.660424) (xy 147.248936 92.740619) (xy 147.214635 92.91) (xy 147.214635 93.31) (xy 147.244409 93.468237) (xy 147.337927 93.613567) (xy 147.480619 93.711064) (xy 147.516845 93.7184) (xy 147.431763 93.734409) (xy 147.286433 93.827927) (xy 147.188936 93.970619) (xy 147.154635 94.14) (xy 147.154635 94.64) (xy 147.184409 94.798237) (xy 147.277927 94.943567) (xy 147.420619 95.041064) (xy 147.59 95.075365) (xy 148.19 95.075365) (xy 148.348237 95.045591) (xy 148.440424 94.98627) (xy 148.520619 95.041064) (xy 148.69 95.075365) (xy 149.29 95.075365) (xy 149.448237 95.045591) (xy 149.573 94.965308) (xy 149.573 96.22255) (xy 149.476454 95.988891) (xy 149.292079 95.804194) (xy 149.051059 95.704114) (xy 148.790086 95.703886) (xy 148.548891 95.803546) (xy 148.364194 95.987921) (xy 148.318487 96.097996) (xy 148.256433 96.137927) (xy 148.158936 96.280619) (xy 148.124635 96.45) (xy 148.124635 96.85) (xy 148.154409 97.008237) (xy 148.21373 97.100424) (xy 148.181224 97.148) (xy 147.961469 97.148) (xy 147.955591 97.116763) (xy 147.862073 96.971433) (xy 147.719381 96.873936) (xy 147.55 96.839635) (xy 147.193532 96.839635) (xy 147.106454 96.628891) (xy 146.922079 96.444194) (xy 146.681059 96.344114) (xy 146.420086 96.343886) (xy 146.178891 96.443546) (xy 146.050024 96.572188) (xy 146.022079 96.544194) (xy 145.781059 96.444114) (xy 145.520086 96.443886) (xy 145.278891 96.543546) (xy 145.094194 96.727921) (xy 145.014908 96.918865) (xy 144.946433 96.962927) (xy 144.848936 97.105619) (xy 144.848812 97.106229) (xy 144.762073 96.971433) (xy 144.684876 96.918687) (xy 144.606454 96.728891) (xy 144.422079 96.544194) (xy 144.181059 96.444114) (xy 143.920086 96.443886) (xy 143.678891 96.543546) (xy 143.494194 96.727921) (xy 143.414908 96.918865) (xy 143.346433 96.962927) (xy 143.300169 97.030636) (xy 143.262073 96.971433) (xy 143.119381 96.873936) (xy 142.95 96.839635) (xy 142.15 96.839635) (xy 141.991763 96.869409) (xy 141.846433 96.962927) (xy 141.748936 97.105619) (xy 141.740354 97.148) (xy 141.725791 97.148) (xy 141.672079 97.094194) (xy 141.431059 96.994114) (xy 141.302 96.994001) (xy 141.302 95.739914) (xy 142.533886 95.739914) (xy 142.633546 95.981109) (xy 142.817921 96.165806) (xy 143.058941 96.265886) (xy 143.319914 96.266114) (xy 143.386533 96.238588) (xy 143.42 96.245365) (xy 144.02 96.245365) (xy 144.178237 96.215591) (xy 144.323567 96.122073) (xy 144.421064 95.979381) (xy 144.455365 95.81) (xy 144.455365 95.41) (xy 144.425591 95.251763) (xy 144.36627 95.159576) (xy 144.368699 95.15602) (xy 144.504968 95.064968) (xy 144.754965 94.81497) (xy 144.754968 94.814968) (xy 144.827854 94.705886) (xy 144.863788 94.652108) (xy 144.902 94.46) (xy 144.902 93.356068) (xy 144.954914 93.356114) (xy 145.196109 93.256454) (xy 145.380806 93.072079) (xy 145.480886 92.831059) (xy 145.481114 92.570086) (xy 145.381454 92.328891) (xy 145.197079 92.144194) (xy 144.956059 92.044114) (xy 144.695086 92.043886) (xy 144.453891 92.143546) (xy 144.416444 92.180928) (xy 144.362073 92.096433) (xy 144.219381 91.998936) (xy 144.05 91.964635) (xy 143.45 91.964635) (xy 143.291763 91.994409) (xy 143.146433 92.087927) (xy 143.048936 92.230619) (xy 143.014635 92.4) (xy 143.014635 92.8) (xy 143.044409 92.958237) (xy 143.10373 93.050424) (xy 143.048936 93.130619) (xy 143.014635 93.3) (xy 143.014635 93.407777) (xy 142.844194 93.577921) (xy 142.744114 93.818941) (xy 142.743886 94.079914) (xy 142.843546 94.321109) (xy 142.992641 94.470465) (xy 142.984635 94.51) (xy 142.984635 94.91) (xy 142.99774 94.979647) (xy 142.818891 95.053546) (xy 142.634194 95.237921) (xy 142.534114 95.478941) (xy 142.533886 95.739914) (xy 141.302 95.739914) (xy 141.302 95.570719) (xy 141.458941 95.635886) (xy 141.719914 95.636114) (xy 141.961109 95.536454) (xy 142.145806 95.352079) (xy 142.245886 95.111059) (xy 142.246114 94.850086) (xy 142.146454 94.608891) (xy 141.962079 94.424194) (xy 141.75601 94.338627) (xy 141.756114 94.220086) (xy 141.656454 93.978891) (xy 141.472079 93.794194) (xy 141.231059 93.694114) (xy 141.062683 93.693967) (xy 141.056454 93.678891) (xy 140.872079 93.494194) (xy 140.631059 93.394114) (xy 140.370086 93.393886) (xy 140.128891 93.493546) (xy 139.944194 93.677921) (xy 139.844114 93.918941) (xy 139.843886 94.179914) (xy 139.943546 94.421109) (xy 139.948 94.425571) (xy 139.948 96.303015) (xy 139.786025 96.302874) (xy 139.64703 96.360306) (xy 139.568327 96.170301) (xy 139.389698 95.991673) (xy 139.178967 95.904385) (xy 139.106454 95.728891) (xy 138.922079 95.544194) (xy 138.681059 95.444114) (xy 138.556006 95.444005) (xy 138.556114 95.320086) (xy 138.468977 95.1092) (xy 138.603691 95.165) (xy 138.64625 95.165) (xy 138.805 95.00625) (xy 138.805 94.860455) (xy 138.833567 94.842073) (xy 138.931064 94.699381) (xy 138.955 94.581183) (xy 138.955 95.00625) (xy 139.11375 95.165) (xy 139.156309 95.165) (xy 139.389698 95.068327) (xy 139.568327 94.889699) (xy 139.665 94.65631) (xy 139.665 94.01575) (xy 139.50625 93.857) (xy 138.965365 93.857) (xy 138.965365 93.603) (xy 139.50625 93.603) (xy 139.665 93.44425) (xy 139.665 92.80369) (xy 139.568327 92.570301) (xy 139.389698 92.391673) (xy 139.156309 92.295) (xy 139.11375 92.295) (xy 138.955 92.45375) (xy 138.955 92.874914) (xy 138.935591 92.771763) (xy 138.921943 92.750554) (xy 138.925886 92.741059) (xy 138.926114 92.480086) (xy 138.826454 92.238891) (xy 138.734723 92.147) (xy 139.17 92.147) (xy 139.363446 92.100667) (xy 139.496306 91.995415) (xy 140.416306 90.905415) (xy 140.483358 90.796127) (xy 140.517 90.63) (xy 140.517 88.779914) (xy 140.543886 88.779914) (xy 140.643546 89.021109) (xy 140.827921 89.205806) (xy 141.068941 89.305886) (xy 141.329914 89.306114) (xy 141.571109 89.206454) (xy 141.625658 89.152) (xy 141.874209 89.152) (xy 141.927921 89.205806) (xy 142.168941 89.305886) (xy 142.429914 89.306114) (xy 142.671109 89.206454) (xy 142.855806 89.022079) (xy 142.955886 88.781059) (xy 142.956114 88.520086) (xy 142.856454 88.278891) (xy 142.672079 88.094194) (xy 142.431059 87.994114) (xy 142.170086 87.993886) (xy 141.928891 88.093546) (xy 141.874342 88.148) (xy 141.625791 88.148) (xy 141.572079 88.094194) (xy 141.331059 87.994114) (xy 141.070086 87.993886) (xy 140.828891 88.093546) (xy 140.644194 88.277921) (xy 140.544114 88.518941) (xy 140.543886 88.779914) (xy 140.517 88.779914) (xy 140.517 87.835) (xy 140.577002 87.835) (xy 140.577002 87.678252) (xy 140.73375 87.835) (xy 140.82631 87.835) (xy 141.059699 87.738327) (xy 141.238327 87.559698) (xy 141.335 87.326309) (xy 141.335 87.18575) (xy 141.17625 87.027) (xy 140.575 87.027) (xy 140.575 87.047) (xy 140.517 87.047) (xy 140.517 86.753) (xy 140.575 86.753) (xy 140.575 86.773) (xy 141.17625 86.773) (xy 141.335 86.61425) (xy 141.335 86.473691) (xy 141.238327 86.240302) (xy 141.129077 86.131051) (xy 141.134135 86.106074) (xy 141.179914 86.106114) (xy 141.421109 86.006454) (xy 141.605806 85.822079) (xy 141.705886 85.581059) (xy 141.706114 85.320086) (xy 141.606454 85.078891) (xy 141.422079 84.894194) (xy 141.330358 84.856108) (xy 141.201252 84.727002) (xy 141.36 84.727002) (xy 141.36 84.631704) (xy 141.421109 84.606454) (xy 141.605806 84.422079) (xy 141.705886 84.181059) (xy 141.706114 83.920086) (xy 141.606454 83.678891) (xy 141.451433 83.523599) (xy 141.493349 83.541004) (xy 141.754322 83.541232) (xy 141.995517 83.441572) (xy 142.180214 83.257197) (xy 142.280294 83.016177) (xy 142.280522 82.755204) (xy 142.180862 82.514009) (xy 141.996487 82.329312) (xy 141.755467 82.229232) (xy 141.744363 82.229222) (xy 141.805886 82.081059) (xy 141.806114 81.820086) (xy 141.72156 81.61545) (xy 141.818941 81.655886) (xy 142.079914 81.656114) (xy 142.321109 81.556454) (xy 142.425745 81.452) (xy 142.899995 81.452) (xy 142.9 81.452001) (xy 143.092107 81.413788) (xy 143.254968 81.304968) (xy 143.753888 80.806048) (xy 143.829914 80.806114) (xy 144.071109 80.706454) (xy 144.255806 80.522079) (xy 144.355886 80.281059) (xy 144.356114 80.020086) (xy 144.256454 79.778891) (xy 144.072079 79.594194) (xy 143.831059 79.494114) (xy 143.570086 79.493886) (xy 143.328891 79.593546) (xy 143.144194 79.777921) (xy 143.044114 80.018941) (xy 143.044047 80.096018) (xy 142.937072 80.202992) (xy 142.906454 80.128891) (xy 142.722079 79.944194) (xy 142.481059 79.844114) (xy 142.220086 79.843886) (xy 141.978891 79.943546) (xy 141.794194 80.127921) (xy 141.694114 80.368941) (xy 141.69409 80.395946) (xy 141.578891 80.443546) (xy 141.570435 80.451988) (xy 141.431059 80.394114) (xy 141.170086 80.393886) (xy 140.928891 80.493546) (xy 140.744194 80.677921) (xy 140.644114 80.918941) (xy 140.643886 81.179914) (xy 140.743546 81.421109) (xy 140.747406 81.424976) (xy 140.594194 81.577921) (xy 140.517 81.763825) (xy 140.517 78.790766) (xy 141.205186 79.076526) (xy 142.290054 79.077472) (xy 143.292703 78.663186) (xy 144.06049 77.896738) (xy 144.476526 76.894814) (xy 144.47746 75.823184) (xy 145.011633 75.823184) (xy 145.018475 76.911214) (xy 145.421682 77.884642) (xy 145.802795 78.1176) (xy 147.570395 76.35) (xy 145.802795 74.5824) (xy 145.421682 74.815358) (xy 145.011633 75.823184) (xy 144.47746 75.823184) (xy 144.477472 75.809946) (xy 144.217 75.179555) (xy 144.217 75.08) (xy 144.185616 74.919323) (xy 144.091935 74.778065) (xy 141.711075 72.397205) (xy 142.9824 72.397205) (xy 143.215358 72.778318) (xy 144.223184 73.188367) (xy 145.311214 73.181525) (xy 146.284642 72.778318) (xy 146.5176 72.397205) (xy 144.75 70.629605) (xy 142.9824 72.397205) (xy 141.711075 72.397205) (xy 140.337 71.02313) (xy 140.337 68.627) (xy 142.747392 68.627) ) ) (filled_polygon (pts (xy 126.7 96.583) (xy 126.747 96.583) (xy 126.747 96.837) (xy 126.7 96.837) (xy 126.7 96.857) (xy 126.5 96.857) (xy 126.5 96.837) (xy 126.453 96.837) (xy 126.453 96.583) (xy 126.5 96.583) (xy 126.5 96.563) (xy 126.7 96.563) ) ) (filled_polygon (pts (xy 130.667999 92.86) (xy 130.668 92.860005) (xy 130.668 94.508064) (xy 130.354968 94.195032) (xy 130.192107 94.086212) (xy 130 94.047999) (xy 129.999995 94.048) (xy 127.807936 94.048) (xy 126.511936 92.752) (xy 130.689482 92.752) ) ) (filled_polygon (pts (xy 121.808065 73.861935) (xy 123.327579 75.381449) (xy 123.128891 75.463546) (xy 122.944194 75.647921) (xy 122.844114 75.888941) (xy 122.843886 76.149914) (xy 122.847203 76.157941) (xy 122.834635 76.22) (xy 122.834635 76.82) (xy 122.84646 76.882845) (xy 122.814635 77.04) (xy 122.814635 77.346824) (xy 122.772079 77.304194) (xy 122.531059 77.204114) (xy 122.270086 77.203886) (xy 122.028891 77.303546) (xy 121.844194 77.487921) (xy 121.744114 77.728941) (xy 121.743886 77.989914) (xy 121.843546 78.231109) (xy 122.027921 78.415806) (xy 122.268941 78.515886) (xy 122.35148 78.515958) (xy 122.497893 78.613788) (xy 122.69 78.652001) (xy 122.690005 78.652) (xy 124.65 78.652) (xy 124.842107 78.613788) (xy 125.004968 78.504968) (xy 125.085514 78.384421) (xy 125.146097 78.323839) (xy 125.227921 78.405806) (xy 125.243989 78.412478) (xy 125.243886 78.529914) (xy 125.343546 78.771109) (xy 125.527921 78.955806) (xy 125.768941 79.055886) (xy 125.845965 79.055953) (xy 125.893546 79.171109) (xy 125.981174 79.25889) (xy 123.895032 81.345032) (xy 123.786212 81.507893) (xy 123.769089 81.593972) (xy 123.670086 81.593886) (xy 123.428891 81.693546) (xy 123.244194 81.877921) (xy 123.144114 82.118941) (xy 123.143886 82.379914) (xy 123.187252 82.484868) (xy 123.184194 82.487921) (xy 123.084114 82.728941) (xy 123.083886 82.989914) (xy 123.183546 83.231109) (xy 123.281889 83.329624) (xy 123.247999 83.5) (xy 123.248 83.500005) (xy 123.248 83.792065) (xy 122.995032 84.045032) (xy 122.886212 84.207893) (xy 122.847999 84.4) (xy 122.848 84.400005) (xy 122.848 84.484348) (xy 122.823672 84.42547) (xy 122.769218 84.370921) (xy 122.769218 81.380718) (xy 123.783888 80.366048) (xy 123.859914 80.366114) (xy 124.101109 80.266454) (xy 124.285806 80.082079) (xy 124.385886 79.841059) (xy 124.386114 79.580086) (xy 124.286454 79.338891) (xy 124.102079 79.154194) (xy 123.861059 79.054114) (xy 123.600086 79.053886) (xy 123.358891 79.153546) (xy 123.174194 79.337921) (xy 123.074114 79.578941) (xy 123.074047 79.656017) (xy 121.91225 80.817814) (xy 121.80343 80.980675) (xy 121.765217 81.172782) (xy 121.765218 81.172787) (xy 121.765218 84.370788) (xy 121.711412 84.4245) (xy 121.611332 84.66552) (xy 121.611104 84.926493) (xy 121.710764 85.167688) (xy 121.895139 85.352385) (xy 122.136159 85.452465) (xy 122.397132 85.452693) (xy 122.638327 85.353033) (xy 122.823024 85.168658) (xy 122.848 85.108509) (xy 122.848 91.649995) (xy 122.847999 91.65) (xy 122.886212 91.842107) (xy 122.995032 92.004968) (xy 123.16113 92.171066) (xy 123.114194 92.217921) (xy 123.014114 92.458941) (xy 123.013886 92.719914) (xy 123.113546 92.961109) (xy 123.297921 93.145806) (xy 123.538941 93.245886) (xy 123.799914 93.246114) (xy 123.906678 93.202) (xy 124.138065 93.202) (xy 123.452064 93.888) (xy 123.067936 93.888) (xy 123.004968 93.825032) (xy 122.842107 93.716212) (xy 122.739364 93.695775) (xy 122.771064 93.649381) (xy 122.805365 93.48) (xy 122.805365 93.08) (xy 122.775591 92.921763) (xy 122.682073 92.776433) (xy 122.539381 92.678936) (xy 122.37 92.644635) (xy 121.77 92.644635) (xy 121.611763 92.674409) (xy 121.466433 92.767927) (xy 121.368936 92.910619) (xy 121.334635 93.08) (xy 121.334635 93.14543) (xy 121.277 93.203064) (xy 121.277 92.839002) (xy 121.757998 92.358003) (xy 121.758001 92.358001) (xy 121.883078 92.170808) (xy 121.894735 92.112205) (xy 121.927001 91.95) (xy 121.927 91.949995) (xy 121.927 88.3) (xy 121.883078 88.079192) (xy 121.758001 87.891999) (xy 121.477 87.610998) (xy 121.477 74.039002) (xy 121.746659 73.769343) ) ) (filled_polygon (pts (xy 136.545032 89.704968) (xy 136.793952 89.953888) (xy 136.793886 90.029914) (xy 136.893546 90.271109) (xy 137.077921 90.455806) (xy 137.318941 90.555886) (xy 137.579914 90.556114) (xy 137.821109 90.456454) (xy 138.005806 90.272079) (xy 138.105886 90.031059) (xy 138.105918 89.99471) (xy 138.243 89.938068) (xy 138.243 90.22313) (xy 138.138065 90.328065) (xy 138.046642 90.463873) (xy 138.013 90.63) (xy 138.013 91.72) (xy 138.042202 91.875196) (xy 138.102761 91.969308) (xy 137.898891 92.053546) (xy 137.795024 92.157232) (xy 137.742079 92.104194) (xy 137.501059 92.004114) (xy 137.240086 92.003886) (xy 137.125015 92.051433) (xy 137.011059 92.004114) (xy 136.750086 92.003886) (xy 136.508891 92.103546) (xy 136.324194 92.287921) (xy 136.321255 92.295) (xy 136.252998 92.295) (xy 136.252998 92.33505) (xy 136.156309 92.295) (xy 136.103691 92.295) (xy 136.007002 92.33505) (xy 136.007002 92.295) (xy 135.914936 92.295) (xy 136.054965 92.15497) (xy 136.054968 92.154968) (xy 136.163788 91.992107) (xy 136.166902 91.976454) (xy 136.202001 91.8) (xy 136.202 91.799995) (xy 136.202 89.65802) (xy 136.202001 89.658015) (xy 136.201583 89.655915) (xy 136.429914 89.656114) (xy 136.494545 89.629409) ) ) (filled_polygon (pts (xy 126.088941 88.335886) (xy 126.307297 88.336077) (xy 126.39942 88.559032) (xy 126.583795 88.743729) (xy 126.824815 88.843809) (xy 127.085788 88.844037) (xy 127.326983 88.744377) (xy 127.353825 88.717582) (xy 127.363546 88.741109) (xy 127.432078 88.809761) (xy 127.424114 88.828941) (xy 127.423886 89.089914) (xy 127.523546 89.331109) (xy 127.707921 89.515806) (xy 127.789918 89.549854) (xy 129.33503 91.094965) (xy 129.335032 91.094968) (xy 129.462244 91.179968) (xy 129.497893 91.203788) (xy 129.69 91.242001) (xy 129.690005 91.242) (xy 131.220125 91.242) (xy 131.214194 91.247921) (xy 131.114114 91.488941) (xy 131.114056 91.555224) (xy 130.92128 91.748) (xy 126.936055 91.748) (xy 126.936114 91.680086) (xy 126.836454 91.438891) (xy 126.652079 91.254194) (xy 126.411059 91.154114) (xy 126.333982 91.154047) (xy 126.102 90.922064) (xy 126.102 88.85) (xy 126.063788 88.657893) (xy 125.954968 88.495032) (xy 125.954965 88.49503) (xy 125.866543 88.406607) (xy 125.978237 88.385591) (xy 126.068604 88.327441) ) ) (filled_polygon (pts (xy 131.125 89.523) (xy 131.147 89.523) (xy 131.147 89.698) (xy 130.853 89.698) (xy 130.853 89.523) (xy 130.875 89.523) (xy 130.875 89.503) (xy 131.125 89.503) ) ) (filled_polygon (pts (xy 132.443952 88.453888) (xy 132.443886 88.529914) (xy 132.543546 88.771109) (xy 132.581995 88.809625) (xy 132.378891 88.893546) (xy 132.194194 89.077921) (xy 132.094114 89.318941) (xy 132.094047 89.396017) (xy 131.885 89.605064) (xy 131.885 89.522998) (xy 131.726252 89.522998) (xy 131.885 89.36425) (xy 131.885 89.223691) (xy 131.788327 88.990302) (xy 131.679077 88.881051) (xy 131.685365 88.85) (xy 131.685365 88.25) (xy 131.682588 88.235239) (xy 131.69065 88.215823) (xy 131.690714 88.142) (xy 132.132064 88.142) ) ) (filled_polygon (pts (xy 135.287927 85.003567) (xy 135.430619 85.101064) (xy 135.593191 85.133986) (xy 135.564635 85.275) (xy 135.564635 85.675) (xy 135.594409 85.833237) (xy 135.65373 85.925424) (xy 135.598936 86.005619) (xy 135.564635 86.175) (xy 135.564635 86.575) (xy 135.594409 86.733237) (xy 135.687927 86.878567) (xy 135.695455 86.88371) (xy 135.793546 87.121109) (xy 135.922319 87.250107) (xy 135.744194 87.427921) (xy 135.732176 87.456863) (xy 135.581059 87.394114) (xy 135.320086 87.393886) (xy 135.078891 87.493546) (xy 135.078031 87.494404) (xy 135.054864 87.471197) (xy 134.813844 87.371117) (xy 134.712018 87.371028) (xy 134.712018 87.056055) (xy 134.779914 87.056114) (xy 135.021109 86.956454) (xy 135.205806 86.772079) (xy 135.305886 86.531059) (xy 135.306114 86.270086) (xy 135.206454 86.028891) (xy 135.022079 85.844194) (xy 134.781059 85.744114) (xy 134.520086 85.743886) (xy 134.496999 85.753425) (xy 134.496999 85.442623) (xy 134.528941 85.455886) (xy 134.789914 85.456114) (xy 135.031109 85.356454) (xy 135.215806 85.172079) (xy 135.286621 85.001537) ) ) (filled_polygon (pts (xy 131.515 86.66425) (xy 131.67375 86.823) (xy 132.275 86.823) (xy 132.275 86.803) (xy 132.525 86.803) (xy 132.525 86.823) (xy 132.545347 86.823) (xy 132.547 86.824656) (xy 132.547 87.077) (xy 132.525 87.077) (xy 132.525 87.097) (xy 132.385 87.097) (xy 132.385 87.03575) (xy 132.22625 86.877) (xy 131.625 86.877) (xy 131.625 86.897) (xy 131.375 86.897) (xy 131.375 86.877) (xy 131.353 86.877) (xy 131.353 86.623) (xy 131.375 86.623) (xy 131.375 86.603) (xy 131.515 86.603) ) ) (filled_polygon (pts (xy 128.097 86.975) (xy 128.077 86.975) (xy 128.077 86.997) (xy 127.823 86.997) (xy 127.823 86.975) (xy 127.803 86.975) (xy 127.803 86.752) (xy 128.097 86.752) ) ) (filled_polygon (pts (xy 125.695 86.453) (xy 125.717 86.453) (xy 125.717 86.707) (xy 125.695 86.707) (xy 125.695 86.727) (xy 125.493146 86.727) (xy 125.476442 86.702001) (xy 125.423 86.622019) (xy 125.423 86.453) (xy 125.445 86.453) (xy 125.445 86.433) (xy 125.695 86.433) ) ) (filled_polygon (pts (xy 130.727 83.925) (xy 130.747 83.925) (xy 130.747 84.175) (xy 130.727 84.175) (xy 130.727 84.77625) (xy 130.773 84.82225) (xy 130.773 85.744107) (xy 130.703983 85.744047) (xy 130.404968 85.445032) (xy 130.271679 85.355972) (xy 130.405806 85.222079) (xy 130.505886 84.981059) (xy 130.506114 84.720086) (xy 130.473 84.639944) (xy 130.473 84.210257) (xy 130.505886 84.131059) (xy 130.506085 83.903) (xy 130.727 83.903) ) ) (filled_polygon (pts (xy 135.077921 82.155806) (xy 135.318941 82.255886) (xy 135.579914 82.256114) (xy 135.821109 82.156454) (xy 135.822614 82.154951) (xy 135.85178 82.225538) (xy 135.94438 82.3183) (xy 135.944114 82.318941) (xy 135.943886 82.579914) (xy 135.972646 82.649519) (xy 135.944194 82.677921) (xy 135.844114 82.918941) (xy 135.843886 83.179914) (xy 135.943546 83.421109) (xy 135.969392 83.447) (xy 135.725 83.447) (xy 135.725 83.427) (xy 135.703 83.427) (xy 135.703 83.173) (xy 135.725 83.173) (xy 135.725 82.52375) (xy 135.56625 82.365) (xy 135.47369 82.365) (xy 135.240301 82.461673) (xy 135.061673 82.640302) (xy 134.965 82.873691) (xy 134.965 83.01425) (xy 135.123748 83.172998) (xy 135.084012 83.172998) (xy 134.975789 83.064586) (xy 134.635201 82.923161) (xy 134.266417 82.922839) (xy 133.925583 83.063669) (xy 133.756015 83.232941) (xy 133.756114 83.120086) (xy 133.656454 82.878891) (xy 133.568713 82.790996) (xy 133.572859 82.781011) (xy 134.180733 82.173137) (xy 134.221109 82.156454) (xy 134.249889 82.127725) (xy 134.277921 82.155806) (xy 134.518941 82.255886) (xy 134.779914 82.256114) (xy 135.021109 82.156454) (xy 135.049889 82.127725) ) ) (filled_polygon (pts (xy 130.518941 81.455886) (xy 130.710163 81.456053) (xy 130.711673 81.459699) (xy 130.890302 81.638327) (xy 131.114809 81.731321) (xy 130.898065 81.948065) (xy 130.806642 82.083873) (xy 130.773 82.25) (xy 130.773 82.544107) (xy 130.520086 82.543886) (xy 130.477386 82.561529) (xy 130.485886 82.541059) (xy 130.486114 82.280086) (xy 130.386454 82.038891) (xy 130.332 81.984342) (xy 130.332 81.378262) ) ) (filled_polygon (pts (xy 131.644114 79.918941) (xy 131.643886 80.179914) (xy 131.677 80.260056) (xy 131.677 80.725) (xy 131.697 80.725) (xy 131.697 80.975) (xy 131.677 80.975) (xy 131.677 80.997) (xy 131.423 80.997) (xy 131.423 80.975) (xy 131.403 80.975) (xy 131.403 80.725) (xy 131.423 80.725) (xy 131.423 80.12375) (xy 131.355995 80.056745) (xy 131.356114 79.920086) (xy 131.307322 79.802) (xy 131.692672 79.802) ) ) (filled_polygon (pts (xy 132.702648 78.943482) (xy 132.542107 78.836212) (xy 132.35 78.797999) (xy 132.349995 78.798) (xy 130.780005 78.798) (xy 130.78 78.797999) (xy 130.587893 78.836212) (xy 130.425032 78.945032) (xy 130.401396 78.968668) (xy 130.306454 78.738891) (xy 130.122079 78.554194) (xy 129.881059 78.454114) (xy 129.620086 78.453886) (xy 129.378891 78.553546) (xy 129.342136 78.590237) (xy 129.231059 78.544114) (xy 128.970086 78.543886) (xy 128.728891 78.643546) (xy 128.544194 78.827921) (xy 128.444114 79.068941) (xy 128.443955 79.250671) (xy 128.365926 79.266192) (xy 128.250909 79.343044) (xy 128.255886 79.331059) (xy 128.256114 79.070086) (xy 128.191576 78.913894) (xy 128.192107 78.913788) (xy 128.354968 78.804968) (xy 129.067936 78.092) (xy 133.55413 78.092) ) ) (filled_polygon (pts (xy 134.274635 70.81) (xy 134.304409 70.968237) (xy 134.36373 71.060424) (xy 134.308936 71.140619) (xy 134.274635 71.31) (xy 134.274635 71.91) (xy 134.304409 72.068237) (xy 134.385984 72.195008) (xy 134.41396 72.335644) (xy 134.413952 72.344635) (xy 134.18 72.344635) (xy 134.138454 72.352452) (xy 134.118001 72.331999) (xy 133.930808 72.206922) (xy 133.71 72.162999) (xy 133.709995 72.163) (xy 133.355365 72.163) (xy 133.355365 71.83) (xy 133.349452 71.798574) (xy 133.458327 71.689698) (xy 133.555 71.456309) (xy 133.555 71.38875) (xy 133.39625 71.23) (xy 132.747 71.23) (xy 132.747 71.277) (xy 132.493 71.277) (xy 132.493 71.23) (xy 131.84375 71.23) (xy 131.685 71.38875) (xy 131.685 71.456309) (xy 131.781673 71.689698) (xy 131.890923 71.798949) (xy 131.884635 71.83) (xy 131.884635 72.23) (xy 131.914409 72.388237) (xy 132.007927 72.533567) (xy 132.083867 72.585454) (xy 132.074114 72.608941) (xy 132.073886 72.869914) (xy 132.173546 73.111109) (xy 132.357921 73.295806) (xy 132.598941 73.395886) (xy 132.859914 73.396114) (xy 133.051384 73.317) (xy 133.470998 73.317) (xy 133.641997 73.487998) (xy 133.641999 73.488001) (xy 133.795862 73.590808) (xy 133.817572 73.605314) (xy 133.867927 73.683567) (xy 134.010619 73.781064) (xy 134.18 73.815365) (xy 134.58 73.815365) (xy 134.738237 73.785591) (xy 134.830424 73.72627) (xy 134.910619 73.781064) (xy 135.08 73.815365) (xy 135.473 73.815365) (xy 135.473 74.110998) (xy 135.410998 74.173) (xy 135.05 74.173) (xy 134.894804 74.202202) (xy 134.752265 74.293923) (xy 134.656642 74.433873) (xy 134.623 74.6) (xy 134.623 77.02313) (xy 134.546951 77.099179) (xy 134.482079 77.034194) (xy 134.241059 76.934114) (xy 133.980086 76.933886) (xy 133.738891 77.033546) (xy 133.684342 77.088) (xy 128.86 77.088) (xy 128.667893 77.126212) (xy 128.505032 77.235032) (xy 128.48901 77.25901) (xy 128.465032 77.275032) (xy 127.792064 77.948) (xy 127.500005 77.948) (xy 127.5 77.947999) (xy 127.307892 77.986212) (xy 127.145032 78.095032) (xy 126.908899 78.331165) (xy 126.822079 78.244194) (xy 126.794941 78.232925) (xy 126.805806 78.222079) (xy 126.905886 77.981059) (xy 126.906114 77.720086) (xy 126.806454 77.478891) (xy 126.622079 77.294194) (xy 126.488778 77.238843) (xy 126.214968 76.965032) (xy 126.1896 76.948082) (xy 126.305806 76.832079) (xy 126.405886 76.591059) (xy 126.406114 76.330086) (xy 126.395552 76.304525) (xy 126.475886 76.111059) (xy 126.476012 75.967) (xy 126.96 75.967) (xy 127.115196 75.937798) (xy 127.257735 75.846077) (xy 127.353358 75.706127) (xy 127.387 75.54) (xy 127.387 72.957) (xy 129.68 72.957) (xy 129.840677 72.925616) (xy 129.981935 72.831935) (xy 131.81381 71.00006) (xy 131.84375 71.03) (xy 132.493 71.03) (xy 132.493 70.45375) (xy 132.747 70.45375) (xy 132.747 71.03) (xy 133.39625 71.03) (xy 133.555 70.87125) (xy 133.555 70.803691) (xy 133.458327 70.570302) (xy 133.279699 70.391673) (xy 133.04631 70.295) (xy 132.90575 70.295) (xy 132.747 70.45375) (xy 132.493 70.45375) (xy 132.42656 70.38731) (xy 132.54687 70.267) (xy 134.274635 70.267) ) ) (filled_polygon (pts (xy 124.497 77.467) (xy 124.45 77.467) (xy 124.45 77.487) (xy 124.25 77.487) (xy 124.25 77.467) (xy 124.203 77.467) (xy 124.203 77.255365) (xy 124.497 77.255365) ) ) (filled_polygon (pts (xy 119.427 77.123) (xy 119.447 77.123) (xy 119.447 77.377) (xy 119.427 77.377) (xy 119.427 77.397) (xy 119.173 77.397) (xy 119.173 77.377) (xy 119.153 77.377) (xy 119.153 77.123) (xy 119.173 77.123) (xy 119.173 77.103) (xy 119.427 77.103) ) ) ) (zone (net 21) (net_name /5V) (layer In2.Cu) (tstamp 559AD7BD) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 133.65 75.55) (xy 133.65 77.6) (xy 126.05 77.6) (xy 124.7 78.95) (xy 124.7 91.1) (xy 136.85 91.1) (xy 142.9 85.05) (xy 142.9 80.7) (xy 150.75 80.7) (xy 150.75 102.25) (xy 117.25 102.25) (xy 117.25 71.2) (xy 133.65 71.2) (xy 133.65 71.9) ) ) (filled_polygon (pts (xy 120.131997 71.357998) (xy 120.131999 71.358001) (xy 120.319192 71.483078) (xy 120.54 71.527) (xy 123.283976 71.527) (xy 123.283886 71.629914) (xy 123.383546 71.871109) (xy 123.567921 72.055806) (xy 123.808941 72.155886) (xy 124.069914 72.156114) (xy 124.311109 72.056454) (xy 124.495806 71.872079) (xy 124.595886 71.631059) (xy 124.595977 71.527) (xy 124.804011 71.527) (xy 124.803886 71.669914) (xy 124.903546 71.911109) (xy 125.087921 72.095806) (xy 125.328941 72.195886) (xy 125.589914 72.196114) (xy 125.772675 72.120598) (xy 125.793546 72.171109) (xy 125.977921 72.355806) (xy 126.218941 72.455886) (xy 126.479914 72.456114) (xy 126.561738 72.422305) (xy 126.738941 72.495886) (xy 126.999914 72.496114) (xy 127.241109 72.396454) (xy 127.331736 72.305985) (xy 127.479914 72.306114) (xy 127.554886 72.275136) (xy 127.628941 72.305886) (xy 127.889914 72.306114) (xy 128.131109 72.206454) (xy 128.315806 72.022079) (xy 128.415886 71.781059) (xy 128.416108 71.527) (xy 130.399995 71.527) (xy 130.4 71.527001) (xy 130.620808 71.483078) (xy 130.808001 71.358001) (xy 130.839002 71.327) (xy 131.395291 71.327) (xy 131.294194 71.427921) (xy 131.194114 71.668941) (xy 131.193886 71.929914) (xy 131.259629 72.089024) (xy 131.031059 71.994114) (xy 130.770086 71.993886) (xy 130.528891 72.093546) (xy 130.344194 72.277921) (xy 130.244114 72.518941) (xy 130.243886 72.779914) (xy 130.343546 73.021109) (xy 130.466149 73.143926) (xy 130.420086 73.143886) (xy 130.178891 73.243546) (xy 129.994194 73.427921) (xy 129.894114 73.668941) (xy 129.893886 73.929914) (xy 129.993546 74.171109) (xy 130.177921 74.355806) (xy 130.418941 74.455886) (xy 130.679914 74.456114) (xy 130.875182 74.375431) (xy 131.068941 74.455886) (xy 131.329914 74.456114) (xy 131.38371 74.433886) (xy 131.508941 74.485886) (xy 131.769914 74.486114) (xy 131.892963 74.435271) (xy 132.038941 74.495886) (xy 132.299914 74.496114) (xy 132.401994 74.453935) (xy 132.478941 74.485886) (xy 132.739914 74.486114) (xy 132.981109 74.386454) (xy 133.165806 74.202079) (xy 133.234221 74.037317) (xy 133.278941 74.055886) (xy 133.523 74.056099) (xy 133.523 77.293045) (xy 133.454114 77.458941) (xy 133.454102 77.473) (xy 127.682936 77.473) (xy 127.454968 77.245032) (xy 127.292107 77.136212) (xy 127.1 77.097999) (xy 127.099995 77.098) (xy 126.5 77.098) (xy 126.307892 77.136212) (xy 126.24266 77.1798) (xy 126.221445 77.193975) (xy 126.120086 77.193886) (xy 125.924818 77.274569) (xy 125.731059 77.194114) (xy 125.470086 77.193886) (xy 125.336089 77.249253) (xy 125.336114 77.220086) (xy 125.236454 76.978891) (xy 125.052079 76.794194) (xy 124.811059 76.694114) (xy 124.550086 76.693886) (xy 124.308891 76.793546) (xy 124.124194 76.977921) (xy 124.024114 77.218941) (xy 124.023886 77.479914) (xy 124.123546 77.721109) (xy 124.307921 77.905806) (xy 124.548941 78.005886) (xy 124.809914 78.006114) (xy 124.828116 77.998593) (xy 124.797999 78.15) (xy 124.798 78.150005) (xy 124.798 78.672394) (xy 124.610197 78.860197) (xy 124.582334 78.902211) (xy 124.573 78.95) (xy 124.573 81.518) (xy 124.03 81.518) (xy 123.837892 81.556212) (xy 123.781364 81.593983) (xy 123.670086 81.593886) (xy 123.428891 81.693546) (xy 123.244194 81.877921) (xy 123.144114 82.118941) (xy 123.143886 82.379914) (xy 123.187252 82.484868) (xy 123.184194 82.487921) (xy 123.084114 82.728941) (xy 123.083886 82.989914) (xy 123.183546 83.231109) (xy 123.367921 83.415806) (xy 123.608941 83.515886) (xy 123.869914 83.516114) (xy 124.111109 83.416454) (xy 124.218 83.309749) (xy 124.218 86.483012) (xy 123.998891 86.573546) (xy 123.814194 86.757921) (xy 123.714114 86.998941) (xy 123.713886 87.259914) (xy 123.813546 87.501109) (xy 123.997921 87.685806) (xy 124.238941 87.785886) (xy 124.499914 87.786114) (xy 124.573 87.755915) (xy 124.573 88.949252) (xy 124.494194 89.027921) (xy 124.394114 89.268941) (xy 124.393886 89.529914) (xy 124.464214 89.700121) (xy 124.394114 89.868941) (xy 124.393886 90.129914) (xy 124.493546 90.371109) (xy 124.573 90.450702) (xy 124.573 91.1) (xy 124.583006 91.14941) (xy 124.611447 91.191035) (xy 124.653841 91.218315) (xy 124.7 91.227) (xy 125.793976 91.227) (xy 125.793886 91.329914) (xy 125.80513 91.357126) (xy 125.724194 91.437921) (xy 125.624114 91.678941) (xy 125.623886 91.939914) (xy 125.723546 92.181109) (xy 125.907921 92.365806) (xy 126.148941 92.465886) (xy 126.409914 92.466114) (xy 126.651109 92.366454) (xy 126.835806 92.182079) (xy 126.935886 91.941059) (xy 126.936114 91.680086) (xy 126.92487 91.652874) (xy 127.005806 91.572079) (xy 127.105886 91.331059) (xy 127.105977 91.227) (xy 131.235152 91.227) (xy 131.214194 91.247921) (xy 131.114114 91.488941) (xy 131.113886 91.749914) (xy 131.213546 91.991109) (xy 131.397921 92.175806) (xy 131.638941 92.275886) (xy 131.885266 92.276101) (xy 131.843097 92.318197) (xy 131.743017 92.559217) (xy 131.742789 92.82019) (xy 131.842449 93.061385) (xy 132.026824 93.246082) (xy 132.267844 93.346162) (xy 132.528817 93.34639) (xy 132.770012 93.24673) (xy 132.954709 93.062355) (xy 133.054789 92.821335) (xy 133.055017 92.560362) (xy 132.955357 92.319167) (xy 132.770982 92.13447) (xy 132.529962 92.03439) (xy 132.283637 92.034175) (xy 132.325806 91.992079) (xy 132.425886 91.751059) (xy 132.426102 91.503984) (xy 132.427921 91.505806) (xy 132.668941 91.605886) (xy 132.929914 91.606114) (xy 133.171109 91.506454) (xy 133.355806 91.322079) (xy 133.395286 91.227) (xy 134.068935 91.227) (xy 134.028891 91.243546) (xy 133.844194 91.427921) (xy 133.744114 91.668941) (xy 133.744039 91.754648) (xy 133.528891 91.843546) (xy 133.344194 92.027921) (xy 133.244114 92.268941) (xy 133.243886 92.529914) (xy 133.343546 92.771109) (xy 133.527921 92.955806) (xy 133.768941 93.055886) (xy 134.029914 93.056114) (xy 134.271109 92.956454) (xy 134.455806 92.772079) (xy 134.485771 92.699914) (xy 135.143886 92.699914) (xy 135.243546 92.941109) (xy 135.427921 93.125806) (xy 135.668941 93.225886) (xy 135.929914 93.226114) (xy 135.943404 93.22054) (xy 136.148941 93.305886) (xy 136.409914 93.306114) (xy 136.56805 93.240774) (xy 136.748941 93.315886) (xy 137.009914 93.316114) (xy 137.124985 93.268567) (xy 137.238941 93.315886) (xy 137.499914 93.316114) (xy 137.741109 93.216454) (xy 137.844976 93.112768) (xy 137.897921 93.165806) (xy 138.138941 93.265886) (xy 138.399914 93.266114) (xy 138.576303 93.193231) (xy 138.726865 93.25575) (xy 138.987838 93.255978) (xy 139.229033 93.156318) (xy 139.41373 92.971943) (xy 139.51381 92.730923) (xy 139.514038 92.46995) (xy 139.414378 92.228755) (xy 139.230003 92.044058) (xy 139.004097 91.950254) (xy 139.231109 91.856454) (xy 139.415806 91.672079) (xy 139.515886 91.431059) (xy 139.516114 91.170086) (xy 139.494266 91.117209) (xy 139.525886 91.041059) (xy 139.526114 90.780086) (xy 139.426454 90.538891) (xy 139.242079 90.354194) (xy 139.001059 90.254114) (xy 138.740086 90.253886) (xy 138.498891 90.353546) (xy 138.314194 90.537921) (xy 138.214114 90.778941) (xy 138.213886 91.039914) (xy 138.235734 91.092791) (xy 138.204114 91.168941) (xy 138.203886 91.429914) (xy 138.303546 91.671109) (xy 138.487921 91.855806) (xy 138.713827 91.94961) (xy 138.551621 92.016633) (xy 138.433815 91.967716) (xy 138.376454 91.828891) (xy 138.192079 91.644194) (xy 137.951059 91.544114) (xy 137.690086 91.543886) (xy 137.448891 91.643546) (xy 137.264194 91.827921) (xy 137.180987 92.028305) (xy 137.125015 92.051433) (xy 137.011059 92.004114) (xy 136.750086 92.003886) (xy 136.59195 92.069226) (xy 136.411059 91.994114) (xy 136.150086 91.993886) (xy 136.136596 91.99946) (xy 135.931059 91.914114) (xy 135.670086 91.913886) (xy 135.428891 92.013546) (xy 135.244194 92.197921) (xy 135.144114 92.438941) (xy 135.143886 92.699914) (xy 134.485771 92.699914) (xy 134.555886 92.531059) (xy 134.555961 92.445352) (xy 134.771109 92.356454) (xy 134.955806 92.172079) (xy 135.055886 91.931059) (xy 135.055953 91.853982) (xy 135.107935 91.802) (xy 135.459995 91.802) (xy 135.46 91.802001) (xy 135.652107 91.763788) (xy 135.814968 91.654968) (xy 136.242935 91.227) (xy 136.85 91.227) (xy 136.89941 91.216994) (xy 136.939803 91.189803) (xy 137.573498 90.556108) (xy 137.579914 90.556114) (xy 137.821109 90.456454) (xy 138.005806 90.272079) (xy 138.105886 90.031059) (xy 138.105892 90.023714) (xy 138.155301 89.974305) (xy 138.271109 89.926454) (xy 138.455806 89.742079) (xy 138.50429 89.625316) (xy 139.327606 88.802) (xy 140.299995 88.802) (xy 140.3 88.802001) (xy 140.492107 88.763788) (xy 140.54393 88.729161) (xy 140.543886 88.779914) (xy 140.643546 89.021109) (xy 140.827921 89.205806) (xy 141.068941 89.305886) (xy 141.329914 89.306114) (xy 141.571109 89.206454) (xy 141.75015 89.027725) (xy 141.927921 89.205806) (xy 142.168941 89.305886) (xy 142.429914 89.306114) (xy 142.671109 89.206454) (xy 142.855806 89.022079) (xy 142.955886 88.781059) (xy 142.955985 88.668187) (xy 142.992787 88.613108) (xy 143.030999 88.421001) (xy 143.030999 80.840935) (xy 143.495032 81.304968) (xy 143.657893 81.413788) (xy 143.85 81.452001) (xy 143.850005 81.452) (xy 145.092064 81.452) (xy 145.193952 81.553888) (xy 145.193886 81.629914) (xy 145.293546 81.871109) (xy 145.371414 81.949113) (xy 145.334114 82.038941) (xy 145.333886 82.299914) (xy 145.433546 82.541109) (xy 145.457354 82.564958) (xy 145.344194 82.677921) (xy 145.244114 82.918941) (xy 145.243886 83.179914) (xy 145.343546 83.421109) (xy 145.527921 83.605806) (xy 145.768941 83.705886) (xy 146.029914 83.706114) (xy 146.271109 83.606454) (xy 146.455806 83.422079) (xy 146.555886 83.181059) (xy 146.556114 82.920086) (xy 146.456454 82.678891) (xy 146.432646 82.655042) (xy 146.545806 82.542079) (xy 146.645886 82.301059) (xy 146.646114 82.040086) (xy 146.546454 81.798891) (xy 146.468586 81.720887) (xy 146.505886 81.631059) (xy 146.506114 81.370086) (xy 146.468578 81.279242) (xy 146.505806 81.242079) (xy 146.605886 81.001059) (xy 146.606038 80.827) (xy 149.573 80.827) (xy 149.573 82.023) (xy 147.725 82.023) (xy 147.513084 82.079297) (xy 147.385556 82.19095) (xy 146.660556 83.14095) (xy 146.606642 83.233873) (xy 146.573 83.4) (xy 146.573 85.339944) (xy 146.506454 85.178891) (xy 146.322079 84.994194) (xy 146.081059 84.894114) (xy 145.820086 84.893886) (xy 145.578891 84.993546) (xy 145.394194 85.177921) (xy 145.294114 85.418941) (xy 145.293886 85.679914) (xy 145.351874 85.820255) (xy 145.344194 85.827921) (xy 145.244114 86.068941) (xy 145.243886 86.329914) (xy 145.301874 86.470255) (xy 145.294194 86.477921) (xy 145.194114 86.718941) (xy 145.193886 86.979914) (xy 145.293546 87.221109) (xy 145.477921 87.405806) (xy 145.718941 87.505886) (xy 145.979914 87.506114) (xy 146.221109 87.406454) (xy 146.405806 87.222079) (xy 146.505886 86.981059) (xy 146.506114 86.720086) (xy 146.448126 86.579745) (xy 146.455806 86.572079) (xy 146.555886 86.331059) (xy 146.556114 86.070086) (xy 146.498126 85.929745) (xy 146.505806 85.922079) (xy 146.573 85.760257) (xy 146.573 89.268935) (xy 146.556454 89.228891) (xy 146.372079 89.044194) (xy 146.131059 88.944114) (xy 145.870086 88.943886) (xy 145.628891 89.043546) (xy 145.444194 89.227921) (xy 145.344114 89.468941) (xy 145.343886 89.729914) (xy 145.443546 89.971109) (xy 145.627921 90.155806) (xy 145.868941 90.255886) (xy 146.011768 90.256011) (xy 145.944114 90.418941) (xy 145.944085 90.452045) (xy 143.123065 93.273065) (xy 143.042412 93.385381) (xy 143.04164 93.388278) (xy 143.028891 93.393546) (xy 142.844194 93.577921) (xy 142.744114 93.818941) (xy 142.743886 94.079914) (xy 142.843546 94.321109) (xy 142.948 94.425745) (xy 142.948 95.000199) (xy 142.818891 95.053546) (xy 142.634194 95.237921) (xy 142.534114 95.478941) (xy 142.533886 95.739914) (xy 142.633546 95.981109) (xy 142.817921 96.165806) (xy 142.948 96.219819) (xy 142.948 98.025) (xy 142.976011 98.177108) (xy 143.066624 98.320353) (xy 143.205829 98.417059) (xy 143.37169 98.451987) (xy 146.59669 98.476987) (xy 146.758414 98.446528) (xy 146.900204 98.353655) (xy 146.974792 98.279914) (xy 147.693886 98.279914) (xy 147.793546 98.521109) (xy 147.977921 98.705806) (xy 148.218941 98.805886) (xy 148.479914 98.806114) (xy 148.721109 98.706454) (xy 148.905806 98.522079) (xy 149.005886 98.281059) (xy 149.006114 98.020086) (xy 148.906454 97.778891) (xy 148.722079 97.594194) (xy 148.481059 97.494114) (xy 148.220086 97.493886) (xy 147.978891 97.593546) (xy 147.794194 97.777921) (xy 147.694114 98.018941) (xy 147.693886 98.279914) (xy 146.974792 98.279914) (xy 148.451887 96.819605) (xy 148.547921 96.915806) (xy 148.788941 97.015886) (xy 149.049914 97.016114) (xy 149.291109 96.916454) (xy 149.475806 96.732079) (xy 149.573 96.498009) (xy 149.573 101.023) (xy 147.155893 101.023) (xy 147.156114 100.770086) (xy 147.056454 100.528891) (xy 146.872079 100.344194) (xy 146.631059 100.244114) (xy 146.370086 100.243886) (xy 146.128891 100.343546) (xy 145.944194 100.527921) (xy 145.844114 100.768941) (xy 145.843892 101.023) (xy 143.155893 101.023) (xy 143.156114 100.770086) (xy 143.056454 100.528891) (xy 142.872079 100.344194) (xy 142.631059 100.244114) (xy 142.370086 100.243886) (xy 142.128891 100.343546) (xy 141.944194 100.527921) (xy 141.844114 100.768941) (xy 141.843892 101.023) (xy 130.360338 101.023) (xy 130.435886 100.841059) (xy 130.436114 100.580086) (xy 130.336454 100.338891) (xy 130.152079 100.154194) (xy 129.911059 100.054114) (xy 129.650086 100.053886) (xy 129.408891 100.153546) (xy 129.224194 100.337921) (xy 129.124114 100.578941) (xy 129.123886 100.839914) (xy 129.199536 101.023) (xy 126.614569 101.023) (xy 126.795806 100.842079) (xy 126.895886 100.601059) (xy 126.896114 100.340086) (xy 126.842328 100.209914) (xy 127.403886 100.209914) (xy 127.503546 100.451109) (xy 127.687921 100.635806) (xy 127.928941 100.735886) (xy 128.189914 100.736114) (xy 128.431109 100.636454) (xy 128.61192 100.455958) (xy 128.789914 100.456114) (xy 129.031109 100.356454) (xy 129.215806 100.172079) (xy 129.315886 99.931059) (xy 129.316114 99.670086) (xy 129.299516 99.629914) (xy 130.793886 99.629914) (xy 130.893546 99.871109) (xy 130.994111 99.97185) (xy 130.993886 100.229914) (xy 131.093546 100.471109) (xy 131.277921 100.655806) (xy 131.518941 100.755886) (xy 131.779914 100.756114) (xy 132.021109 100.656454) (xy 132.205806 100.472079) (xy 132.223314 100.429914) (xy 137.993886 100.429914) (xy 138.093546 100.671109) (xy 138.277921 100.855806) (xy 138.518941 100.955886) (xy 138.779914 100.956114) (xy 139.021109 100.856454) (xy 139.205806 100.672079) (xy 139.305886 100.431059) (xy 139.306114 100.170086) (xy 139.289516 100.129914) (xy 142.943886 100.129914) (xy 143.043546 100.371109) (xy 143.227921 100.555806) (xy 143.468941 100.655886) (xy 143.729914 100.656114) (xy 143.971109 100.556454) (xy 144.050019 100.477681) (xy 144.177921 100.605806) (xy 144.418941 100.705886) (xy 144.679914 100.706114) (xy 144.921109 100.606454) (xy 145.105806 100.422079) (xy 145.205886 100.181059) (xy 145.206114 99.920086) (xy 145.106454 99.678891) (xy 144.922079 99.494194) (xy 144.887689 99.479914) (xy 145.943886 99.479914) (xy 146.043546 99.721109) (xy 146.227921 99.905806) (xy 146.468941 100.005886) (xy 146.729914 100.006114) (xy 146.971109 99.906454) (xy 147.155806 99.722079) (xy 147.255886 99.481059) (xy 147.256114 99.220086) (xy 147.156454 98.978891) (xy 146.972079 98.794194) (xy 146.731059 98.694114) (xy 146.470086 98.693886) (xy 146.228891 98.793546) (xy 146.044194 98.977921) (xy 145.944114 99.218941) (xy 145.943886 99.479914) (xy 144.887689 99.479914) (xy 144.681059 99.394114) (xy 144.420086 99.393886) (xy 144.178891 99.493546) (xy 144.099981 99.572319) (xy 143.972079 99.444194) (xy 143.731059 99.344114) (xy 143.470086 99.343886) (xy 143.228891 99.443546) (xy 143.044194 99.627921) (xy 142.944114 99.868941) (xy 142.943886 100.129914) (xy 139.289516 100.129914) (xy 139.206454 99.928891) (xy 139.022079 99.744194) (xy 138.781059 99.644114) (xy 138.520086 99.643886) (xy 138.278891 99.743546) (xy 138.094194 99.927921) (xy 137.994114 100.168941) (xy 137.993886 100.429914) (xy 132.223314 100.429914) (xy 132.305886 100.231059) (xy 132.306114 99.970086) (xy 132.206454 99.728891) (xy 132.105889 99.62815) (xy 132.106114 99.370086) (xy 132.006454 99.128891) (xy 131.822079 98.944194) (xy 131.581059 98.844114) (xy 131.320086 98.843886) (xy 131.078891 98.943546) (xy 130.894194 99.127921) (xy 130.794114 99.368941) (xy 130.793886 99.629914) (xy 129.299516 99.629914) (xy 129.216454 99.428891) (xy 129.032079 99.244194) (xy 128.791059 99.144114) (xy 128.530086 99.143886) (xy 128.288891 99.243546) (xy 128.10808 99.424042) (xy 127.930086 99.423886) (xy 127.688891 99.523546) (xy 127.504194 99.707921) (xy 127.404114 99.948941) (xy 127.403886 100.209914) (xy 126.842328 100.209914) (xy 126.796454 100.098891) (xy 126.612079 99.914194) (xy 126.371059 99.814114) (xy 126.110086 99.813886) (xy 125.868891 99.913546) (xy 125.684194 100.097921) (xy 125.584114 100.338941) (xy 125.583886 100.599914) (xy 125.683546 100.841109) (xy 125.86512 101.023) (xy 124.396935 101.023) (xy 124.494965 100.92497) (xy 124.494968 100.924968) (xy 124.603788 100.762107) (xy 124.642 100.57) (xy 124.642 100.075791) (xy 124.695806 100.022079) (xy 124.795886 99.781059) (xy 124.796114 99.520086) (xy 124.781929 99.485757) (xy 124.895806 99.372079) (xy 124.995886 99.131059) (xy 124.996114 98.870086) (xy 124.94646 98.749914) (xy 126.333886 98.749914) (xy 126.433546 98.991109) (xy 126.617921 99.175806) (xy 126.858941 99.275886) (xy 127.119914 99.276114) (xy 127.361109 99.176454) (xy 127.545806 98.992079) (xy 127.645886 98.751059) (xy 127.646114 98.490086) (xy 127.546454 98.248891) (xy 127.477598 98.179914) (xy 129.443886 98.179914) (xy 129.543546 98.421109) (xy 129.727921 98.605806) (xy 129.968941 98.705886) (xy 130.229914 98.706114) (xy 130.471109 98.606454) (xy 130.497695 98.579914) (xy 133.643886 98.579914) (xy 133.743546 98.821109) (xy 133.927921 99.005806) (xy 134.168941 99.105886) (xy 134.429914 99.106114) (xy 134.671109 99.006454) (xy 134.682707 98.994876) (xy 134.693546 99.021109) (xy 134.877921 99.205806) (xy 135.118941 99.305886) (xy 135.379914 99.306114) (xy 135.621109 99.206454) (xy 135.805806 99.022079) (xy 135.846503 98.924071) (xy 136.027921 99.105806) (xy 136.268941 99.205886) (xy 136.529914 99.206114) (xy 136.760476 99.110847) (xy 136.868941 99.155886) (xy 137.129914 99.156114) (xy 137.314331 99.079914) (xy 141.693886 99.079914) (xy 141.793546 99.321109) (xy 141.977921 99.505806) (xy 142.218941 99.605886) (xy 142.479914 99.606114) (xy 142.721109 99.506454) (xy 142.905806 99.322079) (xy 143.005886 99.081059) (xy 143.006114 98.820086) (xy 142.906454 98.578891) (xy 142.722079 98.394194) (xy 142.481059 98.294114) (xy 142.220086 98.293886) (xy 141.978891 98.393546) (xy 141.794194 98.577921) (xy 141.694114 98.818941) (xy 141.693886 99.079914) (xy 137.314331 99.079914) (xy 137.371109 99.056454) (xy 137.555806 98.872079) (xy 137.655886 98.631059) (xy 137.656114 98.370086) (xy 137.556454 98.128891) (xy 137.372079 97.944194) (xy 137.217276 97.879914) (xy 138.743886 97.879914) (xy 138.843546 98.121109) (xy 139.027921 98.305806) (xy 139.268941 98.405886) (xy 139.529914 98.406114) (xy 139.771109 98.306454) (xy 139.955806 98.122079) (xy 140.055886 97.881059) (xy 140.055974 97.779914) (xy 140.643886 97.779914) (xy 140.743546 98.021109) (xy 140.927921 98.205806) (xy 141.168941 98.305886) (xy 141.429914 98.306114) (xy 141.671109 98.206454) (xy 141.855806 98.022079) (xy 141.955886 97.781059) (xy 141.956114 97.520086) (xy 141.856454 97.278891) (xy 141.672079 97.094194) (xy 141.431059 96.994114) (xy 141.170086 96.993886) (xy 140.928891 97.093546) (xy 140.744194 97.277921) (xy 140.644114 97.518941) (xy 140.643886 97.779914) (xy 140.055974 97.779914) (xy 140.055994 97.75711) (xy 140.073975 97.757126) (xy 140.341275 97.64668) (xy 140.545961 97.44235) (xy 140.656874 97.175244) (xy 140.657126 96.886025) (xy 140.54668 96.618725) (xy 140.34235 96.414039) (xy 140.075244 96.303126) (xy 139.786025 96.302874) (xy 139.518725 96.41332) (xy 139.314039 96.61765) (xy 139.203126 96.884756) (xy 139.20292 97.121639) (xy 139.028891 97.193546) (xy 138.844194 97.377921) (xy 138.744114 97.618941) (xy 138.743886 97.879914) (xy 137.217276 97.879914) (xy 137.131059 97.844114) (xy 136.870086 97.843886) (xy 136.639524 97.939153) (xy 136.531059 97.894114) (xy 136.270086 97.893886) (xy 136.028891 97.993546) (xy 135.844194 98.177921) (xy 135.803497 98.275929) (xy 135.622079 98.094194) (xy 135.381059 97.994114) (xy 135.120086 97.993886) (xy 134.878891 98.093546) (xy 134.867293 98.105124) (xy 134.856454 98.078891) (xy 134.672079 97.894194) (xy 134.431059 97.794114) (xy 134.170086 97.793886) (xy 133.928891 97.893546) (xy 133.744194 98.077921) (xy 133.644114 98.318941) (xy 133.643886 98.579914) (xy 130.497695 98.579914) (xy 130.655806 98.422079) (xy 130.755886 98.181059) (xy 130.756114 97.920086) (xy 130.688677 97.756877) (xy 130.973975 97.757126) (xy 131.241275 97.64668) (xy 131.445961 97.44235) (xy 131.556874 97.175244) (xy 131.557048 96.976033) (xy 131.628941 97.005886) (xy 131.889914 97.006114) (xy 132.131109 96.906454) (xy 132.136089 96.901483) (xy 132.218941 96.935886) (xy 132.479914 96.936114) (xy 132.721109 96.836454) (xy 132.905806 96.652079) (xy 133.005886 96.411059) (xy 133.005956 96.329914) (xy 134.043886 96.329914) (xy 134.143546 96.571109) (xy 134.327921 96.755806) (xy 134.568941 96.855886) (xy 134.829914 96.856114) (xy 134.970255 96.798126) (xy 134.977921 96.805806) (xy 135.218941 96.905886) (xy 135.479914 96.906114) (xy 135.574936 96.866852) (xy 135.668941 96.905886) (xy 135.929914 96.906114) (xy 136.049997 96.856496) (xy 136.168941 96.905886) (xy 136.429914 96.906114) (xy 136.671109 96.806454) (xy 136.855806 96.622079) (xy 136.955886 96.381059) (xy 136.956114 96.120086) (xy 136.856454 95.878891) (xy 136.672079 95.694194) (xy 136.431059 95.594114) (xy 136.170086 95.593886) (xy 136.050003 95.643504) (xy 135.931059 95.594114) (xy 135.670086 95.593886) (xy 135.575064 95.633148) (xy 135.481059 95.594114) (xy 135.220086 95.593886) (xy 135.079745 95.651874) (xy 135.072079 95.644194) (xy 134.831059 95.544114) (xy 134.570086 95.543886) (xy 134.328891 95.643546) (xy 134.144194 95.827921) (xy 134.044114 96.068941) (xy 134.043886 96.329914) (xy 133.005956 96.329914) (xy 133.006114 96.150086) (xy 132.906454 95.908891) (xy 132.722079 95.724194) (xy 132.481059 95.624114) (xy 132.220086 95.623886) (xy 131.978891 95.723546) (xy 131.973911 95.728517) (xy 131.891059 95.694114) (xy 131.868187 95.694094) (xy 131.816454 95.568891) (xy 131.632079 95.384194) (xy 131.391059 95.284114) (xy 131.130086 95.283886) (xy 130.888891 95.383546) (xy 130.704194 95.567921) (xy 130.604114 95.808941) (xy 130.603886 96.069914) (xy 130.700148 96.302886) (xy 130.686025 96.302874) (xy 130.418725 96.41332) (xy 130.214039 96.61765) (xy 130.103126 96.884756) (xy 130.102874 97.173975) (xy 130.19382 97.394081) (xy 129.970086 97.393886) (xy 129.728891 97.493546) (xy 129.544194 97.677921) (xy 129.444114 97.918941) (xy 129.443886 98.179914) (xy 127.477598 98.179914) (xy 127.362079 98.064194) (xy 127.121059 97.964114) (xy 126.860086 97.963886) (xy 126.618891 98.063546) (xy 126.434194 98.247921) (xy 126.334114 98.488941) (xy 126.333886 98.749914) (xy 124.94646 98.749914) (xy 124.896454 98.628891) (xy 124.712079 98.444194) (xy 124.471059 98.344114) (xy 124.210086 98.343886) (xy 124.189941 98.35221) (xy 124.102079 98.264194) (xy 123.861059 98.164114) (xy 123.600086 98.163886) (xy 123.54051 98.188502) (xy 123.605886 98.031059) (xy 123.606114 97.770086) (xy 123.506454 97.528891) (xy 123.322079 97.344194) (xy 123.095027 97.249914) (xy 124.313886 97.249914) (xy 124.413546 97.491109) (xy 124.597921 97.675806) (xy 124.838941 97.775886) (xy 125.099914 97.776114) (xy 125.341109 97.676454) (xy 125.525806 97.492079) (xy 125.625886 97.251059) (xy 125.626114 96.990086) (xy 125.526454 96.748891) (xy 125.342079 96.564194) (xy 125.101059 96.464114) (xy 124.840086 96.463886) (xy 124.598891 96.563546) (xy 124.414194 96.747921) (xy 124.314114 96.988941) (xy 124.313886 97.249914) (xy 123.095027 97.249914) (xy 123.081059 97.244114) (xy 122.820086 97.243886) (xy 122.578891 97.343546) (xy 122.394194 97.527921) (xy 122.294114 97.768941) (xy 122.293886 98.029914) (xy 122.393546 98.271109) (xy 122.577921 98.455806) (xy 122.818941 98.555886) (xy 123.079914 98.556114) (xy 123.13949 98.531498) (xy 123.074114 98.688941) (xy 123.073886 98.949914) (xy 123.173546 99.191109) (xy 123.357921 99.375806) (xy 123.51625 99.44155) (xy 123.484114 99.518941) (xy 123.483886 99.779914) (xy 123.583546 100.021109) (xy 123.638 100.075658) (xy 123.638 100.362065) (xy 123.382064 100.618) (xy 122.347935 100.618) (xy 120.626799 98.896864) (xy 120.768941 98.955886) (xy 121.029914 98.956114) (xy 121.271109 98.856454) (xy 121.455806 98.672079) (xy 121.555886 98.431059) (xy 121.556114 98.170086) (xy 121.456454 97.928891) (xy 121.272079 97.744194) (xy 121.031059 97.644114) (xy 120.770086 97.643886) (xy 120.528891 97.743546) (xy 120.344194 97.927921) (xy 120.244114 98.168941) (xy 120.243886 98.429914) (xy 120.303059 98.573124) (xy 118.982 97.252064) (xy 118.982 96.419914) (xy 125.753886 96.419914) (xy 125.853546 96.661109) (xy 126.037921 96.845806) (xy 126.278941 96.945886) (xy 126.539914 96.946114) (xy 126.781109 96.846454) (xy 126.927904 96.699914) (xy 127.653886 96.699914) (xy 127.753546 96.941109) (xy 127.937921 97.125806) (xy 128.178941 97.225886) (xy 128.439914 97.226114) (xy 128.681109 97.126454) (xy 128.865806 96.942079) (xy 128.965886 96.701059) (xy 128.966114 96.440086) (xy 128.866454 96.198891) (xy 128.682079 96.014194) (xy 128.441059 95.914114) (xy 128.180086 95.913886) (xy 127.938891 96.013546) (xy 127.754194 96.197921) (xy 127.654114 96.438941) (xy 127.653886 96.699914) (xy 126.927904 96.699914) (xy 126.965806 96.662079) (xy 127.065886 96.421059) (xy 127.066114 96.160086) (xy 126.966454 95.918891) (xy 126.782079 95.734194) (xy 126.541059 95.634114) (xy 126.280086 95.633886) (xy 126.038891 95.733546) (xy 125.854194 95.917921) (xy 125.754114 96.158941) (xy 125.753886 96.419914) (xy 118.982 96.419914) (xy 118.982 95.389914) (xy 122.463886 95.389914) (xy 122.563546 95.631109) (xy 122.747921 95.815806) (xy 122.988941 95.915886) (xy 123.249914 95.916114) (xy 123.491109 95.816454) (xy 123.675806 95.632079) (xy 123.775886 95.391059) (xy 123.775983 95.279914) (xy 129.243886 95.279914) (xy 129.343546 95.521109) (xy 129.527921 95.705806) (xy 129.768941 95.805886) (xy 130.029914 95.806114) (xy 130.271109 95.706454) (xy 130.455806 95.522079) (xy 130.555886 95.281059) (xy 130.556114 95.020086) (xy 130.498196 94.879914) (xy 138.943886 94.879914) (xy 139.043546 95.121109) (xy 139.227921 95.305806) (xy 139.468941 95.405886) (xy 139.729914 95.406114) (xy 139.971109 95.306454) (xy 140.155806 95.122079) (xy 140.255886 94.881059) (xy 140.25608 94.659022) (xy 140.368941 94.705886) (xy 140.537317 94.706033) (xy 140.543546 94.721109) (xy 140.727921 94.905806) (xy 140.968941 95.005886) (xy 141.229914 95.006114) (xy 141.471109 94.906454) (xy 141.655806 94.722079) (xy 141.755886 94.481059) (xy 141.756114 94.220086) (xy 141.656454 93.978891) (xy 141.472079 93.794194) (xy 141.231059 93.694114) (xy 141.062683 93.693967) (xy 141.056454 93.678891) (xy 140.872079 93.494194) (xy 140.631059 93.394114) (xy 140.370086 93.393886) (xy 140.128891 93.493546) (xy 139.944194 93.677921) (xy 139.844114 93.918941) (xy 139.84392 94.140978) (xy 139.731059 94.094114) (xy 139.470086 94.093886) (xy 139.228891 94.193546) (xy 139.044194 94.377921) (xy 138.944114 94.618941) (xy 138.943886 94.879914) (xy 130.498196 94.879914) (xy 130.456454 94.778891) (xy 130.272079 94.594194) (xy 130.031059 94.494114) (xy 129.770086 94.493886) (xy 129.528891 94.593546) (xy 129.344194 94.777921) (xy 129.244114 95.018941) (xy 129.243886 95.279914) (xy 123.775983 95.279914) (xy 123.776114 95.130086) (xy 123.676454 94.888891) (xy 123.492079 94.704194) (xy 123.251059 94.604114) (xy 122.990086 94.603886) (xy 122.748891 94.703546) (xy 122.564194 94.887921) (xy 122.464114 95.128941) (xy 122.463886 95.389914) (xy 118.982 95.389914) (xy 118.982 93.919914) (xy 122.623886 93.919914) (xy 122.723546 94.161109) (xy 122.907921 94.345806) (xy 123.148941 94.445886) (xy 123.409914 94.446114) (xy 123.651109 94.346454) (xy 123.667677 94.329914) (xy 124.193886 94.329914) (xy 124.293546 94.571109) (xy 124.477921 94.755806) (xy 124.718941 94.855886) (xy 124.979914 94.856114) (xy 125.221109 94.756454) (xy 125.405806 94.572079) (xy 125.505886 94.331059) (xy 125.506114 94.070086) (xy 125.471437 93.986161) (xy 125.635806 93.822079) (xy 125.735886 93.581059) (xy 125.736114 93.320086) (xy 125.636454 93.078891) (xy 125.587563 93.029914) (xy 128.293886 93.029914) (xy 128.393546 93.271109) (xy 128.577921 93.455806) (xy 128.818941 93.555886) (xy 129.079914 93.556114) (xy 129.321109 93.456454) (xy 129.505806 93.272079) (xy 129.605886 93.031059) (xy 129.606114 92.770086) (xy 129.506454 92.528891) (xy 129.322079 92.344194) (xy 129.081059 92.244114) (xy 128.820086 92.243886) (xy 128.578891 92.343546) (xy 128.394194 92.527921) (xy 128.294114 92.768941) (xy 128.293886 93.029914) (xy 125.587563 93.029914) (xy 125.452079 92.894194) (xy 125.211059 92.794114) (xy 124.950086 92.793886) (xy 124.708891 92.893546) (xy 124.524194 93.077921) (xy 124.424114 93.318941) (xy 124.423886 93.579914) (xy 124.458563 93.663839) (xy 124.294194 93.827921) (xy 124.194114 94.068941) (xy 124.193886 94.329914) (xy 123.667677 94.329914) (xy 123.835806 94.162079) (xy 123.935886 93.921059) (xy 123.936114 93.660086) (xy 123.836454 93.418891) (xy 123.66386 93.245995) (xy 123.799914 93.246114) (xy 124.041109 93.146454) (xy 124.225806 92.962079) (xy 124.325886 92.721059) (xy 124.326114 92.460086) (xy 124.226454 92.218891) (xy 124.042079 92.034194) (xy 123.801059 91.934114) (xy 123.540086 91.933886) (xy 123.298891 92.033546) (xy 123.114194 92.217921) (xy 123.014114 92.458941) (xy 123.013886 92.719914) (xy 123.113546 92.961109) (xy 123.28614 93.134005) (xy 123.150086 93.133886) (xy 122.908891 93.233546) (xy 122.724194 93.417921) (xy 122.624114 93.658941) (xy 122.623886 93.919914) (xy 118.982 93.919914) (xy 118.982 91.875739) (xy 119.065806 91.792079) (xy 119.165886 91.551059) (xy 119.166114 91.290086) (xy 119.145667 91.2406) (xy 119.48067 91.2406) (xy 119.702387 91.196498) (xy 119.743546 91.296109) (xy 119.927921 91.480806) (xy 120.168941 91.580886) (xy 120.429914 91.581114) (xy 120.671109 91.481454) (xy 120.855806 91.297079) (xy 120.955886 91.056059) (xy 120.956083 90.829914) (xy 123.243886 90.829914) (xy 123.343546 91.071109) (xy 123.527921 91.255806) (xy 123.768941 91.355886) (xy 124.029914 91.356114) (xy 124.271109 91.256454) (xy 124.455806 91.072079) (xy 124.555886 90.831059) (xy 124.556114 90.570086) (xy 124.456454 90.328891) (xy 124.272079 90.144194) (xy 124.031059 90.044114) (xy 123.770086 90.043886) (xy 123.528891 90.143546) (xy 123.344194 90.327921) (xy 123.244114 90.568941) (xy 123.243886 90.829914) (xy 120.956083 90.829914) (xy 120.956114 90.795086) (xy 120.856454 90.553891) (xy 120.685261 90.382399) (xy 120.77127 89.95) (xy 120.752573 89.856003) (xy 120.879914 89.856114) (xy 121.121109 89.756454) (xy 121.305806 89.572079) (xy 121.405886 89.331059) (xy 121.406114 89.070086) (xy 121.306454 88.828891) (xy 121.122079 88.644194) (xy 120.881059 88.544114) (xy 120.620086 88.543886) (xy 120.378891 88.643546) (xy 120.194194 88.827921) (xy 120.169336 88.887786) (xy 119.974561 88.757641) (xy 119.584233 88.68) (xy 119.974561 88.602359) (xy 120.393262 88.322592) (xy 120.673029 87.903891) (xy 120.77127 87.41) (xy 120.673029 86.916109) (xy 120.525837 86.69582) (xy 120.621109 86.656454) (xy 120.805806 86.472079) (xy 120.905886 86.231059) (xy 120.906114 85.970086) (xy 120.806454 85.728891) (xy 120.622079 85.544194) (xy 120.567655 85.521595) (xy 120.673029 85.363891) (xy 120.760032 84.926493) (xy 121.611104 84.926493) (xy 121.710764 85.167688) (xy 121.895139 85.352385) (xy 122.136159 85.452465) (xy 122.397132 85.452693) (xy 122.638327 85.353033) (xy 122.823024 85.168658) (xy 122.923104 84.927638) (xy 122.923332 84.666665) (xy 122.823672 84.42547) (xy 122.639297 84.240773) (xy 122.398277 84.140693) (xy 122.137304 84.140465) (xy 121.896109 84.240125) (xy 121.711412 84.4245) (xy 121.611332 84.66552) (xy 121.611104 84.926493) (xy 120.760032 84.926493) (xy 120.77127 84.87) (xy 120.673029 84.376109) (xy 120.393262 83.957408) (xy 119.974561 83.677641) (xy 119.584233 83.6) (xy 119.974561 83.522359) (xy 120.393262 83.242592) (xy 120.673029 82.823891) (xy 120.77127 82.33) (xy 120.737438 82.159914) (xy 121.163886 82.159914) (xy 121.263546 82.401109) (xy 121.447921 82.585806) (xy 121.688941 82.685886) (xy 121.949914 82.686114) (xy 122.191109 82.586454) (xy 122.375806 82.402079) (xy 122.475886 82.161059) (xy 122.476114 81.900086) (xy 122.376454 81.658891) (xy 122.192079 81.474194) (xy 121.951059 81.374114) (xy 121.690086 81.373886) (xy 121.448891 81.473546) (xy 121.264194 81.657921) (xy 121.164114 81.898941) (xy 121.163886 82.159914) (xy 120.737438 82.159914) (xy 120.673029 81.836109) (xy 120.393262 81.417408) (xy 119.974561 81.137641) (xy 119.584233 81.06) (xy 119.974561 80.982359) (xy 120.393262 80.702592) (xy 120.673029 80.283891) (xy 120.761341 79.839914) (xy 123.073886 79.839914) (xy 123.173546 80.081109) (xy 123.357921 80.265806) (xy 123.598941 80.365886) (xy 123.859914 80.366114) (xy 124.101109 80.266454) (xy 124.285806 80.082079) (xy 124.385886 79.841059) (xy 124.386114 79.580086) (xy 124.286454 79.338891) (xy 124.102079 79.154194) (xy 123.861059 79.054114) (xy 123.600086 79.053886) (xy 123.358891 79.153546) (xy 123.174194 79.337921) (xy 123.074114 79.578941) (xy 123.073886 79.839914) (xy 120.761341 79.839914) (xy 120.77127 79.79) (xy 120.673029 79.296109) (xy 120.393262 78.877408) (xy 119.974561 78.597641) (xy 119.72985 78.548965) (xy 120.316 78.548965) (xy 120.474237 78.519191) (xy 120.619567 78.425673) (xy 120.717064 78.282981) (xy 120.751365 78.1136) (xy 120.751365 77.989914) (xy 121.743886 77.989914) (xy 121.843546 78.231109) (xy 122.027921 78.415806) (xy 122.268941 78.515886) (xy 122.529914 78.516114) (xy 122.771109 78.416454) (xy 122.955806 78.232079) (xy 123.055886 77.991059) (xy 123.056114 77.730086) (xy 122.956454 77.488891) (xy 122.947664 77.480085) (xy 123.025806 77.402079) (xy 123.125886 77.161059) (xy 123.126114 76.900086) (xy 123.026454 76.658891) (xy 122.842079 76.474194) (xy 122.601059 76.374114) (xy 122.340086 76.373886) (xy 122.098891 76.473546) (xy 121.914194 76.657921) (xy 121.814114 76.898941) (xy 121.813886 77.159914) (xy 121.913546 77.401109) (xy 121.922336 77.409915) (xy 121.844194 77.487921) (xy 121.744114 77.728941) (xy 121.743886 77.989914) (xy 120.751365 77.989914) (xy 120.751365 76.3864) (xy 120.721591 76.228163) (xy 120.671239 76.149914) (xy 122.843886 76.149914) (xy 122.943546 76.391109) (xy 123.127921 76.575806) (xy 123.368941 76.675886) (xy 123.629914 76.676114) (xy 123.871109 76.576454) (xy 124.021894 76.425932) (xy 124.229914 76.426114) (xy 124.385291 76.361913) (xy 124.418941 76.375886) (xy 124.679914 76.376114) (xy 124.921109 76.276454) (xy 125.105806 76.092079) (xy 125.205886 75.851059) (xy 125.205998 75.723312) (xy 125.428941 75.815886) (xy 125.689914 75.816114) (xy 125.931109 75.716454) (xy 126.023801 75.623924) (xy 126.148941 75.675886) (xy 126.409914 75.676114) (xy 126.651109 75.576454) (xy 126.835806 75.392079) (xy 126.935886 75.151059) (xy 126.936114 74.890086) (xy 126.836454 74.648891) (xy 126.652079 74.464194) (xy 126.411059 74.364114) (xy 126.150086 74.363886) (xy 125.908891 74.463546) (xy 125.816199 74.556076) (xy 125.691059 74.504114) (xy 125.684768 74.504109) (xy 125.921109 74.406454) (xy 126.105806 74.222079) (xy 126.205886 73.981059) (xy 126.206114 73.720086) (xy 126.106454 73.478891) (xy 125.922079 73.294194) (xy 125.681059 73.194114) (xy 125.420086 73.193886) (xy 125.178891 73.293546) (xy 124.994194 73.477921) (xy 124.894114 73.718941) (xy 124.893895 73.969505) (xy 124.856454 73.878891) (xy 124.672079 73.694194) (xy 124.431059 73.594114) (xy 124.170086 73.593886) (xy 123.928891 73.693546) (xy 123.744194 73.877921) (xy 123.644114 74.118941) (xy 123.643886 74.379914) (xy 123.743546 74.621109) (xy 123.927921 74.805806) (xy 124.168941 74.905886) (xy 124.429914 74.906114) (xy 124.671109 74.806454) (xy 124.855806 74.622079) (xy 124.955886 74.381059) (xy 124.956105 74.130495) (xy 124.993546 74.221109) (xy 125.177921 74.405806) (xy 125.418941 74.505886) (xy 125.425232 74.505891) (xy 125.188891 74.603546) (xy 125.004194 74.787921) (xy 124.904114 75.028941) (xy 124.904002 75.156688) (xy 124.681059 75.064114) (xy 124.420086 75.063886) (xy 124.264709 75.128087) (xy 124.231059 75.114114) (xy 123.970086 75.113886) (xy 123.728891 75.213546) (xy 123.578106 75.364068) (xy 123.370086 75.363886) (xy 123.128891 75.463546) (xy 122.944194 75.647921) (xy 122.844114 75.888941) (xy 122.843886 76.149914) (xy 120.671239 76.149914) (xy 120.628073 76.082833) (xy 120.485381 75.985336) (xy 120.316 75.951035) (xy 119.87747 75.951035) (xy 119.932688 75.818054) (xy 119.932916 75.557081) (xy 119.87624 75.419914) (xy 121.663886 75.419914) (xy 121.763546 75.661109) (xy 121.947921 75.845806) (xy 122.188941 75.945886) (xy 122.449914 75.946114) (xy 122.691109 75.846454) (xy 122.875806 75.662079) (xy 122.975886 75.421059) (xy 122.976114 75.160086) (xy 122.876454 74.918891) (xy 122.692079 74.734194) (xy 122.451059 74.634114) (xy 122.190086 74.633886) (xy 121.948891 74.733546) (xy 121.764194 74.917921) (xy 121.664114 75.158941) (xy 121.663886 75.419914) (xy 119.87624 75.419914) (xy 119.833256 75.315886) (xy 119.648881 75.131189) (xy 119.407861 75.031109) (xy 119.402 75.031104) (xy 119.402 74.007936) (xy 119.484439 73.925497) (xy 119.404114 74.118941) (xy 119.403886 74.379914) (xy 119.503546 74.621109) (xy 119.687921 74.805806) (xy 119.928941 74.905886) (xy 120.189914 74.906114) (xy 120.431109 74.806454) (xy 120.615806 74.622079) (xy 120.715886 74.381059) (xy 120.716114 74.120086) (xy 120.616454 73.878891) (xy 120.432079 73.694194) (xy 120.191059 73.594114) (xy 119.930086 73.593886) (xy 119.735752 73.674183) (xy 120.257935 73.152) (xy 120.474209 73.152) (xy 120.527921 73.205806) (xy 120.768941 73.305886) (xy 121.029914 73.306114) (xy 121.271109 73.206454) (xy 121.455806 73.022079) (xy 121.477466 72.969914) (xy 122.913886 72.969914) (xy 123.013546 73.211109) (xy 123.197921 73.395806) (xy 123.438941 73.495886) (xy 123.699914 73.496114) (xy 123.794936 73.456852) (xy 123.888941 73.495886) (xy 124.149914 73.496114) (xy 124.244936 73.456852) (xy 124.338941 73.495886) (xy 124.599914 73.496114) (xy 124.841109 73.396454) (xy 125.025806 73.212079) (xy 125.125886 72.971059) (xy 125.126114 72.710086) (xy 125.026454 72.468891) (xy 124.842079 72.284194) (xy 124.601059 72.184114) (xy 124.340086 72.183886) (xy 124.245064 72.223148) (xy 124.151059 72.184114) (xy 123.890086 72.183886) (xy 123.795064 72.223148) (xy 123.701059 72.184114) (xy 123.440086 72.183886) (xy 123.198891 72.283546) (xy 123.014194 72.467921) (xy 122.914114 72.708941) (xy 122.913886 72.969914) (xy 121.477466 72.969914) (xy 121.555886 72.781059) (xy 121.556114 72.520086) (xy 121.456454 72.278891) (xy 121.272079 72.094194) (xy 121.031059 71.994114) (xy 120.770086 71.993886) (xy 120.528891 72.093546) (xy 120.474342 72.148) (xy 120.050005 72.148) (xy 120.05 72.147999) (xy 119.86844 72.184114) (xy 119.857893 72.186212) (xy 119.695032 72.295032) (xy 119.69503 72.295035) (xy 118.845549 73.144516) (xy 118.756454 72.928891) (xy 118.572079 72.744194) (xy 118.331059 72.644114) (xy 118.227 72.644023) (xy 118.227 71.327) (xy 120.100999 71.327) ) ) ) (zone (net 2) (net_name /3V3) (layer B.Cu) (tstamp 559AD9EE) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 139.17 91.72) (xy 138.44 91.72) (xy 138.44 90.63) (xy 138.67 90.4) (xy 138.67 79.39) (xy 135.71 79.39) (xy 135.5 79.6) (xy 135.5 80.25) (xy 132.7 83.05) (xy 132.7 86.1) (xy 131.2 86.1) (xy 131.2 82.25) (xy 132.2 81.25) (xy 132.2 80.05) (xy 135.05 77.2) (xy 135.05 74.6) (xy 137.4 74.6) (xy 137.4 76.47) (xy 138.49 76.47) (xy 140.09 78.26) (xy 140.09 90.63) ) ) (filled_polygon (pts (xy 136.1 74.757) (xy 137.273 74.757) (xy 137.273 76.47) (xy 137.283006 76.51941) (xy 137.311447 76.561035) (xy 137.353841 76.588315) (xy 137.4 76.597) (xy 138.433179 76.597) (xy 138.569015 76.748967) (xy 138.486558 76.831281) (xy 138.394106 77.05393) (xy 138.393895 77.295012) (xy 138.438916 77.403971) (xy 138.411558 77.431281) (xy 138.319106 77.65393) (xy 138.318895 77.895012) (xy 138.410959 78.117823) (xy 138.581281 78.288442) (xy 138.80393 78.380894) (xy 139.045012 78.381105) (xy 139.267823 78.289041) (xy 139.438442 78.118719) (xy 139.524998 77.91027) (xy 139.963 78.349037) (xy 139.963 82.621205) (xy 139.865301 82.661673) (xy 139.686673 82.840302) (xy 139.59 83.073691) (xy 139.59 83.21425) (xy 139.74875 83.373) (xy 139.963 83.373) (xy 139.963 83.627) (xy 139.74875 83.627) (xy 139.59 83.78575) (xy 139.59 83.926309) (xy 139.686673 84.159698) (xy 139.840615 84.313641) (xy 139.840615 84.9) (xy 139.851358 84.957093) (xy 139.840301 84.961673) (xy 139.661673 85.140302) (xy 139.565 85.373691) (xy 139.565 85.51425) (xy 139.72375 85.673) (xy 139.963 85.673) (xy 139.963 85.927) (xy 139.72375 85.927) (xy 139.565 86.08575) (xy 139.565 86.226309) (xy 139.661673 86.459698) (xy 139.815615 86.613641) (xy 139.815615 87.2) (xy 139.841903 87.339708) (xy 139.92447 87.46802) (xy 139.963 87.494347) (xy 139.963 90.583568) (xy 139.111002 91.593) (xy 138.796469 91.593) (xy 138.781675 91.583115) (xy 138.58 91.543) (xy 138.567 91.543) (xy 138.567 90.682606) (xy 138.759803 90.489803) (xy 138.787666 90.447789) (xy 138.797 90.4) (xy 138.797 86.35515) (xy 138.885894 86.14107) (xy 138.886105 85.899988) (xy 138.797 85.684338) (xy 138.797 85.319923) (xy 138.933442 85.183719) (xy 139.025894 84.96107) (xy 139.026105 84.719988) (xy 138.984385 84.619018) (xy 138.984385 83.995) (xy 138.958097 83.855292) (xy 138.87553 83.72698) (xy 138.797 83.673322) (xy 138.797 83.562224) (xy 138.819612 83.539612) (xy 138.917594 83.392973) (xy 138.952 83.22) (xy 138.952 81.880909) (xy 138.992823 81.864041) (xy 139.163442 81.693719) (xy 139.255894 81.47107) (xy 139.256105 81.229988) (xy 139.164041 81.007177) (xy 138.993719 80.836558) (xy 138.797 80.754873) (xy 138.797 80.224294) (xy 138.942823 80.164041) (xy 139.113442 79.993719) (xy 139.205894 79.77107) (xy 139.206105 79.529988) (xy 139.114041 79.307177) (xy 138.943719 79.136558) (xy 138.72107 79.044106) (xy 138.479988 79.043895) (xy 138.257177 79.135959) (xy 138.129914 79.263) (xy 137.044084 79.263) (xy 137.088442 79.218719) (xy 137.180894 78.99607) (xy 137.181105 78.754988) (xy 137.089041 78.532177) (xy 136.918719 78.361558) (xy 136.69607 78.269106) (xy 136.454988 78.268895) (xy 136.232177 78.360959) (xy 136.061558 78.531281) (xy 135.969106 78.75393) (xy 135.968895 78.995012) (xy 136.060959 79.217823) (xy 136.106057 79.263) (xy 135.71 79.263) (xy 135.66059 79.273006) (xy 135.620197 79.300197) (xy 135.410197 79.510197) (xy 135.382334 79.552211) (xy 135.373 79.6) (xy 135.373 80.197394) (xy 134.576458 80.993936) (xy 134.529988 80.993895) (xy 134.372499 81.058968) (xy 134.411309 80.965504) (xy 134.41152 80.724422) (xy 134.319456 80.501611) (xy 134.149134 80.330992) (xy 133.926485 80.23854) (xy 133.730999 80.238369) (xy 133.730999 80.228999) (xy 133.696593 80.056026) (xy 133.598611 79.909387) (xy 133.259236 79.570012) (xy 133.543895 79.570012) (xy 133.635959 79.792823) (xy 133.806281 79.963442) (xy 134.02893 80.055894) (xy 134.270012 80.056105) (xy 134.492823 79.964041) (xy 134.663442 79.793719) (xy 134.755894 79.57107) (xy 134.756105 79.329988) (xy 134.664041 79.107177) (xy 134.493719 78.936558) (xy 134.27107 78.844106) (xy 134.029988 78.843895) (xy 133.807177 78.935959) (xy 133.636558 79.106281) (xy 133.544106 79.32893) (xy 133.543895 79.570012) (xy 133.259236 79.570012) (xy 133.059415 79.370191) (xy 134.235958 78.193648) (xy 134.452823 78.104041) (xy 134.623442 77.933719) (xy 134.714018 77.715588) (xy 135.139803 77.289803) (xy 135.167666 77.247789) (xy 135.177 77.2) (xy 135.177 74.727) (xy 135.951857 74.727) ) ) (filled_polygon (pts (xy 132.573 84.862224) (xy 132.573 85.02575) (xy 132.525 85.07375) (xy 132.525 85.723) (xy 132.547 85.723) (xy 132.547 85.973) (xy 132.385 85.973) (xy 132.385 85.93575) (xy 132.22625 85.777) (xy 131.625 85.777) (xy 131.625 85.797) (xy 131.375 85.797) (xy 131.375 85.777) (xy 131.353 85.777) (xy 131.353 85.523) (xy 131.375 85.523) (xy 131.375 85.503) (xy 131.515 85.503) (xy 131.515 85.56425) (xy 131.67375 85.723) (xy 132.275 85.723) (xy 132.275 85.47425) (xy 132.385 85.36425) (xy 132.385 85.223691) (xy 132.288327 84.990302) (xy 132.201769 84.903743) (xy 132.359698 84.838327) (xy 132.454401 84.743625) ) ) (filled_polygon (pts (xy 131.827 83.925) (xy 131.847 83.925) (xy 131.847 84.175) (xy 131.827 84.175) (xy 131.827 84.197) (xy 131.573 84.197) (xy 131.573 84.175) (xy 131.553 84.175) (xy 131.553 83.925) (xy 131.573 83.925) (xy 131.573 83.903) (xy 131.827 83.903) ) ) (filled_polygon (pts (xy 132.777 80.725) (xy 132.797 80.725) (xy 132.797 80.975) (xy 132.777 80.975) (xy 132.777 80.997) (xy 132.523 80.997) (xy 132.523 80.975) (xy 132.503 80.975) (xy 132.503 80.725) (xy 132.523 80.725) (xy 132.523 80.703) (xy 132.777 80.703) ) ) ) (zone (net 1) (net_name GND) (layer F.Cu) (tstamp 559BFF3B) (hatch edge 0.508) (priority 1) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 150.45 79) (xy 140.95 79) (xy 140.95 89.9) (xy 126.65 89.9) (xy 126.65 102.25) (xy 150.55 102.25) (xy 150.55 102.05) ) ) (filled_polygon (pts (xy 132.336748 98.472998) (xy 132.19 98.472998) (xy 132.19 98.485615) (xy 131.775 98.485615) (xy 131.635292 98.511903) (xy 131.579196 98.548) (xy 131.1 98.548) (xy 130.927027 98.582406) (xy 130.780388 98.680388) (xy 130.630388 98.830388) (xy 130.532406 98.977027) (xy 130.498 99.15) (xy 130.498 100.1) (xy 130.532406 100.272973) (xy 130.630388 100.419612) (xy 131.180387 100.969612) (xy 131.273757 101.032) (xy 131.327027 101.067594) (xy 131.354205 101.073) (xy 130.295 101.073) (xy 130.295 101.02575) (xy 130.13625 100.867) (xy 129.387 100.867) (xy 129.387 100.887) (xy 129.133 100.887) (xy 129.133 100.867) (xy 129.113 100.867) (xy 129.113 100.613) (xy 129.133 100.613) (xy 129.133 100.593) (xy 129.387 100.593) (xy 129.387 100.613) (xy 130.13625 100.613) (xy 130.295 100.45425) (xy 130.295 100.23869) (xy 130.198327 100.005301) (xy 130.101203 99.908178) (xy 130.18302 99.85553) (xy 130.269101 99.729547) (xy 130.299385 99.58) (xy 130.299385 98.623309) (xy 130.442823 98.564041) (xy 130.613442 98.393719) (xy 130.641146 98.327) (xy 132.19075 98.327) ) ) (filled_polygon (pts (xy 144.530388 97.669612) (xy 145.080387 98.219612) (xy 145.11182 98.240615) (xy 144.82 98.240615) (xy 144.680292 98.266903) (xy 144.55198 98.34947) (xy 144.536955 98.371459) (xy 144.499547 98.345899) (xy 144.35 98.315615) (xy 143.85 98.315615) (xy 143.710292 98.341903) (xy 143.58198 98.42447) (xy 143.495899 98.550453) (xy 143.465615 98.7) (xy 143.465615 99.286359) (xy 143.311673 99.440302) (xy 143.215 99.673691) (xy 143.215 99.81425) (xy 143.310855 99.910105) (xy 143.25 99.898) (xy 141.9 99.898) (xy 141.727027 99.932406) (xy 141.580388 100.030388) (xy 141.212776 100.398) (xy 139.484594 100.398) (xy 139.535 100.276309) (xy 139.535 100.13575) (xy 139.37625 99.977) (xy 138.775 99.977) (xy 138.775 99.997) (xy 138.525 99.997) (xy 138.525 99.977) (xy 138.503 99.977) (xy 138.503 99.723) (xy 138.525 99.723) (xy 138.525 99.703) (xy 138.775 99.703) (xy 138.775 99.723) (xy 139.37625 99.723) (xy 139.535 99.56425) (xy 139.535 99.423691) (xy 139.438327 99.190302) (xy 139.284385 99.036359) (xy 139.284385 98.685) (xy 139.37631 98.685) (xy 139.609699 98.588327) (xy 139.788327 98.409698) (xy 139.885 98.176309) (xy 139.885 98.03575) (xy 139.72625 97.877) (xy 139.125 97.877) (xy 139.125 97.897) (xy 138.875 97.897) (xy 138.875 97.877) (xy 138.853 97.877) (xy 138.853 97.623) (xy 138.875 97.623) (xy 138.875 97.603) (xy 139.125 97.603) (xy 139.125 97.623) (xy 139.592735 97.623) (xy 139.794746 97.706882) (xy 140.064073 97.707117) (xy 140.137367 97.676832) (xy 140.250453 97.754101) (xy 140.4 97.784385) (xy 140.699834 97.784385) (xy 140.785959 97.992823) (xy 140.956281 98.163442) (xy 141.17893 98.255894) (xy 141.420012 98.256105) (xy 141.642823 98.164041) (xy 141.703438 98.103531) (xy 141.72 98.106885) (xy 142.553891 98.106885) (xy 142.316805 98.343971) (xy 142.229988 98.343895) (xy 142.007177 98.435959) (xy 141.836558 98.606281) (xy 141.744106 98.82893) (xy 141.743895 99.070012) (xy 141.835959 99.292823) (xy 142.006281 99.463442) (xy 142.22893 99.555894) (xy 142.470012 99.556105) (xy 142.692823 99.464041) (xy 142.863442 99.293719) (xy 142.955894 99.07107) (xy 142.955971 98.983253) (xy 143.569612 98.369612) (xy 143.667594 98.222973) (xy 143.676876 98.176309) (xy 143.702 98.05) (xy 143.702 97.609154) (xy 143.706281 97.613442) (xy 143.92893 97.705894) (xy 144.170012 97.706105) (xy 144.392823 97.614041) (xy 144.45307 97.553899) ) ) (filled_polygon (pts (xy 144.225 99.973) (xy 144.247 99.973) (xy 144.247 100.12375) (xy 144.185 100.18575) (xy 144.185 100.247) (xy 143.975 100.247) (xy 143.975 100.227) (xy 143.953 100.227) (xy 143.953 99.973) (xy 143.975 99.973) (xy 143.975 99.953) (xy 144.225 99.953) ) ) (filled_polygon (pts (xy 145.477 99.773) (xy 145.497 99.773) (xy 145.497 100.027) (xy 145.477 100.027) (xy 145.477 100.047) (xy 145.223 100.047) (xy 145.223 100.027) (xy 144.985 100.027) (xy 144.985 99.972998) (xy 144.826252 99.972998) (xy 144.985 99.81425) (xy 144.985 99.773) (xy 145.223 99.773) (xy 145.223 99.753) (xy 145.477 99.753) ) ) (filled_polygon (pts (xy 128.767 98.923) (xy 128.787 98.923) (xy 128.787 99.177) (xy 128.767 99.177) (xy 128.767 99.197) (xy 128.513 99.197) (xy 128.513 99.177) (xy 128.493 99.177) (xy 128.493 98.923) (xy 128.513 98.923) (xy 128.513 98.903) (xy 128.767 98.903) ) ) (filled_polygon (pts (xy 133.277 98.485) (xy 133.297 98.485) (xy 133.297 98.715) (xy 133.277 98.715) (xy 133.277 98.747) (xy 133.023 98.747) (xy 133.023 98.715) (xy 133.003 98.715) (xy 133.003 98.485) (xy 133.023 98.485) (xy 133.023 98.453) (xy 133.277 98.453) ) ) (filled_polygon (pts (xy 135.777 98.485) (xy 135.797 98.485) (xy 135.797 98.648) (xy 135.503 98.648) (xy 135.503 98.485) (xy 135.523 98.485) (xy 135.523 98.453) (xy 135.777 98.453) ) ) (filled_polygon (pts (xy 137.386558 98.156281) (xy 137.294106 98.37893) (xy 137.29397 98.534644) (xy 137.2 98.515615) (xy 136.61 98.515615) (xy 136.61 98.472998) (xy 136.463252 98.472998) (xy 136.61 98.32625) (xy 136.61 98.285) (xy 136.627002 98.285) (xy 136.627002 98.126252) (xy 136.78575 98.285) (xy 136.926309 98.285) (xy 137.159698 98.188327) (xy 137.313641 98.034385) (xy 137.508667 98.034385) ) ) (filled_polygon (pts (xy 134.210615 94.78) (xy 134.236903 94.919708) (xy 134.31947 95.04802) (xy 134.445453 95.134101) (xy 134.595 95.164385) (xy 134.699095 95.164385) (xy 135.357355 95.822645) (xy 135.528325 95.936885) (xy 135.543986 95.94) (xy 135.73 95.977) (xy 136.357193 95.977) (xy 136.294106 96.12893) (xy 136.293895 96.370012) (xy 136.372998 96.561455) (xy 136.372998 96.673748) (xy 136.21425 96.515) (xy 136.073691 96.515) (xy 135.840302 96.611673) (xy 135.661673 96.790301) (xy 135.565 97.02369) (xy 135.565 97.11625) (xy 135.72375 97.275) (xy 136.373 97.275) (xy 136.373 97.253) (xy 136.627 97.253) (xy 136.627 97.275) (xy 136.647 97.275) (xy 136.647 97.525) (xy 136.627 97.525) (xy 136.627 97.547) (xy 136.373 97.547) (xy 136.373 97.525) (xy 135.72375 97.525) (xy 135.565 97.68375) (xy 135.565 97.735) (xy 135.522998 97.735) (xy 135.522998 97.893748) (xy 135.36425 97.735) (xy 135.19869 97.735) (xy 134.965301 97.831673) (xy 134.786673 98.010302) (xy 134.69 98.243691) (xy 134.69 98.32625) (xy 134.836748 98.472998) (xy 134.69 98.472998) (xy 134.69 98.485615) (xy 134.275 98.485615) (xy 134.135292 98.511903) (xy 134.11 98.528178) (xy 134.11 98.472998) (xy 133.963252 98.472998) (xy 134.11 98.32625) (xy 134.11 98.243691) (xy 134.100531 98.220831) (xy 134.172645 98.172645) (xy 135.072645 97.272645) (xy 135.186885 97.101675) (xy 135.19683 97.051675) (xy 135.227 96.9) (xy 135.227 96.511068) (xy 135.305894 96.32107) (xy 135.306105 96.079988) (xy 135.214041 95.857177) (xy 135.043719 95.686558) (xy 134.82107 95.594106) (xy 134.579988 95.593895) (xy 134.357177 95.685959) (xy 134.186558 95.856281) (xy 134.094106 96.07893) (xy 134.093895 96.320012) (xy 134.173 96.51146) (xy 134.173 96.68171) (xy 133.58171 97.273) (xy 131.462142 97.273) (xy 131.506882 97.165254) (xy 131.507117 96.895927) (xy 131.404267 96.647011) (xy 131.30347 96.546038) (xy 131.380012 96.546105) (xy 131.602823 96.454041) (xy 131.773442 96.283719) (xy 131.865894 96.06107) (xy 131.865971 95.973253) (xy 133.757224 94.082) (xy 134.210615 94.082) ) ) (filled_polygon (pts (xy 149.623 83.725615) (xy 149.520959 83.725615) (xy 149.605894 83.52107) (xy 149.606105 83.279988) (xy 149.514041 83.057177) (xy 149.343719 82.886558) (xy 149.12107 82.794106) (xy 148.879988 82.793895) (xy 148.814793 82.820833) (xy 148.7 82.798) (xy 148.475026 82.798) (xy 148.513327 82.759699) (xy 148.61 82.52631) (xy 148.61 82.44625) (xy 148.45125 82.2875) (xy 148.185432 82.2875) (xy 148.124547 82.245899) (xy 147.975 82.215615) (xy 146.225 82.215615) (xy 146.085292 82.241903) (xy 146.014433 82.2875) (xy 145.74875 82.2875) (xy 145.59 82.44625) (xy 145.59 82.522397) (xy 145.557177 82.535959) (xy 145.386558 82.706281) (xy 145.294106 82.92893) (xy 145.293895 83.170012) (xy 145.385959 83.392823) (xy 145.556281 83.563442) (xy 145.77893 83.655894) (xy 145.840615 83.655948) (xy 145.840615 83.7) (xy 145.860122 83.803671) (xy 145.840615 83.9) (xy 145.840615 84.344036) (xy 145.679988 84.343895) (xy 145.457177 84.435959) (xy 145.286558 84.606281) (xy 145.194106 84.82893) (xy 145.193895 85.070012) (xy 145.285959 85.292823) (xy 145.456281 85.463442) (xy 145.59 85.518967) (xy 145.59 85.552002) (xy 145.669557 85.552002) (xy 145.67893 85.555894) (xy 145.730311 85.555939) (xy 145.630649 85.655601) (xy 145.557177 85.685959) (xy 145.386558 85.856281) (xy 145.294106 86.07893) (xy 145.293895 86.320012) (xy 145.360843 86.482038) (xy 145.336558 86.506281) (xy 145.244106 86.72893) (xy 145.243895 86.970012) (xy 145.335959 87.192823) (xy 145.506281 87.363442) (xy 145.72893 87.455894) (xy 145.840615 87.455992) (xy 145.840615 87.6) (xy 145.860122 87.703671) (xy 145.840615 87.8) (xy 145.840615 88.243957) (xy 145.769988 88.243895) (xy 145.547177 88.335959) (xy 145.376558 88.506281) (xy 145.284106 88.72893) (xy 145.283895 88.970012) (xy 145.375959 89.192823) (xy 145.546281 89.363442) (xy 145.59 89.381596) (xy 145.59 89.452002) (xy 145.734248 89.452002) (xy 145.59 89.59625) (xy 145.59 89.67631) (xy 145.686673 89.909699) (xy 145.865302 90.088327) (xy 146.098691 90.185) (xy 146.81425 90.185) (xy 146.973 90.02625) (xy 146.973 89.4375) (xy 146.953 89.4375) (xy 146.953 89.284385) (xy 147.247 89.284385) (xy 147.247 89.4375) (xy 147.227 89.4375) (xy 147.227 90.02625) (xy 147.38575 90.185) (xy 147.96075 90.185) (xy 147.99875 90.223) (xy 148.723 90.223) (xy 148.723 90.203) (xy 148.977 90.203) (xy 148.977 90.223) (xy 148.997 90.223) (xy 148.997 90.477) (xy 148.977 90.477) (xy 148.977 90.96375) (xy 148.907 91.03375) (xy 148.907 91.635) (xy 148.927 91.635) (xy 148.927 91.85584) (xy 148.926558 91.856281) (xy 148.914633 91.885) (xy 148.907 91.885) (xy 148.907 91.903382) (xy 148.834106 92.07893) (xy 148.833895 92.320012) (xy 148.925959 92.542823) (xy 149.088 92.705147) (xy 149.088 92.85406) (xy 149.053253 92.854029) (xy 148.957112 92.757888) (xy 148.810473 92.659906) (xy 148.6375 92.6255) (xy 148.51375 92.6255) (xy 148.653 92.48625) (xy 148.653 91.885) (xy 148.633 91.885) (xy 148.633 91.635) (xy 148.653 91.635) (xy 148.653 91.29625) (xy 148.723 91.22625) (xy 148.723 90.477) (xy 147.99875 90.477) (xy 147.84 90.63575) (xy 147.84 90.876309) (xy 147.936673 91.109698) (xy 147.95259 91.125615) (xy 147.48984 91.125615) (xy 147.456029 91.091805) (xy 147.456105 91.004988) (xy 147.364041 90.782177) (xy 147.193719 90.611558) (xy 146.97107 90.519106) (xy 146.729988 90.518895) (xy 146.507177 90.610959) (xy 146.336558 90.781281) (xy 146.244106 91.00393) (xy 146.243895 91.245012) (xy 146.335959 91.467823) (xy 146.506281 91.638442) (xy 146.72893 91.730894) (xy 146.816746 91.730971) (xy 146.995615 91.90984) (xy 146.995615 92.01) (xy 147.021903 92.149708) (xy 147.10447 92.27802) (xy 147.230453 92.364101) (xy 147.38 92.394385) (xy 147.966359 92.394385) (xy 148.06509 92.493115) (xy 146.92 92.493115) (xy 146.780292 92.519403) (xy 146.65198 92.60197) (xy 146.565899 92.727953) (xy 146.535615 92.8775) (xy 146.535615 93.2775) (xy 146.558536 93.399313) (xy 146.54973 93.442798) (xy 146.418719 93.311558) (xy 146.19607 93.219106) (xy 145.954988 93.218895) (xy 145.732177 93.310959) (xy 145.561558 93.481281) (xy 145.469106 93.70393) (xy 145.468895 93.945012) (xy 145.560959 94.167823) (xy 145.642866 94.249872) (xy 145.657406 94.322973) (xy 145.755388 94.469612) (xy 145.952888 94.667112) (xy 146.099527 94.765094) (xy 146.2725 94.7995) (xy 146.36075 94.7995) (xy 146.44375 94.8825) (xy 146.742498 94.8825) (xy 146.770453 94.901601) (xy 146.92 94.931885) (xy 147.667 94.931885) (xy 147.667 95.033115) (xy 146.92 95.033115) (xy 146.780292 95.059403) (xy 146.744398 95.0825) (xy 146.44375 95.0825) (xy 146.285 95.24125) (xy 146.285 95.30881) (xy 146.381673 95.542199) (xy 146.535615 95.69614) (xy 146.535615 95.8175) (xy 146.558536 95.939313) (xy 146.535615 96.0525) (xy 146.535615 96.393987) (xy 146.429988 96.393895) (xy 146.207177 96.485959) (xy 146.049963 96.6429) (xy 145.993719 96.586558) (xy 145.77107 96.494106) (xy 145.529988 96.493895) (xy 145.307177 96.585959) (xy 145.302 96.591127) (xy 145.302 93.45) (xy 145.267594 93.277027) (xy 145.245847 93.24448) (xy 145.202427 93.179498) (xy 145.338442 93.043719) (xy 145.430894 92.82107) (xy 145.431105 92.579988) (xy 145.339041 92.357177) (xy 145.168719 92.186558) (xy 145.044385 92.13493) (xy 145.044385 90.975) (xy 145.018097 90.835292) (xy 144.93553 90.70698) (xy 144.809547 90.620899) (xy 144.66 90.590615) (xy 143.66 90.590615) (xy 143.520292 90.616903) (xy 143.39198 90.69947) (xy 143.305899 90.825453) (xy 143.275615 90.975) (xy 143.275615 92.225) (xy 143.301903 92.364708) (xy 143.38447 92.49302) (xy 143.510453 92.579101) (xy 143.66 92.609385) (xy 143.708 92.609385) (xy 143.708 92.76) (xy 143.742406 92.932973) (xy 143.840388 93.079612) (xy 144.398 93.637225) (xy 144.398 96.590846) (xy 144.393719 96.586558) (xy 144.17107 96.494106) (xy 143.929988 96.493895) (xy 143.707177 96.585959) (xy 143.702 96.591127) (xy 143.702 96.45) (xy 143.667594 96.277027) (xy 143.569612 96.130388) (xy 143.548057 96.108833) (xy 143.703442 95.953719) (xy 143.795894 95.73107) (xy 143.796105 95.489988) (xy 143.704041 95.267177) (xy 143.533719 95.096558) (xy 143.31107 95.004106) (xy 143.304385 95.0041) (xy 143.304385 94.7825) (xy 143.287078 94.690521) (xy 143.322112 94.667112) (xy 143.433195 94.556029) (xy 143.520012 94.556105) (xy 143.742823 94.464041) (xy 143.913442 94.293719) (xy 144.005894 94.07107) (xy 144.006105 93.829988) (xy 143.914041 93.607177) (xy 143.743719 93.436558) (xy 143.52107 93.344106) (xy 143.290938 93.343905) (xy 143.304385 93.2775) (xy 143.304385 92.8775) (xy 143.278097 92.737792) (xy 143.19553 92.60948) (xy 143.069547 92.523399) (xy 142.931496 92.495443) (xy 143.014101 92.374547) (xy 143.044385 92.225) (xy 143.044385 90.975) (xy 143.018097 90.835292) (xy 142.93553 90.70698) (xy 142.809547 90.620899) (xy 142.66 90.590615) (xy 141.66 90.590615) (xy 141.520292 90.616903) (xy 141.39198 90.69947) (xy 141.305899 90.825453) (xy 141.275615 90.975) (xy 141.275615 92.030045) (xy 141.269547 92.025899) (xy 141.12 91.995615) (xy 140.615783 91.995615) (xy 140.55553 91.90198) (xy 140.429547 91.815899) (xy 140.28 91.785615) (xy 139.78 91.785615) (xy 139.640292 91.811903) (xy 139.51198 91.89447) (xy 139.425899 92.020453) (xy 139.395615 92.17) (xy 139.395615 92.77) (xy 139.421903 92.909708) (xy 139.49368 93.021252) (xy 139.425899 93.120453) (xy 139.395615 93.27) (xy 139.395615 93.87) (xy 139.421903 94.009708) (xy 139.50447 94.13802) (xy 139.534476 94.158523) (xy 139.430302 94.201673) (xy 139.251673 94.380301) (xy 139.155 94.61369) (xy 139.155 94.70625) (xy 139.31375 94.865) (xy 139.963 94.865) (xy 139.963 94.843) (xy 140.217 94.843) (xy 140.217 94.865) (xy 140.237 94.865) (xy 140.237 95.115) (xy 140.217 95.115) (xy 140.217 95.137) (xy 139.963 95.137) (xy 139.963 95.115) (xy 139.31375 95.115) (xy 139.155 95.27375) (xy 139.155 95.36631) (xy 139.251673 95.599699) (xy 139.430302 95.778327) (xy 139.663691 95.875) (xy 139.80425 95.875) (xy 139.962998 95.716252) (xy 139.962998 95.875) (xy 140.015615 95.875) (xy 140.015615 96.3) (xy 140.025603 96.353083) (xy 139.795927 96.352883) (xy 139.634385 96.419631) (xy 139.634385 96.35) (xy 139.608097 96.210292) (xy 139.52553 96.08198) (xy 139.399547 95.995899) (xy 139.25 95.965615) (xy 139.150166 95.965615) (xy 139.064041 95.757177) (xy 138.893719 95.586558) (xy 138.67107 95.494106) (xy 138.505961 95.493961) (xy 138.506105 95.329988) (xy 138.414041 95.107177) (xy 138.353097 95.046127) (xy 138.589613 94.809612) (xy 138.687594 94.662973) (xy 138.722 94.49) (xy 138.722 93.015054) (xy 138.783442 92.953719) (xy 138.875894 92.73107) (xy 138.876105 92.489988) (xy 138.784041 92.267177) (xy 138.613719 92.096558) (xy 138.566618 92.077) (xy 139.15 92.077) (xy 139.287023 92.051217) (xy 139.412871 91.970237) (xy 139.497298 91.846674) (xy 139.527 91.7) (xy 139.527 90.84) (xy 139.501217 90.702977) (xy 139.420237 90.577129) (xy 139.337633 90.520688) (xy 139.213719 90.396558) (xy 138.99107 90.304106) (xy 138.749988 90.303895) (xy 138.527177 90.395959) (xy 138.460019 90.463) (xy 137.674334 90.463) (xy 137.792823 90.414041) (xy 137.963442 90.243719) (xy 138.053432 90.027) (xy 140.95 90.027) (xy 140.99941 90.016994) (xy 141.041035 89.988553) (xy 141.068315 89.946159) (xy 141.077 89.9) (xy 141.077 89.777) (xy 141.325 89.777) (xy 141.497973 89.742594) (xy 141.644612 89.644612) (xy 142.07605 89.213175) (xy 142.17893 89.255894) (xy 142.420012 89.256105) (xy 142.642823 89.164041) (xy 142.813442 88.993719) (xy 142.905894 88.77107) (xy 142.906105 88.529988) (xy 142.814041 88.307177) (xy 142.643719 88.136558) (xy 142.42107 88.044106) (xy 142.252 88.043958) (xy 142.252 86.793995) (xy 142.271001 86.765558) (xy 142.305407 86.592585) (xy 142.305407 83.114117) (xy 142.271001 82.941144) (xy 142.271001 82.941143) (xy 142.230412 82.880398) (xy 142.230513 82.765106) (xy 142.138449 82.542295) (xy 141.968127 82.371676) (xy 141.745478 82.279224) (xy 141.669488 82.279157) (xy 141.755894 82.07107) (xy 141.756105 81.829988) (xy 141.669345 81.620012) (xy 145.243895 81.620012) (xy 145.335959 81.842823) (xy 145.506281 82.013442) (xy 145.72893 82.105894) (xy 145.970012 82.106105) (xy 146.037546 82.0782) (xy 146.075453 82.104101) (xy 146.225 82.134385) (xy 147.975 82.134385) (xy 148.114708 82.108097) (xy 148.185567 82.0625) (xy 148.45125 82.0625) (xy 148.61 81.90375) (xy 148.61 81.82369) (xy 148.513327 81.590301) (xy 148.359385 81.43636) (xy 148.359385 81.3) (xy 148.339878 81.196329) (xy 148.359385 81.1) (xy 148.359385 80.65) (xy 148.333097 80.510292) (xy 148.25053 80.38198) (xy 148.124547 80.295899) (xy 147.975 80.265615) (xy 146.225 80.265615) (xy 146.121572 80.285076) (xy 146.07107 80.264106) (xy 145.829988 80.263895) (xy 145.607177 80.355959) (xy 145.436558 80.526281) (xy 145.344106 80.74893) (xy 145.343895 80.990012) (xy 145.390391 81.102541) (xy 145.336558 81.156281) (xy 145.244106 81.37893) (xy 145.243895 81.620012) (xy 141.669345 81.620012) (xy 141.664041 81.607177) (xy 141.627359 81.570431) (xy 141.642823 81.564041) (xy 141.667885 81.539022) (xy 141.82893 81.605894) (xy 142.070012 81.606105) (xy 142.292823 81.514041) (xy 142.463442 81.343719) (xy 142.555894 81.12107) (xy 142.555938 81.070601) (xy 142.692823 81.014041) (xy 142.863442 80.843719) (xy 142.955894 80.62107) (xy 142.956105 80.379988) (xy 142.910664 80.270012) (xy 143.093895 80.270012) (xy 143.185959 80.492823) (xy 143.356281 80.663442) (xy 143.57893 80.755894) (xy 143.820012 80.756105) (xy 144.042823 80.664041) (xy 144.213442 80.493719) (xy 144.305894 80.27107) (xy 144.306105 80.029988) (xy 144.214041 79.807177) (xy 144.043719 79.636558) (xy 143.82107 79.544106) (xy 143.579988 79.543895) (xy 143.357177 79.635959) (xy 143.186558 79.806281) (xy 143.094106 80.02893) (xy 143.093895 80.270012) (xy 142.910664 80.270012) (xy 142.864041 80.157177) (xy 142.693719 79.986558) (xy 142.47107 79.894106) (xy 142.340312 79.893992) (xy 142.322973 79.882406) (xy 142.15 79.848) (xy 141.077 79.848) (xy 141.077 79.127) (xy 149.623 79.127) ) ) (filled_polygon (pts (xy 133.77893 93.005894) (xy 133.96 93.006052) (xy 133.96 93.007002) (xy 134.118748 93.007002) (xy 133.96 93.16575) (xy 133.96 93.178) (xy 133.57 93.178) (xy 133.399068 93.212) (xy 133.397027 93.212406) (xy 133.250388 93.310388) (xy 131.226805 95.333971) (xy 131.139988 95.333895) (xy 130.917177 95.425959) (xy 130.757054 95.585804) (xy 130.71625 95.545) (xy 130.067 95.545) (xy 130.067 95.567) (xy 129.813 95.567) (xy 129.813 95.545) (xy 129.793 95.545) (xy 129.793 95.295) (xy 129.813 95.295) (xy 129.813 95.273) (xy 130.067 95.273) (xy 130.067 95.295) (xy 130.71625 95.295) (xy 130.875 95.13625) (xy 130.875 95.132002) (xy 131.219998 95.132002) (xy 131.392971 95.097596) (xy 131.53961 94.999614) (xy 133.60539 92.933834) ) ) (filled_polygon (pts (xy 128.82375 92.773) (xy 129.873 92.773) (xy 129.873 92.753) (xy 130.127 92.753) (xy 130.127 92.773) (xy 130.147 92.773) (xy 130.147 93.027) (xy 130.127 93.027) (xy 130.127 93.047) (xy 129.873 93.047) (xy 129.873 93.027) (xy 128.82375 93.027) (xy 128.665 93.18575) (xy 128.665 93.61801) (xy 128.460487 93.61801) (xy 128.484385 93.5) (xy 128.484385 92.804839) (xy 128.669987 92.619237) ) ) (filled_polygon (pts (xy 136.253 92.70775) (xy 136.217 92.74375) (xy 136.217 93.345) (xy 136.237 93.345) (xy 136.237 93.595) (xy 136.217 93.595) (xy 136.217 93.617) (xy 135.963 93.617) (xy 135.963 93.595) (xy 135.943 93.595) (xy 135.943 93.495635) (xy 135.98 93.406309) (xy 135.98 93.16575) (xy 135.963 93.14875) (xy 135.963 92.74375) (xy 135.89675 92.6775) (xy 135.98 92.59425) (xy 135.98 92.353691) (xy 135.883327 92.120302) (xy 135.704699 91.941673) (xy 135.47131 91.845) (xy 135.25575 91.845) (xy 135.097002 92.003748) (xy 135.097002 91.845) (xy 135.005961 91.845) (xy 135.006105 91.679988) (xy 134.978013 91.612) (xy 135.45 91.612) (xy 135.622973 91.577594) (xy 135.769612 91.479612) (xy 135.857224 91.392) (xy 136.253 91.392) ) ) (filled_polygon (pts (xy 135.097 92.753) (xy 135.358975 92.753) (xy 135.251673 92.860301) (xy 135.190908 93.007) (xy 135.097 93.007) (xy 135.097 93.027) (xy 134.843 93.027) (xy 134.843 93.007) (xy 134.823 93.007) (xy 134.823 92.753) (xy 134.843 92.753) (xy 134.843 92.733) (xy 135.097 92.733) ) ) (filled_polygon (pts (xy 127.527 91.073) (xy 127.547 91.073) (xy 127.547 91.327) (xy 127.527 91.327) (xy 127.527 91.347) (xy 127.273 91.347) (xy 127.273 91.327) (xy 127.253 91.327) (xy 127.253 91.073) (xy 127.273 91.073) (xy 127.273 91.053) (xy 127.527 91.053) ) ) (filled_polygon (pts (xy 132.427 90.85) (xy 132.447 90.85) (xy 132.447 91.05) (xy 132.427 91.05) (xy 132.427 91.097) (xy 132.173 91.097) (xy 132.173 91.05) (xy 132.153 91.05) (xy 132.153 90.85) (xy 132.173 90.85) (xy 132.173 90.803) (xy 132.427 90.803) ) ) (filled_polygon (pts (xy 136.427 90.35) (xy 136.447 90.35) (xy 136.447 90.488) (xy 136.153 90.488) (xy 136.153 90.35) (xy 136.173 90.35) (xy 136.173 90.303) (xy 136.427 90.303) ) ) (filled_polygon (pts (xy 135.247 90.275) (xy 135.227 90.275) (xy 135.227 90.297) (xy 134.973 90.297) (xy 134.973 90.275) (xy 134.953 90.275) (xy 134.953 90.027) (xy 135.247 90.027) ) ) (filled_polygon (pts (xy 149.597 86.727) (xy 149.57625 86.727) (xy 149.426252 86.577002) (xy 149.585 86.577002) (xy 149.585 86.473) (xy 149.597 86.473) ) ) (filled_polygon (pts (xy 148.572998 86.435) (xy 148.68575 86.435) (xy 148.723748 86.472998) (xy 148.565 86.472998) (xy 148.565 86.577) (xy 148.553 86.577) (xy 148.553 86.323) (xy 148.572998 86.323) ) ) (filled_polygon (pts (xy 148.81375 85.383) (xy 149.415 85.383) (xy 149.415 85.373) (xy 149.42625 85.373) (xy 149.43625 85.363) (xy 149.623 85.363) (xy 149.623 85.77575) (xy 149.585 85.81375) (xy 149.585 85.78575) (xy 149.577002 85.777752) (xy 149.577002 85.665) (xy 149.46425 85.665) (xy 149.42625 85.627) (xy 149.325026 85.627) (xy 149.309699 85.611673) (xy 149.07631 85.515) (xy 148.98375 85.515) (xy 148.87175 85.627) (xy 148.825 85.627) (xy 148.825 85.637) (xy 148.81375 85.637) (xy 148.80375 85.647) (xy 148.575 85.647) (xy 148.575 85.627) (xy 148.553 85.627) (xy 148.553 85.373) (xy 148.575 85.373) (xy 148.575 85.353) (xy 148.78375 85.353) ) ) (filled_polygon (pts (xy 147.815 85.465615) (xy 146.953 85.465615) (xy 146.953 85.384385) (xy 147.815 85.384385) ) ) ) (zone (net 2) (net_name /3V3) (layer F.Cu) (tstamp 559D5E64) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.25)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.3) (thermal_bridge_width 0.3)) (polygon (pts (xy 139.15 91.7) (xy 138.4 91.7) (xy 137.65 92.45) (xy 137.65 93.74) (xy 136.63 93.74) (xy 136.63 90.84) (xy 139.15 90.84) ) ) (filled_polygon (pts (xy 139.023 91.573) (xy 138.4 91.573) (xy 138.35059 91.583006) (xy 138.310197 91.610197) (xy 138.198747 91.721647) (xy 138.163719 91.686558) (xy 137.94107 91.594106) (xy 137.699988 91.593895) (xy 137.477177 91.685959) (xy 137.306558 91.856281) (xy 137.214106 92.07893) (xy 137.213895 92.320012) (xy 137.305959 92.542823) (xy 137.476281 92.713442) (xy 137.523 92.732841) (xy 137.523 92.793) (xy 137.31975 92.793) (xy 137.213 92.89975) (xy 137.213 93.447) (xy 137.233 93.447) (xy 137.233 93.493) (xy 137.213 93.493) (xy 137.213 93.513) (xy 137.167 93.513) (xy 137.167 93.493) (xy 137.147 93.493) (xy 137.147 93.447) (xy 137.167 93.447) (xy 137.167 92.89975) (xy 137.06025 92.793) (xy 136.876788 92.793) (xy 136.885894 92.77107) (xy 136.886105 92.529988) (xy 136.794041 92.307177) (xy 136.757 92.270071) (xy 136.757 91.392) (xy 136.91 91.392) (xy 137.082973 91.357594) (xy 137.229612 91.259612) (xy 137.522224 90.967) (xy 139.023 90.967) ) ) ) (zone (net 31) (net_name /12V) (layer F.Cu) (tstamp 559EA127) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 143.45 77.925) (xy 143.45 75.225) (xy 143.38 68.17) (xy 130.175 68.1) (xy 130.175 70.55) (xy 125.8 70.55) (xy 125.8 72.475) (xy 129.725 72.475) (xy 129.725 73.6) (xy 134.425 73.6) (xy 134.425 71.15) (xy 137.95 71.15) (xy 139.65 71.2) (xy 139.65 74.95) (xy 141.025 77.975) (xy 141.15 77.975) ) ) (filled_polygon (pts (xy 142.998751 76.335858) (xy 142.984608 76.35) (xy 142.998751 76.364143) (xy 141.764142 77.598751) (xy 141.75 77.584608) (xy 141.735858 77.598751) (xy 140.50125 76.364143) (xy 140.515392 76.35) (xy 140.50125 76.335858) (xy 141.735858 75.101249) (xy 141.75 75.115392) (xy 141.764142 75.101249) ) ) (filled_polygon (pts (xy 138.965 68.77425) (xy 139.12375 68.933) (xy 139.973 68.933) (xy 139.973 68.913) (xy 140.227 68.913) (xy 140.227 68.933) (xy 140.247 68.933) (xy 140.247 69.187) (xy 140.227 69.187) (xy 140.227 70.16125) (xy 140.38575 70.32) (xy 140.726309 70.32) (xy 140.959698 70.223327) (xy 141.138327 70.044699) (xy 141.211058 69.86911) (xy 141.287927 69.988567) (xy 141.430619 70.086064) (xy 141.6 70.120365) (xy 142.223286 70.120365) (xy 142.222562 70.950446) (xy 142.606464 71.879561) (xy 143.29666 72.570962) (xy 143.312106 74.127701) (xy 143.024897 73.840492) (xy 142.861972 74.003417) (xy 142.532119 73.788268) (xy 141.492253 73.683964) (xy 140.967881 73.788268) (xy 140.638028 74.003417) (xy 140.475103 73.840492) (xy 139.995365 74.32023) (xy 139.995365 73.46) (xy 139.965591 73.301763) (xy 139.872073 73.156433) (xy 139.777 73.091473) (xy 139.777 72.277778) (xy 139.863567 72.222073) (xy 139.961064 72.079381) (xy 139.995365 71.91) (xy 139.995365 70.41) (xy 139.965591 70.251763) (xy 139.933053 70.201197) (xy 139.973 70.16125) (xy 139.973 69.187) (xy 139.12375 69.187) (xy 138.965 69.34575) (xy 138.965 69.81131) (xy 139.032652 69.974635) (xy 135.977751 69.974635) (xy 135.946454 69.898891) (xy 135.762079 69.714194) (xy 135.521059 69.614114) (xy 135.260086 69.613886) (xy 135.018891 69.713546) (xy 134.834194 69.897921) (xy 134.739352 70.126327) (xy 134.684698 70.071673) (xy 134.451309 69.975) (xy 134.42125 69.975) (xy 134.2625 70.13375) (xy 134.2625 70.149475) (xy 134.184698 70.071673) (xy 133.998154 69.994404) (xy 133.97875 69.975) (xy 133.92125 69.975) (xy 133.901846 69.994404) (xy 133.715302 70.071673) (xy 133.7 70.086975) (xy 133.684698 70.071673) (xy 133.498154 69.994404) (xy 133.47875 69.975) (xy 133.42125 69.975) (xy 133.401846 69.994404) (xy 133.215302 70.071673) (xy 133.1375 70.149475) (xy 133.1375 70.13375) (xy 132.97875 69.975) (xy 132.95 69.975) (xy 132.95 69.963691) (xy 132.853327 69.730302) (xy 132.674699 69.551673) (xy 132.44131 69.455) (xy 131.97575 69.455) (xy 131.817 69.61375) (xy 131.817 70.463) (xy 131.837 70.463) (xy 131.837 70.717) (xy 131.817 70.717) (xy 131.817 70.737) (xy 131.563 70.737) (xy 131.563 70.717) (xy 131.543 70.717) (xy 131.543 70.463) (xy 131.563 70.463) (xy 131.563 69.61375) (xy 131.40425 69.455) (xy 130.93869 69.455) (xy 130.705301 69.551673) (xy 130.526673 69.730302) (xy 130.498965 69.797195) (xy 130.498965 68.627) (xy 138.965 68.627) ) ) (filled_polygon (pts (xy 130.43 70.717002) (xy 130.588748 70.717002) (xy 130.43 70.87575) (xy 130.43 71.216309) (xy 130.526673 71.449698) (xy 130.705301 71.628327) (xy 130.88089 71.701058) (xy 130.761433 71.777927) (xy 130.663936 71.920619) (xy 130.638051 72.048442) (xy 130.528891 72.093546) (xy 130.344194 72.277921) (xy 130.244114 72.518941) (xy 130.243886 72.779914) (xy 130.343546 73.021109) (xy 130.466149 73.143926) (xy 130.420086 73.143886) (xy 130.178891 73.243546) (xy 130.175365 73.247066) (xy 130.175365 72.55) (xy 130.145591 72.391763) (xy 130.052073 72.246433) (xy 129.909381 72.148936) (xy 129.74 72.114635) (xy 126.14 72.114635) (xy 126.085365 72.124915) (xy 126.085365 71.780637) (xy 126.489002 71.377) (xy 127.399995 71.377) (xy 127.4 71.377001) (xy 127.620808 71.333078) (xy 127.808001 71.208001) (xy 128.156277 70.859724) (xy 128.167019 70.867064) (xy 128.3364 70.901365) (xy 130.0636 70.901365) (xy 130.221837 70.871591) (xy 130.367167 70.778073) (xy 130.43 70.686114) ) ) (filled_polygon (pts (xy 133.825 70.924635) (xy 133.2 70.924635) (xy 133.075 70.948155) (xy 133.075 70.735) (xy 133.825 70.735) ) ) ) (zone (net 1) (net_name GND) (layer In2.Cu) (tstamp 55A41C7F) (hatch edge 0.508) (priority 3) (connect_pads (clearance 0.26)) (min_thickness 0.18) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 143.375 98.025) (xy 146.6 98.05) (xy 148.8 95.875) (xy 148.8 93.9) (xy 149.8 92.9) (xy 149.775 82.45) (xy 147.725 82.45) (xy 147 83.4) (xy 147 90) (xy 143.425 93.575) (xy 143.375 94.4) ) ) (filled_polygon (pts (xy 147.425 92.37396) (xy 146.94948 92.84948) (xy 146.857351 92.987359) (xy 146.857351 92.98736) (xy 146.825 93.15) (xy 146.825 94.373959) (xy 146.57396 94.625) (xy 145.3 94.625) (xy 145.13736 94.657351) (xy 145.137358 94.657352) (xy 145.137359 94.657352) (xy 144.999479 94.74948) (xy 144.369478 95.379482) (xy 144.277349 95.517361) (xy 144.277349 95.517362) (xy 144.244998 95.680002) (xy 144.244998 96.553961) (xy 144.244943 96.554016) (xy 144.165675 96.521101) (xy 143.935335 96.5209) (xy 143.722451 96.608862) (xy 143.559434 96.771595) (xy 143.471101 96.984325) (xy 143.4709 97.214665) (xy 143.558862 97.427549) (xy 143.721595 97.590566) (xy 143.934325 97.678899) (xy 144.164665 97.6791) (xy 144.377549 97.591138) (xy 144.503678 97.465228) (xy 144.60052 97.40052) (xy 144.8 97.20104) (xy 144.99948 97.400521) (xy 145.137359 97.492649) (xy 145.245277 97.514115) (xy 145.321595 97.590566) (xy 145.534325 97.678899) (xy 145.764665 97.6791) (xy 145.977549 97.591138) (xy 146.140566 97.428405) (xy 146.146141 97.41498) (xy 146.221595 97.490566) (xy 146.434325 97.578899) (xy 146.664665 97.5791) (xy 146.877549 97.491138) (xy 147.040566 97.328405) (xy 147.128899 97.115675) (xy 147.1291 96.885335) (xy 147.041138 96.672451) (xy 146.878405 96.509434) (xy 146.665675 96.421101) (xy 146.435335 96.4209) (xy 146.222451 96.508862) (xy 146.059434 96.671595) (xy 146.053859 96.68502) (xy 145.978405 96.609434) (xy 145.765675 96.521101) (xy 145.535335 96.5209) (xy 145.384333 96.583293) (xy 145.375 96.57396) (xy 145.375 95.97604) (xy 145.57604 95.775) (xy 146.9 95.775) (xy 147.035657 95.748016) (xy 147.062641 95.742649) (xy 147.20052 95.65052) (xy 147.850521 95.00052) (xy 147.942649 94.862641) (xy 147.975 94.7) (xy 147.975 94.143855) (xy 148.041595 94.210566) (xy 148.254325 94.298899) (xy 148.484665 94.2991) (xy 148.697549 94.211138) (xy 148.71 94.198709) (xy 148.71 95.820292) (xy 148.592451 95.868862) (xy 148.429434 96.031595) (xy 148.370826 96.172739) (xy 146.563312 97.959713) (xy 143.593799 97.936693) (xy 143.465 97.807894) (xy 143.465 96.122851) (xy 143.517549 96.101138) (xy 143.680566 95.938405) (xy 143.768899 95.725675) (xy 143.7691 95.495335) (xy 143.681138 95.282451) (xy 143.518405 95.119434) (xy 143.465 95.097258) (xy 143.465 94.529057) (xy 143.514665 94.5291) (xy 143.727549 94.441138) (xy 143.890566 94.278405) (xy 143.978899 94.065675) (xy 143.979008 93.939665) (xy 145.4959 93.939665) (xy 145.583862 94.152549) (xy 145.746595 94.315566) (xy 145.959325 94.403899) (xy 146.189665 94.4041) (xy 146.402549 94.316138) (xy 146.565566 94.153405) (xy 146.653899 93.940675) (xy 146.6541 93.710335) (xy 146.566138 93.497451) (xy 146.403405 93.334434) (xy 146.190675 93.246101) (xy 145.960335 93.2459) (xy 145.747451 93.333862) (xy 145.584434 93.496595) (xy 145.496101 93.709325) (xy 145.4959 93.939665) (xy 143.979008 93.939665) (xy 143.9791 93.835335) (xy 143.891138 93.622451) (xy 143.728405 93.459434) (xy 143.685614 93.441666) (xy 144.265406 92.861874) (xy 144.333862 93.027549) (xy 144.496595 93.190566) (xy 144.709325 93.278899) (xy 144.939665 93.2791) (xy 145.152549 93.191138) (xy 145.315566 93.028405) (xy 145.403899 92.815675) (xy 145.403981 92.722059) (xy 146.51604 91.610001) (xy 146.521595 91.615566) (xy 146.734325 91.703899) (xy 146.964665 91.7041) (xy 147.177549 91.616138) (xy 147.340566 91.453405) (xy 147.425 91.250065) ) ) (filled_polygon (pts (xy 149.65 91.660268) (xy 149.555675 91.621101) (xy 149.325335 91.6209) (xy 149.112451 91.708862) (xy 148.949434 91.871595) (xy 148.861101 92.084325) (xy 148.8609 92.314665) (xy 148.948862 92.527549) (xy 149.111595 92.690566) (xy 149.324325 92.778899) (xy 149.554665 92.7791) (xy 149.65 92.739708) (xy 149.65 92.92272) (xy 149.475734 93.096986) (xy 149.348405 92.969434) (xy 149.135675 92.881101) (xy 148.905335 92.8809) (xy 148.692451 92.968862) (xy 148.529434 93.131595) (xy 148.519632 93.155201) (xy 148.485675 93.141101) (xy 148.310092 93.140948) (xy 148.45052 93.00052) (xy 148.542649 92.862641) (xy 148.552192 92.814665) (xy 148.575 92.7) (xy 148.575 84.92604) (xy 149.300521 84.20052) (xy 149.392649 84.062641) (xy 149.425 83.9) (xy 149.425 83.793857) (xy 149.490566 83.728405) (xy 149.578899 83.515675) (xy 149.5791 83.285335) (xy 149.491138 83.072451) (xy 149.328405 82.909434) (xy 149.115675 82.821101) (xy 148.885335 82.8209) (xy 148.672451 82.908862) (xy 148.509434 83.071595) (xy 148.488887 83.121078) (xy 148.285335 83.1209) (xy 148.072451 83.208862) (xy 147.909434 83.371595) (xy 147.821101 83.584325) (xy 147.821019 83.67794) (xy 147.69948 83.79948) (xy 147.607351 83.937359) (xy 147.607351 83.93736) (xy 147.593881 84.005079) (xy 147.54948 84.04948) (xy 147.457351 84.187359) (xy 147.454837 84.2) (xy 147.425 84.35) (xy 147.425 91.000412) (xy 147.341138 90.797451) (xy 147.178405 90.634434) (xy 146.965675 90.546101) (xy 146.735335 90.5459) (xy 146.522451 90.633862) (xy 146.456198 90.7) (xy 146.42728 90.7) (xy 147.06364 90.06364) (xy 147.083385 90.033866) (xy 147.09 90) (xy 147.09 83.43042) (xy 147.769531 82.54) (xy 149.65 82.54) ) ) ) (zone (net 31) (net_name /12V) (layer B.Cu) (tstamp 559EA042) (hatch edge 0.508) (priority 2) (connect_pads (clearance 0.3)) (min_thickness 0.254) (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508)) (polygon (pts (xy 125.26 75.54) (xy 126.96 75.54) (xy 126.96 72.53) (xy 129.68 72.53) (xy 132.37 69.84) (xy 135.26 69.84) (xy 136.1 70.68) (xy 136.1 74.33) (xy 137.72 74.33) (xy 137.72 75.96) (xy 138.71 75.96) (xy 141.26 78.51) (xy 142.09 78.51) (xy 143.79 76.81) (xy 143.79 75.08) (xy 139.91 71.2) (xy 139.91 67.95) (xy 130.27 67.95) (xy 128.24 69.98) (xy 128.24 70.57) (xy 123.22 70.57) (xy 123.22 71.91) (xy 122.11 71.91) (xy 122.11 73.56) (xy 124.12 75.57) (xy 124.12 75.67) ) ) (filled_polygon (pts (xy 139.783 71.2) (xy 139.793006 71.24941) (xy 139.820197 71.289803) (xy 142.294864 73.76447) (xy 141.492253 73.683964) (xy 140.967881 73.788268) (xy 140.638027 74.003418) (xy 141.75 75.115392) (xy 141.764143 75.10125) (xy 142.998751 76.335858) (xy 142.984608 76.35) (xy 142.998751 76.364143) (xy 141.764143 77.598751) (xy 141.75 77.584608) (xy 141.735858 77.598751) (xy 140.50125 76.364143) (xy 140.515392 76.35) (xy 139.403418 75.238027) (xy 139.358996 75.306132) (xy 139.347079 75.294194) (xy 139.106059 75.194114) (xy 138.845086 75.193886) (xy 138.603891 75.293546) (xy 138.419194 75.477921) (xy 138.319114 75.718941) (xy 138.319014 75.833) (xy 137.847 75.833) (xy 137.847 74.33) (xy 137.836994 74.28059) (xy 137.808553 74.238965) (xy 137.766159 74.211685) (xy 137.72 74.203) (xy 136.627 74.203) (xy 136.627 73.531038) (xy 136.705886 73.341059) (xy 136.706114 73.080086) (xy 136.606454 72.838891) (xy 136.422079 72.654194) (xy 136.227 72.57319) (xy 136.227 70.68) (xy 136.216994 70.63059) (xy 136.189803 70.590197) (xy 136.032618 70.433012) (xy 136.045886 70.401059) (xy 136.046114 70.140086) (xy 135.946454 69.898891) (xy 135.762079 69.714194) (xy 135.521059 69.614114) (xy 135.260086 69.613886) (xy 135.020212 69.713) (xy 132.37 69.713) (xy 132.32059 69.723006) (xy 132.280197 69.750197) (xy 129.627394 72.403) (xy 126.96 72.403) (xy 126.91059 72.413006) (xy 126.868965 72.441447) (xy 126.841685 72.483841) (xy 126.833 72.53) (xy 126.833 72.766031) (xy 126.715 72.742135) (xy 126.025 72.742135) (xy 125.866763 72.771909) (xy 125.833987 72.793) (xy 125.66 72.793) (xy 125.439191 72.836922) (xy 125.364213 72.887021) (xy 125.251999 72.961999) (xy 125.251997 72.962002) (xy 125.141999 73.071999) (xy 125.016922 73.259192) (xy 124.999926 73.344635) (xy 124.98 73.344635) (xy 124.821763 73.374409) (xy 124.676433 73.467927) (xy 124.578936 73.610619) (xy 124.570549 73.652035) (xy 124.431059 73.594114) (xy 124.170086 73.593886) (xy 123.928891 73.693546) (xy 123.744194 73.877921) (xy 123.644114 74.118941) (xy 123.643886 74.379914) (xy 123.743546 74.621109) (xy 123.927921 74.805806) (xy 124.168941 74.905886) (xy 124.429914 74.906114) (xy 124.54934 74.856768) (xy 124.544635 74.88) (xy 124.544635 75.063995) (xy 124.420086 75.063886) (xy 124.264709 75.128087) (xy 124.231059 75.114114) (xy 123.970086 75.113886) (xy 123.880506 75.1509) (xy 122.237 73.507394) (xy 122.237 72.385365) (xy 122.45 72.385365) (xy 122.608237 72.355591) (xy 122.700424 72.29627) (xy 122.780619 72.351064) (xy 122.95 72.385365) (xy 123.35 72.385365) (xy 123.508237 72.355591) (xy 123.653567 72.262073) (xy 123.744425 72.129097) (xy 123.808941 72.155886) (xy 124.069914 72.156114) (xy 124.311109 72.056454) (xy 124.495806 71.872079) (xy 124.553695 71.732667) (xy 124.580619 71.751064) (xy 124.75 71.785365) (xy 124.85159 71.785365) (xy 124.903546 71.911109) (xy 125.087921 72.095806) (xy 125.328941 72.195886) (xy 125.589914 72.196114) (xy 125.831109 72.096454) (xy 126.015806 71.912079) (xy 126.115886 71.671059) (xy 126.116114 71.410086) (xy 126.016454 71.168891) (xy 125.832079 70.984194) (xy 125.591059 70.884114) (xy 125.585365 70.884109) (xy 125.585365 70.812542) (xy 125.721109 70.756454) (xy 125.780667 70.697) (xy 125.977493 70.697) (xy 126.166109 70.823029) (xy 126.66 70.92127) (xy 127.153891 70.823029) (xy 127.342507 70.697) (xy 127.977631 70.697) (xy 128.024327 70.769567) (xy 128.167019 70.867064) (xy 128.3364 70.901365) (xy 130.0636 70.901365) (xy 130.221837 70.871591) (xy 130.367167 70.778073) (xy 130.464664 70.635381) (xy 130.498965 70.466) (xy 130.498965 68.627) (xy 139.783 68.627) ) ) ) ) ================================================ FILE: hardware/fmcw2_mcu/fmcw2_mcu.pro ================================================ update=ma 9. marraskuuta 2015 20.04.12 version=1 last_client=kicad [cvpcb] version=1 NetIExt=net [pcbnew] version=1 PageLayoutDescrFile= LastNetListRead=fmcw2_mcu.net UseCmpFile=0 PadDrill=0 PadDrillOvalY=0 PadSizeH=0.33 PadSizeV=0.33 PcbTextSizeV=1.5 PcbTextSizeH=1.5 PcbTextThickness=0.3 ModuleTextSizeV=1 ModuleTextSizeH=1 ModuleTextSizeThickness=0.15 SolderMaskClearance=0 SolderMaskMinWidth=0 DrawSegmentWidth=0.2 BoardOutlineThickness=0.09999999999999999 ModuleOutlineThickness=0.15 [general] version=1 [eeschema] version=1 LibDir=../fmcw2/libs [eeschema/libraries] LibName1=fmcw2_mcu-rescue LibName2=power LibName3=device LibName4=transistors LibName5=conn LibName6=linear LibName7=regul LibName8=74xx LibName9=cmos4000 LibName10=adc-dac LibName11=memory LibName12=xilinx LibName13=microcontrollers LibName14=dsp LibName15=microchip LibName16=analog_switches LibName17=motorola LibName18=texas LibName19=intel LibName20=audio LibName21=interface LibName22=digital-audio LibName23=philips LibName24=display LibName25=cypress LibName26=siliconi LibName27=opto LibName28=atmel LibName29=contrib LibName30=valves LibName31=../fmcw2/libs/fmcw2 ================================================ FILE: hardware/fmcw2_mcu/fmcw2_mcu.sch ================================================ EESchema Schematic File Version 2 LIBS:fmcw2_mcu-rescue LIBS:power LIBS:device LIBS:transistors LIBS:conn LIBS:linear LIBS:regul LIBS:74xx LIBS:cmos4000 LIBS:adc-dac LIBS:memory LIBS:xilinx LIBS:microcontrollers LIBS:dsp LIBS:microchip LIBS:analog_switches LIBS:motorola LIBS:texas LIBS:intel LIBS:audio LIBS:interface LIBS:digital-audio LIBS:philips LIBS:display LIBS:cypress LIBS:siliconi LIBS:opto LIBS:atmel LIBS:contrib LIBS:valves LIBS:fmcw2 LIBS:fmcw2_mcu-cache EELAYER 25 0 EELAYER END $Descr A3 16535 11693 encoding utf-8 Sheet 1 1 Title "" Date "" Rev "" Comp "" Comment1 "" Comment2 "" Comment3 "" Comment4 "" $EndDescr $Comp L GND-RESCUE-fmcw2_mcu #PWR31 U 1 1 5504BE0C P 5850 9900 F 0 "#PWR31" H 5850 9900 30 0001 C CNN F 1 "GND" H 5850 9830 30 0001 C CNN F 2 "" H 5850 9900 60 0000 C CNN F 3 "" H 5850 9900 60 0000 C CNN 1 5850 9900 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C42 U 1 1 5504C027 P 1400 10550 F 0 "C42" H 1400 10650 40 0000 L CNN F 1 "18p" H 1406 10465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 1438 10400 30 0001 C CNN F 3 "" H 1400 10550 60 0000 C CNN 1 1400 10550 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C43 U 1 1 5504C044 P 2100 10550 F 0 "C43" H 2100 10650 40 0000 L CNN F 1 "18p" H 2106 10465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2138 10400 30 0001 C CNN F 3 "" H 2100 10550 60 0000 C CNN 1 2100 10550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR13 U 1 1 5504C175 P 2100 10800 F 0 "#PWR13" H 2100 10800 30 0001 C CNN F 1 "GND" H 2100 10730 30 0001 C CNN F 2 "" H 2100 10800 60 0000 C CNN F 3 "" H 2100 10800 60 0000 C CNN 1 2100 10800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR4 U 1 1 5504C191 P 1400 10800 F 0 "#PWR4" H 1400 10800 30 0001 C CNN F 1 "GND" H 1400 10730 30 0001 C CNN F 2 "" H 1400 10800 60 0000 C CNN F 3 "" H 1400 10800 60 0000 C CNN 1 1400 10800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR32 U 1 1 5504C97D P 5900 2100 F 0 "#PWR32" H 5900 2100 30 0001 C CNN F 1 "GND" H 5900 2030 30 0001 C CNN F 2 "" H 5900 2100 60 0000 C CNN F 3 "" H 5900 2100 60 0000 C CNN 1 5900 2100 1 0 0 -1 $EndComp Text Label 5650 1550 0 60 ~ 0 3V3 Text Label 3950 8550 2 60 ~ 0 3V3 Text Label 1400 10350 2 60 ~ 0 XTAL1 Text Label 2100 10350 0 60 ~ 0 XTAL2 Text Label 3950 8050 2 60 ~ 0 XTAL1 Text Label 3950 8150 2 60 ~ 0 XTAL2 $Comp L USB-MICRO U16 U 1 1 5504F1F2 P 1500 7050 F 0 "U16" H 1450 7100 60 0000 C CNN F 1 "USB-MICRO" H 1350 7350 60 0000 C CNN F 2 "fmcw2:USB_MICRO" H 1550 6800 60 0001 C CNN F 3 "" H 1550 6800 60 0000 C CNN 1 1500 7050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR15 U 1 1 5504F398 P 2300 7200 F 0 "#PWR15" H 2300 7200 30 0001 C CNN F 1 "GND" H 2300 7130 30 0001 C CNN F 2 "" H 2300 7200 60 0000 C CNN F 3 "" H 2300 7200 60 0000 C CNN 1 2300 7200 0 -1 -1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R20 U 1 1 5504F6CA P 2500 7000 F 0 "R20" V 2580 7000 40 0000 C CNN F 1 "0" V 2507 7001 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2430 7000 30 0001 C CNN F 3 "" H 2500 7000 30 0000 C CNN 1 2500 7000 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R19 U 1 1 5504F70F P 2500 6900 F 0 "R19" V 2580 6900 40 0000 C CNN F 1 "0" V 2507 6901 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2430 6900 30 0001 C CNN F 3 "" H 2500 6900 30 0000 C CNN 1 2500 6900 0 1 1 0 $EndComp Text Label 2850 7000 0 60 ~ 0 USB+ Text Label 2850 6900 0 60 ~ 0 USB- Text Label 3950 6800 2 60 ~ 0 USB- Text Label 3950 6900 2 60 ~ 0 USB+ Text Label 3950 7200 2 60 ~ 0 USBV_3V Text Label 2250 6800 0 60 ~ 0 USBV $Comp L C-RESCUE-fmcw2_mcu C44 U 1 1 55050326 P 2150 6250 F 0 "C44" H 2150 6350 40 0000 L CNN F 1 "2.2u" H 2156 6165 40 0000 L CNN F 2 "fmcw2:C_0603b" H 2188 6100 30 0001 C CNN F 3 "" H 2150 6250 60 0000 C CNN 1 2150 6250 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR14 U 1 1 550503C3 P 2150 6500 F 0 "#PWR14" H 2150 6500 30 0001 C CNN F 1 "GND" H 2150 6430 30 0001 C CNN F 2 "" H 2150 6500 60 0000 C CNN F 3 "" H 2150 6500 60 0000 C CNN 1 2150 6500 1 0 0 -1 $EndComp Text Label 2150 6000 0 60 ~ 0 USBV $Comp L R-RESCUE-fmcw2_mcu R18 U 1 1 55050A8E P 1950 7700 F 0 "R18" V 2030 7700 40 0000 C CNN F 1 "DNP" V 1957 7701 40 0000 C CNN F 2 "fmcw2:R_0402b" V 1880 7700 30 0001 C CNN F 3 "" H 1950 7700 30 0000 C CNN 1 1950 7700 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C45 U 1 1 55050AD9 P 2200 7700 F 0 "C45" H 2200 7800 40 0000 L CNN F 1 "DNP" H 2206 7615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2238 7550 30 0001 C CNN F 3 "" H 2200 7700 60 0000 C CNN 1 2200 7700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR11 U 1 1 55050D3B P 1950 8050 F 0 "#PWR11" H 1950 8050 30 0001 C CNN F 1 "GND" H 1950 7980 30 0001 C CNN F 2 "" H 1950 8050 60 0000 C CNN F 3 "" H 1950 8050 60 0000 C CNN 1 1950 8050 1 0 0 -1 $EndComp Text Label 2250 7100 0 60 ~ 0 USBID Text Label 3950 7000 2 60 ~ 0 USBID $Comp L GND-RESCUE-fmcw2_mcu #PWR25 U 1 1 55051B3F P 3950 7500 F 0 "#PWR25" H 3950 7500 30 0001 C CNN F 1 "GND" H 3950 7430 30 0001 C CNN F 2 "" H 3950 7500 60 0000 C CNN F 3 "" H 3950 7500 60 0000 C CNN 1 3950 7500 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR26 U 1 1 55051C27 P 3950 7600 F 0 "#PWR26" H 3950 7600 30 0001 C CNN F 1 "GND" H 3950 7530 30 0001 C CNN F 2 "" H 3950 7600 60 0000 C CNN F 3 "" H 3950 7600 60 0000 C CNN 1 3950 7600 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C46 U 1 1 55051EC2 P 3450 7650 F 0 "C46" H 3450 7750 40 0000 L CNN F 1 "100n" H 3456 7565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3488 7500 30 0001 C CNN F 3 "" H 3450 7650 60 0000 C CNN 1 3450 7650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR23 U 1 1 55051FAB P 3450 7900 F 0 "#PWR23" H 3450 7900 30 0001 C CNN F 1 "GND" H 3450 7830 30 0001 C CNN F 2 "" H 3450 7900 60 0000 C CNN F 3 "" H 3450 7900 60 0000 C CNN 1 3450 7900 1 0 0 -1 $EndComp Text Label 3500 7400 2 60 ~ 0 3V3 $Comp L R-RESCUE-fmcw2_mcu R21 U 1 1 55052452 P 3550 7100 F 0 "R21" V 3630 7100 40 0000 C CNN F 1 "12k, 1%" V 3557 7101 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3480 7100 30 0001 C CNN F 3 "" H 3550 7100 30 0000 C CNN 1 3550 7100 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR20 U 1 1 55052540 P 3250 7100 F 0 "#PWR20" H 3250 7100 30 0001 C CNN F 1 "GND" H 3250 7030 30 0001 C CNN F 2 "" H 3250 7100 60 0000 C CNN F 3 "" H 3250 7100 60 0000 C CNN 1 3250 7100 0 1 1 0 $EndComp Text Label 3900 7800 2 60 ~ 0 SDA Text Label 3900 7900 2 60 ~ 0 SCL $Comp L R-RESCUE-fmcw2_mcu R22 U 1 1 5505315D P 3300 5550 F 0 "R22" V 3380 5550 40 0000 C CNN F 1 "10k" V 3307 5551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3230 5550 30 0001 C CNN F 3 "" H 3300 5550 30 0000 C CNN 1 3300 5550 1 0 0 -1 $EndComp Text Label 3300 5250 2 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2_mcu C1 U 1 1 55225B59 P 5500 1800 F 0 "C1" H 5500 1900 40 0000 L CNN F 1 "100n" H 5506 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 5538 1650 30 0001 C CNN F 3 "" H 5500 1800 60 0000 C CNN 1 5500 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C2 U 1 1 55225B8F P 5700 1800 F 0 "C2" H 5700 1900 40 0000 L CNN F 1 "100n" H 5706 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 5738 1650 30 0001 C CNN F 3 "" H 5700 1800 60 0000 C CNN 1 5700 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C3 U 1 1 55225BC7 P 5900 1800 F 0 "C3" H 5900 1900 40 0000 L CNN F 1 "100n" H 5906 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 5938 1650 30 0001 C CNN F 3 "" H 5900 1800 60 0000 C CNN 1 5900 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C4 U 1 1 55225C01 P 6100 1800 F 0 "C4" H 6100 1900 40 0000 L CNN F 1 "100n" H 6106 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 6138 1650 30 0001 C CNN F 3 "" H 6100 1800 60 0000 C CNN 1 6100 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C5 U 1 1 55225C73 P 6300 1800 F 0 "C5" H 6300 1900 40 0000 L CNN F 1 "100n" H 6306 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 6338 1650 30 0001 C CNN F 3 "" H 6300 1800 60 0000 C CNN 1 6300 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C6 U 1 1 55225CB1 P 6500 1800 F 0 "C6" H 6500 1900 40 0000 L CNN F 1 "100n" H 6506 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 6538 1650 30 0001 C CNN F 3 "" H 6500 1800 60 0000 C CNN 1 6500 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C7 U 1 1 55225CF1 P 6700 1800 F 0 "C7" H 6700 1900 40 0000 L CNN F 1 "100n" H 6706 1715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 6738 1650 30 0001 C CNN F 3 "" H 6700 1800 60 0000 C CNN 1 6700 1800 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C12 U 1 1 55225E57 P 6950 1800 F 0 "C12" H 6950 1900 40 0000 L CNN F 1 "2.2u" H 6956 1715 40 0000 L CNN F 2 "fmcw2:C_0603b" H 6988 1650 30 0001 C CNN F 3 "" H 6950 1800 60 0000 C CNN 1 6950 1800 1 0 0 -1 $EndComp Text Label 14100 8950 2 60 ~ 0 PA_OFF Text Label 14100 9050 2 60 ~ 0 MIX_ENBL Text Label 14100 8750 2 60 ~ 0 ADF_LE Text Label 14100 8850 2 60 ~ 0 ADF_CE $Comp L GND-RESCUE-fmcw2_mcu #PWR80 U 1 1 553282EF P 15000 8850 F 0 "#PWR80" H 15000 8850 30 0001 C CNN F 1 "GND" H 15000 8780 30 0001 C CNN F 2 "" H 15000 8850 60 0000 C CNN F 3 "" H 15000 8850 60 0000 C CNN 1 15000 8850 0 -1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR79 U 1 1 55328359 P 15000 8350 F 0 "#PWR79" H 15000 8350 30 0001 C CNN F 1 "GND" H 15000 8280 30 0001 C CNN F 2 "" H 15000 8350 60 0000 C CNN F 3 "" H 15000 8350 60 0000 C CNN 1 15000 8350 0 -1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR82 U 1 1 55328537 P 15000 9050 F 0 "#PWR82" H 15000 9050 30 0001 C CNN F 1 "GND" H 15000 8980 30 0001 C CNN F 2 "" H 15000 9050 60 0000 C CNN F 3 "" H 15000 9050 60 0000 C CNN 1 15000 9050 0 -1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR81 U 1 1 553287E6 P 15000 8950 F 0 "#PWR81" H 15000 8950 30 0001 C CNN F 1 "GND" H 15000 8880 30 0001 C CNN F 2 "" H 15000 8950 60 0000 C CNN F 3 "" H 15000 8950 60 0000 C CNN 1 15000 8950 0 -1 1 0 $EndComp Text Label 15000 9450 0 60 ~ 0 IFF- Text Label 15000 9550 0 60 ~ 0 IFF+ $Comp L GND-RESCUE-fmcw2_mcu #PWR85 U 1 1 55328F31 P 15000 9650 F 0 "#PWR85" H 15000 9650 30 0001 C CNN F 1 "GND" H 15000 9580 30 0001 C CNN F 2 "" H 15000 9650 60 0000 C CNN F 3 "" H 15000 9650 60 0000 C CNN 1 15000 9650 0 -1 -1 0 $EndComp Text Label 7650 4600 0 60 ~ 0 SPIFI_CLK Text Label 7650 4700 0 60 ~ 0 SPIFI_IO3 Text Label 7650 4800 0 60 ~ 0 SPIFI_IO2 Text Label 7650 4900 0 60 ~ 0 SPIFI_MISO Text Label 7650 5000 0 60 ~ 0 SPIFI_MOSI Text Label 7650 5100 0 60 ~ 0 SPIFI_CS $Comp L W25Q32FV U3 U 1 1 5532C8CF P 9550 4050 F 0 "U3" H 9850 3800 60 0000 C CNN F 1 "W25Q32FV" H 9700 4300 60 0000 C CNN F 2 "SOIC_Packages:SOIJ-8_5.3x5.3mm_Pitch1.27mm" H 9350 3850 60 0001 C CNN F 3 "" H 9350 3850 60 0000 C CNN 1 9550 4050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR40 U 1 1 5532CBD9 P 9050 4250 F 0 "#PWR40" H 9050 4250 30 0001 C CNN F 1 "GND" H 9050 4180 30 0001 C CNN F 2 "" H 9050 4250 60 0000 C CNN F 3 "" H 9050 4250 60 0000 C CNN 1 9050 4250 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C19 U 1 1 5532D414 P 10450 3550 F 0 "C19" H 10450 3650 40 0000 L CNN F 1 "100n" H 10456 3465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10488 3400 30 0001 C CNN F 3 "" H 10450 3550 60 0000 C CNN 1 10450 3550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR56 U 1 1 5532D4A5 P 10450 3800 F 0 "#PWR56" H 10450 3800 30 0001 C CNN F 1 "GND" H 10450 3730 30 0001 C CNN F 2 "" H 10450 3800 60 0000 C CNN F 3 "" H 10450 3800 60 0000 C CNN 1 10450 3800 1 0 0 -1 $EndComp Text Label 10150 3350 0 60 ~ 0 3V3 Text Label 9000 3900 2 60 ~ 0 SPIFI_CS Text Label 10150 4200 0 60 ~ 0 SPIFI_MOSI Text Label 10150 4100 0 60 ~ 0 SPIFI_CLK Text Label 10150 4000 0 60 ~ 0 SPIFI_IO3 Text Label 9000 4100 2 60 ~ 0 SPIFI_IO2 Text Label 9000 4000 2 60 ~ 0 SPIFI_MISO Entry Wire Line 8150 4600 8250 4500 Entry Wire Line 8150 4700 8250 4600 Entry Wire Line 8150 4800 8250 4700 Entry Wire Line 8150 4900 8250 4800 Entry Wire Line 8150 5000 8250 4900 Entry Wire Line 8150 5100 8250 5000 Entry Wire Line 8250 4200 8350 4100 Entry Wire Line 8250 4100 8350 4000 Entry Wire Line 8250 4000 8350 3900 Entry Wire Line 10650 4200 10750 4300 Entry Wire Line 10650 4100 10750 4200 Entry Wire Line 10650 4000 10750 4100 $Comp L LPC4320_BGA U4 U 1 1 5533B965 P 5850 5700 F 0 "U4" H 5850 5600 50 0000 C CNN F 1 "LPC4320_BGA" H 5850 5800 50 0000 C CNN F 2 "fmcw2:TFBGA-100" H 5850 5700 50 0001 C CNN F 3 "DOCUMENTATION" H 5850 5700 50 0001 C CNN 1 5850 5700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR33 U 1 1 55337A40 P 6450 9900 F 0 "#PWR33" H 6450 9900 30 0001 C CNN F 1 "GND" H 6450 9830 30 0001 C CNN F 2 "" H 6450 9900 60 0000 C CNN F 3 "" H 6450 9900 60 0000 C CNN 1 6450 9900 1 0 0 -1 $EndComp Text Label 7650 3800 0 60 ~ 0 P2_9 Text Label 7650 3700 0 60 ~ 0 P2_8 Text Label 3950 3200 2 60 ~ 0 P1_1 Text Label 3950 3300 2 60 ~ 0 P1_2 Text Notes 3250 10500 0 60 ~ 0 LOW Text Notes 3550 10500 0 60 ~ 0 LOW Text Notes 3850 10500 0 60 ~ 0 LOW Text Notes 4150 10500 0 60 ~ 0 LOW Text Notes 3250 10300 0 60 ~ 0 P2_9 Text Notes 3550 10300 0 60 ~ 0 P2_8 Text Notes 3850 10300 0 60 ~ 0 P1_2 Text Notes 4150 10300 0 60 ~ 0 P1_1 Text Notes 2800 10650 0 60 ~ 0 SPIFI Text Notes 2800 10500 0 60 ~ 0 USART0 Text Notes 3250 10650 0 60 ~ 0 LOW Text Notes 3550 10650 0 60 ~ 0 LOW Text Notes 3850 10650 0 60 ~ 0 LOW Text Notes 4150 10650 0 60 ~ 0 HIGH Text Notes 2800 10800 0 60 ~ 0 USB0 Text Notes 3250 10800 0 60 ~ 0 LOW Text Notes 3550 10800 0 60 ~ 0 HIGH Text Notes 3850 10800 0 60 ~ 0 LOW Text Notes 4150 10800 0 60 ~ 0 HIGH Text Notes 2800 10950 0 60 ~ 0 USB1 Text Notes 3250 10950 0 60 ~ 0 LOW Text Notes 3550 10950 0 60 ~ 0 HIGH Text Notes 3850 10950 0 60 ~ 0 HIGH Text Notes 4150 10950 0 60 ~ 0 LOW Text Notes 2800 11100 0 60 ~ 0 SPI Text Notes 3250 11100 0 60 ~ 0 LOW Text Notes 3550 11100 0 60 ~ 0 HIGH Text Notes 3850 11100 0 60 ~ 0 HIGH Text Notes 4150 11100 0 60 ~ 0 HIGH Text Label 4900 10250 0 60 ~ 0 P2_9 Text Label 5250 10250 0 60 ~ 0 P2_8 $Comp L R-RESCUE-fmcw2_mcu R9 U 1 1 55343DC1 P 4900 10550 F 0 "R9" V 4980 10550 40 0000 C CNN F 1 "10k" V 4907 10551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 4830 10550 30 0001 C CNN F 3 "" H 4900 10550 30 0000 C CNN 1 4900 10550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR29 U 1 1 55343F35 P 4900 10850 F 0 "#PWR29" H 4900 10850 30 0001 C CNN F 1 "GND" H 4900 10780 30 0001 C CNN F 2 "" H 4900 10850 60 0000 C CNN F 3 "" H 4900 10850 60 0000 C CNN 1 4900 10850 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R10 U 1 1 55344451 P 5250 10550 F 0 "R10" V 5330 10550 40 0000 C CNN F 1 "10k" V 5257 10551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 5180 10550 30 0001 C CNN F 3 "" H 5250 10550 30 0000 C CNN 1 5250 10550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR30 U 1 1 553444CD P 5250 10850 F 0 "#PWR30" H 5250 10850 30 0001 C CNN F 1 "GND" H 5250 10780 30 0001 C CNN F 2 "" H 5250 10850 60 0000 C CNN F 3 "" H 5250 10850 60 0000 C CNN 1 5250 10850 1 0 0 -1 $EndComp $Comp L SW_PUSH SW1 U 1 1 55344760 P 5800 10300 F 0 "SW1" H 5950 10410 50 0000 C CNN F 1 "DFU_PUSH" H 5800 10220 50 0000 C CNN F 2 "fmcw2:EVP-AWBA2A" H 5800 10300 60 0001 C CNN F 3 "" H 5800 10300 60 0000 C CNN 1 5800 10300 1 0 0 -1 $EndComp Text Label 6150 10300 0 60 ~ 0 3V3 Text Label 6450 10250 0 60 ~ 0 P1_2 $Comp L R-RESCUE-fmcw2_mcu R11 U 1 1 55344FFD P 6450 10550 F 0 "R11" V 6530 10550 40 0000 C CNN F 1 "10k" V 6457 10551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 6380 10550 30 0001 C CNN F 3 "" H 6450 10550 30 0000 C CNN 1 6450 10550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR34 U 1 1 553451DC P 6450 10850 F 0 "#PWR34" H 6450 10850 30 0001 C CNN F 1 "GND" H 6450 10780 30 0001 C CNN F 2 "" H 6450 10850 60 0000 C CNN F 3 "" H 6450 10850 60 0000 C CNN 1 6450 10850 1 0 0 -1 $EndComp Text Label 6800 10850 0 60 ~ 0 P1_1 $Comp L R-RESCUE-fmcw2_mcu R12 U 1 1 553454A8 P 6800 10550 F 0 "R12" V 6880 10550 40 0000 C CNN F 1 "10k" V 6807 10551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 6730 10550 30 0001 C CNN F 3 "" H 6800 10550 30 0000 C CNN 1 6800 10550 1 0 0 -1 $EndComp Text Label 7200 10250 0 60 ~ 0 3V3 $Comp L CONN_1 P2 U 1 1 55345B4C P 7200 10450 F 0 "P2" H 7280 10450 40 0000 L CNN F 1 "CONN_1" H 7200 10505 30 0001 C CNN F 2 "fmcw2:TP_1.00" H 7200 10450 60 0001 C CNN F 3 "" H 7200 10450 60 0000 C CNN 1 7200 10450 0 1 1 0 $EndComp Text Label 3950 2900 2 60 ~ 0 D2 Text Label 3950 3000 2 60 ~ 0 D3 Text Label 3950 4600 2 60 ~ 0 D4 Text Label 3950 4700 2 60 ~ 0 D5 NoConn ~ 4000 5500 Text Label 7650 3400 0 60 ~ 0 LED1 $Comp L R-RESCUE-fmcw2_mcu R13 U 1 1 5534CA02 P 8100 10300 F 0 "R13" V 8180 10300 40 0000 C CNN F 1 "240" V 8107 10301 40 0000 C CNN F 2 "fmcw2:R_0402b" V 8030 10300 30 0001 C CNN F 3 "" H 8100 10300 30 0000 C CNN 1 8100 10300 1 0 0 -1 $EndComp $Comp L LED-RESCUE-fmcw2_mcu D2 U 1 1 5534CA56 P 8100 10800 F 0 "D2" H 8100 10900 50 0000 C CNN F 1 "LED" H 8100 10700 50 0000 C CNN F 2 "fmcw2:LED_0603" H 8100 10800 60 0001 C CNN F 3 "" H 8100 10800 60 0000 C CNN 1 8100 10800 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR36 U 1 1 5534CB5D P 8100 11050 F 0 "#PWR36" H 8100 11050 30 0001 C CNN F 1 "GND" H 8100 10980 30 0001 C CNN F 2 "" H 8100 11050 60 0000 C CNN F 3 "" H 8100 11050 60 0000 C CNN 1 8100 11050 1 0 0 -1 $EndComp Text Label 8100 10000 0 60 ~ 0 LED1 $Comp L R-RESCUE-fmcw2_mcu R1 U 1 1 5534D322 P 1250 8800 F 0 "R1" V 1330 8800 40 0000 C CNN F 1 "240" V 1257 8801 40 0000 C CNN F 2 "fmcw2:R_0402b" V 1180 8800 30 0001 C CNN F 3 "" H 1250 8800 30 0000 C CNN 1 1250 8800 1 0 0 -1 $EndComp $Comp L LED-RESCUE-fmcw2_mcu D1 U 1 1 5534D328 P 1250 9300 F 0 "D1" H 1250 9400 50 0000 C CNN F 1 "LED" H 1250 9200 50 0000 C CNN F 2 "fmcw2:LED_0603" H 1250 9300 60 0001 C CNN F 3 "" H 1250 9300 60 0000 C CNN 1 1250 9300 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR2 U 1 1 5534D32E P 1250 9550 F 0 "#PWR2" H 1250 9550 30 0001 C CNN F 1 "GND" H 1250 9480 30 0001 C CNN F 2 "" H 1250 9550 60 0000 C CNN F 3 "" H 1250 9550 60 0000 C CNN 1 1250 9550 1 0 0 -1 $EndComp Text Label 1250 8500 0 60 ~ 0 3V3 $Comp L R-RESCUE-fmcw2_mcu R6 U 1 1 5534E6BF P 3300 8350 F 0 "R6" V 3380 8350 40 0000 C CNN F 1 "10k" V 3307 8351 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3230 8350 30 0001 C CNN F 3 "" H 3300 8350 30 0000 C CNN 1 3300 8350 1 0 0 -1 $EndComp Text Label 3300 8050 0 60 ~ 0 3V3 NoConn ~ 4000 8750 $Comp L R-RESCUE-fmcw2_mcu R3 U 1 1 5534F1E2 P 2100 8750 F 0 "R3" V 2180 8750 40 0000 C CNN F 1 "4.7k" V 2107 8751 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2030 8750 30 0001 C CNN F 3 "" H 2100 8750 30 0000 C CNN 1 2100 8750 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R5 U 1 1 5534F375 P 2350 8750 F 0 "R5" V 2430 8750 40 0000 C CNN F 1 "4.7k" V 2357 8751 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2280 8750 30 0001 C CNN F 3 "" H 2350 8750 30 0000 C CNN 1 2350 8750 1 0 0 -1 $EndComp Text Label 2050 9050 2 60 ~ 0 SDA Text Label 2400 9050 0 60 ~ 0 SCL Text Label 2100 8450 0 60 ~ 0 3V3 Text Label 2350 8450 0 60 ~ 0 3V3 $Comp L GND-RESCUE-fmcw2_mcu #PWR84 U 1 1 55350E7E P 15000 9350 F 0 "#PWR84" H 15000 9350 30 0001 C CNN F 1 "GND" H 15000 9280 30 0001 C CNN F 2 "" H 15000 9350 60 0000 C CNN F 3 "" H 15000 9350 60 0000 C CNN 1 15000 9350 0 -1 -1 0 $EndComp Text Label 15000 8450 0 60 ~ 0 5V Text Label 15000 8550 0 60 ~ 0 5V Text Label 15000 9150 0 60 ~ 0 10V Text Label 7650 2900 0 60 ~ 0 D6 Text Label 7650 3000 0 60 ~ 0 D7 Text Label 7650 3100 0 60 ~ 0 D8 Text Label 3950 3100 2 60 ~ 0 D9 Text Label 3950 3800 2 60 ~ 0 ADF_TXDATA Text Label 3950 3400 2 60 ~ 0 SSP1_MISO Text Label 3300 5050 2 60 ~ 0 SSP1_CLK Text Label 6800 10250 0 60 ~ 0 3V3 Text Label 3300 4300 2 60 ~ 0 ADC_CLK $Comp L MAX1426 U1 U 1 1 5575E525 P 10850 8400 F 0 "U1" H 11200 7650 60 0000 C CNN F 1 "MAX1426" H 11050 9150 60 0000 C CNN F 2 "SSOP_Packages:SSOP-28_5.3x10.2mm_Pitch0.65mm" H 10650 8550 60 0001 C CNN F 3 "" H 10650 8550 60 0000 C CNN 1 10850 8400 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR52 U 1 1 5575E9FC P 10150 7750 F 0 "#PWR52" H 10150 7750 30 0001 C CNN F 1 "GND" H 10150 7680 30 0001 C CNN F 2 "" H 10150 7750 60 0000 C CNN F 3 "" H 10150 7750 60 0000 C CNN 1 10150 7750 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR53 U 1 1 5575EBEA P 10150 8350 F 0 "#PWR53" H 10150 8350 30 0001 C CNN F 1 "GND" H 10150 8280 30 0001 C CNN F 2 "" H 10150 8350 60 0000 C CNN F 3 "" H 10150 8350 60 0000 C CNN 1 10150 8350 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR59 U 1 1 5575EE78 P 11550 8250 F 0 "#PWR59" H 11550 8250 30 0001 C CNN F 1 "GND" H 11550 8180 30 0001 C CNN F 2 "" H 11550 8250 60 0000 C CNN F 3 "" H 11550 8250 60 0000 C CNN 1 11550 8250 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR60 U 1 1 5575F0FD P 11550 8450 F 0 "#PWR60" H 11550 8450 30 0001 C CNN F 1 "GND" H 11550 8380 30 0001 C CNN F 2 "" H 11550 8450 60 0000 C CNN F 3 "" H 11550 8450 60 0000 C CNN 1 11550 8450 0 -1 -1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C16 U 1 1 5575F5A9 P 12000 8750 F 0 "C16" H 12000 8850 40 0000 L CNN F 1 "100n" H 12006 8665 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12038 8600 30 0001 C CNN F 3 "" H 12000 8750 60 0000 C CNN 1 12000 8750 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C20 U 1 1 5575F6E3 P 12200 8550 F 0 "C20" H 12200 8650 40 0000 L CNN F 1 "100n" H 12206 8465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12238 8400 30 0001 C CNN F 3 "" H 12200 8550 60 0000 C CNN 1 12200 8550 1 0 0 -1 $EndComp Text Label 11500 9050 0 60 ~ 0 D9 Text Label 11500 8950 0 60 ~ 0 D8 Text Label 11500 8850 0 60 ~ 0 D7 Text Label 11500 8750 0 60 ~ 0 D6 Text Label 11500 8650 0 60 ~ 0 D5 Text Label 11500 8150 0 60 ~ 0 D4 Text Label 11500 8050 0 60 ~ 0 D3 Text Label 11500 7950 0 60 ~ 0 D2 Text Label 11500 7850 0 60 ~ 0 D1 Text Label 11500 7750 0 60 ~ 0 D0 $Comp L GND-RESCUE-fmcw2_mcu #PWR64 U 1 1 557612F2 P 12000 9000 F 0 "#PWR64" H 12000 9000 30 0001 C CNN F 1 "GND" H 12000 8930 30 0001 C CNN F 2 "" H 12000 9000 60 0000 C CNN F 3 "" H 12000 9000 60 0000 C CNN 1 12000 9000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR66 U 1 1 557613A6 P 12200 8800 F 0 "#PWR66" H 12200 8800 30 0001 C CNN F 1 "GND" H 12200 8730 30 0001 C CNN F 2 "" H 12200 8800 60 0000 C CNN F 3 "" H 12200 8800 60 0000 C CNN 1 12200 8800 1 0 0 -1 $EndComp Text Label 11900 8350 0 60 ~ 0 3V3 Text Label 11850 8550 0 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2_mcu C15 U 1 1 55762323 P 9600 8650 F 0 "C15" H 9600 8750 40 0000 L CNN F 1 "100p" H 9606 8565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9638 8500 30 0001 C CNN F 3 "" H 9600 8650 60 0000 C CNN 1 9600 8650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C13 U 1 1 557625A4 P 9600 8050 F 0 "C13" H 9600 8150 40 0000 L CNN F 1 "100p" H 9606 7965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9638 7900 30 0001 C CNN F 3 "" H 9600 8050 60 0000 C CNN 1 9600 8050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR46 U 1 1 557627D0 P 9600 8300 F 0 "#PWR46" H 9600 8300 30 0001 C CNN F 1 "GND" H 9600 8230 30 0001 C CNN F 2 "" H 9600 8300 60 0000 C CNN F 3 "" H 9600 8300 60 0000 C CNN 1 9600 8300 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR47 U 1 1 5576288A P 9600 8900 F 0 "#PWR47" H 9600 8900 30 0001 C CNN F 1 "GND" H 9600 8830 30 0001 C CNN F 2 "" H 9600 8900 60 0000 C CNN F 3 "" H 9600 8900 60 0000 C CNN 1 9600 8900 1 0 0 -1 $EndComp Text Label 9750 7850 0 60 ~ 0 5V Text Label 9750 8450 0 60 ~ 0 5V Text Label 10200 8550 2 60 ~ 0 ADC_IN+ Text Label 10200 8650 2 60 ~ 0 ADC_IN- Text Label 10200 8250 2 60 ~ 0 CML Text Label 10200 8950 2 60 ~ 0 ADC_CLK Text Label 10200 9050 2 60 ~ 0 ADC_~OE~ Text Label 3950 4400 2 60 ~ 0 ADC_CLK Text Label 3950 4500 2 60 ~ 0 D0 Text Label 3950 4800 2 60 ~ 0 D1 Text Label 3950 3900 2 60 ~ 0 ADF_LE Text Label 3950 3500 2 60 ~ 0 SSP1_MOSI Text Notes 14300 8050 0 60 ~ 0 6: ADF_MUXOUT\n8: ADF_TXDATA\n10: ADF_CLK\n12: ADF_DATA\n14: ADF_LE\n16: ADF_CE Text Label 14100 8350 2 60 ~ 0 SSP1_MISO Text Label 14100 8550 2 60 ~ 0 SSP1_MOSI Text Label 14100 8450 2 60 ~ 0 SSP1_CLK Text Label 14100 8650 2 60 ~ 0 ADF_TXDATA $Comp L GND-RESCUE-fmcw2_mcu #PWR3 U 1 1 557797DF P 1350 2050 F 0 "#PWR3" H 1350 2050 30 0001 C CNN F 1 "GND" H 1350 1980 30 0001 C CNN F 2 "" H 1350 2050 60 0000 C CNN F 3 "" H 1350 2050 60 0000 C CNN 1 1350 2050 1 0 0 -1 $EndComp Text Label 1450 1500 0 60 ~ 0 12V $Comp L C-RESCUE-fmcw2_mcu C21 U 1 1 55779A04 P 1650 1750 F 0 "C21" H 1650 1850 40 0000 L CNN F 1 "10u" H 1656 1665 40 0000 L CNN F 2 "fmcw2:C_0805b" H 1688 1600 30 0001 C CNN F 3 "" H 1650 1750 60 0000 C CNN 1 1650 1750 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR7 U 1 1 55779A9B P 1650 2050 F 0 "#PWR7" H 1650 2050 30 0001 C CNN F 1 "GND" H 1650 1980 30 0001 C CNN F 2 "" H 1650 2050 60 0000 C CNN F 3 "" H 1650 2050 60 0000 C CNN 1 1650 2050 1 0 0 -1 $EndComp Text Label 1950 800 2 60 ~ 0 12V $Comp L GND-RESCUE-fmcw2_mcu #PWR18 U 1 1 55772DF6 P 2950 1500 F 0 "#PWR18" H 2950 1500 30 0001 C CNN F 1 "GND" H 2950 1430 30 0001 C CNN F 2 "" H 2950 1500 60 0000 C CNN F 3 "" H 2950 1500 60 0000 C CNN 1 2950 1500 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C23 U 1 1 55772FF9 P 3650 800 F 0 "C23" H 3650 900 40 0000 L CNN F 1 "10n" H 3656 715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3688 650 30 0001 C CNN F 3 "" H 3650 800 60 0000 C CNN 1 3650 800 0 1 1 0 $EndComp $Comp L INDUCTOR_SMALL L1 U 1 1 55773209 P 4150 900 F 0 "L1" H 4150 1116 50 0000 C CNN F 1 "4.7u/IHLP1616BZER4R7M11" H 4150 1024 50 0000 C CNN F 2 "fmcw2:SRN4018" H 4150 900 60 0001 C CNN F 3 "" H 4150 900 60 0000 C CNN 1 4150 900 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R16 U 1 1 557735AB P 3950 1050 F 0 "R16" V 4030 1050 40 0000 C CNN F 1 "49.9k" V 3957 1051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3880 1050 30 0001 C CNN F 3 "" H 3950 1050 30 0000 C CNN 1 3950 1050 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R15 U 1 1 557736B3 P 3700 1450 F 0 "R15" V 3780 1450 40 0000 C CNN F 1 "9.53k" V 3707 1451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3630 1450 30 0001 C CNN F 3 "" H 3700 1450 30 0000 C CNN 1 3700 1450 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR24 U 1 1 55773765 P 3700 1750 F 0 "#PWR24" H 3700 1750 30 0001 C CNN F 1 "GND" H 3700 1680 30 0001 C CNN F 2 "" H 3700 1750 60 0000 C CNN F 3 "" H 3700 1750 60 0000 C CNN 1 3700 1750 1 0 0 -1 $EndComp Text Label 4500 900 0 60 ~ 0 5V $Comp L C-RESCUE-fmcw2_mcu C24 U 1 1 557759D8 P 4650 1100 F 0 "C24" H 4650 1200 40 0000 L CNN F 1 "10u" H 4656 1015 40 0000 L CNN F 2 "fmcw2:C_0805b" H 4688 950 30 0001 C CNN F 3 "" H 4650 1100 60 0000 C CNN 1 4650 1100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR27 U 1 1 55775A87 P 4650 1350 F 0 "#PWR27" H 4650 1350 30 0001 C CNN F 1 "GND" H 4650 1280 30 0001 C CNN F 2 "" H 4650 1350 60 0000 C CNN F 3 "" H 4650 1350 60 0000 C CNN 1 4650 1350 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C22 U 1 1 5577633D P 1950 1000 F 0 "C22" H 1950 1100 40 0000 L CNN F 1 "10u" H 1956 915 40 0000 L CNN F 2 "fmcw2:C_0805b" H 1988 850 30 0001 C CNN F 3 "" H 1950 1000 60 0000 C CNN 1 1950 1000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR10 U 1 1 55776628 P 1950 1250 F 0 "#PWR10" H 1950 1250 30 0001 C CNN F 1 "GND" H 1950 1180 30 0001 C CNN F 2 "" H 1950 1250 60 0000 C CNN F 3 "" H 1950 1250 60 0000 C CNN 1 1950 1250 1 0 0 -1 $EndComp Text Label 7600 800 2 60 ~ 0 12V $Comp L GND-RESCUE-fmcw2_mcu #PWR37 U 1 1 55779E48 P 8650 1450 F 0 "#PWR37" H 8650 1450 30 0001 C CNN F 1 "GND" H 8650 1380 30 0001 C CNN F 2 "" H 8650 1450 60 0000 C CNN F 3 "" H 8650 1450 60 0000 C CNN 1 8650 1450 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C26 U 1 1 55779E4F P 9300 800 F 0 "C26" H 9300 900 40 0000 L CNN F 1 "10n" H 9306 715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9338 650 30 0001 C CNN F 3 "" H 9300 800 60 0000 C CNN 1 9300 800 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R23 U 1 1 55779E60 P 9600 1050 F 0 "R23" V 9680 1050 40 0000 C CNN F 1 "49.9k" V 9607 1051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9530 1050 30 0001 C CNN F 3 "" H 9600 1050 30 0000 C CNN 1 9600 1050 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R17 U 1 1 55779E66 P 9350 1450 F 0 "R17" V 9430 1450 40 0000 C CNN F 1 "15.83k" V 9357 1451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 9280 1450 30 0001 C CNN F 3 "" H 9350 1450 30 0000 C CNN 1 9350 1450 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR43 U 1 1 55779E6C P 9350 1750 F 0 "#PWR43" H 9350 1750 30 0001 C CNN F 1 "GND" H 9350 1680 30 0001 C CNN F 2 "" H 9350 1750 60 0000 C CNN F 3 "" H 9350 1750 60 0000 C CNN 1 9350 1750 1 0 0 -1 $EndComp Text Label 10150 900 0 60 ~ 0 3V3 $Comp L C-RESCUE-fmcw2_mcu C27 U 1 1 55779E7A P 10300 1100 F 0 "C27" H 10300 1200 40 0000 L CNN F 1 "10u" H 10306 1015 40 0000 L CNN F 2 "fmcw2:C_0805b" H 10338 950 30 0001 C CNN F 3 "" H 10300 1100 60 0000 C CNN 1 10300 1100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR55 U 1 1 55779E80 P 10300 1350 F 0 "#PWR55" H 10300 1350 30 0001 C CNN F 1 "GND" H 10300 1280 30 0001 C CNN F 2 "" H 10300 1350 60 0000 C CNN F 3 "" H 10300 1350 60 0000 C CNN 1 10300 1350 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C25 U 1 1 55779E88 P 7600 1000 F 0 "C25" H 7600 1100 40 0000 L CNN F 1 "10u" H 7606 915 40 0000 L CNN F 2 "fmcw2:C_0805b" H 7638 850 30 0001 C CNN F 3 "" H 7600 1000 60 0000 C CNN 1 7600 1000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR35 U 1 1 55779E8E P 7600 1250 F 0 "#PWR35" H 7600 1250 30 0001 C CNN F 1 "GND" H 7600 1180 30 0001 C CNN F 2 "" H 7600 1250 60 0000 C CNN F 3 "" H 7600 1250 60 0000 C CNN 1 7600 1250 1 0 0 -1 $EndComp $Comp L DIODESCH D4 U 1 1 5577D53F P 9100 1450 F 0 "D4" H 9100 1550 40 0000 C CNN F 1 "SDM2U30CSP-7" H 9100 1350 40 0000 C CNN F 2 "fmcw2:XDFN-2" H 9100 1450 60 0001 C CNN F 3 "" H 9100 1450 60 0000 C CNN 1 9100 1450 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR41 U 1 1 5577D6E1 P 9100 1750 F 0 "#PWR41" H 9100 1750 30 0001 C CNN F 1 "GND" H 9100 1680 30 0001 C CNN F 2 "" H 9100 1750 60 0000 C CNN F 3 "" H 9100 1750 60 0000 C CNN 1 9100 1750 1 0 0 -1 $EndComp $Comp L DIODESCH D3 U 1 1 5577E22F P 3450 1450 F 0 "D3" H 3450 1550 40 0000 C CNN F 1 "SDM2U30CSP-7" H 3450 1350 40 0000 C CNN F 2 "fmcw2:XDFN-2" H 3450 1450 60 0001 C CNN F 3 "" H 3450 1450 60 0000 C CNN 1 3450 1450 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR22 U 1 1 5577E235 P 3450 1750 F 0 "#PWR22" H 3450 1750 30 0001 C CNN F 1 "GND" H 3450 1680 30 0001 C CNN F 2 "" H 3450 1750 60 0000 C CNN F 3 "" H 3450 1750 60 0000 C CNN 1 3450 1750 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C28 U 1 1 5578116A P 13800 6250 F 0 "C28" H 13800 6350 40 0000 L CNN F 1 "1u" H 13806 6165 40 0000 L CNN F 2 "fmcw2:C_0603b" H 13838 6100 30 0001 C CNN F 3 "" H 13800 6250 60 0000 C CNN 1 13800 6250 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C29 U 1 1 55781271 P 15550 6250 F 0 "C29" H 15550 6350 40 0000 L CNN F 1 "2.2u" H 15556 6165 40 0000 L CNN F 2 "fmcw2:C_0603b" H 15588 6100 30 0001 C CNN F 3 "" H 15550 6250 60 0000 C CNN 1 15550 6250 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR73 U 1 1 557816AC P 13800 6550 F 0 "#PWR73" H 13800 6550 30 0001 C CNN F 1 "GND" H 13800 6480 30 0001 C CNN F 2 "" H 13800 6550 60 0000 C CNN F 3 "" H 13800 6550 60 0000 C CNN 1 13800 6550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR88 U 1 1 55781EFD P 15550 6550 F 0 "#PWR88" H 15550 6550 30 0001 C CNN F 1 "GND" H 15550 6480 30 0001 C CNN F 2 "" H 15550 6550 60 0000 C CNN F 3 "" H 15550 6550 60 0000 C CNN 1 15550 6550 1 0 0 -1 $EndComp Text Label 13800 6000 2 60 ~ 0 12V Text Label 15550 6000 0 60 ~ 0 10V Text Label 7650 4400 0 60 ~ 0 PA_OFF Text Label 7650 4500 0 60 ~ 0 MIX_ENBL Text Label 3950 4000 2 60 ~ 0 ADF_CE $Comp L CONN_1 P4 U 1 1 55797EE5 P 3800 3600 F 0 "P4" H 3880 3600 40 0000 L CNN F 1 "CONN_1" H 3800 3655 30 0001 C CNN F 2 "fmcw2:TP_1.00" H 3800 3600 60 0001 C CNN F 3 "" H 3800 3600 60 0000 C CNN 1 3800 3600 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR76 U 1 1 557731D5 P 14100 9250 F 0 "#PWR76" H 14100 9250 30 0001 C CNN F 1 "GND" H 14100 9180 30 0001 C CNN F 2 "" H 14100 9250 60 0000 C CNN F 3 "" H 14100 9250 60 0000 C CNN 1 14100 9250 0 1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR77 U 1 1 557732E8 P 14100 9550 F 0 "#PWR77" H 14100 9550 30 0001 C CNN F 1 "GND" H 14100 9480 30 0001 C CNN F 2 "" H 14100 9550 60 0000 C CNN F 3 "" H 14100 9550 60 0000 C CNN 1 14100 9550 0 1 -1 0 $EndComp Text Label 15000 8650 0 60 ~ 0 5V $Comp L C-RESCUE-fmcw2_mcu C31 U 1 1 55774069 P 13750 7700 F 0 "C31" H 13750 7800 40 0000 L CNN F 1 "100n" H 13756 7615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 13788 7550 30 0001 C CNN F 3 "" H 13750 7700 60 0000 C CNN 1 13750 7700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR72 U 1 1 5577413A P 13750 7950 F 0 "#PWR72" H 13750 7950 30 0001 C CNN F 1 "GND" H 13750 7880 30 0001 C CNN F 2 "" H 13750 7950 60 0000 C CNN F 3 "" H 13750 7950 60 0000 C CNN 1 13750 7950 1 0 0 -1 $EndComp Text Label 13750 7400 0 60 ~ 0 5V $Comp L C-RESCUE-fmcw2_mcu C30 U 1 1 5577468C P 13550 7700 F 0 "C30" H 13550 7800 40 0000 L CNN F 1 "100n" H 13556 7615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 13588 7550 30 0001 C CNN F 3 "" H 13550 7700 60 0000 C CNN 1 13550 7700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR71 U 1 1 55774B3C P 13550 7950 F 0 "#PWR71" H 13550 7950 30 0001 C CNN F 1 "GND" H 13550 7880 30 0001 C CNN F 2 "" H 13550 7950 60 0000 C CNN F 3 "" H 13550 7950 60 0000 C CNN 1 13550 7950 1 0 0 -1 $EndComp Text Notes 9600 7700 0 60 ~ 0 38 mA Text Notes 11950 8200 0 60 ~ 0 6 mA Text Notes 8050 1650 0 60 ~ 0 Efficiency: 90% Text Notes 6150 1450 0 60 ~ 0 85 mA Text Notes 15050 8250 0 60 ~ 0 1A Text Notes 15400 5900 0 60 ~ 0 <1mA $Comp L R-RESCUE-fmcw2_mcu R26 U 1 1 5579E934 P 3600 5050 F 0 "R26" V 3680 5050 40 0000 C CNN F 1 "33" V 3607 5051 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3530 5050 30 0001 C CNN F 3 "" H 3600 5050 30 0000 C CNN 1 3600 5050 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R24 U 1 1 5579FBBD P 3600 4300 F 0 "R24" V 3680 4300 40 0000 C CNN F 1 "33" V 3607 4301 40 0000 C CNN F 2 "fmcw2:R_0402b" V 3530 4300 30 0001 C CNN F 3 "" H 3600 4300 30 0000 C CNN 1 3600 4300 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C32 U 1 1 557A0F09 P 13300 7700 F 0 "C32" H 13300 7800 40 0000 L CNN F 1 "100n" H 13306 7615 40 0000 L CNN F 2 "fmcw2:C_0402b" H 13338 7550 30 0001 C CNN F 3 "" H 13300 7700 60 0000 C CNN 1 13300 7700 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR69 U 1 1 557A103B P 13300 7950 F 0 "#PWR69" H 13300 7950 30 0001 C CNN F 1 "GND" H 13300 7880 30 0001 C CNN F 2 "" H 13300 7950 60 0000 C CNN F 3 "" H 13300 7950 60 0000 C CNN 1 13300 7950 1 0 0 -1 $EndComp $Comp L CRYSTAL_SMD4 X1 U 1 1 557A8B2B P 1750 10350 F 0 "X1" H 1750 10500 60 0000 C CNN F 1 "12MHz" H 1750 10200 60 0000 C CNN F 2 "fmcw2:XTAL_3.2x2.5" H 1750 10350 60 0001 C CNN F 3 "7V-12.000MAHE-T" H 1750 10600 60 0000 C CNN 1 1750 10350 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR8 U 1 1 557A989F P 1650 10600 F 0 "#PWR8" H 1650 10600 30 0001 C CNN F 1 "GND" H 1650 10530 30 0001 C CNN F 2 "" H 1650 10600 60 0000 C CNN F 3 "" H 1650 10600 60 0000 C CNN 1 1650 10600 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR9 U 1 1 557A9B9F P 1850 10600 F 0 "#PWR9" H 1850 10600 30 0001 C CNN F 1 "GND" H 1850 10530 30 0001 C CNN F 2 "" H 1850 10600 60 0000 C CNN F 3 "" H 1850 10600 60 0000 C CNN 1 1850 10600 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C34 U 1 1 557ABE14 P 9350 8050 F 0 "C34" H 9350 8150 40 0000 L CNN F 1 "100n" H 9356 7965 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9388 7900 30 0001 C CNN F 3 "" H 9350 8050 60 0000 C CNN 1 9350 8050 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C35 U 1 1 557ABF49 P 9350 8650 F 0 "C35" H 9350 8750 40 0000 L CNN F 1 "100n" H 9356 8565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9388 8500 30 0001 C CNN F 3 "" H 9350 8650 60 0000 C CNN 1 9350 8650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR45 U 1 1 557ACAFE P 9350 8900 F 0 "#PWR45" H 9350 8900 30 0001 C CNN F 1 "GND" H 9350 8830 30 0001 C CNN F 2 "" H 9350 8900 60 0000 C CNN F 3 "" H 9350 8900 60 0000 C CNN 1 9350 8900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR44 U 1 1 557ACC30 P 9350 8300 F 0 "#PWR44" H 9350 8300 30 0001 C CNN F 1 "GND" H 9350 8230 30 0001 C CNN F 2 "" H 9350 8300 60 0000 C CNN F 3 "" H 9350 8300 60 0000 C CNN 1 9350 8300 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C33 U 1 1 557AD0D4 P 9000 8050 F 0 "C33" H 9000 8150 40 0000 L CNN F 1 "2.2u" H 9006 7965 40 0000 L CNN F 2 "fmcw2:C_0603b" H 9038 7900 30 0001 C CNN F 3 "" H 9000 8050 60 0000 C CNN 1 9000 8050 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR39 U 1 1 557AD1B8 P 9000 8300 F 0 "#PWR39" H 9000 8300 30 0001 C CNN F 1 "GND" H 9000 8230 30 0001 C CNN F 2 "" H 9000 8300 60 0000 C CNN F 3 "" H 9000 8300 60 0000 C CNN 1 9000 8300 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C37 U 1 1 557AF0BB P 9200 9650 F 0 "C37" H 9200 9750 40 0000 L CNN F 1 "100n" H 9206 9565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9238 9500 30 0001 C CNN F 3 "" H 9200 9650 60 0000 C CNN 1 9200 9650 1 0 0 -1 $EndComp Text Label 10200 7950 2 60 ~ 0 REFP Text Label 10200 8050 2 60 ~ 0 REFIN Text Label 10200 8150 2 60 ~ 0 REFN Text Label 9200 9400 2 60 ~ 0 REFP Text Label 9600 9400 2 60 ~ 0 REFIN Text Label 9950 9400 2 60 ~ 0 REFN Text Label 10250 9400 2 60 ~ 0 CML $Comp L GND-RESCUE-fmcw2_mcu #PWR42 U 1 1 557B0FC0 P 9200 9900 F 0 "#PWR42" H 9200 9900 30 0001 C CNN F 1 "GND" H 9200 9830 30 0001 C CNN F 2 "" H 9200 9900 60 0000 C CNN F 3 "" H 9200 9900 60 0000 C CNN 1 9200 9900 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C38 U 1 1 557B1280 P 9600 9650 F 0 "C38" H 9600 9750 40 0000 L CNN F 1 "100n" H 9606 9565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9638 9500 30 0001 C CNN F 3 "" H 9600 9650 60 0000 C CNN 1 9600 9650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C39 U 1 1 557B13D1 P 9950 9650 F 0 "C39" H 9950 9750 40 0000 L CNN F 1 "100n" H 9956 9565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 9988 9500 30 0001 C CNN F 3 "" H 9950 9650 60 0000 C CNN 1 9950 9650 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C40 U 1 1 557B1647 P 10250 9650 F 0 "C40" H 10250 9750 40 0000 L CNN F 1 "100n" H 10256 9565 40 0000 L CNN F 2 "fmcw2:C_0402b" H 10288 9500 30 0001 C CNN F 3 "" H 10250 9650 60 0000 C CNN 1 10250 9650 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR48 U 1 1 557B2378 P 9600 9900 F 0 "#PWR48" H 9600 9900 30 0001 C CNN F 1 "GND" H 9600 9830 30 0001 C CNN F 2 "" H 9600 9900 60 0000 C CNN F 3 "" H 9600 9900 60 0000 C CNN 1 9600 9900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR49 U 1 1 557B24B2 P 9950 9900 F 0 "#PWR49" H 9950 9900 30 0001 C CNN F 1 "GND" H 9950 9830 30 0001 C CNN F 2 "" H 9950 9900 60 0000 C CNN F 3 "" H 9950 9900 60 0000 C CNN 1 9950 9900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR54 U 1 1 557B25EC P 10250 9900 F 0 "#PWR54" H 10250 9900 30 0001 C CNN F 1 "GND" H 10250 9830 30 0001 C CNN F 2 "" H 10250 9900 60 0000 C CNN F 3 "" H 10250 9900 60 0000 C CNN 1 10250 9900 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR50 U 1 1 557B30A7 P 10100 8850 F 0 "#PWR50" H 10100 8850 30 0001 C CNN F 1 "GND" H 10100 8780 30 0001 C CNN F 2 "" H 10100 8850 60 0000 C CNN F 3 "" H 10100 8850 60 0000 C CNN 1 10100 8850 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C36 U 1 1 557B430B P 4900 1100 F 0 "C36" H 4900 1200 40 0000 L CNN F 1 "10u" H 4906 1015 40 0000 L CNN F 2 "fmcw2:C_0805b" H 4938 950 30 0001 C CNN F 3 "" H 4900 1100 60 0000 C CNN 1 4900 1100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR28 U 1 1 557B4646 P 4900 1350 F 0 "#PWR28" H 4900 1350 30 0001 C CNN F 1 "GND" H 4900 1280 30 0001 C CNN F 2 "" H 4900 1350 60 0000 C CNN F 3 "" H 4900 1350 60 0000 C CNN 1 4900 1350 1 0 0 -1 $EndComp Text Notes 10900 9550 0 60 ~ 0 Connect CMLP to ground\nif input is DC-coupled $Comp L CONN_15X2 P1 U 1 1 5582FA0D P 14550 9050 F 0 "P1" H 14550 9850 60 0000 C CNN F 1 "CONN_15X2" V 14550 9000 50 0000 C CNN F 2 "fmcw2:DF12A-30DS-0.5V(81)" H 14550 9200 60 0001 C CNN F 3 "" H 14550 9200 60 0000 C CNN 1 14550 9050 1 0 0 -1 $EndComp Text Label 10200 8750 2 60 ~ 0 CMLP $Comp L R-RESCUE-fmcw2_mcu R7 U 1 1 5586DC10 P 10550 9650 F 0 "R7" V 10630 9650 40 0000 C CNN F 1 "DNP" V 10557 9651 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10480 9650 30 0001 C CNN F 3 "" H 10550 9650 30 0000 C CNN 1 10550 9650 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R8 U 1 1 5586DD6F P 10750 9650 F 0 "R8" V 10830 9650 40 0000 C CNN F 1 "0" V 10757 9651 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10680 9650 30 0001 C CNN F 3 "" H 10750 9650 30 0000 C CNN 1 10750 9650 1 0 0 -1 $EndComp Text Label 10650 9350 0 60 ~ 0 CMLP $Comp L GND-RESCUE-fmcw2_mcu #PWR58 U 1 1 5586E476 P 10550 9950 F 0 "#PWR58" H 10550 9950 30 0001 C CNN F 1 "GND" H 10550 9880 30 0001 C CNN F 2 "" H 10550 9950 60 0000 C CNN F 3 "" H 10550 9950 60 0000 C CNN 1 10550 9950 1 0 0 -1 $EndComp Text Label 10750 9950 0 60 ~ 0 5V $Comp L GND-RESCUE-fmcw2_mcu #PWR6 U 1 1 558717DF P 1550 3650 F 0 "#PWR6" H 1550 3650 30 0001 C CNN F 1 "GND" H 1550 3580 30 0001 C CNN F 2 "" H 1550 3650 60 0000 C CNN F 3 "" H 1550 3650 60 0000 C CNN 1 1550 3650 0 -1 -1 0 $EndComp Text Label 1550 3250 0 60 ~ 0 3V3 Text Label 1550 3450 0 60 ~ 0 SCL Text Label 1550 3350 0 60 ~ 0 SDA $Comp L R-RESCUE-fmcw2_mcu R2 U 1 1 55888994 P 10950 1800 F 0 "R2" V 11030 1800 40 0000 C CNN F 1 "1k" V 10957 1801 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10880 1800 30 0001 C CNN F 3 "" H 10950 1800 30 0000 C CNN 1 10950 1800 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R4 U 1 1 55888AB4 P 10950 2000 F 0 "R4" V 11030 2000 40 0000 C CNN F 1 "1k" V 10957 2001 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10880 2000 30 0001 C CNN F 3 "" H 10950 2000 30 0000 C CNN 1 10950 2000 0 1 1 0 $EndComp Text Label 10600 1800 2 60 ~ 0 IFF+ Text Label 10600 2000 2 60 ~ 0 IFF- $Comp L R-RESCUE-fmcw2_mcu R27 U 1 1 55889F08 P 11250 1200 F 0 "R27" V 11330 1200 40 0000 C CNN F 1 "1k" V 11257 1201 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11180 1200 30 0001 C CNN F 3 "" H 11250 1200 30 0000 C CNN 1 11250 1200 1 0 0 1 $EndComp Text Label 11250 850 2 60 ~ 0 CM $Comp L GND-RESCUE-fmcw2_mcu #PWR61 U 1 1 5588BD93 P 11750 2350 F 0 "#PWR61" H 11750 2350 30 0001 C CNN F 1 "GND" H 11750 2280 30 0001 C CNN F 2 "" H 11750 2350 60 0000 C CNN F 3 "" H 11750 2350 60 0000 C CNN 1 11750 2350 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C9 U 1 1 5588C8D2 P 11950 1150 F 0 "C9" H 11950 1250 40 0000 L CNN F 1 "100n" H 11956 1065 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11988 1000 30 0001 C CNN F 3 "" H 11950 1150 60 0000 C CNN 1 11950 1150 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR62 U 1 1 5588CB92 P 11950 1400 F 0 "#PWR62" H 11950 1400 30 0001 C CNN F 1 "GND" H 11950 1330 30 0001 C CNN F 2 "" H 11950 1400 60 0000 C CNN F 3 "" H 11950 1400 60 0000 C CNN 1 11950 1400 1 0 0 -1 $EndComp Text Label 11750 950 0 60 ~ 0 5V $Comp L R-RESCUE-fmcw2_mcu R29 U 1 1 5588E096 P 11900 2650 F 0 "R29" V 11980 2650 40 0000 C CNN F 1 "1k" V 11907 2651 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11830 2650 30 0001 C CNN F 3 "" H 11900 2650 30 0000 C CNN 1 11900 2650 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R34 U 1 1 5588EDCF P 14050 1450 F 0 "R34" V 14130 1450 40 0000 C CNN F 1 "10k" V 14057 1451 40 0000 C CNN F 2 "fmcw2:R_0402b" V 13980 1450 30 0001 C CNN F 3 "" H 14050 1450 30 0000 C CNN 1 14050 1450 1 0 0 -1 $EndComp Text Label 14050 1150 0 60 ~ 0 CM $Comp L R-RESCUE-fmcw2_mcu R35 U 1 1 5588F5C6 P 14600 2550 F 0 "R35" V 14680 2550 40 0000 C CNN F 1 "4.7k" V 14607 2551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 14530 2550 30 0001 C CNN F 3 "" H 14600 2550 30 0000 C CNN 1 14600 2550 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C18 U 1 1 5588FD27 P 14600 2800 F 0 "C18" H 14600 2900 40 0000 L CNN F 1 "33p" H 14606 2715 40 0000 L CNN F 2 "fmcw2:C_0402b" H 14638 2650 30 0001 C CNN F 3 "" H 14600 2800 60 0000 C CNN 1 14600 2800 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C10 U 1 1 55891C93 P 12600 1900 F 0 "C10" H 12600 2000 40 0000 L CNN F 1 "10u" H 12606 1815 40 0000 L CNN F 2 "fmcw2:C_0805b" H 12638 1750 30 0001 C CNN F 3 "" H 12600 1900 60 0000 C CNN 1 12600 1900 0 1 1 0 $EndComp Text Label 15650 1850 0 60 ~ 0 ADC_IN+ $Comp L R-RESCUE-fmcw2_mcu R14 U 1 1 5589412C P 12700 4850 F 0 "R14" V 12780 4850 40 0000 C CNN F 1 "4.7k" V 12707 4851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 12630 4850 30 0001 C CNN F 3 "" H 12700 4850 30 0000 C CNN 1 12700 4850 1 0 0 -1 $EndComp Text Label 12700 5150 2 60 ~ 0 CM $Comp L R-RESCUE-fmcw2_mcu R31 U 1 1 55894F5E P 14250 3800 F 0 "R31" V 14330 3800 40 0000 C CNN F 1 "10k" V 14257 3801 40 0000 C CNN F 2 "fmcw2:R_0402b" V 14180 3800 30 0001 C CNN F 3 "" H 14250 3800 30 0000 C CNN 1 14250 3800 -1 0 0 1 $EndComp Text Label 15350 4700 0 60 ~ 0 ADC_IN- $Comp L R-RESCUE-fmcw2_mcu R32 U 1 1 55896BAA P 14250 4400 F 0 "R32" V 14330 4400 40 0000 C CNN F 1 "10k" V 14257 4401 40 0000 C CNN F 2 "fmcw2:R_0402b" V 14180 4400 30 0001 C CNN F 3 "" H 14250 4400 30 0000 C CNN 1 14250 4400 1 0 0 -1 $EndComp $Comp L LT1817 U2 U 1 1 5589E977 P 11850 1900 F 0 "U2" H 12000 2050 60 0000 C CNN F 1 "LT1817" H 12050 1700 60 0000 C CNN F 2 "SSOP_Packages:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 11850 1900 60 0001 C CNN F 3 "" H 11850 1900 60 0000 C CNN 1 11850 1900 1 0 0 -1 $EndComp $Comp L LT1817 U2 U 2 1 5589EF4B P 14650 1850 F 0 "U2" H 14800 2000 60 0000 C CNN F 1 "LT1817" H 14850 1650 60 0000 C CNN F 2 "SSOP_Packages:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 14650 1850 60 0001 C CNN F 3 "" H 14650 1850 60 0000 C CNN 2 14650 1850 1 0 0 -1 $EndComp $Comp L LT1817 U2 U 3 1 5589F0E2 P 13650 4700 F 0 "U2" H 13800 4850 60 0000 C CNN F 1 "LT1817" H 13850 4500 60 0000 C CNN F 2 "SSOP_Packages:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 13650 4700 60 0001 C CNN F 3 "" H 13650 4700 60 0000 C CNN 3 13650 4700 1 0 0 -1 $EndComp $Comp L MCP4022 U8 U 1 1 5589FDED P 12750 3900 F 0 "U8" H 12900 3700 60 0000 C CNN F 1 "MCP4022-202" H 12750 4100 60 0000 C CNN F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23-6" H 12650 3600 60 0001 C CNN F 3 "" H 12650 3600 60 0000 C CNN 1 12750 3900 1 0 0 -1 $EndComp Text Label 12850 1900 0 60 ~ 0 W_IN Text Label 13450 1950 2 60 ~ 0 A_OUT Text Label 13200 3800 0 60 ~ 0 A_OUT Text Label 13200 3900 0 60 ~ 0 W_IN Text Label 13200 4000 0 60 ~ 0 MCP_~CS~_5V $Comp L C-RESCUE-fmcw2_mcu C8 U 1 1 559467F9 P 11900 2900 F 0 "C8" H 11900 3000 40 0000 L CNN F 1 "33p" H 11906 2815 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11938 2750 30 0001 C CNN F 3 "" H 11900 2900 60 0000 C CNN 1 11900 2900 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C17 U 1 1 559481CE P 15050 4700 F 0 "C17" H 15050 4800 40 0000 L CNN F 1 "1u" H 15056 4615 40 0000 L CNN F 2 "fmcw2:C_0603b" H 15088 4550 30 0001 C CNN F 3 "" H 15050 4700 60 0000 C CNN 1 15050 4700 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C41 U 1 1 55949CA9 P 15400 1850 F 0 "C41" H 15400 1950 40 0000 L CNN F 1 "1u" H 15406 1765 40 0000 L CNN F 2 "fmcw2:C_0603b" H 15438 1700 30 0001 C CNN F 3 "" H 15400 1850 60 0000 C CNN 1 15400 1850 0 1 1 0 $EndComp $Comp L LT1817 U2 U 4 1 5594AF55 P 12600 5950 F 0 "U2" H 12750 6100 60 0000 C CNN F 1 "LT1817" H 12800 5750 60 0000 C CNN F 2 "SSOP_Packages:SSOP-16_3.9x4.9mm_Pitch0.635mm" H 12600 5950 60 0001 C CNN F 3 "" H 12600 5950 60 0000 C CNN 4 12600 5950 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R28 U 1 1 5594B139 P 11800 5850 F 0 "R28" V 11880 5850 40 0000 C CNN F 1 "2.49k" V 11807 5851 40 0000 C CNN F 2 "fmcw2:R_0402b" V 11730 5850 30 0001 C CNN F 3 "" H 11800 5850 30 0000 C CNN 1 11800 5850 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R33 U 1 1 5594B526 P 12950 6550 F 0 "R33" V 13030 6550 40 0000 C CNN F 1 "49.9" V 12957 6551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 12880 6550 30 0001 C CNN F 3 "" H 12950 6550 30 0000 C CNN 1 12950 6550 0 1 1 0 $EndComp $Comp L R-RESCUE-fmcw2_mcu R30 U 1 1 5594B6BC P 12350 6550 F 0 "R30" V 12430 6550 40 0000 C CNN F 1 "2.49k" V 12357 6551 40 0000 C CNN F 2 "fmcw2:R_0402b" V 12280 6550 30 0001 C CNN F 3 "" H 12350 6550 30 0000 C CNN 1 12350 6550 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C14 U 1 1 5594B7C4 P 12650 7000 F 0 "C14" H 12650 7100 40 0000 L CNN F 1 "100n" H 12656 6915 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12688 6850 30 0001 C CNN F 3 "" H 12650 7000 60 0000 C CNN 1 12650 7000 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR67 U 1 1 5594B8B9 P 12650 7250 F 0 "#PWR67" H 12650 7250 30 0001 C CNN F 1 "GND" H 12650 7180 30 0001 C CNN F 2 "" H 12650 7250 60 0000 C CNN F 3 "" H 12650 7250 60 0000 C CNN 1 12650 7250 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C11 U 1 1 5594BC04 P 12650 6300 F 0 "C11" H 12650 6400 40 0000 L CNN F 1 "100n" H 12656 6215 40 0000 L CNN F 2 "fmcw2:C_0402b" H 12688 6150 30 0001 C CNN F 3 "" H 12650 6300 60 0000 C CNN 1 12650 6300 0 1 1 0 $EndComp Text Label 12700 6700 0 60 ~ 0 CM Text Label 11500 5850 2 60 ~ 0 CML Text Label 12250 3300 0 60 ~ 0 5V $Comp L C-RESCUE-fmcw2_mcu C47 U 1 1 55954AD4 P 11950 3500 F 0 "C47" H 11950 3600 40 0000 L CNN F 1 "100n" H 11956 3415 40 0000 L CNN F 2 "fmcw2:C_0402b" H 11988 3350 30 0001 C CNN F 3 "" H 11950 3500 60 0000 C CNN 1 11950 3500 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR63 U 1 1 55954C2F P 11950 3750 F 0 "#PWR63" H 11950 3750 30 0001 C CNN F 1 "GND" H 11950 3680 30 0001 C CNN F 2 "" H 11950 3750 60 0000 C CNN F 3 "" H 11950 3750 60 0000 C CNN 1 11950 3750 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR65 U 1 1 55955A11 P 12200 3900 F 0 "#PWR65" H 12200 3900 30 0001 C CNN F 1 "GND" H 12200 3830 30 0001 C CNN F 2 "" H 12200 3900 60 0000 C CNN F 3 "" H 12200 3900 60 0000 C CNN 1 12200 3900 1 0 0 -1 $EndComp Text Label 12300 4000 2 60 ~ 0 MCP_U~D~_5V $Comp L GND-RESCUE-fmcw2_mcu #PWR51 U 1 1 55956947 P 10150 6750 F 0 "#PWR51" H 10150 6750 30 0001 C CNN F 1 "GND" H 10150 6680 30 0001 C CNN F 2 "" H 10150 6750 60 0000 C CNN F 3 "" H 10150 6750 60 0000 C CNN 1 10150 6750 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR38 U 1 1 55956CB3 P 8950 6750 F 0 "#PWR38" H 8950 6750 30 0001 C CNN F 1 "GND" H 8950 6680 30 0001 C CNN F 2 "" H 8950 6750 60 0000 C CNN F 3 "" H 8950 6750 60 0000 C CNN 1 8950 6750 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R36 U 1 1 5595814E P 8950 5950 F 0 "R36" V 9030 5950 40 0000 C CNN F 1 "47k" V 8957 5951 40 0000 C CNN F 2 "fmcw2:R_0402b" V 8880 5950 30 0001 C CNN F 3 "" H 8950 5950 30 0000 C CNN 1 8950 5950 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R37 U 1 1 5595836F P 10150 5950 F 0 "R37" V 10230 5950 40 0000 C CNN F 1 "47k" V 10157 5951 40 0000 C CNN F 2 "fmcw2:R_0402b" V 10080 5950 30 0001 C CNN F 3 "" H 10150 5950 30 0000 C CNN 1 10150 5950 1 0 0 -1 $EndComp Text Label 10150 5650 0 60 ~ 0 5V Text Label 8950 5650 0 60 ~ 0 5V Text Label 10200 6250 0 60 ~ 0 MCP_~CS~_5V Text Label 9000 6250 0 60 ~ 0 MCP_U~D~_5V Text Label 8550 6500 2 60 ~ 0 MCP_~U~D_3.3V Text Label 7700 7600 0 60 ~ 0 MCP_CS_3.3V $Comp L R-RESCUE-fmcw2_mcu R38 U 1 1 5595E9CA P 13750 1950 F 0 "R38" V 13830 1950 40 0000 C CNN F 1 "100" V 13757 1951 40 0000 C CNN F 2 "fmcw2:R_0402b" V 13680 1950 30 0001 C CNN F 3 "" H 13750 1950 30 0000 C CNN 1 13750 1950 0 1 1 0 $EndComp $Comp L MOS_N_GSD Q1 U 1 1 55982DAE P 8850 6500 F 0 "Q1" H 8860 6670 60 0000 R CNN F 1 "RE1C002UN" H 8860 6350 60 0000 R CNN F 2 "fmcw2:SOT-416" H 8850 6500 60 0001 C CNN F 3 "" H 8850 6500 60 0000 C CNN F 4 "RE1C002UNTCL" H 8850 6500 60 0001 C CNN "manf#" 1 8850 6500 1 0 0 -1 $EndComp $Comp L MOS_N_GSD Q2 U 1 1 559833C0 P 10050 6500 F 0 "Q2" H 10060 6670 60 0000 R CNN F 1 "RE1C002UN" H 10060 6350 60 0000 R CNN F 2 "fmcw2:SOT-416" H 10050 6500 60 0001 C CNN F 3 "" H 10050 6500 60 0000 C CNN 1 10050 6500 1 0 0 -1 $EndComp $Comp L CONN_6 P7 U 1 1 55994889 P 1100 2750 F 0 "P7" V 1050 2750 60 0000 C CNN F 1 "CONN_6" V 1150 2750 60 0000 C CNN F 2 "Pin_Headers:Pin_Header_Straight_1x06" H 1100 2750 60 0001 C CNN F 3 "" H 1100 2750 60 0000 C CNN 1 1100 2750 -1 0 0 1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR5 U 1 1 55994D2F P 1500 3000 F 0 "#PWR5" H 1500 3000 30 0001 C CNN F 1 "GND" H 1500 2930 30 0001 C CNN F 2 "" H 1500 3000 60 0000 C CNN F 3 "" H 1500 3000 60 0000 C CNN 1 1500 3000 0 -1 -1 0 $EndComp Text Label 7650 4000 0 60 ~ 0 GPIO0 Text Label 1500 2600 0 60 ~ 0 GPIO0 Text Label 1500 2500 0 60 ~ 0 3V3 Text Label 3750 5250 2 60 ~ 0 ADC_~OE~ $Comp L GND-RESCUE-fmcw2_mcu #PWR75 U 1 1 559B1555 P 14100 9150 F 0 "#PWR75" H 14100 9150 30 0001 C CNN F 1 "GND" H 14100 9080 30 0001 C CNN F 2 "" H 14100 9150 60 0000 C CNN F 3 "" H 14100 9150 60 0000 C CNN 1 14100 9150 0 1 1 0 $EndComp $Comp L BARREL_JACK CON1 U 1 1 559B4A5F P 1000 1600 F 0 "CON1" H 1000 1850 60 0000 C CNN F 1 "BARREL_JACK" H 1000 1400 60 0000 C CNN F 2 "fmcw2:EJ508A" H 1000 1600 60 0001 C CNN F 3 "" H 1000 1600 60 0000 C CNN 1 1000 1600 1 0 0 -1 $EndComp Text Label 15000 8750 0 60 ~ 0 5V $Comp L GND-RESCUE-fmcw2_mcu #PWR83 U 1 1 559C077E P 15000 9250 F 0 "#PWR83" H 15000 9250 30 0001 C CNN F 1 "GND" H 15000 9180 30 0001 C CNN F 2 "" H 15000 9250 60 0000 C CNN F 3 "" H 15000 9250 60 0000 C CNN 1 15000 9250 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR86 U 1 1 559C08DF P 15000 9750 F 0 "#PWR86" H 15000 9750 30 0001 C CNN F 1 "GND" H 15000 9680 30 0001 C CNN F 2 "" H 15000 9750 60 0000 C CNN F 3 "" H 15000 9750 60 0000 C CNN 1 15000 9750 0 -1 -1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR78 U 1 1 559C14FD P 14100 9750 F 0 "#PWR78" H 14100 9750 30 0001 C CNN F 1 "GND" H 14100 9680 30 0001 C CNN F 2 "" H 14100 9750 60 0000 C CNN F 3 "" H 14100 9750 60 0000 C CNN 1 14100 9750 0 1 1 0 $EndComp Text Label 7700 8000 0 60 ~ 0 MCP_~U~D_3.3V Text Label 9800 6500 2 60 ~ 0 MCP_CS_3.3V Text Label 1500 2900 0 60 ~ 0 SSP1_CLK Text Label 1500 2800 0 60 ~ 0 SSP1_MOSI Text Label 1500 2700 0 60 ~ 0 SSP1_MISO Text Label 7650 3600 0 60 ~ 0 GPIO1 Text Label 1550 3550 0 60 ~ 0 GPIO1 $Comp L CONN_5 P6 U 1 1 559C61C6 P 1100 3450 F 0 "P6" V 1050 3450 50 0000 C CNN F 1 "CONN_5" V 1150 3450 50 0000 C CNN F 2 "Pin_Headers:Pin_Header_Straight_1x05" H 1100 3450 60 0001 C CNN F 3 "" H 1100 3450 60 0000 C CNN 1 1100 3450 -1 0 0 1 $EndComp Text Label 14100 9350 2 60 ~ 0 3V3 Text Label 14100 9450 2 60 ~ 0 3V3 Text Label 3950 5950 2 60 ~ 0 VTUNE Text Label 14100 9650 2 60 ~ 0 VTUNE NoConn ~ 4000 4900 $Comp L R-RESCUE-fmcw2_mcu R41 U 1 1 559DEE7C P 2850 5700 F 0 "R41" V 2930 5700 40 0000 C CNN F 1 "24k" V 2857 5701 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2780 5700 30 0001 C CNN F 3 "" H 2850 5700 30 0000 C CNN 1 2850 5700 1 0 0 -1 $EndComp $Comp L R-RESCUE-fmcw2_mcu R42 U 1 1 559DF022 P 2850 6250 F 0 "R42" V 2930 6250 40 0000 C CNN F 1 "39k" V 2857 6251 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2780 6250 30 0001 C CNN F 3 "" H 2850 6250 30 0000 C CNN 1 2850 6250 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR17 U 1 1 559DF1CA P 2850 6550 F 0 "#PWR17" H 2850 6550 30 0001 C CNN F 1 "GND" H 2850 6480 30 0001 C CNN F 2 "" H 2850 6550 60 0000 C CNN F 3 "" H 2850 6550 60 0000 C CNN 1 2850 6550 1 0 0 -1 $EndComp Text Label 2800 5400 2 60 ~ 0 USBV Text Label 2900 6000 0 60 ~ 0 USBV_3V $Comp L FDC6329L U9 U 1 1 559E2CA6 P 1900 4650 F 0 "U9" H 2300 4200 60 0000 C CNN F 1 "FDC6329L" H 2150 4950 60 0000 C CNN F 2 "fmcw2:SSOT-6" H 700 4150 60 0001 C CNN F 3 "" H 700 4150 60 0000 C CNN 1 1900 4650 1 0 0 -1 $EndComp Text Label 600 4500 0 60 ~ 0 5V $Comp L R-RESCUE-fmcw2_mcu R25 U 1 1 559E35D5 P 850 4700 F 0 "R25" V 930 4700 40 0000 C CNN F 1 "47k" V 857 4701 40 0000 C CNN F 2 "fmcw2:R_0402b" V 780 4700 30 0001 C CNN F 3 "" H 850 4700 30 0000 C CNN 1 850 4700 0 1 1 0 $EndComp Text Label 1150 4900 2 60 ~ 0 OTG_USBV $Comp L R-RESCUE-fmcw2_mcu R40 U 1 1 559E4200 P 2400 5150 F 0 "R40" V 2480 5150 40 0000 C CNN F 1 "4.7k" V 2407 5151 40 0000 C CNN F 2 "fmcw2:R_0402b" V 2330 5150 30 0001 C CNN F 3 "" H 2400 5150 30 0000 C CNN 1 2400 5150 0 1 1 0 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR12 U 1 1 559E43F2 P 2100 5150 F 0 "#PWR12" H 2100 5150 30 0001 C CNN F 1 "GND" H 2100 5080 30 0001 C CNN F 2 "" H 2100 5150 60 0000 C CNN F 3 "" H 2100 5150 60 0000 C CNN 1 2100 5150 0 1 1 0 $EndComp $Comp L C-RESCUE-fmcw2_mcu C48 U 1 1 559E4B2E P 2000 4150 F 0 "C48" H 2000 4250 40 0000 L CNN F 1 "DNP" H 2006 4065 40 0000 L CNN F 2 "fmcw2:C_0402b" H 2038 4000 30 0001 C CNN F 3 "" H 2000 4150 60 0001 C CNN 1 2000 4150 0 1 1 0 $EndComp Text Label 2750 4700 0 60 ~ 0 USBV Text Label 7650 3200 0 60 ~ 0 OTG_USBV $Comp L R-RESCUE-fmcw2_mcu R39 U 1 1 559EC170 P 1150 5150 F 0 "R39" V 1230 5150 40 0000 C CNN F 1 "10k" V 1157 5151 40 0000 C CNN F 2 "fmcw2:R_0402b" V 1080 5150 30 0001 C CNN F 3 "" H 1150 5150 30 0000 C CNN 1 1150 5150 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR1 U 1 1 559EC307 P 1150 5450 F 0 "#PWR1" H 1150 5450 30 0001 C CNN F 1 "GND" H 1150 5380 30 0001 C CNN F 2 "" H 1150 5450 60 0000 C CNN F 3 "" H 1150 5450 60 0000 C CNN 1 1150 5450 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C49 U 1 1 559F4786 P 13350 9400 F 0 "C49" H 13350 9500 40 0000 L CNN F 1 "100n" H 13356 9315 40 0000 L CNN F 2 "fmcw2:C_0402b" H 13388 9250 30 0001 C CNN F 3 "" H 13350 9400 60 0000 C CNN 1 13350 9400 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR70 U 1 1 559F489D P 13350 9650 F 0 "#PWR70" H 13350 9650 30 0001 C CNN F 1 "GND" H 13350 9580 30 0001 C CNN F 2 "" H 13350 9650 60 0000 C CNN F 3 "" H 13350 9650 60 0000 C CNN 1 13350 9650 1 0 0 -1 $EndComp Text Label 13350 9150 2 60 ~ 0 3V3 $Comp L CONN_1 P3 U 1 1 559F79B0 P 3800 6050 F 0 "P3" H 3880 6050 40 0000 L CNN F 1 "CONN_1" H 3800 6105 30 0001 C CNN F 2 "fmcw2:TP_1.00" H 3800 6050 60 0001 C CNN F 3 "" H 3800 6050 60 0000 C CNN 1 3800 6050 -1 0 0 1 $EndComp NoConn ~ 4000 5300 NoConn ~ 4000 5400 NoConn ~ 4000 5600 NoConn ~ 4000 5700 NoConn ~ 4000 6150 NoConn ~ 4000 6250 NoConn ~ 4000 8950 NoConn ~ 4000 9050 NoConn ~ 4000 9150 NoConn ~ 4000 9250 NoConn ~ 4000 9350 NoConn ~ 7600 9400 NoConn ~ 7600 8200 NoConn ~ 7600 7500 NoConn ~ 7600 7300 NoConn ~ 7600 7200 NoConn ~ 7600 7100 NoConn ~ 7600 4100 NoConn ~ 7600 4200 NoConn ~ 7600 3900 NoConn ~ 7600 4300 NoConn ~ 7600 3500 NoConn ~ 7600 3300 NoConn ~ 4000 8450 NoConn ~ 4000 8350 NoConn ~ 4000 4200 NoConn ~ 4000 4100 $Comp L PWR_FLAG #FLG1 U 1 1 55A322F9 P 1350 1450 F 0 "#FLG1" H 1350 1545 30 0001 C CNN F 1 "PWR_FLAG" H 1350 1630 30 0000 C CNN F 2 "" H 1350 1450 60 0000 C CNN F 3 "" H 1350 1450 60 0000 C CNN 1 1350 1450 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C50 U 1 1 55A33FDC P 10500 1100 F 0 "C50" H 10500 1200 40 0000 L CNN F 1 "10u" H 10506 1015 40 0000 L CNN F 2 "fmcw2:C_0805b" H 10538 950 30 0001 C CNN F 3 "" H 10500 1100 60 0000 C CNN 1 10500 1100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR57 U 1 1 55A343BB P 10500 1350 F 0 "#PWR57" H 10500 1350 30 0001 C CNN F 1 "GND" H 10500 1280 30 0001 C CNN F 2 "" H 10500 1350 60 0000 C CNN F 3 "" H 10500 1350 60 0000 C CNN 1 10500 1350 1 0 0 -1 $EndComp $Comp L INDUCTOR_SMALL L2 U 1 1 55A425CB P 9800 900 F 0 "L2" H 9800 1116 50 0000 C CNN F 1 "4.7u/IHLP1616BZER4R7M11" H 9800 1024 50 0000 C CNN F 2 "fmcw2:SRN4018" H 9800 900 60 0001 C CNN F 3 "" H 9800 900 60 0000 C CNN 1 9800 900 1 0 0 -1 $EndComp $Comp L SW_PUSH SW2 U 1 1 55A51005 P 3050 9850 F 0 "SW2" H 3200 9960 50 0000 C CNN F 1 "DFU_PUSH" H 3050 9770 50 0000 C CNN F 2 "fmcw2:EVP-AWBA2A" H 3050 9850 60 0001 C CNN F 3 "" H 3050 9850 60 0000 C CNN 1 3050 9850 1 0 0 -1 $EndComp Text Label 3450 5800 0 60 ~ 0 NRESET Text Label 3400 9850 0 60 ~ 0 NRESET $Comp L GND-RESCUE-fmcw2_mcu #PWR16 U 1 1 55A55524 P 2650 9900 F 0 "#PWR16" H 2650 9900 30 0001 C CNN F 1 "GND" H 2650 9830 30 0001 C CNN F 2 "" H 2650 9900 60 0000 C CNN F 3 "" H 2650 9900 60 0000 C CNN 1 2650 9900 1 0 0 -1 $EndComp $Comp L LP2985 U7 U 1 1 55A80584 P 14700 6100 F 0 "U7" H 15050 5900 60 0000 C CNN F 1 "LP2985" H 14900 6300 60 0000 C CNN F 2 "Housings_SOT-23_SOT-143_TSOT-6:SOT-23-5" H 14450 5900 60 0001 C CNN F 3 "" H 14450 5900 60 0000 C CNN 1 14700 6100 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR74 U 1 1 55A80C6E P 13950 6550 F 0 "#PWR74" H 13950 6550 30 0001 C CNN F 1 "GND" H 13950 6480 30 0001 C CNN F 2 "" H 13950 6550 60 0000 C CNN F 3 "" H 13950 6550 60 0000 C CNN 1 13950 6550 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C51 U 1 1 55A81A63 P 15300 6500 F 0 "C51" H 15300 6600 40 0000 L CNN F 1 "10n" H 15306 6415 40 0000 L CNN F 2 "fmcw2:C_0402b" H 15338 6350 30 0001 C CNN F 3 "" H 15300 6500 60 0000 C CNN 1 15300 6500 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR87 U 1 1 55A82477 P 15300 6750 F 0 "#PWR87" H 15300 6750 30 0001 C CNN F 1 "GND" H 15300 6680 30 0001 C CNN F 2 "" H 15300 6750 60 0000 C CNN F 3 "" H 15300 6750 60 0000 C CNN 1 15300 6750 1 0 0 -1 $EndComp $Comp L C-RESCUE-fmcw2_mcu C52 U 1 1 55A89734 P 12750 8450 F 0 "C52" H 12750 8550 40 0000 L CNN F 1 "DNP" H 12756 8365 40 0000 L CNN F 2 "fmcw2:C_0603b" H 12788 8300 30 0001 C CNN F 3 "" H 12750 8450 60 0000 C CNN 1 12750 8450 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR68 U 1 1 55A89946 P 12750 8700 F 0 "#PWR68" H 12750 8700 30 0001 C CNN F 1 "GND" H 12750 8630 30 0001 C CNN F 2 "" H 12750 8700 60 0000 C CNN F 3 "" H 12750 8700 60 0000 C CNN 1 12750 8700 1 0 0 -1 $EndComp Text Label 12750 8200 0 60 ~ 0 5V $Comp L AOZ1281 U5 U 1 1 55A92C94 P 2850 950 F 0 "U5" H 3100 700 60 0000 C CNN F 1 "AOZ1281" H 2950 1200 60 0000 C CNN F 2 "fmcw2:WFDFN-8" H 2850 650 60 0001 C CNN F 3 "" H 2850 650 60 0000 C CNN 1 2850 950 1 0 0 -1 $EndComp $Comp L AOZ1281 U6 U 1 1 55A9353B P 8550 950 F 0 "U6" H 8800 700 60 0000 C CNN F 1 "AOZ1281" H 8650 1200 60 0000 C CNN F 2 "fmcw2:WFDFN-8" H 8550 650 60 0001 C CNN F 3 "" H 8550 650 60 0000 C CNN 1 8550 950 1 0 0 -1 $EndComp $Comp L MOS_N_GSD Q3 U 1 1 5641656E P 3100 2550 F 0 "Q3" H 3110 2720 60 0000 R CNN F 1 "RE1C002UN" H 3110 2400 60 0000 R CNN F 2 "fmcw2:SOT-416" H 3100 2550 60 0001 C CNN F 3 "" H 3100 2550 60 0000 C CNN 1 3100 2550 1 0 0 -1 $EndComp Text Label 2850 2550 2 60 ~ 0 SSP1_MISO Text Label 3950 3700 2 60 ~ 0 ~RAMP Text Label 3200 2300 0 60 ~ 0 ~RAMP $Comp L C-RESCUE-fmcw2_mcu C53 U 1 1 5641E8A7 P 3400 2550 F 0 "C53" H 3400 2650 40 0000 L CNN F 1 "DNP" H 3406 2465 40 0000 L CNN F 2 "fmcw2:C_0402b" H 3438 2400 30 0001 C CNN F 3 "" H 3400 2550 60 0000 C CNN 1 3400 2550 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR21 U 1 1 5641EF82 P 3400 2800 F 0 "#PWR21" H 3400 2800 30 0001 C CNN F 1 "GND" H 3400 2730 30 0001 C CNN F 2 "" H 3400 2800 60 0000 C CNN F 3 "" H 3400 2800 60 0000 C CNN 1 3400 2800 1 0 0 -1 $EndComp $Comp L GND-RESCUE-fmcw2_mcu #PWR19 U 1 1 5641F291 P 3200 2800 F 0 "#PWR19" H 3200 2800 30 0001 C CNN F 1 "GND" H 3200 2730 30 0001 C CNN F 2 "" H 3200 2800 60 0000 C CNN F 3 "" H 3200 2800 60 0000 C CNN 1 3200 2800 1 0 0 -1 $EndComp Wire Wire Line 1550 3550 1500 3550 Wire Wire Line 7600 3600 7650 3600 Wire Wire Line 14150 9750 14100 9750 Wire Wire Line 14150 9550 14100 9550 Wire Wire Line 15000 9750 14950 9750 Wire Wire Line 15000 9350 14950 9350 Wire Wire Line 15000 8750 14950 8750 Wire Wire Line 15000 9150 14950 9150 Wire Wire Line 15000 9250 14950 9250 Connection ~ 1350 1700 Wire Wire Line 1300 1700 1350 1700 Wire Wire Line 1300 1600 1350 1600 Wire Wire Line 14150 9050 14100 9050 Wire Wire Line 14150 8950 14100 8950 Wire Wire Line 14150 8850 14100 8850 Wire Wire Line 14150 8750 14100 8750 Wire Wire Line 14150 8650 14100 8650 Wire Wire Line 14150 8550 14100 8550 Wire Wire Line 14100 8450 14150 8450 Wire Wire Line 14150 8350 14100 8350 Wire Wire Line 3950 5100 4000 5100 Wire Wire Line 3950 5250 3950 5100 Wire Wire Line 3750 5250 3950 5250 Connection ~ 15150 2550 Wire Wire Line 15150 3350 14250 3350 Wire Wire Line 7650 4000 7600 4000 Wire Wire Line 1450 2500 1500 2500 Wire Wire Line 1450 2600 1500 2600 Wire Wire Line 1450 2700 1500 2700 Wire Wire Line 1450 2800 1500 2800 Wire Wire Line 1450 2900 1500 2900 Wire Wire Line 1450 3000 1500 3000 Wire Wire Line 13450 1950 13500 1950 Wire Wire Line 7600 7600 7700 7600 Wire Wire Line 7600 8000 7700 8000 Connection ~ 10150 6250 Wire Wire Line 10200 6250 10150 6250 Connection ~ 8950 6250 Wire Wire Line 8950 6250 9000 6250 Wire Wire Line 9800 6500 9850 6500 Wire Wire Line 10150 6200 10150 6300 Wire Wire Line 8950 6200 8950 6300 Wire Wire Line 10150 5650 10150 5700 Wire Wire Line 8950 5650 8950 5700 Wire Wire Line 8650 6500 8550 6500 Wire Wire Line 8950 6750 8950 6700 Wire Wire Line 10150 6750 10150 6700 Wire Wire Line 12300 3900 12200 3900 Wire Wire Line 12250 3300 11950 3300 Wire Wire Line 11950 3750 11950 3700 Wire Wire Line 12250 3300 12250 3800 Wire Wire Line 12250 3800 12300 3800 Connection ~ 12650 6550 Wire Wire Line 13100 5950 13200 5950 Connection ~ 12650 6700 Wire Wire Line 12700 6700 12650 6700 Wire Wire Line 11550 5850 11500 5850 Wire Wire Line 12650 6550 12650 6800 Wire Wire Line 12600 6550 12700 6550 Connection ~ 12100 6300 Wire Wire Line 12100 6050 12100 6550 Wire Wire Line 12450 6300 12100 6300 Connection ~ 13200 6300 Wire Wire Line 13200 5950 13200 6550 Wire Wire Line 12850 6300 13200 6300 Wire Wire Line 12650 7250 12650 7200 Wire Wire Line 12050 5850 12100 5850 Wire Wire Line 15650 1850 15600 1850 Wire Wire Line 14150 4700 14850 4700 Wire Wire Line 15350 4700 15250 4700 Connection ~ 11450 2650 Wire Wire Line 11450 2900 11450 2650 Wire Wire Line 11700 2900 11450 2900 Connection ~ 12350 2650 Wire Wire Line 12350 2900 12100 2900 Wire Wire Line 13150 4000 13200 4000 Wire Wire Line 13200 3800 13150 3800 Wire Wire Line 13200 3900 13150 3900 Connection ~ 14250 4100 Wire Wire Line 13150 5400 13150 4800 Wire Wire Line 14750 5400 13150 5400 Wire Wire Line 14750 4100 14750 5400 Wire Wire Line 14250 4100 14750 4100 Wire Wire Line 14250 4050 14250 4150 Connection ~ 14250 4700 Wire Wire Line 14250 4700 14250 4650 Wire Wire Line 14250 3350 14250 3550 Wire Wire Line 12700 5150 12700 5100 Wire Wire Line 13150 4600 12700 4600 Wire Wire Line 15150 1850 15200 1850 Wire Wire Line 12850 1900 12800 1900 Connection ~ 14050 1950 Wire Wire Line 14050 2550 14050 1950 Wire Wire Line 12400 1900 12350 1900 Connection ~ 14250 2550 Wire Wire Line 14250 2800 14250 2550 Wire Wire Line 14400 2800 14250 2800 Connection ~ 14900 2550 Wire Wire Line 14900 2800 14900 2550 Wire Wire Line 14800 2800 14900 2800 Wire Wire Line 14850 2550 15150 2550 Wire Wire Line 15150 1850 15150 3350 Wire Wire Line 14000 1950 14150 1950 Wire Wire Line 14050 2550 14350 2550 Wire Wire Line 14050 1200 14050 1150 Wire Wire Line 14050 1750 14050 1700 Wire Wire Line 14150 1750 14050 1750 Wire Wire Line 12350 2650 12150 2650 Wire Wire Line 12350 1900 12350 2900 Connection ~ 11250 2000 Wire Wire Line 11250 2650 11250 2000 Wire Wire Line 11250 2650 11650 2650 Connection ~ 11250 1800 Wire Wire Line 11250 1800 11250 1450 Wire Wire Line 11950 950 11750 950 Wire Wire Line 11950 1400 11950 1350 Wire Wire Line 11750 950 11750 1500 Wire Wire Line 11750 2350 11750 2300 Wire Wire Line 11200 1800 11350 1800 Wire Wire Line 11250 950 11250 850 Wire Wire Line 11200 2000 11350 2000 Wire Wire Line 10600 2000 10700 2000 Wire Wire Line 10700 1800 10600 1800 Wire Wire Line 1500 3650 1550 3650 Wire Wire Line 1500 3450 1550 3450 Wire Wire Line 1500 3350 1550 3350 Wire Wire Line 1500 3250 1550 3250 Wire Wire Line 10750 9950 10750 9900 Wire Wire Line 10550 9950 10550 9900 Connection ~ 10650 9400 Wire Wire Line 10650 9400 10650 9350 Wire Wire Line 10550 9400 10750 9400 Wire Wire Line 10250 8750 10200 8750 Wire Wire Line 5500 2050 6950 2050 Wire Wire Line 5250 1550 6950 1550 Connection ~ 2250 800 Wire Wire Line 2250 800 2250 1000 Wire Wire Line 2350 900 2250 900 Wire Wire Line 4900 1350 4900 1300 Connection ~ 4650 900 Wire Wire Line 10100 8850 10250 8850 Wire Wire Line 10250 9850 10250 9900 Wire Wire Line 9950 9850 9950 9900 Wire Wire Line 9600 9850 9600 9900 Wire Wire Line 10250 9400 10250 9450 Wire Wire Line 9950 9400 9950 9450 Wire Wire Line 9600 9400 9600 9450 Wire Wire Line 9200 9850 9200 9900 Wire Wire Line 9200 9400 9200 9450 Wire Wire Line 10250 8150 10200 8150 Wire Wire Line 10250 8050 10200 8050 Wire Wire Line 10250 7950 10200 7950 Connection ~ 9350 7850 Wire Wire Line 9000 8250 9000 8300 Wire Wire Line 9350 8850 9350 8900 Wire Wire Line 9350 8250 9350 8300 Connection ~ 9600 7850 Connection ~ 9600 8450 Wire Wire Line 1850 10600 1850 10550 Wire Wire Line 1650 10550 1650 10600 Wire Wire Line 1950 800 2350 800 Connection ~ 13550 7400 Wire Wire Line 13300 7400 13300 7500 Wire Wire Line 13300 7950 13300 7900 Wire Wire Line 3350 4300 3300 4300 Wire Wire Line 3900 5050 3850 5050 Wire Wire Line 3900 5000 3900 5050 Wire Wire Line 4000 5000 3900 5000 Wire Wire Line 3300 5050 3350 5050 Wire Wire Line 13300 7400 13750 7400 Wire Wire Line 13550 7500 13550 7400 Wire Wire Line 13550 7900 13550 7950 Wire Wire Line 13750 7400 13750 7500 Wire Wire Line 13750 7900 13750 7950 Wire Wire Line 14950 9050 15000 9050 Wire Wire Line 14150 9250 14100 9250 Wire Wire Line 14100 9350 14150 9350 Wire Wire Line 3950 3600 4000 3600 Wire Wire Line 4000 4000 3950 4000 Wire Wire Line 4000 3900 3950 3900 Wire Wire Line 7600 4500 7650 4500 Wire Wire Line 7600 4400 7650 4400 Wire Wire Line 15550 6550 15550 6450 Wire Wire Line 13800 6450 13800 6550 Wire Wire Line 13800 6000 14150 6000 Wire Wire Line 13800 6050 13800 6000 Wire Wire Line 15550 6000 15300 6000 Wire Wire Line 15550 6050 15550 6000 Connection ~ 3450 900 Wire Wire Line 3450 1250 3450 900 Wire Wire Line 3450 1650 3450 1750 Connection ~ 9100 900 Wire Wire Line 9100 1250 9100 900 Wire Wire Line 9100 1650 9100 1750 Connection ~ 7950 800 Wire Wire Line 7950 800 7950 1000 Wire Wire Line 7950 900 8050 900 Wire Wire Line 7600 1250 7600 1200 Connection ~ 10150 900 Wire Wire Line 10300 1300 10300 1350 Wire Wire Line 10050 900 10500 900 Wire Wire Line 10150 1050 10150 900 Wire Wire Line 9850 1050 10150 1050 Wire Wire Line 9350 1050 9350 1200 Wire Wire Line 9350 1050 9050 1050 Wire Wire Line 9350 1700 9350 1750 Connection ~ 9500 900 Wire Wire Line 9050 900 9550 900 Wire Wire Line 9500 900 9500 800 Wire Wire Line 9100 800 9050 800 Wire Wire Line 7600 800 8050 800 Wire Wire Line 1950 1250 1950 1200 Connection ~ 4500 900 Wire Wire Line 4650 1300 4650 1350 Wire Wire Line 4400 900 4900 900 Wire Wire Line 4500 1050 4500 900 Wire Wire Line 4200 1050 4500 1050 Wire Wire Line 3700 1050 3700 1200 Wire Wire Line 3350 1050 3700 1050 Wire Wire Line 3700 1700 3700 1750 Connection ~ 3850 900 Wire Wire Line 3350 900 3900 900 Wire Wire Line 3850 900 3850 800 Wire Wire Line 3350 800 3450 800 Wire Wire Line 1650 1500 1650 1550 Wire Wire Line 1650 1950 1650 2050 Wire Wire Line 1350 1600 1350 2050 Wire Wire Line 1300 1500 1650 1500 Wire Wire Line 10250 9050 10200 9050 Wire Wire Line 10250 8950 10200 8950 Wire Wire Line 10250 8250 10200 8250 Wire Wire Line 10250 8650 10200 8650 Wire Wire Line 10250 8550 10200 8550 Wire Wire Line 9600 8250 9600 8300 Wire Wire Line 9350 8450 10250 8450 Wire Wire Line 9600 8900 9600 8850 Wire Wire Line 9000 7850 10250 7850 Wire Wire Line 12000 8950 12000 9000 Wire Wire Line 12200 8800 12200 8750 Wire Wire Line 12200 8350 11450 8350 Wire Wire Line 11450 8550 12000 8550 Wire Wire Line 11450 7750 11500 7750 Wire Wire Line 11450 7850 11500 7850 Wire Wire Line 11450 7950 11500 7950 Wire Wire Line 11450 8050 11500 8050 Wire Wire Line 11500 8150 11450 8150 Wire Wire Line 11450 8650 11500 8650 Wire Wire Line 11450 8750 11500 8750 Wire Wire Line 11450 8850 11500 8850 Wire Wire Line 11450 8950 11500 8950 Wire Wire Line 11450 9050 11500 9050 Wire Wire Line 11550 8450 11450 8450 Wire Wire Line 11550 8250 11450 8250 Wire Wire Line 10150 8350 10250 8350 Wire Wire Line 10150 7750 10250 7750 Wire Wire Line 4000 4800 3950 4800 Wire Wire Line 4000 3400 3950 3400 Wire Wire Line 4000 3800 3950 3800 Wire Wire Line 7600 2900 7650 2900 Wire Wire Line 14950 8950 15000 8950 Wire Wire Line 14950 8850 15000 8850 Wire Wire Line 14950 8650 15000 8650 Wire Wire Line 14950 8550 15000 8550 Wire Wire Line 14950 8450 15000 8450 Wire Wire Line 14950 8350 15000 8350 Wire Wire Line 14100 9150 14150 9150 Wire Wire Line 2350 8500 2350 8450 Wire Wire Line 2100 8500 2100 8450 Wire Wire Line 2350 9050 2400 9050 Wire Wire Line 2350 9000 2350 9050 Wire Wire Line 2100 9050 2050 9050 Wire Wire Line 2100 9000 2100 9050 Wire Wire Line 3300 8100 3300 8050 Wire Wire Line 3300 8650 3300 8600 Wire Wire Line 4000 8650 3300 8650 Wire Wire Line 1250 8550 1250 8500 Wire Wire Line 1250 9050 1250 9100 Wire Wire Line 1250 9550 1250 9500 Wire Wire Line 8100 10050 8100 10000 Wire Wire Line 8100 10550 8100 10600 Wire Wire Line 8100 11050 8100 11000 Wire Wire Line 7600 3400 7650 3400 Wire Wire Line 7650 3100 7600 3100 Wire Wire Line 7650 3000 7600 3000 Wire Wire Line 3950 4700 4000 4700 Wire Wire Line 4000 4600 3950 4600 Wire Wire Line 3950 4500 4000 4500 Wire Wire Line 4000 4400 3950 4400 Wire Wire Line 3850 4300 4000 4300 Wire Wire Line 4000 3500 3950 3500 Wire Wire Line 4000 3100 3950 3100 Wire Wire Line 4000 3000 3950 3000 Wire Wire Line 4000 2900 3950 2900 Wire Wire Line 7200 10250 7200 10300 Wire Wire Line 6800 10800 6800 10850 Wire Wire Line 6800 10250 6800 10300 Wire Wire Line 6450 10800 6450 10850 Wire Wire Line 6450 10250 6450 10300 Wire Wire Line 6100 10300 6150 10300 Wire Wire Line 5250 10300 5500 10300 Wire Wire Line 5250 10800 5250 10850 Wire Wire Line 5250 10250 5250 10300 Wire Wire Line 4900 10800 4900 10850 Wire Wire Line 4900 10250 4900 10300 Wire Wire Line 4000 3300 3950 3300 Wire Wire Line 4000 3200 3950 3200 Wire Wire Line 7600 3700 7650 3700 Wire Wire Line 7600 3800 7650 3800 Connection ~ 6450 9850 Wire Wire Line 6450 9850 6450 9900 Wire Wire Line 6400 9850 6400 9800 Wire Wire Line 6400 9850 6500 9850 Wire Wire Line 6500 9850 6500 9800 Wire Wire Line 6350 2300 6350 2400 Wire Bus Line 10750 3100 10750 4300 Wire Bus Line 8250 3100 10750 3100 Wire Bus Line 8250 3100 8250 5000 Wire Wire Line 10450 3350 10150 3350 Wire Wire Line 10150 3350 10150 3900 Wire Wire Line 10450 3750 10450 3800 Wire Wire Line 10100 4200 10650 4200 Wire Wire Line 10100 4100 10650 4100 Wire Wire Line 10100 4000 10650 4000 Wire Wire Line 10150 3900 10100 3900 Wire Wire Line 8350 4100 9050 4100 Wire Wire Line 8350 4000 9050 4000 Wire Wire Line 8350 3900 9050 3900 Wire Wire Line 9050 4200 9050 4250 Wire Wire Line 7600 5100 8150 5100 Wire Wire Line 7600 5000 8150 5000 Wire Wire Line 7600 4900 8150 4900 Wire Wire Line 7600 4800 8150 4800 Wire Wire Line 7600 4700 8150 4700 Wire Wire Line 7600 4600 8150 4600 Wire Wire Line 15000 9450 14950 9450 Wire Wire Line 15000 9550 14950 9550 Wire Wire Line 15000 9650 14950 9650 Wire Wire Line 14100 9450 14150 9450 Wire Wire Line 6950 1550 6950 1600 Wire Wire Line 6950 2050 6950 2000 Wire Wire Line 3300 5300 3300 5250 Wire Wire Line 3300 5800 4000 5800 Wire Wire Line 4000 7900 3900 7900 Wire Wire Line 4000 7800 3900 7800 Wire Wire Line 3250 7100 3300 7100 Wire Wire Line 3800 7100 4000 7100 Wire Wire Line 3450 7850 3450 7900 Connection ~ 3950 7400 Wire Wire Line 3450 7400 3450 7450 Wire Wire Line 3450 7400 4000 7400 Wire Wire Line 3950 7300 3950 7400 Wire Wire Line 4000 7300 3950 7300 Wire Wire Line 4000 7600 3950 7600 Wire Wire Line 4000 7500 3950 7500 Wire Wire Line 2150 7100 2250 7100 Connection ~ 1950 8000 Wire Wire Line 2200 8000 2200 7900 Wire Wire Line 1950 8000 2200 8000 Wire Wire Line 1950 7950 1950 8050 Connection ~ 2200 7400 Wire Wire Line 1950 7400 1950 7450 Wire Wire Line 2200 7400 1950 7400 Wire Wire Line 2200 7300 2200 7500 Wire Wire Line 2150 7300 2200 7300 Wire Wire Line 2150 6050 2150 6000 Wire Wire Line 2150 6450 2150 6500 Wire Wire Line 2150 6800 2250 6800 Wire Wire Line 4000 7200 3950 7200 Wire Wire Line 3950 6900 4000 6900 Wire Wire Line 4000 6800 3950 6800 Wire Wire Line 2750 7000 2850 7000 Wire Wire Line 2750 6900 2850 6900 Wire Wire Line 2150 7000 2250 7000 Wire Wire Line 2150 6900 2250 6900 Wire Wire Line 2150 7200 2300 7200 Wire Wire Line 4000 8150 3950 8150 Wire Wire Line 4000 8050 3950 8050 Wire Wire Line 2100 10350 2050 10350 Wire Wire Line 4000 8550 3950 8550 Connection ~ 5250 2300 Connection ~ 5700 1550 Connection ~ 5500 1550 Wire Wire Line 5700 1550 5700 1600 Wire Wire Line 5500 1550 5500 1600 Connection ~ 5500 2050 Connection ~ 5700 2050 Wire Wire Line 5500 2050 5500 2000 Wire Wire Line 5700 2050 5700 2000 Connection ~ 5550 2300 Connection ~ 5650 2300 Connection ~ 5450 2300 Wire Wire Line 5550 2300 5550 2400 Connection ~ 5350 2300 Wire Wire Line 5450 2300 5450 2400 Wire Wire Line 5350 2300 5350 2400 Wire Wire Line 5250 1550 5250 2400 Connection ~ 5900 1550 Connection ~ 6100 1550 Wire Wire Line 5900 1550 5900 1600 Connection ~ 6300 1550 Wire Wire Line 6100 1550 6100 1600 Connection ~ 6500 1550 Wire Wire Line 6300 1550 6300 1600 Connection ~ 6700 1550 Wire Wire Line 6500 1550 6500 1600 Wire Wire Line 6700 1550 6700 1600 Connection ~ 6700 2050 Connection ~ 6500 2050 Wire Wire Line 6700 2050 6700 2000 Connection ~ 6300 2050 Wire Wire Line 6500 2050 6500 2000 Connection ~ 6100 2050 Wire Wire Line 6300 2050 6300 2000 Connection ~ 5900 2050 Wire Wire Line 6100 2050 6100 2000 Wire Wire Line 5900 2000 5900 2100 Connection ~ 6350 2300 Wire Wire Line 6450 2300 6450 2400 Connection ~ 5750 2300 Wire Wire Line 5750 2300 5750 2400 Connection ~ 5850 2300 Wire Wire Line 5850 2300 5850 2400 Connection ~ 5950 2300 Wire Wire Line 5950 2300 5950 2400 Connection ~ 6050 2300 Wire Wire Line 6050 2300 6050 2400 Connection ~ 6150 2300 Wire Wire Line 6150 2300 6150 2400 Connection ~ 6250 2300 Wire Wire Line 6250 2300 6250 2400 Wire Wire Line 5250 2300 6450 2300 Wire Wire Line 5650 2300 5650 2400 Wire Wire Line 1400 10750 1400 10800 Wire Wire Line 2100 10750 2100 10800 Wire Wire Line 1400 10350 1450 10350 Connection ~ 5750 9850 Wire Wire Line 5650 9850 5650 9800 Connection ~ 5850 9850 Wire Wire Line 5750 9850 5750 9800 Connection ~ 5950 9850 Wire Wire Line 5850 9800 5850 9900 Wire Wire Line 5950 9850 5950 9800 Wire Wire Line 5650 9850 6050 9850 Wire Wire Line 6050 9850 6050 9800 Wire Wire Line 4000 5950 3950 5950 Wire Wire Line 14100 9650 14150 9650 Wire Wire Line 2850 6550 2850 6500 Wire Wire Line 2900 6000 2850 6000 Wire Wire Line 2850 6000 2850 5950 Wire Wire Line 2800 5400 2850 5400 Wire Wire Line 2850 5400 2850 5450 Wire Wire Line 4000 7000 3950 7000 Wire Wire Line 600 4500 1200 4500 Wire Wire Line 1100 4700 1200 4700 Wire Wire Line 1200 4900 1150 4900 Wire Wire Line 2100 5150 2150 5150 Wire Wire Line 2650 5150 2650 4900 Wire Wire Line 1150 4150 1800 4150 Wire Wire Line 1150 4150 1150 4700 Connection ~ 1150 4700 Wire Wire Line 600 4500 600 4700 Wire Wire Line 2650 4150 2650 4700 Wire Wire Line 2650 4150 2200 4150 Connection ~ 2650 4500 Wire Wire Line 2650 4700 2750 4700 Wire Wire Line 7600 3200 7650 3200 Wire Wire Line 1150 5450 1150 5400 Wire Wire Line 13350 9650 13350 9600 Wire Wire Line 13350 9200 13350 9150 Wire Wire Line 4000 6050 3950 6050 Wire Wire Line 1350 1450 1350 1500 Connection ~ 1350 1500 Connection ~ 10300 900 Wire Wire Line 10500 1350 10500 1300 Wire Wire Line 2650 9850 2750 9850 Wire Wire Line 3400 9850 3350 9850 Wire Wire Line 2650 9850 2650 9900 Wire Wire Line 14150 6100 13950 6100 Wire Wire Line 13950 6100 13950 6550 Wire Wire Line 14150 6200 14050 6200 Wire Wire Line 14050 6200 14050 6000 Connection ~ 14050 6000 Wire Wire Line 15300 6200 15300 6300 Wire Wire Line 15300 6700 15300 6750 Wire Wire Line 12750 8650 12750 8700 Wire Wire Line 12750 8200 12750 8250 Wire Wire Line 2750 1450 2950 1450 Wire Wire Line 3350 1000 3350 1050 Wire Wire Line 2250 1000 2350 1000 Connection ~ 2250 900 Wire Wire Line 2750 1350 2750 1450 Wire Wire Line 2850 1350 2850 1450 Connection ~ 2850 1450 Wire Wire Line 2950 1350 2950 1500 Connection ~ 2950 1450 Wire Wire Line 8650 1350 8650 1450 Wire Wire Line 8450 1400 8650 1400 Wire Wire Line 8550 1400 8550 1350 Connection ~ 8650 1400 Wire Wire Line 8450 1400 8450 1350 Connection ~ 8550 1400 Wire Wire Line 7950 1000 8050 1000 Connection ~ 7950 900 Wire Wire Line 9050 1050 9050 1000 Wire Wire Line 2900 2550 2850 2550 Wire Wire Line 3200 2300 3200 2350 Wire Wire Line 4000 3700 3950 3700 Wire Wire Line 3200 2750 3200 2800 Wire Wire Line 3400 2750 3400 2800 Wire Wire Line 3400 2350 3400 2300 Wire Wire Line 3400 2300 3200 2300 $EndSCHEMATC ================================================ FILE: host/CMakeLists.txt ================================================ #top dir cmake project for libhackrf + tools cmake_minimum_required(VERSION 2.8) project (hackrf_all) add_subdirectory(libhackrf) add_subdirectory(hackrf-tools) ######################################################################## # Create uninstall target ######################################################################## configure_file( ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake ) ================================================ FILE: host/COPYING ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ================================================ FILE: host/cmake/cmake_uninstall.cmake.in ================================================ # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) STRING(REGEX REPLACE "\n" ";" files "${files}") FOREACH(file ${files}) MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") IF(EXISTS "$ENV{DESTDIR}${file}") EXEC_PROGRAM( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) IF(NOT "${rm_retval}" STREQUAL 0) MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") ENDIF(NOT "${rm_retval}" STREQUAL 0) ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") EXEC_PROGRAM( "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" OUTPUT_VARIABLE rm_out RETURN_VALUE rm_retval ) IF(NOT "${rm_retval}" STREQUAL 0) MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") ENDIF(NOT "${rm_retval}" STREQUAL 0) ELSE(EXISTS "$ENV{DESTDIR}${file}") MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") ENDIF(EXISTS "$ENV{DESTDIR}${file}") ENDFOREACH(file) ================================================ FILE: host/cmake/modules/FindLIBHACKRF.cmake ================================================ # - Try to find the libhackrf library # Once done this defines # # LIBHACKRF_FOUND - system has libhackrf # LIBHACKRF_INCLUDE_DIR - the libhackrf include directory # LIBHACKRF_LIBRARIES - Link these to use libhackrf # Copyright (c) 2013 Benjamin Vernoux # if (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES) # in cache already set(LIBHACKRF_FOUND TRUE) else (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES) IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) pkg_check_modules(PC_LIBHACKRF QUIET libhackrf) ENDIF(NOT WIN32) FIND_PATH(LIBHACKRF_INCLUDE_DIR NAMES hackrf.h HINTS $ENV{LIBHACKRF_DIR}/include ${PC_LIBHACKRF_INCLUDEDIR} PATHS /usr/local/include/libhackrf /usr/include/libhackrf /usr/local/include /usr/include ${CMAKE_SOURCE_DIR}/../libhackrf/src /opt/local/include/libhackrf ${LIBHACKRF_INCLUDE_DIR} ) set(libhackrf_library_names hackrf) FIND_LIBRARY(LIBHACKRF_LIBRARIES NAMES ${libhackrf_library_names} HINTS $ENV{LIBHACKRF_DIR}/lib ${PC_LIBHACKRF_LIBDIR} PATHS /usr/local/lib /usr/lib /opt/local/lib ${PC_LIBHACKRF_LIBDIR} ${PC_LIBHACKRF_LIBRARY_DIRS} ${CMAKE_SOURCE_DIR}/../libhackrf/src ) if(LIBHACKRF_INCLUDE_DIR) set(CMAKE_REQUIRED_INCLUDES ${LIBHACKRF_INCLUDE_DIR}) endif() if(LIBHACKRF_LIBRARIES) set(CMAKE_REQUIRED_LIBRARIES ${LIBHACKRF_LIBRARIES}) endif() include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBHACKRF DEFAULT_MSG LIBHACKRF_LIBRARIES LIBHACKRF_INCLUDE_DIR) MARK_AS_ADVANCED(LIBHACKRF_INCLUDE_DIR LIBHACKRF_LIBRARIES) endif (LIBHACKRF_INCLUDE_DIR AND LIBHACKRF_LIBRARIES) ================================================ FILE: host/cmake/modules/FindThreads.cmake ================================================ # Updated FindThreads.cmake that supports pthread-win32 # Downloaded from http://www.vtk.org/Bug/bug_view_advanced_page.php?bug_id=6399 # - This module determines the thread library of the system. # # The following variables are set # CMAKE_THREAD_LIBS_INIT - the thread library # CMAKE_USE_SPROC_INIT - are we using sproc? # CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads? # CMAKE_USE_PTHREADS_INIT - are we using pthreads # CMAKE_HP_PTHREADS_INIT - are we using hp pthreads # # If use of pthreads-win32 is desired, the following variables # can be set. # # THREADS_USE_PTHREADS_WIN32 - # Setting this to true searches for the pthreads-win32 # port (since CMake 2.8.0) # # THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME # C = no exceptions (default) # (NOTE: This is the default scheme on most POSIX thread # implementations and what you should probably be using) # CE = C++ Exception Handling # SE = Structure Exception Handling (MSVC only) # (NOTE: Changing this option from the default may affect # the portability of your application. See pthreads-win32 # documentation for more details.) # #====================================================== # Example usage where threading library # is provided by the system: # # find_package(Threads REQUIRED) # add_executable(foo foo.cc) # target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT}) # # Example usage if pthreads-win32 is desired on Windows # or a system provided thread library: # # set(THREADS_USE_PTHREADS_WIN32 true) # find_package(Threads REQUIRED) # include_directories(${THREADS_PTHREADS_INCLUDE_DIR}) # # add_executable(foo foo.cc) # target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT}) # INCLUDE (CheckIncludeFiles) INCLUDE (CheckLibraryExists) SET(Threads_FOUND FALSE) IF(WIN32 AND NOT CYGWIN AND THREADS_USE_PTHREADS_WIN32) SET(_Threads_ptwin32 true) ENDIF() # Do we have sproc? IF(CMAKE_SYSTEM MATCHES IRIX) CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H) ENDIF() IF(CMAKE_HAVE_SPROC_H) # We have sproc SET(CMAKE_USE_SPROC_INIT 1) ELSEIF(_Threads_ptwin32) IF(NOT DEFINED THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME) # Assign the default scheme SET(THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME "C") ELSE() # Validate the scheme specified by the user IF(NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "C" AND NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "CE" AND NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") MESSAGE(FATAL_ERROR "See documentation for FindPthreads.cmake, only C, CE, and SE modes are allowed") ENDIF() IF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") MESSAGE(FATAL_ERROR "Structured Exception Handling is only allowed for MSVC") ENDIF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE") ENDIF() FIND_PATH(THREADS_PTHREADS_INCLUDE_DIR pthread.h) # Determine the library filename IF(MSVC) SET(_Threads_pthreads_libname pthreadV${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2) ELSEIF(MINGW) SET(_Threads_pthreads_libname pthreadG${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2) ELSE() MESSAGE(FATAL_ERROR "This should never happen") ENDIF() # Use the include path to help find the library if possible SET(_Threads_lib_paths "") IF(THREADS_PTHREADS_INCLUDE_DIR) GET_FILENAME_COMPONENT(_Threads_root_dir ${THREADS_PTHREADS_INCLUDE_DIR} PATH) SET(_Threads_lib_paths ${_Threads_root_dir}/lib) ENDIF() FIND_LIBRARY(THREADS_PTHREADS_WIN32_LIBRARY NAMES ${_Threads_pthreads_libname} PATHS ${_Threads_lib_paths} DOC "The Portable Threads Library for Win32" NO_SYSTEM_PATH ) IF(THREADS_PTHREADS_INCLUDE_DIR AND THREADS_PTHREADS_WIN32_LIBRARY) MARK_AS_ADVANCED(THREADS_PTHREADS_INCLUDE_DIR) SET(CMAKE_THREAD_LIBS_INIT ${THREADS_PTHREADS_WIN32_LIBRARY}) SET(CMAKE_HAVE_THREADS_LIBRARY 1) SET(Threads_FOUND TRUE) ENDIF() MARK_AS_ADVANCED(THREADS_PTHREADS_WIN32_LIBRARY) ELSE() # Do we have pthreads? CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H) IF(CMAKE_HAVE_PTHREAD_H) # # We have pthread.h # Let's check for the library now. # SET(CMAKE_HAVE_THREADS_LIBRARY) IF(NOT THREADS_HAVE_PTHREAD_ARG) # Do we have -lpthreads CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) IF(CMAKE_HAVE_PTHREADS_CREATE) SET(CMAKE_THREAD_LIBS_INIT "-lpthreads") SET(CMAKE_HAVE_THREADS_LIBRARY 1) SET(Threads_FOUND TRUE) ENDIF() # Ok, how about -lpthread CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) IF(CMAKE_HAVE_PTHREAD_CREATE) SET(CMAKE_THREAD_LIBS_INIT "-lpthread") SET(Threads_FOUND TRUE) SET(CMAKE_HAVE_THREADS_LIBRARY 1) ENDIF() IF(CMAKE_SYSTEM MATCHES "SunOS.*") # On sun also check for -lthread CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) IF(CMAKE_HAVE_THR_CREATE) SET(CMAKE_THREAD_LIBS_INIT "-lthread") SET(CMAKE_HAVE_THREADS_LIBRARY 1) SET(Threads_FOUND TRUE) ENDIF() ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*") ENDIF(NOT THREADS_HAVE_PTHREAD_ARG) IF(NOT CMAKE_HAVE_THREADS_LIBRARY) # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread IF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") MESSAGE(STATUS "Check if compiler accepts -pthread") TRY_RUN(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG ${CMAKE_BINARY_DIR} ${CMAKE_ROOT}/Modules/CheckForPthreads.c CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread COMPILE_OUTPUT_VARIABLE OUTPUT) IF(THREADS_HAVE_PTHREAD_ARG) IF(THREADS_PTHREAD_ARG MATCHES "^2$") SET(Threads_FOUND TRUE) MESSAGE(STATUS "Check if compiler accepts -pthread - yes") ELSE() MESSAGE(STATUS "Check if compiler accepts -pthread - no") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") ENDIF() ELSE() MESSAGE(STATUS "Check if compiler accepts -pthread - no") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") ENDIF() ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") IF(THREADS_HAVE_PTHREAD_ARG) SET(Threads_FOUND TRUE) SET(CMAKE_THREAD_LIBS_INIT "-pthread") ENDIF() ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY) ENDIF(CMAKE_HAVE_PTHREAD_H) ENDIF() IF(CMAKE_THREAD_LIBS_INIT) SET(CMAKE_USE_PTHREADS_INIT 1) SET(Threads_FOUND TRUE) ENDIF() IF(CMAKE_SYSTEM MATCHES "Windows" AND NOT THREADS_USE_PTHREADS_WIN32) SET(CMAKE_USE_WIN32_THREADS_INIT 1) SET(Threads_FOUND TRUE) ENDIF() IF(CMAKE_USE_PTHREADS_INIT) IF(CMAKE_SYSTEM MATCHES "HP-UX-*") # Use libcma if it exists and can be used. It provides more # symbols than the plain pthread library. CMA threads # have actually been deprecated: # http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395 # http://docs.hp.com/en/947/d8.html # but we need to maintain compatibility here. # The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads # are available. CHECK_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA) IF(CMAKE_HAVE_HP_CMA) SET(CMAKE_THREAD_LIBS_INIT "-lcma") SET(CMAKE_HP_PTHREADS_INIT 1) SET(Threads_FOUND TRUE) ENDIF(CMAKE_HAVE_HP_CMA) SET(CMAKE_USE_PTHREADS_INIT 1) ENDIF() IF(CMAKE_SYSTEM MATCHES "OSF1-V*") SET(CMAKE_USE_PTHREADS_INIT 0) SET(CMAKE_THREAD_LIBS_INIT ) ENDIF() IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*") SET(CMAKE_USE_PTHREADS_INIT 1) SET(Threads_FOUND TRUE) SET(CMAKE_THREAD_LIBS_INIT ) SET(CMAKE_USE_WIN32_THREADS_INIT 0) ENDIF() ENDIF(CMAKE_USE_PTHREADS_INIT) INCLUDE(FindPackageHandleStandardArgs) IF(_Threads_ptwin32) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG THREADS_PTHREADS_WIN32_LIBRARY THREADS_PTHREADS_INCLUDE_DIR) ELSE() FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND) ENDIF() ================================================ FILE: host/cmake/modules/FindUSB1.cmake ================================================ # - Try to find the freetype library # Once done this defines # # LIBUSB_FOUND - system has libusb # LIBUSB_INCLUDE_DIR - the libusb include directory # LIBUSB_LIBRARIES - Link these to use libusb # Copyright (c) 2006, 2008 Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) # in cache already set(LIBUSB_FOUND TRUE) else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) pkg_check_modules(PC_LIBUSB libusb-1.0) ENDIF(NOT WIN32) set(LIBUSB_LIBRARY_NAME usb-1.0) IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(LIBUSB_LIBRARY_NAME usb) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) FIND_LIBRARY(LIBUSB_LIBRARIES NAMES ${LIBUSB_LIBRARY_NAME} PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) endif (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) ================================================ FILE: host/hackrf-tools/CMakeLists.txt ================================================ # Copyright 2012 Jared Boone # Copyright 2013 Benjamin Vernoux # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # # Based heavily upon the libftdi cmake setup. cmake_minimum_required(VERSION 2.8) project(hackrf-tools C) set(MAJOR_VERSION 0) set(MINOR_VERSION 4) set(PACKAGE hackrf-tools) set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) set(VERSION ${VERSION_STRING}) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules) if(MSVC) include_directories(getopt) add_definitions(/D _CRT_SECURE_NO_WARNINGS) else() add_definitions(-Wall) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90") endif() if(NOT libhackrf_SOURCE_DIR) find_package(LIBHACKRF REQUIRED) include_directories(${LIBHACKRF_INCLUDE_DIR}) else() include_directories(${libhackrf_SOURCE_DIR}/src) endif() add_subdirectory(src) ######################################################################## # Create uninstall target ######################################################################## if(NOT hackrf_all_SOURCE_DIR) configure_file( ${PROJECT_SOURCE_DIR}/../cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake ) endif() ================================================ FILE: host/hackrf-tools/Readme.md ================================================ This repository contains hardware designs and software for HackRF, a project to produce a low cost, open source software radio platform. ![Jawbreaker](https://raw.github.com/mossmann/hackrf/master/doc/jawbreaker.jpeg) How to build host software on Windows: prerequisite for cygwin or mingw: * cmake-2.8.10.2 or more see http://www.cmake.org/cmake/resources/software.html * libusbx-1.0.14 or more see http://sourceforge.net/projects/libusbx/files/latest/download?source=files * Install Windows driver for HackRF hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig - If you want to use Zadig select HackRF USB device and just install/replace it with WinUSB driver. * Build libhackrf before to build this library, see host/libhackrf/Readme.md. For Cygwin: cmake -G "Unix Makefiles" -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/ make make install For Mingw: #normal version cmake -G "MSYS Makefiles" -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/ #debug version cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/ make make install How to build host software on Linux: cmake ./ make make install principal author: Michael Ossmann http://greatscottgadgets.com/hackrf/ ================================================ FILE: host/hackrf-tools/getopt/getopt.c ================================================ /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. */ # if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifndef _ # define _(msgid) gettext (msgid) # endif # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if 1 //HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv #ifdef _MSC_VER // DDK will complain if you don't use the stdlib defined getenv #include #else extern char *getenv (); #endif #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (posixly_correct == NULL && argc == __libc_argc && argv == __libc_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } int getopt_long ( int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only ( int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ================================================ FILE: host/hackrf-tools/getopt/getopt.h ================================================ /* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if (defined __STDC__ && __STDC__) || defined __cplusplus # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ ================================================ FILE: host/hackrf-tools/src/CMakeLists.txt ================================================ # Copyright 2012 Jared Boone # Copyright 2013 Benjamin Vernoux # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # # Based heavily upon the libftdi cmake setup. set(INSTALL_DEFAULT_BINDIR "bin" CACHE STRING "Appended to CMAKE_INSTALL_PREFIX") if(MSVC) add_library(libgetopt_static STATIC ../getopt/getopt.c ) endif() add_executable(hackrf_transfer hackrf_transfer.c) install(TARGETS hackrf_transfer RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) add_executable(hackrf_spiflash hackrf_spiflash.c) install(TARGETS hackrf_spiflash RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) add_executable(hackrf_info hackrf_info.c) install(TARGETS hackrf_info RUNTIME DESTINATION ${INSTALL_DEFAULT_BINDIR}) if(NOT libhackrf_SOURCE_DIR) include_directories(${LIBHACKRF_INCLUDE_DIR}) LIST(APPEND TOOLS_LINK_LIBS ${LIBHACKRF_LIBRARIES}) else() LIST(APPEND TOOLS_LINK_LIBS hackrf) endif() if(MSVC) LIST(APPEND TOOLS_LINK_LIBS libgetopt_static) endif() target_link_libraries(hackrf_transfer ${TOOLS_LINK_LIBS}) target_link_libraries(hackrf_spiflash ${TOOLS_LINK_LIBS}) target_link_libraries(hackrf_info ${TOOLS_LINK_LIBS}) ================================================ FILE: host/hackrf-tools/src/hackrf_info.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * Copyright 2013 Michael Ossmann * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include int main(int argc, char** argv) { int result = HACKRF_SUCCESS; uint8_t board_id = BOARD_ID_INVALID; char version[255 + 1]; read_partid_serialno_t read_partid_serialno; hackrf_device_list_t *list; int i; result = hackrf_init(); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_init() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } list = hackrf_device_list(); if (list->devicecount < 1 ) { printf("No HackRF boards found.\n"); return EXIT_FAILURE; } for (i = 0; i < list->devicecount; i++) { if (i > 0) printf("\n"); printf("Found HackRF board %d:\n", i); if (list->serial_numbers[i]) printf("USB descriptor string: %s\n", list->serial_numbers[i]); hackrf_device* device = NULL; result = hackrf_device_list_open(list, i, &device); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_open() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } result = hackrf_board_id_read(device, &board_id); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_board_id_read() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } printf("Board ID Number: %d (%s)\n", board_id, hackrf_board_id_name(board_id)); result = hackrf_version_string_read(device, &version[0], 255); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_version_string_read() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } printf("Firmware Version: %s\n", version); result = hackrf_board_partid_serialno_read(device, &read_partid_serialno); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_board_partid_serialno_read() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } printf("Part ID Number: 0x%08x 0x%08x\n", read_partid_serialno.part_id[0], read_partid_serialno.part_id[1]); printf("Serial Number: 0x%08x 0x%08x 0x%08x 0x%08x\n", read_partid_serialno.serial_no[0], read_partid_serialno.serial_no[1], read_partid_serialno.serial_no[2], read_partid_serialno.serial_no[3]); result = hackrf_close(device); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_close() failed: %s (%d)\n", hackrf_error_name(result), result); } } hackrf_device_list_free(list); hackrf_exit(); return EXIT_SUCCESS; } ================================================ FILE: host/hackrf-tools/src/hackrf_spiflash.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013 Benjamin Vernoux * Copyright 2013 Michael Ossmann * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #ifndef bool typedef int bool; #define true 1 #define false 0 #endif #ifdef _MSC_VER #ifdef _WIN64 typedef int64_t ssize_t; #else typedef int32_t ssize_t; #endif #endif /* 8 Mbit flash */ #define MAX_LENGTH 0x100000 static struct option long_options[] = { { "address", required_argument, 0, 'a' }, { "length", required_argument, 0, 'l' }, { "read", required_argument, 0, 'r' }, { "write", required_argument, 0, 'w' }, { "verbose", no_argument, 0, 'v' }, { 0, 0, 0, 0 }, }; int parse_u32(char* s, uint32_t* const value) { char* s_end; uint_fast8_t base = 10; uint32_t u32_value; if (strlen(s) > 2) { if (s[0] == '0') { if ((s[1] == 'x') || (s[1] == 'X')) { base = 16; s += 2; } else if ((s[1] == 'b') || (s[1] == 'B')) { base = 2; s += 2; } } } s_end = s; u32_value = strtoul(s, &s_end, base); if ((s != s_end) && (*s_end == 0)) { *value = u32_value; return HACKRF_SUCCESS; } else { return HACKRF_ERROR_INVALID_PARAM; } } static void usage() { printf("Usage:\n"); printf("\t-a, --address : starting address (default: 0)\n"); printf("\t-l, --length : number of bytes to read (default: 0)\n"); printf("\t-r : Read data into file.\n"); printf("\t-w : Write data from file.\n"); printf("\t-d : Serial number of device, if multiple devices\n"); printf("\t-v: Verbose output.\n"); } int main(int argc, char** argv) { int opt; uint32_t address = 0; uint32_t length = 0; uint32_t tmp_length; uint16_t xfer_len = 0; const char* path = NULL; const char* serial_number = NULL; hackrf_device* device = NULL; int result = HACKRF_SUCCESS; int option_index = 0; static uint8_t data[MAX_LENGTH]; uint8_t* pdata = &data[0]; FILE* fd = NULL; bool read = false; bool write = false; bool verbose = false; while ((opt = getopt_long(argc, argv, "a:l:r:w:d:v", long_options, &option_index)) != EOF) { switch (opt) { case 'a': result = parse_u32(optarg, &address); break; case 'l': result = parse_u32(optarg, &length); break; case 'r': read = true; path = optarg; break; case 'w': write = true; path = optarg; break; case 'd': serial_number = optarg; break; case 'v': verbose = true; break; default: fprintf(stderr, "opt error: %d\n", opt); usage(); return EXIT_FAILURE; } if (result != HACKRF_SUCCESS) { fprintf(stderr, "argument error: %s (%d)\n", hackrf_error_name(result), result); usage(); return EXIT_FAILURE; } } if (write == read) { if (write == true) { fprintf(stderr, "Read and write options are mutually exclusive.\n"); } else { fprintf(stderr, "Specify either read or write option.\n"); } usage(); return EXIT_FAILURE; } if (path == NULL) { fprintf(stderr, "Specify a path to a file.\n"); usage(); return EXIT_FAILURE; } if( write ) { fd = fopen(path, "rb"); if(fd == NULL) { printf("Error to open file %s\n", path); return EXIT_FAILURE; } /* Get size of the file */ fseek(fd, 0, SEEK_END); /* Not really portable but work on major OS Linux/Win32 */ length = ftell(fd); /* Move to start */ rewind(fd); printf("File size %d bytes.\n", length); } if (length == 0) { fprintf(stderr, "Requested transfer of zero bytes.\n"); if(fd != NULL) fclose(fd); usage(); return EXIT_FAILURE; } if ((length > MAX_LENGTH) || (address > MAX_LENGTH) || ((address + length) > MAX_LENGTH)) { fprintf(stderr, "Request exceeds size of flash memory.\n"); if(fd != NULL) fclose(fd); usage(); return EXIT_FAILURE; } if (read) { fd = fopen(path, "wb"); if(fd == NULL) { printf("Error to open file %s\n", path); return EXIT_FAILURE; } } if (fd == NULL) { fprintf(stderr, "Failed to open file: %s\n", path); return EXIT_FAILURE; } result = hackrf_init(); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_init() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } result = hackrf_open_by_serial(serial_number, &device); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_open() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } if (read) { ssize_t bytes_written; tmp_length = length; while (tmp_length) { xfer_len = (tmp_length > 256) ? 256 : tmp_length; if( verbose ) printf("Reading %d bytes from 0x%06x.\n", xfer_len, address); result = hackrf_spiflash_read(device, address, xfer_len, pdata); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_spiflash_read() failed: %s (%d)\n", hackrf_error_name(result), result); fclose(fd); fd = NULL; return EXIT_FAILURE; } address += xfer_len; pdata += xfer_len; tmp_length -= xfer_len; } bytes_written = fwrite(data, 1, length, fd); if (bytes_written != length) { fprintf(stderr, "Failed write to file (wrote %d bytes).\n", (int)bytes_written); fclose(fd); fd = NULL; return EXIT_FAILURE; } } else { ssize_t bytes_read = fread(data, 1, length, fd); if (bytes_read != length) { fprintf(stderr, "Failed read file (read %d bytes).\n", (int)bytes_read); fclose(fd); fd = NULL; return EXIT_FAILURE; } printf("Erasing SPI flash.\n"); result = hackrf_spiflash_erase(device); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_spiflash_erase() failed: %s (%d)\n", hackrf_error_name(result), result); fclose(fd); fd = NULL; return EXIT_FAILURE; } if( !verbose ) printf("Writing %d bytes at 0x%06x.\n", length, address); while (length) { xfer_len = (length > 256) ? 256 : length; if( verbose ) printf("Writing %d bytes at 0x%06x.\n", xfer_len, address); result = hackrf_spiflash_write(device, address, xfer_len, pdata); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_spiflash_write() failed: %s (%d)\n", hackrf_error_name(result), result); fclose(fd); fd = NULL; return EXIT_FAILURE; } address += xfer_len; pdata += xfer_len; length -= xfer_len; } } result = hackrf_close(device); if (result != HACKRF_SUCCESS) { fprintf(stderr, "hackrf_close() failed: %s (%d)\n", hackrf_error_name(result), result); fclose(fd); fd = NULL; return EXIT_FAILURE; } hackrf_exit(); if (fd != NULL) { fclose(fd); } return EXIT_SUCCESS; } ================================================ FILE: host/hackrf-tools/src/hackrf_transfer.c ================================================ /* * Copyright 2012 Jared Boone * Copyright 2013-2014 Benjamin Vernoux * * This file is part of HackRF. * * 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 2, 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; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include #include #include #include #include #ifndef bool typedef int bool; #define true 1 #define false 0 #endif #ifdef _WIN32 #include #ifdef _MSC_VER #ifdef _WIN64 typedef int64_t ssize_t; #else typedef int32_t ssize_t; #endif #define strtoull _strtoui64 #define snprintf _snprintf int gettimeofday(struct timeval *tv, void* ignored) { FILETIME ft; unsigned __int64 tmp = 0; if (NULL != tv) { GetSystemTimeAsFileTime(&ft); tmp |= ft.dwHighDateTime; tmp <<= 32; tmp |= ft.dwLowDateTime; tmp /= 10; tmp -= 11644473600000000Ui64; tv->tv_sec = (long)(tmp / 1000000UL); tv->tv_usec = (long)(tmp % 1000000UL); } return 0; } #endif #endif #if defined(__GNUC__) #include #include #endif #include #define FILE_VERSION (1) #define FD_BUFFER_SIZE (8*1024) #define FREQ_ONE_MHZ (1000000ull) #define WRITE_BUFFER_SIZE (50*1024*1024) volatile static char fwrite_buffer[WRITE_BUFFER_SIZE]; volatile static int fb_start = 0, fb_end = 0; pthread_mutex_t buf_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t writer_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; #if defined _WIN32 #define sleep(a) Sleep( (a*1000) ) #endif static int buf_add(const uint8_t *s, int l) { //Add l bytes to buffer, //returns number of bytes left over int left = l; int fb = fb_end; int start = fb_start; while ( left > 0 ) { int fb_next = (fb + 1); if (fb_next >= WRITE_BUFFER_SIZE) { fb_next -= WRITE_BUFFER_SIZE; } if (fb_next == start) { //Reached end, acquire mutex and check if reader has made more room start = fb_start; //No more room, abort if (fb_next == start) { return left; } } fwrite_buffer[fb] = s[l-left]; fb = fb_next; left--; } fb_end = fb; return left; } static int buf_size(void) { int bytes = fb_end - fb_start; if (bytes < 0) { bytes += WRITE_BUFFER_SIZE; } return bytes; } static int buf_get(uint8_t *dest, int max_bytes) { //Get max_bytes bytes from the buffer //Returns number of bytes read //pthread_mutex_lock(&buf_mutex); int bytes = fb_end - fb_start; if (bytes < 0) { bytes += WRITE_BUFFER_SIZE; } if (bytes > max_bytes) { bytes = max_bytes; } int i = 0; while ( bytes > 0) { dest[i++] = fwrite_buffer[fb_start]; fb_start = (fb_start + 1) % WRITE_BUFFER_SIZE; bytes--; } return i; } static int buf_init(void) { int ret = 0; ret = pthread_cond_init(&cond, NULL); if (ret != 0) { return ret; } ret = pthread_mutex_init(&buf_mutex, NULL); if (ret != 0) { pthread_cond_destroy(&cond); return ret; } ret = pthread_mutex_init(&writer_mutex, NULL); if (ret != 0) { pthread_cond_destroy(&cond); pthread_mutex_destroy(&buf_mutex); return ret; } return 0; } static float TimevalDiff(const struct timeval *a, const struct timeval *b) { return (a->tv_sec - b->tv_sec) + 1e-6f * (a->tv_usec - b->tv_usec); } int parse_u64(char* s, uint64_t* const value) { uint_fast8_t base = 10; char* s_end; uint64_t u64_value; if( strlen(s) > 2 ) { if( s[0] == '0' ) { if( (s[1] == 'x') || (s[1] == 'X') ) { base = 16; s += 2; } else if( (s[1] == 'b') || (s[1] == 'B') ) { base = 2; s += 2; } } } s_end = s; u64_value = strtoull(s, &s_end, base); if( (s != s_end) && (*s_end == 0) ) { *value = u64_value; return HACKRF_SUCCESS; } else { return HACKRF_ERROR_INVALID_PARAM; } } int parse_u32(char* s, uint32_t* const value) { uint_fast8_t base = 10; char* s_end; uint64_t ulong_value; if( strlen(s) > 2 ) { if( s[0] == '0' ) { if( (s[1] == 'x') || (s[1] == 'X') ) { base = 16; s += 2; } else if( (s[1] == 'b') || (s[1] == 'B') ) { base = 2; s += 2; } } } s_end = s; ulong_value = strtoul(s, &s_end, base); if( (s != s_end) && (*s_end == 0) ) { *value = (uint32_t)ulong_value; return HACKRF_SUCCESS; } else { return HACKRF_ERROR_INVALID_PARAM; } } volatile bool do_exit = false; FILE* fd = NULL; volatile uint32_t byte_count = 0; bool limit_num_samples = false; size_t bytes_to_xfer = 0; struct timeval time_start; struct timeval t_start; volatile int thread_exit = 0; volatile int thread_done = 0; static void write_header(FILE *fd, double sample_rate, double f0, double bw, double tsweep, int delay, int flags) { char magic[] = "FMCW"; int version = FILE_VERSION; //magic, version, header size, sample_rate, f0, bw, tsweep, delay, flags int header_length = 4+4+4+ 8+8+8+8+4+4; fwrite(magic, 1, 4, fd); fwrite(&version, 4, 1, fd); fwrite(&header_length, 4, 1, fd); fwrite(&sample_rate, 8, 1, fd); fwrite(&f0, 8, 1, fd); fwrite(&bw, 8, 1, fd); fwrite(&tsweep, 8, 1, fd); fwrite(&delay, 4, 1, fd); fwrite(&flags, 4, 1, fd); } static void* write_thread(void* arg) { uint8_t *fd_buf = malloc(WRITE_BUFFER_SIZE); if (!fd_buf) { printf("malloc failed\n"); return 0; } int bytes_to_write; FILE *fout = (FILE*)arg; int wrote; while( !thread_exit ) { pthread_mutex_lock(&writer_mutex); //Wait until we get something to write while ( !(bytes_to_write = buf_get(fd_buf, WRITE_BUFFER_SIZE)) ) { pthread_cond_wait(&cond, &writer_mutex); if (thread_exit) { break; } } pthread_mutex_unlock(&writer_mutex); int written = 0; wrote = 0; while (written < bytes_to_write) { wrote = fwrite(&fd_buf[written], 1, bytes_to_write - wrote, fout); written += wrote; } } thread_done = 1; pthread_exit(NULL); return 0; } int rx_callback(hackrf_transfer* transfer) { size_t bytes_to_write; if( fd != NULL ) { ssize_t bytes_left; byte_count += transfer->valid_length; bytes_to_write = transfer->valid_length; if (limit_num_samples) { if (bytes_to_write >= bytes_to_xfer) { bytes_to_write = bytes_to_xfer; } bytes_to_xfer -= bytes_to_write; } while ( (bytes_left = buf_add(transfer->buffer, bytes_to_write)) ) { printf("Buffer full\n"); } //Signal to writer pthread_mutex_lock(&writer_mutex); pthread_cond_signal(&cond); pthread_mutex_unlock(&writer_mutex); if ((bytes_left != 0) || (limit_num_samples && (bytes_to_xfer == 0))) { return -1; } else { return 0; } } else { return -1; } } static void usage() { printf("Usage:\n"); printf("\t-r # Receive data into file.\n"); printf("\t[-f freq_hz] # Sweep start frequency in Hz.\n"); printf("\t[-b freq_hz] # Sweep bandwidth in Hz.\n"); printf("\t[-t seconds] # Sweep length in seconds\n"); printf("\t[-g 0<=x<=63] # MCP4022 gain setting.\n"); printf("\t[-c x] # ADC clock divider. ADC clock = 204e6/(2*x).\n"); printf("\t[-d clks] # Sweep delay in refernce clock cycles (Default 30 MHz)\n"); } static hackrf_device* device = NULL; #ifdef _MSC_VER BOOL WINAPI sighandler(int signum) { if (CTRL_C_EVENT == signum) { fprintf(stdout, "Caught signal %d\n", signum); do_exit = true; return TRUE; } return FALSE; } #else void sigint_callback_handler(int signum) { fprintf(stdout, "Caught signal %d\n", signum); do_exit = true; } #endif #define PATH_FILE_MAX_LEN (FILENAME_MAX) #define DATE_TIME_MAX_LEN (32) int main(int argc, char** argv) { int opt; const char* path = NULL; int result; int exit_code = EXIT_SUCCESS; struct timeval t_end; float time_diff; /* Default parameters */ double f0 = 5.6e9; double bw = 200e6; double tsweep = 1.0e-3; int delay = 1800; int mcp_gain = 0; int clk_divider = 20; while( (opt = getopt(argc, argv, "b:d:f:t:r:g:c:")) != EOF ) { result = HACKRF_SUCCESS; switch( opt ) { case 'r': path = optarg; break; case 'b': bw = atof(optarg); if (bw <= 0) { result = HACKRF_ERROR_INVALID_PARAM; } break; case 'f': f0 = atof(optarg); if (f0 <= 0) { result = HACKRF_ERROR_INVALID_PARAM; } break; case 't': tsweep = atof(optarg); if (tsweep < 0) { result = HACKRF_ERROR_INVALID_PARAM; } break; case 'd': delay = (int)strtol(optarg, (char **)NULL, 10); if (delay < 0) { result = HACKRF_ERROR_INVALID_PARAM; } break; case 'g': mcp_gain = (int)strtol(optarg, (char **)NULL, 10); if (mcp_gain < 0 || mcp_gain > 63) { result = HACKRF_ERROR_INVALID_PARAM; } break; case 'c': clk_divider = (int)strtol(optarg, (char **)NULL, 10); if (clk_divider <= 0) { result = HACKRF_ERROR_INVALID_PARAM; } break; default: printf("unknown argument '-%c %s'\n", opt, optarg); usage(); return EXIT_FAILURE; } if( result != HACKRF_SUCCESS ) { printf("argument error: '-%c %s' %s (%d)\n", opt, optarg, hackrf_error_name(result), result); usage(); return EXIT_FAILURE; } } if( path == NULL) { printf("No filename given"); usage(); return EXIT_FAILURE; } //Create thread for writing to file if (buf_init()) { printf("buf_init failed\n"); return -1; } result = hackrf_init(); if( result != HACKRF_SUCCESS ) { printf("hackrf_init() failed: %s (%d)\n", hackrf_error_name(result), result); usage(); return EXIT_FAILURE; } result = hackrf_open_by_serial(NULL, &device); if( result != HACKRF_SUCCESS ) { printf("hackrf_open() failed: %s (%d)\n", hackrf_error_name(result), result); usage(); return EXIT_FAILURE; } fd = fopen(path, "wb"); if( fd == NULL ) { printf("Failed to open file: %s\n", path); return EXIT_FAILURE; } /* Change fd buffer to have bigger one to store or read data on/to HDD */ result = setvbuf(fd , NULL , _IOFBF , FD_BUFFER_SIZE); if( result != 0 ) { printf("setvbuf() failed: %d\n", result); usage(); return EXIT_FAILURE; } pthread_t writer; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (pthread_create(&writer, &attr, write_thread, fd)) { printf("pthread_create failed\n"); return -1; } #ifdef _MSC_VER SetConsoleCtrlHandler( (PHANDLER_ROUTINE) sighandler, TRUE ); #else signal(SIGINT, &sigint_callback_handler); signal(SIGILL, &sigint_callback_handler); signal(SIGFPE, &sigint_callback_handler); signal(SIGSEGV, &sigint_callback_handler); signal(SIGTERM, &sigint_callback_handler); signal(SIGABRT, &sigint_callback_handler); #endif result = hackrf_set_mcp(device, mcp_gain); if( result != HACKRF_SUCCESS ) { printf("hackrf_set_mcp() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } result = hackrf_set_sweep(device, f0, bw, tsweep, delay); if( result != HACKRF_SUCCESS ) { printf("hackrf_set_sweep() failed: %s (%d)\n", hackrf_error_name(result), result); return EXIT_FAILURE; } double sample_rate = 204e6/(2*clk_divider); result = hackrf_set_clock_divider(device, clk_divider); write_header(fd, sample_rate, f0, bw, tsweep, delay, 0); result = hackrf_start_rx(device, rx_callback, NULL); if( result != HACKRF_SUCCESS ) { printf("hackrf_start_rx() failed: %s (%d)\n", hackrf_error_name(result), result); usage(); return EXIT_FAILURE; } gettimeofday(&t_start, NULL); gettimeofday(&time_start, NULL); printf("Stop with Ctrl-C\n"); while( (hackrf_is_streaming(device) == HACKRF_TRUE) && (do_exit == false) ) { uint32_t byte_count_now; struct timeval time_now; float time_difference, rate; sleep(1); gettimeofday(&time_now, NULL); byte_count_now = byte_count; byte_count = 0; time_difference = TimevalDiff(&time_now, &time_start); rate = (float)byte_count_now / time_difference; printf("%4.1f MiB / %5.3f sec = %4.1f MiB/second\n", (byte_count_now / 1e6f), time_difference, (rate / 1e6f) ); time_start = time_now; if (byte_count_now == 0) { exit_code = EXIT_FAILURE; printf("\nCouldn't transfer any bytes for one second.\n"); break; } } result = hackrf_is_streaming(device); if (do_exit) { printf("\nUser cancel, exiting...\n"); } else { printf("\nExiting... hackrf_is_streaming() result: %s (%d)\n", hackrf_error_name(result), result); } gettimeofday(&t_end, NULL); time_diff = TimevalDiff(&t_end, &t_start); printf("Total time: %5.5f s\n", time_diff); if(device != NULL) { result = hackrf_stop_rx(device); if( result != HACKRF_SUCCESS ) { printf("hackrf_stop_rx() failed: %s (%d)\n", hackrf_error_name(result), result); }else { printf("hackrf_stop_rx() done\n"); } result = hackrf_close(device); if( result != HACKRF_SUCCESS ) { printf("hackrf_close() failed: %s (%d)\n", hackrf_error_name(result), result); }else { printf("hackrf_close() done\n"); } hackrf_exit(); printf("hackrf_exit() done\n"); } while ( buf_size() != 0 ) { sleep(1); } while ( !thread_done ) { thread_exit = 1; pthread_mutex_lock(&writer_mutex); pthread_cond_signal(&cond); pthread_mutex_unlock(&writer_mutex); } if(fd != NULL) { fclose(fd); fd = NULL; printf("fclose(fd) done\n"); } printf("exit\n"); return exit_code; } ================================================ FILE: host/libhackrf/53-hackrf.rules ================================================ ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="plugdev" ================================================ FILE: host/libhackrf/53-hackrf.rules.in ================================================ # HackRF Jawbreaker ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="@HACKRF_GROUP@" # HackRF One ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="@HACKRF_GROUP@" # HackRF One ATTR{idVendor}=="1d50", ATTR{idProduct}=="CC15", SYMLINK+="rad1o-%k", MODE="660", GROUP="@HACKRF_GROUP@" # HackRF DFU ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="@HACKRF_GROUP@" ================================================ FILE: host/libhackrf/CMakeLists.txt ================================================ # Copyright 2012 Jared Boone # Copyright 2013 Benjamin Vernoux # # This file is part of HackRF. # # 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 2, 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; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # # Based heavily upon the libftdi cmake setup. cmake_minimum_required(VERSION 2.8) project(libhackrf C) set(MAJOR_VERSION 0) set(MINOR_VERSION 4) set(PACKAGE libhackrf) set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}) set(VERSION ${VERSION_STRING}) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../cmake/modules) if(MSVC) set(THREADS_USE_PTHREADS_WIN32 true) else() add_definitions(-Wall) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90") INCLUDE(TestBigEndian) TEST_BIG_ENDIAN(BIGENDIAN) if(${BIGENDIAN}) add_definitions(-DHACKRF_BIG_ENDIAN) endif(${BIGENDIAN}) endif() find_package(USB1 REQUIRED) find_package(Threads REQUIRED) include_directories(${LIBUSB_INCLUDE_DIR} ${THREADS_PTHREADS_INCLUDE_DIR}) add_subdirectory(src) ######################################################################## # Create Pkg Config File ######################################################################## FOREACH(inc ${LIBUSB_INCLUDE_DIR}) LIST(APPEND HACKRF_PC_CFLAGS "-I${inc}") ENDFOREACH(inc) # use space-separation format for the pc file STRING(REPLACE ";" " " HACKRF_PC_CFLAGS "${HACKRF_PC_CFLAGS}") STRING(REPLACE ";" " " HACKRF_PC_LIBS "${HACKRF_PC_LIBS}") # unset these vars to avoid hard-coded paths to cross environment IF(CMAKE_CROSSCOMPILING) UNSET(HACKRF_PC_CFLAGS) UNSET(HACKRF_PC_LIBS) ENDIF(CMAKE_CROSSCOMPILING) set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix \${prefix}) set(libdir \${exec_prefix}/lib${LIB_SUFFIX}) set(includedir \${prefix}/include) set(libpkgdata lib${LIB_SUFFIX}) if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") set(libpkgdata "libdata") endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/libhackrf.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libhackrf.pc @ONLY) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libhackrf.pc DESTINATION ${libpkgdata}/pkgconfig ) ######################################################################## # Create Pkg Config File ######################################################################## if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") SET(SYSTEM_IS_LINUX TRUE) SET(UDEV_OPTION_DEFAULT ON) else() SET(SYSTEM_IS_LINUX FALSE) SET(UDEV_OPTION_DEFAULT OFF) endif() option(INSTALL_UDEV_RULES "Install udev rules for the HackRF" ${UDEV_OPTION_DEFAULT} ) set(UDEV_RULES_PATH "/etc/udev/rules.d" CACHE STRING "Target directory for udev rule installation. Ensure you have permissions to write to this directory." ) if(SYSTEM_IS_LINUX) if(INSTALL_UDEV_RULES) if(NOT DEFINED UDEV_RULES_GROUP) foreach(group usb plugdev) execute_process(COMMAND "getent" group "${group}" RESULT_VARIABLE _GETENT_RESULT OUTPUT_QUIET ERROR_QUIET) if(NOT _GETENT_RESULT) message(STATUS "Setting udev rule group to - ${group}") set(UDEV_RULES_GROUP ${group}) break() endif(NOT _GETENT_RESULT) endforeach(group) endif(NOT DEFINED UDEV_RULES_GROUP) if(DEFINED UDEV_RULES_GROUP) set(HACKRF_GROUP "${UDEV_RULES_GROUP}" CACHE STRING "Group to associate HackRF devices with in udev rules") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/53-hackrf.rules.in ${CMAKE_CURRENT_BINARY_DIR}/53-hackrf.rules @ONLY ) message(STATUS "HackRF udev rules will be installed to '${UDEV_RULES_PATH}' upon running 'make install'") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/53-hackrf.rules DESTINATION ${UDEV_RULES_PATH} COMPONENT "udev_rules") else(UDEV_RULES_GROUP) message(STATUS "HackRF udev rules will not be installed because no suitable group was found") message(STATUS "A group can be specified with -DUDEV_RULES_GROUP=") endif(DEFINED UDEV_RULES_GROUP) else(INSTALL_UDEV_RULES) message(STATUS "HackRF udev rules will not be installed because INSTALL_UDEV_RULES=OFF" ) endif(INSTALL_UDEV_RULES) else(SYSTEM_IS_LINUX) if(INSTALL_UDEV_RULES) message(STATUS "udev rules not supported on this platform. Hide this message via -DINSTALL_UDEV_RULES=Off") endif(INSTALL_UDEV_RULES) endif(SYSTEM_IS_LINUX) ######################################################################## # Create uninstall target ######################################################################## if(NOT hackrf_all_SOURCE_DIR) configure_file( ${PROJECT_SOURCE_DIR}/../cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) add_custom_target(uninstall ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake ) endif() ================================================ FILE: host/libhackrf/libhackrf.pc.in ================================================ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: HackRF Library Description: C Utility Library Version: @VERSION@ Cflags: -I${includedir}/ @HACKRF_PC_CFLAGS@ Libs: -L${libdir} -lhackrf Libs.private: @HACKRF_PC_LIBS@ ================================================ FILE: host/libhackrf/src/CMakeLists.txt ================================================ # # Copyright (c) 2012, Jared Boone # Copyright (c) 2013, Benjamin Vernoux # Copyright (c) 2013, Michael Ossmann # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. # 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. # Neither the name of Great Scott Gadgets 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. # # Based heavily upon the libftdi cmake setup. # Targets set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/hackrf.c CACHE INTERNAL "List of C sources") set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/hackrf.h CACHE INTERNAL "List of C headers") # Dynamic library add_library(hackrf SHARED ${c_sources}) set_target_properties(hackrf PROPERTIES VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.0 SOVERSION 0) # Static library add_library(hackrf-static STATIC ${c_sources}) if(MSVC) set_target_properties(hackrf-static PROPERTIES OUTPUT_NAME "hackrf_static") else() set_target_properties(hackrf-static PROPERTIES OUTPUT_NAME "hackrf") endif() set_target_properties(hackrf PROPERTIES CLEAN_DIRECT_OUTPUT 1) set_target_properties(hackrf-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) # Dependencies target_link_libraries(hackrf ${LIBUSB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} m) # For cygwin just force UNIX OFF and WIN32 ON if( ${CYGWIN} ) SET(UNIX OFF) SET(WIN32 ON) endif( ${CYGWIN} ) if( ${UNIX} ) install(TARGETS hackrf LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT sharedlibs ) install(TARGETS hackrf-static ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT staticlibs ) install(FILES ${c_headers} DESTINATION include/${PROJECT_NAME} COMPONENT headers ) endif( ${UNIX} ) if( ${WIN32} ) install(TARGETS hackrf DESTINATION bin COMPONENT sharedlibs ) install(TARGETS hackrf-static DESTINATION bin COMPONENT staticlibs ) install(FILES ${c_headers} DESTINATION include/${PROJECT_NAME} COMPONENT headers ) endif( ${WIN32} ) ================================================ FILE: host/libhackrf/src/hackrf.c ================================================ /* Copyright (c) 2012, Jared Boone Copyright (c) 2013, Benjamin Vernoux Copyright (c) 2013, Michael Ossmann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. Neither the name of Great Scott Gadgets nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "hackrf.h" #include #include #include #include #include #ifndef bool typedef int bool; #define true 1 #define false 0 #endif //ADF4158 reference oscillator frequency #define FPD_FREQ 30000000 #ifdef HACKRF_BIG_ENDIAN #define TO_LE(x) __builtin_bswap32(x) #define TO_LE64(x) __builtin_bswap64(x) #else #define TO_LE(x) x #define TO_LE64(x) x #endif #define GPIO_ADF (1 << 0) #define GPIO_ADC (1 << 1) #define GPIO_PA (1 << 2) #define GPIO_MIXER (1 << 3) #define GPIO_LED (1 << 4) // TODO: Factor this into a shared #include so that firmware can use // the same values. typedef enum { HACKRF_VENDOR_REQUEST_SET_TRANSCEIVER_MODE = 1, HACKRF_VENDOR_REQUEST_ADF4158_WRITE = 2, HACKRF_VENDOR_REQUEST_ADF4158READ = 3, HACKRF_VENDOR_REQUEST_SET_GPIO = 4, HACKRF_VENDOR_REQUEST_CLEAR_GPIO = 5, HACKRF_VENDOR_REQUEST_SET_MCP = 6, HACKRF_VENDOR_REQUEST_SET_CLOCK = 7, HACKRF_VENDOR_REQUEST_SPIFLASH_ERASE = 10, HACKRF_VENDOR_REQUEST_SPIFLASH_WRITE = 11, HACKRF_VENDOR_REQUEST_SPIFLASH_READ = 12, HACKRF_VENDOR_REQUEST_BOARD_ID_READ = 14, HACKRF_VENDOR_REQUEST_VERSION_STRING_READ = 15, HACKRF_VENDOR_REQUEST_BOARD_PARTID_SERIALNO_READ = 18, } hackrf_vendor_request; typedef enum { USB_CONFIG_STANDARD = 0x1, USB_CONFIG_CPLD_UPDATE = 0x2, } hackrf_usb_configurations; typedef enum { HACKRF_TRANSCEIVER_MODE_OFF = 0, HACKRF_TRANSCEIVER_MODE_RECEIVE = 1, HACKRF_TRANSCEIVER_MODE_TRANSMIT = 2, } hackrf_transceiver_mode; struct hackrf_device { libusb_device_handle* usb_device; struct libusb_transfer** transfers; hackrf_sample_block_cb_fn callback; volatile bool transfer_thread_started; /* volatile shared between threads (read only) */ pthread_t transfer_thread; uint32_t transfer_count; uint32_t buffer_size; volatile bool streaming; /* volatile shared between threads (read only) */ void* rx_ctx; void* tx_ctx; }; typedef struct { uint32_t bandwidth_hz; } max2837_ft_t; static const max2837_ft_t max2837_ft[] = { { 1750000 }, { 2500000 }, { 3500000 }, { 5000000 }, { 5500000 }, { 6000000 }, { 7000000 }, { 8000000 }, { 9000000 }, { 10000000 }, { 12000000 }, { 14000000 }, { 15000000 }, { 20000000 }, { 24000000 }, { 28000000 }, { 0 } }; typedef struct { char *name; int reg; int bit; int len; } adf_reg; const static adf_reg adf4158_regs[] = { { "frac_msb", 0, 3, 12 }, { "n", 0, 15, 12 }, { "muxout", 0, 27, 4 }, { "ramp_on", 0, 31, 1 }, { "frac_lsb", 1, 15, 13 }, { "reserved1", 1, 3, 12 }, { "reserved0", 1, 28, 4 }, { "r_counter", 2, 15, 5 }, { "csr_en", 2, 28, 1 }, { "rdiv2", 2, 21, 1 }, { "prescaler", 2, 22, 1 }, { "reference_doubler", 2, 20, 1 }, { "cp_current", 2, 24, 4 }, { "clk1_divider", 2, 3, 12 }, { "reserved3", 2, 23, 1 }, { "reserved2", 2, 29, 3 }, { "power_down", 3, 5, 1 }, { "psk_enable", 3, 9, 1 }, { "fsk_enable", 3, 8, 1 }, { "sd_reset", 3, 14, 1 }, { "counter_reset", 3, 3, 1 }, { "reserved5", 3, 12, 2 }, { "reserved4", 3, 16, 16 }, { "ramp_mode", 3, 10, 2 }, { "n_sel", 3, 15, 1 }, { "cp_3state", 3, 4, 1 }, { "lpd", 3, 7, 1 }, { "pd_polarity", 3, 6, 1 }, { "neg_bleed_current", 4, 23, 2 }, { "clk_div_mode", 4, 19, 2 }, { "clk2_divider", 4, 7, 12 }, { "sd_mod_mode", 4, 26, 5 }, { "reserved7", 4, 3, 4 }, { "reserved6", 4, 25, 1 }, { "lf_sel", 4, 31, 1 }, { "readback_to_muxout", 4, 21, 2 }, { "fsk_ramp_en", 5, 25, 1 }, { "tx_ramp_clk", 5, 29, 1 }, { "dev_offset", 5, 19, 4 }, { "par_ramp", 5, 28, 1 }, { "reserved8", 5, 30, 2 }, { "dev_sel", 5, 23, 1 }, { "interrupt", 5, 26, 2 }, { "ramp2_en", 5, 24, 1 }, { "deviation", 5, 3, 16 }, { "step", 6, 3, 20 }, { "reserved9", 6, 24, 8 }, { "step_sel", 6, 23, 1 }, { "reserved10", 7, 19, 13 }, { "ramp_del", 7, 17, 1 }, { "ramp_del_fl", 7, 18, 1 }, { "del_start_en", 7, 15, 1 }, { "delay_start_divider", 7, 3, 12 }, { "del_clk_sel", 7, 16, 1 }, { "", 0, 0, 0} }; static int hackrf_adf4158_reg_to_device(hackrf_device* device, unsigned int reg); static uint32_t adf4158[8] = {0}; volatile bool do_exit = false; static const uint16_t hackrf_usb_vid = 0x1d50; static const uint16_t hackrf_jawbreaker_usb_pid = 0x604b; static const uint16_t hackrf_one_usb_pid = 0x6099; static const uint16_t rad1o_usb_pid = 0xcc15; static libusb_context* g_libusb_context = NULL; static void request_exit(void) { do_exit = true; } static int cancel_transfers(hackrf_device* device) { uint32_t transfer_index; if( device->transfers != NULL ) { for(transfer_index=0; transfer_indextransfer_count; transfer_index++) { if( device->transfers[transfer_index] != NULL ) { libusb_cancel_transfer(device->transfers[transfer_index]); } } return HACKRF_SUCCESS; } else { return HACKRF_ERROR_OTHER; } } static int free_transfers(hackrf_device* device) { uint32_t transfer_index; if( device->transfers != NULL ) { // libusb_close() should free all transfers referenced from this array. for(transfer_index=0; transfer_indextransfer_count; transfer_index++) { if( device->transfers[transfer_index] != NULL ) { libusb_free_transfer(device->transfers[transfer_index]); device->transfers[transfer_index] = NULL; } } free(device->transfers); device->transfers = NULL; } return HACKRF_SUCCESS; } static int allocate_transfers(hackrf_device* const device) { if( device->transfers == NULL ) { uint32_t transfer_index; device->transfers = (struct libusb_transfer**) calloc(device->transfer_count, sizeof(struct libusb_transfer)); if( device->transfers == NULL ) { return HACKRF_ERROR_NO_MEM; } for(transfer_index=0; transfer_indextransfer_count; transfer_index++) { device->transfers[transfer_index] = libusb_alloc_transfer(0); if( device->transfers[transfer_index] == NULL ) { return HACKRF_ERROR_LIBUSB; } libusb_fill_bulk_transfer( device->transfers[transfer_index], device->usb_device, 0, (unsigned char*)malloc(device->buffer_size), device->buffer_size, NULL, device, 0 ); if( device->transfers[transfer_index]->buffer == NULL ) { return HACKRF_ERROR_NO_MEM; } } return HACKRF_SUCCESS; } else { return HACKRF_ERROR_BUSY; } } static int prepare_transfers( hackrf_device* device, const uint_fast8_t endpoint_address, libusb_transfer_cb_fn callback) { int error; uint32_t transfer_index; if( device->transfers != NULL ) { for(transfer_index=0; transfer_indextransfer_count; transfer_index++) { device->transfers[transfer_index]->endpoint = endpoint_address; device->transfers[transfer_index]->callback = callback; error = libusb_submit_transfer(device->transfers[transfer_index]); if( error != 0 ) { return HACKRF_ERROR_LIBUSB; } } return HACKRF_SUCCESS; } else { // This shouldn't happen. return HACKRF_ERROR_OTHER; } } static int detach_kernel_drivers(libusb_device_handle* usb_device_handle) { int i, num_interfaces, result; libusb_device* dev; struct libusb_config_descriptor* config; dev = libusb_get_device(usb_device_handle); result = libusb_get_active_config_descriptor(dev, &config); if( result < 0 ) { return HACKRF_ERROR_LIBUSB; } num_interfaces = config->bNumInterfaces; libusb_free_config_descriptor(config); for(i=0; i #include hackrf_device_list_t* ADDCALL hackrf_device_list() { ssize_t i; libusb_device_handle* usb_device = NULL; hackrf_device_list_t* list = calloc(1, sizeof(*list)); if ( list == NULL ) return NULL; list->usb_devicecount = libusb_get_device_list(g_libusb_context, (libusb_device ***)&list->usb_devices); list->serial_numbers = calloc(list->usb_devicecount, sizeof(void *)); list->usb_board_ids = calloc(list->usb_devicecount, sizeof(enum hackrf_usb_board_id)); list->usb_device_index = calloc(list->usb_devicecount, sizeof(int)); if ( list->serial_numbers == NULL || list->usb_board_ids == NULL || list->usb_device_index == NULL) { hackrf_device_list_free(list); return NULL; } for (i=0; iusb_devicecount; i++) { struct libusb_device_descriptor device_descriptor; libusb_get_device_descriptor(list->usb_devices[i], &device_descriptor); if( device_descriptor.idVendor == hackrf_usb_vid ) { if((device_descriptor.idProduct == hackrf_one_usb_pid) || (device_descriptor.idProduct == hackrf_jawbreaker_usb_pid) || (device_descriptor.idProduct == rad1o_usb_pid)) { int idx = list->devicecount++; list->usb_board_ids[idx] = device_descriptor.idProduct; list->usb_device_index[idx] = i; const uint_fast8_t serial_descriptor_index = device_descriptor.iSerialNumber; if( serial_descriptor_index > 0 ) { if( libusb_open(list->usb_devices[i], &usb_device) != 0 ) { usb_device = NULL; continue; } char serial_number[64]; const int serial_number_length = libusb_get_string_descriptor_ascii(usb_device, serial_descriptor_index, (unsigned char*)serial_number, sizeof(serial_number)); if( serial_number_length == 32 ) { serial_number[32] = 0; list->serial_numbers[idx] = strdup(serial_number); } libusb_close(usb_device); usb_device = NULL; } } } } return list; } void ADDCALL hackrf_device_list_free(hackrf_device_list_t *list) { int i; libusb_free_device_list((libusb_device **)list->usb_devices, 1); for (i = 0; i < list->devicecount; i++) { if (list->serial_numbers[i]) free(list->serial_numbers[i]); } free(list->serial_numbers); free(list->usb_board_ids); free(list->usb_device_index); free(list); } libusb_device_handle* hackrf_open_usb(const char* const desired_serial_number) { libusb_device_handle* usb_device = NULL; libusb_device** devices = NULL; const ssize_t list_length = libusb_get_device_list(g_libusb_context, &devices); int match_len = 0; ssize_t i; printf("Number of USB devices: %ld\n", list_length); if( desired_serial_number ) { /* If a shorter serial number is specified, only match against the suffix. * Should probably complain if the match is not unique, currently doesn't. */ match_len = strlen(desired_serial_number); if ( match_len > 32 ) return NULL; } for (i=0; i 0 ) { if( libusb_open(devices[i], &usb_device) != 0 ) { usb_device = NULL; continue; } char serial_number[64]; const int serial_number_length = libusb_get_string_descriptor_ascii(usb_device, serial_descriptor_index, (unsigned char*)serial_number, sizeof(serial_number)); if( serial_number_length == 32 ) { serial_number[32] = 0; printf(" %s", serial_number); if( strncmp(serial_number + 32-match_len, desired_serial_number, match_len) == 0 ) { printf(" match\n"); break; } else { printf(" skip\n"); libusb_close(usb_device); usb_device = NULL; } } else { printf(" wrong length of serial number: %d\n", serial_number_length); libusb_close(usb_device); usb_device = NULL; } } } else { printf(" default\n"); libusb_open(devices[i], &usb_device); break; } } } } libusb_free_device_list(devices, 1); return usb_device; } static int hackrf_open_setup(libusb_device_handle* usb_device, hackrf_device** device) { int result; hackrf_device* lib_device; //int speed = libusb_get_device_speed(usb_device); // TODO: Error or warning if not high speed USB? result = set_hackrf_configuration(usb_device, USB_CONFIG_STANDARD); if( result != LIBUSB_SUCCESS ) { libusb_close(usb_device); return result; } result = libusb_claim_interface(usb_device, 0); if( result != LIBUSB_SUCCESS ) { libusb_close(usb_device); return HACKRF_ERROR_LIBUSB; } lib_device = NULL; lib_device = (hackrf_device*)malloc(sizeof(*lib_device)); if( lib_device == NULL ) { libusb_release_interface(usb_device, 0); libusb_close(usb_device); return HACKRF_ERROR_NO_MEM; } lib_device->usb_device = usb_device; lib_device->transfers = NULL; lib_device->callback = NULL; lib_device->transfer_thread_started = false; /* lib_device->transfer_count = 1024; lib_device->buffer_size = 16384; */ lib_device->transfer_count = 4*4; lib_device->buffer_size = 262144; /* 1048576; */ lib_device->streaming = false; do_exit = false; result = allocate_transfers(lib_device); if( result != 0 ) { free(lib_device); libusb_release_interface(usb_device, 0); libusb_close(usb_device); return HACKRF_ERROR_NO_MEM; } *device = lib_device; return HACKRF_SUCCESS; } int ADDCALL hackrf_open(hackrf_device** device) { libusb_device_handle* usb_device; if( device == NULL ) { return HACKRF_ERROR_INVALID_PARAM; } usb_device = libusb_open_device_with_vid_pid(g_libusb_context, hackrf_usb_vid, hackrf_one_usb_pid); if( usb_device == NULL ) { usb_device = libusb_open_device_with_vid_pid(g_libusb_context, hackrf_usb_vid, hackrf_jawbreaker_usb_pid); } if( usb_device == NULL ) { usb_device = libusb_open_device_with_vid_pid(g_libusb_context, hackrf_usb_vid, rad1o_usb_pid); } if( usb_device == NULL ) { return HACKRF_ERROR_NOT_FOUND; } return hackrf_open_setup(usb_device, device); } int ADDCALL hackrf_open_by_serial(const char* const desired_serial_number, hackrf_device** device) { libusb_device_handle* usb_device; if( desired_serial_number == NULL ) { return hackrf_open(device); } if( device == NULL ) { return HACKRF_ERROR_INVALID_PARAM; } usb_device = hackrf_open_usb(desired_serial_number); if( usb_device == NULL ) { return HACKRF_ERROR_NOT_FOUND; } return hackrf_open_setup(usb_device, device); } int ADDCALL hackrf_device_list_open(hackrf_device_list_t *list, int idx, hackrf_device** device) { libusb_device_handle* usb_device; if( device == NULL || list == NULL || idx < 0 || idx >= list->devicecount ) { return HACKRF_ERROR_INVALID_PARAM; } int i = list->usb_device_index[idx]; if( libusb_open(list->usb_devices[i], &usb_device) != 0 ) { usb_device = NULL; return HACKRF_ERROR_LIBUSB; } return hackrf_open_setup(usb_device, device); } int ADDCALL hackrf_set_transceiver_mode(hackrf_device* device, hackrf_transceiver_mode value) { int result; result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SET_TRANSCEIVER_MODE, value, 0, NULL, 0, 0 ); if( result != 0 ) { return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; } } int ADDCALL hackrf_set_sweep(hackrf_device* device, double fstart, double bw, double length, int delay) { unsigned int res = 0; unsigned int n = fstart/FPD_FREQ; unsigned int frac_msb = ((fstart/FPD_FREQ) -n)*(1 <<12); unsigned int frac_lsb = ((((fstart/FPD_FREQ) -n)*(1 << 12))-frac_msb)*(1 <<13); res = hackrf_set_adf4158_reg("n", n); res |= hackrf_set_adf4158_reg("frac_msb", frac_msb); res |= hackrf_set_adf4158_reg("frac_lsb", frac_lsb); printf("n: %d\n", n); printf("frac_msb: %d\n", frac_msb); printf("frac_lsb: %d\n", frac_lsb); if (res) { return -1; } unsigned int clk1 = (FPD_FREQ*length/(1<<20))+1; res |= hackrf_set_adf4158_reg("clk1_divider", clk1); res |= hackrf_set_adf4158_reg("clk2_divider", 1); if (res) { return -1; } unsigned int steps = FPD_FREQ*length/clk1; unsigned int devmax = 1 << 15; double fres = ((double)FPD_FREQ)/(1 << 25); double fdev = bw/steps; int dev_offset = (int)ceil(log2(fdev/(fres*devmax))); if (dev_offset < 0) { dev_offset = 0; } unsigned int dev = fdev/(fres*(1 << dev_offset)); res |= hackrf_set_adf4158_reg("deviation", dev); printf("fres: %f\n", fres); printf("fdev: %f\n", fdev); printf("dev_offset: %d\n", dev_offset); printf("deviation: %d\n", dev); res |= hackrf_set_adf4158_reg("step", steps); res |= hackrf_set_adf4158_reg("dev_offset", dev_offset); res |= hackrf_set_adf4158_reg("clk_div_mode", 3); //Ramp clock divider res |= hackrf_set_adf4158_reg("ramp_on", 1); //Enable ramp res |= hackrf_set_adf4158_reg("pd_polarity", 1); res |= hackrf_set_adf4158_reg("prescaler", 1); res |= hackrf_set_adf4158_reg("r_counter", 1); res |= hackrf_set_adf4158_reg("csr_en", 1); // Readback to muxout and negative bleed current // can't be activated simultaneously if (1) { //Muxout control to readback to muxout res |= hackrf_set_adf4158_reg("muxout", 15); //res |= hackrf_set_adf4158_reg("neg_bleed_current", 0); res |= hackrf_set_adf4158_reg("readback_to_muxout", 3); } else { res |= hackrf_set_adf4158_reg("neg_bleed_current", 3); } res |= hackrf_set_adf4158_reg("ramp_mode", 0); //Sawtooth if (delay > 0) { res |= hackrf_set_adf4158_reg("ramp_del_fl", 1); res |= hackrf_set_adf4158_reg("ramp_del", 1); res |= hackrf_set_adf4158_reg("delay_start_divider", delay); } if (res) { return res; } return hackrf_adf4158_to_device(device); } int ADDCALL hackrf_set_adf4158_reg(char *name, unsigned int value) { unsigned int i = 0; while (adf4158_regs[i].name[0]) { if (strcmp(name, adf4158_regs[i].name) == 0) { unsigned int reg = adf4158_regs[i].reg; unsigned int bit = adf4158_regs[i].bit; unsigned int len = adf4158_regs[i].len; adf4158[reg] &= ~((((1 << len)-1)) << bit); adf4158[reg] |= value << bit; return 0; } i++; } return -1; } static int hackrf_adf4158_reg_to_device(hackrf_device* device, unsigned int reg) { int result; if (reg > 7) { return -1; } result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_ADF4158_WRITE, adf4158[reg]>>16, (adf4158[reg] & 0xFFF8) | reg, NULL, 0, 0 ); return result; } int ADDCALL hackrf_adf4158_to_device(hackrf_device* device) { int reg; int i; for(i=7;i>=0;i--) { printf("%d: %u\n", i, adf4158[i]); } if( hackrf_adf4158_reg_to_device(device, 7) != 0 ) { return HACKRF_ERROR_LIBUSB; } hackrf_set_adf4158_reg("step_sel", 0); if( hackrf_adf4158_reg_to_device(device, 6) != 0 ) { return HACKRF_ERROR_LIBUSB; } hackrf_set_adf4158_reg("step_sel", 1); if( hackrf_adf4158_reg_to_device(device, 6) != 0 ) { return HACKRF_ERROR_LIBUSB; } hackrf_set_adf4158_reg("dev_sel", 0); if( hackrf_adf4158_reg_to_device(device, 5) != 0 ) { return HACKRF_ERROR_LIBUSB; } hackrf_set_adf4158_reg("dev_sel", 1); if( hackrf_adf4158_reg_to_device(device, 5) != 0 ) { return HACKRF_ERROR_LIBUSB; } for(reg=4;reg>=0;reg--) { if( hackrf_adf4158_reg_to_device(device, reg) != 0 ) { return HACKRF_ERROR_LIBUSB; } } return HACKRF_SUCCESS; } int ADDCALL hackrf_set_gpio(hackrf_device *device, uint32_t bits) { int result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SET_GPIO, bits >> 16, bits & 0xFFFF, NULL, 0, 0 ); return result; } int ADDCALL hackrf_clear_gpio(hackrf_device *device, uint32_t bits) { int result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_CLEAR_GPIO, bits >> 16, bits & 0xFFFF, NULL, 0, 0 ); return result; } //Set ADC clock divider //ADC clock = 204/(2*divider) MHz int ADDCALL hackrf_set_clock_divider(hackrf_device *device, uint16_t divider) { int result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SET_CLOCK, divider, 0x5555, NULL, 0, 0 ); return result; } int ADDCALL hackrf_spiflash_erase(hackrf_device* device) { int result; result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SPIFLASH_ERASE, 0, 0, NULL, 0, 0 ); if (result != 0) { return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; } } int ADDCALL hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* const data) { int result; if (address > 0x0FFFFF) { return HACKRF_ERROR_INVALID_PARAM; } result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SPIFLASH_WRITE, address >> 16, address & 0xFFFF, data, length, 0 ); if (result < length) { return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; } } int ADDCALL hackrf_spiflash_read(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* data) { int result; if (address > 0x0FFFFF) { return HACKRF_ERROR_INVALID_PARAM; } result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SPIFLASH_READ, address >> 16, address & 0xFFFF, data, length, 0 ); if (result < length) { return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; } } int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value) { int result; result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_BOARD_ID_READ, 0, 0, value, 1, 0 ); if (result < 1) { return HACKRF_ERROR_LIBUSB; } else { return HACKRF_SUCCESS; } } int ADDCALL hackrf_version_string_read(hackrf_device* device, char* version, uint8_t length) { int result; result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_VERSION_STRING_READ, 0, 0, (unsigned char*)version, length, 0 ); if (result < 0) { return HACKRF_ERROR_LIBUSB; } else { version[result] = '\0'; return HACKRF_SUCCESS; } } int ADDCALL hackrf_board_partid_serialno_read(hackrf_device* device, read_partid_serialno_t* read_partid_serialno) { uint8_t length; int result; length = sizeof(read_partid_serialno_t); result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_BOARD_PARTID_SERIALNO_READ, 0, 0, (unsigned char*)read_partid_serialno, length, 0 ); if (result < length) { return HACKRF_ERROR_LIBUSB; } else { read_partid_serialno->part_id[0] = TO_LE(read_partid_serialno->part_id[0]); read_partid_serialno->part_id[1] = TO_LE(read_partid_serialno->part_id[1]); read_partid_serialno->serial_no[0] = TO_LE(read_partid_serialno->serial_no[0]); read_partid_serialno->serial_no[1] = TO_LE(read_partid_serialno->serial_no[1]); read_partid_serialno->serial_no[2] = TO_LE(read_partid_serialno->serial_no[2]); read_partid_serialno->serial_no[3] = TO_LE(read_partid_serialno->serial_no[3]); return HACKRF_SUCCESS; } } int ADDCALL hackrf_set_mcp(hackrf_device* device, uint32_t value) { int result; if( value > 63 ) { return HACKRF_ERROR_INVALID_PARAM; } result = libusb_control_transfer( device->usb_device, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE, HACKRF_VENDOR_REQUEST_SET_MCP, 0, value, NULL, 0, 0 ); if( result != 0 ) { return HACKRF_ERROR_INVALID_PARAM; } else { return HACKRF_SUCCESS; } } static void* transfer_threadproc(void* arg) { hackrf_device* device = (hackrf_device*)arg; int error; struct timeval timeout = { 0, 500000 }; while( (device->streaming) && (do_exit == false) ) { error = libusb_handle_events_timeout(g_libusb_context, &timeout); if( (error != 0) && (error != LIBUSB_ERROR_INTERRUPTED) ) { device->streaming = false; } } return NULL; } static void hackrf_libusb_transfer_callback(struct libusb_transfer* usb_transfer) { hackrf_device* device = (hackrf_device*)usb_transfer->user_data; if(usb_transfer->status == LIBUSB_TRANSFER_COMPLETED) { hackrf_transfer transfer = { transfer.device = device, transfer.buffer = usb_transfer->buffer, transfer.buffer_length = usb_transfer->length, transfer.valid_length = usb_transfer->actual_length, transfer.rx_ctx = device->rx_ctx, transfer.tx_ctx = device->tx_ctx }; if( device->callback(&transfer) == 0 ) { if( libusb_submit_transfer(usb_transfer) < 0) { request_exit(); }else { return; } }else { request_exit(); } } else { /* Other cases LIBUSB_TRANSFER_NO_DEVICE LIBUSB_TRANSFER_ERROR, LIBUSB_TRANSFER_TIMED_OUT LIBUSB_TRANSFER_STALL, LIBUSB_TRANSFER_OVERFLOW LIBUSB_TRANSFER_CANCELLED ... */ request_exit(); /* Fatal error stop transfer */ } } static int kill_transfer_thread(hackrf_device* device) { void* value; int result; request_exit(); if( device->transfer_thread_started != false ) { value = NULL; result = pthread_join(device->transfer_thread, &value); if( result != 0 ) { return HACKRF_ERROR_THREAD; } device->transfer_thread_started = false; /* Cancel all transfers */ cancel_transfers(device); } return HACKRF_SUCCESS; } static int create_transfer_thread(hackrf_device* device, const uint8_t endpoint_address, hackrf_sample_block_cb_fn callback) { int result; if( device->transfer_thread_started == false ) { device->streaming = false; result = prepare_transfers( device, endpoint_address, (libusb_transfer_cb_fn)hackrf_libusb_transfer_callback ); if( result != HACKRF_SUCCESS ) { return result; } device->streaming = true; device->callback = callback; result = pthread_create(&device->transfer_thread, 0, transfer_threadproc, device); if( result == 0 ) { device->transfer_thread_started = true; }else { return HACKRF_ERROR_THREAD; } } else { return HACKRF_ERROR_BUSY; } return HACKRF_SUCCESS; } int ADDCALL hackrf_is_streaming(hackrf_device* device) { /* return hackrf is streaming only when streaming, transfer_thread_started are true and do_exit equal false */ if( (device->transfer_thread_started == true) && (device->streaming == true) && (do_exit == false) ) { return HACKRF_TRUE; } else { if(device->transfer_thread_started == false) { return HACKRF_ERROR_STREAMING_THREAD_ERR; } if(device->streaming == false) { return HACKRF_ERROR_STREAMING_STOPPED; } return HACKRF_ERROR_STREAMING_EXIT_CALLED; } } int ADDCALL hackrf_start_rx(hackrf_device* device, hackrf_sample_block_cb_fn callback, void* rx_ctx) { int result; const uint8_t endpoint_address = LIBUSB_ENDPOINT_IN | 1; result = hackrf_set_gpio(device, GPIO_PA|GPIO_MIXER|GPIO_ADF|GPIO_ADC); if( result != HACKRF_SUCCESS ) { return result; } result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_RECEIVE); if( result == HACKRF_SUCCESS ) { device->rx_ctx = rx_ctx; result = create_transfer_thread(device, endpoint_address, callback); } return result; } int ADDCALL hackrf_stop_rx(hackrf_device* device) { int result; result = hackrf_clear_gpio(device, GPIO_PA|GPIO_MIXER|GPIO_ADF|GPIO_ADC); result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF); if (result != HACKRF_SUCCESS) { return result; } return kill_transfer_thread(device); } int ADDCALL hackrf_close(hackrf_device* device) { int result1; result1 = HACKRF_SUCCESS; if( device != NULL ) { result1 = hackrf_stop_rx(device); if( device->usb_device != NULL ) { libusb_release_interface(device->usb_device, 0); libusb_close(device->usb_device); device->usb_device = NULL; } free_transfers(device); free(device); } return result1; } const char* ADDCALL hackrf_error_name(enum hackrf_error errcode) { switch(errcode) { case HACKRF_SUCCESS: return "HACKRF_SUCCESS"; case HACKRF_TRUE: return "HACKRF_TRUE"; case HACKRF_ERROR_INVALID_PARAM: return "HACKRF_ERROR_INVALID_PARAM"; case HACKRF_ERROR_NOT_FOUND: return "HACKRF_ERROR_NOT_FOUND"; case HACKRF_ERROR_BUSY: return "HACKRF_ERROR_BUSY"; case HACKRF_ERROR_NO_MEM: return "HACKRF_ERROR_NO_MEM"; case HACKRF_ERROR_LIBUSB: return "HACKRF_ERROR_LIBUSB"; case HACKRF_ERROR_THREAD: return "HACKRF_ERROR_THREAD"; case HACKRF_ERROR_STREAMING_THREAD_ERR: return "HACKRF_ERROR_STREAMING_THREAD_ERR"; case HACKRF_ERROR_STREAMING_STOPPED: return "HACKRF_ERROR_STREAMING_STOPPED"; case HACKRF_ERROR_STREAMING_EXIT_CALLED: return "HACKRF_ERROR_STREAMING_EXIT_CALLED"; case HACKRF_ERROR_OTHER: return "HACKRF_ERROR_OTHER"; default: return "HACKRF unknown error"; } } const char* ADDCALL hackrf_board_id_name(enum hackrf_board_id board_id) { switch(board_id) { case BOARD_ID_JELLYBEAN: return "Jellybean"; case BOARD_ID_JAWBREAKER: return "Jawbreaker"; case BOARD_ID_HACKRF_ONE: return "HackRF One"; case BOARD_ID_INVALID: return "Invalid Board ID"; default: return "Unknown Board ID"; } } extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id) { switch(usb_board_id) { case USB_BOARD_ID_JAWBREAKER: return "Jawbreaker"; case USB_BOARD_ID_HACKRF_ONE: return "HackRF One"; case USB_BOARD_ID_INVALID: return "Invalid Board ID"; default: return "Unknown Board ID"; } } const char* ADDCALL hackrf_filter_path_name(const enum rf_path_filter path) { switch(path) { case RF_PATH_FILTER_BYPASS: return "mixer bypass"; case RF_PATH_FILTER_LOW_PASS: return "low pass filter"; case RF_PATH_FILTER_HIGH_PASS: return "high pass filter"; default: return "invalid filter path"; } } #ifdef __cplusplus } // __cplusplus defined. #endif ================================================ FILE: host/libhackrf/src/hackrf.h ================================================ /* Copyright (c) 2012, Jared Boone Copyright (c) 2013, Benjamin Vernoux Copyright (c) 2013, Michael Ossmann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. Neither the name of Great Scott Gadgets nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __HACKRF_H__ #define __HACKRF_H__ #include #ifdef _WIN32 #define ADD_EXPORTS /* You should define ADD_EXPORTS *only* when building the DLL. */ #ifdef ADD_EXPORTS #define ADDAPI __declspec(dllexport) #else #define ADDAPI __declspec(dllimport) #endif /* Define calling convention in one place, for convenience. */ #define ADDCALL __cdecl #else /* _WIN32 not defined. */ /* Define with no value on non-Windows OSes. */ #define ADDAPI #define ADDCALL #endif enum hackrf_error { HACKRF_SUCCESS = 0, HACKRF_TRUE = 1, HACKRF_ERROR_INVALID_PARAM = -2, HACKRF_ERROR_NOT_FOUND = -5, HACKRF_ERROR_BUSY = -6, HACKRF_ERROR_NO_MEM = -11, HACKRF_ERROR_LIBUSB = -1000, HACKRF_ERROR_THREAD = -1001, HACKRF_ERROR_STREAMING_THREAD_ERR = -1002, HACKRF_ERROR_STREAMING_STOPPED = -1003, HACKRF_ERROR_STREAMING_EXIT_CALLED = -1004, HACKRF_ERROR_OTHER = -9999, }; enum hackrf_board_id { BOARD_ID_JELLYBEAN = 0, BOARD_ID_JAWBREAKER = 1, BOARD_ID_HACKRF_ONE = 2, BOARD_ID_INVALID = 0xFF, }; enum hackrf_usb_board_id { USB_BOARD_ID_JAWBREAKER = 0x604B, USB_BOARD_ID_HACKRF_ONE = 0x6099, USB_BOARD_ID_RAD1O = 0xCC15, USB_BOARD_ID_INVALID = 0xFFFF, }; enum rf_path_filter { RF_PATH_FILTER_BYPASS = 0, RF_PATH_FILTER_LOW_PASS = 1, RF_PATH_FILTER_HIGH_PASS = 2, }; typedef enum { TRANSCEIVER_MODE_OFF = 0, TRANSCEIVER_MODE_RX = 1, TRANSCEIVER_MODE_TX = 2, TRANSCEIVER_MODE_SS = 3, TRANSCEIVER_MODE_CPLD_UPDATE = 4 } transceiver_mode_t; typedef struct hackrf_device hackrf_device; typedef struct { hackrf_device* device; uint8_t* buffer; int buffer_length; int valid_length; void* rx_ctx; void* tx_ctx; } hackrf_transfer; typedef struct { uint32_t part_id[2]; uint32_t serial_no[4]; } read_partid_serialno_t; struct hackrf_device_list { char **serial_numbers; enum hackrf_usb_board_id *usb_board_ids; int *usb_device_index; int devicecount; void **usb_devices; int usb_devicecount; }; typedef struct hackrf_device_list hackrf_device_list_t; typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer); #ifdef __cplusplus extern "C" { #endif extern ADDAPI int ADDCALL hackrf_init(); extern ADDAPI int ADDCALL hackrf_exit(); extern ADDAPI hackrf_device_list_t* ADDCALL hackrf_device_list(); extern ADDAPI int ADDCALL hackrf_device_list_open(hackrf_device_list_t *list, int idx, hackrf_device** device); extern ADDAPI void ADDCALL hackrf_device_list_free(hackrf_device_list_t *list); extern ADDAPI int ADDCALL hackrf_open(hackrf_device** device); extern ADDAPI int ADDCALL hackrf_open_by_serial(const char* const desired_serial_number, hackrf_device** device); extern ADDAPI int ADDCALL hackrf_close(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_start_rx(hackrf_device* device, hackrf_sample_block_cb_fn callback, void* rx_ctx); extern ADDAPI int ADDCALL hackrf_stop_rx(hackrf_device* device); /* return HACKRF_TRUE if success */ extern ADDAPI int ADDCALL hackrf_is_streaming(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_spiflash_erase(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* const data); extern ADDAPI int ADDCALL hackrf_spiflash_read(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* data); extern ADDAPI int ADDCALL hackrf_board_id_read(hackrf_device* device, uint8_t* value); extern ADDAPI int ADDCALL hackrf_version_string_read(hackrf_device* device, char* version, uint8_t length); extern ADDAPI int ADDCALL hackrf_board_partid_serialno_read(hackrf_device* device, read_partid_serialno_t* read_partid_serialno); extern ADDAPI const char* ADDCALL hackrf_error_name(enum hackrf_error errcode); extern ADDAPI const char* ADDCALL hackrf_board_id_name(enum hackrf_board_id board_id); extern ADDAPI const char* ADDCALL hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id); extern ADDAPI const char* ADDCALL hackrf_filter_path_name(const enum rf_path_filter path); extern ADDAPI int ADDCALL hackrf_set_sweep(hackrf_device* device, double fstart, double bw, double length, int delay); extern ADDAPI int ADDCALL hackrf_set_adf4158_reg(char *name, unsigned int value); extern ADDAPI int ADDCALL hackrf_adf4158_to_device(hackrf_device* device); extern ADDAPI int ADDCALL hackrf_set_mcp(hackrf_device* device, uint32_t value); extern ADDAPI int ADDCALL hackrf_set_gpio(hackrf_device *device, uint32_t bits); extern ADDAPI int ADDCALL hackrf_clear_gpio(hackrf_device *device, uint32_t bits); extern ADDAPI int ADDCALL hackrf_set_clock_divider(hackrf_device *device, uint16_t divider); #ifdef __cplusplus } // __cplusplus defined. #endif #endif//__HACKRF_H__ ================================================ FILE: processing/analysis.py ================================================ import sys import matplotlib.pyplot as plt import matplotlib.image as image import numpy as np import struct #Read sweeps from start to end start = 200 end = 1000000 #Only takes every nth sweep. 1 to process all sweeps. decimate_sweeps = 1 bit_depth = 2**10. adc_ref = 1. #Default values if not written in the header bw = 200e6 sweep_length = 1.0e-3 sample_rate = 10.2e6/20 sweep_samples = sweep_length*sample_rate header_length = 0 filename = sys.argv[1] #Read header with open(filename, 'r') as f: magic = f.read(4) if magic == "FMCW": version = struct.unpack(' 0: sweep_delay = struct.unpack(' sweep_samples/2.0]) #Fix noise in syncs for e,s in enumerate(syncs): if s < min_sync - 5: acc = s i = e while acc < min_sync - 5: acc += syncs[i] i += 1 if abs(acc - min_sync) < 5: syncs[e] = acc for j in xrange(e,i): del syncs[j] #Read samples sweeps = [] with open(filename, 'r') as f: print 'Drop samples',drop_samples f.seek(drop_samples+header_length) for s in xrange(end-start): try: samples_in = f.read(2*syncs[s]) except IndexError: break if s % decimate_sweeps != 0: continue samples = [] for i in xrange(0,len(samples_in),2): d = samples_in[i:i+2] samples.append(struct.unpack(' 0: background = [i/averages for i in background] for e in xrange(len(sweeps)): sweeps[e] = sweeps[e][:sw_len] sweeps[e].extend([0]*(sw_len-len(sweeps[e]))) lines = len(sweeps) print lines, "lines" fourier_len = len(sweeps[0])/2 max_range_index = int((4*bw*fourier_len*max_range)/(3e8*sample_rate*sweep_length)) max_range_index = min(max_range_index, sw_len//2) print max_range_index im = np.zeros((max_range_index-2, lines)) w = np.hanning(sw_len) m = 0 for e in xrange(0,len(sweeps)): sw = sweeps[e][:sw_len] if subtract_clutter: if e > 1: swp = sweeps[e-1][:sw_len] #if len(sw) != len(swp): # #print e,len(sw),len(swp) # continue sw = [sw[n]-swp[n] for n in xrange(min(len(swp),len(sw)))] if subtract_background: sw = [sw[n]-background[n] for n in xrange(len(sw))] if e >= lines: break if len(sw) < len(w): if (len(w) - len(sw)) < 3: sw.extend([0]*(len(w)-len(sw))) else: #print "Short sweep",e,len(w),len(sw) continue sw = [sw[i]*w[i] for i in xrange(len(w))] fy = np.fft.rfft(sw)[3:max_range_index+1] fy = 20*np.log10((adc_ref/(bit_depth*max_range_index))*np.abs(fy)) fy = np.clip(fy, -100, float('inf')) m = max(m,max(fy)) im[:,e] = np.array(fy) if 1: f = sample_rate/2.0 if 0: xx, yy = np.meshgrid( np.linspace(0,decimate_sweeps*2*lines*sw_len/sample_rate, im.shape[1]), np.linspace(0, 3e8*max_range_index*sample_rate/(2*sw_len)/((bw/sweep_length)), im.shape[0])) else: xx, yy = np.meshgrid( np.linspace(0,im.shape[1]-1, im.shape[1]), np.linspace(0, 3e8*max_range_index*sample_rate/(2*sw_len)/((bw/sweep_length)), im.shape[0])) plt.ylabel("Range [m]") plt.xlabel("Time [s]") plt.title(filename+' Range-time plot') imgplot = plt.pcolormesh(xx,yy,im) imgplot.set_clim(m-100,m) plt.colorbar() #Save png of the plot image.imsave('range_time_raw.png', np.flipud(im)) plt.savefig('range_time.png', dpi=500) plt.show() ================================================ FILE: processing/bicycle_sar.py ================================================ import sys import matplotlib.pyplot as plt import matplotlib.image as image import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import struct from scipy.signal import decimate from scipy import interpolate as interp import pickle start = 2001 decimate_sweeps = 10 end = start+decimate_sweeps*1090 bit_depth = 2**10 decimate_samples = 8 bb_filter = None bw = 200e6 sweep_length = 1.0e-3 sample_rate = 10.2e6/20 speed = 1.41 sweep_samples = sweep_length*sample_rate header_length = 0 def read_bb_filter(filename): freqs, dbs, spec = [], [], [] with open(filename, 'r') as f: for e,line in enumerate(f): if e == 0: #Skip header continue line = line.split('\t') freqs.append(float(line[0])) db, phase = line[1][1:-4].split(',') dbs.append(float(db[:-2])) spec.append(float(phase)) return freqs, dbs, spec if 1: #Read header with open(sys.argv[1], 'r') as f: magic = f.read(4) if magic == "FMCW": version = struct.unpack(' sweep_samples/2.0]) #Fix noise in syncs for e,s in enumerate(syncs): if s < min_sync - 5: acc = s i = e while acc < min_sync - 5: acc += syncs[i] i += 1 if abs(acc - min_sync) < 5: syncs[e] = acc for j in xrange(e,i): del syncs[j] #Read samples sweeps = [] with open(sys.argv[1], 'r') as f: print 'Drop samples',drop_samples f.seek(drop_samples+header_length) #samples_in = f.read(2*sum(syncs)) for s in xrange(end-start): try: samples_in = f.read(2*syncs[s]) except IndexError: break if s % decimate_sweeps != 0: continue samples = [] for i in xrange(0,len(samples_in),2): d = samples_in[i:i+2] samples.append(struct.unpack(' max_db - 6.: db_end_i += 1 db40_line = [ 40*np.log10(f) for f in bb_freq ] c = min([db40_line[i] - bb_db[i] for i in xrange(len(bb_db))]) db40_line = [i-c for i in db40_line] db_corr = [db40_line[i] - bb_db[i] for i in xrange(db_end_i)] db_corri = interp.interp1d(bb_freq[:db_end_i], db_corr, fill_value=1, bounds_error=False) bb_p = interp.interp1d(bb_freq, bb_phase, fill_value=0, bounds_error=False) freqs = lambda i: i*sample_rate/(2.0*len(sweeps[0])) correction = [] db_correction = [] for i in xrange(len(sweeps[0])//2): phase = bb_p(freqs(i)) phase = -phase phase *= 0.0174532925 #To radians correction.append(np.exp(1j*phase)) if freqs(i) < bb_freq[db_end_i]: db_correction.append(10**(db_corri(freqs(i))/20.)) else: db_correction.append(10**(db_corri(freqs(bb_freq[db_end_i]))/20.)) #Hilbert transform and combined phase correction for e in xrange(len(sweeps)): fx = np.fft.fft(sweeps[e]) fx[len(fx)/2+1:] = 0 fx[0] = 0 # Zero DC component fx[:len(correction)] *= correction fx[:len(db_correction)] *= db_correction fx[len(sweeps[e])/decimate_samples:] *= 0 #FIXME: Decimate can't handle complex data, so undo Hilbert transform sweeps[e] = np.real(np.fft.ifft(fx)) sweeps = list(sweeps) if 1: sample_rate /= decimate_samples min_sync /= decimate_samples if decimate_samples > 1: sweeps = map(lambda x: decimate(x, decimate_samples, ftype='fir'), sweeps) delta_crange = speed*sweep_length*decimate_sweeps min_len = min(map(len, sweeps)) print "Minimum length",min_len sweeps = [i[:min_len] for i in sweeps] max_range = 3e8*sample_rate*sweep_length/(4*bw) print max_range if 0: with open('sar_data.p', 'w') as f: pickle.dump( (f0, bw, sweep_length, sweeps, 0, max_range, delta_crange), f ) if 1: max_range = 180 subtract_clutter = False subtract_background = False if subtract_background: averages = 0 background = [0]*min_sync for sw in sweeps: if len(sw) != min_sync: continue background = [background[i]+sw[i] for i in xrange(min_sync)] averages += 1 if averages > 0: background = [i/averages for i in background] lines = len(sweeps) print lines, "lines" sw_len = min_sync fourier_len = len(sweeps[0])/2 max_range_index = int((4*bw*fourier_len*max_range)/(3e8*sample_rate*sweep_length)) print max_range_index im = np.zeros((max_range_index, lines)) w = np.hanning(sw_len) m = 0 for e in xrange(0,len(sweeps)): sw = sweeps[e][:sw_len] if subtract_clutter: if e > 1: swp = sweeps[e-1][:sw_len] if len(sw) != len(swp): #print e,len(sw),len(swp) continue sw = [sw[n]-swp[n] for n in xrange(len(sw))] if subtract_background: if len(sw) != len(background): continue sw = [sw[n]-background[n] for n in xrange(len(sw))] if e >= lines: break if len(sw) < len(w): if (len(w) - len(sw)) < 3: sw.extend([0]*(len(w)-len(sw))) else: #print "Short sweep",e,len(w),len(sw) continue sw = [sw[i]*w[i] for i in xrange(len(w))] fy = np.fft.rfft(sw)[1:max_range_index+1] fy = fy/bit_depth fy = 20*np.log(abs(fy)) fy = np.clip(fy, -40, float('inf')) m = max(m,max(fy)) im[:,e] = np.array(fy) if 1: f = sample_rate/2.0 xx, yy = np.meshgrid( #np.linspace(0,decimate_sweeps*2*lines*sw_len/sample_rate, im.shape[1]), np.linspace(0, im.shape[1], im.shape[1]), np.linspace(0, 3e8*max_range_index*sample_rate/(2*sw_len)/((bw/sweep_length)), im.shape[0])) imgplot = plt.pcolormesh(xx,yy,im) imgplot.set_clim(m-100,m) plt.colorbar() image.imsave('range_time_raw.png', np.flipud(im)) plt.savefig('range_time.png', dpi=500) plt.show() ================================================ FILE: processing/filter.py ================================================ import scipy.signal import numpy as np import matplotlib.pyplot as plt N = 75 nyquist = 5.1e6/2. cutoff = 200e3 def conv(taps, signal): out = [] for i in xrange(len(signal)-len(taps)): x = 0 for j in xrange(len(taps)): x += signal[i+j] * taps[-j] out.append(x) return out signal = [np.sin(2*np.pi*1e6*t/(2*nyquist)) + np.sin(2*np.pi*3e6*t/(2*nyquist)) for t in xrange(200)] taps = scipy.signal.firwin(N, cutoff, nyq=nyquist) for tap in taps: print "{},".format(tap) w, h = scipy.signal.freqz(taps, worN=8000) plt.figure() plt.plot((w/np.pi)*nyquist, 20*np.log10(np.abs(h)), linewidth=2) plt.figure() plt.plot(signal) plt.plot(conv(taps,signal)) plt.figure() plt.plot(20*np.log10(np.abs(np.fft.rfft(conv(taps,signal))))) plt.plot(20*np.log10(np.abs(np.fft.rfft(signal)))) plt.show() ================================================ FILE: processing/fir/Makefile ================================================ default: fir fir.o: fir.c gcc -O3 -c fir.c -o fir.o fir: fir.o gcc fir.o -o fir -lm clean: -rm -f fir.o -rm -f fir ================================================ FILE: processing/fir/fir.c ================================================ #include #include #include #include #include #include "taps.h" #define BLOCK 100*1024*1024 #define PACKET_SIZE 44 int decimate = 1; int filter = 0; const static float *taps = taps_200e3_51; uint32_t array_to_32(int8_t *arr) { return (((uint32_t)arr[3] & 0xFF)<<(3*8))|(((uint32_t)arr[2] & 0xFF)<<(2*8))|(((uint32_t)arr[1] & 0xFF)<<(1*8))|((uint32_t)arr[0] & 0xFF); } int gcd(int m, int n) { int tmp; while(m) { tmp = m; m = n % m; n = tmp; } return n; } int lcm(int m, int n) { return m / gcd(m, n) * n; } int conv(const float *taps, int ntaps, const int16_t *signal, int len_signal, int16_t *output) { int i,j; float x; for(i=0;i \n"); return -1; } FILE *fin = fopen(argv[1], "rb"); if (!fin) { printf("Failed to open input file: %s\n", argv[1]); return -1; } FILE *fout = fopen(argv[2], "wb"); if (!fout) { printf("Failed to open output file: %s\n", argv[2]); return -1; } char *sync_file = malloc(strlen(argv[2])+10); if (!sync_file) { printf("malloc failed\n"); return -1; } sprintf(sync_file, "%s.sync", argv[2]); FILE *fsync = fopen(sync_file, "wb"); if (!fout) { printf("Failed to open sync output file: %s\n", sync_file); return -1; } unsigned int block_size = BLOCK - BLOCK%lcm(PACKET_SIZE, lcm(decimate, TAPS_LENGTH)); printf("Block size: %d\n", block_size); int8_t *block8 = malloc(block_size*sizeof(int8_t)); if (!block8) { printf("malloc failed\n"); return -1; } int16_t *block = malloc(block_size*sizeof(int16_t)); if (!block) { printf("malloc failed\n"); return -1; } int16_t *block_filtered = malloc(block_size*sizeof(int16_t)); if (!block_filtered) { printf("malloc failed\n"); return -1; } int16_t *block_out = malloc(2*block_size*sizeof(int16_t)); if (!block_out) { printf("malloc failed\n"); return -1; } uint32_t *syncs = malloc(block_size*sizeof(uint32_t)); if (!syncs) { printf("malloc failed\n"); return -1; } //Read header { int res; char magic[4]; //Magic, should be "FMCW" res = fread(magic, 1, 4, fin); if (res != 4) { printf("Failed to read input file\n"); return -1; } if (strncmp("FMCW", magic, 4) != 0) { printf("Invalid header, exiting\n"); return -1; } int version; int header_size; double sample_rate; res = fread(&version, 4, 1, fin); res = fread(&header_size, 4, 1, fin); res = fread(&sample_rate, 8, 1, fin); if (res != 1) { printf("Failed to read header\n"); return -1; } printf("Sample rate: %f\n", sample_rate); printf("New sample rate: %f\n", sample_rate/decimate); header_size = header_size-4-4-4-8; //Copy header to output char *header = malloc(header_size); if (!header) { printf("malloc failed\n"); return -1; } res = fread(header, 1, header_size, fin); if (res != header_size) { printf("Failed to read header\n"); return -1; } fwrite(magic, 1, 4, fout); fwrite(&version, 4, 1, fout); fwrite(&header_size, 4, 1, fout); sample_rate = sample_rate/decimate; fwrite(&sample_rate, 8, 1, fout); fwrite(header, 1, header_size, fout); } int read_size; int i, j; int fsamples; unsigned int stored = 0; unsigned int sample_counter = 0; unsigned int last_sync = 0; while (1) { unsigned int sync_counter = 0; int read = block_size - stored*2; // Read must be aligned to packet size read = read - read%PACKET_SIZE; if ( !(read_size = fread(block8, 1, read, fin)) ) { // EOF break; } // Attach the 2 LSB bits to right samples int read_samples = 0; int sync_phase = 1; for(i=0;i= 1: zpad = squint*st.shape[0] zeros = np.zeros((zpad, st.shape[1]), dtype=np.complex) index = int(np.round((zpad - st.shape[0])/2)) for i in xrange(st.shape[0]): zeros[index+i] = st[i] st = zeros kx = np.linspace(-np.pi/delta_crange, np.pi/delta_crange, len(st)) kr = np.linspace(((4*np.pi/c)*(fc)), ((4*np.pi/c)*(fc+bw)), len(st[0])) #Along the track FFT st = ift(st, ax = 0) ky0 = (kr[0]**2 - kx[0]**2 )**0.5 if np.isnan(ky0): raise Exception("Ky0 = NaN") ky_even = np.linspace(ky0, kr[-1], st.shape[1]) #Stolt interpolation for i in xrange(len(kx)): ky = np.sqrt(kr**2 - kx[i]**2 ) ci = interp.interp1d(ky, st[i,:], fill_value=0, bounds_error=False) st[i,:] = (ci(ky_even)) if window: #Create window win_x = taylor(st.shape[1],taylor_sl) win_x = np.tile(win_x, [st.shape[0],1]) win_y = taylor(st.shape[0],taylor_sl) win_y = np.array([win_y]).T win_y = np.tile(win_y, [1,st.shape[1]]) win = win_x*win_y #Apply window st *= win #Pad Spectrum if 0: length_x = 2**(int(np.log2(st.shape[1]*interpolate))+1) length_y = 2**(int(np.log2(st.shape[0]*interpolate))+1) pad_x = length_x-st.shape[1] pad_y = length_y-st.shape[0] st = np.pad(st,((pad_y/2, pad_y/2),(pad_x/2,pad_x/2)), mode = 'constant') #IFFT st = ift2(st) st = fftshift(st, 1) return st def surrogate(x, w, a, p, c): return a*np.cos(x+p)+c def surrogate_min(raw_data, fc, bw, tsweep, delta_crange, iterations=20): wl = 3e8/fc surrogate = lambda x,a,p,c : a*np.cos(4*np.pi*x/wl+p)+c errors = [0]*len(raw_data) #Base for curve fitting es = np.linspace(0,wl/4,3) try: for i in xrange(iterations): print "Iteration",i for k in xrange(len(errors)): n = [] for e in es: errors[k] = e n.append(entropy(sar_entropy(raw_data, fc, bw, tsweep, delta_crange, errors, False))) popt, pcov = curve_fit(surrogate, es, n) d = -wl*(popt[1]-np.pi)/(4*np.pi) # Check that point is minimum from second derivative if -popt[0]*np.cos(popt[1]+4*np.pi*d/wl) < 0: d = -wl*(popt[1])/(4*np.pi) p = surrogate(d, *popt) #Wrap phase if 1: s = np.sign(d) d = abs(d) while abs(d) > wl/2: d -= wl/2 d *= s assert p - surrogate(d, *popt) < 1e-5 errors[k] = d print "Entropy",p print errors except KeyboardInterrupt: print "Aborting" return errors t_start = time.time() m = surrogate_min(raw_data, fc, bw, tsweep, delta_crange) print m print "Done in", time.time() - t_start, "s" #plt.figure() #plt.plot(m) st = sar_entropy(raw_data, fc, bw, tsweep, delta_crange, m) print entropy(st) crange0 *= squint crange1 *= squint plt.figure() st = 20*np.log10(np.abs(st)) imgplot = plt.imshow(st, aspect='auto', interpolation='none', extent=[range0, range1, crange0, crange1]) db_max = np.max(st) #Limit the dynamic range to clean the rounding errors imgplot.set_clim(db_max-dynamic_range,db_max) plt.show() ================================================ FILE: processing/sar_process.py ================================================ from __future__ import division import numpy as np import matplotlib.pyplot as plt import cPickle as pickle from scipy import interpolate as interp from numpy.fft import fftshift, ifft, fft, ifft2 from scipy.stats import linregress rs = 0 squint = 2 interpolate = 1 taylor_sl = 43 dynamic_range = 35 ### c = 299792458.0 def unwrap(a, fc): tol = (3e8/fc)/4 offset = 0 out = [a[0]] for i in xrange(1,len(a)): diff = a[i]-a[i-1] if diff > tol: offset += tol elif diff < -tol: offset -= tol out.append(a[i]+2*offset) return out def entropy(im): intensity = np.abs(im)**2 E = np.sum(intensity) with np.errstate(divide='ignore', invalid='ignore'): l = intensity*np.log2(intensity) return -np.sum(np.nan_to_num(l))/E+np.log2(E) def ift(F, ax = -1): f = fftshift(ifft(fftshift(F), axis = ax)) return f def ft(F, ax = -1): f = fftshift(fft(fftshift(F), axis = ax)) return f def ift2(F, delta=1): N = F.shape[0] f = fftshift(ifft2(fftshift(F)))*(delta*N)**2 return(f) def taylor(nsamples, S_L=43): xi = np.linspace(-0.5, 0.5, nsamples) A = 1.0/np.pi*np.arccosh(10**(S_L*1.0/20)) n_bar = int(2*A**2+0.5)+1 sigma_p = n_bar/np.sqrt(A**2+(n_bar-0.5)**2) #Compute F_m m = np.arange(1,n_bar) n = np.arange(1,n_bar) F_m = np.zeros(n_bar-1) for i in m: num = 1 den = 1 for j in n: num = num*\ (-1)**(i+1)*(1-i**2*1.0/sigma_p**2/(\ A**2+(j-0.5)**2)) if i!=j: den = den*(1-i**2*1.0/j**2) F_m[i-1] = num/den w = np.ones(nsamples) for i in m: w += F_m[i-1]*np.cos(2*np.pi*i*xi) w = w/w.max() return(w) def hilbert(x): """Hilbert transform. Generates complex IQ-signal from real signal.""" fx = np.fft.fft(x) fx[:len(fx)/2] = 0 fx[0] = 0 # Zero DC component return 2*np.fft.ifft(fx) with open('sar_data.p', 'rb') as f: fc, bw, tsweep, data, range0, range1, delta_crange = pickle.load(f) delta_crange *= 1 crange0 = -delta_crange*(len(data)-1)/2. crange1 = delta_crange*(len(data)-1)/2. #Hilbert transformation to get complex data if type(data) == list or data[0].dtype != np.complex128: print "Hilbert transform" w = np.hamming(len(data[0])) data *= w data = np.array(map(hilbert, data)) #Insert here the phase error from autofocusing errors = [] if len(errors) > 0: errors = np.array(errors)-min(errors) errors = (4*np.pi*fc/c)*errors errors = np.unwrap(errors) errors = errors/(4*np.pi*fc/c) n = np.arange(0,len(errors)) #Remove linear term that moves the image in azimuth slope, intercept, _, _, _ = linregress(n,errors) line = slope*n+intercept errors -= line if 1: plt.plot(errors) plt.xlabel("Samples") plt.ylabel("Motion error [m]") if 1: t = np.linspace(0,1e-3,len(data[0])) for d in xrange(len(errors)): gamma = bw/tsweep e = -2*errors[d]/c data[d] *= np.exp(1j*(-2*np.pi*(fc+gamma*t)*e)) raw_extent = [range0, range1, crange0, crange1] if 0: #Raw data shdata = [np.fft.fft(r) for r in data] plt.figure() plt.imshow(20*np.log10(np.abs(shdata)), aspect='auto', interpolation='none', extent=raw_extent) if 0: plt.figure() plt.imshow(np.angle(data), aspect='auto', interpolation='none', extent=raw_extent) print delta_crange #Zeropad cross-range if squint >= 1: zpad = squint*data.shape[0] zeros = np.zeros((zpad, data.shape[1]), dtype=np.complex) index = int(np.round((zpad - data.shape[0])/2)) for i in xrange(data.shape[0]): zeros[index+i] = data[i] data = zeros kx = np.linspace(-np.pi/delta_crange, np.pi/delta_crange, len(data)) kr = np.linspace(((4*np.pi/c)*(fc)), ((4*np.pi/c)*(fc+bw)), len(data[0])) #Along the track FFT cfft = ift(data, ax = 0) if 0: plt.figure() plt.imshow(np.angle(cfft), aspect='auto', extent=[kr[0], kr[-1], kx[0], kx[-1]]) plt.figure() plt.imshow(np.abs(cfft), aspect='auto', extent=[kr[0], kr[-1], kx[0], kx[-1]]) #Matched filter if rs != 0: phi_mf = np.zeros(cfft.shape) for ii in xrange(cfft.shape[1]): for jj in xrange(cfft.shape[0]): phi_mf = rs*(kr[ii]**2-kx[jj]**2 )**0.5 smf = np.exp(1j*phi_mf) cfft = cfft*smf ky0 = (kr[0]**2 - kx[0]**2 )**0.5 if np.isnan(ky0): raise Exception("Ky0 = NaN") points = (kr[-1]-ky0)/(kr[1]-kr[0]) ky_even = np.linspace(ky0, kr[-1], points) range_scale = points/cfft.shape[1] st = np.zeros((cfft.shape[0], points), dtype=np.complex) #Stolt interpolation for i in xrange(len(kx)): ky = (kr**2 - kx[i]**2 )**0.5 ci = interp.interp1d(ky, cfft[i], fill_value=0, bounds_error=False) st[i,:] = (ci(ky_even)) if 0: plt.figure() plt.imshow(np.angle(st), aspect='auto', interpolation='none', extent=[ky_even[0], ky_even[-1], kx[0], kx[-1]]) if 0: d = np.fft.ifft(st, axis=0) d = np.fft.ifft(d, axis=1) plt.figure() plt.imshow(np.abs(d), aspect='auto', interpolation='none', extent=[kr[0], kr[-1], kx[0], kx[-1]]) #Create window win_x = taylor(st.shape[1],taylor_sl) win_x = np.tile(win_x, [st.shape[0],1]) win_y = taylor(st.shape[0],taylor_sl) win_y = np.array([win_y]).T win_y = np.tile(win_y, [1,st.shape[1]]) #win = win_x*win_y win = win_y #Apply window st *= win #Pad Spectrum if 0: length_x = 2**(int(np.log2(st.shape[1]*interpolate))+1) length_y = 2**(int(np.log2(st.shape[0]*interpolate))+1) pad_x = length_x-st.shape[1] pad_y = length_y-st.shape[0] st = np.pad(st,((pad_y/2, pad_y/2),(pad_x/2, pad_x/2)), mode = 'constant') #IFFT st = ift2(st) st = fftshift(st, 1) st = st[:,:int(st.shape[1]/range_scale)] crange0 *= squint crange1 *= squint plt.figure() print entropy(st) st = 20*np.log10(np.abs(st)) #, cmap=plt.cm.Greys_r imgplot = plt.imshow(st, interpolation='none', extent=[range0, range1, crange0, crange1]) plt.xlabel("Range [m]") plt.ylabel("Cross-range [m]") m = np.max(st) #Limit the dynamic range to clean the rounding errors imgplot.set_clim(m-dynamic_range,m) plt.show() ================================================ FILE: processing/sync_analysis.py ================================================ import sys import matplotlib.pyplot as plt import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import struct def most_common(lst): return max(set(lst), key=lst.count) with open(sys.argv[1], 'r') as f: samples_in = f.read() syncs = [] for i in xrange(0,len(samples_in),4): d = samples_in[i:i+4] syncs.append(struct.unpack(' 1.5: a = [min_sync]*((s-min_sync)/min_sync) a.append(s-(min_sync)*((s/min_sync)-1)) assert sum(a) == s fixed_syncs.extend(a) syncs = fixed_syncs short_syncs = 0 long_syncs = 0 for e,sync in enumerate(syncs): if sync < min_sync - 10: print e,sync short_syncs += 1 if sync > min_sync + 10: print e,sync long_syncs += 1 print "{} syncs".format(len(syncs)) print "{} short syncs".format(short_syncs) print "{} long syncs".format(long_syncs)