http://www.renesasrtossolutions.org/jpn/
にありました。
M3S-T4 Tiny TCP/IPプロトコル・スタックについては
http://www.kumikomi.net/archives/2004/12/21tcpip1.php
に紹介されているものに類似しているように感じます。
GR-SAKURAボードで動作確認する場合の
主な変更箇所をかいてみます
hwsetup.c::ConfigurePortPins()::
/* ==== RMII Pins setting ==== */
/*
Pin Functions : Port
--------------------
ET_MDC : PA3
ET_MDIO : PA4
ET_LINKSTA : PA5(not use)
RMII_RXD1 : PB0
RMII_RXD0 : PB1
REF50CK : PB2
RMII_RX_ER : PB3
RMII_TXD_EN : PB4
RMII_TXD0 : PB5
RMII_TXD1 : PB6
RMII_CRS_DV : PB7
*/
/* Clear PDR and PMR */
PORTA.PDR.BIT.B3 = 0;
PORTA.PDR.BIT.B4 = 0;
PORTA.PDR.BIT.B5 = 0;
PORTB.PDR.BIT.B0 = 0;
PORTB.PDR.BIT.B1 = 0;
PORTB.PDR.BIT.B2 = 0;
PORTB.PDR.BIT.B3 = 0;
PORTB.PDR.BIT.B4 = 0;
PORTB.PDR.BIT.B5 = 0;
PORTB.PDR.BIT.B6 = 0;
PORTB.PDR.BIT.B7 = 0;
PORTA.PMR.BIT.B3 = 0;
PORTA.PMR.BIT.B4 = 0;
PORTA.PMR.BIT.B5 = 0;
PORTB.PMR.BIT.B0 = 0;
PORTB.PMR.BIT.B1 = 0;
PORTB.PMR.BIT.B2 = 0;
PORTB.PMR.BIT.B3 = 0;
PORTB.PMR.BIT.B4 = 0;
PORTB.PMR.BIT.B5 = 0;
PORTB.PMR.BIT.B6 = 0;
PORTB.PMR.BIT.B7 = 0;
/* Write protect off */
MPC.PWPR.BYTE = 0x00; /* PWPR.PFSWE write protect off */
MPC.PWPR.BYTE = 0x40; /* PFS register write protect off */
/* Select pin function */
MPC.PA3PFS.BYTE = 0x11;
MPC.PA4PFS.BYTE = 0x11;
MPC.PA5PFS.BYTE = 0x11;
MPC.PB0PFS.BYTE = 0x12;
MPC.PB1PFS.BYTE = 0x12;
MPC.PB2PFS.BYTE = 0x12;
MPC.PB3PFS.BYTE = 0x12;
MPC.PB4PFS.BYTE = 0x12;
MPC.PB5PFS.BYTE = 0x12;
MPC.PB6PFS.BYTE = 0x12;
MPC.PB7PFS.BYTE = 0x12;
/* Write protect on */
MPC.PWPR.BYTE = 0x80; /* PFS register write protect on */
/* Select ethernet mode */
MPC.PFENET.BIT.PHYMODE = 0; /* RMII mode */
/* Switch to the selected input/output function */
PORTA.PMR.BIT.B3 = 1;
PORTA.PMR.BIT.B4 = 1;
PORTA.PMR.BIT.B5 = 1;
PORTB.PMR.BIT.B0 = 1;
PORTB.PMR.BIT.B1 = 1;
PORTB.PMR.BIT.B2 = 1;
PORTB.PMR.BIT.B3 = 1;
PORTB.PMR.BIT.B4 = 1;
PORTB.PMR.BIT.B5 = 1;
PORTB.PMR.BIT.B6 = 1;
PORTB.PMR.BIT.B7 = 1;
phy.c::
#define PHY_MII_ADDR (0x00)
r_ether.h::
#define ETH_MODE_SEL ETH_RMII_MODE
here.
2013.07.23
0 件のコメント:
コメントを投稿