RTCS receive 802.3 problem - MQX 4.2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTCS receive 802.3 problem - MQX 4.2

1,304件の閲覧回数
kfranz
Contributor III

I am using MQX 4.2. I need to receive an 802.3 frame.

I have successfully called ENET_open(). I can successfully send the 802.3 frame using ENET_send_raw(). I have verified the frame is sent and is formatted correctly using Wireshark.

I have looked at the thread:

Sending Ethernet 2 frames

In this thread a user said they had to set the following define to zero to receive an 802.3 frame. I have tried that with no success.

#define RTCSCFG_IP_DISABLE_DIRECTED_BROADCAST 0  //this did not help

Any suggestions?

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

1,039件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi kfranz,

Unfortunately, MQX does not provide support for low layer data handling. The functions that you are using are RTCS internal, as you may see they are not documented. It may be possible to get inside the BSP to implement this use case, but I am not aware of all the implications that this process may have. Meaningful manipulation to the BSP is necessary to achieve this task, and this kind of support is only provided by our professional services team. You can contact them at www.nxp.com/services

On the other hand you can use ENET baremetal code. In the KQRUG you can find an example.

http://www.nxp.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf

Regards,

Carlos

0 件の賞賛
返信

1,039件の閲覧回数
kfranz
Contributor III

In case it matters, we are using a K64.

For more information read about the following registers in the K64:

ENET_RCR bits PROM (promiscuous) and BC_REJ (broadcast), and ENET_GAUR, ENET_GALR.

The solution is after the open, call ENET_join().

// destination MAC address

void fnOpen802_3(void) {

unsigned char aucDestMac[6] = {0x01,0x02,0x03,0x00,0x00,0x00};

ip_mreq    mreq;

if ((ENET_open(

      (RTCS_get_enet_handle(ipcfg_get_ihandle(BSP_DEFAULT_ENET_DEVICE))),

      0x5566, // EtherType, ethernet type

      fnMy802_3_Receive,

      (RTCS_get_enet_handle(ipcfg_get_ihandle(BSP_DEFAULT_ENET_DEVICE)))

      )) != ENET_OK)

{

    //error

}

ENET_join((RTCS_get_enet_handle(ipcfg_get_ihandle(BSP_DEFAULT_ENET_DEVICE))),

           0x5566, // EtherType, ethernet type

           aucDestMac);

}

0 件の賞賛
返信