Friday, November 17th 2017, 6:25pm UTC+1

You are not logged in.

  • Login
  • Register

Reply

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Message information
Message
Settings
Automatically converts internet addresses into links by adding [url] and [/url] around them.
Smiley code in your message such as :) is automatically displayed as image.
You can use BBCode to format your message, if this option is enabled.
Security measure

Please enter the letters that are shown in the picture below (without spaces, and upper or lower case can be used).

The last 9 posts

Wednesday, July 12th 2017, 6:55pm

by witte

I'll do this next week I'll let you know if works and if the problem was solved.
By now, thanks for your support!

Wednesday, July 12th 2017, 5:59pm

by SEGGER - Yan

Uhhh, this is ancient. Please update to the newest.

Wednesday, July 12th 2017, 5:47pm

by witte

Unfortunately I don't have those functions in my library.
The version that I'm working is:

Source code

1
2
/* USB system version */
#define USB_VERSION                23608UL


This version is defined on USB.h file.

Wednesday, July 12th 2017, 5:24pm

by SEGGER - Yan

Yes, with the define DEBUG=1
you can use

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  USBD_SetLogFunc(USB_X_Log);
  USBD_SetWarnFunc(USB_X_Warn);
  USBD_SetLogFilter(0
              	| USB_MTYPE_INIT
              	| USB_MTYPE_CORE
              	| USB_MTYPE_CONFIG
//              	| USB_MTYPE_DRIVER
//              	| USB_MTYPE_ENUMERATION
//              	| USB_MTYPE_TRANSFER
//              	| USB_MTYPE_IAD
//              	| USB_MTYPE_CDC
//              	| USB_MTYPE_HID
              	| USB_MTYPE_MSD
//              	| USB_MTYPE_MSD_CDROM
//              	| USB_MTYPE_MSD_PHY
//              	| USB_MTYPE_MTP
//              	| USB_MTYPE_PRINTER
//              	| USB_MTYPE_RNDIS
//              	| USB_MTYPE_RNDIS_INTERN
//              	| USB_MTYPE_SMART_MSD
//              	| USB_MTYPE_UVC
//              	| USB_MTYPE_ECM_INTERN
              	);


The USB_X_Log/USB_X_Warn are located in the USB_ConfigIO.c file, if possible you should use RTT as it influences the timing the least of all possible I/O methods.

Wednesday, July 12th 2017, 5:20pm

by witte

Yan,

The log I mentioned is from my application.
It just print on a log.txt file saved on SD Card:
  • "USB Connected" when run the task USBD_MSD_Task()
  • "USB Disconnected" when the function USBD_MSD_Task() returns.

Sometimes the message "USB Disconnected" does not happens.

Is there some DEBUG flag that I'm able to show more useful messages for you?

Thanks.

Wednesday, July 12th 2017, 4:43pm

by SEGGER - Yan

That is strange, could you please post the logs?

Wednesday, July 12th 2017, 4:41pm

by witte

Dear Yan,

I've tried to use the return after call the USBD_MSD_Task(), but I don't know why, sometimes the function don't return after disconnect the USB cable.


I think that some reason the function blocks.
I have some debug logs that prove it.

Have you ever seen this before?

Thanks.

Wednesday, July 12th 2017, 10:17am

by SEGGER - Yan

No. But the blocking USBD_MSD_Task will return once USB is disconnected. You can check the connection state using USBD_GetState.

Wednesday, July 12th 2017, 1:23am

by witte

Is there an event for USB disconnection?

Hello,


I'm using emUSB Driver with embOS.
My application mount an MSD device to storage some files.
I'd like to know if is possible or there is any callback event the emUSB-Device provide when a disconnection occurs from USB.

Thank you!