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.

CSL WDTim does not compile for 5509A (Watchdog Timer)

I have been working on firmware for the C5506 using the CSL. Since the 5506 is not directly supported, I must use 5509A in CCS. Things are working quite well with my existing frmware, but I would like to add the Watchdog Timer to catch any potential failures.

Has anyone successfully used the WDTIM Module in the CSL for the 5509A or 5506 processor?

Can anyone explain the compile errors below?

Unfortunately, including csl_wdtim.h results in a failed compile. It seems that the code is inconsistent, and appears to have never been tested for the 'A' variation of the hardware headers.  Here are the complaints from the compiler:

"/Program Files/C55xxCSL/include/csl_wdtimA.h", line 247: error: struct "<unnamed>" has no field "wdtim"
Config->wdtim = WDTIM_RGET(WDTIM);
^

"/Program Files/C55xxCSL/include/csl_wdtimA.h", line 276: warning: expression has no effect
((old_wdtcr2 & _WDTIM_WDTCR2_WDKEY_CLR) | _WDTIM_WDTCR2_WDEN_MK(WDTIM_WDTCR2_WDEN_ENABLE) |
^

"/Program Files/C55xxCSL/include/csl_wdtimA.h", line 277: error: expected a ";"
_WDTIM_WDTCR2_WDKEY_MK(WDTIM_WDTCR2_WDKEY_ACTIVE)));
^

2 errors detected
  • Hmm, is this the wrong forum for C55x CSL problem reports and bug fix requests?

  • I'm sorry, I am not a CSL expert, but I was able to take a look at the CSL header file.  As far as I can tell, all of those errors are due to two bugs in the  header file.  I only get these error messages when I compile with optimization turned on.  I'm not sure how to submit a bug against CSL, I'll have to look into that.  In the meantime, you might be able to work around these problems by using the -oi0 option to disable auto-inlining; inlining does not cause the problem, but disabling it avoids the bug.

    However, I wonder if you ought to be using the CSL library for C5505 instead. I don't know anything about C5506,  so I don't know which it is more closely related to.  However, the C5505 library has a much more recent release, and doesn't suffer from the above problems.  See http://www.ti.com/tool/sprc133.  For general C5000 CSL information, see http://processors.wiki.ti.com/index.php/C5000_Chip_Support_Library

  • Thanks for the reply, I will try changing the compiler options. I'm using CCS 3.3

    Now that I think about it, I might just code for the WDT without the CSL. There are certain EMIF and other hidden features of the C5506 that I've had to code directly to registers at hand-entered addresses, so it wouldn't be the first time.

    p.s. The official word from TI is to use the C5509A for C5506 development. As for the C5505, that's certainly a rev 3 and it has a High Speed USB peripheral. So it's much different than the C5506, which is rev 2.2 and has a Full Speed USB peripheral. C5505 examples certainly will not run on the C5506.