Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

TI MSP430F5438 Code Composer Studio : Single Stepping Vs Free run with breakpoints.

Status
Not open for further replies.

tarun0xe

Member level 2
Member level 2
Joined
Jul 25, 2011
Messages
47
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Location
India
Activity points
1,812
Hello friends, I am writing the code for Texas Instrument's MSP430F5438 on Code Composer Studio V 5.5. I have multiple channels that I have to connect to single ADC input pin,one by one in sequence, to read the voltage across resistors connected at those channels. If no resistor is connected at any channel, I get the fixed voltage across protection zeners(around 2.36V). The ADC is programmed in 'single-channel single conversion' mode, i.e it reads only single pin and provides the data at only single memory location from where I am copying it into array. The flow is like this :

1.A timer interrupt(50ms) starts the process,select sample index.
2.Select the channel to be connected to ADC input pin.
3.Wait for some time to get channel selection MOSFET settled.
4.Start ADC conversion.
5.In ADC ISR, read the conversion data from memory location into array.
6.Select next channel to be connected to ADC input pin.
7.Follow same procedure for single sample index for 16 channels and after that wait for next timer interrupt(50ms) to select next sample index of channels and so on.

When I single-step through the code during debugging everything works alright, the array has relevant counts. But soon I run the code by putting breakpoints, lets say till sample=10, I get the counts corresponding to 'No resistor present' condition i.e corresponding to 2.36V:-(

I was suspecting that the code is trying to read pin before channel MOSFETs are settled,so all it is getting is voltage across protection zeners each time. But I increased the delay(now it is around 10usecs) after selecting channel, even then the same problem persists. please help me friends. thanks in advance .:thumbsup:
 

hello friends. it is just to update that the problem asked above has been solved so that if somebody faces a similar problem in future, this would be a help.
I used DSO, and found following results :
1. MOSFET required 12.8msec for getting turned on properly and similar delay for getting turned off.
2. output of channel was followed by an amplifier, whose output is further followed by a filter(an integrator) that further introduced some delay, so once we apply signal to Gate pin of selection MOSFET, it was taking around 39.6msec to appear at ADC input pin. i provided similar delay before reading ADC data, and now results are coming properly.
3. further, after we switch off selection MOSFET, it takes around 55ms for the voltage at ADC input to finally come down to zero. i provided this delay, between turning off current MOSFET and turning on next, to avoid any short condition. so its all working good now. and yes DSO was a good friend through all of this. thanks for your time.;-) :thumbsup:
 

Hello!

I'm quite familiar with the 5438, but you post is confusing.
You say you use single pin single channel conversion and apparently you use multiple channels.
What is this mess? If you have, say 4 channels, why not using adc0, 1, 2, 3?
Or do you have more channels than pins (i.e. more than 12 analog channels) and you have to
multiplex them? How many analog channels do you use?
It looks like there is a design problem.

Dora.
 

Is mSec actually are uSec? You are talking about very long delays!
 

hi Dora.

yes according to design, the board has more than 16 temperature sensors connected, and we have to read voltage across all of them in a sequence. we could have used at least 15 adc channels in single-sequence mode, but only single adc channel pin was available for connecting different sensor inputs as other adc channel pins were being used for other purposes. so only thing one could do, is to connect one sensor input to adc channel(only A7 it was), read voltage across it, then connect next sensor and so on. and that's why i had to use 'single-channel single conversion' mode. although the problem is resolved. and it was not a code problem. thanks.

hi ALERTLINKS, no mSec is mSec..... but i wrongly mentioned it as 'turn-on' and 'turn-off' time. it was between 'gate pin' of mosfet and output of amplifier following that mosfet. so that delay was introduced by amplifier. thanks for pointing that out.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top