2013-07-17 01:31 AM
Hello,
I'm currently working on a project with a STM32F437I-EVAL board. I have to use ethernet, USB OTG HS and the SD card. Problem is : I don't know how to &sharpdefine and config the dedicated ports and clocks. Aren't there anything ST provided with the right configuration, cause the informations on this seem to be well garded and very hard to find. You'll find attached what I've done so far but it doesn't seem to work well with ChibiOS.Thanks!!Xtick. #ethernet-interface #stm32 #mco12013-07-17 04:18 AM
I think you'll find the 437/439 stuff is still under NDA. I haven't had much joy with the ethernet.
2013-07-17 06:52 AM
Well so I'm trying to figure this stuff by myself. I'm now stuck cause I need a 50Mhs clock for the ethernet RMII to work. I want to use the MCO clock provided by the MCU to do it but I don't know where and how to configure it properly. Any help is welcome.
TanksXtick.2013-07-17 07:33 AM
For the MCO to generate 50 MHz you'd have to run the processor at a multiple of 50 MHz, I haven't looked at your board, you sure it doesn't have a crystal, or run from 25 MHz? Pretty sure the STM324x9I-EVAL does not support RMII.
GPIO_InitTypeDef GPIO_InitStructure;
/* Enable GPIOs clocks */
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
/* Enable SYSCFG clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
/* Configure MCO (PA8) */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Output HSE clock (25MHz) on MCO pin (PA8) to clock the PHY */
RCC_MCO1Config(RCC_MCO1Source_HSE, RCC_MCO1Div_1);
OR
/* Output PLL clock (50MHz from 150MHz) on MCO pin (PA8) to clock the PHY */
RCC_MCO1Config(RCC_MCO1Source_PLLCLK, RCC_MCO1Div_3); // !! CPU AT 150 MHz !!