CY7C64215 Bulk Transfer skeleton code

Discussion of the PSoC CY8C24x94 and other PSoC like USB parts from Cypress should be discussed here. This forum is limited to the discussion of USB portion of those parts. Other forums should still be used to discuss the non USB features of these parts.

Moderator: ericb

CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 2:16 am

Is there a relatively simple solution using either PSoC Creator or Designer, for creating USB bulk transfer type code - just the basic skeleton with descriptors, endpoints, and reset vector handling, for the Encore3 devices?

If not, does anyone know of available asm source code skeleton that provides this functionality? My specific part is the CY7C64215 PSoC1 type device. I was hoping to go with this low pin count part rather than the CY8xxx parts which seem to be easily managed with the USBFS component designed for PSoC 3 and greater devices using PSoC Creator.

I'm aware of the FTDI interface adaptable to any of the various microncontrollers, but I was considering using the Cypress parts specifically, thinking that the PSoC software would make it relatively simple to get the USB related end of things easily into place, so that I could focus on other aspects of my project.

Please help if you can.

Thanks,
Tim
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 4:30 am

Perhaps this will help:

Application note 2298 2298 is written for the 24x94 series psoc, but you can clone it pretty easily to the 28 pin ssop encore III device.

Some random thoughts to consider if you haven't already:

It has been a while since I messed with this specific application note. I believe it has the descriptors and endpoints for bulk transfer, but the reset you will have to put in. You can put in a reset flag in the interrupt assembly file and handle that in your main.c file. For bus resets, I have used the usbfs_stop and usbfs_start when the bus resets. If the device is still powered and the bus resets and you don't handle it, the device will effectively hang. Some pc's reset the bus on sleep, some don't so some machines will work and others won't. It can be frustrating to figure out because the device won't communicate, but the pc won't throw an error. If you decide you want to do ftdi, you could just put in the usbuart user module and do mode.

In some examples i've seen and with Linux hosts, bulk transfer devices are automagically converted to interrupt transfer. Is there a reason you have to have bulk? It hogs usb resources.
Did you want to do a watchdog timer?
Depending on your target host, I've found that despite the loathing of the libhid community, piggybacking on HID isn't a bad option even if your device has no human interaction. The Encore III is a good platform with many capabilities. I think you find it a capable option, but be aware it may take a considerable amount of development time to get it to function.
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 4:56 am

orob, thanks for the link and informative response. I wonder if code for the old cy7c64013 is easily fitted to the cy7c64215. I wrote code for it (asm with a combination of bulk out and interrupt in transfer) many years ago (I think it was around 1998) soon after USB came out. I also wrote the device driver to go along with it - necessary because it was a non-HID device. I recently had the driver certified and signed (the WHQL process) for 64-bit Win7 as well, for interaction with this device. So if this might be easily ported, it might be the way to go. But if I do, can I somehow get it into PSoC designer to make use of that software in adding additional functionality? And if so, how would I go about that? I actually wrote all the code for that project just using the Windows Notepad editor and then downloaded it using the HiLo systems programmer. I'm trying to become more modern by learning some of this new software to make future interaction with the higher pin count devices a little easier and quicker.

Also, out of curiosity, in what way does the bulk transfer hog resources? Are you referring the reading of the data by the higher level system such as app or DLL, or are you referring to the driver or even lower processes?
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 6:36 am

I do not know anything about the cy7c64013 device. I do know that the designer program generates a series of assembly files that you can likely cut and paste your code. Pull down designer and clone the 2298 project files. Once you build the project, you can open the assembly files. With your previous files you should be able to see the usb framework. If you have a signed driver, you should be able to plug into that by assigning the proper VID, PID and setting up the right transfer bytes.

Here is a link to read on the endpoint types. I defer to the experts on this. Your choice in endpoint type will likely be determined by your data throughput and its priority with other devices on the bus. I imagine that if you could do your data transfer over an ftdi uart type of transfer, you may not require a bulk transfer. However with the signed driver, it may be best to stay with it. I side step the whole whql driver problem by making the device HID and then I never have to load a driver (in windows... not necessarily so in Linux or MacOS). The device reports what resources it needs and then the trick is properly using the link library to communicate with it.

If you are really serious about this, you may want to get the CY3664 kit and an ice cube. I believe you will find it worth the investment. Having said that though, depending on your other analog requirements, you may want to go with a PSOC3 that has usb as well and can do more at a higher level. The CY8KIT-001 is less than 1/4 the price of the CY3664 kit and you can do much more with it, but the board design rules for the psoc3 is a bit more rigid. More random thoughts. I hope I'm not making things more difficult.
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 8:18 am

Thanks again orob. And no, you are not making things more difficult - I appreciate the input.

I couldn't find anything by Googling the CY8KIT-001 that you mentioned. Could you tell me more about it?
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 8:27 am

cy8Ckit-001. I left out a c in the middle.

This kit. It does non usb psoc 1, psoc3, and psoc5.

What type of device are you making?
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 9:06 am

That kit seems to be targeting CY8xxx devices. Aren't those PSoC3 and greater? I didn't think PSoC Creator could be used with my CY7xxx PSoC1 device. I'm using the PSoCEVAL1 kit and seem to be stuck with the PSoC Designer software.
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 9:41 am

Psoc 1 devices are Cy8C2x.
Some of the Encore devices are a subset of Psoc1 usb devices CY7C64... I don't know all the part numbers, but I do know the CY8C24x94 and Cy7C64215 are very similar, almost to the point of interchangeable.
Psoc 3 devices are CY8C3x
Psoc 5 devices are CY8C5x

The larger question is what other capabilities are most important will determine which line you go with. If it is about cost, then psoc 1 it is. You may opt to do your demo code on a CY8C24894 chip with this demo kit. and then clone it to the encore III and use that for your deployment if the analog is sufficient for what you are doing. The Cy8Ckit-001 does not do the cy8c24x94 or cy7c64215 chips, but it does the cy8C29xxx chips. If you need more than 14 bits ADC, you have to go with Psoc3. You may also consider this board for testing if you only need to test a driver and some communication interfaces, but you will have to get with a customer rep to get one. I have one and I use it a whole lot more than I ever thought I would. it is a great basic USB functionality test platform.
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 10:14 am

Thanks again orob for all the information you've provided me.

All things considered, I think I'll put all the PSoC software aside and write my own asm code, building upon what I already have. Can I use the MiniProg3 and PSoC programming software to program a HEX file into any of the Encore devices, providing I wire it up correctly. In other words, do I have to go through the interface of one of the development boards, or can I do direct in-circuit type programming like is possible with the Microchip devices?
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 11:24 am

You can use the miniprog3 to put the hex file into any of the the psoc family devices with the pc programming software assuming if you wire it correctly... only 4 or 5 wires depending on the chip, pretty easy. In the programming software, you simply select your hex file and click the program button. The ISSP (in circuit serial programmer) can power the device and the software will tell you when it is done.

I was only suggesting the kits as a simple way to get started. Clearly you are not a beginner. By no means do you need the kits to work with the psoc chips.

I am currently using the encore III in a couple projects and I'm considering jumping up to psoc3 because of some of the analog limitations.

I have no desire to program an entire project in assembly. Designer allows the use of C except for certain interrupt jumps where one or two assembly lines are required.

I'm sorry for hijacking your thread with all of these questions when all you really wanted was a bulk example. Good luck to you in your programming.
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US

Re: CY7C64215 Bulk Transfer skeleton code

Postby justTim on Thu Apr 07, 2011 11:44 am

A final thanks orob. You've been very helpful.

Taking a quick look at the schematic for the PSoCEVAL1 kit that I'm using, it's quite obvious that the MiniProg3 connected lines run directly to the chip, and since one or more of the kits that demonstrate the higher level devices also use the MiniProg3, it's pretty obvious that ISSP is possible across them all. I should have thought about that before I even presented the question to you.
justTim
Newbie
Newbie
 
Posts: 8
Joined: Wed Apr 06, 2011 9:51 am

Re: CY7C64215 Bulk Transfer skeleton code

Postby orob on Thu Apr 07, 2011 12:30 pm

Happy to help. I somehow inferred that you had a psoc 3 first touch kit and that is why you were trying to do psoc creator stuff. Unfortunately the eval1 kit you have doesn't do usb and it runs off of psoc designer. It does everything else though. All the best to you.
orob
The Big Cheese
The Big Cheese
 
Posts: 604
Joined: Wed Sep 26, 2007 9:06 am
Location: US


Return to USB

Who is online

Users browsing this forum: No registered users and 1 guest