task priority problem nandflash mfs TWR-K60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

task priority problem nandflash mfs TWR-K60

645 Views
okaner
Contributor III

Hi,

  I have twr-k60 and twr-ser modules. I want to use all features of MQX on this tower system then I will develop my own custom board.

Currently,

I am able to use the features listed below in one project at the same time except for nandflash.

- sdcard

- usb flash disk

- nandflash (I have problem with mfs)

- ftp server

- telnet server

- web server

- shell

- my appliccation

I also want to use nandflash over mfs.

I have 4 tasks listed below. Main task starts ftp server, web server and telnet. Then shell runs in main task.

  -----------------------

{ USB_TASK,     USB_task,             2000,  8L,     "USB",        MQX_AUTO_START_TASK, 0,     0},

{ RS485_TASK,   task_ioDevicesComm,  2000,   6,    "rs_485",     MQX_AUTO_START_TASK, 0,     0 },

{ SDCARD_TASK,     task_mySDCard,         2000,    11,        "SDcard",    MQX_AUTO_START_TASK, 0,     0},

{ MAIN_TASK,       Main_task,           3000,    12,        "main",        MQX_AUTO_START_TASK, 0,     0},

--------------------------

    TELNETSRV_init("Telnet_server", 7, 2048, (RTCS_TASK_PTR) &Telnetd_shell_template );

    FTPd_init("FTP_server", 7, 4096 );

-------------------------

I am able to run nandflash example without error NAND Flash File System patch for Freescale MQX™ RTOS 4.0.0

But when I call fsopen from shell, shell task(main task) hangs. But the other task are running well.

Can someone give me advise for task priorities.

For example should task priorities of the tasks using mfs be same?

Should rtcs tasks's priorities be higher than mfs tasks(usb, sdcard, nandflash tasks)

Is there such constraints for task priorities?

Thank you....

Tags (2)
0 Kudos
Reply
1 Reply

331 Views
Martin_
NXP Employee
NXP Employee

For the RTCS, default priority of RTCS task is 6. User tasks running RTCS applications should be made with priority less than 6. I would lower also the RS485_TASK so that it doesn't block the RTCS task in case you're using polled mode serial driver.

In general, in an preemptive RTOS environment, task switching mechanism should be understood well and priorities selected carefully for an application needs.

0 Kudos
Reply