Cannot send more than 1 byte!
I'm using two STM32L4xx connected to LoRa modules. The LoRa settings on both cases are:
bw = 500 kHz
SF = 12
CR = 4/5
implicit header, Crc off, low data rate optimization is on.
On transmitter module, I do the following:
- Make sure the module is not in sleep mode
- Set the Tx pin high and Rx pin low.
- Clear the flags
- Set the payload size
- Set the TxBaseAddr and AddPtr to 0x80
- Write 3 bytes to FiFo
- Change the operation mode to Transmitter.
- Wait until the TxDone flag is set
I have read back all the registers to make sure they are properly set.
On the receive side I make sure the modem is in continuous receive mode and check the flags until RxDone is set to 1. When I check the register RxNbBytes it is 1 and reading through the FiFo I can only see one of the bytes has been transferred.
I've been dealing with this problem for about a week now and have tried many different things. Comparing my steps to other libraries (such as mbed os), I'm following the same steps.