Products > FMC Products

FMC160 CPLD I2C access

(1/3) > >>

venka:
Hi- I'm trying to access the CPLD on FMC160 over the I2C bus and so far I have not been successful.
My setup is KC705 with FMC160 (connected via FMC700) on HPC connector. Here are the steps I
take on the I2C bus:
1. Start
2. Send 8'hE9 // Puts the I2C mux on KC705 in write mode
3. Send 8'h02 // Mux Command byte to select Channel #1
4. Stop  (I get an ack for both the bytes above)
5. Start
6. Send 8'h79 // set up CPLD for read operation, I get an ack for this
7. Send 8'h03 // send the read address for version register....I DO NOT get an ack for this.
8. Read the next byte // I read all 1's.
Is there a step I am missing? Thanks!
-Venka

lmunoz:



Hi Venka,


Are you doing this in some customized FPGA design? Are you using your own I2C firmware implementation?


The addresses to the CPLD should look like this


01111XX


So maybe your read address should be


73 and not 03


or


Maybe try reading the settings out the I2C MUX or the voltage monitor to confirm it has the right value and your reading function works.

Regards,
Luis

venka:
Hi Luis - This is a custom logic in FPGA on KC705. The address to the CPLD is 7'b0111100. When I want to do a read, I will send a 1'b1 after the address. So the final command will be {address, read_bit} = {7'b0111100, 1'b1} = 8'b01111001 = 8'h79...this is what I do in step #6. I do get an ack from the CPLD for this command.
The address in step #7 is the address of the version register which is 0x03as mentioned in the CPLD register map in Appendix.B of FM160 user manual.
-Venka
 
 

lmunoz:
Hi Venka, I can't really help you with custom designs we just provide the reference design which has examples in how this is done, but to read one byte I'm pretty sure you do this:



1. Start (Master to Slave)
2. Send  01111 11 1  [start address + offset + read bit]  (Master to Slave)
3. Acknowledge (Slave to Master)
4. Received Data (Slave to Master)
7. Not Acknowledge ( Master to Slave)
8. Stop ( Master to Slave)


venka:
Hi Luis - The I2C address for the slave is 01111XX where XX=GA(0..1), on KC705 XX turns out to be 00. Can you please confirm with the designers on the read process (if the I2C uses 10-bit addressing or not)? What if I wanted to read address 0x07? According to your method it would be {address + offset + read bit} =  01111, 111, 1 = 9 bits.
-Venka
 

Navigation

[0] Message Index

[#] Next page

Go to full version