Open ’fcl_f2838x_tmdxiddk_settings_cpu1.h’ and select
level 7 incremental build option by setting the BUILDLEVEL to FCL_LEVEL7
(#define BUILDLEVEL FCL_LEVEL7). Right-click on the project name, and then click
Rebuild Project.
Note: Control power supply to the IDDK is alone needed for this build level,
therefore, you can turn off the high voltage dc power to the
kit.
When the build is complete, click the Debug button, reset
the CPU, restart, enable real-time mode, and run.
Right-click within the CCS Expressions window and choose
Import. Then browse to and select fcl_f2838x_tmdxiddk_ecat_vars.txt file
from the debug directory. This will add the following variables within the
‘Expressions Window’:
countMainLoop :
counter to just show activity in ECAT main loop function
dataBufferFromCM :
buffer copy of message from CM
dataBuffertoCM :
buffer copy of messge to CM
ipcCMToCPUDataBuffer
: data buffer written by CM for use by CPU1
ipcCPUToCMDataBuffer
: data buffer written by CPU1 for use by CM
Running the code will enable the GPIOs needed for EtherCAT and
also passed over the ownership of EtherCAT slave peripheral to CM, besides
setting up the IPC on CPU1 side for data transfer between CPU1 and CM. Now is
the time to load / run the code on CM to initialize the EtherCAT peripheral.
Note: If ever the EtherCAT
was assigned to CPU1 in any of the immediate previous evaluation projects
and is now being assigned to CM, then make sure to power cycle the
controlCARD before running the CM project to ensure that CPU1 has fully
relinquished the EtherCAT peripheral.