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.

Concerto application

Hey guys, I’m facing another problem now… 

I’m working with the H52C1 Concerto controlCARD and I’m using Code Composer Studio 5.2.

I’m trying to send a variable acquired from one of C28's ADC channels to the computer using the Ethernet. 

I tried to use the ctom_ipcdrivers_lite and enet_uip_m3 examples provided with control suite, but it didn't 

quite work. Here is what I've done so far: 

I’ve put together the two projects for the M3: ctom_ipcdrivers_lite_m3 with enet_uip_m3. And I've kept the 

code from the ctom_ipcdrivers_lite_c28 example for the C28x. I am running the M3 from flash and the C28 

from RAM.

After loading the code in to the two cores: if I try to run the C28x core first,

I receive an error: Cortex_M3_0: Can't run target CPU (Error 1268 at 0x90001) Device is locked up 

in Hard Fault or in NMI. Reset the device and retry the operation. If error persists, confirm configuration,

 power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).(Emulation package 0.0.0.0) ,

 and if I run the M3 core first both cores get blocked, the C28x at: while(!IPCMTOCFlagBusy(IPC_FLAG17)); and the M3 core at:

 while((HWREG(RAM_CONFIG_BASE + RAM_O_MSXRINITDONE1)&0x1)  != 0x1).

If I run just the M3 core, it works only if the C28x core is connected, but not running.

Do you have any idea what might be the cause? I think what I'm trying to achieve is a typical application that everybody thought of 

taking into consideration the capabilities of the Concerto series. If you have some examples or hints it would be great.  

 

Regards,

 

Ana.

  • Hi Ana,

    so apparently your main problem now is to get both CPUs to start. (later you'll face some other problems with the ethernet, I've been fighting it for quite some time).

    but to boot both CPUs you should double check the Dual examples:

    • on M3

     // make sure C28 have a clock
    SysCtlClockConfigSet(SYSCTL_USE_PLL | (SYSCTL_SPLLIMULT_M & 0xA) | SYSCTL_SYSDIV_1 | SYSCTL_M3SSDIV_1 | SYSCTL_XCLKDIV_4);

    // Initialise the C28 core.
    IPCMtoCBootControlSystem(CBROM_MTOC_BOOTMODE_BOOT_FROM_FLASH);
    // Lock M3 until C28 is ready
    while (!IPCCtoMFlagBusy(IPC_FLAG17)) {
    }
    IPCCtoMFlagAcknowledge(IPC_FLAG17);

    • and then on C28

    // Flag to M3 that C28 up and running
    IPCCtoMFlagSet(IPC_FLAG17);

    Also remember that if you're running them from the debugger, there's the correct order to "active" them.

    • From CCSDebug view pause both cores
    • Select C28 and click 'Reset CPU'
    • Select M3 and click 'CPU Reset'
    • Select M3 again and then click  'System Reset'
    • Select C28 and click 'Restart' (it will show as running)
    • Select M3 and click 'Restart' (it will run for a second and stop at beginning of your void main()
    • still on M3 click Resume button.
    So now C28 is waiting to be activated and M3 will run and ask to activate it.
    happy coding!
  • i have the

    // Lock M3 until C28 is ready

    while (!IPCCtoMFlagBusy(IPC_FLAG17)) {
    }
    IPCCtoMFlagAcknowledge(IPC_FLAG17); on the C28 core, and

    // Flag to M3 that C28 up and running

    IPCCtoMFlagSet(IPC_FLAG17); on the M3 core.

    If i switch them, it doesn't work.

    The problem is now, that the M3 core with the ethernet part works, but the C28 get's blocked and i don't know where or why,

    when i pause it, i don't have a main, or anything, it's like i didn't load anything on the C28 core from the beginig.

  • well, if it's like it didn't load anything, maybe it didn't.

    I know that for TI libraries C28 needs to specify 'code_start' as the program entry point. Right click on the C28 project folder (inside CCS) -> properties -> build -> C2000 linker -> advanced options -> symbol management

    because as far as I understood your void main only gets called after TI libraries that are in assembly that starts in this code_start, and they stay waiting for the M3 to flag them to start to pass it to your code.

    also, you mention about using IPC to read ADC from C28 to M3 to send via Ethernet... my code is doing exactly the same thing, and this will plot to a graph once a second, so I need that constant flow of data, so to do that, I just dumped and just write directly on the shared ram and M3 is always reading from there. I guess it's just simplifies a lot of the code.

    good luck.

  • i have the code_start there......