You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to get the CRC check working properly, and found two issues. The first one is already addressed here in the pull request #2 .
The other one that prevents the code from detecting the CRC check failures is that any writing operation to the REG_IRQ_FLAGS register (even writing 0x00) causes all the IRQ flags to be reset, not just the intended ones. In the example receive function, there is this line that is supposed to clean only the RxDone flag:
writeReg(REG_IRQ_FLAGS, 0x40);
but actually it cleans all the flags, so you never detect the CRC error. A quick fix is to read the flags before doing any writing to that register. But what seems to me to be a greater problem is the fact that the datasheet says "Writing 1 resets a flag", and in reality, all flags are reset. Even the example code follows the datasheet. I have two RPI Lora Hat boards, and they both behave this way.
The text was updated successfully, but these errors were encountered:
Hi, for my purpose, I just have to read the register contents before writing to it... It is just not that you clear one flag and later read the others, you have to store the whole register for yourself and then clear it...
I have been trying to get the CRC check working properly, and found two issues. The first one is already addressed here in the pull request #2 .
The other one that prevents the code from detecting the CRC check failures is that any writing operation to the REG_IRQ_FLAGS register (even writing 0x00) causes all the IRQ flags to be reset, not just the intended ones. In the example receive function, there is this line that is supposed to clean only the RxDone flag:
writeReg(REG_IRQ_FLAGS, 0x40);
but actually it cleans all the flags, so you never detect the CRC error. A quick fix is to read the flags before doing any writing to that register. But what seems to me to be a greater problem is the fact that the datasheet says "Writing 1 resets a flag", and in reality, all flags are reset. Even the example code follows the datasheet. I have two RPI Lora Hat boards, and they both behave this way.
The text was updated successfully, but these errors were encountered: