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.

6678, Ethernet, TaskSelf() causes SYS/BIOS to crash.

Other Parts Discussed in Thread: SYSBIOS

Hi,

Calling TaskSelf() causes the operating system to crash with these error messages:
[C66xx_0] 0. taskself1. init file descriptor environmentti.sysbios.knl.Task: line 895: assertion failure: A_badPriority: An invalid task priority was used.
[C66xx_0] xdc.runtime.Error.raise: terminating execution


Can someone please help me understand the error messages and how to fix it?


Here is some background:
Using CCSv5.1.0.09000 to program TMDXEVM6678L.
I started with the example C:\Program Files\Texas Instruments\mcsdk_2_00_05_17\examples\ndk\helloWorldHelloWorld example - it works.
I added an idle task in SYSBIOS for background processing - it works (toggles LEDs for now).
I am attempting to transmit UDP in the idle loop, but can't even do the first step, TaskSelf(), without crashing.
I think these are the steps I would need:
   1  fdOpenSession(TaskSelf());
   2  s = socket( AF_INET, SOCK_DGRAM, 0 );
   3  bind(s, (PSA)&sin, sizeof(sin));
   4  sendto( s, &gregs_string, strlen(gregs_string), 0, (PSA)&sin, sizeof(sin) );

Greg Reutr

 

  • Hi Greg,

    This will not work. NDK will try to change the priority of the task as part of it's critical region management. You cannot change the priority of the SYS/BIOS Idle Task. Idle functions have some other restrictions that would limit your approach also (e.g. no blocking on a semaphore in an Idle function). 

    Todd

  • Thanks Todd,

    I made a new thread and it stopped crashing.  No sign of the new port transmitting, monitoring a hub with wireshark, but it might be near (hopefully).  I've had success with signal processing but Ethernet and RTOS is new to me. 

    Greg