- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to use the GPIF as a master to read/write and SRAM type devices. Since these devices have different characteristics, I need to change GPIF configurations frequently. But I don't want to reboot and load different firmware every time. I plan to change configurations, such as clock frequence and port width, by control endpoint during running time.
Is it possible to implement this?
Thanks!
Rover
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rover,
It is possible to do that. You don't have to load firmware every time you want to change the GPIF descriptors.
Use CyU3PGpifDisable(CyTrue);
Then you can load new GPIF configuration using CyU3PGpifLoad() and start the state machine using CyU3PGpifSMStart() API.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank Sai for the reply. I want to know if I need to config the DMA again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rover,
The DMA config would depend upon the two different GPIF configurations that are going to be loaded one after the other.
If there is no change necessary in the DMA size, count, or type when you are switching between the GPIF configurations, then CyU3PDmaChannelReset() and CyU3PDmaChannelSetXfer() calls would suffice. But if the new GPIF configuration needs the DMA channel parameters to be changed, then you would need to perform a CyU3PDmaChannelDestroy() and then create a new DMA channel with the new parameters.
Regards
Shashank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to change the bus width of GPIF. However, the new width becomes effective from second transfer after I changed the width. That is to say, the first packet I sent from USB still uses the old settings. Why?