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

added Fujitsu MB85RS4MT FRAM; added sleep mode #31

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

FUEL4EP
Copy link
Contributor

@FUEL4EP FUEL4EP commented Jun 25, 2024

Changes of this pull request are:

  1. added Fujitsu MB85RS4MT FRAM
  2. added sleep mode

The changes have been successfully verified with my PCB HB-UNI-SEN-BATT_ATMega1284P_E07-868MS10_FRAM_FUEL4EP.
In sleep mode, the current dissipation has been reduced from 30 uA (without sleep mode) to 12 uA (with sleep mode).

@FUEL4EP FUEL4EP closed this Jun 25, 2024
@FUEL4EP FUEL4EP reopened this Jun 25, 2024
spi_dev->endTransactionWithDeassertingCS();
delayMicroseconds(100);

return spi_dev->write(&cmd, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't really need to do spi write() here, cs along should be able to put chip out of sleep

- check if sleep mode is supported by device
Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for your PR, I made some changes

  • add pre-commit and fix clang (quite some bit of format changes)
  • rename API to enterSleep() and exitSleep()
  • remove spi write in exitSleep()
  • check if device support sleep mode before executing the command.

Please try it again to see if this still works for you.

@hathach hathach merged commit a9f8d19 into adafruit:master Jul 18, 2024
1 check passed
@FUEL4EP
Copy link
Contributor Author

FUEL4EP commented Jul 21, 2024

Hello Ha Thach,

Thanks for merging my pull request. I've checked my application https://github.com/FUEL4EP/HomeAutomation/tree/master/AsksinPP_developments/sketches/HB-UNI-Sensor1-THP_MA-AHT20_BMP280 with your library commit 928281f. Everything is running smoothly as expected. In sleep mode, the current is again about 12 uA.

@hathach
Copy link
Member

hathach commented Jul 22, 2024

great thank you for your updated feed back.

@adafruit adafruit deleted a comment from FUEL4EP Jul 22, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants