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.

TSK_sleep stop responding

Hi,

I'm using TSK_sleep() function for sleep. If I call this function in the main it's ok but as soon as I leave the main and switch to first task the TSK_sleep() stop responding. In addition when I put a breakpoint somewhere before this task i.e. main() the program stops there indefinitely which is not possible because I have left the main(). I had a hunch that TSK_sleep() causing a reset so I put my function in HWI for the reset and succeded tocatch it,  but I still don't understand why TSK_sleep() is causing the reset. Please help.

Thanks,

Pavel

 

  • Not sure why you you have a TSK_sleep() in main.

    When you call TSK_sleep() from within a task, you are saying that it sends your processor out in the weeds?

    Have you used your kernel object viewer to try and get some insight into what's happening?

    Have you looked to see if you are blowing your stack?

  • Hi David,

    I put the TSK_sleep() in the main to find where the problem begins. Actually I have found that calling TSK_sleep() from any task cause HW reset. I have also checked the stack with the ROV as you suggest but it indicates that I have a lot of memory left.

    Regarding kernel object viewer what do you mean and how I do it?

    Pavel 

  • Wat version of BIOS are you using?

    What chip/platform are you running on?

  • The chip is C6748 on custom platform and using the latest BIOS I found 5.41.03.17.

    Pavel.

  • Have you tried running any of the standard BIOS examples on your board?  Do you have an EVM or experimenter board were you can try your app?   If you can reproduce on one of these boards, then you can zip up your project and we can take a look.

    Are you doing anything unusual in your sample app?  Like changing the cache sizes at runtime?   The L2 memory can be either cache or RAM.  If you increase the cache size at runtime, you will stomp on code or data in L2. 

    Regards,
    -Karl-

  • Karl,

    Actually I'm using the McBSP standard example but in order to get it working I needed to remove TSK_sleep() from the driver. All I do is according to standard operations and my program is using the predefined IRAM and L3 memory without mentioning L2 specifically.

    I'm sorry but right now I don't have any of the boards you mentioned.

    Regards,

    Pavel

     

  • Can you try running one of the examples from <biosinstalldir>/packages/ti/bios/examples on that board?  These examples don't use the McBSP but it would be useful to run these and make sure that they are basically healthy on your board.   If those work fine, then next step would be to ask someone from PSP team to take a look at the McBSP driver example.  What versions of  CCS, BIOS and PSP are you using?  If you are using CCSv3, then try opening "Kernel/Object View" (available from Tools->DSP/BIOS menu at top of CCSv3) and review the stack sizes and other kernel state that it gives you.  If you are using CCSv4, use 'ROV" tool (available from Tools->ROV menu).

    -Karl-

  • Thank you for suggestions! For now all my drivers (i2c, mcbsp, ethernet and etc.) are working fine except the TSK_sleep() issue which is not so important for me now. Because it's not so big issue but an interesting one and I'm I will get back to it later. If I found something I will inform the forum.

    Thanks again for trying to help!!!