using teraterm and adc..

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

cross mob
Anonymous
Not applicable

hello, I have a doubt .. I am working with the CY8CKIT-0420BLE  kit and the device used in my project is the CY8C4247LQI-BL483 .I am working with the ADC component and uses teraterm for recieving the commands for the ADC.

   

how do multiple pins ( say p1.4 , p3.0) serve the same functionality say uart_rx?

   

if I have connected my uart rx pin ( in the project) to p1.4 (in .cydwr) , and connect p3.0 for one ADC channel input, I assume the UART recieving will happen correctly.

   

If nothing is connected to p3.0 the teraterm works fine, but if a wire is connected between P3.0(J2) and the Gnd,and then try to read the analog channel 0(p3.0) the teraterm stops working..

   

if i repeat the same for other ADC channels, ( ADC_ch_1 at p3.1, ADC_ch_2 at p3.2) the teraterm works fine and the analog voltage is read as 0.

   

Can anyone guess what makes the teraterm stop?

   

is it because that both pins can be used as uart_rx?

0 Likes
6 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
        Post your code so we can determine what the issue is.   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

hello sir,

   

 

   

Pls find the attachment.

   

 

   

Thanks and regards,

   

NThomas.

0 Likes
Anonymous
Not applicable

If the UART is configured for SCB0 , then seems like it is better to configure the ADC pins onto the SCB1 pins.

   

P0[4],P1[4],p3[0] all uses SCB 0 , but is the routing for these pins , the same??

0 Likes
EmHo_296241
Level 5
Level 5
10 solutions authored 50 replies posted 25 replies posted

Hi Nisha,

The problem is with your ADC ISR. Go to ADC configuration and in channels tab disable saturation option for channel 0. Then everything is working fine.

 

0 Likes
EmHo_296241
Level 5
Level 5
10 solutions authored 50 replies posted 25 replies posted

Hi,

The saturation option was causing the problem.  This is from ADC component datasheet:
"Saturation
This option allows you to enable an interrupt from any channel where the result is saturated from either a conversion result of 0x0000 or the highest value for the given resolution."

So when you enabled saturation and the pin was connected to ground, the interrupt was getting triggered continuously. So the code was getting stuck at ADC ISR. This affected your UART communication. Once that option is disabled, everything is working fine.

0 Likes
Anonymous
Not applicable

Thank you for the valuable reply..

0 Likes