You are here

Integrating two projects | Cypress Semiconductor

Integrating two projects

Summary: 1 Reply, Latest post by aasi on 08 Feb 2012 02:58 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Nazila's picture
55 posts


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

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.



aasi's picture
Cypress Employee
1166 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.



Log in to post new comments.