Skip to content

Commit 24e38e4

Browse files
committed
uupdate README.md
1 parent 0b50cce commit 24e38e4

File tree

3 files changed

+51
-74
lines changed

3 files changed

+51
-74
lines changed

README.md

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Index
2-
- [Loopback Example for W6100-EVB](#Loopback-Example-for-W6100-EVB)
2+
- [Loopback Example for W6100-EVB with GCC and Eclipse IDE](#Loopback-Example-for-W6100-EVB-with-GCC-and-Eclipse-IDE)
33
- [Hardware Environment](#Hardware-Environment)
44
- [Software Environments](#Software-Environment)
55
- [Run](#Run)
@@ -8,7 +8,7 @@
88

99

1010
------
11-
# Loopback Example for W6100-EVB
11+
# Loopback Example for W6100-EVB with GCC and Eclipse IDE
1212
Common to Any MCU, Easy to Add-on. Internet Offload co-Processor, HW TCP/IP chip,
1313
best fits for low-end Non-OS devices connecting to Ethernet for the Internet of Things. These will be updated continuously.
1414

@@ -21,41 +21,30 @@ best fits for low-end Non-OS devices connecting to Ethernet for the Internet of
2121
</p>
2222

2323
## Software Environment
24-
* Compile Program : TrueStudio Ver 9.2.0
25-
* Flash Program : FLASHER-STM32 Ver2.8.0
24+
* Compile Program : ARM GCC Toolchain 2018-q4-major
25+
* Flash Program : FLASHER-STM32 Ver2.8.0 or STM32CubeProgrammer V2.0.0
2626
* Compile method <br>
2727
- Git-Hub source file download <br>
28-
- TrueStudio -> W6100EVB-HTTP_Server in folder, run TrueStudio Project file <br>
28+
- Select File -> Import in Eclipse <br>
2929
<p align="center">
30-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55785003-a47dcb80-5aec-11e9-8955-a4c1ebf95918.png" />
30+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56175872-029e3780-6034-11e9-85ca-1517654225fc.PNG" />
3131
</p>
3232

33-
- WorkSpace path select<br>
33+
- Select "Existing Projects into Workspace"
3434
<p align="center">
35-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55773235-9f0f8980-5aca-11e9-825c-7f362cbfc7fd.png" />
35+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56175933-409b5b80-6034-11e9-8dfe-73533017bf7b.PNG" />
3636
</p>
37-
38-
- ① open main.c file and build ② build icon or Key CTRL + B <br>
37+
- Select WorkSpace path. w6100-evb-gcc-eclipse-loopback\gcc-eclipse-projectfolder\w6100-evb-gcc-eclipse-loopback<br>
3938
<p align="center">
40-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55773236-9f0f8980-5aca-11e9-95f4-5e68b0045935.png" />
39+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56175946-45600f80-6034-11e9-8bce-9094543fbbbf.PNG" />
4140
</p>
4241

43-
- If you have ST-LINK, Run Debug - Click debug button or Key F8<br>
42+
- Build the Project <br>
4443
<p align="center">
45-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55773705-c404fc00-5acc-11e9-84dd-d0774a1d17db.png" />
44+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176411-f2875780-6035-11e9-892b-43a040f3b17b.png" />
4645
</p>
4746

4847
- Serial Flash Download<br>
49-
- Check Serial Port<br>
50-
<p align="center">
51-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55779775-544d3c00-5ae1-11e9-8a5c-625062b4a40d.png" />
52-
</p>
53-
54-
- Check Hex file <br>
55-
<p align="center">
56-
<img width="60%" src="https://user-images.githubusercontent.com/48539052/55779776-544d3c00-5ae1-11e9-91a3-024eca4ad7d2.png" />
57-
</p>
58-
5948
- Device Program upload, See site below.
6049
- [How to uploading to firmware ](https://wizwiki.net/wiki/doku.php?id=products:w6100:w6100_evb:getting_started#how_to_uploading_to_firmware)
6150

@@ -67,58 +56,49 @@ best fits for low-end Non-OS devices connecting to Ethernet for the Internet of
6756
- Windows 10 <br>
6857
- [Hercules](https://www.hw-group.com/software/hercules-setup-utility) <br>
6958
- [ScriptCommunicator](https://sourceforge.net/projects/scriptcommunicator/) <br>
70-
7159
* Demo Result <br>
7260
- Power On and push Reset button to start Program<br>
73-
- Program Run Serial display <br>
61+
- Then, application displays its network information on Serial console<br>
7462

7563
<p align="center">
76-
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/UART-Hercules.jpg" />
64+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176787-3169dd00-6037-11e9-9f7d-92d0884a2827.PNG" />
7765
</p>
7866

79-
- There are 4 sockets available for connection.
67+
- There are 8 sockets available for loopback test.
8068

8169
* UDP IPv4 / Port 50000
82-
* TCP IPv4 / Port 50003
83-
* TCP IPv6 / Port 50004
84-
* TCP Dual / Port 50005
70+
* UDP IPv6 / Port 50001
71+
* UDP Dual / Port 50002
72+
* TCP Server IPv4 / Port 50003
73+
* TCP Server IPv6 / Port 50004
74+
* TCP Server Dual / Port 50005
75+
* TCP Client IPv4 / Port 50006
76+
* TCP Client IPv6 / Port 50007
77+
8578

8679
- Run ScriptCommunicator and set sockets for IPv4 connection. and connect.
8780

8881
<p align="center">
89-
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/TCPclient-IPv4-Settings.jpg" />
82+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176801-39298180-6037-11e9-85d0-5e88b49c9e29.PNG" />
9083
</p>
9184

9285
- After connected, send a message to the W6100EVB. Then the W6100EVB reply with message you've sent.
9386

9487
<p align="center">
95-
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/TCPclient-IPv4-Send.jpg" />
88+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176805-3f1f6280-6037-11e9-9807-e1284b79c190.PNG" />
9689
</p>
9790

9891
- Run ScriptCommunicator and set sockets for IPv6 connection. and connect.
9992

10093
<p align="center">
101-
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/TCPclient-IPv6-Settings.jpg" />
94+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176809-4181bc80-6037-11e9-8f88-c13a336fdfc5.PNG" />
10295
</p>
10396

10497
- After connected, send a message to the W6100EVB. Then the W6100EVB reply with message you've sent.
10598

10699
<p align="center">
107-
<img width="60%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/TCPclient-IPv6-Send.jpg" />
100+
<img width="60%" src="https://user-images.githubusercontent.com/2120691/56176812-434b8000-6037-11e9-821a-bfda620ba840.PNG" />
108101
</p>
109102

110-
## Code review
111-
* main.c code flow <br>
112-
<p align="center">
113-
<img width="35%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Dia/W6100EVB-Loopback.png" />
114-
</p>
115-
116-
## Test packet capture file
117-
<p align="center">
118-
<img width="100%" src="https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Jpg/W6100EVB-Loopback-DualIP.jpg" />
119-
</p>
120-
121-
122-
-Test packet capture file : [W6100EVB-Loopback-DualIP.zip](https://github.com/WIZnet-ioLibrary/W6100EVB-Loopback/wiki/Packet/W6100EVB-Loopback-DualIP.zip)
123-
103+
124104

gcc-eclipse-projectfolder/w6100-evb-gcc-eclipse-loopback/src/PlatformHandler/nvicHandler.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ void NVIC_Configuration(void)
2323
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
2424
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
2525
NVIC_Init(&NVIC_InitStructure);
26-
2726
#endif
2827
}

gcc-eclipse-projectfolder/w6100-evb-gcc-eclipse-loopback/src/PlatformHandler/timerHandler.c

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ void Timer_Configuration(void)
3636

3737
TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
3838

39-
4039
/* TIM enable counter */
4140
TIM_Cmd(TIM2, ENABLE);
4241

@@ -52,7 +51,7 @@ void Timer2_ISR(void)
5251

5352
runled_msec++;
5453

55-
if(runled_msec >= 1000)
54+
if(runled_msec == 1000)
5655
{
5756
runled_msec = 0;
5857
toggle_runled();
@@ -63,7 +62,6 @@ void Timer2_ISR(void)
6362
{
6463
msec_cnt = 0;
6564
sec_cnt++;
66-
6765
devtime_sec++; // device time counter, Can be updated this counter value by time protocol like NTP.
6866
}
6967

@@ -91,76 +89,76 @@ void Timer2_ISR(void)
9189

9290
uint32_t getDevtime(void)
9391
{
94-
return devtime_sec;
92+
return devtime_sec;
9593
}
9694

9795
void setDevtime(uint32_t timeval_sec)
9896
{
99-
devtime_sec = timeval_sec;
97+
devtime_sec = timeval_sec;
10098
}
10199

102100
uint32_t getNow(void)
103101
{
104-
return getDevtime();
102+
return getDevtime();
105103
}
106104

107105
uint32_t millis(void)
108106
{
109-
return devtime_msec;
107+
return devtime_msec;
110108
}
111109

112110
uint32_t getDeviceUptime_day(void)
113111
{
114-
return day_cnt;
112+
return day_cnt;
115113
}
116114

117115
uint32_t getDeviceUptime_hour(void)
118116
{
119-
return hour_cnt;
117+
return hour_cnt;
120118
}
121119

122120
uint8_t getDeviceUptime_min(void)
123121
{
124-
return min_cnt;
122+
return min_cnt;
125123
}
126124

127125
uint8_t getDeviceUptime_sec(void)
128126
{
129-
return sec_cnt;
127+
return sec_cnt;
130128
}
131129

132130
uint16_t getDeviceUptime_msec(void)
133131
{
134-
return msec_cnt;
132+
return msec_cnt;
135133
}
136134

137135

138136
void set_phylink_time_check(uint8_t enable)
139137
{
140-
if(enable == 1) // start
141-
{
142-
phylink_down_time_msec = 0; // counter variable clear
143-
}
144-
else // stop
145-
{
146-
;
147-
}
148-
149-
enable_phylink_check = enable;
138+
if(enable == 1) // start
139+
{
140+
phylink_down_time_msec = 0; // counter variable clear
141+
}
142+
else // stop
143+
{
144+
;
145+
}
146+
147+
enable_phylink_check = enable;
150148
}
151149

152150
uint32_t get_phylink_downtime(void)
153151
{
154-
return phylink_down_time_msec;
152+
return phylink_down_time_msec;
155153
}
156154

157155
void set_runled_msec(uint16_t setmsec)
158156
{
159-
runled_msec = setmsec;
157+
runled_msec = setmsec;
160158
}
161159

162160
uint16_t get_runled_msec(void)
163161
{
164-
return runled_msec;
162+
return runled_msec;
165163
}
166164

0 commit comments

Comments
 (0)