Hello,
I'm using the following code in my RTSC configuration to setup NDK 2.22.03.20:
var Ndk = xdc.useModule('ti.ndk.config.Global');
Ndk.enableCodeGeneration = true;
Ndk.netSchedulerPri = Ndk.NC_PRIORITY_LOW;
Ndk.lowTaskPriLevel = 4;
The problem is that the scheduler always gets started based on the default value of 'lowTaskPriLevel', which is 3. The actual setting of 'lowTaskPriLevel' has no effect.
The source of the problem can be seen in the generated .c file (see also packages\ti\ndk\config\Global.xdt):
rc = NC_SystemOpen(NC_PRIORITY_LOW, NC_OPMODE_INTERRUPT);
...
rc = 4;
CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRILOW,
CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&rc, 0 );
First, NC_SystemOpen() gets called with NC_PRIORITY_LOW which is defined as (_oscfg.TaskPriLow-1). At this point, _oscfg is only initialized with default values. The next call to CfgAddEntry() has no effect on the priority of the scheduler.
I think the same problem would occur with the NC_PRIORITY_HIGH setting ('highTaskPriLevel').
Thanks,
Ralf