task priority problem nandflash mfs TWR-K60

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

task priority problem nandflash mfs TWR-K60

915件の閲覧回数
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....

タグ(2)
0 件の賞賛
返信
1 返信

601件の閲覧回数
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 件の賞賛
返信