This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interfacing ENC28J60 with nRF52833

Hi teams,

I am trying to interface ENC28J60 ethernet controller on nRF52833 based board.

The purpose is sending/receiving simple data gathered from BLE mesh network.

I found some examples about SPI communication, and will try to follow them to physically interface the chip, but have some more question to go further.

1. Because I will use DHCP & TCP socket, etc, need simple TCP/IP stack. What is your recommendation?

    I found lwip in SDK/external folder. Is it possible to use on my purpose?

2. To handling incoming/outgoing packets via ethernet, I expect quite complex interrupt/event handling required.

   But, in examples that I reviewed, there is no task/thread handling like RTOS does.

   Where can I find similar example source code which I can refer to?

Parents Reply
  • I managed to finsh ENC28J60 to work on nRF52833.

    For people who has interest, I leave some comments.

    1. I chose uIP stack, not lwIP which is included in nRF SDK.

       It is because lwIP requires memory manager (malloc/free), but causes frequent problem in Mesh SDK.

       I suspect the reason as Mesh SDK uses relatively more memory than normal SDK.

       Anyway, though uIP is lack of some features, and slower than lwIP, but smaller and never uses malloc/free, and fit for my use.

    2. To handle RX interrupt correctly, Scheduler Library is useful. It is quite simple and compact to use.

    3. nRF SPI library is a little bit weird for me, comparing to other chipsets.

        SPI write/read transfer always returns dummy bytes for the write cycles.

        I should remove them from RX buffer myself.

        And also, because there is no TX and TX transfer in single transfer call, I should manually control SS pin myself.

    4. For the helpful resources about porting, I searched lots of web resources, and the following link is fairly useful.

    https://github.com/Plytirex/FreeRTOS-TCP-enc28j60

Children
No Data
Related