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.

F28027 switching from OSC1 to external crystal clock

Other Parts Discussed in Thread: CONTROLSUITE

I am using the F28027 from the Piccolo controlStick development kit and CCS4 environment.

There is an external 6MHz crystal and an associated on chip oscillator available. I am able to switch on this oscillator. But so far I am not successful to drive the system clock / PLL  (SYSCLKOUT) with it. The processor switches back to internal 10MHz OSC1 as soon as I finally set bit OSCCLKSRCSEL in register CLKCTL. I have found no hint in the documentation which states that this task is not allowed. Maybe there is a special sequence (or timing between instructions) necessary to get that switching done?

I apprechiate any help!

Roland

  • Roland,

    On the controlSTICK, the 6MHz crystal is used by the USB to JTAG/UART emulator chip, and is not connected to the Piccolo device.  In order to test out the crystal/resonator switching capability of the Piccolo, you'll likely need to try it out on a F28027 Experimenter's Kit or your own custom board.

    For reference, you can find the controlSTICK hardware documentation at:
    \controlSUITE\development_kits\Piccolo controlSTICK\~controlSTICK_HWdevPkg\


    Thank you,
    Brett

  • Brett,

    thank you for your response.

    Actually the externally attached crystal did not work properly and I did not check the correct oscillator function before switching to the crystal oscillator, as advised in the application. So the chip reacted according to description and switched safely back to oscillator 1. It was my fault!

    Best regards   Roland

     

     

  • Hi,how to switch from OSC1 to EXTAL crystal, have any reference code?thanks

  • Hello George,

    unfortunately I do not have a code sequence ready at hand. But switching is easy. You will find a detailed descripition e.g. in the SPRUFNC3 document, maybe in others too. You have to switch control bits in a special sequence. It should not be too difficult   :-)) 

    Best  regards     Roland

  • hello Roland:

    i can`t find the SPRUFNC3 in any place, could you seed me or on site? thanks.

  • Hi George,

    I looked through my local documentation and found in SPRUGL8B is also a description on how to switch clocks. It is in chapter 3.2.3.1 on page 42 of the " TMS320F2803x Piccolo System Control and Interrupts Reference Guide ". Of course, the description is for the 03x-version, but I think the procedure is valid throughout the processor family. I did also a search on the TI pages and found this link: " http://focus.ti.com/lit/ug/sprugl8b/sprugl8b.pdf ". Please read the chapter carefully and I am quite sure you will find what you need.

    Best regards    Roland

     

     

     

  • Hi Roland

    follow your advice, i have read this part in detail, but i still have some point be not understanded,

    1. when the external clock  have become missing, the CLOCKFAIL flag be set, in this time, the clock mechanism (Piccolo only)will automatically switch to INTOSC1, under this situation, the clock enter the limp-mode, PLL be-bypassed and the colck is 1-5MHZ, need enable PLLCR, i can`t find how to enable PLLCR in any place. in this time, will all perpherals stop?

    2. when INTOSC  also missing, the NMI-interrupt and NMI-Watchdog will happen, i initialize the NMI-interrupt and enable, but i make the external clock remove, but it can`t go into interrupt, when i wait the NMI-Watchdog overflow  and generate a Reset, but i found CPU have no any action

    3.  OSCCLK and VCOCLK counter mentioned in document page 44, these counters participate in missing-clock detecting,did  they have any relevant with the NMI-interrupt and NMI-Watchdog ? how did they acheive?

    4. the NMI-Watchdog generate a RESET different from CPU-Watchdog,  did the NMI-Watchdog only reset the core?

    thank you for your great support, i`m appreciated

  • Hello George,

    unfortunately I am not an expert who knows each detail of the Piccolo family. I had to read the documentation first to help you out. I think it would be much more efficient if you got in contact with a TI expert who knows the chip internal operation control by heart. I quickly looked into SPRUGL8G and there is a chapter (3.2.5) which describes how clock fail detection works. There is a statement that the missing clock detection logic resets CPU, peripherals and other device logic. A further chapter (3.2.6) deals with NMI and watchdog. Maybe there are some helpful hints in the various tables.

    Sorry that I cannot help out you more.

    Regards    Roland

  • Hi Roland:

    thank you for your accompany with me for this issue, if i have solved it, i will share you this detail.