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.

Halcogen V4.02 PCNT Problem

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

Hi,

I am using TMS570LS3137 to capture frequency with FREERTOS, this is done by using and Halcogen v3.02 and CCS V5.0. now i upgraded to Halcogen v4.02 and CCS v6.01  but from this version i am not able to capture the frequency.

is there any changes in selection process in halcogen as comapre to old version?

only difference i observed that HR clock is different.

Please give solution.

Regards,

Chethan kumar

  • Hi Chethan,

    I don't think that anything in the HET code has changed, and this is what will be performing the frequency measurement.
    I don't have HalCoGen v3.02 installed anymore. Maybe you could do a diff for us on the file 'het.c' especially the array that starts here:

    /** @var static const hetINSTRUCTION_t het1PROGRAM[58]
    * @brief Default Program
    *
    * Het program running after initialization.
    */

    static const hetINSTRUCTION_t het1PROGRAM[58U] =
    {
    ....

    }

    This is where the HET program that performs the capture function is actually stored (in binary format).

    I don't think you'll find a difference though.

    What does the failure look like ? (I mean, when you say it's no longer working, where do things break down? Are you using interrupts but no longer getting the interrupt for example?)
  • Hi Anthony,

    Thank you for your response.

    only 2 changes i have seen in both versions.

    Halcogen V4.02

    1. 

    typedef volatile struct hetInstructionBase
    {
    uint32 Program;
    uint32 Control;
    uint32 Data;
    uint32 rsvd1;
    } hetINSTRUCTION_t;

    2. HR Clock 90.00MHz, LR Prescale 7

    Halcogen V3.02

    1. 

    typedef volatile struct hetInstructionBase

    {
    uint32 Program;
    uint32 Control;
    uint32 Data;
    } hetINSTRUCTION_t;

    2. HR Clock 80.00MHz, LR Prescale 6

    and when i compile it will give 5 warnings in sys_link.cmd file this is already discussed with onother thread.

    Problems:

    1. When i call the function it result will be always zero and this is happen only in freertos

    My Code :


    static void vTask_FOR4 (void *pvParameters){

    hetSIGNAL_t Capture;
    char data[40];

    (void ) pvParameters;

    capGetSignal(hetRAM1,cap0,&Capture);
    hetInit();
    for(;;)
    {
    capGetSignal(hetRAM1,cap0,&Capture);
    sprintf(data,"%f\n\r",Capture.period);
    UART_SendString(data);

    }

    }

    but this is work in Halcogen V3.02.

    Regards,

    chethan kumar

  • Hi Chethan,

    Are you configuring the task as Privileged Task?

    hetInit() needs the task to be in "privileged mode". It would be better to call hetInit() before starting the scheduler.

     

    Regards,

    Vineeth