Skip to main content
Tesla DeLorean
Guru
April 5, 2017
Question

LoRa Discovery Kit

  • April 5, 2017
  • 22 replies
  • 10719 views

Posted on April 05, 2017 at 22:40

 

 

LoRa Discovery Kit

 

STM32L072 and LoRa Discovery Kit featuring Open LoRa module by Murata using STM32L072CZY6TR MCU

 

0690X00000603YpQAI.jpghttp://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html

 

Features

 

  • Ultra-low-power STM32L0 Series MCUhttp://www.mouser.com/stm32l0, Cortex® -M0+ based with 192Kbytes of Flash memory, 20Kbytes of RAM, 6Kbytes of EEPROM, LCD, crystal-less USB, T-RNG, PCROP
  • 157dB maximum link budget
  • +20dBm, 100mW constant RF output versus Vsupply
  • +14dBm high efficiency PA
  • Programmable bit rate up to 300kbps
  • High sensitivity: down to -137dBm
  • Bullet-proof front end: IIP3 = -12.5dBm
  • 89dB blocking immunity
  • Low RX current of 10mA, 200nA register retention
  • Fully integrated synthesizer with a resolution of 61Hz
  • FSK, GFSK, MSK, GMSK, LoRa™ and OOK modulations
  • Built-in bit synchronizer for clock recovery
  • Sync word recognition
  • Preamble detection
  • 127dB+ dynamic range RSSI
  • Built-in temperature sensor and low battery indicator 1.65V to 3.6V power supply

 

The AT_Slave example (creates AT modem via ST-LINK VCP) is about 41KB in size

 

  • Attached is original shipping firmware (April 2017) Ping-Pong Demo
  • Added LoraDisco_ATSlave_US915.hex a build of the example from the Cube Extensions, USA 915 MHz option selected
  • Added LoraDisco_ATSlave_US915_V111.hex a build from the V1.1.1 tree
  • Added LoraDisco_ATSlave_US915HYBRID_V111.hex
  • a build from the V1.1.1 tree w/US915_HYBRID (17-Aug-2017)
  • Added LoraDisco_ATSlave_US915HYBRID_FULL_NOT_TINY_V111.hex.zip a build using Keil native sscanf/printf w/AT+SEND fixed

 

    This topic has been closed for replies.

    22 replies

    Tesla DeLorean
    Guru
    April 5, 2017

    Posted on April 05, 2017 at 22:45

    Murata datasheet for product

    http://wireless.murata.com/RFM/data/type_abz.pdf

    Pin usage analysis

    CMWX1ZZABZ-091 (MURATA LORA)
     1 PA12/USB_DP
     2 PA11/USB_DM
     3 GND
     4 VDD_USB
     5 VDD_MCU
     6 VDD_RF
     7 GND
     8 PB4/DBG_SX1276_DIO2
     9 PC13/DBG_SX1276_DIO3
     10 PA5/DBG_SX1276_DIO4 ?? UNUSED
     11 PA4/DBG_SX1276_DIO5 ?? UNUSED
     12 PB1/DBG_SX1276_DIO1
     13 PB4/DBG_SX1276_DIO0
     14 PB15/SPI2_MOSI
     15 PB14/SPI2_MISO
     16 PB13/SPI2_SCK
     17 PB12/SPI2_NSS
     18 PA10/USART1_RX
     19 PA9/USART1_TX
     20 PA8/MCO
     21 PA5/ADC5/DAC2
     22 PA4/ADC4/DAC1
     23 PA3/ADC3/LPUART1_RX/USART2_RX
     24 PA2/ADC2/LPUART1_TX/USART2_TX
     25 GND
     26 ANT
     27 GND
     28 PA1/DBG_CRF1 (ANT_SWITCH_RX)
     29 PC1/DBG_CRF3 (ANT_SWITCH_TX_BOOST)
     30 PC2/DBG_CRF2 (ANT_SWITCH_TX_RFO)
     31 STSAFE_NRST
     32 VREF+
     33 PA0/WKUP1/UART4_TX
     34 MCU_NRST
     35 PB8/I2C1_SCL
     36 PB9/I2C1_SDA
     37 PB2/LPTIM1_OUT
     38 PB7/LPTIM1_IN2/USART1_RX/I2C1_SDA
     39 PB6/LPTIM1_ETR/USART1_TX/I2C1_SCL
     40 PB5/LPTIM1_IN1
     41 PA13/SWDIO/LPUART1_RX
     42 PA14/SWCLK/LPUART1_TX
     43 BOOT0
     44 GND
     45 PH1/OSC_OUT
     46 PH0/OSC_IN
     47 TCXO_OUT
     48 VDD_TCXO
     49 GND
     ..
     57 GND
     
    WLCSP49
     1 A1 VDD_USB
     2 A2 PA15 RASIO_NSS
     3 A3 PB3 RADIO_SCK
     4 A4 PB5 LPTIM1_IN1
     5 A5 BOOT0
     6 A6 PB9 I2C1_SDA
     7 A7 VDD
     8 B1 PA12 USB_DP RADIO_TCXO_VCC ??
     9 B2 PA14 SWCLK
     10 B3 PB4 RADIO_DIO_0
     11 B4 PB6 LPTIM1_ETR
     12 B5 PB8 I2C1_SCL
     13 B6 VDD
     14 B7 PC13 RADIO_DIO_3
     15 C1 PA10 USART1_RX
     16 C2 PA13 SWDIO
     17 C3 PB7 LPTIM1_IN2
     18 C4 PC1 RADIO_ANY_SWITCH_TX_BOOST (CRF3)
     19 C5 PC0 RADIO_RESET
     20 C6 PC14 OSC32_IN
     21 C7 PC15 OSC32_OUT
     22 D1 PA8 MSO
     23 D2 PA11 USB_DM
     24 D3 PB1 RADIO_DIO_1
     25 D4 VSS
     26 D5 NRST
     27 D6 PH0 OSC_IN
     28 D7 PH1 OSC_OUT
     29 E1 PB15 SPI2_MOSI
     30 E2 PA9 USART1_TX
     31 E3 PB2 LPTIM1_OUT
     32 E4 PA1 RADIO_ANT_SWITCH_RX (CRF1)
     33 E5 PA0 WKUP1
     34 E6 VREF+
     35 E7 PC2 RADIO_ANT_SWITCH_TX_RFO (CRF2)
     36 F1 PB14 SPI2_MISO
     37 F2 PB13 SPI2_SCK
     38 F3 PB11 ?? I2C2_SCL
     39 F4 PA7 RADIO_MOSI
     40 F5 PA4 RADIO_DIO_5
     41 F6 PA2 ADC2/LPUART1_TX
     42 F7 VDDA
     43 G1 PB12 SPI2_NSS
     44 G2 VDD
     45 G3 PB10 ?? I2C2_SDA
     46 G4 PB0 RADIO_DIO_2
     47 G5 PA6 RADIO_MISO
     48 G6 PA5 RADIO_DIO_4
     49 G7 PA3 ADC2/LPUART1_TX �?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

    Edit: Original post from 5-Apr-2017, fixing the pin table that the forum translation ate.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    June 3, 2020

    In later board examples it becomes apparent that the PA4/PA5 pins need to loop externally to connect DBG_SX1276_DIO5/DIO4 if you want to use those as interrupt signalling sources.

    They are free for ADC, DAC or general usage.

    I use USART1/USART2 in my application. I can use PA0 UART4_TX as a debug/telemetry output channel, and SWDIO/SWCLK can be used as a UART also via LPUART1 on PA13/PA14

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 9, 2017
    Posted on April 10, 2017 at 01:39

    In order to evaluate the range I built two nodes, one which pings location every second from a GPS shield, and a second that receives that data from a fixed antenna.

    0690X00000603kBQAQ.jpg

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 11, 2017
    Posted on April 11, 2017 at 22:17

    So with a relatively low effort test (used good antennas, but didn't clamber up towers or onto the roof), I got fixes out to 3000ft (915m)

    This was with the 14dBm (25mW) TX_OUTPUT_POWER setting. With a better antenna and placement on the vehicle the line of sight was 1.77miles (2850m). The next build of the software I'll try the 20dBm (100mW) setting.

    The range for the Murata module is 5-20 dBm (3-100mW)

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    September 28, 2017
    Posted on September 28, 2017 at 21:25

    With a roof mounted beacon, I was able to demonstrate street level LoS to 2.5 km (1.5 miles) with the least aggressive coding/spreading settings, using the Discovery boards, and 5 dBi antennas.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 15, 2017
    Posted on April 15, 2017 at 03:54

    I've had to rewrite the USART interrupt code, thevcom_Print() function implementing the FIFO on the PingPong demo uses some brain-damaged HAL code that BLOCKS!! It blocks other interrupts until the entire pending buffer is cleared, which means other interrupts have to preempt to function, rather than the IRQ Handler just sending the one character the transmitter will take.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    April 18, 2017
    Posted on April 18, 2017 at 19:17

    The radio interrupt also causes significant blocking and data loss on the USART side, had to ease the radio off the highest priority, allowing the quick/simple USART IRQ Handler to do it's job and leave immediately. KISS

    The radio code also seems to have issues with queuing transmission or splitting large packets. The main() loop needs some attention, as the Rx blocks Tx, so when wanting to chain a number of packets for transmission it is best to check the radio is idle rather than assume Tx complete, error and timeout paths will play happily. Needs to be a method for Tx to preempt a pending Rx window.

    Breaking data into 64-byte LoRa packets seems to be effective to send transient data (ie send-and-pray, new fresh data arriving daily..)

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    May 3, 2017
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    July 16, 2017
    Posted on July 16, 2017 at 15:55

    Mouser is back in stock today (16-June-2017), after shipping pending back-orders they look to have 478 in stock.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 3, 2017
    Posted on August 03, 2017 at 17:22

    Frustrations-de-jour

    The TCXO clock require SB13 to be made, the HSE_VALUE in stm32l0xx_hal_conf.h needs to be changed to 32000000

    The comments in mlm32l0xx_hw.c are wrong, it doesn't use HSE.

    The HAL does not appear to correctly use RCC_HSE_BYPASS, seems to get stuck in spin-loops because it is neither RCC_HSE_ON or RCC_HSE_OFF

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 4, 2017
    Posted on August 04, 2017 at 22:44

    The TCXO is on all the time, code still present delaying for on and off, transitions to sleep, and back-to-back reception. Net result dead zones between Rx where Tx from another node are missed.

    Think there are systemic issues with decomposition of large data blocks in smaller blocks for transmission.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 15, 2017
    Posted on August 15, 2017 at 15:57

    Going to try and add an attachment...

    Apparently I can't do that with blog posts, would need to edit the parent?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 17, 2017
    Posted on August 17, 2017 at 17:24

    Yesterday we dug into the AT_Slave a bit and resolved an issue with sscanf (tiny, or full) breaking on AT+SEND

    https://community.st.com/0D50X00009XkXrMSAV

    https://community.st.com/0D50X00009XkXrMSAV

    Specifically sscanf() expects to write a 32-bit word, you can't stuff that into a 8-bit byte variable, sometimes it might appear to work but is very unsafe and likely to either fail or corrupt other variables.

    The Keil build using the full scanf/printf native libraries added about 2KB to the overall build. ie 37KB from available 192KB

    I thought I'd checked boxes to allow others to post into the blog. Anyway if you have input you can always 'Share' this entry back to me (top right corner). I'm going to use this as the parking point for my LoRa related experiences.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 17, 2017
    Posted on August 17, 2017 at 19:20

    Stripping MODEM_FSK mode code saves 2KB

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 28, 2017
    Posted on August 28, 2017 at 06:07

    https://www.tindie.com/products/TleraCorp/grasshopper-development-board/

    0690X000006042PQAQ.jpg

    Kris Winer has shrunk Arduino type functionality into a minimal footprint using the Murata module.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..