1 Reply Latest reply on May 19, 2016 10:06 AM by user_1377889

    How to read status register for Filter Ch A and ChB?

    user_504416177

      Hello Every one,

         

      I want to send data from Filter Ch A and B to VDAC using interrupt.

         

      My code is presented below

         


      CY_ISR(filterVDAC)
      {
          // Convert the 2's complement value to an unsigned 8-bit value.
          //The VDAC expects an unsigned 8-bit value as input.
          if(Filter_SR_REG)
          VDAC_ChA_SetValue(Filter_Read8(Filter_CHANNEL_A) + 128u);
          VDAC_ChB_SetValue(Filter_Read8(Filter_CHANNEL_B) + 128u);
      }

         


      int main()
      {
          
       
          /* Start all components used on schematic */
          
          // Excitation Sheet
          WaveDAC_Excitation_Start();
          
          // Amplification Sheet
          isr_StartEx(filterVDAC);
          ADC_ChA_Start();
          ADC_ChA_IRQ_Start();
          ADC_ChA_StartConvert();
          ADC_ChB_Start();
          ADC_ChB_IRQ_Start();
          ADC_ChB_StartConvert();
          VDAC_ChA_Start();
          VDAC_ChB_Start();
          Filter_Start();
          
          // Reference_Voltage Sheet
          OP_Ref_ChA_Start();
          OP_Ref_ChB_Start();
          

         

          /* User-implemented function to set-up DMA */
          DMA_ADC_ChA_Config();
        
          DMA_ADC_ChB_Config();

         


          /* Enable Global Interrupts */

         


          CYGlobalIntEnable;

         

          for(;;)
          }
          }
      } /* End of main */

         

       

         

       

         

       

         

      My Question is How i can put filter status register for channel A and B that i can read and decide which interrupt has fired or rather which channel is ready to read data off.

         

      Regards
      Awais