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.

Help regarding running a simple DSP/BIOS program



Hi,

I am trying to run a simple DSP/BIOS prgram. My code is:

#include <std.h>

#include <log.h>

#include "hellocfg.h"

/*
 *  ======== main ========
 */
Void main()
{
    LOG_printf(&trace, "hello world!");

    /* fall into DSP/BIOS idle loop */
    return;
}

void my_func_PRD(){
LOG_printf(&trace, "hello world!");
}

I went to PRD module and added PRD0. In PRD0 function field I entered _my_func_PRD and in period (ticks) column 1000. Now, as far as I know based on these specifications PRD0 must be called after every 10000 ticks. PRD0 in turn will call my_function_PRD which will output "hello world!" in message log. While I am not getting any such output. Moreover in Statistics view the count value for IDL_busyObj changes countinously whereas count value for others (PRD0, PRD_swi, TSK_idle) remain 0. What I can guess is that PRD0 is never called and system is always executing idle loop. But why this is happening and what should I do to fix this?

Please help me out!!!!

  • I think this has to do with the number of ticks you specified inside the PRD object. Note that the period of a 'tick' is based on the value specified inside the Clock Manager properties. By default this should be 1ms. So if you specify a periodic function to run every 1000 'ticks' it should fire every second. I would also make sure that you specify this as continuous and not one-shot, although this would not prevent it from running a first time.

  • Try setting a breakpoint in your PRD.  That will let you know whether the PRD itself is not running or if the LOG_printf is not outputting.  If the LOG_printf is the issue then you may want to check out this article:

    http://tiexpressdsp.com/wiki/index.php?title=DSP/BIOS_Real-time_Analysis_(RTA)_troubleshooting

     

  • Hi,

    Thanks for your quick replies.

    @TimHarron:

     The mode is specified as continous.

    @Brad

    I put a breakpoint at my_func_PRD but that breakpoint is never reached and code runs continously just outputting "hello world!" of main function.

    @TimHarron & Brad

    If possible can anyone of you pass me your id so that I can send you the code. I think there is some problem with the settings of configuration file since the code itself is pretty simple.

    Thanks & Regards

  • In your profile area (click on your name in the upper right corner) you can attach a file.  You can then post a link to that file in the thread, or you might be able to reference the file when you click the "options" tab.  I have an option but I think it's because I'm an administrator on the forum.

    What board/simulator are you using for your test?

    Brad

  • Can you attach a file from a posting, by clicking the Options tab and under File Attachment click the Add/Update button? Or is this disabled?

    I tried running your same example on another C64x+ platform that I happened to have in front of me. I was able to get the LOG_printf from main(), but not from the PRD. When I went to look at the timer registers, the timer was obviously not counting since I only saw 0's in the TIMnn registers.

    Then I right-clicked on the CLK Clock Manager -> Properties (in the tcf file) and checked the box by "Reset Timer and TIMMODE". Then the timer started counting and the PRD function started getting called.

    I could only get the Log display when I halt the processor. I tried everything suggested on the Wiki I found from another of Brad's postings, at http://tiexpressdsp.com/wiki/index.php?title=DSP/BIOS_Real-time_Analysis_(RTA)_troubleshooting but it would still not display during running. And there is nothing going on to eat up all the CPU time, so there should be plenty of Idle time for communicating back to the host.

    But at least this may help get your PRD function running.

  • Hi,

    Thanks for your replies. I am using Lyrteck PADK board (C6727). I have attached the zip files of my project  (using the way mentioned by Brad). Please have a look on the code and post your suggestions.

    Thanks.

  • @RandyP

    There is no "Reset timer and TIMMODE" option in CLK Manager. I am working on C6727 floating point DSP. How to make it work then?

  • What versions of CCS and DSP/BIOS are you using? Go to Help->About to see the currently running version information.

  • In your tcf file, try going to the RTDX Properties window (under Input/Output right-click on RTDX then Properties). Un-check the Enable Real-Time Data Exchange box, then re-check it, and click OK. On my DM6467 the real-time data coming out started working correctly, although I also restarted CCS right before trying it.

  • I just looked at your project and I see that it's a BIOS 4.90 project.  That's a very old version of BIOS that does not even support 6727.  Please update to the current version of BIOS, 5.33.03:

    https://www-a.ti.com/downloads/sds_support/TargetContent/index.html

    You may find this wiki article helpful:

    http://tiexpressdsp.com/wiki/index.php?title=Migrating_from_BIOS_4.9_to_BIOS_5.x

     

  • The BIOS rev + CCS rev might be your only issue. When I got to my PADK this morning and created a new project with just the simple PRD func like yours, it worked right away with real-time display of the LOG_printf's just like it should. That means I had a different issue on my other platform. The versions I am currently running, fyi, are

    • CCS 3.3.82.10
    • BIOS 5.33.01
    • CodeGen 6.0.8
    • SD XDS510usb

    There are later versions of some, but at least these do work easily.

    Attached is my simple project that runs on the PADK. You can see from the .tcf file that all I needed to change from the base PADK6727 configuration was

    bios.LOG.create("trace");
    bios.PRD.create("PRD0");
    bios.PRD.instance("PRD0").order = 1;
    bios.PRD.instance("PRD0").period = 1000;
    bios.PRD.instance("PRD0").fxn = prog.extern("myPrdFunc");

    The zip has the .out but no other generated files, to minimize the file size. All source is included.

    testprd6727.zip
  • Hi,

    Thanks for replying.

    @RandyP: I upgraded DSP/BIOS to version 5.33.03 using the link you mentioned. I tried your code "testprd6727". It compiled successfully but when I executed it gave no output. Moreover, in the DSP/BIOS-5.33.03 there are no CSL modules in the .tcf GUI. In older DSP/BIOS-4.9 I was able to see the CSL modules like EDMA, Timer etc. How can I configure CSL modules if I want to in new DSP/BIOS. Versions I am currently using are;

    • CCS: 3.1.0   
    • BIOS: 5.33.03
    • CodeGen: 5.3.0
    • SD: XDS510usb

    I am attaching a snapshot of version information from about with DSP/BIOS GUI in background for your reference.

    Thanks.                  

  • When we moved to DSP/BIOS 5.x, the tight coupling between the DSP/BIOS GUI and CSL ended. Now, to use CSL, you need to manually include the library (Add Files to Project or drag from Windows Explorer) and also include the appropriate header files in your source code. Configuration is no longer available in the GUI, but is handled by calls to the CSL module functions. There was also a big change in the functional CSL moving from CSL 2.x to CSL 3.x.

    After loading your program, I assume you were able to manually open the LOG window and see the "trace" LOG object available at the top of that window. Since there is a LOG_printf() call in main(), you should see at least that display of "main hello world!". As long as you run past main(), which returns to DSP/BIOS, then you should at a minimum get that display when you halt the processor.

    It is likely that there are incompatibilities between the newer DSP/BIOS and the older CCS. To get your project moving, I strongly recommend upgrading your CCS version to CCS 3.x. If this is not possible, you may be able to see how some of the examples were configured in my project, but the implementation in the older BIOS and older CCS may be slightly different, and I do not have those to offer help with them.

  • Another option to consider would be to update to BIOS 5.20.05.  That version is compatible with CCS 3.1.  Also, it is compatible with the version of BIOS in the 672x ROM.