EmbDev.net

Forum: FPGA, VHDL & Verilog Microsemi Smartfusion2 i²C Setup


von Allfred (Guest)


Rate this post
useful
not useful
Hello,

I am here to ask for help regarding
the init/setup I2C interface
of a Microsemi Smartfusion2 SoC (M2S010-VFG400).

My goal is to build a project to test a module containing
this SoC.
So far the test is working for the following interfaces:
UART, Ethernet (100 Mbits M11), SPI and External RAM.
(I am an beginner, this project is my work. I know the IDEs Libero 12.2 
and Softconsole 6.2 to some extend)
I used the examples given in the drivers to setup the Hard- and Soft- 
ware.
I am trying to get access to a eeprom.
(24AA025E48T with EUI-48/64 Node Identity - Adress 1010000)

I am not able to setup a working i2C interafce.
Unfortunately the Microsemi Aplication Notes or Guides are off no help 
for this subject.

Can anyone please offer advice to me?

Basic setup, to give an overview.
   Hardwaresetup:
Build project in Libero, use the System Builder to setup
the Arm M3 Core, APB0 Bus to 25 MHz for the I2C_0 interface.

   Softwarecode:
1
#define FlashAdr   0xfau  // Start address of EUI Node ID
2
#define BusAdr     0x50u
3
#define DataLength 8 / I2C_DUMMY_ADDR 0x21u
4
...
5
6
MSS_I2C_init (&g_mss_i2c0, I2C_DUMMY_ADDR, MSS_I2C_PCLK_DIV_256);
7
MSS_I2C_write_read(&g_mss_i2c0, BusAdr, FlashAdr, 1, rx_buffer, DATA_LENGTH, MSS_I2C_RELEASE_BUS);

   What I have done sofar:
Change the i2C interface in System Builder from IO to Fabric.
Various different software variants, like write to all bus adresses, ...

Used an osziloskop the view the bus signals. There is nothing, only the 
bus lines (SDA and SDl) are pulled high after the call to MSS_I2C_init. 
They fall to ground when MSS_I2C_write_read is called .

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.