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.

CCS/TMS320F28379D: #TMS320F28379D #C2000 WARE #IPC #BOOT

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I am trying to synchronize both my CPU01 and CPU02 using the IPC flags .I am running both the codes on their respective RAMs.The problem is the below line 

 IpcRegs.IPCSET.bit.IPC17 = 1;  

is not getting set to one , that is IPC17 bit is not getting set to one in CPU02 code .

i have attached both codes below .

adc_epwm_cpu01.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// Included Files
//
#include "F28x_Project.h"
#include "F2837xD_Ipc_drivers.h"
#define REFERENCE_VDAC 3
#define REFERENCE_VREF 2
#define DACA 1
#define REFERENCE REFERENCE_VDAC
#define CPUFREQ_MHZ 200
#define DAC_NUM DACA // pin no 30
void ConfigureADC(void);
void SetupADCContinuous(Uint16 channel);
void configureDAC(Uint16 dac_num);
interrupt void cpu_timer0_isr(void);
volatile struct DAC_REGS* DAC_PTR[4] = {0x0,&DacaRegs,&DacbRegs,&DaccRegs};
Uint32 samplingFreq_hz = 5000;
float freqResolution_hz = 0;
float cpuPeriod_us = 0;
Uint32 interruptCycles = 0;
float interruptDuration_us = 0;
float samplingPeriod_us = 0;
//
// Main
//
void main(void)
{
//
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
//
InitSysCtrl();
//
// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
//
InitGpio();
//
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
//
DINT;
//
// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.
//
InitPieCtrl();
IpcRegs.IPCCLR.all = 0xFFFFFFFF;
PieCtrlRegs.PIEIER1.bit.INTx13 = 1; // IPC0 ISR
IER |= 0x0001; // Enable INT1 in IER to enable PIE group 1
//
// Disable CPU interrupts and clear all CPU interrupt flags:
//
// IER = 0x0000;
IFR = 0x0000;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

adc_epwm_cpu02.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// Included Files
//
#include "F28x_Project.h"
#include "F2837xD_Ipc_drivers.h"
#define REFERENCE_VDAC 3
#define REFERENCE_VREF 2
#define DACB 2
#define REFERENCE REFERENCE_VDAC
#define CPUFREQ_MHZ1 200
#define DAC_NUM1 DACB // pin no 70
void ConfigureADC1(void);
void SetupADCContinuous1(Uint16 channel1);
void configureDAC1(Uint16 dac_num1);
interrupt void cpu_timer1_isr(void);
volatile struct DAC_REGS* DAC_PTR[4] = {0x0,&DacaRegs,&DacbRegs,&DaccRegs};
Uint32 samplingFreq_hz1 = 5000;
float freqResolution_hz1 = 0;
float cpuPeriod_us1 = 0;
Uint32 interruptCycles1 = 0;
float interruptDuration_us1 = 0;
float samplingPeriod_us1 = 0;
//
// Main
//
void main(void)
{
InitSysCtrl();
DINT;
// Disable CPU interrupts
InitPieCtrl();
// Initialize the PIE control registers to their default state.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Regards,

Ashwin

  • Ashwin

    Is it not functionally working as expected? Your usage looks correct.
    If you're looking at the IPCSET register, you won't see it set to 1. The set will be reflected in the IPCFLG register.

    Best regards
    Chris
  • Christopher,

    I checked the IPCFLG register as suggested but there is no change .

    My Build and Debug process is as follows:

    1) In the Project Explorer window click on the adc_epwm_cpu01 project to set it active. Then click the Build button and watch the tools run in the Console window. Check for any errors in the Problems window. Repeat this step for the adc_epwm_cpu02 project.

    2) Again, in the Project Explorer window click on the adc_epwm_cpu01 project to set it active. Click on the Debug button (green bug). A Launching Debug Session window will open. Select only CPU1 to load the program on (i.e. uncheck CPU2), and then click OK. The CCS Debug perspective view should open, then CPU1 will connect to the target and the program will load automatically.

    3)The Debug window reflects the current status of CPU1 and CPU2.

    4) Next, we need to connect to and load the program on CPU2. Right-click at the line “Texas Instruments XDS100v2 USB Emulator_0/C28xx_CPU2” and select Connect Target.

    5) With the line “Texas Instruments XDS100v2 USB Emulator_0/C28xx_CPU2” still highlighted, load the program: Run - >Load -> Load Program…
    Browse to the file : C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\dual\adc_epwm\cpu02\ccs\CPU2_RAM\adc_epwm_cpu02.out and select
    OK to load the program.

    6)Again, with the line “Texas Instruments XDS100v2 USB Emulator_0/C28xx_CPU1”highlighted, set the bootloader mode using the menu bar by clicking:
    Scripts -> EMU Boot Mode Select ->EMU_BOOT_SARAM
    Use the same procedure above to set the bootloader mode for CPU2.



    Is anything wrong in the Build and Degub procedure?

    Run procedure:
    7) In the Debug window, click on the line “Texas Instruments XDS100v2 USB Emulator_0/C28xx_CPU1”. Run the code on CPU1 by clicking the green Resume button. At this point CPU1 is running.

    8)In the Debug window, click on the line “Texas Instruments XDS100v2 USB Emulator_0/C28xx_CPU2”. As before, run the code on CPU2 by clicking the Resume button.


    Regards,
    Ashwin
  • Ashwin

    Nothing seems incorrect about your procedure. You've stepped through the code and you don't see it set when you do that?
    What if you try setting IPC17 using the "all" type or use driverlib? Ex: IpcRegs.IPCSET.all |= 0x20000;

    Best regards
    Chris
  • Hi,
    Christopher

    I tried the changes told by you , but it reflects no changes .
    But ,
    I get this: Break at address "0x3fec52" with no debug information available, or outside of program code.
    while i try to connect target for the CPU02 , does that have anything to do with the IPC flags not being enabled (just asking out of curiosity ).

    Thanks and Regards,
    Ashwin
  • Ashwin

    I couldn't say, but doubt it has to do with the IPC flags.
    Are you able to run successfully the IPC example from C2000Ware?
    Load code to CPU1 and CPU2. Then reset CPU2 via CCS and run CPU2. Then run CPU1.

    Best regards
    Chris
  • Chris,

     Are you able to run successfully the IPC example from C2000Ware?

    No the IPC examples are not working.

     

    Regards,

    Ashwin

  • Ashwin

    What behavior are you seeing?
    If CPU1 is getting stuck waiting for CPU2 to "boot", make sure to load code to CPU2 and then reset it, run it. Then run CPU1, this will then command CPU2 to boot.

    Best regards
    Chris
  • Ashwin

    I haven’t heard from you for 2 weeks, so I’m assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

    Regards,
    Chris