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.

TMS320F28386S: Device_verifyXTAL() fails

Part Number: TMS320F28386S
Other Parts Discussed in Thread: C2000WARE

I have seen this line in many files in many project:

      if (!Device_verifyXTAL(DEVICE_OSCSRC_FREQ / 1000000))

In fact it is in the working project that I copied to start a new one. Now it has stopped working and I am being brutalized by the ESTOP0 Gestapo. Is this a common problem?

I have added some .c files and headers but made no code changes in the original main.c. Could it be a header ordering problem?

Thanks,

John

  • On the line below if the cursor is hovered over DEVICE_OSCSRC_FREQ it says 20000000U. But if I right click and open declaration it is 25000000U.

    The definition was in two files and different. In one project it picked up the right value of25000000U and the other it did not. I will say it was probably a slight difference in the ordering of include files.

    if (!Device_verifyXTAL(DEVICE_OSCSRC_FREQ / 1000000))

  • On the line below if the cursor is hovered over DEVICE_OSCSRC_FREQ it says 20000000U. But if I right click and open declaration it is 25000000U.

    The definition was in two files and different. In one project it picked up the right value of25000000U and the other it did not. I will say it was probably a slight difference in the ordering of include files.

    if (!Device_verifyXTAL(DEVICE_OSCSRC_FREQ / 1000000))

  • John,

    Can you highlight DEVICE_OSCSRC_FREQ and left-click on the mouse then scroll down to "Open Declaration", it will point you to the location where that variable was defined.  It seems like DEVICE_OSCSRC_FREQ got defined in several places. 

  • Thanks for posting. It was defined in

    C:\ti\c2000\C2000Ware_4_01_00_00\device_support\f2838x\common\include\device.h as 20000000U,

    which is wrong for my project. But it was also in a header file a coworker developed at 25000000U. However my project went to pieces when I renamed it and when I put things back together there must have been a difference in the include file order because the lower value was picked up.

    Now I am dealing with multiple values for:

        SYSCTL_PERIPH_CLK_DCC0
        DEVICE_SETCLOCK_CFG
        DEVICE_SYSCLK_FREQ
        DEVICE_LSPCLK_FREQ

  • John,

    Looks like you have tracked where the inconsistencies of the values are coming from.  Intent of those declarations is to be defined in one place so issues like these will be avoided.  Best to use #if directives in the header files if multiple assignments are needed by your program such that at one time, only once condition is satisfied and rest of the assignments is ignored.

    Let us know if you see other issues.

    Regards,

    Joseph

  • Actually I have not tracked them down yet. I have been working CCS problems while the pertinent E2E people were around today.

    But as you said the #ifndef / #define directives are good and I have not found a header without them.

    Thanks for the post.

    John