This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: Error handling : EtherCAT setting on Cortex-M4

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Tools

- CCS 10.1.1

- C2000Ware 3.03.00

- Complier V20.2.1.LTS

- Xdc tool 3.61.02.27

- BIOS 6.83.00.18

-TMDSCNCD28388D evaluation module

------------------------------------------------------------------------------------------------------------------------------------------

Dear Ti Supprot Team

Hello, I'm trying to set EtherCAT on CM core with SYS/BIOS .( TMS320F2838X.cmd ) 

During debugging step , there are some error messages on Console , ( not seeing in compiling step )

here are some error messages below

------------------------------------------------------------------------------------------------------------------------------------------

File :  " my project. out " Does not match the target type, not loaded

< Console > 

Cortex_M4_0: Error writing the init algorithm.Unable to read the Flash content correctly. Make sure the device is properly powered as per the datasheet spec (Recommended Operating Conditions). Flash Plugin failed to initialize the FMC. Operation cancelled.
Cortex_M4_0: File Loader: Memory write failed: Unknown error
Cortex_M4_0: GEL: File: C:\ti\workspace\SV_CM_kdh\Debug\SV_CM_kdh.out: Load failed.

------------------------------------------------------------------------------------------------------------------------------------------

I modified .cmd file ( allocating more sectors on .binit  . without modifying .cmd file, I couldn't  call HW_init() , MainInit() , CiA402_init(); ,etc..) and I think error occurs during this progress.

Q1) How do I solve unloaded project error ? 

Q2) Can I arbitrarily revise a command file ? what is the side effect of modifying command file ?

Regards,

Donghee Kim 

  • Hi Donghee,

    Unfortunately the individual best able to answer is unable to respond today due to weather challenges.  They should be able to respond by Thursday.

    Sorry for the delay.


    Thank you,
    Brett

  • Hi Donghee,

    Sorry for the late reply.

    You said your project compiles OK with no errors or warnings? Based on the errors it looks like the linker command file and target configuration file have some mismatch. I'd suggest trying to load a SW project within C2000WARE that is known to work first. Then you can reference it for your own project.

    Please try the simple LED project below for the F2838x CM core. Set the build configuration to Flash, since it looks like you were trying to run your project from flash:

    C:\ti\c2000\C2000Ware_3_03_00_00\driverlib\f2838x\examples\c28x_cm\led

    After verifying this works you can reference the .cmd and target config file it uses.

    Best,

    Kevin

  • Thank you for replying, Kevin

    I've tried in various ways over the last few days, so now it seems that it runs properly.

    Kevin Allen18 said:
    Please try the simple LED project below for the F2838x CM core.

    And I think we can skip this example checking step because I'm trying to set EtherCAT environment on my existing project ( It runs well with IPC , ePWM ISR , SYS/BIOS ,etc.. )

    .For now, there are other questions that i want to ask to support team .

    Q1 ) I added HW_init() & MainInit() & CiA402_Init() for EhterCAT , here's a brief code(CM main.c) below.

    void main(void)
    { 
        //CM_init();
    
    /**************************/
          HW_Init();
          MainInit();
          CiA402_Init();
    /**************************/
    
    
        IPC_clearFlagLtoR(IPC_CM_L_CPU1_R, IPC_FLAG_ALL);
        IPC_sync(IPC_CM_L_CPU1_R, IPC_FLAG30);
    
        IPC_clearFlagLtoR(IPC_CM_L_CPU2_R, IPC_FLAG_ALL);
        IPC_sync(IPC_CM_L_CPU2_R, IPC_FLAG30);
    
    
        BIOS_start();    /* does not return */
    
    }

    As you see, I hided CM_init() & call 3 functions about EtherCAT. but when I run my project. CM core used to spin forever in these initiate functions or call error message on exit.c source file.

    Is it necessary to add these functions before BIOS_start()? . If it is, how can I call initiate functions properly?

    Q2)  I'm looking for example about EtherCAT Subsystem register configurations ( because I want to configure ESCSS registers before sys/bios starts ) .

    But I can't find any examples that handle EcatssConfigRegs .  Could you give file paths to  some examples about it ?   

    Regards,

    Donghee Kim

  • Donghee,

    Donghee Kim said:
    As you see, I hided CM_init() & call 3 functions about EtherCAT. but when I run my project. CM core used to spin forever in these initiate functions or call error message on exit.c source file.

    Which specific function, and sub functions, does it get stuck in exactly? Please debug this further within CCS and provide details.

    Donghee Kim said:
    But I can't find any examples that handle EcatssConfigRegs .  Could you give file paths to  some examples about it ?   

    You're looking at the 'f2838x_cm_cia402_solution' example project correct? This register gets configured in the line of code below:

        //
        // Configure EEPROM Size for 16K bits or less
        //
        ESCSS_configureEEPROMSize(ESC_SS_CONFIG_BASE, ESCSS_LESS_THAN_16K);

    The above is in 'ethercat_slave_cm_hal.c' file and 'ESC_initHW(void)' function.

    Best,

    Kevin