FX3(S) firmware structure for multiple I/F ? | Cypress Semiconductor
FX3(S) firmware structure for multiple I/F ?
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)?