generated from IRNAS/irnas-projects-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from IRNAS/release/v1.2.0
Release v1.2.0
- Loading branch information
Showing
18 changed files
with
41,777 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.13.1) | ||
|
||
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) | ||
project(almanac_update) | ||
|
||
zephyr_compile_options(-fdiagnostics-color=always) | ||
|
||
target_sources(app PRIVATE src/main.c) | ||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../common src/common) | ||
|
||
add_subdirectory(src/firmware_update) | ||
add_subdirectory(src/firmware_images) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
choice | ||
prompt "Choose LR11XX update type" | ||
optional | ||
|
||
config UPDATE_LR1110 | ||
bool "Update lr1110 to latest transciever firmware" | ||
|
||
config UPDATE_LR1120 | ||
bool "Update lr1120 to latest transciever firmware" | ||
|
||
endchoice | ||
|
||
menu "Zephyr Kernel" | ||
source "$ZEPHYR_BASE/Kconfig.zephyr" | ||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# LR11xx Firmware update example | ||
|
||
Based on [SWTL001](https://github.com/Lora-net/SWTL001). | ||
|
||
## Description | ||
|
||
In `prj.conf`, select either `CONFIG_UPDATE_LR1110` or `CONFIG_UPDATE_LR1120`. | ||
|
||
The sample will update the connected lr11xx to the latest transceiver firmware available for the selected chip type. See `src/firmware_images` | ||
and the top of `main.c` to see which firmware will be flashed. | ||
|
||
The sample will print a success or error message at the end. |
51 changes: 51 additions & 0 deletions
51
samples/firmware_update/boards/nrf52840dk_nrf52840.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include <lr11xx_bindings_def.h> | ||
&spi1 { | ||
status = "disabled"; | ||
}; | ||
|
||
&spi2 { | ||
compatible = "nordic,nrf-spi"; | ||
status = "okay"; | ||
pinctrl-0 = <&spi2_default>; | ||
pinctrl-1 = <&spi2_sleep>; | ||
pinctrl-names = "default", "sleep"; | ||
|
||
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; | ||
lr1120: lr1120@0 { | ||
compatible = "irnas,lr11xx"; | ||
reg = <0>; | ||
spi-max-frequency = <4000000>; | ||
label = "LR1120"; | ||
|
||
reset-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; | ||
gps-lna-en-gpios = <&gpio0 29 0>; | ||
busy-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; | ||
event-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN) >; | ||
|
||
rf-sw-enable = <(LR11XX_DIO5 | LR11XX_DIO6 | LR11XX_DIO7)>; | ||
rf-sw-rx-mode = <LR11XX_DIO5>; | ||
rf-sw-tx-mode = <(LR11XX_DIO5 | LR11XX_DIO6)>; | ||
rf-sw-tx-hp-mode = <LR11XX_DIO6>; | ||
rf-sw-gnss-mode = <LR11XX_DIO7>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
spi2_default: spi2_default { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>, | ||
<NRF_PSEL(SPIM_MOSI, 1, 13)>, | ||
<NRF_PSEL(SPIM_MISO, 1, 14)>; | ||
}; | ||
}; | ||
|
||
spi2_sleep: spi2_sleep { | ||
group1 { | ||
psels = <NRF_PSEL(SPIM_SCK, 1, 15)>, | ||
<NRF_PSEL(SPIM_MOSI, 1, 13)>, | ||
<NRF_PSEL(SPIM_MISO, 1, 14)>; | ||
low-power-enable; | ||
}; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Enable logging (it need to be disabled for low power) | ||
CONFIG_PRINTK=y | ||
CONFIG_GPIO=y | ||
CONFIG_SERIAL=y | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_LOG=y | ||
CONFIG_LOG_DEFAULT_LEVEL=4 | ||
CONFIG_LOG_BACKEND_UART=y | ||
|
||
CONFIG_SPI=y | ||
CONFIG_LR11XX_LIB=y | ||
CONFIG_LR11XX_LOG_LEVEL_INF=y | ||
|
||
CONFIG_PINCTRL=y | ||
|
||
CONFIG_ASSERT=y | ||
CONFIG_DEBUG=y | ||
|
||
CONFIG_MAIN_STACK_SIZE=4096 | ||
|
||
# Configure weather you are updating lr1110 or lr1120 | ||
# This will automatically include the latest transciever firmware for that chip | ||
# in main.c | ||
CONFIG_UPDATE_LR1110=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zephyr_include_directories(.) |
Oops, something went wrong.