We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, as the SleepMode is not entered most of the times with the current setMode void i suggest the following changes:
put the modifyRegister: https://github.com/autowp/arduino-mcp2515/blob/master/mcp2515.cpp#L167
inside the while loop so it will rewrite the register.
also set the timeout from 10ms to 200ms as the sleep mode entering can take up to 100ms
i also suggest to add the sleepWakeup bit (CANINTF_WAKIF) into the reset void: https://github.com/autowp/arduino-mcp2515/blob/master/mcp2515.cpp#L50
so it will wake up on can messages, or maybe make an extra function to enable or disable that bit so everyone can set if needed.
The text was updated successfully, but these errors were encountered:
Current code works for me for entering the sleep mode.
Do you mind enlighting me where the specification of that entering sleep mode can takes 100ms? I didn't find it in the datasheet.
Sorry, something went wrong.
I tested the time it took to bring it to sleep mode with the edited function, and sometimes it was up to 100ms, it was not from the datasheet.
With the stock function i was not able get it into standby mode by calling it one time, even with disabled timeout.
No branches or pull requests
Hi, as the SleepMode is not entered most of the times with the current setMode void i suggest the following changes:
put the modifyRegister: https://github.com/autowp/arduino-mcp2515/blob/master/mcp2515.cpp#L167
inside the while loop so it will rewrite the register.
also set the timeout from 10ms to 200ms as the sleep mode entering can take up to 100ms
i also suggest to add the sleepWakeup bit (CANINTF_WAKIF) into the reset void: https://github.com/autowp/arduino-mcp2515/blob/master/mcp2515.cpp#L50
so it will wake up on can messages, or maybe make an extra function to enable or disable that bit so everyone can set if needed.
The text was updated successfully, but these errors were encountered: