Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: toka on November 15, 2021, 04:12:23 PM

Title: One-Wire Interace for MAC-ID chip on TE0710
Post by: toka on November 15, 2021, 04:12:23 PM
Hello,

I was unable to find any resources for the readout of the MAC address of the one-wire EEPROM (U13).
A solution for a AXI implementation for Microblaze would be great.

Best regards
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: Antti Lukats on November 16, 2021, 01:22:38 PM
please write email to @support we can send an IP for the MAC ID EEPROM

g
Antti
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: Antti Lukats on November 17, 2021, 08:26:52 AM
I am attaching the IP here too, if someone needs it. The IP is very simple, it reads the MAC ID and returns a vector that can be used in the application.
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: danvp on December 01, 2021, 04:14:00 PM
Hello Antti Lukats,

I need to read the MAC from the EEPROM in the TE0712, from freeRTOS.

Looking for info I bumped into this post. Is the IP for the MAC ID EEPROM that you shared with toka also suitable for the TE0712?

And if it is suitable, can you please also offer some guidance on how to read the MAC? Where in the EEPROM is it stored?

Thanks a lot in advance,

danvp
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: Antti Lukats on December 02, 2021, 09:11:39 AM
same eeprom so yes suitable IP. The address location is defined in device datasheet but you do not need to know it, the IP core has fixed address for readout. The IP reads the mac and returns a vector, you need to add some "register read" IP to the bus in order to access it from freeRTOS.
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: toka on December 02, 2021, 12:44:09 PM
As a suggestion: I just created a custom AXI peripheral to read out the vector.
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: Antti Lukats on December 03, 2021, 02:23:23 PM
Quote from: toka on December 02, 2021, 12:44:09 PM
As a suggestion: I just created a custom AXI peripheral to read out the vector.

yes this is the correct way, if lazy can also use AXI GPIO ;)

Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: danvp on December 03, 2021, 03:58:15 PM
Thanks toka, Antti,

Actually I just saw this, and it looks like my nature is being lazy, since I went for AXI GPIO approach ;D

Here's a screenshot of that part of my design:

(https://i.imgur.com/iadYsdP.png)

The problem I have is that I read all zeros (except for the valid bit, which I concatenated as bit 16 to the MAC High part):

MAC read from EEPROM:
MAC Low: 00000000
MAC High: 00010000


Any ideas why this could be happening?
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: toka on December 03, 2021, 04:39:12 PM
I found a problem: when I use the LIA to check the correct MAC ID is read, loading the bitstream from Vivado will give the correct result. However, when I use Vitis to upload the bitstream the ID gets swapped from e.g. 12:34:56:78:90:AB to 78:90:12:34:56:78. So the bytes are shifted downwards by 2 bytes with kind of ring-buffering.
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: Antti Lukats on December 06, 2021, 02:55:24 PM
this IP core is really AS-IS, we can not provide much tech support here. It is known to work undersome usage cases, if there are problems, well need to debug then. Maybe reset the ip core programmatically and re re-read the vector?
Title: Re: One-Wire Interace for MAC-ID chip on TE0710
Post by: danvp on December 16, 2021, 02:34:19 PM
Sorry it took me a while to reply, I've been on holidays  ;D

After some debugging, I found the problem... one of those silly things. I had a polarity issue with the scio_t line and my IOBUF.
After inverting the line I get the MAC correctly!

Thanks!