NECTOStudio Ethernet Stack with PIC32MZ2048EFH144

Cross-platform IDE for the rapid development of applications for the embedded world, available on Windows, Linux, and macOS.
Post Reply
Author
Message
fdabere
Posts: 1
Joined: 01 Sep 2022 08:49

NECTOStudio Ethernet Stack with PIC32MZ2048EFH144

#1 Post by fdabere » 13 Sep 2022 11:27

Hello,

I need your help because Ethernet stack doesn't exist into MikroSDK v2 but on legacy only
I need to use Ethernet onboard UNI-DS V8 with PIC32MZ2048EFH144 but Device is not visible at 192.168.10.129 (ICMP blocked or Ethernet not initiated correctly ?) :roll:

Code: Select all

#include "__ethernet.h"

extern void InitPHYPins();
extern char myMacAddr[6] = {0x00, 0x14, 0xA5, 0x76, 0x19, 0x3f};


int main(void)
{    
    unsigned char myIpAddr[4];
    myIpAddr[0] = 192;
    myIpAddr[1] = 168;
    myIpAddr[2] = 10;
    myIpAddr[3] = 129;
    
    unsigned char ipMask[4];
    ipMask[0] = 255;
    ipMask[1] = 255;
    ipMask[2] = 255;
    ipMask[3] = 0;
    
    unsigned char gwIpAddr[4];
    gwIpAddr[0] = 192;
    gwIpAddr[1] = 168;
    gwIpAddr[2] = 10;
    gwIpAddr[3] = 254;
    
    unsigned char dnsIpAddr[4];
    dnsIpAddr[0] = 192;
    dnsIpAddr[1] = 168;
    dnsIpAddr[2] = 10;
    dnsIpAddr[3] = 254;
    
    Ethernet_Init(myMacAddr, myIpAddr, _ETHERNET_AUTO_NEGOTIATION);
    Ethernet_confNetwork(ipMask, gwIpAddr, dnsIpAddr);
    
    
    while (1)
    {
        Ethernet_doPacket();
    }

    return 0;
}


unsigned int    Ethernet_UserUDP(unsigned char *remoteHost, unsigned int remotePort, unsigned int localPort, unsigned int reqLength, TEthPktFlags * flags)
{
    
    return reqLength;
}

unsigned int    Ethernet_UserTCP(unsigned char *remoteHost, unsigned int remotePort, unsigned int localPort, unsigned int reqLength, TEthPktFlags * flags)
{
    
    return reqLength;
}

void InitPHYPins()
{
    
}

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: NECTOStudio Ethernet Stack with PIC32MZ2048EFH144

#2 Post by filip » 14 Sep 2022 08:43

Hi,

Can you please attach your project here ?

Regards,
Filip.

Post Reply

Return to “IDE”