Skip to main content
added 4 characters in body
Source Link
ocrdu
  • 9.3k
  • 23
  • 32
  • 42

While I don't have any experience with this particular device, I can offer some basic guidance when dealing with a new device. You want to make sure that your read and write function calls are working properly. In the spirit of divide-and-conquer, the goal is to determine if the problem is due to the communication or due to unexpected behavior in the device.

I suggest that you first verify that you can reliably write to the device by putting a readRegister call after each writeRegister and comparing the read and write values.

In this specific case, your last line of code is:

sx1278my.writeRegister(REG_OP_MODE, 0x00100011); //continuous mode, TXsx1278my.writeRegister(REG_OP_MODE, 0x00100011); //continuous mode, TX

You're attempting to write a 32 bit value to an 8 bit register. Did you mean to write:

sx1278my.writeRegister(REG_OP_MODE, 0x23); //continuous mode, TXsx1278my.writeRegister(REG_OP_MODE, 0x23); //continuous mode, TX

While I don't have any experience with this particular device, I can offer some basic guidance when dealing with a new device. You want to make sure that your read and write function calls are working properly. In the spirit of divide-and-conquer, the goal is to determine if the problem is due to the communication or due to unexpected behavior in the device.

I suggest that you first verify that you can reliably write to the device by putting a readRegister call after each writeRegister and comparing the read and write values.

In this specific case, your last line of code is:

sx1278my.writeRegister(REG_OP_MODE, 0x00100011); //continuous mode, TX

You're attempting to write a 32 bit value to an 8 bit register. Did you mean to write:

sx1278my.writeRegister(REG_OP_MODE, 0x23); //continuous mode, TX

While I don't have any experience with this particular device, I can offer some basic guidance when dealing with a new device. You want to make sure that your read and write function calls are working properly. In the spirit of divide-and-conquer, the goal is to determine if the problem is due to the communication or due to unexpected behavior in the device.

I suggest that you first verify that you can reliably write to the device by putting a readRegister call after each writeRegister and comparing the read and write values.

In this specific case, your last line of code is:

sx1278my.writeRegister(REG_OP_MODE, 0x00100011); //continuous mode, TX

You're attempting to write a 32 bit value to an 8 bit register. Did you mean to write:

sx1278my.writeRegister(REG_OP_MODE, 0x23); //continuous mode, TX

Source Link
Randy Nuss
  • 695
  • 3
  • 8

While I don't have any experience with this particular device, I can offer some basic guidance when dealing with a new device. You want to make sure that your read and write function calls are working properly. In the spirit of divide-and-conquer, the goal is to determine if the problem is due to the communication or due to unexpected behavior in the device.

I suggest that you first verify that you can reliably write to the device by putting a readRegister call after each writeRegister and comparing the read and write values.

In this specific case, your last line of code is:

sx1278my.writeRegister(REG_OP_MODE, 0x00100011); //continuous mode, TX

You're attempting to write a 32 bit value to an 8 bit register. Did you mean to write:

sx1278my.writeRegister(REG_OP_MODE, 0x23); //continuous mode, TX