Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Integrating two projects

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Integrating two projects
Moderator:
RSKV

Post Reply
Follow this topic



Integrating two projects

Nazila posted on 06 Feb 2012 6:25 PM PST
Top Contributor
55 Forum Posts

Hi,

I would like to integarte two projects: the one with which has two interrupt endpoints (one IN and one OUT and is working correctly) and slave FIFO. At the begining, I made the changes in the "cyfxslfifousbdscr.c" as you suggested in http://www.cypress.com/?app=forum&id=167&rID=58209.

Using Control Center, the cypress was correctly recognized as 2 interrupt endpoints and 2 bulk endpoints.

Then, I integrated *.c files (cyfxslfifosync.c), which caused the cypress not to be recognized by windows anymore. Is there any example that shows how to integrate two *.c files. For instance,

1. Does it matter in which order I initialize the p-port vs the gpio or define the device descriptors, ect,...

2. Should I define one thread_Entry or two? (the interrupt endpoints are totally independent from the bulk endpoints)

3. Should I have two ApplicationDefine or one?

4. Should I define two threads?

5. Is this correct to have such an IO configuration:

   io_cfg.isDQ32Bit = CyTrue;
    io_cfg.useUart   = CyTrue;
    io_cfg.useI2C    = CyFalse;
    io_cfg.useI2S    = CyFalse;
    io_cfg.useSpi    = CyFalse;
    io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

6. Can I have the combinaiton of the buffers and threads as:

#define CY_FX_INTRLP_DMA_BUF_COUNT      (8)                       /* Interrupt loop channel buffer count */
#define CY_FX_INTRLP_DMA_TX_SIZE        (0)                       /* DMA transfer size is set to infinite */
#define CY_FX_INTRLP_THREAD_STACK       (0x1000)                  /* Interrupt loop application thread stack size */
#define CY_FX_INTRLP_THREAD_PRIORITY    (8)                       /* Interrupt loop application thread priority */

#define CY_FX_SLFIFO_DMA_BUF_COUNT      (2)                       /* Slave FIFO channel buffer count */
#define CY_FX_SLFIFO_DMA_TX_SIZE        (0)                          /* DMA transfer size is set to infinite */
#define CY_FX_SLFIFO_THREAD_STACK       (0x0400)                  /* Slave FIFO application thread stack size */
#define CY_FX_SLFIFO_THREAD_PRIORITY    (8)                       /* Slave FIFO application thread priority */
 

I also should mention that I already added the cygpif_syncf.h to the project.

Any suggestion is highly appreciated.

Thanks,

Nazila




Re: Integrating two projects

aasi posted on 08 Feb 2012 12:58 AM PST
Cypress Employee
1073 Forum Posts

Hi Nazila,

It is difficult to give out example or guideline on integrating since there are way too many scenarios to be covered to a generic step by step approach.

The key thing is to understand how the 2 firmwares work and what parts handles what. Then integrate one by one so that it is easy to understand which part is causing the issue and debug.

If the whole thing is integrated in one shot there are way too many variables and we're not lucky get it working straight away then it will be a headache to figure out which part could be wrong.

Cheers,

Anand






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.