This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c bus reset signal in 28335

Hi, Mr.,

I'm using the 28335 with microchip serial EEPROMs.

Could you let me know the method to send the i2c bus reset signal to EEPROM.

The bus reset signal is as follows:

  • Have you tried using the free data format? It lets you send arbitrary data at the start of a transfer. Sections 2.5.3 and 2.5.4 of the F2833x I2C guide have the information you need. It's literature number SPRUG03.

  • Thanks for your reply, Mr. Haun.

    I'll try it later.

    Currently, I implemented that using GPIO handling.

    that is the code.:

    void	gpio_I2C_bus_reset(void)
    {
    	register U16	n;
    	gpio_release_I2C();
    
    	// I2C start. START_SETUP, HOLD, LOW
    	GPIO_SDAA = 1;
    	GPIO_SCLA = 1;
    	DELAY_US(GPIO_I2C_START_SETUP_TIME_US);
    	GPIO_SDAA = 0;
    	DELAY_US(GPIO_I2C_START_HOLD_TIME_US);
    	GPIO_SCLA = 0;
    	//_nop();
    
    	// data
    	n = 9;	// nine 1.
    	while( n )
    	{
    		// data 1.
    		GPIO_SDAA = 1;
    		DELAY_US(GPIO_I2C_LOW_TIME_US);
    		GPIO_SCLA = 1;
    		DELAY_US(GPIO_I2C_HIGH_TIME_US);
    		GPIO_SCLA = 0;
    		n--;
    	}
    
    	DELAY_US(GPIO_I2C_LOW_TIME_US);
    
    	// I2C start
    	GPIO_SDAA= 1;
    	GPIO_SCLA = 1;
    	DELAY_US(GPIO_I2C_START_SETUP_TIME_US);
    	GPIO_SDAA = 0;
    	DELAY_US(GPIO_I2C_START_HOLD_TIME_US);
    	GPIO_SCLA = 0;
    	//_nop();
    
    	DELAY_US(GPIO_I2C_LOW_TIME_US);
    
    	// I2C stop
    	// GPIO_SCLA = 0;
    	// GPIO_SDAA = 0;
    	GPIO_SCLA = 1;
    	DELAY_US(GPIO_I2C_STOP_SETUP_TIME_US);
    	GPIO_SDAA = 1;
    	DELAY_US(GPIO_I2C_BUS_FREE_TIME_US);
    	
    	// gpio default & input
    	GPIO_SDAA = 1;
    	GPIO_SCLA = 1;
    	
    	EALLOW;
    	GPIO_SDAA_DIR = 0;
    	GPIO_SCLA_DIR = 0;
    	EDIS;
    }
    

    It works. But, this code can be only used at booting time with DINT.

    Nice day!

    Cheolhyeon Jo,