nRF52840 Dongle with SX1276, Blink example doesn't Blink

I successfully installed a SX1276 with a nRF5340 and transmitted some lorawan packets to Helium Network.

After I concluded I could do the same using the nRF52840. So I installed another one module solded on dongle's pin.

In order to start this project I created the blink to know if the things were working. The led1 blinked.

After I just adjusted the .overlay and organized the pins, at same way I done using the other project.

And I put some lorawan configs on .prj.

For my surprise, the led didn't blink.

In order to test, doesn't need connect anything because the problem is only the configs.

This is the original blink project, added innocuous commands:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/device.h>
#include <zephyr/lorawan/lorawan.h>
#include <zephyr/drivers/lora.h>
#include <soc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zephyr/types.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The .prj modified

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CONFIG_LOG=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_SPI=y
CONFIG_LORA=y
CONFIG_LORA_SX12XX=y
CONFIG_LORA_SX127X=y
CONFIG_LORAWAN=y
CONFIG_LORAMAC_REGION_EU868=y
CONFIG_LORA_LOG_LEVEL_DBG=y
CONFIG_HAS_SEMTECH_RADIO_DRIVERS=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This is the Overlay's file created on example Blink Project

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&spi1 {
//VDD - CONNECT TO 3V - USE A 220UF TO GND
//SCK -->P1.15
//MISO -->P1.10
//MOSI -->P1.13
cs-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; // PIN NSS
lora0: sx1276@0 {
compatible = "semtech,sx1276";
reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; //RESET PIN
dio-gpios =
<&gpio0 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, //DIO-0
<&gpio0 13 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; //DIO-1
power-amplifier-output = "pa-boost";
reg = <0>;
spi-max-frequency = <1000000>;
//label = "sx1276";
};
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Generated .HEX file ok.

Fullscreen
1
2
3
4
5
6
7
8
9
10
[167/172] Generating linker.cmd
[168/172] Generating isr_tables.c, isrList.bin
[169/172] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
[170/172] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
[171/172] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
[172/172] Linking C executable zephyr\zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 66036 B 1020 KB 6.32%
RAM: 16128 B 256 KB 6.15%
IDT_LIST: 0 GB 2 KB 0.00%
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Then I upload the code to NRF52840 Dongle using the Programmer 3.0.8.

Resulted, the led1 doesn't blink.

But, if I comment the .prj as below:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
CONFIG_LOG=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_SPI=y
CONFIG_LORA=y
#CONFIG_LORA_SX12XX=y
#CONFIG_LORA_SX127X=y
#CONFIG_LORAWAN=y
#CONFIG_LORAMAC_REGION_EU868=y
#CONFIG_LORA_LOG_LEVEL_DBG=y
#CONFIG_HAS_SEMTECH_RADIO_DRIVERS=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The led1 start blinking.

Does anyone can explain why?

The dongle doesn't have SWD to connect, I can't see any RTT messages.

The same .prj works perfectly on NRF5340DK.

Thanks in advance.