USB Host operation using SAM E70

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

First of all, thank you all for the great support.

 

Now, I have got another requirement.

Has anybody got some experience on USB host programming in SAM E70.

I do have an atmel Xplained SAM E70 development board.

I need to read/write data in USB flash storage.

 

As per MCU spec, it seems possible.

This topic has a solution.

Silly beans are always silly
:)

Last Edited: Thu. Mar 16, 2017 - 05:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi,

 

With this chip (SAME70) I do use USB as both device and host with a mini AB connector, and I read / write to a USB key. So yes it can do that.

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

Other than USB pins, do i need to use any other pin to switch between device & host.

I asked so because in SAM V71 explained dev board, USB_VBUS & USB_ID pins are also used.

But in our SAM E70 board, i couldn't find these pins.

 

Kindly help me overcome this issue.

Silly beans are always silly
:)

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

Sure. You need USB_ID to detect if a host or a device is connected. ID is connected to GND when you plug an OTG cable to plug a USB stick for example, it is pulled up when it's connected to a host (so SAM acts as a device).

 

Personally I don't use the VBUS_DETECT pin.

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

So, as per connection, only vcc, gnd, d+ & d- are needed.
right?

Now, could you help me where to look out for sample programs.

or else, could share some sample codes for the same.

Silly beans are always silly
:)

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

So, how do we really switch between USB device & host?

Can we do this internally or should we make use of some external pins like in the case of SAM V71

Silly beans are always silly
:)

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

Please guys, shed some light on this topic.

I was a little busy with the rest of the circuit.

But USB is an important part of our project.

crying

Silly beans are always silly
:)

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

As I already said, you need USB_ID pin (fifth pin of USB connector) to detect if you are host or device. You need a AB connector to be able to plus a host or a device. For Code, you have an example project name "USB Dual Role" for SAMV71" which I used as a starting point. In fact all is done automatically as soon as youcorrectly connect the USB_ID pin. You also need to controle the power of the USB port. If you act as a device, you receive a 5V from it, and if you act as a HOST, you provide a 5V to this port.

 

Si the schematic of the SAMV71 board as an example.

 

Basically, you call uhc_start(); at the begining, then UHC_MODE_CHANGE() is called when you switch from host to device.

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

Thank you asterix86.

This simple reply will help me a lot in my work ahead.

I'll get back after I do some testing with the newly developed program.

Silly beans are always silly
:)

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

So far, no Luck.

Am now going through AT09339: Application note.

It might shed some light on what am doing.

Silly beans are always silly
:)

Last Edited: Wed. Dec 7, 2016 - 04:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am able to detect USB device connected to my dev board.

Logical Unit Number has been assigned to the flash drive.

But sadly I couldn't communicate with the drive.

Silly beans are always silly
:)

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

I even tried to get in touch with the ASF Development team.
But sadly no response.

Why aren't they answering?

I didn't ask for more, I only wanted some working sample programs for my Atmel SAM E70 Xplained Dev board.

Silly beans are always silly
:)

Last Edited: Thu. Dec 8, 2016 - 09:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What Should I do?

cryingcryingcrying

Silly beans are always silly
:)

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

I somehow ported the sample code for SAM V71 to SAM E70.

Lets hope it works

Silly beans are always silly
:)

Last Edited: Mon. Dec 19, 2016 - 06:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sadly the code compiles properly but I couldn't find any files in my flash drive.

Silly beans are always silly
:)

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

Has anybody out there got a working code for same70 USB Host MSC program?

Silly beans are always silly
:)

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

I really need some help on this.
I went to Atmel support seeking an answer to my query & they said that the same issue is being faced by them as well.

crying

Silly beans are always silly
:)

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

I even tried to get in touch with the ASF Development Team & they are also not answering.

What is happening in here?

Silly beans are always silly
:)

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

there is no 5v signal on that usb connector in host mode!

 

howien

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

Exactly & am supplying it externally.

Silly beans are always silly
:)

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

Any updates on this USB host operation in sam e70?

Silly beans are always silly
:)

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

Hi,

Atmel support itself is unable to get the USB host working for SAM E70.

Its way too bad.

Silly beans are always silly
:)

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

Does it mean that the datasheet is nothing more than a bluff?

crying

Silly beans are always silly
:)

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

Hi all,

We have already designed the prototype board using SAM E70 for our project & now it seems like we are screwed.

We haven't got the USB host working & atmel support is asking us to test it using SAM V71 xplained board instead of SAM E70. But as you can see, it has been months that we have been after this & so far nothing has come up.

Finally fed-up with this, I asked them to confirm whether USB host can be implemented using SAM E70 or not.

This is how atmel support responded to my query.

 

Dear Hari Krishnan,

Thanks for the update.

Please note at the Microchip support channel, we provide technical support. Since your requirement needs dedicated efforts of concerned development team, we suggest you to consult your local Microchip sales team. Please note, you need to share the business opportunity and application details with them. Based on that, the concerned sales team will prioritize the task.

 

Seeing this, I am wondering if I have asked them to create something new out of SAM E70 or what.

What magic is the local sales team has to do if their own support is not able to help.

Is this how big corporate giants respond to issues with their own products?

no

Silly beans are always silly
:)

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally, we got the USB Host MSC program working.

Thanks to Atmel support for the Help.

Am attaching the sample program to write a text file to flash drive connected to SAM E70 Xplained Development board.

Note: Since the board has got no provision to power USB device connected, you should either use self powered USB Device or USB to USB connector with external chord.

Attachment(s): 

Silly beans are always silly
:)

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

the zip file appears corrupt!

howien

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

Hi howien12,

The file is in (.7z) format. Since i was unable to upload that format, I renamed it to (.zip). So, download the file & then change the extention from (.zip) to (.7z).

Silly beans are always silly
:)

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

Does anybody know how to update the ASF version of an existing project file?

Silly beans are always silly
:)

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

hello, i am also adding the USB Host MSC module to my SAME70 project. 

Thank you for share your experience with us.

Let's make progress together。

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

Hello,

 

I am using the SAM E70 Xplained board. I need to read from a usb  and I tried using the samv71 example code since I could not find any usb read/write applications for sam E70. However it keeps giving me the message FR_NOT_READY and gets stuck in the if loop.Could someone please help me find a sample program to write a text file to the USB using  the SAM E70 Xplained  board.