problems with demo mfs_usb

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

problems with demo mfs_usb

Jump to solution
968 Views
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.


Labels (2)
Tags (1)
1 Solution
717 Views
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 ?

View solution in original post

4 Replies
717 Views
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.

717 Views
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 Kudos
Reply
718 Views
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 ?

717 Views
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 Kudos
Reply