├── README.md
├── demo
└── Keil
│ └── RAK811
│ ├── JLinkLog.txt
│ ├── JLinkSettings.ini
│ ├── RAK811.uvguix.wanglb
│ ├── RAK811.uvoptx
│ └── RAK811.uvprojx
├── doc
├── AT Command
│ ├── RAK811_HF_V2.0.3.2.bin
│ ├── RAK811_HF_V2.0.3.3.bin
│ ├── RAK811_HF_V2.0.3.4.bin
│ ├── RAK811_LF_V2.1.3.2.bin
│ ├── RAK811_LF_V2.1.3.3.bin
│ ├── RAK811_LF_V2.1.3.4.bin
│ └── ReleaseNotes.txt
├── Device Driver and Tools
│ ├── CH340 Drive.rar
│ └── Flash Loader Demonstrator.zip
├── Hardware
│ ├── LORA-SX1276.pdf
│ ├── LoRa Module 3D File.zip
│ ├── RAK811 Package File.PcbLib
│ ├── RAK811 Reference design.SchDoc
│ ├── RAK811_LF_SCH.pdf
│ ├── RAK811_SCH.pdf
│ ├── STM32L151CB.pdf
│ └── WisNode LoRa Schematic_20171129.pdf
├── Software
│ ├── RAK811 LoRa Module Datasheet V1.1.pdf
│ └── RAK811 Lora AT Command V1.4.pdf
└── User Manual
│ └── WisNode-Lora Quick Start Guide V1.3.pdf
└── src
├── LoRaWAN
└── master
│ ├── LoRaWAN.txt
│ ├── mac
│ ├── LoRaMac.c
│ ├── LoRaMac.h
│ ├── LoRaMacCrypto.c
│ ├── LoRaMacCrypto.h
│ ├── LoRaMacTest.h
│ └── region
│ │ ├── Region.c
│ │ ├── Region.h
│ │ ├── Region.h~RF108c0f07.TMP
│ │ ├── RegionAS923.c
│ │ ├── RegionAS923.h
│ │ ├── RegionAU915.c
│ │ ├── RegionAU915.h
│ │ ├── RegionCN470.c
│ │ ├── RegionCN470.h
│ │ ├── RegionCN779.c
│ │ ├── RegionCN779.h
│ │ ├── RegionCommon.c
│ │ ├── RegionCommon.h
│ │ ├── RegionEU433.c
│ │ ├── RegionEU433.h
│ │ ├── RegionEU868.c
│ │ ├── RegionEU868.h
│ │ ├── RegionIN865.c
│ │ ├── RegionIN865.h
│ │ ├── RegionKR920.c
│ │ ├── RegionKR920.h
│ │ ├── RegionUS915-Hybrid.c
│ │ ├── RegionUS915-Hybrid.h
│ │ ├── RegionUS915.c
│ │ └── RegionUS915.h
│ ├── radio
│ ├── radio.h
│ ├── sx1272
│ │ ├── sx1272.c
│ │ ├── sx1272.h
│ │ ├── sx1272Regs-Fsk.h
│ │ └── sx1272Regs-LoRa.h
│ ├── sx1276
│ │ ├── sx1276.c
│ │ ├── sx1276.h
│ │ ├── sx1276Regs-Fsk.h
│ │ └── sx1276Regs-LoRa.h
│ └── sx127x.c
│ └── system
│ ├── adc.c
│ ├── adc.h
│ ├── crypto
│ ├── aes.c
│ ├── aes.h
│ ├── cmac.c
│ └── cmac.h
│ ├── delay.c
│ ├── delay.h
│ ├── eeprom.c
│ ├── eeprom.h
│ ├── fifo.c
│ ├── fifo.h
│ ├── gpio.c
│ ├── gpio.h
│ ├── gps.c
│ ├── gps.h
│ ├── i2c.c
│ ├── i2c.h
│ ├── serial.h
│ ├── spi.h
│ ├── timer.c
│ ├── timer.h
│ ├── uart.c
│ └── uart.h
├── application
└── RAK811
│ ├── Comissioning.h
│ ├── app.c
│ ├── app.h
│ ├── at_cmd.c
│ ├── cmd_error.h
│ ├── log.h
│ ├── lora_config.c
│ ├── lora_config.h
│ ├── partition.c
│ ├── partition.h
│ ├── rw_assert.h
│ ├── rw_lora.c
│ ├── rw_lora.h
│ └── rw_sys.h
├── board
└── RAK811
│ ├── adc-board.c
│ ├── adc-board.h
│ ├── board.c
│ ├── board.h
│ ├── cmsis
│ ├── arm-gcc
│ │ ├── startup_stm32l1xx_md.s
│ │ └── stm32l1xx_md_flash.ld
│ ├── arm-iar
│ │ ├── linker
│ │ │ ├── stm32l100xb_flash.icf
│ │ │ ├── stm32l100xb_sram.icf
│ │ │ ├── stm32l100xba_flash.icf
│ │ │ ├── stm32l100xba_sram.icf
│ │ │ ├── stm32l100xc_flash.icf
│ │ │ ├── stm32l100xc_sram.icf
│ │ │ ├── stm32l151xb_flash.icf
│ │ │ ├── stm32l151xb_sram.icf
│ │ │ ├── stm32l151xba_flash.icf
│ │ │ ├── stm32l151xba_sram.icf
│ │ │ ├── stm32l151xc_flash.icf
│ │ │ ├── stm32l151xc_sram.icf
│ │ │ ├── stm32l151xca_flash.icf
│ │ │ ├── stm32l151xca_sram.icf
│ │ │ ├── stm32l151xd_flash.icf
│ │ │ ├── stm32l151xd_sram.icf
│ │ │ ├── stm32l151xdx_flash.icf
│ │ │ ├── stm32l151xdx_sram.icf
│ │ │ ├── stm32l151xe_flash.icf
│ │ │ ├── stm32l151xe_sram.icf
│ │ │ ├── stm32l152xb_flash.icf
│ │ │ ├── stm32l152xb_sram.icf
│ │ │ ├── stm32l152xba_flash.icf
│ │ │ ├── stm32l152xba_sram.icf
│ │ │ ├── stm32l152xc_flash.icf
│ │ │ ├── stm32l152xc_sram.icf
│ │ │ ├── stm32l152xca_flash.icf
│ │ │ ├── stm32l152xca_sram.icf
│ │ │ ├── stm32l152xd_flash.icf
│ │ │ ├── stm32l152xd_sram.icf
│ │ │ ├── stm32l152xdx_flash.icf
│ │ │ ├── stm32l152xdx_sram.icf
│ │ │ ├── stm32l152xe_flash.icf
│ │ │ ├── stm32l152xe_sram.icf
│ │ │ ├── stm32l162xc_flash.icf
│ │ │ ├── stm32l162xc_sram.icf
│ │ │ ├── stm32l162xca_flash.icf
│ │ │ ├── stm32l162xca_sram.icf
│ │ │ ├── stm32l162xd_flash.icf
│ │ │ ├── stm32l162xd_sram.icf
│ │ │ ├── stm32l162xdx_flash.icf
│ │ │ ├── stm32l162xdx_sram.icf
│ │ │ ├── stm32l162xe_flash.icf
│ │ │ └── stm32l162xe_sram.icf
│ │ ├── startup_stm32l100xb.s
│ │ ├── startup_stm32l100xba.s
│ │ ├── startup_stm32l100xc.s
│ │ ├── startup_stm32l151xb.s
│ │ ├── startup_stm32l151xba.s
│ │ ├── startup_stm32l151xc.s
│ │ ├── startup_stm32l151xca.s
│ │ ├── startup_stm32l151xd.s
│ │ ├── startup_stm32l151xdx.s
│ │ ├── startup_stm32l151xe.s
│ │ ├── startup_stm32l152xb.s
│ │ ├── startup_stm32l152xba.s
│ │ ├── startup_stm32l152xc.s
│ │ ├── startup_stm32l152xca.s
│ │ ├── startup_stm32l152xd.s
│ │ ├── startup_stm32l152xdx.s
│ │ ├── startup_stm32l152xe.s
│ │ ├── startup_stm32l162xc.s
│ │ ├── startup_stm32l162xca.s
│ │ ├── startup_stm32l162xd.s
│ │ ├── startup_stm32l162xdx.s
│ │ └── startup_stm32l162xe.s
│ ├── arm-std
│ │ └── startup_stm32l1xx_md.s
│ ├── mxconstants.h
│ ├── stm32l151xb.h
│ ├── stm32l151xba.h
│ ├── stm32l1xx.h
│ ├── stm32l1xx_hal_conf.h
│ ├── system_stm32l1xx.c
│ └── system_stm32l1xx.h
│ ├── gpio-board.c
│ ├── gpio-board.h
│ ├── gps-board.c
│ ├── gps-board.h
│ ├── i2c-board.c
│ ├── i2c-board.h
│ ├── pinName-board.h
│ ├── pinName-ioe.h
│ ├── rtc-board.c
│ ├── rtc-board.h
│ ├── spi-board.c
│ ├── spi-board.h
│ ├── sx1272-board.c
│ ├── sx1272-board.h
│ ├── sx1276-board.c
│ ├── sx1276-board.h
│ ├── sx127X-board.c
│ ├── timer-board.c
│ ├── timer-board.h
│ ├── uart-board.c
│ └── uart-board.h
├── external
├── JSON
│ ├── cJSON.c
│ └── cJSON.h
└── utilities
│ ├── utilities.c
│ └── utilities.h
└── hal
├── STM32L1xx_HAL_Driver
├── Inc
│ ├── Legacy
│ │ └── stm32_hal_legacy.h
│ ├── stm32l1xx_hal.h
│ ├── stm32l1xx_hal_adc.h
│ ├── stm32l1xx_hal_adc_ex.h
│ ├── stm32l1xx_hal_comp.h
│ ├── stm32l1xx_hal_comp_ex.h
│ ├── stm32l1xx_hal_conf_template.h
│ ├── stm32l1xx_hal_cortex.h
│ ├── stm32l1xx_hal_crc.h
│ ├── stm32l1xx_hal_cryp.h
│ ├── stm32l1xx_hal_cryp_ex.h
│ ├── stm32l1xx_hal_dac.h
│ ├── stm32l1xx_hal_dac_ex.h
│ ├── stm32l1xx_hal_def.h
│ ├── stm32l1xx_hal_dma.h
│ ├── stm32l1xx_hal_dma_ex.h
│ ├── stm32l1xx_hal_flash.h
│ ├── stm32l1xx_hal_flash_ex.h
│ ├── stm32l1xx_hal_flash_ramfunc.h
│ ├── stm32l1xx_hal_gpio.h
│ ├── stm32l1xx_hal_gpio_ex.h
│ ├── stm32l1xx_hal_i2c.h
│ ├── stm32l1xx_hal_i2s.h
│ ├── stm32l1xx_hal_irda.h
│ ├── stm32l1xx_hal_iwdg.h
│ ├── stm32l1xx_hal_lcd.h
│ ├── stm32l1xx_hal_nor.h
│ ├── stm32l1xx_hal_opamp.h
│ ├── stm32l1xx_hal_opamp_ex.h
│ ├── stm32l1xx_hal_pcd.h
│ ├── stm32l1xx_hal_pcd_ex.h
│ ├── stm32l1xx_hal_pwr.h
│ ├── stm32l1xx_hal_pwr_ex.h
│ ├── stm32l1xx_hal_rcc.h
│ ├── stm32l1xx_hal_rcc_ex.h
│ ├── stm32l1xx_hal_rtc.h
│ ├── stm32l1xx_hal_rtc_ex.h
│ ├── stm32l1xx_hal_sd.h
│ ├── stm32l1xx_hal_smartcard.h
│ ├── stm32l1xx_hal_spi.h
│ ├── stm32l1xx_hal_spi_ex.h
│ ├── stm32l1xx_hal_sram.h
│ ├── stm32l1xx_hal_tim.h
│ ├── stm32l1xx_hal_tim_ex.h
│ ├── stm32l1xx_hal_uart.h
│ ├── stm32l1xx_hal_usart.h
│ ├── stm32l1xx_hal_wwdg.h
│ ├── stm32l1xx_ll_fsmc.h
│ └── stm32l1xx_ll_sdmmc.h
└── Src
│ ├── stm32l1xx_hal.c
│ ├── stm32l1xx_hal_adc.c
│ ├── stm32l1xx_hal_adc_ex.c
│ ├── stm32l1xx_hal_comp.c
│ ├── stm32l1xx_hal_cortex.c
│ ├── stm32l1xx_hal_crc.c
│ ├── stm32l1xx_hal_cryp.c
│ ├── stm32l1xx_hal_cryp_ex.c
│ ├── stm32l1xx_hal_dac.c
│ ├── stm32l1xx_hal_dac_ex.c
│ ├── stm32l1xx_hal_dma.c
│ ├── stm32l1xx_hal_flash.c
│ ├── stm32l1xx_hal_flash_ex.c
│ ├── stm32l1xx_hal_flash_ramfunc.c
│ ├── stm32l1xx_hal_gpio.c
│ ├── stm32l1xx_hal_i2c.c
│ ├── stm32l1xx_hal_i2s.c
│ ├── stm32l1xx_hal_irda.c
│ ├── stm32l1xx_hal_iwdg.c
│ ├── stm32l1xx_hal_lcd.c
│ ├── stm32l1xx_hal_msp_template.c
│ ├── stm32l1xx_hal_nor.c
│ ├── stm32l1xx_hal_opamp.c
│ ├── stm32l1xx_hal_opamp_ex.c
│ ├── stm32l1xx_hal_pcd.c
│ ├── stm32l1xx_hal_pcd_ex.c
│ ├── stm32l1xx_hal_pwr.c
│ ├── stm32l1xx_hal_pwr_ex.c
│ ├── stm32l1xx_hal_rcc.c
│ ├── stm32l1xx_hal_rcc_ex.c
│ ├── stm32l1xx_hal_rtc.c
│ ├── stm32l1xx_hal_rtc_ex.c
│ ├── stm32l1xx_hal_sd.c
│ ├── stm32l1xx_hal_smartcard.c
│ ├── stm32l1xx_hal_spi.c
│ ├── stm32l1xx_hal_spi_ex.c
│ ├── stm32l1xx_hal_sram.c
│ ├── stm32l1xx_hal_tim.c
│ ├── stm32l1xx_hal_tim_ex.c
│ ├── stm32l1xx_hal_uart.c
│ ├── stm32l1xx_hal_usart.c
│ ├── stm32l1xx_hal_wwdg.c
│ ├── stm32l1xx_ll_fsmc.c
│ └── stm32l1xx_ll_sdmmc.c
└── cmsis
├── arm_common_tables.h
├── arm_const_structs.h
├── arm_math.h
├── cmsis_armcc.h
├── cmsis_armcc_V6.h
├── cmsis_gcc.h
├── core_cm0.h
├── core_cm0plus.h
├── core_cm3.h
├── core_cm4.h
├── core_cm7.h
├── core_cmFunc.h
├── core_cmInstr.h
├── core_cmSimd.h
├── core_sc000.h
└── core_sc300.h
/README.md:
--------------------------------------------------------------------------------
1 | # RAK811_LoRaNode
2 |
3 | **update RAK811_LoRaNode firmware version to 2.x.3.4**
4 | Fit TTN and LoRaServer at region CN470 to connected quickly.
5 |
6 | **update RAK811_LoRaNode firmware version to 2.x.3.3**
7 | Adjust duty cycle to improve the user experience.
8 | **update RAK811_LoRaNode firmware version to 2.x.3.2**
9 | 1.Fix a debug about "The Hard Fault exception occurs,Reset!".
10 | 2.The end number in version indicate the version with DEBUG or RELEASE :odd:DEBUG ,even:RELEASE.
11 | **RAK811_LoRaNode firmware version 2.x.3.1**
12 |
13 | 1.RAK811 is a LoRaNode module based on STM32L151 and SX1276. It has two kinds of boards : RAK811-HF board and RAK811-LF board.
14 |
15 | 2.This Firmware is based on LoRaWAN 1.0.2 protocol ,support Class A and Class C mode.User could switch the mode by such as 'at+set_config=class:2' command,0:class A,1:class B(unsupported),2:class C.
16 | Tips:It supports almost all frequency bands:(HF)->EU868, US915, AU915, KR920, AS923,IN865.
17 | (LF)->EU433,CN470.
18 |
19 | 3.[The AT Command folder](https://github.com/RAKWireless/RAK811_LoRaNode/tree/master/doc/AT%20Command "AT Firmware") contains two firmware: "RAK811_HF.bin"and"RAK811_LF.bin".
20 | "RAK811_HF.bin" surpport region:EU868, US915, AU915, KR920, AS923,IN865.
21 | "RAK811_LF.bin" surpport region:EU433,CN470.
22 |
23 | Tips: Region switch by such as"at+band=EU868"command,
24 | details about AT command refer to [RAK811 Lora AT Command V1.4.pdf](https://github.com/RAKWireless/RAK811_LoRaNode/blob/master/doc/Software/RAK811%C2%A0Lora%C2%A0AT%C2%A0Command%C2%A0V1.4.pdf).
25 |
26 | 4.Method of The Demo project generates different firmware refer to [ReleaseNotes.txt](https://github.com/RAKWireless/RAK811_LoRaNode/blob/master/doc/AT%20Command/ReleaseNotes.txt).
27 |
--------------------------------------------------------------------------------
/demo/Keil/RAK811/JLinkSettings.ini:
--------------------------------------------------------------------------------
1 | [BREAKPOINTS]
2 | ForceImpTypeAny = 0
3 | ShowInfoWin = 1
4 | EnableFlashBP = 2
5 | BPDuringExecution = 0
6 | [CFI]
7 | CFISize = 0x00
8 | CFIAddr = 0x00
9 | [CPU]
10 | MonModeVTableAddr = 0xFFFFFFFF
11 | MonModeDebug = 0
12 | MaxNumAPs = 0
13 | LowPowerHandlingMode = 0
14 | OverrideMemMap = 0
15 | AllowSimulation = 1
16 | ScriptFile=""
17 | [FLASH]
18 | CacheExcludeSize = 0x00
19 | CacheExcludeAddr = 0x00
20 | MinNumBytesFlashDL = 0
21 | SkipProgOnCRCMatch = 1
22 | VerifyDownload = 1
23 | AllowCaching = 1
24 | EnableFlashDL = 2
25 | Override = 0
26 | Device="ARM7"
27 | [GENERAL]
28 | WorkRAMSize = 0x00
29 | WorkRAMAddr = 0x00
30 | RAMUsageLimit = 0x00
31 | [SWO]
32 | SWOLogFile=""
33 | [MEM]
34 | RdOverrideOrMask = 0x00
35 | RdOverrideAndMask = 0xFFFFFFFF
36 | RdOverrideAddr = 0xFFFFFFFF
37 | WrOverrideOrMask = 0x00
38 | WrOverrideAndMask = 0xFFFFFFFF
39 | WrOverrideAddr = 0xFFFFFFFF
40 |
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_HF_V2.0.3.2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_HF_V2.0.3.2.bin
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_HF_V2.0.3.3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_HF_V2.0.3.3.bin
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_HF_V2.0.3.4.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_HF_V2.0.3.4.bin
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_LF_V2.1.3.2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_LF_V2.1.3.2.bin
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_LF_V2.1.3.3.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_LF_V2.1.3.3.bin
--------------------------------------------------------------------------------
/doc/AT Command/RAK811_LF_V2.1.3.4.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/AT Command/RAK811_LF_V2.1.3.4.bin
--------------------------------------------------------------------------------
/doc/AT Command/ReleaseNotes.txt:
--------------------------------------------------------------------------------
1 | /********************************************************/
2 | version 2.x.3.4:
3 | features
4 | Fit TTN and LoRaServer at region CN470 to connected quickly.
5 |
6 | /********************************************************/
7 | version 2.x.3.3:
8 | features
9 | Adjust duty cycle to improve the user experience
10 |
11 |
12 | /********************************************************/
13 | version 2.x.3.2:
14 | features
15 | This version is based on 2.x.3.1.
16 | 1.Fix a debug about "The Hard Fault exception occurs,Reset!".
17 | 2.The end number in version indicate the version with DEBUG or RELEASE :odd:DEBUG ,even:RELEASE.
18 |
19 |
20 | /********************************************************/
21 | version 2.x.3.1:
22 | features
23 | 1.This version combine HF and LF board firmware of RAK811. Through defined macro 'LORA_HF_BOARD' surpport HF,or undefined to surpport LF.
24 | 2.The Release or Debug Mode switch by modifying the macro 'DEBUG_FW' in "rw_sys.h" to be '0' or '1'.
25 |
26 | /********************************************************/
27 | version 2.x.3.0:
28 | features
29 | 1. Adapt to Actility test.
30 | 2. Fix the problem that the device can't send commands after sending at+sleep
31 | 3. Integrate all bands and use the at+band command to switch regional bands.
32 | 4.The meaning of x in version number:0 support regions:EU868, US915, AU915, KR920, AS923,IN865,CN779.
33 | 1 support regions:EU433,CN470.
34 |
35 | /********************************************************/
36 | version 2.0.2.2:
37 | features
38 | 1. update LoraWAN 1.0.1 to LoraWAN 1.0.2, support regions:
39 | EU868, US915, AU915, KR920, AS923, IN865
40 | 2. Add Peripheral command
41 | at+rd_reg=[,]
42 | at+wr_reg=,,
43 | at+gpio=[,]
44 | at+rd_adc=
45 | at+rd_iic=,[,]
46 | at+wr_iic=,,
47 | 3. add config class to select loraWAN class A C
48 | 4. add at+recv_ex command to enable rssi snr with recv
49 | 5. add at+link_cnt to get up/downlink counter
50 | 6. add at+abp_info to get abp info after join OTAA successfully
51 | 7. add at+set_config parameters.
52 |
53 | bugs
54 | 1. fix P2P frequence 868-929.9 MHz
55 | 2. fix at+recv data bug
56 |
57 | /********************************************************/
58 | version 1.0.2.6:
59 | features
60 | 1. add at+band command to get the loraWAN region info.
61 | 2. open EU868 channel 0-2 to customer redefined.
62 | 3. change EU868 duty cycle config to disenable.
63 | 4. add at+dr command to change the send datarate temporary.
64 |
65 | bugs
66 | 1. fix at+set_config=rx2:datarate,frequency
67 | 2. fix at+uart return info
68 | 3. fix at+set_config=dr:datarate use to change the default datarate
69 |
70 | /********************************************************/
71 | version 1.0.2.3:
72 | features
73 | 1. sleep power consumption fix to 7.2uA
74 |
75 | bugs
76 |
77 | /********************************************************/
78 | version 1.0.2.2:
79 | features
80 |
81 | bugs
82 | 1. fix at+txc cnts change limits 100 to 65535
83 | 2. fix bug data flash abnormal to factory config
84 |
85 | /********************************************************/
86 | version 1.0.1.4:
87 | features
88 |
89 | bugs
90 | 1. fix rx_delay1 setting
91 | 2. fix join abp way to load new config
92 |
93 | /********************************************************/
94 | version 1.0.1.2:
95 | features
96 | 1. add LoraP2P interfaces
97 |
98 | version 1.0.1.0:
99 |
100 | 1. support LoraWAN V1.0.1 ClassA
101 | 2. fixed some bugs, release first version
--------------------------------------------------------------------------------
/doc/Device Driver and Tools/CH340 Drive.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Device Driver and Tools/CH340 Drive.rar
--------------------------------------------------------------------------------
/doc/Device Driver and Tools/Flash Loader Demonstrator.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Device Driver and Tools/Flash Loader Demonstrator.zip
--------------------------------------------------------------------------------
/doc/Hardware/LORA-SX1276.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/LORA-SX1276.pdf
--------------------------------------------------------------------------------
/doc/Hardware/LoRa Module 3D File.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/LoRa Module 3D File.zip
--------------------------------------------------------------------------------
/doc/Hardware/RAK811 Package File.PcbLib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/RAK811 Package File.PcbLib
--------------------------------------------------------------------------------
/doc/Hardware/RAK811 Reference design.SchDoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/RAK811 Reference design.SchDoc
--------------------------------------------------------------------------------
/doc/Hardware/RAK811_LF_SCH.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/RAK811_LF_SCH.pdf
--------------------------------------------------------------------------------
/doc/Hardware/RAK811_SCH.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/RAK811_SCH.pdf
--------------------------------------------------------------------------------
/doc/Hardware/STM32L151CB.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/STM32L151CB.pdf
--------------------------------------------------------------------------------
/doc/Hardware/WisNode LoRa Schematic_20171129.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Hardware/WisNode LoRa Schematic_20171129.pdf
--------------------------------------------------------------------------------
/doc/Software/RAK811 LoRa Module Datasheet V1.1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Software/RAK811 LoRa Module Datasheet V1.1.pdf
--------------------------------------------------------------------------------
/doc/Software/RAK811 Lora AT Command V1.4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/Software/RAK811 Lora AT Command V1.4.pdf
--------------------------------------------------------------------------------
/doc/User Manual/WisNode-Lora Quick Start Guide V1.3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/doc/User Manual/WisNode-Lora Quick Start Guide V1.3.pdf
--------------------------------------------------------------------------------
/src/LoRaWAN/master/LoRaWAN.txt:
--------------------------------------------------------------------------------
1 | The master branch implementation is based on LoRaWAN Specification v1.0.2 and LoRaWAN Regional Parameters v1.0.2rB specifications.
2 | ClassA and ClassC end-device classes are fully implemented.
--------------------------------------------------------------------------------
/src/LoRaWAN/master/mac/LoRaMac.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/src/LoRaWAN/master/mac/LoRaMac.c
--------------------------------------------------------------------------------
/src/LoRaWAN/master/mac/LoRaMacTest.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file LoRaMacTest.h
3 | *
4 | * \brief LoRa MAC layer test function implementation
5 | *
6 | * \copyright Revised BSD License, see section \ref LICENSE.
7 | *
8 | * \code
9 | * ______ _
10 | * / _____) _ | |
11 | * ( (____ _____ ____ _| |_ _____ ____| |__
12 | * \____ \| ___ | (_ _) ___ |/ ___) _ \
13 | * _____) ) ____| | | || |_| ____( (___| | | |
14 | * (______/|_____)_|_|_| \__)_____)\____)_| |_|
15 | * (C)2013 Semtech
16 | *
17 | * ___ _____ _ ___ _ _____ ___ ___ ___ ___
18 | * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
19 | * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
20 | * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
21 | * embedded.connectivity.solutions===============
22 | *
23 | * \endcode
24 | *
25 | * \author Miguel Luis ( Semtech )
26 | *
27 | * \author Gregory Cristian ( Semtech )
28 | *
29 | * \author Daniel Jaeckle ( STACKFORCE )
30 | *
31 | * \defgroup LORAMACTEST LoRa MAC layer test function implementation
32 | * This module specifies the API implementation of test function of the LoRaMAC layer.
33 | * The functions in this file are only for testing purposes only.
34 | * \{
35 | */
36 | #ifndef __LORAMACTEST_H__
37 | #define __LORAMACTEST_H__
38 |
39 | /*!
40 | * \brief Enabled or disables the reception windows
41 | *
42 | * \details This is a test function. It shall be used for testing purposes only.
43 | * Changing this attribute may lead to a non-conformance LoRaMac operation.
44 | *
45 | * \param [IN] enable - Enabled or disables the reception windows
46 | */
47 | void LoRaMacTestRxWindowsOn( bool enable );
48 |
49 | /*!
50 | * \brief Enables the MIC field test
51 | *
52 | * \details This is a test function. It shall be used for testing purposes only.
53 | * Changing this attribute may lead to a non-conformance LoRaMac operation.
54 | *
55 | * \param [IN] txPacketCounter - Fixed Tx packet counter value
56 | */
57 | void LoRaMacTestSetMic( uint16_t txPacketCounter );
58 |
59 | /*!
60 | * \brief Enabled or disables the duty cycle
61 | *
62 | * \details This is a test function. It shall be used for testing purposes only.
63 | * Changing this attribute may lead to a non-conformance LoRaMac operation.
64 | *
65 | * \param [IN] enable - Enabled or disables the duty cycle
66 | */
67 | void LoRaMacTestSetDutyCycleOn( bool enable );
68 |
69 | /*!
70 | * \brief Sets the channel index
71 | *
72 | * \details This is a test function. It shall be used for testing purposes only.
73 | * Changing this attribute may lead to a non-conformance LoRaMac operation.
74 | *
75 | * \param [IN] channel - Channel index
76 | */
77 | void LoRaMacTestSetChannel( uint8_t channel );
78 |
79 | /*! \} defgroup LORAMACTEST */
80 |
81 | #endif // __LORAMACTEST_H__
82 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/radio/sx127x.c:
--------------------------------------------------------------------------------
1 | #if defined( SX1272_CHIP )
2 | #include
3 | #else
4 | #include
5 | #endif
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/adc.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements a generic ADC driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include "board.h"
16 | #include "adc-board.h"
17 |
18 | /*!
19 | * Flag to indicates if the ADC is initialized
20 | */
21 | static bool AdcInitialized = false;
22 |
23 | void AdcInit( Adc_t *obj, PinNames adcInput )
24 | {
25 | AdcMcuInit( obj, adcInput );
26 | AdcMcuFormat( obj, ADC_12_BIT, SINGLE_CONVERSION, CONVERT_MANUAL_TRIG, DATA_RIGHT_ALIGNED );
27 | }
28 |
29 | void AdcDeInit( Adc_t *obj )
30 | {
31 | AdcInitialized = false;
32 | }
33 |
34 | uint16_t AdcReadChannel( Adc_t *obj, uint32_t channel )
35 | {
36 | return AdcMcuReadChannel( obj, channel );
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/adc.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements a generic ADC driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __ADC_H__
16 | #define __ADC_H__
17 |
18 | /*!
19 | * ADC object type definition
20 | */
21 | typedef struct
22 | {
23 | ADC_HandleTypeDef Adc;
24 | Gpio_t AdcInput;
25 | }Adc_t;
26 |
27 | /*!
28 | * \brief Initializes the ADC input
29 | *
30 | * \param [IN] obj ADC object
31 | * \param [IN] scl ADC input pin name to be used
32 | */
33 | void AdcInit( Adc_t *obj, PinNames adcInput );
34 |
35 | /*!
36 | * \brief DeInitializes the ADC
37 | *
38 | * \param [IN] obj ADC object
39 | */
40 | void AdcDeInit( Adc_t *obj );
41 |
42 | /*!
43 | * \brief Read the analogue voltage value
44 | *
45 | * \param [IN] obj ADC object
46 | * \param [IN] channel ADC channel
47 | * \retval value Analogue pin value
48 | */
49 | uint16_t AdcReadChannel( Adc_t *obj, uint32_t channel );
50 |
51 | #endif // __ADC_H__
52 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/crypto/cmac.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************
2 | Copyright (C) 2009 Lander Casado, Philippas Tsigas
3 |
4 | All rights reserved.
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining
7 | a copy of this software and associated documentation files
8 | (the "Software"), to deal with the Software without restriction, including
9 | without limitation the rights to use, copy, modify, merge, publish,
10 | distribute, sublicense, and/or sell copies of the Software, and to
11 | permit persons to whom the Software is furnished to do so, subject to
12 | the following conditions:
13 |
14 | Redistributions of source code must retain the above copyright notice,
15 | this list of conditions and the following disclaimers. Redistributions in
16 | binary form must reproduce the above copyright notice, this list of
17 | conditions and the following disclaimers in the documentation and/or
18 | other materials provided with the distribution.
19 |
20 | In no event shall the authors or copyright holders be liable for any special,
21 | incidental, indirect or consequential damages of any kind, or any damages
22 | whatsoever resulting from loss of use, data or profits, whether or not
23 | advised of the possibility of damage, and on any theory of liability,
24 | arising out of or in connection with the use or performance of this software.
25 |
26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
27 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29 | CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
32 | DEALINGS WITH THE SOFTWARE
33 |
34 | *****************************************************************************/
35 |
36 | #ifndef _CMAC_H_
37 | #define _CMAC_H_
38 |
39 | #include "aes.h"
40 |
41 | #define AES_CMAC_KEY_LENGTH 16
42 | #define AES_CMAC_DIGEST_LENGTH 16
43 |
44 | typedef struct _AES_CMAC_CTX {
45 | aes_context rijndael;
46 | uint8_t X[16];
47 | uint8_t M_last[16];
48 | uint32_t M_n;
49 | } AES_CMAC_CTX;
50 |
51 | //#include
52 |
53 | //__BEGIN_DECLS
54 | void AES_CMAC_Init(AES_CMAC_CTX * ctx);
55 | void AES_CMAC_SetKey(AES_CMAC_CTX * ctx, const uint8_t key[AES_CMAC_KEY_LENGTH]);
56 | void AES_CMAC_Update(AES_CMAC_CTX * ctx, const uint8_t * data, uint32_t len);
57 | // __attribute__((__bounded__(__string__,2,3)));
58 | void AES_CMAC_Final(uint8_t digest[AES_CMAC_DIGEST_LENGTH], AES_CMAC_CTX * ctx);
59 | // __attribute__((__bounded__(__minbytes__,1,AES_CMAC_DIGEST_LENGTH)));
60 | //__END_DECLS
61 |
62 | #endif /* _CMAC_H_ */
63 |
64 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/delay.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Delay functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include "board.h"
16 |
17 | void Delay( float s )
18 | {
19 | DelayMs( s * 1000.0f );
20 | }
21 |
22 | void DelayMs( uint32_t ms )
23 | {
24 | HAL_Delay( ms );
25 | }
26 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/delay.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Delay functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __DELAY_H__
16 | #define __DELAY_H__
17 |
18 | /*!
19 | * Blocking delay of "s" seconds
20 | */
21 | void Delay( float s );
22 |
23 | /*!
24 | * Blocking delay of "ms" milliseconds
25 | */
26 | void DelayMs( uint32_t ms );
27 |
28 | #endif // __DELAY_H__
29 |
30 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/eeprom.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Timer objects and scheduling management
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __EEPROM_H__
16 | #define __EEPROM_H__
17 |
18 | /*!
19 | * Writes the given buffer to the EEPROM at the specified address.
20 | *
21 | * \param[IN] addr EEPROM address to write to
22 | * \param[IN] buffer Pointer to the buffer to be written.
23 | * \param[IN] size Size of the buffer to be written.
24 | * \retval status [SUCCESS, FAIL]
25 | */
26 | uint8_t EepromWriteBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );
27 |
28 | /*!
29 | * Reads the EEPROM at the specified address to the given buffer.
30 | *
31 | * \param[IN] addr EEPROM address to read from
32 | * \param[OUT] buffer Pointer to the buffer to be written with read data.
33 | * \param[IN] size Size of the buffer to be read.
34 | * \retval status [SUCCESS, FAIL]
35 | */
36 | uint8_t EepromReadBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );
37 |
38 | /*!
39 | * Sets the device address.
40 | *
41 | * \remark Useful for I2C external EEPROMS
42 | *
43 | * \param[IN] addr External EEPROM address
44 | */
45 | void EepromSetDeviceAddr( uint8_t addr );
46 |
47 | /*!
48 | * Gets the current device address.
49 | *
50 | * \remark Useful for I2C external EEPROMS
51 | *
52 | * \retval addr External EEPROM address
53 | */
54 | uint8_t EepromGetDeviceAddr( void );
55 |
56 | #endif // __EEPROM_H__
57 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/fifo.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements a FIFO buffer
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include "fifo.h"
16 |
17 | static uint16_t FifoNext( Fifo_t *fifo, uint16_t index )
18 | {
19 | return ( index + 1 ) % fifo->Size;
20 | }
21 |
22 | void FifoInit( Fifo_t *fifo, uint8_t *buffer, uint16_t size )
23 | {
24 | fifo->Begin = 0;
25 | fifo->End = 0;
26 | fifo->Data = buffer;
27 | fifo->Size = size;
28 | }
29 |
30 | void FifoPush( Fifo_t *fifo, uint8_t data )
31 | {
32 | fifo->End = FifoNext( fifo, fifo->End );
33 | fifo->Data[fifo->End] = data;
34 | }
35 |
36 | uint8_t FifoPop( Fifo_t *fifo )
37 | {
38 | uint8_t data = fifo->Data[FifoNext( fifo, fifo->Begin )];
39 |
40 | fifo->Begin = FifoNext( fifo, fifo->Begin );
41 | return data;
42 | }
43 |
44 | void FifoFlush( Fifo_t *fifo )
45 | {
46 | fifo->Begin = 0;
47 | fifo->End = 0;
48 | }
49 |
50 | bool IsFifoEmpty( Fifo_t *fifo )
51 | {
52 | return ( fifo->Begin == fifo->End );
53 | }
54 |
55 | bool IsFifoFull( Fifo_t *fifo )
56 | {
57 | return ( FifoNext( fifo, fifo->End ) == fifo->Begin );
58 | }
59 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/fifo.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements a FIFO buffer
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __FIFO_H__
16 | #define __FIFO_H__
17 |
18 | #include
19 | #include
20 |
21 | /*!
22 | * FIFO structure
23 | */
24 | typedef struct Fifo_s
25 | {
26 | uint16_t Begin;
27 | uint16_t End;
28 | uint8_t *Data;
29 | uint16_t Size;
30 | }Fifo_t;
31 |
32 | /*!
33 | * Initializes the FIFO structure
34 | *
35 | * \param [IN] fifo Pointer to the FIFO object
36 | * \param [IN] buffer Buffer to be used as FIFO
37 | * \param [IN] size Size of the buffer
38 | */
39 | void FifoInit( Fifo_t *fifo, uint8_t *buffer, uint16_t size );
40 |
41 | /*!
42 | * Pushes data to the FIFO
43 | *
44 | * \param [IN] fifo Pointer to the FIFO object
45 | * \param [IN] data Data to be pushed into the FIFO
46 | */
47 | void FifoPush( Fifo_t *fifo, uint8_t data );
48 |
49 | /*!
50 | * Pops data from the FIFO
51 | *
52 | * \param [IN] fifo Pointer to the FIFO object
53 | * \retval data Data popped from the FIFO
54 | */
55 | uint8_t FifoPop( Fifo_t *fifo );
56 |
57 | /*!
58 | * Flushes the FIFO
59 | *
60 | * \param [IN] fifo Pointer to the FIFO object
61 | */
62 | void FifoFlush( Fifo_t *fifo );
63 |
64 | /*!
65 | * Checks if the FIFO is empty
66 | *
67 | * \param [IN] fifo Pointer to the FIFO object
68 | * \retval isEmpty true: FIFO is empty, false FIFO is not empty
69 | */
70 | bool IsFifoEmpty( Fifo_t *fifo );
71 |
72 | /*!
73 | * Checks if the FIFO is full
74 | *
75 | * \param [IN] fifo Pointer to the FIFO object
76 | * \retval isFull true: FIFO is full, false FIFO is not full
77 | */
78 | bool IsFifoFull( Fifo_t *fifo );
79 |
80 | #endif // __FIFO_H__
81 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/gpio.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Generic GPIO driver implementation
10 |
11 | Comment: Relies on the specific board GPIO implementation as well as on
12 | IO expander driver implementation if one is available on the target
13 | board.
14 |
15 | License: Revised BSD License, see LICENSE.TXT file include in the project
16 |
17 | Maintainer: Miguel Luis and Gregory Cristian
18 | */
19 | #include "board.h"
20 |
21 | #include "gpio-board.h"
22 |
23 | #if defined( BOARD_IOE_EXT )
24 | #include "gpio-ioe.h"
25 | #endif
26 |
27 | void GpioInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint32_t value )
28 | {
29 | if( ( uint32_t )( pin >> 4 ) <= 6 )
30 | {
31 | GpioMcuInit( obj, pin, mode, config, type, value );
32 | }
33 | else
34 | {
35 | #if defined( BOARD_IOE_EXT )
36 | // IOExt Pin
37 | GpioIoeInit( obj, pin, mode, config, type, value );
38 | #endif
39 | }
40 | }
41 |
42 | void GpioSetInterrupt( Gpio_t *obj, IrqModes irqMode, IrqPriorities irqPriority, GpioIrqHandler *irqHandler )
43 | {
44 | if( ( uint32_t )( obj->pin >> 4 ) <= 6 )
45 | {
46 | GpioMcuSetInterrupt( obj, irqMode, irqPriority, irqHandler );
47 | }
48 | else
49 | {
50 | #if defined( BOARD_IOE_EXT )
51 | // IOExt Pin
52 | GpioIoeSetInterrupt( obj, irqMode, irqPriority, irqHandler );
53 | #endif
54 | }
55 | }
56 |
57 | void GpioRemoveInterrupt( Gpio_t *obj )
58 | {
59 | if( ( uint32_t )( obj->pin >> 4 ) <= 6 )
60 | {
61 | //GpioMcuRemoveInterrupt( obj );
62 | }
63 | else
64 | {
65 | #if defined( BOARD_IOE_EXT )
66 | // IOExt Pin
67 | //GpioIoeRemoveInterrupt( obj );
68 | #endif
69 | }
70 | }
71 |
72 | void GpioWrite( Gpio_t *obj, uint32_t value )
73 | {
74 | if( ( uint32_t )( obj->pin >> 4 ) <= 6 )
75 | {
76 | GpioMcuWrite( obj, value );
77 | }
78 | else
79 | {
80 | #if defined( BOARD_IOE_EXT )
81 | // IOExt Pin
82 | GpioIoeWrite( obj, value );
83 | #endif
84 | }
85 | }
86 |
87 | void GpioToggle( Gpio_t *obj )
88 | {
89 | if( ( uint32_t )( obj->pin >> 4 ) <= 6 )
90 | {
91 | GpioMcuToggle( obj );
92 | }
93 | else
94 | {
95 | #if defined( BOARD_IOE_EXT )
96 | // IOExt Pin
97 | GpioIoeWrite( obj, GpioIoeRead( obj ) ^ 1 );
98 | #endif
99 | }
100 | }
101 |
102 | uint32_t GpioRead( Gpio_t *obj )
103 | {
104 | if( ( uint32_t )( obj->pin >> 4 ) <= 6 )
105 | {
106 | return GpioMcuRead( obj );
107 | }
108 | else
109 | {
110 | #if defined( BOARD_IOE_EXT )
111 | // IOExt Pin
112 | return GpioIoeRead( obj );
113 | #else
114 | return 0;
115 | #endif
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/gps.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Generic driver for the GPS receiver UP501
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __GPS_H__
16 | #define __GPS_H__
17 |
18 | /* Structure to handle the GPS parsed data in ASCII */
19 | typedef struct
20 | {
21 | char NmeaDataType[6];
22 | char NmeaUtcTime[11];
23 | char NmeaDataStatus[2];
24 | char NmeaLatitude[10];
25 | char NmeaLatitudePole[2];
26 | char NmeaLongitude[11];
27 | char NmeaLongitudePole[2];
28 | char NmeaFixQuality[2];
29 | char NmeaSatelliteTracked[3];
30 | char NmeaHorizontalDilution[6];
31 | char NmeaAltitude[8];
32 | char NmeaAltitudeUnit[2];
33 | char NmeaHeightGeoid[8];
34 | char NmeaHeightGeoidUnit[2];
35 | char NmeaSpeed[8];
36 | char NmeaDetectionAngle[8];
37 | char NmeaDate[8];
38 | }tNmeaGpsData;
39 |
40 | extern tNmeaGpsData NmeaGpsData;
41 |
42 | /*!
43 | * \brief Initializes the handling of the GPS receiver
44 | */
45 | void GpsInit( void );
46 |
47 | /*!
48 | * \brief Switch ON the GPS
49 | */
50 | void GpsStart( void );
51 |
52 | /*!
53 | * \brief Switch OFF the GPS
54 | */
55 | void GpsStop( void );
56 |
57 | /*!
58 | * Updates the GPS status
59 | */
60 | void GpsProcess( void );
61 |
62 | /*!
63 | * \brief PPS signal handling function
64 | */
65 | void GpsPpsHandler( bool *parseData );
66 |
67 | /*!
68 | * \brief PPS signal handling function
69 | *
70 | * \retval ppsDetected State of PPS signal.
71 | */
72 | bool GpsGetPpsDetectedState( void );
73 |
74 | /*!
75 | * \brief Indicates if GPS has fix
76 | *
77 | * \retval hasFix
78 | */
79 | bool GpsHasFix( void );
80 |
81 | /*!
82 | * \brief Converts the latest Position (latitude and longitude) into a binary
83 | * number
84 | */
85 | void GpsConvertPositionIntoBinary( void );
86 |
87 | /*!
88 | * \brief Converts the latest Position (latitude and Longitude) from ASCII into
89 | * DMS numerical format
90 | */
91 | void GpsConvertPositionFromStringToNumerical( void );
92 |
93 | /*!
94 | * \brief Gets the latest Position (latitude and Longitude) as two double values
95 | * if available
96 | *
97 | * \param [OUT] lati Latitude value
98 | * \param [OUT] longi Longitude value
99 | *
100 | * \retval status [SUCCESS, FAIL]
101 | */
102 | uint8_t GpsGetLatestGpsPositionDouble ( double *lati, double *longi );
103 |
104 | /*!
105 | * \brief Gets the latest Position (latitude and Longitude) as two binary values
106 | * if available
107 | *
108 | * \param [OUT] latiBin Latitude value
109 | * \param [OUT] longiBin Longitude value
110 | *
111 | * \retval status [SUCCESS, FAIL]
112 | */
113 | uint8_t GpsGetLatestGpsPositionBinary ( int32_t *latiBin, int32_t *longiBin );
114 |
115 | /*!
116 | * \brief Parses the NMEA sentence.
117 | *
118 | * \remark Only parses GPGGA and GPRMC sentences
119 | *
120 | * \param [IN] rxBuffer Data buffer to be parsed
121 | * \param [IN] rxBufferSize Size of data buffer
122 | *
123 | * \retval status [SUCCESS, FAIL]
124 | */
125 | uint8_t GpsParseGpsData( int8_t *rxBuffer, int32_t rxBufferSize );
126 |
127 | /*!
128 | * \brief Returns the latest altitude from the parsed NMEA sentence
129 | *
130 | * \retval altitude
131 | */
132 | int16_t GpsGetLatestGpsAltitude( void );
133 |
134 | /*!
135 | * \brief Format GPS data into numeric and binary formats
136 | */
137 | void GpsFormatGpsData( void );
138 |
139 | /*!
140 | * \brief Resets the GPS position variables
141 | */
142 | void GpsResetPosition( void );
143 |
144 | #endif // __GPS_H__
145 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/i2c.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements the generic I2C driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include "board.h"
16 | #include "i2c-board.h"
17 |
18 | /*!
19 | * Flag to indicates if the I2C is initialized
20 | */
21 | static bool I2cInitialized = false;
22 |
23 | void I2cInit( I2c_t *obj, PinNames scl, PinNames sda )
24 | {
25 | if( I2cInitialized == false )
26 | {
27 | I2cInitialized = true;
28 |
29 | I2cMcuInit( obj, scl, sda );
30 | I2cMcuFormat( obj, MODE_I2C, I2C_DUTY_CYCLE_2, true, I2C_ACK_ADD_7_BIT, 100000 );
31 | }
32 | }
33 |
34 | void I2cDeInit( I2c_t *obj )
35 | {
36 | I2cInitialized = false;
37 | I2cMcuDeInit( obj );
38 | }
39 |
40 | void I2cResetBus( I2c_t *obj )
41 | {
42 | I2cInitialized = false;
43 | I2cInit( obj, I2C_SCL, I2C_SDA );
44 | }
45 |
46 | uint8_t I2cWrite( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t data )
47 | {
48 | if( I2cInitialized == true )
49 | {
50 | if( I2cMcuWriteBuffer( obj, deviceAddr, addr, &data, 1 ) == FAIL )
51 | {
52 | // if first attempt fails due to an IRQ, try a second time
53 | if( I2cMcuWriteBuffer( obj, deviceAddr, addr, &data, 1 ) == FAIL )
54 | {
55 | return FAIL;
56 | }
57 | else
58 | {
59 | return SUCCESS;
60 | }
61 | }
62 | else
63 | {
64 | return SUCCESS;
65 | }
66 | }
67 | else
68 | {
69 | return FAIL;
70 | }
71 | }
72 |
73 | uint8_t I2cWriteBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size )
74 | {
75 | if( I2cInitialized == true )
76 | {
77 | if( I2cMcuWriteBuffer( obj, deviceAddr, addr, buffer, size ) == FAIL )
78 | {
79 | // if first attempt fails due to an IRQ, try a second time
80 | if( I2cMcuWriteBuffer( obj, deviceAddr, addr, buffer, size ) == FAIL )
81 | {
82 | return FAIL;
83 | }
84 | else
85 | {
86 | return SUCCESS;
87 | }
88 | }
89 | else
90 | {
91 | return SUCCESS;
92 | }
93 | }
94 | else
95 | {
96 | return FAIL;
97 | }
98 | }
99 |
100 | uint8_t I2cRead( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *data )
101 | {
102 | if( I2cInitialized == true )
103 | {
104 | return( I2cMcuReadBuffer( obj, deviceAddr, addr, data, 1 ) );
105 | }
106 | else
107 | {
108 | return FAIL;
109 | }
110 | }
111 |
112 | uint8_t I2cReadBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size )
113 | {
114 | if( I2cInitialized == true )
115 | {
116 | return( I2cMcuReadBuffer( obj, deviceAddr, addr, buffer, size ) );
117 | }
118 | else
119 | {
120 | return FAIL;
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/i2c.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements the generic I2C driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __I2C_H__
16 | #define __I2C_H__
17 |
18 | /*!
19 | * I2C object type definition
20 | */
21 | typedef struct
22 | {
23 | I2C_HandleTypeDef I2c;
24 | Gpio_t Scl;
25 | Gpio_t Sda;
26 | }I2c_t;
27 |
28 | /*!
29 | * \brief Initializes the I2C object and MCU peripheral
30 | *
31 | * \param [IN] obj I2C object
32 | * \param [IN] scl I2C Scl pin name to be used
33 | * \param [IN] sda I2C Sda pin name to be used
34 | */
35 | void I2cInit( I2c_t *obj, PinNames scl, PinNames sda );
36 |
37 | /*!
38 | * \brief DeInitializes the I2C object and MCU peripheral
39 | *
40 | * \param [IN] obj I2C object
41 | */
42 | void I2cDeInit( I2c_t *obj );
43 |
44 | /*!
45 | * \brief Reset the I2C object and MCU peripheral
46 | *
47 | * \param [IN] obj I2C object
48 | */
49 | void I2cResetBus( I2c_t *obj );
50 |
51 | /*!
52 | * \brief Write data to the I2C device
53 | *
54 | * \param [IN] obj I2C object
55 | * \param [IN] deviceAddr device address
56 | * \param [IN] addr data address
57 | * \param [IN] data data to write
58 | */
59 | uint8_t I2cWrite( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t data );
60 |
61 | /*!
62 | * \brief Write several data to the I2C device
63 | *
64 | * \param [IN] obj I2C object
65 | * \param [IN] deviceAddr device address
66 | * \param [IN] addr data address
67 | * \param [IN] buffer data buffer to write
68 | * \param [IN] size number of bytes to write
69 | */
70 | uint8_t I2cWriteBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size );
71 |
72 | /*!
73 | * \brief Read data from the I2C device
74 | *
75 | * \param [IN] obj I2C object
76 | * \param [IN] deviceAddr device address
77 | * \param [IN] addr data address
78 | * \param [OUT] data variable used to store the data read
79 | */
80 | uint8_t I2cRead( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *data );
81 |
82 | /*!
83 | * \brief Read several data byte from the I2C device
84 | *
85 | * \param [IN] obj I2C object
86 | * \param [IN] deviceAddr device address
87 | * \param [IN] addr data address
88 | * \param [OUT] buffer data buffer used to store the data read
89 | * \param [IN] size number of data byte to read
90 | */
91 | uint8_t I2cReadBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size );
92 |
93 | #endif // __I2C_H__
94 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/serial.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements the generic UART driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __SERIAL_H__
16 | #define __SERIAL_H__
17 |
18 | #endif // __SERIAL_H__
19 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/spi.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements the generic SPI driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __SPI_H__
16 | #define __SPI_H__
17 |
18 | #include "spi-board.h"
19 |
20 | /*!
21 | * SPI object type definition
22 | */
23 | typedef struct Spi_s Spi_t;
24 |
25 | /*!
26 | * \brief Initializes the SPI object and MCU peripheral
27 | *
28 | * \remark When NSS pin is software controlled set the pin name to NC otherwise
29 | * set the pin name to be used.
30 | *
31 | * \param [IN] obj SPI object
32 | * \param [IN] mosi SPI MOSI pin name to be used
33 | * \param [IN] miso SPI MISO pin name to be used
34 | * \param [IN] sclk SPI SCLK pin name to be used
35 | * \param [IN] nss SPI NSS pin name to be used
36 | */
37 | void SpiInit( Spi_t *obj, PinNames mosi, PinNames miso, PinNames sclk, PinNames nss );
38 |
39 | /*!
40 | * \brief De-initializes the SPI object and MCU peripheral
41 | *
42 | * \param [IN] obj SPI object
43 | */
44 | void SpiDeInit( Spi_t *obj );
45 |
46 | /*!
47 | * \brief Configures the SPI peripheral
48 | *
49 | * \remark Slave mode isn't currently handled
50 | *
51 | * \param [IN] obj SPI object
52 | * \param [IN] bits Number of bits to be used. [8 or 16]
53 | * \param [IN] cpol Clock polarity
54 | * \param [IN] cpha Clock phase
55 | * \param [IN] slave When set the peripheral acts in slave mode
56 | */
57 | void SpiFormat( Spi_t *obj, int8_t bits, int8_t cpol, int8_t cpha, int8_t slave );
58 |
59 | /*!
60 | * \brief Sets the SPI speed
61 | *
62 | * \param [IN] obj SPI object
63 | * \param [IN] hz SPI clock frequency in hz
64 | */
65 | void SpiFrequency( Spi_t *obj, uint32_t hz );
66 |
67 | /*!
68 | * \brief Sends outData and receives inData
69 | *
70 | * \param [IN] obj SPI object
71 | * \param [IN] outData Byte to be sent
72 | * \retval inData Received byte.
73 | */
74 | uint16_t SpiInOut( Spi_t *obj, uint16_t outData );
75 |
76 | #endif // __SPI_H__
77 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/timer.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Timer objects and scheduling management
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __TIMER_H__
16 | #define __TIMER_H__
17 |
18 | /*!
19 | * \brief Timer object description
20 | */
21 | typedef struct TimerEvent_s
22 | {
23 | uint32_t Timestamp; //! Current timer value
24 | uint32_t ReloadValue; //! Timer delay value
25 | bool IsRunning; //! Is the timer currently running
26 | void ( *Callback )( void ); //! Timer IRQ callback function
27 | struct TimerEvent_s *Next; //! Pointer to the next Timer object.
28 | }TimerEvent_t;
29 |
30 | /*!
31 | * \brief Timer time variable definition
32 | */
33 | #ifndef TimerTime_t
34 | typedef uint32_t TimerTime_t;
35 | #endif
36 |
37 | /*!
38 | * \brief Initializes the timer object
39 | *
40 | * \remark TimerSetValue function must be called before starting the timer.
41 | * this function initializes timestamp and reload value at 0.
42 | *
43 | * \param [IN] obj Structure containing the timer object parameters
44 | * \param [IN] callback Function callback called at the end of the timeout
45 | */
46 | void TimerInit( TimerEvent_t *obj, void ( *callback )( void ) );
47 |
48 | /*!
49 | * Timer IRQ event handler
50 | */
51 | void TimerIrqHandler( void );
52 |
53 | /*!
54 | * \brief Starts and adds the timer object to the list of timer events
55 | *
56 | * \param [IN] obj Structure containing the timer object parameters
57 | */
58 | void TimerStart( TimerEvent_t *obj );
59 |
60 | /*!
61 | * \brief Stops and removes the timer object from the list of timer events
62 | *
63 | * \param [IN] obj Structure containing the timer object parameters
64 | */
65 | void TimerStop( TimerEvent_t *obj );
66 |
67 | /*!
68 | * \brief Resets the timer object
69 | *
70 | * \param [IN] obj Structure containing the timer object parameters
71 | */
72 | void TimerReset( TimerEvent_t *obj );
73 |
74 | /*!
75 | * \brief Set timer new timeout value
76 | *
77 | * \param [IN] obj Structure containing the timer object parameters
78 | * \param [IN] value New timer timeout value
79 | */
80 | void TimerSetValue( TimerEvent_t *obj, uint32_t value );
81 |
82 | /*!
83 | * \brief Read the current time
84 | *
85 | * \retval time returns current time
86 | */
87 | TimerTime_t TimerGetCurrentTime( void );
88 |
89 | /*!
90 | * \brief Return the Time elapsed since a fix moment in Time
91 | *
92 | * \param [IN] savedTime fix moment in Time
93 | * \retval time returns elapsed time
94 | */
95 | TimerTime_t TimerGetElapsedTime( TimerTime_t savedTime );
96 |
97 | /*!
98 | * \brief Return the Time elapsed since a fix moment in Time
99 | *
100 | * \param [IN] eventInFuture fix moment in the future
101 | * \retval time returns difference between now and future event
102 | */
103 | TimerTime_t TimerGetFutureTime( TimerTime_t eventInFuture );
104 |
105 | /*!
106 | * \brief Manages the entry into ARM cortex deep-sleep mode
107 | */
108 | void TimerLowPowerHandler( void );
109 |
110 | #endif // __TIMER_H__
111 |
--------------------------------------------------------------------------------
/src/LoRaWAN/master/system/uart.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Implements the generic UART driver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __UART_H__
16 | #define __UART_H__
17 |
18 | #include "fifo.h"
19 |
20 | /*!
21 | * UART notification identifier
22 | */
23 | typedef enum
24 | {
25 | UART_NOTIFY_TX,
26 | UART_NOTIFY_RX
27 | }UartNotifyId_t;
28 |
29 | /*!
30 | * UART object type definition
31 | */
32 | typedef struct
33 | {
34 | uint8_t UartId;
35 | bool IsInitialized;
36 | Gpio_t Tx;
37 | Gpio_t Rx;
38 | Fifo_t FifoTx;
39 | Fifo_t FifoRx;
40 | /*!
41 | * IRQ user notification callback prototype.
42 | */
43 | void ( *IrqNotify )( UartNotifyId_t id );
44 | }Uart_t;
45 |
46 | /*!
47 | * Operation Mode for the UART
48 | */
49 | typedef enum
50 | {
51 | TX_ONLY = 0,
52 | RX_ONLY,
53 | RX_TX
54 | }UartMode_t;
55 |
56 | /*!
57 | * UART word length
58 | */
59 | typedef enum
60 | {
61 | UART_8_BIT = 0,
62 | UART_9_BIT
63 | }WordLength_t;
64 |
65 | /*!
66 | * UART stop bits
67 | */
68 | typedef enum
69 | {
70 | UART_1_STOP_BIT = 0,
71 | UART_0_5_STOP_BIT,
72 | UART_2_STOP_BIT,
73 | UART_1_5_STOP_BIT
74 | }StopBits_t;
75 |
76 | /*!
77 | * UART parity
78 | */
79 | typedef enum
80 | {
81 | NO_PARITY = 0,
82 | EVEN_PARITY,
83 | ODD_PARITY
84 | }Parity_t;
85 |
86 | /*!
87 | * UART flow control
88 | */
89 | typedef enum
90 | {
91 | NO_FLOW_CTRL = 0,
92 | RTS_FLOW_CTRL,
93 | CTS_FLOW_CTRL,
94 | RTS_CTS_FLOW_CTRL
95 | }FlowCtrl_t;
96 |
97 | /*!
98 | * \brief Initializes the UART object and MCU peripheral
99 | *
100 | * \param [IN] obj UART object
101 | * \param [IN] tx UART Tx pin name to be used
102 | * \param [IN] rx UART Rx pin name to be used
103 | */
104 | void UartInit( Uart_t *obj, uint8_t uartId, PinNames tx, PinNames rx );
105 |
106 | /*!
107 | * \brief Configures the UART object and MCU peripheral
108 | *
109 | * \remark UartInit function must be called first.
110 | *
111 | * \param [IN] obj UART object
112 | * \param [IN] mode Mode of operation for the UART
113 | * \param [IN] baudrate UART baudrate
114 | * \param [IN] wordLength packet length
115 | * \param [IN] stopBits stop bits setup
116 | * \param [IN] parity packet parity
117 | * \param [IN] flowCtrl UART flow control
118 | */
119 | void UartConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopBits_t stopBits, Parity_t parity, FlowCtrl_t flowCtrl );
120 |
121 | /*!
122 | * \brief DeInitializes the UART object and MCU pin
123 | *
124 | * \param [IN] obj UART object
125 | */
126 | void UartDeInit( Uart_t *obj );
127 |
128 | /*!
129 | * \brief Sends a character to the UART
130 | *
131 | * \param [IN] obj UART object
132 | * \param [IN] data Character to be sent
133 | * \retval status [0: OK, 1: Busy]
134 | */
135 | uint8_t UartPutChar( Uart_t *obj, uint8_t data );
136 |
137 | /*!
138 | * \brief Gets a character from the UART
139 | *
140 | * \param [IN] obj UART object
141 | * \param [IN] data Received character
142 | * \retval status [0: OK, 1: Busy]
143 | */
144 | uint8_t UartGetChar( Uart_t *obj, uint8_t *data );
145 |
146 | /*!
147 | * \brief Sends a buffer to the UART
148 | *
149 | * \param [IN] obj UART object
150 | * \param [IN] buffer Buffer to be sent
151 | * \param [IN] size Buffer size
152 | * \retval status [0: OK, 1: Busy]
153 | */
154 | uint8_t UartPutBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size );
155 |
156 | /*!
157 | * \brief Gets a character from the UART
158 | *
159 | * \param [IN] obj UART object
160 | * \param [IN] buffer Buffer to be sent
161 | * \param [IN] size Buffer size
162 | * \param [OUT] nbReadBytes Number of bytes really read
163 | * \retval status [0: OK, 1: Busy]
164 | */
165 | uint8_t UartGetBuffer( Uart_t *obj, uint8_t *buffer, uint16_t size, uint16_t *nbReadBytes );
166 |
167 | #endif // __UART_H__
168 |
--------------------------------------------------------------------------------
/src/application/RAK811/Comissioning.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2015 Semtech
8 |
9 | Description: End device commissioning parameters
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __LORA_COMMISSIONING_H__
16 | #define __LORA_COMMISSIONING_H__
17 |
18 | /*!
19 | * When set to 1 the application uses the Over-the-Air activation procedure
20 | * When set to 0 the application uses the Personalization activation procedure
21 | */
22 | #define OVER_THE_AIR_ACTIVATION 0
23 |
24 | /*!
25 | * Indicates if the end-device is to be connected to a private or public network
26 | */
27 | #define LORAWAN_PUBLIC_NETWORK true
28 |
29 | /*!
30 | * IEEE Organizationally Unique Identifier ( OUI ) (big endian)
31 | */
32 | #define IEEE_OUI 0x00, 0x00, 0x00
33 |
34 | /*!
35 | * Mote device IEEE EUI (big endian)
36 | *
37 | * \remark In this application the value is automatically generated by calling
38 | * BoardGetUniqueId function
39 | */
40 | #define LORAWAN_DEVICE_EUI { IEEE_OUI, 0x00, 0x00, 0x00, 0x00, 0x00 }
41 |
42 | /*!
43 | * Application IEEE EUI (big endian)
44 | */
45 | #define LORAWAN_APPLICATION_EUI { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
46 |
47 | /*!
48 | * AES encryption/decryption cipher application key
49 | */
50 | #define LORAWAN_APPLICATION_KEY { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
51 |
52 | /*!
53 | * Current network ID
54 | */
55 | #define LORAWAN_NETWORK_ID ( uint32_t )0
56 |
57 | /*!
58 | * Device address on the network (big endian)
59 | *
60 | * \remark In this application the value is automatically generated using
61 | * a pseudo random generator seeded with a value derived from
62 | * BoardUniqueId value if LORAWAN_DEVICE_ADDRESS is set to 0
63 | */
64 |
65 | #define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x26012347
66 |
67 | /*!
68 | * AES encryption/decryption cipher network session key
69 | */
70 | #define LORAWAN_NWKSKEY { 0x7D, 0xD9, 0x1C, 0x7E, 0x79, 0xAD, 0x0F, 0xE1, 0xF9, 0xA7, 0x48, 0x48, 0x5E, 0x6C, 0xDE, 0xB7}
71 | //7DD91C7E79AD0FE1F9A748485E6CDEB7
72 | /*!
73 | * AES encryption/decryption cipher application session key
74 | */
75 | #define LORAWAN_APPSKEY { 0xC9, 0x1C, 0x41, 0xDE, 0x93, 0x1C, 0xEE, 0xE8, 0x1E, 0x35, 0x17, 0xAA, 0x5A, 0xC2, 0x9F, 0xFC }
76 | //C91C41DE931CEEE81E3517AA5AC29FFC
77 |
78 | #endif // __LORA_COMMISSIONING_H__
79 |
--------------------------------------------------------------------------------
/src/application/RAK811/app.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: LoRaMac classA device implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 |
16 | //#define LORA_HF_BOARD
17 |
18 | /*! \file classA/LoRaMote/main.c */
19 | #include
20 | #include
21 | #include "board.h"
22 |
23 | #include "app.h"
24 | #include "rw_lora.h"
25 | #include "rw_sys.h"
26 |
27 | lora_config_t g_lora_config;
28 |
29 | extern void lora_cli_loop(void);
30 |
31 | int main( void )
32 | {
33 | uart_config_t uart_config;
34 |
35 | BoardInitMcu( );
36 |
37 | if (read_partition(PARTITION_1, (char *)&uart_config, sizeof(uart_config)) < 0) {
38 | SET_UART_CONFIG_DEFAULT(uart_config);
39 | }
40 |
41 | UartMcuInit(&Uart1, 1, UART_TX, UART_RX);
42 | UartMcuConfig(&Uart1, RX_TX, uart_config.baudrate,
43 | uart_config.wordLength,
44 | uart_config.stopBits,
45 | uart_config.parity,
46 | uart_config.flowCtrl);
47 |
48 | e_printf("Welcome to RAK811.\r\n");
49 |
50 | rw_ReadUsrConfig();
51 |
52 | rw_InitLoRaWAN();
53 |
54 | rw_LoadUsrConfig();
55 |
56 | GPIOIRQ_Enable();
57 |
58 |
59 | #if 0
60 | DelayMs(5000);
61 | enter_sleep();
62 | #endif
63 | e_printf("Initialization OK!\r\n");
64 | while(1) {
65 | lora_cli_loop();
66 | TimerLowPowerHandler( );
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/src/application/RAK811/app.h:
--------------------------------------------------------------------------------
1 | #ifndef _APP_H_
2 | #define _APP_H_
3 | #include "board.h"
4 | #include "LoRaMac.h"
5 | #include "Region.h"
6 | #include "lora_config.h"
7 | #include "partition.h"
8 | #include "log.h"
9 | #include "cmd_error.h"
10 | #include "rw_assert.h"
11 |
12 |
13 | #define MAJOR_VER 2
14 | #ifdef LORA_HF_BOARD
15 | #define CUSTOM_VER 0 //HF
16 | #else
17 | #define CUSTOM_VER 1 //LF
18 | #endif
19 | #define FUN_VER 3
20 | #define BUG_VER 4 //fit TTN and LoRaServer at region CN470
21 | #define TEST_VER 1 // 1 test uplink downlink
22 | // 2 actility cert test
23 | // 3 HSI cabrit
24 | // 4 actility cert TPIT 4.4
25 | // 5 Fixed a situation where there was no response after waking up in sleep mode.
26 | // 6 Integrate all bands and use the command to switch regions
27 | // 7 Fix i2c access 0 address problem
28 |
29 |
30 | /*!
31 | * LoRaMac datarates definition
32 | */
33 | #define SF_12 12 // SF12 - BW125
34 | #define SF_11 11 // SF11 - BW125
35 | #define SF_10 10 // SF10 - BW125
36 | #define SF_9 9 // SF9 - BW125
37 | #define SF_8 8 // SF8 - BW125
38 | #define SF_7 7 // SF7 - BW125
39 | #define SF_6 6 // SF7 - BW250
40 |
41 | enum lora_event{
42 | LORA_EVENT_RECV_DATA = 0,
43 | LORA_EVENT_TX_COMFIRMED = 1,
44 | LORA_EVENT_TX_UNCOMFIRMED = 2,
45 | LORA_EVENT_JOINED_OTAA = 3,
46 | LORA_EVENT_JOINED_FAILED = 4,
47 | LORA_EVENT_TX_TIMEOUT = 5,
48 | LORA_EVENT_RX2_TIMEOUT = 6,
49 | LORA_EVENT_DOWNLINK_REPEATED = 7,
50 | LORA_EVENT_WAKEUP = 8,
51 | /**Lora P2P define**/
52 | LORA_EVENT_P2PTX_COMPLETE = 9,
53 | LORA_EVENT_LINK_CHECK = 10,
54 | LORA_EVENT_UNKNOWN = 100,
55 | };
56 |
57 |
58 | #define SET_UART_CONFIG_DEFAULT(a) {\
59 | uart_config_t temp = DEFAULT_VALUE;\
60 | memcpy(&a, &temp, sizeof(temp));\
61 | write_partition(PARTITION_1, (char *)&a, sizeof(a));\
62 | }\
63 |
64 |
65 | extern lora_config_t g_lora_config;
66 | extern lora_system_t g_lora_system;
67 |
68 | extern TimerTime_t SendRadioP2PFrame( S_LORAP2P_PARAM LoraP2PParams, void *fBuffer, uint16_t fBufferSize);
69 | extern RadioState_t RxRadioP2PFrame( S_LORAP2P_PARAM LoraP2PParams );
70 |
71 | #endif
--------------------------------------------------------------------------------
/src/application/RAK811/at_cmd.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/src/application/RAK811/at_cmd.c
--------------------------------------------------------------------------------
/src/application/RAK811/cmd_error.h:
--------------------------------------------------------------------------------
1 | #ifndef _CMD_ERROR_
2 | #define _CMD_ERROR_
3 |
4 | enum cmd_error {
5 | RAK_UNKNOWN_ERR = -20,
6 | RAK_TX_LEN_LIMITE_ERR = -13,
7 | RAK_RD_CFG_ERR = -12,
8 | RAK_WR_CFG_ERR = -11,
9 | RAK_INTER_ERR = -8,
10 | RAK_TX_ERR = -7,
11 | RAK_MAC_BUSY_ERR = -6,
12 | RAK_NOT_JOIN = -5,
13 | RAK_JOIN_OTAA_ERR = -4,
14 | RAK_JOIN_ABP_ERR = -3,
15 | RAK_ARG_NOT_FIND = -2,
16 | RAK_ARG_ERR = -1,
17 | RAK_OK = 0,
18 | };
19 |
20 | #endif
--------------------------------------------------------------------------------
/src/application/RAK811/log.h:
--------------------------------------------------------------------------------
1 | #ifndef _LOG_H_
2 | #define _LOG_H_
3 |
4 |
5 | #ifdef USE_DEBUGGER
6 |
7 | #define DPRINTF(...) e_printf(__VA_ARGS__)
8 | #else
9 | #define DPRINTF(...)
10 |
11 | #endif
12 |
13 | #endif
--------------------------------------------------------------------------------
/src/application/RAK811/lora_config.h:
--------------------------------------------------------------------------------
1 | #ifndef _LORA_CONFIG_H_
2 | #define _LORA_CONFIG_H_
3 |
4 |
5 | typedef struct {
6 | uint8_t dr;
7 | uint32_t freq;
8 | }rx2_t;
9 |
10 |
11 |
12 | typedef struct _lorap2p_param{
13 | /*!
14 | * Frequency in Hz
15 | */
16 | uint32_t Frequency;
17 | /*!
18 | * Spreading factor
19 | * [6, 7, 8, 9, 10, 11, 12]
20 | */
21 | uint8_t Spreadfact;
22 | /*!
23 | * Bandwidth
24 | * [0: 125 kHz, 1: 250 kHz, 2: 500 kHz]
25 | */
26 | uint8_t Bandwidth;
27 | /*!
28 | * Coding Rate
29 | * [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8]
30 | */
31 | uint8_t Codingrate;
32 | /*!
33 | * Preamble Length
34 | * [5-65535]
35 | */
36 | uint16_t Preamlen;
37 | /*!
38 | * Power dbm
39 | * [5-20]
40 | */
41 | uint8_t Powerdbm;
42 | }S_LORAP2P_PARAM;
43 |
44 | typedef struct{
45 | uint8_t loraWan_class;
46 | uint8_t region[16]; //region string "EU868"
47 | uint8_t dev_addr[4];
48 | uint8_t dev_eui[8];
49 | uint8_t app_eui[8];
50 | uint8_t app_key[16];
51 | uint8_t nwks_key[16];
52 | uint8_t apps_key[16];
53 |
54 | ChannelParams_t ch_list[96];
55 | uint8_t max_nb_chs;
56 | uint16_t ch_mask[6];
57 | bool public_network;
58 | bool adr;
59 | bool duty_cycle;
60 | uint8_t tx_power;
61 | uint8_t tx_pwr_level; // TX_POWER_0
62 | uint8_t Rx1DrOffset;
63 | uint32_t rx_delay1;
64 | rx2_t rx2;
65 | uint8_t def_tx_dr;
66 | uint8_t join_cnt; // region different
67 | uint8_t nb_trans; // 1-15
68 | uint8_t ack_retrans;
69 |
70 | uint16_t up_cnt;
71 | uint16_t down_cnt;
72 | /**Add junhua**/
73 | uint8_t reserv[64];
74 | uint8_t lora_mode;
75 | S_LORAP2P_PARAM lorap2p_param;
76 |
77 | }lora_config_t;
78 |
79 |
80 | typedef struct{
81 | uint8_t recv_rssi_en;
82 | uint16_t up_cnt;
83 | uint16_t down_cnt;
84 |
85 | }lora_system_t;
86 |
87 | int read_config(const char *in, char **out);
88 |
89 |
90 | #endif
--------------------------------------------------------------------------------
/src/application/RAK811/partition.h:
--------------------------------------------------------------------------------
1 | #ifndef _PARTITION_H_
2 | #define _PARTITION_H_
3 |
4 |
5 | #define PARTITION_MAGIC_WORD (('R' << 0)|('L' << 8)|('T' << 16)|('H' << 24))
6 |
7 | typedef struct {
8 | uint32_t magic;
9 | uint32_t length;
10 | uint32_t crc;
11 | }table_header_t;
12 |
13 |
14 | typedef enum {
15 | PARTITION_0 = 0,
16 | TABLE_0_0,
17 | TABLE_0_1,
18 | PARTITION_1,
19 | TABLE_1_0,
20 | TABLE_1_1,
21 | }partition_index;
22 |
23 |
24 | #define p_log(...) // e_printf("part:"##__VA_ARGS__)
25 |
26 |
27 | int read_partition(partition_index partition, char *out, uint16_t out_len);
28 |
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/src/application/RAK811/rw_assert.h:
--------------------------------------------------------------------------------
1 | #ifndef _RW_ASSERT_H_
2 | #define _RW_ASSERT_H_
3 |
4 |
5 | #ifdef SYS_ASSERT
6 | #define ASSERT(_cond_) if(!(_cond_)) \
7 | _assert(__FILE__, __LINE__, #_cond_)
8 | #else /* ! SYS_ASSERT */
9 | #define ASSERT(_cond_)
10 | #endif /* SYS_ASSERT */
11 |
12 | void _assert(const char *filename, int lineno,
13 | const char* fail_cond);
14 |
15 | #endif // _RW_ASSERT_H
16 |
--------------------------------------------------------------------------------
/src/application/RAK811/rw_lora.h:
--------------------------------------------------------------------------------
1 | #ifndef _RW_LORA_H_
2 | #define _RW_LORA_H_
3 |
4 |
5 | int rw_InitLoRaWAN(void);
6 | int rw_DeInitLoRaWAN(void);
7 | int rw_ResetLoRaWAN(void);
8 | void rw_ReadUsrConfig(void);
9 | void rw_LoadUsrConfig(void);
10 | int rw_JoinNetworkABP(uint32_t *dev_addr, uint8_t *nwks_key, uint8_t *apps_key);
11 | int rw_JoinNetworkOTAA(uint8_t *dev_eui, uint8_t *app_eui, uint8_t *app_key, uint8_t nb_trials);
12 | int rw_LoRaTxData(bool confirm, uint8_t app_port, uint16_t app_len, uint8_t *app_data);
13 | void rw_GetVersion(char *ver);
14 | void rw_ResetMCU(uint8_t mode);
15 | int rw_LoRaLinkCheck(void);
16 | char* rw_Region2Str(LoRaMacRegion_t region);
17 | LoRaMacRegion_t rw_Str2Region(char* region);
18 | int rw_restore_LoRaWAN_config(LoRaMacRegion_t region, uint8_t No_retain);
19 |
20 | /***Lora P2P add***/
21 | int rw_LoRaP2PTxContinue(uint16_t counts, uint32_t intervalMs, uint16_t tx_len, uint8_t *tx_data);
22 | int rw_LoRaP2PRxContinue(uint8_t report);
23 | void rw_LoRaP2PTxStop(void);
24 | void rw_LoRaP2PRxStop(void);
25 |
26 | #endif
--------------------------------------------------------------------------------
/src/board/RAK811/adc-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Board ADC driver implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Andreas Pella (IMST GmbH), Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __ADC_MCU_H__
16 | #define __ADC_MCU_H__
17 |
18 | /*!
19 | * Register the old AdcMcuReadChannel function to the new function
20 | * which makes an additional parameter available to select the read out channel
21 | */
22 | #define AdcMcuReadChannel( obj, channel ) AdcMcuRead( obj, channel )
23 |
24 | /*!
25 | * ADC resolution
26 | */
27 | typedef enum
28 | {
29 | ADC_12_BIT = 0,
30 | ADC_10_BIT,
31 | ADC_8_BIT,
32 | ADC_6_BIT
33 | }AdcResolution;
34 |
35 | /*!
36 | * ADC conversion trigger
37 | */
38 | typedef enum
39 | {
40 | CONVERT_MANUAL_TRIG = 0,
41 | CONVERT_RISING_EDGE,
42 | CONVERT_FALLING_EDGE,
43 | CONVERT_RISING_FALLING_EDGE
44 | }AdcTriggerConv;
45 |
46 | /*!
47 | * ADC data alignment
48 | */
49 | typedef enum
50 | {
51 | DATA_RIGHT_ALIGNED = 0,
52 | DATA_LEFT_ALIGNED
53 | }AdcDataAlignement;
54 |
55 |
56 | /*!
57 | * ADC conversion mode
58 | */
59 | typedef enum
60 | {
61 | SINGLE_CONVERSION = 0,
62 | CONTIMUOUS_CONVERSION
63 | }AdcNumConversion;
64 |
65 | /*!
66 | * \brief Initializes the ADC object and MCU peripheral
67 | *
68 | * \param [IN] obj ADC object
69 | * \param [IN] scl ADC input pin
70 | */
71 | void AdcMcuInit( Adc_t *obj, PinNames adcInput );
72 |
73 | /*!
74 | * \brief DeInitializes the ADC object and MCU peripheral
75 | *
76 | * \param [IN] obj ADC object
77 | */
78 | void AdcMcuDeInit( Adc_t *obj );
79 |
80 | /*!
81 | * \brief Initializes the ADC internal parameters
82 | *
83 | * \param [IN] obj ADC object
84 | * \param [IN] AdcRes ADC resolution
85 | * \param [IN] AdcNumConv ADC number of conversion
86 | * \param [IN] AdcTrig ADC conversion trigger
87 | * \param [IN] AdcDataAlig ADC data output alignement
88 | */
89 | void AdcMcuFormat( Adc_t *obj, AdcResolution AdcRes, AdcNumConversion AdcNumConv, AdcTriggerConv AdcTrig, AdcDataAlignement AdcDataAlig );
90 |
91 | uint16_t AdcMcuRead( Adc_t *obj, uint8_t channel );
92 |
93 | #endif // __ADC_MCU_H__
94 |
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-gcc/stm32l1xx_md_flash.ld:
--------------------------------------------------------------------------------
1 | /* Memory regions.*/
2 | MEMORY
3 | {
4 | FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K
5 | RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 16K
6 | }
7 |
8 | /* Entry Point */
9 | ENTRY(Reset_Handler)
10 |
11 | _estack = 0x20000000 + 16K;
12 |
13 | /* Define output sections */
14 | SECTIONS
15 | {
16 | .text :
17 | {
18 | KEEP(*(.isr_vector))
19 | *(.text*)
20 |
21 | KEEP(*(.init))
22 | KEEP(*(.fini))
23 |
24 | /* .ctors */
25 | *crtbegin.o(.ctors)
26 | *crtbegin?.o(.ctors)
27 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
28 | *(SORT(.ctors.*))
29 | *(.ctors)
30 |
31 | /* .dtors */
32 | *crtbegin.o(.dtors)
33 | *crtbegin?.o(.dtors)
34 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
35 | *(SORT(.dtors.*))
36 | *(.dtors)
37 |
38 | *(.rodata*)
39 |
40 | KEEP(*(.eh_frame*))
41 | } > FLASH
42 |
43 | .ARM.extab :
44 | {
45 | *(.ARM.extab* .gnu.linkonce.armextab.*)
46 | } > FLASH
47 |
48 | __exidx_start = .;
49 | .ARM.exidx :
50 | {
51 | *(.ARM.exidx* .gnu.linkonce.armexidx.*)
52 | } > FLASH
53 | __exidx_end = .;
54 | __etext = .;
55 |
56 | /* used by the startup to initialize data */
57 | _sidata = __etext;
58 |
59 | .data : AT (__etext)
60 | {
61 | __data_start__ = .;
62 | _sdata = .;
63 | *(vtable)
64 | *(.data*)
65 |
66 | . = ALIGN(4);
67 | /* preinit data */
68 | PROVIDE_HIDDEN (__preinit_array_start = .);
69 | KEEP(*(.preinit_array))
70 | PROVIDE_HIDDEN (__preinit_array_end = .);
71 |
72 | . = ALIGN(4);
73 | /* init data */
74 | PROVIDE_HIDDEN (__init_array_start = .);
75 | KEEP(*(SORT(.init_array.*)))
76 | KEEP(*(.init_array))
77 | PROVIDE_HIDDEN (__init_array_end = .);
78 |
79 |
80 | . = ALIGN(4);
81 | /* finit data */
82 | PROVIDE_HIDDEN (__fini_array_start = .);
83 | KEEP(*(SORT(.fini_array.*)))
84 | KEEP(*(.fini_array))
85 | PROVIDE_HIDDEN (__fini_array_end = .);
86 |
87 | KEEP(*(.jcr*))
88 | . = ALIGN(4);
89 | /* All data end */
90 | __data_end__ = .;
91 | _edata = .;
92 | } > RAM
93 |
94 | .bss :
95 | {
96 | . = ALIGN(4);
97 | __bss_start__ = .;
98 | _sbss = .;
99 | *(.bss*)
100 | *(COMMON)
101 | . = ALIGN(4);
102 | __bss_end__ = .;
103 | _ebss = .;
104 | } > RAM
105 |
106 | .heap (COPY):
107 | {
108 | __end__ = .;
109 | PROVIDE(_end = .);
110 | PROVIDE(end = .);
111 | *(.heap*)
112 | __HeapLimit = .;
113 | } > RAM
114 |
115 | /* .stack_dummy section doesn't contains any symbols. It is only
116 | * used for linker to calculate size of stack sections, and assign
117 | * values to stack symbols later */
118 | .stack_dummy (COPY):
119 | {
120 | *(.stack*)
121 | } > RAM
122 |
123 | /* Set stack top to end of RAM, and stack limit move down by
124 | * size of stack_dummy section */
125 | __StackTop = ORIGIN(RAM) + LENGTH(RAM);
126 | __StackLimit = __StackTop - SIZEOF(.stack_dummy);
127 | PROVIDE(__stack = __StackTop);
128 |
129 | /* Check if data + heap + stack exceeds RAM limit */
130 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
131 | }
132 |
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xb_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x200027FF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xb_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x20000000;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20000000;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xba_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xba_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xc_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l100xc_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xb_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xb_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xba_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xba_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xc_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xc_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xca_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xca_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xd_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0805FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xd_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xdx_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0802FFFF;
9 | define symbol __ICFEDIT_region_ROM1_start__ = 0x08040000 ;
10 | define symbol __ICFEDIT_region_ROM1_end__ = 0x0806FFFF;
11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
12 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x400;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] |
21 | mem:[from __ICFEDIT_region_ROM1_start__ to __ICFEDIT_region_ROM1_end__];
22 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xdx_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xe_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l151xe_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xb_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xb_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xba_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xba_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xc_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xc_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xca_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xca_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xd_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0805FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xd_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xdx_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0802FFFF;
9 | define symbol __ICFEDIT_region_ROM1_start__ = 0x08040000 ;
10 | define symbol __ICFEDIT_region_ROM1_end__ = 0x0806FFFF;
11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
12 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x400;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] |
21 | mem:[from __ICFEDIT_region_ROM1_start__ to __ICFEDIT_region_ROM1_end__];
22 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xdx_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xe_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l152xe_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xc_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xc_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xca_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xca_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20007FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xd_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0805FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xd_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xdx_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0802FFFF;
9 | define symbol __ICFEDIT_region_ROM1_start__ = 0x08040000 ;
10 | define symbol __ICFEDIT_region_ROM1_end__ = 0x0806FFFF;
11 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
12 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
13 | /*-Sizes-*/
14 | define symbol __ICFEDIT_size_cstack__ = 0x400;
15 | define symbol __ICFEDIT_size_heap__ = 0x200;
16 | /**** End of ICF editor section. ###ICF###*/
17 |
18 |
19 | define memory mem with size = 4G;
20 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__] |
21 | mem:[from __ICFEDIT_region_ROM1_start__ to __ICFEDIT_region_ROM1_end__];
22 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
23 |
24 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
25 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
26 |
27 | initialize by copy { readwrite };
28 | do not initialize { section .noinit };
29 |
30 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
31 |
32 | place in ROM_region { readonly };
33 | place in RAM_region { readwrite,
34 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xdx_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x2000BFFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xe_flash.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x08000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/arm-iar/linker/stm32l162xe_sram.icf:
--------------------------------------------------------------------------------
1 | /*###ICF### Section handled by ICF editor, don't touch! ****/
2 | /*-Editor annotation file-*/
3 | /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
4 | /*-Specials-*/
5 | define symbol __ICFEDIT_intvec_start__ = 0x20000000;
6 | /*-Memory Regions-*/
7 | define symbol __ICFEDIT_region_ROM_start__ = 0x20000000 ;
8 | define symbol __ICFEDIT_region_ROM_end__ = 0x200013FF;
9 | define symbol __ICFEDIT_region_RAM_start__ = 0x20001400;
10 | define symbol __ICFEDIT_region_RAM_end__ = 0x20013FFF;
11 | /*-Sizes-*/
12 | define symbol __ICFEDIT_size_cstack__ = 0x400;
13 | define symbol __ICFEDIT_size_heap__ = 0x200;
14 | /**** End of ICF editor section. ###ICF###*/
15 |
16 |
17 | define memory mem with size = 4G;
18 | define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
19 | define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
20 |
21 | define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
22 | define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
23 |
24 | initialize by copy { readwrite };
25 | do not initialize { section .noinit };
26 |
27 | place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
28 |
29 | place in ROM_region { readonly };
30 | place in RAM_region { readwrite,
31 | block CSTACK, block HEAP };
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/mxconstants.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * File Name : mxconstants.h
4 | * Description : This file contains the common defines of the application
5 | ******************************************************************************
6 | *
7 | * COPYRIGHT(c) 2016 STMicroelectronics
8 | *
9 | * Redistribution and use in source and binary forms, with or without modification,
10 | * are permitted provided that the following conditions are met:
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
17 | * may be used to endorse or promote products derived from this software
18 | * without specific prior written permission.
19 | *
20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | *
31 | ******************************************************************************
32 | */
33 | /* Includes ------------------------------------------------------------------*/
34 |
35 | /* USER CODE BEGIN Includes */
36 |
37 | /* USER CODE END Includes */
38 |
39 | /* Private define ------------------------------------------------------------*/
40 |
41 | /* USER CODE BEGIN Private defines */
42 |
43 | /* USER CODE END Private defines */
44 |
45 | /**
46 | * @}
47 | */
48 |
49 | /**
50 | * @}
51 | */
52 |
53 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
54 |
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/stm32l151xb.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/src/board/RAK811/cmsis/stm32l151xb.h
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/stm32l151xba.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/src/board/RAK811/cmsis/stm32l151xba.h
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/stm32l1xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RAKWireless/RAK811_LoRaNode/a50b0baa68d74546121c651004e2806615853833/src/board/RAK811/cmsis/stm32l1xx.h
--------------------------------------------------------------------------------
/src/board/RAK811/cmsis/system_stm32l1xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32l1xx.h
4 | * @author MCD Application Team
5 | * @version V2.1.3
6 | * @date 04-March-2016
7 | * @brief CMSIS Cortex-M3 Device System Source File for STM32L1xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT(c) 2016 STMicroelectronics
12 | *
13 | * Redistribution and use in source and binary forms, with or without modification,
14 | * are permitted provided that the following conditions are met:
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | * 2. Redistributions in binary form must reproduce the above copyright notice,
18 | * this list of conditions and the following disclaimer in the documentation
19 | * and/or other materials provided with the distribution.
20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 | * may be used to endorse or promote products derived from this software
22 | * without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | ******************************************************************************
36 | */
37 |
38 | /** @addtogroup CMSIS
39 | * @{
40 | */
41 |
42 | /** @addtogroup stm32l1xx_system
43 | * @{
44 | */
45 |
46 | /**
47 | * @brief Define to prevent recursive inclusion
48 | */
49 | #ifndef __SYSTEM_STM32L1XX_H
50 | #define __SYSTEM_STM32L1XX_H
51 |
52 | #ifdef __cplusplus
53 | extern "C" {
54 | #endif
55 |
56 | /** @addtogroup STM32L1xx_System_Includes
57 | * @{
58 | */
59 |
60 | /**
61 | * @}
62 | */
63 |
64 |
65 | /** @addtogroup STM32L1xx_System_Exported_types
66 | * @{
67 | */
68 | /* This variable is updated in three ways:
69 | 1) by calling CMSIS function SystemCoreClockUpdate()
70 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq()
71 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
72 | Note: If you use this function to configure the system clock; then there
73 | is no need to call the 2 first functions listed above, since SystemCoreClock
74 | variable is updated automatically.
75 | */
76 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
77 | /*
78 | */
79 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
80 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
81 | extern const uint8_t PLLMulTable[9]; /*!< PLL multipiers table values */
82 |
83 | /**
84 | * @}
85 | */
86 |
87 | /** @addtogroup STM32L1xx_System_Exported_Constants
88 | * @{
89 | */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /** @addtogroup STM32L1xx_System_Exported_Macros
96 | * @{
97 | */
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /** @addtogroup STM32L1xx_System_Exported_Functions
104 | * @{
105 | */
106 |
107 | extern void SystemInit(void);
108 | extern void SystemCoreClockUpdate(void);
109 | /**
110 | * @}
111 | */
112 |
113 | #ifdef __cplusplus
114 | }
115 | #endif
116 |
117 | #endif /*__SYSTEM_STM32L1XX_H */
118 |
119 | /**
120 | * @}
121 | */
122 |
123 | /**
124 | * @}
125 | */
126 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
127 |
--------------------------------------------------------------------------------
/src/board/RAK811/gpio-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper board GPIO driver implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __GPIO_MCU_H__
16 | #define __GPIO_MCU_H__
17 |
18 | /*!
19 | * \brief Initializes the given GPIO object
20 | *
21 | * \param [IN] obj Pointer to the GPIO object to be initialized
22 | * \param [IN] pin Pin name ( please look in pinName-board.h file )
23 | * \param [IN] mode Pin mode [PIN_INPUT, PIN_OUTPUT,
24 | * PIN_ALTERNATE_FCT, PIN_ANALOGIC]
25 | * \param [IN] config Pin config [PIN_PUSH_PULL, PIN_OPEN_DRAIN]
26 | * \param [IN] type Pin type [PIN_NO_PULL, PIN_PULL_UP, PIN_PULL_DOWN]
27 | * \param [IN] value Default output value at initialisation
28 | */
29 | void GpioMcuInit( Gpio_t *obj, PinNames pin, PinModes mode, PinConfigs config, PinTypes type, uint32_t value );
30 |
31 | /*!
32 | * \brief GPIO IRQ Initialization
33 | *
34 | * \param [IN] obj Pointer to the GPIO object to be initialized
35 | * \param [IN] irqMode IRQ mode [NO_IRQ, IRQ_RISING_EDGE,
36 | * IRQ_FALLING_EDGE, IRQ_RISING_FALLING_EDGE]
37 | * \param [IN] irqPriority IRQ priority [IRQ_VERY_LOW_PRIORITY, IRQ_LOW_PRIORITY
38 | * IRQ_MEDIUM_PRIORITY, IRQ_HIGH_PRIORITY
39 | * IRQ_VERY_HIGH_PRIORITY]
40 | * \param [IN] irqHandler Callback function pointer
41 | */
42 | void GpioMcuSetInterrupt( Gpio_t *obj, IrqModes irqMode, IrqPriorities irqPriority, GpioIrqHandler *irqHandler );
43 |
44 | /*!
45 | * \brief GPIO IRQ DeInitialization
46 | *
47 | * \param [IN] obj Pointer to the GPIO object to be Deinitialized
48 | */
49 | void GpioMcuRemoveInterrupt( Gpio_t *obj );
50 |
51 | /*!
52 | * \brief Writes the given value to the GPIO output
53 | *
54 | * \param [IN] obj Pointer to the GPIO object
55 | * \param [IN] value New GPIO output value
56 | */
57 | void GpioMcuWrite( Gpio_t *obj, uint32_t value );
58 |
59 | /*!
60 | * \brief Toggle the value to the GPIO output
61 | *
62 | * \param [IN] obj Pointer to the GPIO object
63 | */
64 | void GpioMcuToggle( Gpio_t *obj );
65 |
66 | /*!
67 | * \brief Reads the current GPIO input value
68 | *
69 | * \param [IN] obj Pointer to the GPIO object
70 | * \retval value Current GPIO input value
71 | */
72 | uint32_t GpioMcuRead( Gpio_t *obj );
73 |
74 | #endif // __GPIO_MCU_H__
75 |
--------------------------------------------------------------------------------
/src/board/RAK811/gps-board.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Generic low level driver for GPS receiver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include "board.h"
16 |
17 | /*!
18 | * FIFO buffers size
19 | */
20 | //#define FIFO_TX_SIZE 128
21 | //#define FIFO_RX_SIZE 128
22 |
23 | //uint8_t TxBuffer[FIFO_TX_SIZE];
24 |
25 |
26 | /*!
27 | * \brief Buffer holding the raw data received from the gps
28 | */
29 | uint8_t NmeaString[128];
30 |
31 | /*!
32 | * \brief Maximum number of data byte that we will accept from the GPS
33 | */
34 | uint8_t NmeaStringSize = 0;
35 |
36 | Gpio_t GpsPowerEn;
37 | PpsTrigger_t PpsTrigger;
38 |
39 | void GpsMcuOnPpsSignal( void )
40 | {
41 | #ifdef GPS_POWER_ON
42 | bool parseData = true;
43 |
44 | //GpsPpsHandler( &parseData );
45 |
46 | if( parseData == true )
47 | {
48 | UartMcuInit( &GpsUart, GPS_UART, GPS_UART_TX, GPS_UART_RX );
49 | UartMcuConfig( &GpsUart, RX_ONLY, 9600, UART_8_BIT, UART_1_STOP_BIT, NO_PARITY, NO_FLOW_CTRL );
50 | }
51 | #endif
52 | }
53 |
54 | void GpsMcuInvertPpsTrigger( void )
55 | {
56 | #if 0
57 | if( PpsTrigger == PpsTriggerIsRising )
58 | {
59 | PpsTrigger = PpsTriggerIsFalling;
60 | GpioSetInterrupt( &GpsPps, IRQ_FALLING_EDGE, IRQ_VERY_LOW_PRIORITY, &GpsMcuOnPpsSignal );
61 | }
62 | else
63 | {
64 | PpsTrigger = PpsTriggerIsRising;
65 | GpioSetInterrupt( &GpsPps, IRQ_RISING_EDGE, IRQ_VERY_LOW_PRIORITY, &GpsMcuOnPpsSignal );
66 | }
67 | #endif
68 | }
69 |
70 | void GpsMcuInit( void )
71 | {
72 | NmeaStringSize = 0;
73 | PpsTrigger = PpsTriggerIsFalling;
74 |
75 | #ifdef GPS_POWER_ON
76 | GpioInit( &GpsPowerEn, GPS_POWER_ON_PIN, PIN_OUTPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
77 | #endif
78 |
79 | #ifdef GPS_PPS
80 | GpioInit( &GpsPps, GPS_PPS_PIN, PIN_INPUT, PIN_PUSH_PULL, PIN_NO_PULL, 0 );
81 | GpioSetInterrupt( &GpsPps, IRQ_FALLING_EDGE, IRQ_VERY_LOW_PRIORITY, &GpsMcuOnPpsSignal );
82 | #endif
83 |
84 | #ifdef GPS_UART_EN
85 | //FifoInit( &GpsUart.FifoRx, RxBuffer, FIFO_RX_SIZE );
86 | GpsUart.IrqNotify = GpsMcuIrqNotify;
87 | #endif
88 |
89 | GpsMcuStart( );
90 |
91 | GpsMcuOnPpsSignal();
92 | }
93 |
94 | void GpsMcuStart( void )
95 | {
96 | #ifdef GPS_POWER_ON
97 | GpioWrite( &GpsPowerEn, 1 ); // power up the GPS
98 | #endif
99 | }
100 |
101 | void GpsMcuStop( void )
102 | {
103 | #ifdef GPS_POWER_ON
104 | GpioWrite( &GpsPowerEn, 0 ); // power down the GPS
105 | #endif
106 | }
107 |
108 | void GpsMcuProcess( void )
109 | {
110 |
111 | }
112 |
113 | void GpsMcuIrqNotify( UartNotifyId_t id )
114 | {
115 | #ifdef GPS_POWER_ON
116 | uint8_t data;
117 | if( id == UART_NOTIFY_RX )
118 | {
119 | if( UartMcuGetChar( &GpsUart, &data ) == 0 )
120 | {
121 | if( ( data == '$' ) || ( NmeaStringSize >= 127 ) )
122 | {
123 | NmeaStringSize = 0;
124 | }
125 |
126 | NmeaString[NmeaStringSize++] = ( int8_t )data;
127 |
128 | if( data == '\n' )
129 | {
130 | NmeaString[NmeaStringSize++] = '\0';
131 | //e_printf("%d\n",NmeaStringSize);
132 | GpsParseGpsData( ( int8_t* )NmeaString, NmeaStringSize );
133 | //UartDeInit( &GpsUart );
134 | BlockLowPowerDuringTask ( false );
135 | }
136 | }
137 | }
138 | #endif
139 | }
140 |
--------------------------------------------------------------------------------
/src/board/RAK811/gps-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Generic driver for GPS receiver
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __GPS_BOARD_H__
16 | #define __GPS_BOARD_H__
17 |
18 | /*!
19 | * Select the edge of the PPS signal which is used to start the
20 | * reception of data on the UART. Depending of the GPS, the PPS
21 | * signal may go low or high to indicate the presence of data
22 | */
23 | typedef enum PpsTrigger_s
24 | {
25 | PpsTriggerIsRising = 0,
26 | PpsTriggerIsFalling,
27 | }PpsTrigger_t;
28 |
29 | /*!
30 | * \brief Low level handling of the PPS signal from the GPS receiver
31 | */
32 | void GpsMcuOnPpsSignal( void );
33 |
34 | /*!
35 | * \brief Invert the IRQ trigger edge on the PPS signal
36 | */
37 | void GpsMcuInvertPpsTrigger( void );
38 |
39 | /*!
40 | * \brief Low level Initialisation of the UART and IRQ for the GPS
41 | */
42 | void GpsMcuInit( void );
43 |
44 | /*!
45 | * \brief Switch ON the GPS
46 | */
47 | void GpsMcuStart( void );
48 |
49 | /*!
50 | * \brief Switch OFF the GPS
51 | */
52 | void GpsMcuStop( void );
53 |
54 | /*!
55 | * Updates the GPS status
56 | */
57 | void GpsMcuProcess( void );
58 |
59 | /*!
60 | * \brief IRQ handler for the UART receiver
61 | */
62 | void GpsMcuIrqNotify( UartNotifyId_t id );
63 |
64 | #endif // __GPS_BOARD_H__
65 |
--------------------------------------------------------------------------------
/src/board/RAK811/i2c-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper board I2C driver implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __I2C_MCU_H__
16 | #define __I2C_MCU_H__
17 |
18 | /*!
19 | * Operation Mode for the I2C
20 | */
21 | typedef enum
22 | {
23 | MODE_I2C = 0,
24 | MODE_SMBUS_DEVICE,
25 | MODE_SMBUS_HOST
26 | }I2cMode;
27 |
28 | /*!
29 | * I2C signal duty cycle
30 | */
31 | typedef enum
32 | {
33 | I2C_DUTY_CYCLE_2 = 0,
34 | I2C_DUTY_CYCLE_16_9
35 | }I2cDutyCycle;
36 |
37 | /*!
38 | * I2C select if the acknowledge in after the 7th or 10th bit
39 | */
40 | typedef enum
41 | {
42 | I2C_ACK_ADD_7_BIT = 0,
43 | I2C_ACK_ADD_10_BIT
44 | }I2cAckAddrMode;
45 |
46 | /*!
47 | * Internal device address size
48 | */
49 | typedef enum
50 | {
51 | I2C_ADDR_SIZE_8 = 0,
52 | I2C_ADDR_SIZE_16,
53 | }I2cAddrSize;
54 |
55 | /*!
56 | * \brief Initializes the I2C object and MCU peripheral
57 | *
58 | * \param [IN] obj I2C object
59 | * \param [IN] scl I2C Scl pin name to be used
60 | * \param [IN] sda I2C Sda pin name to be used
61 | */
62 | void I2cMcuInit( I2c_t *obj, PinNames scl, PinNames sda );
63 |
64 | /*!
65 | * \brief Initializes the I2C object and MCU peripheral
66 | *
67 | * \param [IN] obj I2C object
68 | * \param [IN] mode Mode of operation for the I2C Bus
69 | * \param [IN] dutyCycle Signal duty cycle
70 | * \param [IN] I2cAckEnable Enable or Disable to ack
71 | * \param [IN] AckAddrMode 7bit or 10 bit addressing
72 | * \param [IN] I2cFrequency I2C bus clock frequency
73 | */
74 | void I2cMcuFormat( I2c_t *obj, I2cMode mode, I2cDutyCycle dutyCycle, bool I2cAckEnable, I2cAckAddrMode AckAddrMode, uint32_t I2cFrequency );
75 |
76 | /*!
77 | * \brief DeInitializes the I2C object and MCU peripheral
78 | *
79 | * \param [IN] obj I2C object
80 | */
81 | void I2cMcuDeInit( I2c_t *obj );
82 |
83 | /*!
84 | * \brief Write several data to the I2C device
85 | *
86 | * \param [IN] obj I2C object
87 | * \param [IN] deviceAddr device address
88 | * \param [IN] addr register address
89 | * \param [IN] buffer data buffer to write
90 | * \param [IN] size number of data byte to write
91 | */
92 | uint8_t I2cMcuWriteBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size );
93 |
94 | /*!
95 | * \brief Read several data byte from the I2C device
96 | *
97 | * \param [IN] obj I2C object
98 | * \param [IN] deviceAddr device address
99 | * \param [IN] addr register address
100 | * \param [IN] buffer data buffer used to store the data read
101 | * \param [IN] size number of data byte to read
102 | */
103 | uint8_t I2cMcuReadBuffer( I2c_t *obj, uint8_t deviceAddr, uint16_t addr, uint8_t *buffer, uint16_t size );
104 |
105 | /*!
106 | * \brief Waits until the given device is in standby mode
107 | *
108 | * \param [IN] obj I2C object
109 | * \param [IN] deviceAddr device address
110 | */
111 | uint8_t I2cMcuWaitStandbyState( I2c_t *obj, uint8_t deviceAddr );
112 |
113 | /*!
114 | * \brief Sets the internal device address size
115 | *
116 | * \param [IN] obj I2C object
117 | * \param [IN] addrSize Internal address size
118 | */
119 | void I2cSetAddrSize( I2c_t *obj, I2cAddrSize addrSize );
120 |
121 | #endif // __I2C_MCU_H__
122 |
--------------------------------------------------------------------------------
/src/board/RAK811/pinName-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper STM32L151RD microcontroller pins definition
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __PIN_NAME_MCU_H__
16 | #define __PIN_NAME_MCU_H__
17 |
18 | /*!
19 | * STM32 Pin Names
20 | */
21 | #define MCU_PINS \
22 | PA_0 = 0, PA_1, PA_2, PA_3, PA_4, PA_5, PA_6, PA_7, PA_8, PA_9, PA_10, PA_11, PA_12, PA_13, PA_14, PA_15, \
23 | PB_0, PB_1, PB_2, PB_3, PB_4, PB_5, PB_6, PB_7, PB_8, PB_9, PB_10, PB_11, PB_12, PB_13, PB_14, PB_15, \
24 | PC_0, PC_1, PC_2, PC_3, PC_4, PC_5, PC_6, PC_7, PC_8, PC_9, PC_10, PC_11, PC_12, PC_13, PC_14, PC_15, \
25 | PD_0, PD_1, PD_2, PD_3, PD_4, PD_5, PD_6, PD_7, PD_8, PD_9, PD_10, PD_11, PD_12, PD_13, PD_14, PD_15, \
26 | PE_0, PE_1, PE_2, PE_3, PE_4, PE_5, PE_6, PE_7, PE_8, PE_9, PE_10, PE_11, PE_12, PE_13, PE_14, PE_15, \
27 | PF_0, PF_1, PF_2, PF_3, PF_4, PF_5, PF_6, PF_7, PF_8, PF_9, PF_10, PF_11, PF_12, PF_13, PF_14, PF_15, \
28 | PH_0, PH_1, PH_2, PH_3, PH_4, PH_5, PH_6, PH_7, PH_8, PH_9, PH_10, PH_11, PH_12, PH_13, PH_14, PH_15
29 |
30 | #endif // __PIN_NAME_MCU_H__
31 |
--------------------------------------------------------------------------------
/src/board/RAK811/pinName-ioe.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper STM32L151RD microcontroller pins definition
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __PIN_NAME_IOE_H__
16 | #define __PIN_NAME_IOE_H__
17 |
18 | // SX1509 Pin Names
19 | #define IOE_PINS \
20 | IOE_0, IOE_1, IOE_2, IOE_3, IOE_4, IOE_5, IOE_6, IOE_7, \
21 | IOE_8, IOE_9, IOE_10, IOE_11, IOE_12, IOE_13, IOE_14, IOE_15
22 | #endif // __PIN_NAME_IOE_H__
23 |
--------------------------------------------------------------------------------
/src/board/RAK811/rtc-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: MCU RTC timer and low power modes management
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __RTC_BOARD_H__
16 | #define __RTC_BOARD_H__
17 |
18 | /*!
19 | * \brief Timer time variable definition
20 | */
21 | #ifndef TimerTime_t
22 | typedef uint32_t TimerTime_t;
23 | #endif
24 |
25 | /*!
26 | * \brief Initializes the RTC timer
27 | *
28 | * \remark The timer is based on the RTC
29 | */
30 | void RtcInit( void );
31 |
32 | /*!
33 | * \brief Start the RTC timer
34 | *
35 | * \remark The timer is based on the RTC Alarm running at 32.768KHz
36 | *
37 | * \param[IN] timeout Duration of the Timer
38 | */
39 | void RtcSetTimeout( uint32_t timeout );
40 |
41 | /*!
42 | * \brief Adjust the value of the timeout to handle wakeup time from Alarm and GPIO irq
43 | *
44 | * \param[IN] timeout Duration of the Timer without compensation for wakeup time
45 | * \retval new value for the Timeout with compensations
46 | */
47 | TimerTime_t RtcGetAdjustedTimeoutValue( uint32_t timeout );
48 |
49 | /*!
50 | * \brief Get the RTC timer value
51 | *
52 | * \retval RTC Timer value
53 | */
54 | TimerTime_t RtcGetTimerValue( void );
55 |
56 | /*!
57 | * \brief Get the RTC timer elapsed time since the last Alarm was set
58 | *
59 | * \retval RTC Elapsed time since the last alarm
60 | */
61 | TimerTime_t RtcGetElapsedAlarmTime( void );
62 |
63 | /*!
64 | * \brief Compute the timeout time of a future event in time
65 | *
66 | * \param[IN] futureEventInTime Value in time
67 | * \retval time Time between now and the futureEventInTime
68 | */
69 | TimerTime_t RtcComputeFutureEventTime( TimerTime_t futureEventInTime );
70 |
71 | /*!
72 | * \brief Compute the elapsed time since a fix event in time
73 | *
74 | * \param[IN] eventInTime Value in time
75 | * \retval elapsed Time since the eventInTime
76 | */
77 | TimerTime_t RtcComputeElapsedTime( TimerTime_t eventInTime );
78 |
79 | /*!
80 | * \brief This function blocks the MCU from going into Low Power mode
81 | *
82 | * \param [IN] status [true: Enable, false: Disable
83 | */
84 | void BlockLowPowerDuringTask ( bool status );
85 |
86 | /*!
87 | * \brief Sets the MCU into low power STOP mode
88 | */
89 | void RtcEnterLowPowerStopMode( void );
90 |
91 | /*!
92 | * \brief Restore the MCU to its normal operation mode
93 | */
94 | void RtcRecoverMcuStatus( void );
95 |
96 | #endif // __RTC_BOARD_H__
97 |
--------------------------------------------------------------------------------
/src/board/RAK811/spi-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper board SPI driver implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __SPI_MCU_H__
16 | #define __SPI_MCU_H__
17 |
18 | /*!
19 | * SPI driver structure definition
20 | */
21 | struct Spi_s
22 | {
23 | SPI_HandleTypeDef Spi;
24 | Gpio_t Mosi;
25 | Gpio_t Miso;
26 | Gpio_t Sclk;
27 | Gpio_t Nss;
28 | };
29 |
30 | #endif // __SPI_MCU_H__
31 |
--------------------------------------------------------------------------------
/src/board/RAK811/sx1272-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: SX1272 driver specific target board functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __SX1272_ARCH_H__
16 | #define __SX1272_ARCH_H__
17 |
18 | /*!
19 | * \brief Radio hardware registers initialization definition
20 | *
21 | * \remark Can be automatically generated by the SX1272 GUI (not yet implemented)
22 | */
23 | #define RADIO_INIT_REGISTERS_VALUE \
24 | { \
25 | { MODEM_FSK , REG_LNA , 0x23 },\
26 | { MODEM_FSK , REG_RXCONFIG , 0x1E },\
27 | { MODEM_FSK , REG_RSSICONFIG , 0xD2 },\
28 | { MODEM_FSK , REG_AFCFEI , 0x01 },\
29 | { MODEM_FSK , REG_PREAMBLEDETECT , 0xAA },\
30 | { MODEM_FSK , REG_OSC , 0x07 },\
31 | { MODEM_FSK , REG_SYNCCONFIG , 0x12 },\
32 | { MODEM_FSK , REG_SYNCVALUE1 , 0xC1 },\
33 | { MODEM_FSK , REG_SYNCVALUE2 , 0x94 },\
34 | { MODEM_FSK , REG_SYNCVALUE3 , 0xC1 },\
35 | { MODEM_FSK , REG_PACKETCONFIG1 , 0xD8 },\
36 | { MODEM_FSK , REG_FIFOTHRESH , 0x8F },\
37 | { MODEM_FSK , REG_IMAGECAL , 0x02 },\
38 | { MODEM_FSK , REG_DIOMAPPING1 , 0x00 },\
39 | { MODEM_FSK , REG_DIOMAPPING2 , 0x30 },\
40 | { MODEM_LORA, REG_LR_DETECTOPTIMIZE , 0x43 },\
41 | { MODEM_LORA, REG_LR_PAYLOADMAXLENGTH, 0x40 },\
42 | } \
43 |
44 | /*!
45 | * \brief Initializes the radio I/Os pins interface
46 | */
47 | void SX1272IoInit( void );
48 |
49 | /*!
50 | * \brief Initializes DIO IRQ handlers
51 | *
52 | * \param [IN] irqHandlers Array containing the IRQ callback functions
53 | */
54 | void SX1272IoIrqInit( DioIrqHandler **irqHandlers );
55 |
56 | /*!
57 | * \brief De-initializes the radio I/Os pins interface.
58 | *
59 | * \remark Useful when going in MCU lowpower modes
60 | */
61 | void SX1272IoDeInit( void );
62 |
63 | /*!
64 | * \brief Gets the board PA selection configuration
65 | *
66 | * \param [IN] channel Channel frequency in Hz
67 | * \retval PaSelect RegPaConfig PaSelect value
68 | */
69 | uint8_t SX1272GetPaSelect( uint32_t channel );
70 |
71 | /*!
72 | * \brief Set the RF Switch I/Os pins in Low Power mode
73 | *
74 | * \param [IN] status enable or disable
75 | */
76 | void SX1272SetAntSwLowPower( bool status );
77 |
78 | /*!
79 | * \brief Initializes the RF Switch I/Os pins interface
80 | */
81 | void SX1272AntSwInit( void );
82 |
83 | /*!
84 | * \brief De-initializes the RF Switch I/Os pins interface
85 | *
86 | * \remark Needed to decrease the power consumption in MCU lowpower modes
87 | */
88 | void SX1272AntSwDeInit( void );
89 |
90 | /*!
91 | * \brief Controls the antena switch if necessary.
92 | *
93 | * \remark see errata note
94 | *
95 | * \param [IN] rxTx [1: Tx, 0: Rx]
96 | */
97 | void SX1272SetAntSw( uint8_t rxTx );
98 |
99 | /*!
100 | * \brief Checks if the given RF frequency is supported by the hardware
101 | *
102 | * \param [IN] frequency RF frequency to be checked
103 | * \retval isSupported [true: supported, false: unsupported]
104 | */
105 | bool SX1272CheckRfFrequency( uint32_t frequency );
106 |
107 | /*!
108 | * Radio hardware and global parameters
109 | */
110 | extern SX1272_t SX1272;
111 |
112 | #endif // __SX1272_ARCH_H__
113 |
--------------------------------------------------------------------------------
/src/board/RAK811/sx1276-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: SX1276 driver specific target board functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __SX1276_ARCH_H__
16 | #define __SX1276_ARCH_H__
17 |
18 | /*!
19 | * \brief Radio hardware registers initialization definition
20 | *
21 | * \remark Can be automatically generated by the SX1276 GUI (not yet implemented)
22 | */
23 | #define RADIO_INIT_REGISTERS_VALUE \
24 | { \
25 | { MODEM_FSK , REG_LNA , 0x23 },\
26 | { MODEM_FSK , REG_RXCONFIG , 0x1E },\
27 | { MODEM_FSK , REG_RSSICONFIG , 0xD2 },\
28 | { MODEM_FSK , REG_AFCFEI , 0x01 },\
29 | { MODEM_FSK , REG_PREAMBLEDETECT , 0xAA },\
30 | { MODEM_FSK , REG_OSC , 0x07 },\
31 | { MODEM_FSK , REG_SYNCCONFIG , 0x12 },\
32 | { MODEM_FSK , REG_SYNCVALUE1 , 0xC1 },\
33 | { MODEM_FSK , REG_SYNCVALUE2 , 0x94 },\
34 | { MODEM_FSK , REG_SYNCVALUE3 , 0xC1 },\
35 | { MODEM_FSK , REG_PACKETCONFIG1 , 0xD8 },\
36 | { MODEM_FSK , REG_FIFOTHRESH , 0x8F },\
37 | { MODEM_FSK , REG_IMAGECAL , 0x02 },\
38 | { MODEM_FSK , REG_DIOMAPPING1 , 0x00 },\
39 | { MODEM_FSK , REG_DIOMAPPING2 , 0x30 },\
40 | { MODEM_LORA, REG_LR_PAYLOADMAXLENGTH, 0x40 },\
41 | } \
42 |
43 | #define RF_MID_BAND_THRESH 950000000 //525000000
44 |
45 | /*!
46 | * \brief Initializes the radio I/Os pins interface
47 | */
48 | void SX1276IoInit( void );
49 |
50 | /*!
51 | * \brief Initializes DIO IRQ handlers
52 | *
53 | * \param [IN] irqHandlers Array containing the IRQ callback functions
54 | */
55 | void SX1276IoIrqInit( DioIrqHandler **irqHandlers );
56 |
57 | /*!
58 | * \brief De-initializes the radio I/Os pins interface.
59 | *
60 | * \remark Useful when going in MCU low power modes
61 | */
62 | void SX1276IoDeInit( void );
63 |
64 | /*!
65 | * \brief Sets the radio output power.
66 | *
67 | * \param [IN] power Sets the RF output power
68 | */
69 | void SX1276SetRfTxPower( int8_t power );
70 |
71 | /*!
72 | * \brief Gets the board PA selection configuration
73 | *
74 | * \param [IN] channel Channel frequency in Hz
75 | * \retval PaSelect RegPaConfig PaSelect value
76 | */
77 | uint8_t SX1276GetPaSelect( uint32_t channel );
78 |
79 | /*!
80 | * \brief Set the RF Switch I/Os pins in Low Power mode
81 | *
82 | * \param [IN] status enable or disable
83 | */
84 | void SX1276SetAntSwLowPower( bool status );
85 |
86 | /*!
87 | * \brief Initializes the RF Switch I/Os pins interface
88 | */
89 | void SX1276AntSwInit( void );
90 |
91 | /*!
92 | * \brief De-initializes the RF Switch I/Os pins interface
93 | *
94 | * \remark Needed to decrease the power consumption in MCU low power modes
95 | */
96 | void SX1276AntSwDeInit( void );
97 |
98 | /*!
99 | * \brief Controls the antenna switch if necessary.
100 | *
101 | * \remark see errata note
102 | *
103 | * \param [IN] opMode Current radio operating mode
104 | */
105 | void SX1276SetAntSw( uint8_t opMode );
106 |
107 | /*!
108 | * \brief Checks if the given RF frequency is supported by the hardware
109 | *
110 | * \param [IN] frequency RF frequency to be checked
111 | * \retval isSupported [true: supported, false: unsupported]
112 | */
113 | bool SX1276CheckRfFrequency( uint32_t frequency );
114 |
115 | /*!
116 | * Radio hardware and global parameters
117 | */
118 | extern SX1276_t SX1276;
119 |
120 | #endif // __SX1276_ARCH_H__
121 |
--------------------------------------------------------------------------------
/src/board/RAK811/sx127X-board.c:
--------------------------------------------------------------------------------
1 | #if defined( SX1272_CHIP )
2 | #include
3 | #else
4 | #include
5 | #endif
--------------------------------------------------------------------------------
/src/board/RAK811/timer-board.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: MCU RTC timer and low power modes management
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include
16 | #include "board.h"
17 | #include "timer-board.h"
18 |
19 | volatile bool TimerIdleSleep = false;
20 | TIM_HandleTypeDef TimHandle;
21 | /**
22 | * @brief This function handles TIM interrupt request.
23 | * @param None
24 | * @retval None
25 | */
26 | void TIM6_IRQHandler(void)
27 | {
28 | HAL_TIM_IRQHandler(&TimHandle);
29 | }
30 |
31 | /**
32 | * @brief TIM MSP Initialization
33 | * This function configures the hardware resources used in this example:
34 | * - Peripheral's clock enable
35 | * - Peripheral's GPIO Configuration
36 | * @param htim: TIM handle pointer
37 | * @retval None
38 | */
39 | void HAL_TIM_OnePulse_MspInit(TIM_HandleTypeDef *htim)
40 | {
41 | /*##-1- Enable peripherals and GPIO Clocks #################################*/
42 | /* TIMx Peripheral clock enable */
43 | __HAL_RCC_TIM6_CLK_ENABLE();
44 |
45 | /*##-2- Configure the NVIC for TIMx ########################################*/
46 | /* Set the TIMx priority */
47 | HAL_NVIC_SetPriority(TIM6_IRQn, 3, 0);
48 |
49 | /* Enable the TIMx global Interrupt */
50 | HAL_NVIC_EnableIRQ(TIM6_IRQn);
51 | }
52 |
53 | void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
54 | {
55 | #if DEBUG_FW
56 | e_printf("haha\r\n");
57 | #endif
58 |
59 | TimerIdleSleep = true;
60 |
61 | }
62 |
63 | void TimerIdleInit(void)
64 | {
65 |
66 | uint32_t uwPrescalerValue = (uint32_t)(SystemCoreClock / 1000) - 1;
67 |
68 |
69 |
70 |
71 |
72 | /* Set TIMx instance */
73 | TimHandle.Instance = TIM6;
74 |
75 | /* Initialize TIMx peripheral as follows:
76 | + Period = 10000 - 1
77 | + Prescaler = (SystemCoreClock/10000) - 1
78 | + ClockDivision = 0
79 | + Counter direction = Up
80 | */
81 | TimHandle.Init.Period = 5000 - 1;
82 | TimHandle.Init.Prescaler = uwPrescalerValue;
83 | TimHandle.Init.ClockDivision = 0;
84 | TimHandle.Init.CounterMode = TIM_COUNTERMODE_DOWN;
85 |
86 | HAL_TIM_OnePulse_Init(&TimHandle, TIM_OPMODE_SINGLE);
87 |
88 | __HAL_TIM_CLEAR_FLAG(&TimHandle, TIM_IT_UPDATE);
89 | /* Enable the TIM Update interrupt */
90 | __HAL_TIM_ENABLE_IT(&TimHandle, TIM_IT_UPDATE);
91 | }
92 |
93 |
94 | void TimerIdleStart( void )
95 | {
96 | HAL_TIM_Base_Start(&TimHandle);
97 | //__HAL_TIM_ENABLE(&TimHandle);
98 | }
99 |
100 | void TimerIdleClear( void )
101 | {
102 | __HAL_TIM_SET_COUNTER(&TimHandle, 0);
103 | }
104 |
105 | void TimerIdleStop( void )
106 | {
107 | HAL_TIM_Base_Stop(&TimHandle);
108 | //__HAL_TIM_DISABLE(&TimHandle);
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/src/board/RAK811/timer-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: MCU timer
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __TIMER_BOARD_H__
16 | #define __TIMER_BOARD_H__
17 |
18 | void TimerIdleInit(void);
19 | void TimerIdleStart(void);
20 | void TimerIdleClear(void);
21 | void TimerIdleStop(void);
22 |
23 |
24 | #endif // __TIMER_BOARD_H__
25 |
--------------------------------------------------------------------------------
/src/board/RAK811/uart-board.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Bleeper board UART driver implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __UART_MCU_H__
16 | #define __UART_MCU_H__
17 |
18 | typedef enum
19 | {
20 | UART_1 = 1,
21 | UART_2,
22 | UART_3,
23 | UART_COUNT,
24 | UART_USB_CDC = 255,
25 | }UartId_t;
26 |
27 | /*!
28 | * \brief Initializes the UART object and MCU peripheral
29 | *
30 | * \param [IN] obj UART object
31 | * \param [IN] tx UART Tx pin name to be used
32 | * \param [IN] rx UART Rx pin name to be used
33 | */
34 | void UartMcuInit( Uart_t *obj, uint8_t uartId, PinNames tx, PinNames rx );
35 |
36 | /*!
37 | * \brief Initializes the UART object and MCU peripheral
38 | *
39 | * \param [IN] obj UART object
40 | * \param [IN] mode Mode of operation for the UART
41 | * \param [IN] baudrate UART baudrate
42 | * \param [IN] wordLength packet length
43 | * \param [IN] stopBits stop bits setup
44 | * \param [IN] parity packet parity
45 | * \param [IN] flowCtrl UART flow control
46 | */
47 | void UartMcuConfig( Uart_t *obj, UartMode_t mode, uint32_t baudrate, WordLength_t wordLength, StopBits_t stopBits, Parity_t parity, FlowCtrl_t flowCtrl );
48 |
49 | /*!
50 | * \brief DeInitializes the UART object and MCU peripheral
51 | *
52 | * \param [IN] obj UART object
53 | */
54 | void UartMcuDeInit( Uart_t *obj );
55 |
56 | /*!
57 | * \brief Sends a character to the UART
58 | *
59 | * \param [IN] obj UART object
60 | * \param [IN] data Character to be sent
61 | * \retval status [0: OK, 1: Busy]
62 | */
63 | uint8_t UartMcuPutChar( Uart_t *obj, uint8_t data );
64 |
65 | /*!
66 | * \brief Sends a character to the UART
67 | *
68 | * \param [IN] obj UART object
69 | * \param [IN] data Characters to be sent
70 | * \param [IN] size number of characters to send
71 | * \retval status [0: OK, 1: Busy]
72 | */
73 | uint8_t UartMcuPutBuffer( Uart_t *obj, uint8_t *data, uint16_t size );
74 |
75 | /*!
76 | * \brief Gets a character from the UART
77 | *
78 | * \param [IN] obj UART object
79 | * \param [IN] data Received character
80 | * \retval status [0: OK, 1: Busy]
81 | */
82 | uint8_t UartMcuGetChar( Uart_t *obj, uint8_t *data );
83 |
84 | /*!
85 | * \brief Gets a character from the UART (blocking mode)
86 | *
87 | * \param [IN] obj UART object
88 | * \param [IN] data Received character
89 | * \param [IN] size number of characters to be received
90 | * \retval status [0: OK, 1: Busy]
91 | */
92 | uint8_t UartMcuGetBuffer( Uart_t *obj, uint8_t *data, uint16_t size );
93 |
94 | void UartFlush( Uart_t *obj);
95 |
96 | #endif // __UART_MCU_H__
97 |
--------------------------------------------------------------------------------
/src/external/utilities/utilities.c:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Helper functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #include
16 | #include
17 | #include "board.h"
18 | #include "utilities.h"
19 |
20 | /*!
21 | * Redefinition of rand() and srand() standard C functions.
22 | * These functions are redefined in order to get the same behavior across
23 | * different compiler toolchains implementations.
24 | */
25 | // Standard random functions redefinition start
26 | #define RAND_LOCAL_MAX 2147483647L
27 |
28 | static uint32_t next = 1;
29 |
30 | int32_t rand1( void )
31 | {
32 | return ( ( next = next * 1103515245L + 12345L ) % RAND_LOCAL_MAX );
33 | }
34 |
35 | void srand1( uint32_t seed )
36 | {
37 | next = seed;
38 | }
39 | // Standard random functions redefinition end
40 |
41 | int32_t randr( int32_t min, int32_t max )
42 | {
43 | return ( int32_t )rand1( ) % ( max - min + 1 ) + min;
44 | }
45 |
46 | void memcpy1( uint8_t *dst, const uint8_t *src, uint16_t size )
47 | {
48 | while( size-- )
49 | {
50 | *dst++ = *src++;
51 | }
52 | }
53 |
54 | void memcpyr( uint8_t *dst, const uint8_t *src, uint16_t size )
55 | {
56 | dst = dst + ( size - 1 );
57 | while( size-- )
58 | {
59 | *dst-- = *src++;
60 | }
61 | }
62 |
63 | void memset1( uint8_t *dst, uint8_t value, uint16_t size )
64 | {
65 | while( size-- )
66 | {
67 | *dst++ = value;
68 | }
69 | }
70 |
71 | int8_t Nibble2HexChar( uint8_t a )
72 | {
73 | if( a < 10 )
74 | {
75 | return '0' + a;
76 | }
77 | else if( a < 16 )
78 | {
79 | return 'A' + ( a - 10 );
80 | }
81 | else
82 | {
83 | return '?';
84 | }
85 | }
86 |
87 | uint16_t crc_calc(uint16_t crc, uint8_t *start, uint8_t *end)
88 | {
89 | uint8_t *data;
90 |
91 | for (data = start; data < end; data++)
92 | {
93 | crc = (crc >> 8) | (crc << 8);
94 | crc ^= *data;
95 | crc ^= (crc & 0xff) >> 4;
96 | crc ^= crc << 12;
97 | crc ^= (crc & 0xff) << 5;
98 | }
99 | return crc;
100 | }
101 |
--------------------------------------------------------------------------------
/src/external/utilities/utilities.h:
--------------------------------------------------------------------------------
1 | /*
2 | / _____) _ | |
3 | ( (____ _____ ____ _| |_ _____ ____| |__
4 | \____ \| ___ | (_ _) ___ |/ ___) _ \
5 | _____) ) ____| | | || |_| ____( (___| | | |
6 | (______/|_____)_|_|_| \__)_____)\____)_| |_|
7 | (C)2013 Semtech
8 |
9 | Description: Helper functions implementation
10 |
11 | License: Revised BSD License, see LICENSE.TXT file include in the project
12 |
13 | Maintainer: Miguel Luis and Gregory Cristian
14 | */
15 | #ifndef __UTILITIES_H__
16 | #define __UTILITIES_H__
17 |
18 | /*!
19 | * \brief Returns the minimum value betwen a and b
20 | *
21 | * \param [IN] a 1st value
22 | * \param [IN] b 2nd value
23 | * \retval minValue Minimum value
24 | */
25 | #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
26 |
27 | /*!
28 | * \brief Returns the maximum value betwen a and b
29 | *
30 | * \param [IN] a 1st value
31 | * \param [IN] b 2nd value
32 | * \retval maxValue Maximum value
33 | */
34 | #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
35 |
36 | /*!
37 | * \brief Returns 2 raised to the power of n
38 | *
39 | * \param [IN] n power value
40 | * \retval result of raising 2 to the power n
41 | */
42 | #define POW2( n ) ( 1 << n )
43 |
44 | /*!
45 | * \brief Initializes the pseudo ramdom generator initial value
46 | *
47 | * \param [IN] seed Pseudo ramdom generator initial value
48 | */
49 | void srand1( uint32_t seed );
50 |
51 | /*!
52 | * \brief Computes a random number between min and max
53 | *
54 | * \param [IN] min range minimum value
55 | * \param [IN] max range maximum value
56 | * \retval random random value in range min..max
57 | */
58 | int32_t randr( int32_t min, int32_t max );
59 |
60 | /*!
61 | * \brief Copies size elements of src array to dst array
62 | *
63 | * \remark STM32 Standard memcpy function only works on pointers that are aligned
64 | *
65 | * \param [OUT] dst Destination array
66 | * \param [IN] src Source array
67 | * \param [IN] size Number of bytes to be copied
68 | */
69 | void memcpy1( uint8_t *dst, const uint8_t *src, uint16_t size );
70 |
71 | /*!
72 | * \brief Copies size elements of src array to dst array reversing the byte order
73 | *
74 | * \param [OUT] dst Destination array
75 | * \param [IN] src Source array
76 | * \param [IN] size Number of bytes to be copied
77 | */
78 | void memcpyr( uint8_t *dst, const uint8_t *src, uint16_t size );
79 |
80 | /*!
81 | * \brief Set size elements of dst array with value
82 | *
83 | * \remark STM32 Standard memset function only works on pointers that are aligned
84 | *
85 | * \param [OUT] dst Destination array
86 | * \param [IN] value Default value
87 | * \param [IN] size Number of bytes to be copied
88 | */
89 | void memset1( uint8_t *dst, uint8_t value, uint16_t size );
90 |
91 | /*!
92 | * \brief Converts a nibble to an hexadecimal character
93 | *
94 | * \param [IN] a Nibble to be converted
95 | * \retval hexChar Converted hexadecimal character
96 | */
97 | int8_t Nibble2HexChar( uint8_t a );
98 |
99 | /*!
100 | * \brief This function calculates the CRC-16-CCIT checksum of a memory range.
101 | *
102 | * \param [IN] crc Initial crc value
103 | * start Pointer to the start of the memory block
104 | * end Pointer to the end of the block. This byte is not
105 | * included in the computed CRC.
106 | * \retval hexChar Converted hexadecimal character
107 | */
108 | uint16_t crc_calc(uint16_t crc, uint8_t *start, uint8_t *end);
109 |
110 | #endif // __UTILITIES_H__
111 |
--------------------------------------------------------------------------------
/src/hal/STM32L1xx_HAL_Driver/Inc/stm32l1xx_hal_cryp_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32l1xx_hal_cryp_ex.h
4 | * @author MCD Application Team
5 | * @version V1.1.3
6 | * @date 04-March-2016
7 | * @brief Header file of CRYPEx HAL module.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT(c) 2016 STMicroelectronics
12 | *
13 | * Redistribution and use in source and binary forms, with or without modification,
14 | * are permitted provided that the following conditions are met:
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | * 2. Redistributions in binary form must reproduce the above copyright notice,
18 | * this list of conditions and the following disclaimer in the documentation
19 | * and/or other materials provided with the distribution.
20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 | * may be used to endorse or promote products derived from this software
22 | * without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | ******************************************************************************
36 | */
37 |
38 | /* Define to prevent recursive inclusion -------------------------------------*/
39 | #ifndef __STM32L1xx_HAL_CRYP_EX_H
40 | #define __STM32L1xx_HAL_CRYP_EX_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | #if defined(STM32L162xC) || defined(STM32L162xCA) || defined(STM32L162xD) || defined(STM32L162xE) || defined(STM32L162xDX)
47 |
48 | /* Includes ------------------------------------------------------------------*/
49 | #include "stm32l1xx_hal_def.h"
50 |
51 | /** @addtogroup STM32L1xx_HAL_Driver
52 | * @{
53 | */
54 |
55 | /** @addtogroup CRYPEx
56 | * @{
57 | */
58 |
59 | /* Exported types ------------------------------------------------------------*/
60 | /* Exported constants --------------------------------------------------------*/
61 | /* Exported functions --------------------------------------------------------*/
62 |
63 | /** @addtogroup CRYPEx_Exported_Functions
64 | * @{
65 | */
66 |
67 | /** @addtogroup CRYPEx_Exported_Functions_Group1
68 | * @{
69 | */
70 |
71 | /* CallBack functions ********************************************************/
72 | void HAL_CRYPEx_ComputationCpltCallback(CRYP_HandleTypeDef *hcryp);
73 |
74 | /**
75 | * @}
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | #endif /* STM32L162xC || STM32L162xCA || STM32L162xD || STM32L162xE || STM32L162xDX*/
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | /**
89 | * @}
90 | */
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /* __STM32L1xx_HAL_CRYP_EX_H */
97 |
98 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
99 |
--------------------------------------------------------------------------------
/src/hal/STM32L1xx_HAL_Driver/Inc/stm32l1xx_hal_pcd_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32l1xx_hal_pcd_ex.h
4 | * @author MCD Application Team
5 | * @version V1.1.3
6 | * @date 04-March-2016
7 | * @brief Header file of PCD HAL module.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT(c) 2016 STMicroelectronics
12 | *
13 | * Redistribution and use in source and binary forms, with or without modification,
14 | * are permitted provided that the following conditions are met:
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | * 2. Redistributions in binary form must reproduce the above copyright notice,
18 | * this list of conditions and the following disclaimer in the documentation
19 | * and/or other materials provided with the distribution.
20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 | * may be used to endorse or promote products derived from this software
22 | * without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | ******************************************************************************
36 | */
37 |
38 | /* Define to prevent recursive inclusion -------------------------------------*/
39 | #ifndef __STM32L1xx_HAL_PCD_EX_H
40 | #define __STM32L1xx_HAL_PCD_EX_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | /* Includes ------------------------------------------------------------------*/
47 | #include "stm32l1xx_hal_def.h"
48 |
49 | /** @addtogroup STM32L1xx_HAL_Driver
50 | * @{
51 | */
52 |
53 | /** @addtogroup PCDEx
54 | * @{
55 | */
56 |
57 | /* Exported types ------------------------------------------------------------*/
58 | /* Exported constants --------------------------------------------------------*/
59 | /* Exported macros -----------------------------------------------------------*/
60 | /* Internal macros -----------------------------------------------------------*/
61 | /* Exported functions --------------------------------------------------------*/
62 | /** @addtogroup PCDEx_Exported_Functions
63 | * @{
64 | */
65 |
66 | /** @addtogroup PCDEx_Exported_Functions_Group2
67 | * @{
68 | */
69 |
70 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd,
71 | uint16_t ep_addr,
72 | uint16_t ep_kind,
73 | uint32_t pmaadress);
74 | /**
75 | * @}
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /**
83 | * @}
84 | */
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | #ifdef __cplusplus
91 | }
92 | #endif
93 |
94 |
95 | #endif /* __STM32L1xx_HAL_PCD_EX_H */
96 |
97 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
98 |
--------------------------------------------------------------------------------
/src/hal/STM32L1xx_HAL_Driver/Inc/stm32l1xx_hal_spi_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32l1xx_hal_spi_ex.h
4 | * @author MCD Application Team
5 | * @version V1.1.3
6 | * @date 04-March-2016
7 | * @brief Header file of SPI HAL module.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT(c) 2016 STMicroelectronics
12 | *
13 | * Redistribution and use in source and binary forms, with or without modification,
14 | * are permitted provided that the following conditions are met:
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | * 2. Redistributions in binary form must reproduce the above copyright notice,
18 | * this list of conditions and the following disclaimer in the documentation
19 | * and/or other materials provided with the distribution.
20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 | * may be used to endorse or promote products derived from this software
22 | * without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | ******************************************************************************
36 | */
37 |
38 | /* Define to prevent recursive inclusion -------------------------------------*/
39 | #ifndef __STM32L1xx_HAL_SPI_EX_H
40 | #define __STM32L1xx_HAL_SPI_EX_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | /* Includes ------------------------------------------------------------------*/
47 | #include "stm32l1xx_hal_def.h"
48 |
49 | /** @addtogroup STM32L1xx_HAL_Driver
50 | * @{
51 | */
52 |
53 | /** @addtogroup SPI
54 | * @{
55 | */
56 |
57 | /* Exported types ------------------------------------------------------------*/
58 |
59 | /* Exported constants --------------------------------------------------------*/
60 |
61 | /** @defgroup SPI_Exported_Constants SPI Exported Constants
62 | * @{
63 | */
64 | #if defined (STM32L100xC) || defined (STM32L151xC) || defined (STM32L152xC) || defined (STM32L162xC) || defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L151xE) || defined (STM32L151xDX) || defined (STM32L152xE) || defined (STM32L152xDX) || defined (STM32L162xE) || defined (STM32L162xDX)
65 | /** @defgroup SPI_TI_mode SPI TI mode
66 | * @{
67 | */
68 | #define SPI_TIMODE_DISABLE ((uint32_t)0x00000000)
69 | #define SPI_TIMODE_ENABLE SPI_CR2_FRF
70 |
71 | #define IS_SPI_TIMODE(MODE) (((MODE) == SPI_TIMODE_DISABLE) || \
72 | ((MODE) == SPI_TIMODE_ENABLE))
73 | #else
74 | /** @defgroup SPI_TI_mode SPI TI mode disable
75 | * @brief SPI TI Mode not supported for Category 1 and 2
76 | * @{
77 | */
78 | #define SPI_TIMODE_DISABLE ((uint32_t)0x00000000)
79 |
80 | #define IS_SPI_TIMODE(MODE) ((MODE) == SPI_TIMODE_DISABLE)
81 |
82 | #endif
83 | /**
84 | * @}
85 | */
86 |
87 | /**
88 | * @}
89 | */
90 |
91 |
92 | /**
93 | * @}
94 | */
95 |
96 | /**
97 | * @}
98 | */
99 |
100 | #ifdef __cplusplus
101 | }
102 | #endif
103 |
104 | #endif /* __STM32L1xx_HAL_SPI_H */
105 |
106 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
107 |
--------------------------------------------------------------------------------
/src/hal/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_msp_template.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32l1xx_hal_msp_template.c
4 | * @author MCD Application Team
5 | * @version V1.1.3
6 | * @date 04-March-2016
7 | * @brief HAL BSP module.
8 | * This file template is located in the HAL folder and should be copied
9 | * to the user folder.
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * © COPYRIGHT(c) 2016 STMicroelectronics
14 | *
15 | * Redistribution and use in source and binary forms, with or without modification,
16 | * are permitted provided that the following conditions are met:
17 | * 1. Redistributions of source code must retain the above copyright notice,
18 | * this list of conditions and the following disclaimer.
19 | * 2. Redistributions in binary form must reproduce the above copyright notice,
20 | * this list of conditions and the following disclaimer in the documentation
21 | * and/or other materials provided with the distribution.
22 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
23 | * may be used to endorse or promote products derived from this software
24 | * without specific prior written permission.
25 | *
26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 | *
37 | ******************************************************************************
38 | */
39 |
40 | /* Includes ------------------------------------------------------------------*/
41 | #include "stm32l1xx_hal.h"
42 |
43 | /** @addtogroup STM32L1xx_HAL_Driver
44 | * @{
45 | */
46 |
47 | /** @defgroup HAL_MSP HAL_MSP
48 | * @brief HAL MSP module.
49 | * @{
50 | */
51 |
52 | /* Private typedef -----------------------------------------------------------*/
53 | /* Private define ------------------------------------------------------------*/
54 | /* Private macro -------------------------------------------------------------*/
55 | /* Private variables ---------------------------------------------------------*/
56 | /* Private function prototypes -----------------------------------------------*/
57 | /* Private functions ---------------------------------------------------------*/
58 |
59 | /** @defgroup HAL_MSP_Exported_Functions HAL MSP Exported Functions
60 | * @{
61 | */
62 |
63 | /**
64 | * @brief Initializes the Global MSP.
65 | * @retval None
66 | */
67 | void HAL_MspInit(void)
68 | {
69 |
70 | }
71 |
72 | /**
73 | * @brief DeInitializes the Global MSP.
74 | * @retval None
75 | */
76 | void HAL_MspDeInit(void)
77 | {
78 |
79 | }
80 |
81 | /**
82 | * @brief Initializes the PPP MSP.
83 | * @retval None
84 | */
85 | void HAL_PPP_MspInit(void)
86 | {
87 |
88 | }
89 |
90 | /**
91 | * @brief DeInitializes the PPP MSP.
92 | * @retval None
93 | */
94 | void HAL_PPP_MspDeInit(void)
95 | {
96 |
97 | }
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
112 |
--------------------------------------------------------------------------------
/src/hal/cmsis/arm_const_structs.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Copyright (C) 2010-2014 ARM Limited. All rights reserved.
3 | *
4 | * $Date: 19. March 2015
5 | * $Revision: V.1.4.5
6 | *
7 | * Project: CMSIS DSP Library
8 | * Title: arm_const_structs.h
9 | *
10 | * Description: This file has constant structs that are initialized for
11 | * user convenience. For example, some can be given as
12 | * arguments to the arm_cfft_f32() function.
13 | *
14 | * Target Processor: Cortex-M4/Cortex-M3
15 | *
16 | * Redistribution and use in source and binary forms, with or without
17 | * modification, are permitted provided that the following conditions
18 | * are met:
19 | * - Redistributions of source code must retain the above copyright
20 | * notice, this list of conditions and the following disclaimer.
21 | * - Redistributions in binary form must reproduce the above copyright
22 | * notice, this list of conditions and the following disclaimer in
23 | * the documentation and/or other materials provided with the
24 | * distribution.
25 | * - Neither the name of ARM LIMITED nor the names of its contributors
26 | * may be used to endorse or promote products derived from this
27 | * software without specific prior written permission.
28 | *
29 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
32 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
34 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
39 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 | * POSSIBILITY OF SUCH DAMAGE.
41 | * -------------------------------------------------------------------- */
42 |
43 | #ifndef _ARM_CONST_STRUCTS_H
44 | #define _ARM_CONST_STRUCTS_H
45 |
46 | #include "arm_math.h"
47 | #include "arm_common_tables.h"
48 |
49 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
50 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
51 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
52 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
53 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
54 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
55 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
56 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
57 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
58 |
59 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
60 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
61 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
62 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128;
63 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256;
64 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512;
65 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024;
66 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048;
67 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096;
68 |
69 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16;
70 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32;
71 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64;
72 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128;
73 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256;
74 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512;
75 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024;
76 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
77 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;
78 |
79 | #endif
80 |
--------------------------------------------------------------------------------
/src/hal/cmsis/core_cmFunc.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file core_cmFunc.h
3 | * @brief CMSIS Cortex-M Core Function Access Header File
4 | * @version V4.30
5 | * @date 20. October 2015
6 | ******************************************************************************/
7 | /* Copyright (c) 2009 - 2015 ARM LIMITED
8 |
9 | All rights reserved.
10 | Redistribution and use in source and binary forms, with or without
11 | modification, are permitted provided that the following conditions are met:
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 | - Neither the name of ARM nor the names of its contributors may be used
18 | to endorse or promote products derived from this software without
19 | specific prior written permission.
20 | *
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | ---------------------------------------------------------------------------*/
33 |
34 |
35 | #if defined ( __ICCARM__ )
36 | #pragma system_include /* treat file as system include file for MISRA check */
37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
38 | #pragma clang system_header /* treat file as system include file */
39 | #endif
40 |
41 | #ifndef __CORE_CMFUNC_H
42 | #define __CORE_CMFUNC_H
43 |
44 |
45 | /* ########################### Core Function Access ########################### */
46 | /** \ingroup CMSIS_Core_FunctionInterface
47 | \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
48 | @{
49 | */
50 |
51 | /*------------------ RealView Compiler -----------------*/
52 | #if defined ( __CC_ARM )
53 | #include "cmsis_armcc.h"
54 |
55 | /*------------------ ARM Compiler V6 -------------------*/
56 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
57 | #include "cmsis_armcc_V6.h"
58 |
59 | /*------------------ GNU Compiler ----------------------*/
60 | #elif defined ( __GNUC__ )
61 | #include "cmsis_gcc.h"
62 |
63 | /*------------------ ICC Compiler ----------------------*/
64 | #elif defined ( __ICCARM__ )
65 | #include
66 |
67 | /*------------------ TI CCS Compiler -------------------*/
68 | #elif defined ( __TMS470__ )
69 | #include
70 |
71 | /*------------------ TASKING Compiler ------------------*/
72 | #elif defined ( __TASKING__ )
73 | /*
74 | * The CMSIS functions have been implemented as intrinsics in the compiler.
75 | * Please use "carm -?i" to get an up to date list of all intrinsics,
76 | * Including the CMSIS ones.
77 | */
78 |
79 | /*------------------ COSMIC Compiler -------------------*/
80 | #elif defined ( __CSMC__ )
81 | #include
82 |
83 | #endif
84 |
85 | /*@} end of CMSIS_Core_RegAccFunctions */
86 |
87 | #endif /* __CORE_CMFUNC_H */
88 |
--------------------------------------------------------------------------------
/src/hal/cmsis/core_cmInstr.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file core_cmInstr.h
3 | * @brief CMSIS Cortex-M Core Instruction Access Header File
4 | * @version V4.30
5 | * @date 20. October 2015
6 | ******************************************************************************/
7 | /* Copyright (c) 2009 - 2015 ARM LIMITED
8 |
9 | All rights reserved.
10 | Redistribution and use in source and binary forms, with or without
11 | modification, are permitted provided that the following conditions are met:
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 | - Neither the name of ARM nor the names of its contributors may be used
18 | to endorse or promote products derived from this software without
19 | specific prior written permission.
20 | *
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | ---------------------------------------------------------------------------*/
33 |
34 |
35 | #if defined ( __ICCARM__ )
36 | #pragma system_include /* treat file as system include file for MISRA check */
37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
38 | #pragma clang system_header /* treat file as system include file */
39 | #endif
40 |
41 | #ifndef __CORE_CMINSTR_H
42 | #define __CORE_CMINSTR_H
43 |
44 |
45 | /* ########################## Core Instruction Access ######################### */
46 | /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
47 | Access to dedicated instructions
48 | @{
49 | */
50 |
51 | /*------------------ RealView Compiler -----------------*/
52 | #if defined ( __CC_ARM )
53 | #include "cmsis_armcc.h"
54 |
55 | /*------------------ ARM Compiler V6 -------------------*/
56 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
57 | #include "cmsis_armcc_V6.h"
58 |
59 | /*------------------ GNU Compiler ----------------------*/
60 | #elif defined ( __GNUC__ )
61 | #include "cmsis_gcc.h"
62 |
63 | /*------------------ ICC Compiler ----------------------*/
64 | #elif defined ( __ICCARM__ )
65 | #include
66 |
67 | /*------------------ TI CCS Compiler -------------------*/
68 | #elif defined ( __TMS470__ )
69 | #include
70 |
71 | /*------------------ TASKING Compiler ------------------*/
72 | #elif defined ( __TASKING__ )
73 | /*
74 | * The CMSIS functions have been implemented as intrinsics in the compiler.
75 | * Please use "carm -?i" to get an up to date list of all intrinsics,
76 | * Including the CMSIS ones.
77 | */
78 |
79 | /*------------------ COSMIC Compiler -------------------*/
80 | #elif defined ( __CSMC__ )
81 | #include
82 |
83 | #endif
84 |
85 | /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
86 |
87 | #endif /* __CORE_CMINSTR_H */
88 |
--------------------------------------------------------------------------------
/src/hal/cmsis/core_cmSimd.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file core_cmSimd.h
3 | * @brief CMSIS Cortex-M SIMD Header File
4 | * @version V4.30
5 | * @date 20. October 2015
6 | ******************************************************************************/
7 | /* Copyright (c) 2009 - 2015 ARM LIMITED
8 |
9 | All rights reserved.
10 | Redistribution and use in source and binary forms, with or without
11 | modification, are permitted provided that the following conditions are met:
12 | - Redistributions of source code must retain the above copyright
13 | notice, this list of conditions and the following disclaimer.
14 | - Redistributions in binary form must reproduce the above copyright
15 | notice, this list of conditions and the following disclaimer in the
16 | documentation and/or other materials provided with the distribution.
17 | - Neither the name of ARM nor the names of its contributors may be used
18 | to endorse or promote products derived from this software without
19 | specific prior written permission.
20 | *
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 | POSSIBILITY OF SUCH DAMAGE.
32 | ---------------------------------------------------------------------------*/
33 |
34 |
35 | #if defined ( __ICCARM__ )
36 | #pragma system_include /* treat file as system include file for MISRA check */
37 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
38 | #pragma clang system_header /* treat file as system include file */
39 | #endif
40 |
41 | #ifndef __CORE_CMSIMD_H
42 | #define __CORE_CMSIMD_H
43 |
44 | #ifdef __cplusplus
45 | extern "C" {
46 | #endif
47 |
48 |
49 | /* ################### Compiler specific Intrinsics ########################### */
50 | /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
51 | Access to dedicated SIMD instructions
52 | @{
53 | */
54 |
55 | /*------------------ RealView Compiler -----------------*/
56 | #if defined ( __CC_ARM )
57 | #include "cmsis_armcc.h"
58 |
59 | /*------------------ ARM Compiler V6 -------------------*/
60 | #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
61 | #include "cmsis_armcc_V6.h"
62 |
63 | /*------------------ GNU Compiler ----------------------*/
64 | #elif defined ( __GNUC__ )
65 | #include "cmsis_gcc.h"
66 |
67 | /*------------------ ICC Compiler ----------------------*/
68 | #elif defined ( __ICCARM__ )
69 | #include
70 |
71 | /*------------------ TI CCS Compiler -------------------*/
72 | #elif defined ( __TMS470__ )
73 | #include
74 |
75 | /*------------------ TASKING Compiler ------------------*/
76 | #elif defined ( __TASKING__ )
77 | /*
78 | * The CMSIS functions have been implemented as intrinsics in the compiler.
79 | * Please use "carm -?i" to get an up to date list of all intrinsics,
80 | * Including the CMSIS ones.
81 | */
82 |
83 | /*------------------ COSMIC Compiler -------------------*/
84 | #elif defined ( __CSMC__ )
85 | #include
86 |
87 | #endif
88 |
89 | /*@} end of group CMSIS_SIMD_intrinsics */
90 |
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /* __CORE_CMSIMD_H */
97 |
--------------------------------------------------------------------------------