FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5987 Discussions

Intel FPGA Avalon I2C (Master) Core F-RAM

Honored Contributor II


I am trying to communicate with FM31278. 

Link: http://www.cypress.com/file/126916/download 


This device communicate via I2C. I Use Avalon I2C (Master) Core. I use altera example code found in datasheet.  




This example doesnt work. I successfully wrote data to F-Ram. Then I call function "alt_avalon_i2c_master_tx_rx". This function returns status -2. I connected oscilloscope to the I2C and took a snapshot of the rx_tx message: 


https://alteraforum.com/forum/attachment.php?attachmentid=14570&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=14571&stc=1 It looks like it sends correctly tx message. Then it restarts and send write beside read message. I tryed to debug this example and cchecked whitch values It writes to the TFR_CMD register. It writes correct value (F-RAM address 83): 


IOWR_ALT_AVALON_I2C_TFR_CMD(i2c_dev->i2c_base,val | (issue_restart << ALT_AVALON_I2C_TFR_CMD_STA_OFST) | (issue_stop << ALT_AVALON_I2C_TFR_CMD_STO_OFST)); 


val: 167 

issue_restart: 1 

issue_stop: 0 


Please can you help me with this problem? I absolutely dont know why It doesnt work and how to fix this. 


Thank you.
0 Kudos
0 Replies