MK20DN512 Clear i2c bus using Processor Expert InternalI2C Component

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK20DN512 Clear i2c bus using Processor Expert InternalI2C Component

912 Views
cesar1
Contributor I

I'm using an i2c eeprom memory and sometimes this memory lock the bus. The memory have no reset pin than, the only way to clear the bus is to send nine clock pulses and generate a stop condition to reset the i2c communication state of the memory.

Is there any way to do it using the Processor Expert components?

0 Kudos
1 Reply

841 Views
ErichStyger
Senior Contributor V

I'm doing this with the GenericSWI2C component (see Bit-Banging I2C with ResetBus() Functionality | MCU on Eclipse ).

If you want to combine this with the InternalI2C, you would have to use shared pins (see ) and do the re-muxing (see Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse ).

I hope this helps,

Erich

PS: if there is any interest how this works with the MCUXpresso SDK: The I2CLIB_ReleaseBus() does exactly this: mcuoneclipse/i2clib.c at master · ErichStyger/mcuoneclipse · GitHub 

0 Kudos