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.

F28M35x Lab without Experimenter's Kit

Other Parts Discussed in Thread: CONTROLSUITE, TMDSDOCKH52C1, TMDSDOCK28027

I apologize if this question is a bit basic, but I am just getting started on TI microcontrollers.

I have a Concerto F28M35H52C1 Concerto control card, and am working through the labs in this workshop: http://processors.wiki.ti.com/index.php/F28M35x_Workshop

However, the workshop requires the experimenter's kit, which is no longer available, and I only have the control card. This has only come up so far in Lab 4, where I must measure a pin-out with a scope. The program outputs a PWM to GPIO0, but as far as I can tell GPIO0 is not available on the control card. So, my question is:

1. Is the GPIO0 pin broken out somewhere on the control card? Schematics 0572.Schematic.pdf do not seem to show it.

2. Otherwise, how can I assign the ePWM1 output to a different pin in the code? Or is it fixed to GPIO0?

Thanks,

Any help is greatly appreciated.

EDIT:

Is changing the ePWM1A assignment based on just changing this line?

GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1;

How is this assigned to ePWM1A by that line? Does ePWM1A just correspond to the first ePWM assignment in the code?

Even after making this change, as well as assigning the pin to the C28 from the M3 via the GPIOPinConfigureCoreSelect function, I can't observe any signal on the header pin.

  • Hi,

    Pin no.23 on DMM-100 is  PA0_GPIO0; also pin no. 5 on controller.

    You can find all the sample codes in controlSuite. Try them out :)

    Regards,

    Gautam

  • An added note:
    The F28M35x Experimenter Kit (TMDSDOCKH52C1) should again be available for purchase in several weeks.

    -Brett

  • The Pin on the DIMM-100 is not very convenient, as I either have to go build a breakout board to access it, or attach a DIMM-100 connector and haphazardly try to contact the pin, without any way of securing the contact. It's doable for briefly looking at one signal, but since I will need to measure multiple signals, this is not workable in general.

    Are you talking about the pin on the controller IC? That's a tiny pin on a quad flat package - no way to probe that.

    I was hoping to simply reroute the ePWM outputs to a different GPIO pin in the code, one that is broken out in the header on the control card. These are shown in the schematic I attached under "Connectivity Mux". I tried doing so, as shown in my code example above, but I can't get it to work. Any help with this would be appreciated.


    Re: Brett: Thanks for that, but I can't wait that long.

  • Also, I in trying to probe the ePWM1a output on the DIMM-100 connector, I get the following output at 50% duty cycle. Does anybody know why it looks like this? It almost looks like the signal decays to zero over each square wave.

  • Michael,

    Using GPIO-06 should be an option.  Note that according to the pinout in the datasheet (see page 78 of the datasheet), GPIO-06 cannot output PWM1A.  However, it can be attached to PWM4A.

    Link to datasheet:
    http://www.ti.com/lit/ds/symlink/f28m35h52c.pdf

    This will mean that some software changes will be needed:
    1) Any code relating to PWM1 and PWM1A should be changed to reference PWM4 and PWM4A respectively.
    2) Any mentions of GPIO00 should be changed to GPIO06.  This would apply to both the M3 and C28x projects for you F28M35x device.

    ---

    Also note that the Docking Station motherboard in most Experimenter Kits is identical (assuming that the controlCARD described in the kit description says that the controlCARD has 100 pins, is described as DIM100, or similar). 

    If you could buy an F28027 Experimenter Kit (TMDSDOCK28027), you will get a Docking Station baseboard in this kit.  This baseboard will be compatible with your cCARD.  (the TMDSDOCK28027 is the cheapest Experimenter Kit)


    Thank you,
    Brett

  • Thanks Brett.

    That's helpful. So looking through the datasheet, it appears that the ePWM outputs are simply hardwired to particular GPIO pins?

  • Michael,

    I would phrase it a bit different, but yes.

    I would say that each GPIO has several peripheral options which it could connect to. The setting that chooses which option is the peripheral mux register. On the Concerto devices, the M3 and C28x peripheral muxes are separately configurable by each respective core. Note that the PWM module is a C28x peripheral and can be controlled by the C28x core.

    ---

    On your waveform, I would suspect that your oscilloscope is in AC-mode.


    Thank you,
    Brett

  • Thanks, that is what I mean. To restate, GPIOs are configurable, but ePWMs are assigned to particular GPIOs.

    As for the waveform, I thought that at first, but I had checked and it is not in AC coupling.

  • I just tried probing GPIO 6 with ePWM4 active, and it works (Thanks Brett).

    However, it's the same decaying signal, and the amplitudes are half of what I get by probing GPIO-0 on the DIMM100 connector. Is there an output amplifier for the DIMM 100? I don't see one in the schematic.

    I also took your advice and ordered the other experimenter's kit and will swap it in when I get it.

    EDIT: I assume the appropriate ground reference is the header pin connected to the ground symbol in the schematic (ROW B, pin 2)?

  • Michael,

    GND should be the pin on Row B that is the 2nd pin from the right.

    I can almost guarantee that the signal does not actually look like that.  Either your setup or the oscilloscope are wrong.


    Thank you,
    Brett

  • Good, so my ground is right.

    Well, I've also been talking with TI support and they don't have an idea either. I'd like to point out again that I am using the controlcard, whereas the lab uses the experimenter's kit. Perhaps there are extra hardware settings on the docking station breakout board? Any Jumpers?

  • Michael,

    How are you powering the device?
    (perhaps powering the device via J2 and providing the emulation connection via J20?)


    -Brett

  • Yes, I think that's right. Powering via microUSB attached to development computer, emulation via miniUSB also attached to development computer.

  • Wow, just tried ePWM1b, and the output looks perfect. Something wrong with the "a" side?

  • Okay I am getting somewhere, though I don't know where. With your help we may be able to get this.

    I copied the code for ePWM1 through ePWM4. I only modified the frequencies, so that I can tell them apart easily.

    Now, I can measure what I believe to be ePWM1b, ePWM2b, and ePWM3b, each of which look perfect. Nothing else looks right.

    So, a couple of questions for sanity check:

    1. If I enable ePWM1 with that exact code I posted earlier, it enables both the A and B side automatically? EDIT: Code:

    EPwm1Regs.TBCTL.all = 0;             // clear all bits in TBCTL
        EPwm1Regs.TBCTL.bit.CLKDIV = 0;     // CLKDIV = "div by 1"
        EPwm1Regs.TBCTL.bit.HSPCLKDIV = 0;    // HSPCLKDIV = "div by 1"
        EPwm1Regs.TBCTL.bit.CTRMODE = 2;     // count mode = up-down mode
        EPwm1Regs.AQCTLA.all = 0x0006;        // ZRO = set; PRD = clear
        EPwm1Regs.TBPRD = 50000;            // 1kHz PWM frequency

    2. I am measuring off the end of a DIMM-100 connector. Looks like this: http://media.digikey.com/Photos/Texas%20Instr%20Photos/MFG_DIM100.jpg

    Looking toward the end of it (sharp terminals pointing towards you), am I correct that the pinout is 1,2,3,4... down the left side, then 51,52,53... down the right side?

    I tried looking everywhere, but  can't find a definitive pinout chart.

  • Michael,

    1) If AQCTLA is being written to in software and AQCTLB is not, then I would expect to only have a PWMA output and no PWMB output.

    2) If you look at the following schematic:
    \controlSUITE\development_kits\~controlCARDs\CCF28M35xxHWdevPkg_v2\R_PWB_RevD\514982E_CONCERTO_DIMM100_RELEASE2_00_ALLEGRO_DEC_17_2011.pdf

    take a look at the upper-right hand corner of pg2.  The controlCARD could directly 'plug' into the schematic paper.  (ie pin 1 of P3 corresponds to the pin just below the FTDI chip U15 on the controlCARD)

    Hopefully this helps. 


    Thank you,
    Brett

  • Yes that helps greatly. I am close to figuring this out now.

    One more question: is there something limiting my code to only produce outputs at ePWM1-3? I copied the code for ePWM 4-6 as well, but I don't see any outputs there.

  • Some potential issues:
    1) The master M3 core hasn't given control of these GPIO over to the C28x core (m3 project)
    2) The C28x GPIO mux isn't being configured correctly (c28 project)
    3) The peripheral clocks for PWM4-6 aren't enabled (c28 project)


    -Brett

  • 1) I believe I have done this:
        GPIOPinConfigureCoreSelect(GPIO_PORTA_BASE, GPIO_PIN_0, GPIO_PIN_C_CORE_SELECT);.

    ...
        GPIOPinConfigureCoreSelect(GPIO_PORTA_BASE, GPIO_PIN_7, GPIO_PIN_C_CORE_SELECT);

    where ... is repeating it for pin 1 through 6

    2) I believe this is also done:


        GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;

    ...
        GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1;

    where ... is for pins 1 through 10

    3) Maybe this is where the problem is. The example file has "Cpu_Timer0" enabled. I don't see where this is linked to particular ePWM outputs. I'll look around in the documentation, but if you happen to know that'd be great!

  • Michael,

    1) Note that you are only configuring PWMs 1A-4B then.  You'd need to deal with pins 0-3 of PORTB in order to give the C28x core control of PWM outpus 5A-6B.

    3) If you drill into InitSysCtrl() you should find where the peripheral clocks are enabled.


    Best Regards,
    Brett

  • Yes, I actually do activate ports in PORTB, I just neglected to include them here.

    As for the peripheral clocks, I see all the ePWM module clocks enabled:

       SysCtrlRegs.PCLKCR1.bit.EPWM1ENCLK = 1; // ePWM1
        SysCtrlRegs.PCLKCR1.bit.EPWM2ENCLK = 1; // ePWM2
        SysCtrlRegs.PCLKCR1.bit.EPWM3ENCLK = 1; // ePWM3
        SysCtrlRegs.PCLKCR1.bit.EPWM4ENCLK = 1; // ePWM4
        SysCtrlRegs.PCLKCR1.bit.EPWM5ENCLK = 1; // ePWM5
        SysCtrlRegs.PCLKCR1.bit.EPWM6ENCLK = 1; // ePWM6
        SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 1; // ePWM7
        SysCtrlRegs.PCLKCR1.bit.EPWM8ENCLK = 1; // ePWM8
        SysCtrlRegs.PCLKCR2.bit.EPWM9ENCLK = 1; // ePWM9