Post Go back to editing

adin2111 - the 2 header bytes are missing when receiving a data frame

Category: Software
Product Number: ADIN2111

Hi community,


I am currently working on the ADIN2111 and I have a small problem.


I ported the barmetal library for the ADIN2111 under zephyr and I don't have the same result depending on the board I'm using.

I use 2 boards.
 - one is the adin2111 evaluation board: EVAL-ADIN2111EBZ.
 - And another where I power off (electrically through P8) the STM32L4 on the evaluation board and connect a gigadevice board (GD32F427V-START) to connector P7.

When I get a frame on the SPE, it works for the evaluation board. I receive the SPI frame as shown in the diagram below

but when I get an SPE frame on the board with the gigadevice connected, the header is missing in the SPI frame, and I don't get the frame in the high level library functions

I searched the ADIN2111 datasheet but couldn't find any bit that indicates the header is optional.

I read all MAC registers and all PHY45 registers on both boards, after initializing the adin2111, and they are identical.

SPIs on both boards are identical and configured at 20 MHz.

If anyone has had this problem before and can help me.
Thanks in advance

Parents
  • I have a bit more info on this problem.

    here are the frames received on the gigadevice and on the stm32.
    The programs are the same apart from the hardware configuration specific to each microprocessor

    at left the spi frame for the gigadevice. at right for the stm32

    it's an arp frame.

    we can see that the two bytes of headers are missing (00 0B) between the FF in the receive frame

  • So, i have find the problem.

    it's a zephyr library / adin error.

    when i use one of function to write data on the spi bus, i have all time one more byte (zephyr library error)

    So when i sent the frame to get the size of the data receive by the SPE bus, i have an extra byte at the end of the command ( the 3 bytes to get the size + an extra byte).

    It's the extra byte which causing the error (the 2 headers bytes missing).

    If i use another function to write on the spi bus, without the extra byte, it's fine. I have the 2 headers bytes when i get the frame receive on the SPE bus.

    In conclusion :

    If the clock continues after obtaining the frame size (MAC address 0xC0 or 0x90), the frame obtained by MAC address 0x91 or 0xC1 is corrupted.

    It may be a component error.

  • Hello,

    When you say you ported our barmetal library to Zephyr, do you mean you ported our No-OS drivers to work under Zephyr?.

    We only provide support for the code as is. We are not supporting Zephyr at the moment.

    As far as I understand this error is not happening with our drivers when running on the ST microcontroller in our board. Is that right?

    Regards,

    Raquel.

Reply
  • Hello,

    When you say you ported our barmetal library to Zephyr, do you mean you ported our No-OS drivers to work under Zephyr?.

    We only provide support for the code as is. We are not supporting Zephyr at the moment.

    As far as I understand this error is not happening with our drivers when running on the ST microcontroller in our board. Is that right?

    Regards,

    Raquel.

Children
  • Hello,

    Yes i have ported your No-OS driver under zephyr. But it's not work fine.

    I have found another driver, and i have ported it under zephyr. And it works really fine.

    But it's not the problem.

    For some inexplicable reason, the SPI HAL under zephyr for the gigadevice sends an extra byte for each frame with the ADIN.

    So if an extra byte is sent, when you read the frame size received from the SPE, the header, which should be present when you read the frame, is missing.

    More clearly, if i add an additional byte to the P1_RX_FSIZE (0x90) frame, the 2 header bytes are missing in the P1_RX (0x91) frame. Likewise for P2_RX_FSIZE (0xC0) and P2_RX (0xC1).
    I did the test with a gigadevice microcontroller and several STM (STM32L4/F4/F2).

    regards

  • Hi,

    Unfortunately we are not currently supporting Zephyr and we only provide support for the drivers as they are distributed. If this cannot be replicated when running on the ST microcontroller on the evaluation board we are not capable of debugging this issue.

    Regards,

    Raquel