DP83848 No Link - Page 1
Forum section: electronics / general

author: Throy
author_rank: Regular Contributor
timestamp: August 10, 2015, 08:58:46 am
content: I'm having issues establishing a link with the DP83848 in MII mode using a STM32F407IET6. Can someone double check my schematic to make sure I didn't screw something up here? There is one mistake with R49 which I've corrected, it should be connected to ground. I've also removed R37 to prevent the strap from putting it into RMII mode.What I've noticed is if I start debugging my board without the ethernet cable plugged in, the DP83848 reports a valid link has been established, but when I plug in the ethernet cable it says that the link has not been established.The voltage at PFBOUT, PFBIN1, PFBIN2 is 1.76V, the voltage at RBIAS is 1.2V. I've measured 25MHz on the 25MHz_OUT pin, and on both the receive and transmit clocks. Both the RESET_N and PWR_DOWN pins have been pulled high by the microcontroller.Here are the values that I've read from the DP83848 registers.Ethernet Cable Plugged in at Start Up:BMCR = 0x3100BMSR = 0x7849PHYIDR1 = 0x2000PHYIDR2 = 0x5C90ANAR = 0x01E1ANLPAR = 0x41E1ANER = 0x0007ANNPTR = 0x2801PHYSTS = 0x0004MICR = 0x0003MISR = 0x0820FCSCR = 0x0000RECR = 0x0000PCSR = 0x0100RBR = 0x0001LEDCR = 0x0000PHYCR = 0x802110BTSCR = 0x0804CDCTRL1 = 0x0000EDCR = 0x6011Ethernet Cable Not Plugged in at Start Up:BMCR = 0x1000BMSR = 0x786DPHYIDR1 = 0x2000PHYIDR2 = 0x5C90ANAR = 0x01E1ANLPAR = 0x41E1ANER = 0x0005ANNPTR = 0x2801PHYSTS = 0x0615MICR = 0x0003MISR = 0x0020FCSCR = 0x0000RECR = 0x0000PCSR = 0x0100RBR = 0x0001LEDCR = 0x0000PHYCR = 0x802110BTSCR = 0x0804CDCTRL1 = 0x0000EDCR = 0x6011Here is also my main loop code:Code:int main(void){uint32_t PHY_Data;uint8_t i=0;/* MCU Configuration----------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* Configure the system clock */SystemClock_Config();/* Initialize all configured peripherals */MX_GPIO_Init();HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET);HAL_GPIO_WritePin(GPIOC, GPIO_PIN_0, GPIO_PIN_SET);MX_LWIP_Init();while (1){ethernetif_input(&gnetif);sys_check_timeouts();for(i=0; i<30; i++){HAL_ETH_ReadPHYRegister(&heth, i, &PHY_Data);}}}This is also my first time using LWIP and the DP83848 chip. Previously I've only done ethernet applications using the PIC18F97J60 with the Microchip TCP/IP stack. So I'm expecting some kind of stupid mistake on my part.

author: Scrts
author_rank: Frequent Contributor
timestamp: August 10, 2015, 09:51:56 am
content: Post the RJ45 connector datasheet. Is it one from the recommended list?

author: Throy
author_rank: Regular Contributor
timestamp: August 10, 2015, 09:57:23 am
content: http://katalog.we-online.de/en/em/615_008_138_321/615_008_138_321?m=n&sp=http%3A%2F%2Fwww.we-online.de%2Fweb%2Fen%2Felectronic_components%2Fsearchpage_PBS.php%3Fsearch%3D615008138321&_ga=1.150445430.1572347918.1432749994http://katalog.we-online.de/em/datasheet/615008138321.pdf

author: Scrts
author_rank: Frequent Contributor
timestamp: August 10, 2015, 02:32:21 pm
content: It doesn't seem that the connector would include the magnetics? Are you sure it's there? For me, it seems like it's a connector only.Also checkDP83848 datasheetsection 1.4: Typical System DiagramGood thing is that if you've missed the magnetics, you can probably find the same pinout connector that would have the magnetics internally. Otherwise, you can use really short wires between PCB and the connector to test it if the pinout doesn't match.I had an issue with the connector when I've used a wrong connector with magnetics, that supported voltage output from PHY instead of required current output. However, this happened to 1Gbit Ethernet. 10/100Mbps are all voltage output afaik.

author: Throy
author_rank: Regular Contributor
timestamp: August 10, 2015, 05:58:39 pm
content: Thanks. I was under the impression the ethernet RJ45 jacks came with the magnetics inside.

author: neslekkim
author_rank: Super Contributor
timestamp: August 10, 2015, 09:45:28 pm
content: Quote from: Throy on August 10, 2015, 05:58:39 pmIf you buy the correct ones..