This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C129XNCZAD: Problems configuring clock for ethernet driver

Part Number: TM4C129XNCZAD

Tool/software: Code Composer Studio

Hi, I have a problem using ethernet driver, in particular related to the clock configuration.

With these settings, ethernet worked fine:

SysCtlMOSCConfigSet(SYSCTL_MOSC_HIGHFREQ);

g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);

SysCtlVCOGet(SYSCTL_XTAL_25MHZ, &ui32PLLRate);

But I had many problems with all other peripherals, so I had to set the clock in this way:

g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_OSC), 25000000); // 25MHz

But now ethernet doesn't work anymore.....in the function that initializes ethernet, there is also a call to lwIPInit(g_ui32SysClock, pui8MACArray, parIP.IP_address, parIP.IP_netmask, parIP.IP_gateway, IPADDR_USE_STATIC).... maybe the problem is in this call? Can anyone help me with this settings please? I have to set the sysclock @25MHz, but the ethernet driver must work anyway.

Thank you

Cristina

  • HI Cristina,
    What problems do you have with other peripherals? I think it is better to resolve why other peripherals don't work.
  • The problems are related to the change of frequency clock; with sysclock @25MHz everything work fine (except ethernet) but when I change the sysclock @120 MHz, the code stops executing in many parts of the program (in flash functions, or display functions,  etc...).

    I have changed the time constants that I use in the delays, but my doubt is that I have to ADD time delays because of the increase (almost 5x) of frequency clock. Do you agree? Do you thnik I have to analyze every driver with its time specifications to verify if they are followed?

    Thanks

    Cristina

  • Hi Cristina,

     Not sure if you are facing the below errata. Please try to implement the workaround by turning off the flash prefetch before the PHY initialization and turn it back on after the initialization is complete. Please also refer to this posts. i will also suggest that you isolate the problem by first running only one peripheral (your display function or etc) with system clock configured at 120MHz and find out why they won't work at 120MHz. 

    processors.wiki.ti.com/.../TI-RTOS_TM4C129_Emac_Issues