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/PGA900EVM: interrupts handler

Part Number: PGA900EVM

Tool/software: Code Composer Studio

hello,

I'm trying to run your example code "PGA900FirmwareGeneric-1p5" but the interrupts are never activated and consequently the functions
interrupt void PADC_Handler (void) and interrupt void TADC_Handler (void) are never executed.


Can you give me some indication of what to check?

Thanks

  • Hello Claudio,

    Please see the Interrupt_Reset_Init() function in the PGA900_isr.c file. In here you can see that the P and T ADC interrupts are disabled by default. You will need to enable them by calling the ADC_PCHANNEL_ENABLE() and ADC_TCHANNEL_ENABLE() functions.

    Regards,
  • Hello Scott,

    I have seen the function
    Interrupt_Reset_Init() and
    ADC_PCHANNEL_DISABLE() which is (PADC_CONFIG &= ~ADC_ENABLE)
    ADC_TCHANNEL_DISABLE() which is (TADC_CONFIG &= ~ADC_ENABLE)
    ADC_PCHANNEL_ENABLE() which is (PADC_CONFIG |= ADC_ENABLE)
    ADC_TCHANNEL_ENABLE() which is (TADC_CONFIG |= ADC_ENABLE)

    I don't understand why despite the fact that a temperature measurement needs to be made the interrupt vector is set as
    /*
    * Enable NVIC interrupts
    * NVIC interrupt for external interrupt 1 i.e. TADC is disabled
    */
    NVIC_ENABLE0 = 0xFFFFFFFD;

    I modified it in the following way
    NVIC_ENABLE0 = 0xFFFFFFFF;


    but the interrupt enabling, which you indicate, is done at the end of the function
    CFG_Peripheral_Config ()
    {
    ..

    /* Initialize P channel ADC */
    ADC_Pchannel_Config(ADC_ENABLE | ADC_DECI_RATE_128US |
    ADC_INT_RATE_EVERY_SAMPLE, 0);

    /* Initialize T channel ADC */
    ADC_Tchannel_Config(ADC_ENABLE | ADC_DECI_RATE_128US |
    ADC_INT_RATE_EVERY_SAMPLE, T_GAIN_5_V_V);

    ADC_Config(ADC_CFG_1_ADC_ENABLE); /* ADC is enabled */
    }

    using the debugger i can see that the value of the registers PADC_DATA1/2 e TADC_DATA1/2 varies.
    This means that the PADC and TADC devices are working.
    However, the functions
    interrupt void PADC_Handler(void) {..} and
    interrupt void TADC_Handler(void) {..}
    are not executed.

    There is something else I am not considering?

    Thanks
  • Hello Claudio,

    Sorry for the delay. I haven't had the time yet to go into this in detail. I will get back to you by the end of the week, the 10th.

    Regards,
  • Hi Claudio,

    We are currently in the process of adjusting our support model for the PGA900, and which includes limiting our support of firmware development and algorithm requests on E2E to what is available in the documentation on www.ti.com.

    Since we have already been working on this before the support change, I will contact you through private message to continue this discussion.

    Regards,