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.

DM6437 NDK + another task



Hi,

I successfuly compile and run NDK with dm6437. Then I modfied this code to create UDP server, which can send the data to computer on demand. There is no problem but....  How to create new task which can run simultaneously with net task? I need this task like main and sometime (when is neccesary) call net function (like interrupt). How to create function which can sharing time witch net function?

I have MyTask from DSP/BIOS where I call TSK_SLEEP fo share the time with NC_NetStart (running forever) function which served UDP server.

void MyTask(void){
while(1){
 //some computing 

 TSK_sleep(10);  //how to invoke interrupt from UDP insted of this ??
}
}

  • If you mean for the network to be handled using interrupts, then that would not be something to call from a task but rather to be handled in a  hardware interrupt, HWI.

    But if you just want to call NC_NetStart, is there a reason not to just put this line into MyTask?

    rc = NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr );

    I probably do not understand your requirement if this is not the correct answer for you.

  • I am sorry about not correct answer. I will try better qustions :)

    1. HWI is the best way for my design I think. Can I find any code examples how to invoke hwi from NDK?

    2. And the second qustion: how to add new task into NC_NetStart? I put CREATETASK function into NetworkOpen but my task is calling only one time, not periodicly...

    thank you for quic answer

  • VS said:

    1. HWI is the best way for my design I think. Can I find any code examples how to invoke hwi from NDK?

    A Hardware Interrupt is invoked by a hardware event such as a peripheral signaling that it is ready for service. An HWI is not invoked by software (although that capability exists for test purposes). It will be helpful for you to review the Tutorial included with DSP/BIOS that can be found under your DSP/BIOS installation folder by going to the folder <bios install>\packages\ti\bios\help\doc and opening the c6xbios.hlp file (there is an easier way to get to it, but this is the path that I know about).

    You may also find some helpful topics on the Texas Instruments Embedded Processors Wiki site. On the Wiki's main page under Useful Starting points, you will find DSP/BIOS and Network Developers Kit, both of which have some FAQs and some topics that may help you understand how Tasks and HWIs and SWIs work together and which might be most helpful for your project.

    VS said:

    2. And the second question: how to add new task into NC_NetStart? I put CREATETASK function into NetworkOpen but my task is calling only one time, not periodicly...

    Once you have learned more about DSP/BIOS, you will better understand the process of adding a new task to do the function you wish to perform. To understand more about the NDK, the application note spraax4 "Getting Started With the C6000 Network Development Kit (NDK)" will be very helpful.