problems with demo mfs_usb

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

problems with demo mfs_usb

跳至解决方案
971 次查看
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 解答
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 ?

在原帖中查看解决方案

4 回复数
720 次查看
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.

720 次查看
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 项奖励
回复
721 次查看
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 ?

720 次查看
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 项奖励
回复