FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
6159 Discussions

How to use hps driven I2C pins

snehal_p
New Contributor I
2,081 Views

Hello,

Can anyone help me with guidelines to use hps driven I2C pins on DE1SOC board 

Thanks,

snehal_p

0 Kudos
11 Replies
JingyangTeh
Employee
2,067 Views

Hi snehal_p


For the DE1-SOC dev kit, I see that the I2C is connected to a multiplexer in which you will need to toggle the HPS_I2C_CONTROL (HPS_GPIO48) to switch between the FPGA owning the i2c or the HPS.


Once the dev kit boots into the linux environment you could try searching for GPIO48 under the /dev directory to toggle the i2c to HPS.


You could refer to the document below section 3.6.5

https://www.terasic.com.tw/cgi-bin/page/archive_download.pl?Language=China&No=836&FID=ae336c1d5103cac046279ed1568a8bc3



Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
2,040 Views

Hi


Any update on this case?


Regards

Jingyang, Teh


0 Kudos
snehal_p
New Contributor I
2,031 Views

Hello Jingyang,

I'm trying to interface rtc ds3231 breakout board to DE1SOC using hps driven I2C . I2c bus is being not detected.

 

Thanks,

snehal_p

 

0 Kudos
snehal_p
New Contributor I
2,018 Views

Hello Jingyang,

 

PFA screenshot of error I get when I compile the demonstration i2c switch code. I receive similar error when I compile c code for rtc interface. Can you please help me with this.

 

Thanks,

snehal_p

0 Kudos
JingyangTeh
Employee
1,985 Views

Hi


It seems like there is a missing define in the make file.

Could you check if there is a define for the CV, something like below:

"ALT_DEVICE_FAMILY = soc_cv_av"


Regards

Jingyang, Teh


0 Kudos
snehal_p
New Contributor I
1,943 Views

Hello Jingyang,

 

I2C adapter is being detected but not able to read and write.

PFA screenshot.

 

Thanks,

snehal_p

 

0 Kudos
JingyangTeh
Employee
1,930 Views

Hi Snehal


It seems like the i2c is working if it is able to probe the i2c bus.

What is the expected value that the i2cget command should return?


Regards

Jingyang, Teh


0 Kudos
snehal_p
New Contributor I
1,854 Views

Hello Jingyang,

 

Expected value is whatever we write as in this case 255.

Basically I'm trying to interface rtc ds3231 to this i2c bus. What would be the appropriate approach to use this I2C bus to interface external rtc breakout board.

Can you please help me with approach.

 

Thanks,

snehal_p

 

 

0 Kudos
JingyangTeh
Employee
1,760 Views

Hi Snehal_p


The method you are using would be a good tool with start with.

Could you try getting some waveform of the i2c so that we could see if the read and write request is sending properly to the rtc breakout board?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
1,714 Views

Hi Snehal_p


Any update on this case?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
1,690 Views

Hi


Since there are no feedback for this thread, I shall set this thread to close pending. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


Regards

Jingyang, Teh


0 Kudos
Reply