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.

TMS320F28069: HRCAP Examples - EDIS Missing In Config Examples

Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hello All,

I've seen posts like:

And wanted to point out something I have found in the HRCAP examples that are included in C2000 Ware:

In the HRCAP2_Config() examples - the EDIS; statement is missing - and that can cause obvious problems at run-time; and I have to wonder if some of the posts asking about this are related - from one of the examples:

//
// HRCAP2_Config -
//
void
HRCAP2_Config(void)
{
EALLOW;

HRCap2Regs.HCCTL.bit.SOFTRESET = 1;
HRCap2Regs.HCCTL.bit.HCCAPCLKSEL = 1; // HCCAPCLK = PLL2CLK = SYSCLK2 x 2

#if RISETEST
//
// Enable Rising Edge Capture Event Interrupt
//
HRCap2Regs.HCCTL.bit.RISEINTE = 1;

//
// Disable Falling Edge Capture Event Interrupt
//
HRCap2Regs.HCCTL.bit.FALLINTE = 0;
#elif FALLTEST
//
// Enable Falling Edge Capture Event Interrupt
//
HRCap2Regs.HCCTL.bit.FALLINTE = 1;

//
// Disable Rising Edge Capture Event Interrupt
//
HRCap2Regs.HCCTL.bit.RISEINTE = 0;
#endif

//
// Enable Interrupt on 16-bit Counter Overflow Event
//
HRCap2Regs.HCCTL.bit.OVFINTE = 0;
}

I found this while running some of my code - I thought it was an oversight on my part - but when I looked at some other posts; I went back to the code that is posted in the examples published by TI and discovered the EDIS; command is missing.  

Anyway, an easy fix but has been obviously overlooked.  I looked at an example on one of the other parts that has the HRCAP module - that has HRCAP1_Config(); and the EDIS; statement is there - so maybe this is just on the TMS320F28069 code - but I imagine the entire code base should be checked.

Regards,
John W.

  • Hello All,

    I went back and checked the code in Control Suite v1.51 - and for the TMS320F28069 - the EDIS; command is missing in the HRCAP example code also.

    Regards,
    John W.
  • Hi John,

    Thanks for your attention and sharing this feedback. I agree that the EDIS is missing in the HRCAP2_Config(). I have filed an issue report to resolve this in the HRCAP examples.

    Just to let you know, we currently do not have plans to release newer versions of F2806x device support in ControlSUITE as it is C2000's older software package, but updated F2806x device support, with bug fixes such as this one, will be released in C2000's newer software package C2000Ware.

    Regards,
    Elizabeth
  • Hello Elizabeth,

    OK - thanks for verifying what I found.

    I'll click 'this resolved my issue' when the new C2000-Ware is released if that's OK.

    Thanks,
    John W.
  • Hi John,

    Due to some recent E2E changes, posts are now locked after a long period of inactivity. Just to let you know, the buttons on this post are unlikely to be available if you wait until after the next C2000Ware update. If you'd still like to continue this discussion at that time, please feel free to create a new post. Thanks again.

    Regards,
    Elizabeth
  • Hello Elizabeth,

    OK - this is good to know. Will be that long before the next update? Really?

    Thanks,
    John W.
  • Hi John,

    There's a C2000Ware update typically once a quarter, but not all device support packages, libraries, etc. will be updated each time. Priority is given based on new collateral and major changes.

    E2E posts will be locked after 60 days of inactivity per recent E2E changes, so that no one replies to an inactive/un-monitored post and encouraged to start new posts instead.

    Regards,
    Elizabeth
  • Hello Elizabeth,

    Just another comment about this example:

    In the ISR, for instance, why weren't the following declared as _iq:

    pulsewidthlow[datacounter] = LowPulseWidth0((Uint16 *)&HRCap2Regs);
    pulsewidthhigh[datacounter] = HighPulseWidth0((Uint16 *)&HRCap2Regs);

    Is there a reason for declaring them:

    Uint32 pulsewidthlow[5];

    and

    Uint32 pulsewidthhigh[5];

    vs:

    _iq pulsewidthlow[5];
    _iq pulsewidthhigh[5];

    ? Just wondering since they are being filled with an IQ16 formatted result.

    Thanks!
    John
  • Hi John,

    Yes, this is due to the functions in the HRCAP calibration library (LowPulseWidth0(), HighPulseWidth0) returning variables of Uint32 type, so the arrays in the example were defined to be of a consistent type with the library functions.

    Regards,
    Elizabeth