Cypress EZ-USB® FX3™ SDK Quick Start Guide, Version 1.3.1 24
Whenever the data cache is turned on, care needs to be exercised to prevent data
corruption due to unexpected cache line evictions. It is required that the
isDmaHandleDCache parameter to the CyU3PDeviceCacheControl() API be set to
CyTrue, whenever the isDCacheEnable parameter is set to CyTrue.
5.1.4 Initializing other interface blocks
This section applies to the initialization sequence for interface blocks like USB,
GPIF, I2C, UART etc. All of these blocks will be held in reset at the time when
firmware execution starts.
The procedure for turning on any of these blocks involves:
1. Turning on the clock for the block
2. Bringing the block out of reset.
3. All of the interface blocks on the FX3 device (except the GPIOs) have a set
of DMA sockets associated with them in addition to the core interface logic.
It is required that these sockets be reset and initialized with clean default
values when the corresponding block is being turned on.
These steps are performed by the init function associated with these blocks
(CyU3PUsbStart, CyU3PPibInit, CyU3PUartInit etc.).
Since the DMA sockets associated with a block are reset during the block
initialization; it is expected that the blocks are initialized before any DMA channels
using these sockets are created by the application.
e.g., the PIB (GPIF) block needs to be initialized before any DMA channels using
the PIB sockets are created.
The user also needs to ensure that the block is not repeatedly initialized at a later
stage, thereby affecting the DMA channel functionality.
5.2 Embedded Operating System
The FX3 firmware libraries include the ThreadX Operating System from Express
Logic, Inc. All of the OS services that are provided in version 5.1 of the ThreadX
operating system are included in the cyu3threadx.a library. A set of OS abstraction
wrappers (macros and functions) are provided around the core ThreadX API, to
allow porting of the firmware solution to other embedded Oses with similar feature
sets.
The debug (fx3_debug) build of the OS library provides OS services with additional
error checks built in. This checks result in greater memory footprint and slower
execution, and are disabled in the release (fx3_release) build.
5.2.1 Execution Model
The ThreadX operating system supports the creation of multiple threads with
different priority levels. There is no direct restriction on the number of threads.