You are here

FX3(S) firmware structure for multiple I/F ? | Cypress Semiconductor

FX3(S) firmware structure for multiple I/F ?

Summary: 2 Replies, Latest post by MCM on 03 Feb 2014 11:18 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
mstx's picture
31 posts

Dear all

I have the FX3 DVK on my desk and was happy about the fast success in have running my first "hello world" slave fifo I/F and an I2C ping.

Now I'm trying to plan the firmware I need for our system and am a little confused as I'm not familiar with threadX (FX2 had everything just in plain 80C51).

My FX3S will drive a slave fifo I/F, I2C slaves, SPI slaves, couple of GPIOs and later on an emmc mass storage device. The examples within the DVK are always just doing exactly one task. So I wonder about how to build up a firmware supporting multiple of those.

Must I use multiple threads (i.e. multiple CyU3PThreadCreate) or just put everything that is USB related into one thread? Are there any examples available (that would be very helpful) or any docu elaborating on this very topic? What is "best practice"? what are others doing? If I am to use multiple threads, how can I have access to the debug interface (which is initialized within the thread) from the other thread(s)?


rskv's picture
Cypress Employee
1134 posts


If your application requirement is to do things in a sequence then you can just use a single thread to do the job. Otherwise, you can use multiple threads. For more details on using multiple threads please refer to the simple examples like GpioApp and GpioComplexApp in the FX3 SDK.


Sai Krishna.

user_2208888's picture
38 posts

@mstx: Hi, I found out that a much better place to initialize the debug interface is from the CyFxApplicationDefine() function as the first thing. Actually I have moved all the initializations ffrom the thread( debug, i2c, application ... ) from the thread head to CyFxApplicationDefine() and so far all seem to be OK.

Of course, I would appreciate a Cypress employee comment if this is the best way to do it, I'm in the process of "untangling" the firmware and that was the first thing to do as I have a composite device with a gadillion of interfaces and the corresponding number of threads ;).



Log in to post new comments.