problems with demo mfs_usb

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

problems with demo mfs_usb

ソリューションへジャンプ
970件の閲覧回数
simonepuschmann
Contributor II

Hello,

I'm using the TWR-K60D100M Tower Module with cw 10.3 and MQX 4.0 and try to run the example mfs_usb.

I use a 8GB usb stick on the TWR_SER Module

When I use the command "dir" I get the message "Error, file system not mounted"

In debug mode I can see, that I never reached line 224 in USB_Task.c (usb_filesystem_install...)

It looks as if waiting for an event. I try to connect and disconnect the usb stick, but nothing happend.


Does anyone have an idea what I'm doing wrong.


ラベル(2)
タグ(1)
1 解決策
719件の閲覧回数
Martin_
NXP Employee
NXP Employee

Theoretically, a reason why a shell task would consume all CPU time is, that BSP_DEFAULT_IO_CHANNEL is defined to a polled mode serial driver, as in twrk60d100m.h:

#define BSP_DEFAULT_IO_CHANNEL                    "ttyf:"

and the shell task has a higher or equal priority than other ready tasks and MQX is configured to use FIFO scheduling for these tasks.

Try to use the serial driver in interrupt mode. In your user_config.h, define:

#define BSPCFG_ENABLE_ITTYD      1

#define BSP_DEFAULT_IO_CHANNEL   "ittyd:"

as the interrupt mode serial driver is blocking by default, the shell task would block until a character is received from the stdin.

By the way, when the shell is the only active task, can you open TAD windows and show the Task Status summary window ?

元の投稿で解決策を見る

4 返答(返信)
719件の閲覧回数
Martin_
NXP Employee
NXP Employee

when you attach a usb stick into TWR-SER, upon attach event the MCU would print some information about the memory stick on the default terminal. so the hardware+software is not detecting the attach event.

for hardware, check the jumper settings on TWR-SER, configure them for USB host:

J10 1-2 supply 5V on USB connector

J16 1-2 Host mode - supply 5V to VBUS

then you need a cable to provide Type A Receptacle for a usb pen drive into Mini-AB connector on TWR-SER.

if the hardware is setup properly and the usb controller initialized (as it is in the default mfs_usb demo) you will get at least attach event.

719件の閲覧回数
simonepuschmann
Contributor II

Thanks for your answer Martin,

I have set the jumpers as suggested by you, but the problem is still the same.


But when I disable the shell task on my console it looks fine.

I have the same probleme with the web server demo,

As soon as I activate the shell task the web server does not run.
I have no changes made ​​to the demos.


Do you have an explanation for this? What can I do so that I can use the shell task parallel?

0 件の賞賛
返信
720件の閲覧回数
Martin_
NXP Employee
NXP Employee

Theoretically, a reason why a shell task would consume all CPU time is, that BSP_DEFAULT_IO_CHANNEL is defined to a polled mode serial driver, as in twrk60d100m.h:

#define BSP_DEFAULT_IO_CHANNEL                    "ttyf:"

and the shell task has a higher or equal priority than other ready tasks and MQX is configured to use FIFO scheduling for these tasks.

Try to use the serial driver in interrupt mode. In your user_config.h, define:

#define BSPCFG_ENABLE_ITTYD      1

#define BSP_DEFAULT_IO_CHANNEL   "ittyd:"

as the interrupt mode serial driver is blocking by default, the shell task would block until a character is received from the stdin.

By the way, when the shell is the only active task, can you open TAD windows and show the Task Status summary window ?

719件の閲覧回数
simonepuschmann
Contributor II

Thanks for your answer,

I have changed the definitions as described and now the demo is working fine:smileyhappy:

Previous I have used "iodebug", but I don't understand why polling does block other task with higher priority


0 件の賞賛
返信