cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot send more than 1 byte!

MHoss.1
Associate III

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:

  1. Make sure the module is not in sleep mode
  2. Set the Tx pin high and Rx pin low.
  3. Clear the flags
  4. Set the payload size
  5. Set the TxBaseAddr and AddPtr to 0x80
  6. Write 3 bytes to FiFo
  7. Change the operation mode to Transmitter.
  8. 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.

1 ACCEPTED SOLUTION

Accepted Solutions
MHoss.1
Associate III

If anyone else has the same problem, what worked for me was to change the header to implicit BUT on the transmitter side instead of checking flags I had to check the operation mode until it goes to standby. The module was going to standby but no flag was being set. Not sure why but it got it going.

View solution in original post

1 REPLY 1
MHoss.1
Associate III

If anyone else has the same problem, what worked for me was to change the header to implicit BUT on the transmitter side instead of checking flags I had to check the operation mode until it goes to standby. The module was going to standby but no flag was being set. Not sure why but it got it going.