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.

TMS320F280049: SYS/BIOS Init Clock Problem

Part Number: TMS320F280049


Hello,

my problem is to initialize the CPU clock within the Sys/Bios conf. tool. I just wonder when I set the clock to an external oscilator. So the problem is, if the internal osc is used, everything works fine, but we need the external one because of the later use of the CAN module. So the external oscillator is 10MHz, which I set up in the Sys/Bios boot module. Then the PLL multiplier is set to 20 and the divider to 2, so the first problem is that the GUI shows the calculated CPU frequency with 50MHz instead of 100MHz.
The next point is that when I switch an LED by semaphore / task / timer construct, which by the way works also when using the internal osc, i will measure the period time of blinking with the factor 20. For example 20ms instead of 1ms.

So my problem is to understand which steps I should do to get the clock initialization by the Sys/Bios. By the way I also do the GPIO initialization for the external Oscilator (GPIO_18_XCLKOUT).

The problem occurred when using the F280049C uC.

Regards
Kai

  • Kai,

    RTOS expert for this device is out of office until Thursday next week. Trying to find someone else who can address the issue. We will be back by Tuesday.

  • Okay,

    what I found out today is that the clock setup may be wrong. When the program is running I set ClkCfgRegs.XTALCR.OSCOFF = false & ClkCfgRegs.MCDCR.MCLKCLR = false. After another power-on cycle from the debugger the XTAL is working correctly. Any suggestions?

    The thing I don't understand is that ClkCfgRegs.MCDCR.MCLKSTS is set when the boot process is finished. But let me know, shouldn't it be set to zero after switching from int to ext clock?

    Regards
    Kai

  • Okay, everythings fine.

    I simply went to the user reset function and put the function call SysCtl_turnOnOsc(SYSCTL_OSCSRC_XTAL); in this function. This solved my problem.
    Let me know if you think there might be a problem with that.

    Regards
    Kai

  • Kai,

    Thank you for replying back with your findings.  It sounds like for now you are no longer stuck.   You can expect to hear back from someone by the end of the week.  

    Best Regards

    Lori

  • Thanks for the update. That does make sense--I took a look at the function SYS/BIOS uses to configure SYSCLK and it does not take any steps to make sure the oscillator is on before switching to it.

    Alternatively, you may want to consider using the SysCtl_setClock() function to set up SYSCLK instead of having the BIOS Boot module do it. It does turn on the selected oscillator source and does some additional checks after the configuration to make sure the PLL set up was successful.

    Whitney