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

does Wire library send Stop condition? #81

Open
shirish47 opened this issue Oct 18, 2016 · 1 comment
Open

does Wire library send Stop condition? #81

shirish47 opened this issue Oct 18, 2016 · 1 comment

Comments

@shirish47
Copy link

I am using AT24C512 EEPROM but once the device access the chip it does not go to low power.
I am currently keeping the nrf51822 in sleep. when I press button I am storing it to EEPROM and sleeping again. but now I checked the current after this implementation and I am getting 3.4mA of current. if I reset the whole system. power is below mA(I am using INA219 for measuring current). but as soon as EEPROM operation is done its not going below 3.4mA. As the AT24C data sheet shows on stop bit it should go to standby mode and use less current(3-6uA). does the Wire library sends the stop condition after every transmission?

@shirish47 shirish47 changed the title does wire send Stop condition? does Wire library send Stop condition? Oct 18, 2016
@shirish47
Copy link
Author

shirish47 commented Oct 20, 2016

I checked wire.h on mbed ble. it has following line for stop condition.
if(issue_stop_condition) { twi->EVENTS_STOPPED = 0; twi->TASKS_STOP = 1; while(twi->EVENTS_STOPPED == 0) { //do nothing, wait for stop sequence is sent } } return 0; }
while in wire.cpp I downloaded from this repo has
if(stop) i2c_reset(&i2c);
I want to save power after every operation to EEPROM AT24C512. So I have to send stop signal so AT24C can go in standby mode. please help. why does redbear implementation resets?

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