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.

TMS320F280039C: Issue in InitSysPll() code

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

I am trying to use the XTAL option on F28003x.
I see that on the Launchpad, the frequency of the XTAL is 20MHz (had to check the BOM for this, as it was mentioned nowhere in the user guide/datasheet), which works fine.

Suppose I use another crystal oscillator of 10MHz.
If I set the four parameters: imult, refdiv, odiv and divsel (as shown below for the InitSysPll() function) the same as the ones I used for the internal oscillator (48,0,1,1), which are actually their default values, I see that the InitSysPll() will configure the internal oscillator itself instead of the XTAL.
The reason behind this is that the switch-case to select the XTAL is within a if-clause that checks whether the four parameters: imult, refdiv, odiv and divsel have changed, and if they haven't changed from the default values, the code within the if clause is skipped altogether.
image.png

I see that a very similar question has been asked here: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1583342/tms320f28p650sk-pll-initialization-issue?tisearch=e2e-sitesearch&keymatch=IMULT#

However, in the above question, the INTCLK was not within the requried range so this issue with InitSysPll was not valid there. 
Here, in case a XTAL of 10MHz, and (48,0,1,1) is used for F28003x, the INTCLK is in the valid range. I have checked that for 10MHz OSCCLK, the INTCLK is 5MHz for refdiv = 1, which is within the range of INTCLK:
image.png

So, my question is this: if a user has a 10MHz crystal for use with the F28003x chip, and if the four parameters are configured to be the default values (48,0,1,1), which I believe comes from the bootloader that configures the clock to a default value, won't the InitSysPll() cause issues when trying to use XTAL, as the if-clause will be false and thereby the XTAL will not be selected? 

I need to understand whether the InitSysPll() is faulty for this particular configuration of XTAL and four parameters, and if it is, whether it will be corrected in the future in the C2000ware header that contains InitSysPll(),
or,
whether I need to modify one of the four parameters to be other than their default values, to ensure that the if-clause passes, while ensuring that the SYSCLK/LSPCLK required remains the same, for a 10MHz crystal. 


  • Hello,

    1. The way code is written now, it would skip the PLL clk configuration (switch clock source) and it would start-up with inherited PLL initialization and registers based on Boot-ROM programmed code.

    2. If the customer uses the same IMULT, ODIV and REFDIV as the internal oscillator, it will cause the code to fail to update the oscillator source to XTAL. You need to make sure that the coefficients and internal clock frequencies match the table provided. 6.12. Then, it would work fine.