ee24 icon indicating copy to clipboard operation
ee24 copied to clipboard

Example of writing to eeprom

Open IndiaMike opened this issue 1 year ago • 2 comments

Library does not fully support writing operation. It is important to remember about switching WP (Write Protection) pin before call write function.

        _Bool status = false;
	status = EE24_Init(&eeprom24, &hi2c1, EE24_ADDRESS_DEFAULT);

	uint8_t data[4] = {0xBE, 0xEF, 0xAB, 0xCD};

	HAL_GPIO_WritePin(EEPROM_WP_GPIO_Port, EEPROM_WP_Pin, GPIO_PIN_RESET);
        status = EE24_Write(&eeprom24, 0u, &data, 4, 1000);
	HAL_GPIO_WritePin(EEPROM_WP_GPIO_Port, EEPROM_WP_Pin, GPIO_PIN_SET);

	memset(&data, 0u, sizeof(data));
	status = EE24_Read(&eeprom24, 0u, &data, 4, 1000);

The rest of library is ok. Simple and working library. Thanks :D

IndiaMike avatar Jan 19 '24 11:01 IndiaMike

Hello. OK. I will add WP pin support soon.

nimaltd avatar Jan 20 '24 08:01 nimaltd

I have updated the LIB. please try again for any devices you have.

nimaltd avatar Mar 28 '24 09:03 nimaltd