TI E2E Community
Digital Signal Processors (DSP)
C6000 Single Core DSP
C64x Single Core DSP Forum
tsk_sleep() called from a task is not working. (DSP/BIOS)
my target is tci6487 symmetric little endian simulator.
i created simple DSP/BIOS program which the different tasks synchronize to each other.
here is the code.both the tasks are given task priority of 1.
LOG_printf(&trace,"running in task 1");
LOG_printf(&trace,"running in task 2");
Will you please elaborate as to what you mean by "it is not working?" Other than the function name being typed out incorrectly (TSK_sleep() instead of tsk_sleep) this code should work fine. Are the tasks even hit the first time or does your system never enter these functions? Do you have any other tasks in your system which are not blocking?
---------------------------------------------------------------------------------------------------------Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
the code is working fine in all target except c64x+.
(like running in task 1, running in task 2, delay,running in task 1, running in task 2, delay,.....)
in target c64x+ it runs only once.
(like running in task 1, running in task 2,then Knl_swi runs)
How long did you wait? I set up a quick project using the code you sent me and I did re-enter task1; however, this took MUCH longer than 5ms. It was actually closer to a minute to get back into it. I am assuming this is because the simulator is not running as fast as an actual piece of silicon.Can you confirm that it *never* makes it back into the tasks even if you wait a minute or two? You can check the "Time Remaining" of each task inside the DSP/BIOS -> Kernel Object View to see approximately how long it will take to get back into the task.
I checked in kernel object view. it shows the task remaining time.but the problem is it is not reducing even after 20 minutes in my pc. [ xp,CCS v3.3, 1GB ram,P4 2.8GHz] .
I don no why it took this much time. i think i should modify some timer parameters.
The only thing I could think of is that you had a very long system 'tick' time as opposed to the default 1ms. For example, if your system tick were 100ms then this might take 100x longer than my test did on the simulator (which admittedly took a lot longer than I would expect).
Could you tell me the parameters to modify ,so that the ticks takes actual / expected time period.?
Check the contents of the CLK Manager (see attached). The microseconds per tick is typically about 1000 so that a tick occurs every 1ms. This programs the Timer's Period (PRD) register with a specific value that will generate an interrupt every 1ms. I've circled both of these fields in the attached photo. As I mentioned before the only reason I know of that causes the TSK_sleep() to take so much time is the fact that the simulator runs slower than actual hardware. This is because the simulator has to simulate everything in software which is slower than hardware. If your tick time is small you should be able to see the tasks return on the simulator even if it runs slowly.
TCI6487 has only two timers.also the hardware interrupt is in gray color ( which i cant change).
However I have changed the clock manager parameters as per the image you attached.
Still,it runs as-usual. (i.e task time remaining is 1 after long time. [10 mins])
It sounds like you may have hit a bug with the simulator. I will see if I can find someone more knowledgable with the simulators to help out.
A side thought is that you may want to update your CCS Service Release and DSP/BIOS versions if you are not already using the latest (select Help->Update Advisor->Check for Updates). FYI I am using SR 12 with DSP/BIOS 5.33.06.
I understood that this problem appears in C64x+ simulator configuration only, an *not*
on TCI6487 simulator. Please confirm my understanding. I also understood
that you use the "C64x+ Cycle Accurate Simulator, Little Endian"
simulator configuration, when you refer C64x+ simulator. Please confirm.
Cycle Accurate Simulator, Little Endian" simulator configuration's
interrupt map is a fictitious interrupt map and does not relate
to TCI6487 SoC's interrupt map. Hence, you may not get the correct behavior
in "C64x+ Cycle Accurate Simulator, Little Endian", as against TCI6487
simulator configuration. I recommend you to continue to use TCI6487
simulator configuration, in case of using BIOS in your application. Is there a reason you want to use "C64x+ Cycle Accurate Simulator, Little Endian" as against the TCI6487 simulator configuration?
"C64x+ Cycle Accurate Simulator, Little Endian" as against the TCI6487 simulator configuration?
LMK if this
To configure the C64x+ Simulator configuration check the wiki article - http://www.tiexpressdsp.com/index.php/C64x%2B_CPU_Cycle_Accurate_Simulator & http://www.tiexpressdsp.com/index.php/C64x%2B_Cycle_Accurate_Simulator.
Once timer memory map & interrupt are configured corresponding to TCI6487 then you shouldn't see TSK_sleep issue.
TCI6487 Memory map - Timer0 (0x02910000 - 0x0291003F), Timer1 (0x02920000 - 0x0292003F), Timer2 (0x02930000 - 0x0293003F)
If my reply answers your question please mark the thread as answered
Check the Wiki for more info - link
My simulator is not c64+ cycle accurate simulator.
It is TCI6487 Simulator Symmetric, Little Endian.
Also , I tried some other simulators of family 64x+,little endian.
Same problem only i encountered.In other familes like 64xx,62xx its working fine.
I am little confused. Please help me here [:)]
You seems to have a application that uses TSK_sleep. This application works fine on C62XX and C64XX simulator configuration, but not on any of the C64x+ simulator configuration, including the TCI6487 simulator configuration. I this problem statement correct?
Assuming so... Dont you have to change your application to use different version of BIOS to run it on TCI6487?
The problem statement is right.
i think no need to change bios version.
currently my BIOS version is 5.31 [ ccs 3.3] .latest one is 5.33.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.