Using CY8C20236, How can I use both CSD and ADC ?

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

cross mob
peya_1337906
Level 2
Level 2
Distributor - Weikeng(GC)
10 sign-ins 5 replies posted 5 questions asked

Hi all,

      When I use PSoC1 CY8C20236, I added both the CSD module and ADC module in the project.  The project can compile normally, but it not working properly.  If add "ADCINC_Start(ADCINC_INPUT_ANALOG_BUS); " in the main.c,  or other ADC API.  The CSD can not work normally.    How to use the two module at the same time?

Perry

0 Likes
1 Solution
peya_1337906
Level 2
Level 2
Distributor - Weikeng(GC)
10 sign-ins 5 replies posted 5 questions asked

Hi Sampath Kumar,

    Thanks for your reply.  I try to switch between CSD and ADC like the AN2104, but have the following errors about EZI2C .   Now I have solved the problem by switch the analog MUX BUSdirectly,  like this:

//ADC

MUX_CR0 &= ~0b00010000;     //disconnect P0_4 capasense sensor from the mux bus.

MUX_CR2 |= 0x20;  //connect p2_5 to the mux bus 

ADCINC_1_Start(ADCINC_1_INPUT_ANALOG_BUS);

......

ADCINC_1_Stop();

MUX_CR2 &= ~0x20;  //disconnect p2_5 from the mux bus

MUX_CR0 |= 0b00010000; //connect P0_4 to mux bus.

pastedImage_1.png

Best Regards,

Perry

View solution in original post

0 Likes
3 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Perry,

Kindly note that CSD and ADC modules are firmware modules that work on the same block in the chip. Dues to this reason, either of CSD or ADC can be used for continuous operation, but not both at the same time. If you want to switch between CSD and ADC, (only one module works at a given time), you can use dynamic reconfiguration, Kindly refer to AN2104 - PSoC® 1 - Dynamic Reconfiguration with PSoC Designer™ for further information about dynamic reconfiguration.

Best regards,

Sampath Kumar

0 Likes
peya_1337906
Level 2
Level 2
Distributor - Weikeng(GC)
10 sign-ins 5 replies posted 5 questions asked

Hi Sampath Kumar,

    Thanks for your reply.  I try to switch between CSD and ADC like the AN2104, but have the following errors about EZI2C .   Now I have solved the problem by switch the analog MUX BUSdirectly,  like this:

//ADC

MUX_CR0 &= ~0b00010000;     //disconnect P0_4 capasense sensor from the mux bus.

MUX_CR2 |= 0x20;  //connect p2_5 to the mux bus 

ADCINC_1_Start(ADCINC_1_INPUT_ANALOG_BUS);

......

ADCINC_1_Stop();

MUX_CR2 &= ~0x20;  //disconnect p2_5 from the mux bus

MUX_CR0 |= 0b00010000; //connect P0_4 to mux bus.

pastedImage_1.png

Best Regards,

Perry

0 Likes

Hello Perry,

Do kindly create another thread for the EzI2C linker error.

Best regards,

Sampath Selvaraj

0 Likes