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.

TM4C129x Errata: SysCtlClockFreqSet

I have some feedback and questions regarding the recently released revision of the TM4C129x errata.

Appendix 3

First off, Appendix 3 is very difficult to use. It's not easy to copy multiple pages of text out of a PDF and when you do all the indentation is missing. The 6 pages of replacement for SysCtlClockFreqSet is particularly bad, especially given that the real change was just adding 7 lines. Here's a diff so we can easily see the changes we're discussing.

5 lines appear to have been unintentionally deleted from SysCtlClockFreqSet. Can you confirm that this is the case and that there were not also supposed to be changes in that area?

        //
        // If the loop above did not timeout then switch over to the PLL
        //
        if(i32Timeout)
        {
            ui32RSClkConfig = HWREG(SYSCTL_RSCLKCFG);
            ui32RSClkConfig |= ((ui32SysDiv - 1) <<
                                SYSCTL_RSCLKCFG_PSYSDIV_S) | ui32OscSelect |
                               SYSCTL_RSCLKCFG_USEPLL;
            ui32RSClkConfig |= SYSCTL_RSCLKCFG_MEMTIMU;

            //
            // Set the new clock configuration.
            //
            HWREG(SYSCTL_RSCLKCFG) = ui32RSClkConfig;
        }
        else
        {
-           ui32SysClock = 0;
-       }
-   }
-   else
-   {
        //
        // Set the Flash and EEPROM timing values for PIOSC.
        //
        HWREG(SYSCTL_MEMTIM0) = _SysCtlMemTimingGet(16000000);

Next, there is a bug in the code that checks if the PLL is already configured. The Q field in PLLFREQ1 is now being set to 1 rather than 0 so this check needs to be updated as follows.

        //
        // If there were no changes to the PLL do not force the PLL to lock by
        // writing the PLL settings.
        //
        if((HWREG(SYSCTL_PLLFREQ1) !=
-           g_pppui32XTALtoVCO[i32VCOIdx][i32XtalIdx][1]) ||
+           g_pppui32XTALtoVCO[i32VCOIdx][i32XtalIdx][1] |
+           g_pppui32XTALtoVCO[i32VCOIdx][i32XtalIdx][2]) ||
           (HWREG(SYSCTL_PLLFREQ0) !=
            (g_pppui32XTALtoVCO[i32VCOIdx][i32XtalIdx][0] |
             SYSCTL_PLLFREQ0_PLLPWR)))
        {
            bNewPLL = true;
        }
        else
        {
            bNewPLL = false;
        }

Finally, any idea when TivaWare 2.1.3 will be released?

 

SYSCTL#22

This errata says that PSYDIV may not be loaded:

When generating system clock from the PLL, the user programs the system control register bits RSCLKCFG.PSYSDIV to divide the PLL output. This register value may not be loaded into the physical divider causing the system clock to be divided by 2.

The workaround sets PLLFREQ1.Q to 1, which results in a division by 2 up front, and then uses a smaller value for PSYSDIV. I don't see how that would resolve the issue if PSYDIV was indeed not being loaded. Perhaps the errata should say Q rather than PSYSDIV?

Do you have any additional information about the conditions where the divider isn't loaded? As far as I know my clock isn't off by a factor of 2.

For some crystal values, the up-front division by 2 results in a results in a reference frequency outside the range of 4 to 30 MHz given in data sheet (table 5-7, footnote b). For example with a 25 MHz crystal you get 2.5 MHz after division by 5 and 2. Has this been considered?

  • Hello BB,

    The changes that are being made are in the following forum post as well.

    e2e.ti.com/.../1790267

    I checked the final code being released and it seems that there is an issue in the Appendix code. I would need to get it fixed ASAP. Thanks for bringing this up

    Also the proposed changes may not work as is, since bit shifting for Q would need to be done for the compare

    You are correct as well for the PSYSDIV v/s Q load and it needs to be clarified as well. As for the condition to reproduce the failure, we have seen the issue when performing System Reset and when doing clock transition between PLL and PIOSC with a full reconfiguration of the registers for clock control. Also it is a handful of parts that have failed and times vary from a few seconds of the above operation to few hours based on which part was being used.

    TivaWare 2.1.3 is expected end of this month, but considering the testing that is to be done for this release, it will may extend. I would not put a hard commit date.

    Regards
    Amit
  • Hi,
    Would it be possible to give some feedback on when the Errata doc will be updated?
    Simon
  • Hello Simon,

    It is being reworked. There is one clarification which needs to be done with another doc feedback that was submitted on another Errata, after which it will be published. Now it completely depends on the person who submitted it to respond. But we will try to cap it by end of this week.

    Regards
    Amit
  • Hello BB_

    Regarding SYSCTL#22, the data sheet equation for the Fref is not correct. The Q divider is not involved, Only the N-divider. So the WA is good.

    Regards
    Amit
  • Hi Amit,

    Do you have dates for either the Tivaware release or the publication of the new Errata doc?

    Thanks,

    Simon

  • Hello Simon,

    Errata document is in the sync process. It normally takes 24-48 hrs for the document to get updated on www.ti.com

    As for the TivaWare, the release date is not final but has been planned for end of this month and in most honesty,it will not happen as tests are not completed.

    If there is a specific information that you are looking for, I can help over the forum

    Regards
    Amit
  • No, that's ok for now.
    Thanks
    Simon