@Hootie81 what bus speed are you using?
@kennethlimcp, the default, 100kHz
Try this fix - https://github.com/spark/firmware/pull/495/files
@kennethlimcp, I think I was able to locally flash, I used the feature/i2c_timeout, did this include your pull?
Do I also have to flash the modules section 1st? I did not do that aspect.
Yes you need to update system firmware everytime there are system related code changes.
My device worked fine at 100khz and 400khz though you guys might have other issues. No harm trying and let me know 
@kennethlimcp, just to be clear basically anytime I flash locallay I need to compile and flash “cd moduels” first then “cd main” ?
Yeah to be super duper clear and safe 
if you do make clean all PLATFORM=photon APP=xxx program-dfu it will also download the APP that you specify in the modules folder 
cool. Thanks
Ill race you… part 1 just finished falshing
@Hootie81, race is over i flashed it 2 days back 
the race was with @wesner0019…
It didnt fix my problem, still get the timeout and the I2C_FLAG_RXNE flag set in the SR1 register…
@Hootie81, @Work and didn’t bring my device, thinking I would get more work done, but I was wrong about that too.
@Hootie81, bad luck. I hope this gets looked into soon!
is there any way to restart the i2c line, with out a power or system reset?
Im at work… and i have my device
its my de-stress activity when i just need a break!
I see a HAL_I2C_End() but don’t see it used any where…
ping @mdma
Let’s bring in @satishgn here since he’s our peripherals expert!
pulled
@peekay123, I came across this other library from mbed. Does this look like it might work better or worse than the one above?
Current Code:
found:
https://mbed.arm.com/teams/components/code/MMA7660/
This one has many features for interrupts etc.
I found that if I re-initialized the accelerometer after reading 0 for a few times, that it started reading again. I figured in my application reading 0 would hardly ever happen. I would like to find a better solution, but this is a clue that the accelerometer is freezing up for some reason and probably not a problem with the I2C line.
Anyone have any thoughts on a better way to detect if the accelerometer froze and restart it?
if(millis() - startAccl > 200){
accelemeter.getAcceleration(&ax,&ay,&az);
startAccl = millis();
if(az == 0){
timeoutaz++;
}
if(az!=0 && timeoutaz >=0){
timeoutaz--;
}
if(timeoutaz >= 5){
accelemeter.init();
timeoutaz = 0;
}
}