Code Monkey home page Code Monkey logo

swsd003's Introduction

SWSD003 Transceiver SDK

This SDK contain several simple examples for SX126x and LR11XX chip families used in Transceiver mode.

Examples

For a detailed description of the available examples and their configuration, refer to the corresponding README file depending on chip family:

The readme files also provide the compatible products, along with hardware and software requirements.

Getting started

Configure

Before starting to build an example, check the parameters in both the common and the example-specific configuration files. The common parameters can be found in <chip family>/common/apps_configuration.h while the example specific configuration file is located in the example folder. For example, the per example finds its configuration in <chip_family>/apps/per/main_per.h

Build

In this section:

  • <chip_family> is:
    • sx126x for SX126X examples
    • lr11xx for LR11XX examples
  • <example>: is the name of the selected example. Refer to corresponding README file of the chip family for possible values

Keil MDK ARM

Each example is delivered with a Keil project file - see <chip_family>/apps/<example>/MDK-ARM/<chip_family>-sdk_<example>.uvprojx.

To build a project:

  1. Launch Keil IDE
  2. Open the project file
  3. Select the target
  4. Compile

Each project has different targets (Keil manual), each one allowing to choose the shield the example is compiled for.

The name of the targets is taken from the column shield of the supported shields table available in the chip family READMEs:

GNU Arm embedded toolchain

Examples are built from their respective subfolder in the apps directory. For instance, the makefile for the per example for LR11XX is available in lr11xx/apps/per/makefile/Makefile.

Build settings, compile time and configuration options are specified in the project's Makefile.

The output files of the build process are stored in the build folder with firmware binary file having the same name as the project with a .bin extension.

Here are the parameters available at compile time:

Parameter Description Default value
RADIO_SHIELD Shield for which the example is compiled lr11xx: LR1120MB1DIS, sx126x: SX1262MB1CAS

For instance, to build the project per with LR1110MB1GJS shield simply run make as follows

$ cd $SDK_FOLDER/lr11xx/apps/per/makefile
$ make RADIO_SHIELD=LR1110MB1GJS
Command line configuration

Additional configuration flags can be passed from command line to compiler with EXTRAFLAGS argument. This is dedicated to define macros that can be defined like the following:

$ make EXTRAFLAGS='-D<MACRO>=<VALUE>'

Where <MACRO> is the macro name to set and <VALUE> is the value to set for this macro. Not all macro can be redefined through this way. Refer to the README of examples for the list of macro that can be redefined.

Note that when using the configuration on command line, make cannot detect a change in configuration on next build. Therefore make clean must be invoked before calling a new make with a different configuration

Load

After a project is built, it can be loaded onto a device.

There are multiple ways to do it, among which:

  • Drag and drop the binary file to the USB drive listed by our OS - usually shows up as NODE_L476RG.
  • Load it through the Keil IDE

View debug output

On the NUCLEO-L476RG development board, the firmware prints debug information to the UART that is connected via the ST-LINK to the host computer. The configuration is 921600/8-N-1:

  • On Linux, this device usually shows up as /dev/ttyACM0
  • On Windows, the port can be obtained from the device manager

For instance, using stty on Linux with a device available in /dev/ttyACM0:

$ stty -echo raw speed 921600 < /dev/ttyACM0 && cat /dev/ttyACM0

Requirements

Additional requirements specific to chip family are provided in the corresponding README file.

Supported toolchains

Each example can be compiled with the following toolchains:

Remarks

Channel Activity Detection accuracy

The Channel Activity Detection (CAD) may expose false negative or false positive detection. The parameters for CAD configuration needs adaptation relative to context usage. Refer to the application notes available on Semtech website relative to CAD performances.

swsd003's People

Contributors

cmalletsmtc avatar smtc-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

swsd003's Issues

LR1120DVK1TGKS basically no range

Having 2x LR1120DVK1TGKS with nucleo boards with default ping-pong build example. The maximum range I could get is around 10meters.
Both boards have been updated to lates 0201 firmware for lr1120
Not sure whats happening. It can be something to do with RF switch on the board. Not sure where to start the debugging.
I did measure RW switch control pins. And they seem to do the correct thing. V1 HIGH (switch RF to J2) while receiving. V2, HIGH ( switch RF to J1) while transmitting
What else to check? They out of the box development boards, examples should also work.
Thanks!

Other IDE except KEIL

I run a Spectrum analyzer example successfully with the Keil MDK ARM Ide , the problem is that i am more familiar with other IDE like Attolic , CubeMx , etc , is there any chance to get the examples ready to run on those IDE??
Keil is fairly not so easy, or is there something i miss?

Ranging functions

Hi!

I'm trying to implement a ranging demo using the LR1120, the documentation specifies the existance of a ranging driver but I'm having a hard time finding driver documentation. i have already tried using the SX1280 examples but to no avail. could you point me to the right direction of the documentation if it exist. Alternatively, it would be great if there are code examples available.

LR1110TRK1CKS-JP Tracker reference design reset to EU868

Hi, I was given this tracker and when trying to onboard it to my platform, I noticed that it was unable to join the network. Following the guide on the Lora Edge config guide, I tried to reset the device to see if it was able to join the network thereafter, but it reset to EU868 and I'm unable to change it back. Is there a way for me to re-flash the firmware again using AS923-1 region? I'm also testing out the LoRaWAN Relay, so if possible I would want to update it to the latest version so that it is a relay-compatible end-device. Can I seek assistance on how to go about doing this? Thank You.

[LR1121] SF6 compatibility with SX127x in implicit mode

From the datasheet it is possible to make the LR1121 SF6 compatible with the SX1276 in implicit mode. So far I have not been successful receiving packets correctly. The transceiver will trigger the rxdone IRQ, but the packet does not pass a software CRC.

1.Set bit 18 of register at address 0xf20414 to 1

Is there any further documentation on what mode the LR1121 must be in before setting the register e.g. STBY, FS, RX mode? Should the register also be set after writing the SetModulationParams for SF6?

Below is the data I am sending with opcode LR11XX_REGMEM_WRITE_REGMEM32_MASK_OC (0x010C). Does this look correct?

wrbuf[0] = 0x00; // MSB
wrbuf[1] = 0xf2;
wrbuf[2] = 0x04;
wrbuf[3] = 0x14;
// Mask
wrbuf[4] = 0x00; // MSB
wrbuf[5] = 0b00000100;
wrbuf[6] = 0x00;
wrbuf[7] = 0x00; 
// Data
wrbuf[8] = 0x00; // MSB
wrbuf[9] = 0b00000100;
wrbuf[10] = 0x00;
wrbuf[11] = 0x00;

Cheers
Jye

implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]

Hi,

having a compile time warning...

  • target platform

  • STM32U575

  • zephyrOS 3.6.0

  • zephyr-sdk-0.16.5

LOG OUTPUT:

../lr11xx/lr11xx_driver/src/lr11xx_gnss.c: In function 'lr11xx_gnss_compute_power_consumption':
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:973:65: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  973 |         ( ( float ) instantaneous_power_consumption_ua->init_ua / 1000.0 * ( float ) cumulative_timing->init ) /
      |                                                                 ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:973:74: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  973 |         ( ( float ) instantaneous_power_consumption_ua->init_ua / 1000.0 * ( float ) cumulative_timing->init ) /
      |                                                                          ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:976:99: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  976 |     float e_gps_capture = ( ( ( float ) instantaneous_power_consumption_ua->phase1_gps_capture_ua / 1000.0 *
      |                                                                                                   ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:976:108: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  976 |     float e_gps_capture = ( ( ( float ) instantaneous_power_consumption_ua->phase1_gps_capture_ua / 1000.0 *
      |                                                                                                            ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:978:102: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  978 |                             ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_capture_ua / 1000.0 *
      |                                                                                                      ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:978:111: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  978 |                             ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_capture_ua / 1000.0 *
      |                                                                                                               ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:982:99: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  982 |     float e_gps_process = ( ( ( float ) instantaneous_power_consumption_ua->phase1_gps_process_ua / 1000.0 *
      |                                                                                                   ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:982:108: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  982 |     float e_gps_process = ( ( ( float ) instantaneous_power_consumption_ua->phase1_gps_process_ua / 1000.0 *
      |                                                                                                            ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:984:102: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  984 |                             ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_process_ua / 1000.0 *
      |                                                                                                      ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:984:111: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  984 |                             ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_process_ua / 1000.0 *
      |                                                                                                               ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:988:90: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  988 |     float e_gps_sleep_32k = ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                          ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:988:99: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  988 |     float e_gps_sleep_32k = ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                                   ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:994:105: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  994 |     float e_beidou_capture = ( ( ( float ) instantaneous_power_consumption_ua->phase1_beidou_capture_ua / 1000.0 *
      |                                                                                                         ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:994:114: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  994 |     float e_beidou_capture = ( ( ( float ) instantaneous_power_consumption_ua->phase1_beidou_capture_ua / 1000.0 *
      |                                                                                                                  ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:996:108: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  996 |                                ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_capture_ua / 1000.0 *
      |                                                                                                            ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:996:117: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  996 |                                ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_capture_ua / 1000.0 *
      |                                                                                                                     ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:999:105: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  999 |     float e_beidou_process = ( ( ( float ) instantaneous_power_consumption_ua->phase1_beidou_process_ua / 1000.0 *
      |                                                                                                         ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:999:114: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  999 |     float e_beidou_process = ( ( ( float ) instantaneous_power_consumption_ua->phase1_beidou_process_ua / 1000.0 *
      |                                                                                                                  ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1001:108: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1001 |                                ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_process_ua / 1000.0 *
      |                                                                                                            ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1001:117: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1001 |                                ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_process_ua / 1000.0 *
      |                                                                                                                     ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1013:94: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1013 |         e_demod = ( ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_capture_ua / 1000.0 *
      |                                                                                              ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1013:103: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1013 |         e_demod = ( ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_capture_ua / 1000.0 *
      |                                                                                                       ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1015:94: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1015 |                     ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_process_ua / 1000.0 *
      |                                                                                              ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1015:103: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1015 |                     ( ( float ) instantaneous_power_consumption_ua->multiscan_gps_process_ua / 1000.0 *
      |                                                                                                       ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1017:82: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1017 |                     ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                  ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1017:91: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1017 |                     ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                           ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1019:88: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1019 |                     ( ( float ) instantaneous_power_consumption_ua->demod_sleep_32m_ua / 1000.0 *
      |                                                                                        ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1019:97: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1019 |                     ( ( float ) instantaneous_power_consumption_ua->demod_sleep_32m_ua / 1000.0 *
      |                                                                                                 ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1025:97: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1025 |         e_demod = ( ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_capture_ua / 1000.0 *
      |                                                                                                 ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1025:106: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1025 |         e_demod = ( ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_capture_ua / 1000.0 *
      |                                                                                                          ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1027:97: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1027 |                     ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_process_ua / 1000.0 *
      |                                                                                                 ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1027:106: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1027 |                     ( ( float ) instantaneous_power_consumption_ua->multiscan_beidou_process_ua / 1000.0 *
      |                                                                                                          ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1029:82: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1029 |                     ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                  ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1029:91: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1029 |                     ( ( float ) instantaneous_power_consumption_ua->sleep_32k_ua / 1000.0 *
      |                                                                                           ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1031:88: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1031 |                     ( ( float ) instantaneous_power_consumption_ua->demod_sleep_32m_ua / 1000.0 *
      |                                                                                        ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1031:97: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1031 |                     ( ( float ) instantaneous_power_consumption_ua->demod_sleep_32m_ua / 1000.0 *
      |                                                                                                 ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1037:87: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1037 |                                       ( 3600.0 - ( ( float ) cumulative_timing->total / 32768.0 ) );
      |                                                                                       ^
../lr11xx/lr11xx_driver/src/lr11xx_gnss.c:1036:98: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
 1036 |     float power_consumption_uah_tmp = ( ( e_init + e_tot_gps + e_tot_beidou + e_demod ) * 1000 ) /


..lr11xx/lr11xx_driver/src/lr11xx_wifi.c:571:48: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  571 |                                 ( 3600000000.0 - ( ( float ) timing.rx_capture_us + ( float ) timing.demodulation_us +
      |                                                ^
..lr11xx/lr11xx_driver/src/lr11xx_wifi.c:570:59: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  570 |     wifi_scan_consumption_nah = wifi_scan_consumption_nah /
      |                                                           ^
..lr11xx/lr11xx_driver/src/lr11xx_wifi.c:576:35: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]
  576 |         wifi_scan_consumption_nah *= 2.0;

Freeze

with LR1121 i have a loop that i change the modem mode SFK to LORA and back to SFK etc etc
every time i swap i execute those commands

context = apps_common_lr11xx_get_context( );
HAL_DBG_TRACE_WARNING( "1\n" );
apps_common_lr11xx_system_init( ( void* ) context );
HAL_DBG_TRACE_WARNING( "2\n" );
apps_common_lr11xx_fetch_and_print_version( ( void* ) context );
HAL_DBG_TRACE_WARNING( "3\n" );
apps_common_lr11xx_radio_init( ( void* ) context );
HAL_DBG_TRACE_WARNING( "4\n" );
ASSERT_LR11XX_RC( lr11xx_system_set_dio_irq_params( context, IRQ_MASK, 0 ) );
HAL_DBG_TRACE_WARNING( "5\n" );
ASSERT_LR11XX_RC( lr11xx_system_clear_irq_status( context, LR11XX_SYSTEM_IRQ_ALL_MASK ) );
HAL_DBG_TRACE_WARNING( "6\n" );
apps_common_lr11xx_handle_pre_rx( );
ASSERT_LR11XX_RC( lr11xx_radio_set_rx_with_timeout_in_rtc_step( context, RX_CONTINUOUS ) );
HAL_DBG_TRACE_WARNING( "exit_LORA_CHIP\n" );

Without a notice and randomly when enters here apps_common_lr11xx_system_init( ( void* ) context );

it freeze....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.