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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into the filter datasheet. Search for "poll" to get all the information for polling for results ready.

   

 

   

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into the filter datasheet. Search for "poll" to get all the information for polling for results ready.

   

 

   

Bob

0 Likes