Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 2 months ago. This question has been closed. Reason: Off Topic
NUCLEO F411RE and LoRa not working
EDIT: Have completely re worded the question after much more testing.
I'm currently trying to get LoRaWAN working but after a few days of trying I still can't. I'm using the NUCLEO F411RE paired with a HOPE RFM95 chip (https://wiki.dragino.com/index.php?title=Lora_Shield - V1.4). The arduino uno and the stm nucleo board pins run at different logic levels (5V on uno, 3.3V on nucleo). so the dragino shield has logic converters for this which I bypassed by soldering jumpers directly to the RFM95 chip on top.
I've looked into the SX1276 LoRa drivers (https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers) and know they support the RFM95 chip (compared to the original semtec drivers) and it does successfully detect its the RFM and not Semtec.
Have tested the shields do work with arduino uno's using this lib https://github.com/sandeepmistry/arduino-LoRa . The mbed-os-example-lorawan on the DISCO_L072CZ_LRWAN1 also works fine (although only with the online compiler? the CLI would just crash the chip...). I have also used two different F411REs and two different RFM boards
The lorawan example codes only modification I made was for the F411RE pin mapping as follows in the json config.
pinMapping
"NUCLEO_F411RE": { "lora-radio": "SX1276", "lora-spi-mosi": "D11", "lora-spi-miso": "D12", "lora-spi-sclk": "D13", "lora-cs": "D10", "lora-reset": "D9", "lora-dio0": "D2", "lora-dio1": "D6", "lora-dio2": "D7", "lora-dio3": "D3", "lora-dio4": "NC", "lora-dio5": "NC", "lora-rf-switch-ctl1": "NC", "lora-rf-switch-ctl2": "NC", "lora-txctl": "NC", "lora-rxctl": "NC", "lora-ant-switch": "NC", "lora-pwr-amp-ctl": "NC", "lora-tcxo": "NC" }
The SPI appears to be working correctly when connected to a logic analyser. Once the lora chip is done transmitting it will produce an interrupt on the DIO0 pin which I've confirmed does happen and is handled correctly by the SX1276 radio driver but after this the lorawan example never handles the TX_DONE event and just seems to hang (should print Message sent to network server).
1 Answer
5 years, 1 month ago.
Hi Daniel,
I would test the SPI first. Forget the mbed-os-example-lorawan on NUCLEO F411RE and use for example: https://os.mbed.com/docs/mbed-os/v5.14/apis/spi.html#spi-hello-world Use the same pin what you have on your pinMapping to be used with HOPE RFM95. Look HOPE RFM95 manual and see can you read something out from the HOPE (serial number or anything).
If it does not work then use something else with the same voltage level instead of HOPE as SPI slave.
-> Isolate the problem.
Regards, Pekka