Hi David,
Yes, you should be able to use MSP430F5335.
For porting please refer to the "Hardware Porting Guidelines.pdf" available in the Documentation folder of the SDK V1.4 (CC256X BT\CC256x MSP430 Bluetopia SDK\v1.4\Documentation)
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Other Parts Discussed in Thread: MSP430F5335, MSP430WARE, MSP430BT5190, MSP430F5438A
Hi,
1)
Is there a difference in how comparator in msp430 works when the uC VDD is connected to 3.3V or 1.8V?
2)
Can I generate 7.3728 Mhz CLK with DCO?
And then use it for 115200 boud?
3)
I want to use 1.8V for msp430.
Datasheet says that when i flash uC it needs 3.3V.
I can get 3.3V from JTAG during flash.
Do I need a jumper to switch between 1.8V working and 3.3V flashing or is there a better way?
Regards,
David.
ZeroD said:Can I generate 7.3728 Mhz CLK with DCO?
You can try to software-calibrate DCO for particular frequency with precision which is ok for UART, however you shall refer to DCO specs to see that it is temperature-dependent and most likely will drift away. So you shall consider runtime DCO recalibration.
Also you shall check your chip datasheet, recommended operating conditions for supply voltage versus clock frequency. msp430 does not support >6MHz for 1.8V supply so if you use >6MHz DCO freq then make sure to divide MCLK clock so it does not exceed 6MHz.
ZeroD said:Do I need a jumper to switch between 1.8V working and 3.3V flashing or is there a better way?
AFAIK most msp430's flash works downto 2.2V. You can always find "better way", but which exactly is better way depends on application and it's requirements which you don't specify.
Hi Ilmars,
Tnx for replay.
I'm going to use MSP430F5335 for BT stack.
Baud for uart between host MSP430 and BT module is 115200.
Tabele for 7.3728 MHz http://www.wormfood.net/avrbaudcalc.php
Ilmars said:You can try to software-calibrate DCO for particular frequency with precision which is ok for UART, however you shall refer to DCO specs to see that it is temperature-dependent and most likely will drift away. So you shall consider runtime DCO recalibration.
Also you shall check your chip datasheet, recommended operating conditions for supply voltage versus clock frequency. msp430 does not support >6MHz for 1.8V supply so if you use >6MHz DCO freq then make sure to divide MCLK clock so it does not exceed 6MHz.
http://www.ti.com/lit/ds/symlink/msp430f5335.pdf
In datasheet on page 53.
Ilmars said:AFAIK most msp430's flash works downto 2.2V. You can always find "better way", but which exactly is better way depends on application and it's requirements which you don't specify.
ZeroD said:Page 42 in datasheet marked in red, flash works with 1.8V?
You are correct. I made wrong assumption about chip you are using. You better look page 75, "Flash Memory" specs. Thou table tells same 1.8V supply voltage.
ZeroD said:In datasheet on page 53. DCORSELx=2,DCOx=31,MODx=0 MAX=7.38MHz
Yes. It is said that using those settings you will get frequency somewhere inbetween MIN and MAX frequencies, nearly octave range :D Nothing close to precision needed for UART. That's why you shall calibrate DCO using watch crystal as reference or use external HF oscillator. BTW using modulator you can get correct UART baudrate even using "inconvenient" 10MHz or other crystal freq's.
ZeroD said:What about the comparators in MSP430F5335, is there a difference if they work on 1.8V or 3.3V?
What's written in the datasheet?
Hi Ilmars,
Flash memory 1.8V on page 75 also says 1.8V, but what is with JTAG spy by wire? (page 75)
The TEST CONDITIONS field in table.
Ok so the Max frequency on 1.8V is 8MHz? (Page 43)
I can use DCO to get 7.38MHz frekquency but I have to do calibratoin(with XT1 32kHz or REFO?) from time to time or I can use XT2?
Are there some examples code to do the calibration?
Ilmars said:Yes. It is said that using those settings you will get frequency somewhere inbetween MIN and MAX frequencies, nearly octave range :D Nothing close to precision needed for UART. That's why you shall calibrate DCO using watch crystal as reference or use external HF oscillator. BTW using modulator you can get correct UART baudrate even using "inconvenient" 10MHz or other crystal freq's.
Modulator?
Comparator.
It says on page 72 that it can work on 1.8V but i don't understand what is with accuracy?
Regards,
David.
ZeroD said:Ok so the Max frequency on 1.8V is 8MHz? (Page 43)
Yes. Datasheet says so.
ZeroD said:I can use DCO to get 7.38MHz frekquency but I have to do calibratoin(with XT1 32kHz or REFO?) from time to time
Yes, You can use XT1 32KHz as reference. REFO error itself is +/- 1.5% so using it for calibration is not that good idea. Then you have better chances to NOT use calibration but factory DCO calibration constants. Or as you metntion use XT2 with proper quartz.
ZeroD said:Modulator?
Yes. USART in UART mode have clock fractional modulator which gives you possibility to produce standard UART baud rates out of virtually any source clock frequency. Please refrer to x5xx series User's Guide, " 34.3.9 UART Baud-Rate Generation" chapter.
ZeroD said:It says on page 72 that it can work on 1.8V but i don't understand what is with accuracy?
Accuracy on page 72 is specified for whole supply voltage range, 1.8V to 3.6V
Hi Ilmars,
I have downloaded MSP430Ware but there aren't any examples for MSP430F5335.
Are there somewhere else som code examples? (maybe Driver lybrary) but iI'm using IAR not CCS.
I use will use Comparator_B , and I wat to compere to my generated reference voltage 143.5mV
Regards,
David.
Unless one also operates the MSP far apart from room temperature, this is usually fine enough for UART operation. of course UART modulation error adds to the REFO error and the FLL modulation jitter.Ilmars said:You can use XT1 32KHz as reference. REFO error itself is +/- 1.5% so using it for calibration is not that good idea.
Keep in mind that 8MHz DCO frequency means that some DCO cycle swill be lower and some be higher frequency. And higher is outside the specs. With lowest core voltage, you shouldn't go much above 7MHz.
The 5x family has no factory calibration constants. The 'calibrated' part is the REFO, in conjunction with the FLL.Ilmars said:Then you have better chances to NOT use calibration but factory DCO calibration constants.
Hi Jens,
What do you suggest to use to generate 7.38MHz System frequency? (Vdd=1.8V)
Best for uart baud 115200 low cost ?(it is for BT module connection to PAN1323)
In table on page 53 says min=3.17 and max=7.38 I thougth with some sort of calibration or FLL I can get the 7.38MHz not 8MHz.
or use XT2=7.3728?
ZeroD said:I have downloaded MSP430Ware but there aren't any examples for MSP430F5335.
Are there somewhere else som code examples? (maybe Driver lybrary) but iI'm using IAR not CCS.
I use will use Comparator_B , and I want to compere to my generated reference voltage 143.5mV
Are there some example codes?
Regards,
David.
ZeroD said:In table on page 53 says min=3.17 and max=7.38 I thougth with some sort of calibration or FLL I can get the 7.38MHz not 8MHz.
Forget about DCO which I mentioned forgetting (again) about x5xx series you use. Check FLL clock generator and it's use.
ZeroD said:Are there some example codes?
Most probably yes. You shall check http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/msp430_software_landing.page
If you can't find your chip, then look into similar series. If series examples not present, then check other examples of other chips having peripheral of interest.
I did not know particular page, just used search. BTW good thing. Before asking 3rd time you can use it either :)
Hi Ilmars and Jens,
I looked into FLL and the CLK setup.
There are two ways i considered, using XT1 crystal or REFOCLK.
First the FLL configuration to get 7.3728MHz:
DCORSELx=2
DCOx=31
MODx=0
DISMOD=0
SCG0=0
SCG1=0
FLLREFDIV=000b(n=1)
FLLN=0011100000b(N=224)
FLLD=000b(D=1)
Using the formala from http://www.ti.com/lit/ug/slau390b/slau390b.pdf:
fDCOCLK=D x (N+1) x (fFLLREFCLK / n )
fDCOCLKDIV=(N+1) x (fFLLREFCLK / n )
I get fDCOCLK = fDCOCLKDIV = 7.3728MHz if using XT1 or REFOCLK = 32.768kHz.
Then for:
FLL clk select FLLREFCLK
SELREF=000b,001b(XT1CLK) or 010b,011b,100b(REFOCLK)
ACLK
SELA=000b(XT1CLK) or 010b(REFOCLK)
MCLK
SELM=011b(DCOCLK) or 100b(DCOCLKDIV)
SMCLK
SELS=011b(DCOCLK) or 100b(DCOCLKDIV)
Is that correct?
How can I calculate the error for using XT1 or REFOCLK?
Regards,
David.
ZeroD said:Can you pleas check this?
No, thanx. What we do when we have doubts - perform tests. Write code, compile it and try - it works as expected or not. If I need to know frequency of some clock, I route it out of chip on clock_out pin or using timer and measure it using scope or better freq counter. If I need to know - UART will work or not, I don't ask others to verify my code I just compile it and test myself.
Did you test? What kind of results you got?
Hi Ilmars,
Ilmars said:Did you test? What kind of results you got?
This will cause a DCO failure. DCOx=min or max make the clock module assume that the FLL has driven the DCO to the limit of the current DCORSEL setting. Of course the DCO doesn't fail in the sense of not oscillating. But this 'fault' condition it prevents you from switching any clock to external crystals - you cannot clear OFIFG then and all clocks remain in fallback state.ZeroD said:DCOx=31
The 5335 doesn't come with a BT stack license (at least for the MindTree BT stack). The library will only run on the MSP430BT5190.ZeroD said:I'm going to use MSP430F5335 for BT stack.
However...
DCORSEL_2 won't work. The datasheet tells for DCORSEL_2 and DCO_31 that the resulting frequency will be between 3.17 and 7.38MHz. Worst case, you'll only get 3.17MHz with this as maximum.
To find the proper range, check the max value for DCO_= and the min value for DCO_31. This means the FLL will be able to reach any (average) frequency between these two by changing DCOx. Add some safety margin so you won't end up with DCO_0 or DCO_31 to not trigger a fault.
IN your case, DCORSEL_4 or DCORSEL_5 seem to fit.
Hi Jens,
So I only set the DCORSEL_ and not the DCO_ and MOD_ because they change during FLL?
I think DCORSEL_4 is good MAX DCO_0=3.2MHz, MIN DCO_31=12.3MHz (desired clk = 7.3728MHz).
Jens-Michael Gross said:The 5335 doesn't come with a BT stack license (at least for the MindTree BT stack). The library will only run on the MSP430BT5190.
MindTree is Obsulute http://www.ti.com/tool/mt-bt-sdk.
I'm using Bluetopia form Stonestreet One.
MSP430BT5190 is NRND ant they say to use MSP430F5438A, but it has no comparator and MSP430F5335 has one.
Sundeep Mandava said:Hi David,
Yes, you should be able to use MSP430F5335.
For porting please refer to the "Hardware Porting Guidelines.pdf" available in the Documentation folder of the SDK V1.4 (CC256X BT\CC256x MSP430 Bluetopia SDK\v1.4\Documentation)
Thanks for posting on TI E2E forum. We appreciate your feedback!Sundeep.
Regards,
David.
ZeroD said:MindTree is Obsulute http://www.ti.com/tool/mt-bt-sdk.
I'm using Bluetopia form Stonestreet One.
Does the BlueTopia stack come as precompiled library? If not, you might require a full license of CCS or IAR to link it. In this case, the MindTree stack could be still useful.
They are the same chips except for n undisclosed difference that is used to verify the Mindtree License.ZeroD said:MSP430BT5190 is NRND ant they say to use MSP430F5438A,
**Attention** This is a public forum