Hello, we use the stm32g081kb to communicate with a i2c capable nfc Chip from nxp, the ntag i2c. After soldering on a new tag ic chip everything works fine. We can read the field detect and reading/ writing the config registers is working properly. After i unplug the vcc from the pcb or the usb cable from the stm32 the i2c Connection to the nfc Chip doesn‘t work properly after reconnecting the pcb to vcc. Somehow the i2c writes the TXDR and rxdr values in the First to configuration Registers and therefore the Chip and the Communication doesn’t work anymore. The Slave and the Master are both powered by the mcu vcc. I am really lost what could be the problem here? Thank you for your help! best regards, ines
Mmh. Initially it was working fine, and now not anymore? What is now different from when it was working? That is still unclear to me after reading your description. Also, schematics might help to receive decent support on the matter. KR, Sebastian
Ines L. schrieb: > the i2c Connection to the nfc Chip doesn‘t > work properly How you detect, that the I2C failed. Was always a NACK returned by the slave or failed the master to do a certain step.
Than you for your responses, I figured it out now. Our I2C when first initialized worked fine, but the second time and so on, when reading and writing data to/from the chip, the first two bytes sent/received were the address and not the data itself. Apparently our Chip couldn't handle the I2C fast mode. Setting it to standard mode (100kHz) solved the problem and now it works just fine.
Thanks for the feedback, and good to hear that you sorted it out! KR, Sebastian