Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AT91SAM7 USB Interface - Linux
PostPosted: Mon May 10, 2010 5:20 pm 
Offline

Joined: Mon May 10, 2010 4:47 pm
Posts: 3
Hello everybody,

I am working on a research project at the University of Zurich in Switzerland(ETH). Part of my projcet requires interfacing data acquisition devices with an AT91SAM7S256 board.

So, after using all USART ports on the board I need to use the USB port to pass all the acquired data to a computer (running linux), process it, and give it back to the board.

After looking around for quite a while I havent found a clear and simple explanation on how to use the USB port to achieve this. The way I see it there are 2 ways of doing that:

1) Use a USB interface on both ends (linux-board) which requires drivers on the end of the linux computer and some firmware on the AT91SAM7 in order to be recognised. The problem here is that without the bootloader my device is not recognised in linux.

2)Somehow make the whole thing work as a simple Serial interface. Here I need a way to have the board recognised in linux (like on point 1)) and some way to simply read and write data from the computer using the AT91SAM7 ( a library on the AT91SAM7).

I am completely stuck on implementing any of the two...

Can somebody please help me? I simply need to pass data to and from a linux computer (via USB) using the AT91SAM7. it should not be THAT complicated but I am confused like censored.

I hope to hear from somebody soon!

Nick


Top
 Profile  
 
 Post subject: Re: AT91SAM7 USB Interface - Linux
PostPosted: Mon May 10, 2010 9:10 pm 
Offline

Joined: Sun Dec 20, 2009 10:52 pm
Posts: 6
Hi there.

I don't have experience with Linux but Atmel doc6269.pdf talks about using their USB CDC demo example with it, so I would think that it is not too difficult. If you download the example code to make a USB CDC device then you can mold that into what you need. Basically, the CDC demo code on your target, and the Linux device driver, will make it look like you have another serial port on your PC that comes from the SAM7. You need to modify the demo code so you handle both in and out data from the USB interface. That is easy - you just strip out all the COM port stuff in the demo! I suggest trying the demo without modification first. If you can build and run it on your target successfully then the mods to use the USB for your app will follow without requiring that you know much about USB. I am in the process of doing just that for my own target at the moment. I started with the Atmel demo code that is included with my IAR workbench. It is version 1.7rc. I found a few bugs and would be happy to report them if there is no more recent source. Even with the bugs the demo worked. Good luck.


Top
 Profile  
 
 Post subject: Re: AT91SAM7 USB Interface - Linux
PostPosted: Tue May 18, 2010 1:21 pm 
Offline

Joined: Mon May 10, 2010 4:47 pm
Posts: 3
Hey gpontis,

You are totally right. I was not familiar with what CDC serial driver meant so I never checked that source. It is exactly what I wanted to do. It would obviously take me forever to do the same thing on my own...

I read the document you mentioned and tried the demo code. Everything went smoothly (after changing makefile etc). Now I am in the process of integrating the CDC driver and implementation in my code. Or maybe the other way round ( the atmel project is indeed well made).


I can answer questions on the topic myself now! In my opinion the documentation is realy good.

Thank you very much for your help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron