cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

 Hi,

   

I am using a filter in PSOC 5, but I am unable to run/build it (i am not using a DMA).

   

 

   

the console says 'undefined reference to `Filter_Write24''

   

 

   

Filter_1_Start();

   

Filter_Write24(Filter_CHANNEL_A,ADC_sampleValue);

   

 

   

where ADC_sampleValue is a 32 bit uint, and Filter_CHANNEL_A is a uint8 type(how to set this?, ive only declared the variable as a uint8 type), and i have included the following header files:

   

#include <device.h>

   

#include "stdio.h"

   

#include "stdlib.h"

0 Likes
Reply
3 Replies
ETRO_SSN583
Esteemed Contributor

Should -

   

 

   

Filter_Write24(Filter_CHANNEL_A,ADC_sampleValue);

   

 

   

be typed as -

   

 

   

Filter_1_Write24(Filter_CHANNEL_A,ADC_sampleValue);

   

 

   

Each time you place a module it's name is generated, and unless you edit the

   

name, all its API's are given that name in their given name.

   

 

   

Regards, Dana.

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

Note this includes auto generated constants, check to see if the "Filter_CHANNEL_A" in

   

 

   

Filter_1_Write24(Filter_CHANNEL_A,ADC_sampleValue);

   

 

   

should be typed as

   

 

   

Filter_1_Write24(Filter__1_CHANNEL_A,ADC_sampleValue);

   

 

   

You would check the .h applicable file.

   

 

   

Regards, Dana.

0 Likes
Reply
Anonymous
Not applicable

 Remember the explanation for second parameter of Filter_Write24() API - "Value to be written to the input register represented in 2’s complement".

   

 

   

If you are transferring 20 bit single ended ADC data, then you need to modify. If it is a differential ADC data, then no problem.

0 Likes
Reply