ASF example for USB Mass storage Class on XMEGA

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, 

 

I am trying to implement this example code from ASF3:  ASF Source Code Documentation (microchip.com) on an ATXMEGA128A1U - Xplained board pro

 

The project compiles, and the when connected to a PC it enumerates as a MASS storage device. 

However, no mass storage device shows in the PC's file system.

 

Going to the `device manager` in windows lists the mass storage device as `not started`.

 

What am I missing? 

 

I added two screenshots for what I see. 

 

 

Attachment(s): 

This topic has a solution.
Last Edited: Sun. Oct 10, 2021 - 01:51 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely, the mass storage device needs functioning file system software and a real file system to report to the PC. Do you do that?

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Normally you match the SCSI implemented by MSD to a FAT backend such as FatFs. The Windows system will see the device and ask it for sector 0 but to look like a FAT drive that first 512 byte sector content needs to look like a BPB or an MBR. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Even if there was no file-system or even no partition table, I believe Windows would still start the device and prompt the user to format the drive.

 

I'd guess there was an error when reading sectors or drive parameters. No doubt Windows would have logged an error code, but good luck finding it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually, no. 

 

What you say actually makes sense. But it was not mentioned at all in the example. 

Do you have a working example for so, please? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N.Winterbottom wrote:

Even if there was no file-system or even no partition table, I believe Windows would still start the device and prompt the user to format the drive.

 

I'd guess there was an error when reading sectors or drive parameters. No doubt Windows would have logged an error code, but good luck finding it.

 

 

I attached the only log I could find in Windows.

Attachment(s):