Question
Cannot read config register value of M24LR16E via I2C
Posted on June 07, 2018 at 09:34
Hi All,
I'm trying to communicate with M24LR16E(NFC tag IC) via I2C (STM32F103R is Master)
I could find configuration register(address 2320) has initial value 0xF4.
so I tried to read the configuration register, but I got 0xFF.
would you please take a look at what is wrong with my code ?
=======================
uint16_t NFC_sys_addr = 0xAE, nfc_conf_addr=2320;
uint8_t nfc_config=0;HAL_I2C_Master_Transmit(&hi2c1, 0xAE, (uint8_t *)&nfc_conf_addr, 2, 100); // set config register address
HAL_I2C_Master_Receive(&hi2c1, 0xAE, (uint8_t *)&nfc_config, 1, 100); // read byte printf('NFC config 0x%x\r\n', (unsigned int)nfc_config);========================
Thanks in advance
Best Regards,
Hae Ryong
#i2c-isues #m24lr16e