In the "wiznet Cup" Ethernet technology competition, many competition players have various questions about the w5500 in use. For this new Ethernet chip, in use, do you have the following problems? Let's take a look:
1.
W5500 does not support active Polarity conversion, so it's a bit disappointing ......
A:
In fact, only the other party can support polarity transformation. Today's devices do not support very few polarity transformations.
If you cannot connect to an old device, it is not too late to change the crossover line. Basically, there will be no problem with the devices after January 1, 2000 ~
Original post from: 9mcu
2.
W5500 + stm32f0 cannot communicate
Problem description 1: I have completed the configuration now. The teacher recommended the w5500 chip to communicate with stm32f0. However, according to the collected information, the changed routine cannot find the problem. For this part of the Network, I would like to add a program, I hope you can guide it!
Thank you!
Answer 1: attach the w5500 routine first.
Problem description 2: If the ping fails and the TCP connection cannot be established, is it a code problem? What is the loopback procedure?
Answer 2:
If you want to ping w5500, ensure the following two points:
1) physical channel communication is normal: the link lamp and status lamp are preliminarily determined to be normal.
2) special registers such as the IP address, gateway, subnet mask, and MAC address of w5500 are configured.
Because the hardware logic circuit of w5500 implements the ARP protocol. Therefore, once you receive a ping packet request, you will take the initiative to reply. The above settings are only intended to ensure that basic channels and communications can be established.
In reverse direction, if Ping fails, you can start from these aspects first.
Original post from: 9mcu
3.
W5500 does not specify the format of the received buffer data, which is the same as that of w5100?
Problem description: it is a habit to separate code words from debugging. Even if you know it after debugging, you 'd better put forward it for communication.
A: note the differences between SPI frames.
W5100:
W5500:
Original post from: 9mcu
4.
Several questions about the w5500 Program
Description:
I have a few questions about the w5500 program:
Void reset_w5500 (void)
{
Wiz_reset_0; // low level
Delay_us (50); // if the time is set to 500us, it seems that the indicator is all dark ??
Wiz_reset_1;
Delay_ms (200 );
}
While (getphycfgr () & phycfgr_lnk_on) = phycfgr_lnk_off); // phycfgr_lnk_off is 0 × 00, and phycfgr_lnk_on is 0 × 01. The code is endless here! The green light is always on, and the yellow light is flashing.
Related code: uint8 getphycfgr (void)
{
Return wizchip_read (phycfgr );
}
Uint8 wizchip_read (uint32 addrsel)
{
Uint8 ret;
Wizchip_cris_enter ();
Wizchip_cs_select ();
Addrsel | = (_ w5500_spi_read _ | _ w5500_spi_vdm_op _);
/*
// RWB
# DEFINE _ w5500_spi_read _ (0 × 00 <2)
// Om [1:0]
# DEFINE _ w5500_spi_vdm_op _ 0 × 00
// BSB [4: 0
# Define wizchip_creg_block (0 × 00) // <common register block General Register
# Define phycfgr (0x002e <8) + (wizchip_creg_block <3) // 16-bit address segment + 8-bit control segment
*/
Wizchip_spi_write_byte (addrsel & 0x00ff0000)> 16 );
Wizchip_spi_write_byte (addrsel & 0x0000ff00)> 8 );
Wizchip_spi_write_byte (addrsel & 0x000000ff)> 0); // 8-bit control segment
Ret = wizchip_spi_read_byte ();
Wizchip_cs_deselect ();
Wizchip_cris_exit ();
Return ret;
}
Uint8 wizchip_spi_read_byte (void)
{
Uint8 data;
Data = pai_spi_read_byte ();
Return data;
}
Uint8 pai_spi_read_byte (void)
{
While (! (Uc0ifg & ucb0rxifg ))
; // Wait for an Rx character?
Return ucb0rxbuf; // reading clears rxifg flag
}
A:
Detailed question?
The start is the latency of a reset, indicating how long the reset pin takes effect when the reset pin is lowered.
The following is the status of w5500phy. Check whether the network cable is inserted or disconnected. Check whether your while function enters an endless loop after inference.
We recommend that you first test the official stm32 + w5500 code and then transfer it to the MSP430 platform.
Original post from: 9mcu
5.
W5500io Keil cproject package
Exam: Download 9mcu
All the above questions come from 9mcu. If you have any questions, please leave a message to us or send it to the official wiznet email address: [email protected]
Follow many other developments in wiznet:
Wiznet official Weibo: http://www.e.weibo.com/wiznet2012