Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF95 possible bug in TX/RX VS IRQ? #38

Open
dekeln opened this issue Jan 7, 2020 · 0 comments
Open

RF95 possible bug in TX/RX VS IRQ? #38

dekeln opened this issue Jan 7, 2020 · 0 comments

Comments

@dekeln
Copy link

dekeln commented Jan 7, 2020

Hi,
is it possible that the ISR will occur before setting '_mode' to 'RHModeRx'/'RHModeTx' inside 'setModeRx'/'setModeTx' (in case there are more ISR which loads the CPU)?

maybe the setModeTx should be like:
void RH_RF95::setModeTx()
{
if (_mode != RHModeTx)
{
_mode = RHModeTx;
spiWrite(RH_RF95_REG_40_DIO_MAPPING1, 0x40); // Interrupt on TxDone
spiWrite(RH_RF95_REG_01_OP_MODE, RH_RF95_MODE_TX);
}
}

instead of:
void RH_RF95::setModeTx()
{
if (_mode != RHModeTx)
{
spiWrite(RH_RF95_REG_01_OP_MODE, RH_RF95_MODE_TX);
spiWrite(RH_RF95_REG_40_DIO_MAPPING1, 0x40); // Interrupt on TxDone
_mode = RHModeTx;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant