You are here

using teraterm and adc.. | Cypress Semiconductor

using teraterm and adc..

Summary: 6 Replies, Latest post by NishaThomas on 11 Jan 2017 07:07 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
NishaThomas's picture
User
5 posts

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?

 

user_242978793's picture
User
1280 posts

Post your code so we can determine what the issue is.

NishaThomas's picture
User
5 posts

hello sir,

 

Pls find the attachment.

 

Thanks and regards,

NThomas.

NishaThomas's picture
User
5 posts

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??

 

user_411084576's picture
User
34 posts

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.

 

user_411084576's picture
User
34 posts

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.

NishaThomas's picture
User
5 posts

Thank you for the valuable reply..

 

Log in to post new comments.