Post Go back to editing

Eval-ADuCM355 Interrupts in sample code are never executing

Category: Software
Product Number: ADuCM355
Software Version: aducm355-examples

Hey,

i'm trying to test the functionalities of the aducm355 with the code examples. I haven't modified the code in any way.

I tried the following code examples:

- Temperatur

- Impedance (for this sample i connected some resistors on the interface)

An interrupt should occur and data should be printed out, but as soon as the function "AD5940_GetMCUIntFlag()" get called the return value stays 0 all the time. So i guess the interrupt never occurs? 

Is this behaviour intended?  Do i have to modifiy the example code so the interrupt get executed? 

Thanks for any help

Shaheen

Thread Notes

Parents Reply
  • Within the Keil IDE I added file AD5490_Polling.c instead of AD5490_ADCMeanFIFO.   That is all I did.  It looks like these two files are interchangeable.  

    I did a build using the ADC5490_ADCMeanFIFO as the source file then ran it again and still, I have the same issue.   This issue is the AFEINTSRC_DATAFIFOTHRESH is never set.

    Infact the register REG_INTC_INTCFLAG1 is always a value of 0x61.   The interrupts are enabled but the flags never get set.   What is going on here?

Children
  • Hi,

    As mentioned above, you will have to run in debug mode with breakpoints to check if ADC5490_ADCMeanFIFO .c is entered and executed. 

  • I am running in debug mode.   That is how I was able to see that interrupt register is stuck at 0x61

  • Hi,

    The examples work properly in our ADuCM355QSPZ boards.

    Kindly check if interrupt lines are correctly configured so the microcontroller receives the interrupt properly.

  • The example works straight from GitHub in my setup. 

    It might be that they are missing the CHIPSEL_M355 definition in IAR’s Options > Runtime Checking > C/C++ Compiler > Preprocessor > Defined Symbols

    If CHIPSEL_M355 is not defined, the code will not execute lines below that shift the register address to the correct location.

    #ifdef CHIPSEL_M355

    static void AD5940_D2DWriteReg(uint16_t RegAddr, uint32_t RegData)

    {

      if(((RegAddr>=0x1000)&&(RegAddr<=0x3014)))  /* 32bit register */

        *(volatile uint32_t *)(RegAddr+0x400c0000) = RegData;

      else                                        /* 16bit register */

        *(volatile uint16_t *)(RegAddr+0x400c0000) = RegData;

    }

     

    static uint32_t AD5940_D2DReadReg(uint16_t RegAddr)

    {

      if(((RegAddr>=0x1000)&&(RegAddr<=0x3014)))  /* 32bit register */

        return *(volatile uint32_t *)(RegAddr+0x400c0000);

      else                                        /* 16bit register */

        return *(volatile uint16_t *)(RegAddr+0x400c0000);

    }

    regards,

    Mark