I'm trying to run the example: https://github.com/quark-mcu/qmsi/blob/master/examples/i2c/main.c qmsi/main.c at master · quark-mcu/qmsi · GitHub
This example based on EEPROM 24FC256, but I'm using M24C64 which is simillar with the reference, I just changed a few parameters:
# define EEPROM_PAGE_SIZE_BYTES (32)
# define EEPROM_SLAVE_ADDR (0xA0)
And all read/write functions return error. I check this program with a several eeprom ICs, but without success.
Thanks for your interest in the Intel Quark Microcontrollers Platform.
I have just downloaded the latest version of Intel System Studio for Microcontrollers and tested the example code. I built it with no problems, see image below. Are you using the latest version of this software? Also are you using QMSI 1.1 for this example?
Please let me know your results, I will be waiting for your reply.
Have a nice day!
Could you please provide me your errors? If you could add some screenshots it will be very helpful. Also have you checked the datasheets to see if there are parameters that change from the EEPROM 24FC256 to M24C64. It is important to see if there are differences in the time frame for the bus protocol.
I will be waiting for your reply, have a nice day.
All timing timing sequences are same for the both IC. I've got "-5" error from I2C bus when try to write or read something to/from the EEPROM. There's no any useful screnshots, because firmware only return success or failed messages
Seems like your issue is not code related since you have the correct parameters. Can you measure your signals with an oscilloscope or logic analyzer, in order to see if the time frame for bus protocol is accurate.
I will be waiting for your reply, have a nice day!
Hi, Jose, thanks for the reply. I will do that, but on the same bus I already has another i2c device, which works well.
UPD: Problem resolved. Wrong address selected. I thought, that right address is 0xA0 (1010 0000b), but in D2000's case the right address with i2c is 0x50 (0101 0000), looks that it should be inverted.