Does 12c lock up ?

Buzby

Senior Member
Hi,

I've got a 40X2 connected to a 24LC512 using hardware i2c and 4.7K pullups. The 40X2 is running at 64Mhz with 16Mhz resonator.
It works fine, runs for hours and hours no problem.

I'm still developing the software, and need the occasional SERTXD to get some debug info out. SERTXD doesn't work at 64Mhz, so I drop to 16MHz for my debugging runs.

It took me a few goes to get it right, because I forgot that the hi2csetup needed a speed_16 parameter, so now I have a #DEFINE, and all is good.

While I was getting the speed switching #DEF stuff right, I occasionally saw that the 40X2 appeared to be running OK, flashing my LEDs etc, but no data was being read from the 24LC.

Double checked the code and downloaded again, no change. Pressed the 40X2 reset button, no change.

It was only after I power cycled the whole board that the system sprang back into life.

Something in the i2c network was locked up, either the 40X2 or the 24LCxxx. Because I couldn't power cycle each individually I don't know which it was.

Is there any history of PICAXE hi2c locking up when given wrong parameters, and needing a power cycle, not just a reset, to recover ?.

Cheers,

Buzby
 

Buzby

Senior Member
Hi Technical,

That's a really good explanation of what was going wrong.

I thought it was my speed_xx and setfreq mismatches, they certainly wouldn't have helped the situation.

The problem only showed during the time I had the mismatches, but I can see from the post that it may happen after any reset.

The project is at the stage where I don't need to keep doing resets, so I've not seen it again, but I shall certainly be aware in the future.

Thanks,

Buzby
 
Top