2018-07-30 02:12 AM
I am fairly new to STM32 programming and I want to stablish a communication between both boards (B-L072Z-LRWAN1 and NUCLEO-L053R8 + I-NUCLEO-LRWAN1). I was wondering if I can achieve this goal using the PingPong example located in the Cube expansion folder.
This example is avaliable for the B-L072Z-LRWAN1 board but not for the NUCLEO-L053R8 + I-NUCLEO-LRWAN1 combination. However, the PingPong example is avaliable for NUCLEO-L053R8 + some other boards like sx1272mb2das.
What do I need to modify if I want to make the example avaliable for the NUCLEO-L053R8 + I-NUCLEO-LRWAN1 combination?
Thank you in advance.
2018-07-30 05:54 AM
All the firmware is contained on the USI module, so you'd need to build the PingPong example for that directly. That requires some work on the SX1272 code to manage direction control, and defining the pins used. USI had some directions/details on their GitHub page, but I ported code in from my MultiTech/CDEBYTE forks.
Programming the module requires the attachment of an SWD header and connection to an ST-LINK.
2018-07-30 05:58 AM
Here is the thread I had from before, a bit bastardized by the forum transition I'm afraid
https://community.st.com/s/question/0D50X00009XkgY5SAJ/inucleolrwan1
2018-07-30 07:41 AM
Thank you for your time. So if I understood it correctly:
Thank you again.
2018-07-30 08:18 AM
I forked sx1272mb2das.c into a STM32CubeExpansion_LRWAN_V1.x.x\Drivers\BSP\sx1272usi\sx1272usi.c file
And created a USE_I_NUCLEO_LRWAN1 section in stm32l0xx_hw_conf.h
That's a clone ST-LINK, but should work, you'd need to solder a header on to JP6 of the USI shield if it doesn't have one. You'll need to mass-erase the part as USI uses read-out protection.
2018-07-31 02:59 AM
Wait, I think I misunderstood what you meant. I want to have the NUCLEO-L053R8 + I-NUCLEO-LRWAN1 boards combination as a node, not just the I-NUCLEO-LRWAN1 alone. What you said is for the I-NUCLEO-LRWAN1 alone, right?
I am flashing the PingPong program avaliable, which should work for this board + expansion (the readme.txt file says so), but for some reason the transmision is not done. (I can see the command OnTxTimeout). Why is this happening?
2018-07-31 05:45 AM
Ok, but your proposed model has no direct access to the radio, the USI module presents a serial AT command interface, the SX1272 is not visible to you.
2018-08-01 12:25 AM
So if I want to use the combination of both boards, do I need to stablish a ST-Link communication between them using the ST-Link pings (CN2)? If so, how should I connect them to the I-NUCLEO-LRWAN1?
Thanks again!
2018-08-01 12:59 AM
You'd want to remove those jumpers, and then wire up the CN4 SWD connector to the USI JP6 connector
JP6 Header
1 3V3
2 SWCLK
3 GND
4 SWDIO
5 NRST
CN4
1 VTARGET
2 SWCLK
3 GND
4 SWDIO
5 NRST
6 SWO
You shouldn't need to connect for power.
I'd opt for the stand-alone ST-LINK, it would make debugging both targets easier.
2018-08-06 03:13 AM
Thank you for your help. By the way, I have seen an example in the Cube software called AT_Master which sends the AT commands to the USI module, which is connected to the radio module. Do you think I can implement the PingPong starting with that example? I would prefer to do that instead if it is possible.
Anyways, I though that the PingPong example was working fine on the B-L072Z-LRWAN1 but it is not. I am getting this in the UART terminal:
I did not modify any code of the example (just added some #includes) and the 'Ping' message is not done. I am just compiling and flashing the example into the board. When I try to debug to see what happens I get this error:
I added some batteries to the board in case it was due to power issues, but does not work either. What can cause this error?
PS: I am working on a Virtual Machine (Windows 10 as guest)