cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RET6 + SX1262 (Ebyte E22)

VNold.1
Associate II

Hello everyone,

it seems like it is very hard to get an answer in any lora issues. I give it a shot anyway :D

I've watched all the lectures in udemy to get familar with stm32 MCU and i have learned a lot, but unfortunately not enough to get a LoRa-Node working. Hate it!

I purchased a STM32L476 MCU and a sx1262 by EBYTE, milled my own pcb and soldered all components together. The sx1262 module is connected to SPI1 of the MCU. I have attached the schematic, if someone wanna take look on it.

The LED works pretty well! 🙂

I downloaded the "STM32CubeExpansion_LRWAN_V1.3.1", read the "UM2073" and moved the folder "LoRaWAN", which is located in "Middlewares -> Third_Party", to my own project. All files in the "Conf" folder were named as "template". I have deleted the "template" remark in the filenames, did the #includes in my project and hit the build icon. You guessed right, it ends up in an error. And there is my first question, Why? The IDE can't find the header file "hw.h" (Screenshot: STM32CubeIDE)

I'm using the STM32CubeIDE, do i have to do something additionally to add the LoRaWAN library to my project, i thought just copy->paste were enough :(

7 REPLIES 7

>>it seems like it is very hard to get an answer in any lora issues.

Usually because it is time consuming and expensive to support, and with hardware or build environments which are outside my use case.

It does appear you have issues with HW.H, your tabs show TWO different copies open, one locked/read-only, the other not. Lacking any context here as to what the compiler/editor is flagging as an error.

In the LRWAN library I'm using it pulls in several other LoRa includes, and deeper it pulls in BSP related files defining the implementation details.

You'd need to determine what your tools are actually objecting too. If it is some line within the file, or the ordering of the Include Paths, and where the first copy of the file is found.

I'd expect also you'd need for the LoRa code to know the specific pin associations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
VNold.1
Associate II

Hello Clive,

thanks for the response. Did you manage to get LoRa working with a custom STM32L4 PCB and getting connected to a Backend (TTN)?

So, am i right by using the folder "LoRaWAN" which is located in "Middlewares->Third_Party" for my custom PCB?

I that case i need to...

  • tell LoRa library on which SPI the sx1262 module is connected to (in my case SPI1).
  • configure the timeServer
  • configure the commissioning.h with my DevEUI, AppKey, AppEUI etc.
  • configure the gpio's which are used to interrupt the MCU

Is there a easy and fast way to get this done, just to have a look if my custom PCB is working right?

VNold.1
Associate II

Iam close (i guess) to get the End_Node example "sx1262dvk1cas" working on my custom board. iam going step by step through the whole source code and now the debugger gets stuck in a while loop. anyone knows what i supposed to do here to get rid of this infinity loop?

The var "Timeout" never changes (always on his max value 0xFFFFFFFF) therefore there is no escape from the while loop... neither i don't know where "Timeout" is getting his value

0690X00000DXTthQAH.png

Fsond.1
Associate II

there are developments from this issue? anyone?

actually, i success to send and receiving data from ttn using my nucleo l452rep board combine with sx1262mb2cas. But my project gonna using ebyte e22, and get stuck in busy pin didn't goes low (wake up) when the nss pin goes low, just like the datasheet say, any idea guys?

Fsond.1
Associate II

@VNold.1​ 

I wouldn't expect it to be that different in behaviour to the normal SX1262 code, the higher power one having a receive/transmit pin to engage the PA vs LNA.

You could inspect the internal circuit but I don't expect there to be anything odd in there.

Used the E19's here, don't have any time invested in these. You're going to have to read the EBYTE and SEMTECH docs and walk the code to understand the behaviour. Would look carefully at register configuration and pin usage on radio IC and how that maps to the shield implementation.

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

yes, i do think so. I will look more carefully at the code. Thanks for your suggest