Hello,
I downloaded the MSP430F5529 errata sheet here:
and I guess there´s a mistake in it:
Rev K and Rev I Dies have the same TLV Hardware Revision (18h).
If I read out my devices I get 18h for Rev I and 19h for Rev K, wich makes sense to me.
Hello,
I downloaded the MSP430F5529 errata sheet here:
and I guess there´s a mistake in it:
Rev K and Rev I Dies have the same TLV Hardware Revision (18h).
If I read out my devices I get 18h for Rev I and 19h for Rev K, wich makes sense to me.
hi
Can any one suggest me how to interface dust sensor with msp430fr5969 .I have done with the code but even though there is no dust, control is moving to isr .I have connected dust sensor output pin to 4.3 of msp430fr5969
Hello! I'm using MSP-EXP432P401R Rev 2.0 Launchpad and Sharp96 LCD CapTouch BoosterPack. I want to read 4 ADC inputs and display the voltages on the screen. The inputs I'm reading:
A14 - P6.1
A13 - P4.0
A11 - P4.2
A9 - P4.4
I noticed that after initializing the LCD, I get noise on the ADC inputs (after conversion, it is around 150-300mV on A14 and A13, and 10-30mV on A9; A11is clean). More exactly, this noise appears after the LCD enable pin is configured as an output (P4.1 - A12). I commented out all other lines and saw that this was causing it and I think that other configurations could also cause it. I mention that I get the same noise with and without the booster pack connected.
I have to do averages before displaying the values read (after 100 averages I get around 150mV on A14 and 160mV on A13). Doing more averages does not improve the final value.
Is this noise normal? What could be causing it? Why is A11 unaffected? Is the noise related to the fact that P4.1 is also an ADC input? Is the noise transmitted somehow through the ADC module?
Also, I noticed that when applying, using a jumper wire, 3.3V from the board to one of the ADC pins I'm reading, I get an influence on other pins when nothing is connected to them (e.g., when applying 3.3V to A9, I read A9 correctly, but A11 reads 150-200mV and A13 reads 10-20mV). I sometimes get 0V as expected, but most of the times it behaves as described above.
Is this influence normal? What could be causing it?
I hope someone will help me.
Thank you,
Cristian M.
Hi All,
We had to change our chips since we ran out of memory so I have had to report the whole code from MSP430FR4133 over to MSP430FR6989 and SPI is the last thing that I need. Doesn't make sense as to why it's working perfectly fine on the 4133 but on 6989 SPI receives only 255. At least now I figured out that I ported everything right but I am not getting anywhere.
I've spent a lot of time trying to figure out why my SPI transmit perfectly well but the receive just receives 255. After creating a small snippet of the SPI and using a SPI example from TI, I figured out why my SPI wasn't working properly. Once I got the snippet to function and work as expected, I migrated the code over into my project file and found that it was doing the same exact thing as before. So then I went back to my snippet with the working SPI, and just copied some of the initialization of the registers I am using over to see if there was an issue there. And sure enough, it was the LCD initialization that was giving me the error.
I read a similar issue on E2E and the person just took out the LCD initialization and left in SPI. But that doesn't work for me since I am needing both. I have also read this forum and they got theirs to work. But I am not using any graphic library to control my LCD. I just would like to see an example of how to overcome this hurdle. I have been on this for a few days now and am needing to wrap this project up for the company.
#include <msp430.h> #include "driverlib.h" #include <LCD_china_large.h> #include <time.h> //#define FRAM_TEST_START 0x1800 volatile double Ctr=0; // Loop counter: volatile! volatile unsigned char pos; // saves the position of the LCD Char volatile signed int Ctr1; // ones place volatile signed int Ctr2; // Tens place volatile signed int Ctr3; // hundreds place volatile signed int Ctr4; // thousands place volatile signed int Ctr5; // hundred thoundsands place volatile signed int Ctr6; // one million place volatile signed int Ctr7; // One hunderd Million volatile signed int Ctr8; // Billion volatile signed int Ctr9; volatile signed int Ctr10; volatile signed int Ctr11; volatile signed int Ctr12; void LCD_print(void); //Print to the LCD void Menu_select(void); // Lets you change the numbers on the LCD void Menu_setup_Cust(void); //Sets up the Customer difinable settings void Menu_setup_NorGas(void); // Set up the NorGas difinable settings void Main_Menu(void); void LCD_Calulate(void); // Does the calculations for the LCD to Print Disects a number into parts that the LCD can print void Calculate(void); // Disects a number into parts that the LCD can print old version void clearLCD(void); // Clears the LCD sets it back to zeros void GPIO (void); // Sets up all the GPIO void password(void); //Manages the Passwords for the Customer and Norgas Menus void setup(void); //Main setup for the Micro and LCD display void reed_relay_reader (void); // Reads the input maginet from the meter void LPS25H_read(void); // Reads the input from the atmosphereric sensor void T_select(void); //Lets user select either C or F for the temp void P_select(void); // Lest User select either Fixed or Live pressure -- This will become automatic. void pulse_select(void); // Lets user select the output Pulse ratio void RTD_reader(void); // Reads the temp probe in the meter void pressure_sensor_reader(void); //Reads the pressure sensor in the meter void ADC_channel_Read(void); // sets up the ADC 0 channel void pluse_out (void); // Sends the pluse out void corrected_reading(void); // Calculates the corrected value void nav_switch_top_row(void); // Use the nav switch to go to the top LCD functions void Fixed_Pressure(void); // Print the fixed pressur e setting on the LCD void Live_Pressure(void); // Prints the Live Pressure and the designator at top of LCD void ATM_Pressure(void); // Prints the ATM and the designator at top of LCD void Temperture(void); // Prints the Temp and the designator at top of LCD void Correction_Factor_row(void); // Calculates the Correction Factor void uncorrected_row(void); // Prints the uncorrected value and the designator at top of LCD void Pluse_value_row(void); // Prints the Pulse value and the designator at top of LCD void Calculate_Battery(void); // Calculates battery percentage void Over_Flow_Error(void); // Send over flow error and store void Input_Meter_Size(void); // Inputs maximum flow void Calculate_Frequency(void); // Get Frequency void Battery_Select(void); // Customer chooses to look at battery life void Replace_Battery(void); // Warns battery level is low void O_Flow_Select(void); // Customer chooses to see over flow void CFH_Select(void); // Customer chooses to see CFH reading void Read_Pulse(void); void Init_Timer(void); // Initialize timer void Capture_Pulse(void); // Capture pulse from hall sensor void Select_Input_Pulse(void); // Select the input pulse void Timer_Delay(void); // Timer is used for delay void Timer(void); volatile signed int Stop=0; // Don't know if this is used now volatile int Buttonflag =0; //Don't know if this is used volatile double Total=0; volatile double RTDtemp; //Stores the value for the RTD temp sensor volatile double RTDtemp_1; volatile double TempCal; //Stores the value for the calculated temp volatile double Select; volatile int select_count=0; volatile int Temp_units; // Stores the value for the Temp units that was chosen. volatile int Pressure_units; //Stores the value for the pressure units that was chosen. volatile int fixed_factor; // Not used now, but check volatile int fixed_pressure=0; // used to store the value of the Fixed pressure value from the Customer Menu volatile double pulse_factor=0; // Sets the Pulse output value volatile double input_pulse_factor = 0; // Sets the input pulse value volatile int Pluse_Count=0; // Sets the pluse output value volatile int selected_number; volatile int uncorrected_count=0; volatile int Status=0; volatile double pressure_atu; volatile double pressure_mbar; volatile double count; unsigned int RXData =0; unsigned int TXData=0; volatile signed long pressure_out_xl=0; volatile signed long pressure_out_l=0; volatile signed long pressure_out_h=0; int Timerflag = 0; //set in interrupt for 1 second timer volatile signed long temp_out_l=0; volatile signed long temp_out_h=0; volatile signed long temp_count=0; volatile double TC=0.0; volatile double TF=0.0; volatile int mask=0; volatile int negflag=0; volatile double R_pressure=0; volatile double R_pressure_1=0; volatile int store_count; volatile int LCD_Flow; // LCD Flow indicator flag volatile double Fp=0.0; // corrected factor for pressure volatile double Ft=0; // corrected factor for temp volatile double Correction_Factor=0; volatile double corrected_count; volatile int set_top_row=0; volatile int holdmem; volatile int nav_switch_actived=0; volatile int timeout=5; volatile int pulse_input=1; volatile int voltage_ref; // Voltage reference volatile double battery_voltage; // Gets battery voltage volatile int battery_percentage; // Percentage of battery volatile int tens_digit; // Gets ten digit of the battery percentage volatile double ones_digit; // Gets ones digit of the battery percentage volatile int display_battery = 0; // Displays battery for customer volatile int flag_battery = 0; // Flags battery if battery level gets too low volatile double calculated_frequency; // Get frequency from pulse volatile int o_flow_ctr = 0; // Over flow counter volatile int ACFH; volatile int CFH_Max; // ACFH * 25% volatile int input_pulse; // Selected input pulse volatile unsigned int new_cap=0; volatile unsigned int old_cap=0; volatile double cap_diff=0; volatile unsigned int diff_array[2]; // RAM array for differences volatile unsigned int capture_array[2]; // RAM array for captures volatile unsigned char cap_index=0; volatile unsigned char cap_count = 0; volatile unsigned int calculated_array; volatile unsigned int index; volatile int hall_sensor_flag = 0; // Flag if hall sensor is triggered //unsigned long *FRAM_write_ptr; unsigned int ADC_Results[4]; // 10-bit ADC conversion result unsigned char i; #define INTERVAL_TIME 4096 #define CS BIT4 #define CLK BIT5 #define MISO BIT0 #define MOSI BIT1 //**************************************************** int main( void ) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer // Configure GPIO P1SEL1 |= BIT5 | BIT4; // Configure slave select and clk P2SEL0 |= BIT0 | BIT1; // Configure SOMI and MISO // PJSEL0 |= BIT4 | BIT5; // For XT1 GPIO_setAsOutputPin(GPIO_PORT_P1,GPIO_PIN4); // Disable the GPIO power-on default high-impedance mode to activate // previously configured port settings PM5CTL0 &= ~LOCKLPM5; // XT1 Setup /* CSCTL0_H = CSKEY >> 8; // Unlock CS registers CSCTL1 = DCOFSEL_0; // Set DCO to 1MHz CSCTL1 &= ~DCORSEL; CSCTL2 = SELA__LFXTCLK | SELS__DCOCLK | SELM__DCOCLK; CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // Set all dividers CSCTL4 &= ~LFXTOFF; do { CSCTL5 &= ~LFXTOFFG; // Clear XT1 fault flag SFRIFG1 &= ~OFIFG; }while (SFRIFG1&OFIFG); // Test oscillator fault flag CSCTL0_H = 0; // Lock CS registers */ // Configure USCI_A0 for SPI operation UCA0CTLW0 = UCSWRST; // **Put state machine in reset** // 4-pin, 8-bit SPI master UCA0CTLW0 |= UCMST | UCSYNC | UCCKPL | UCMSB | UCMODE_1 | UCSTEM; // Clock polarity high, MSB UCA0CTLW0 |= UCSSEL__SMCLK; // ACLK UCA0BR0 = 0x02; // /2 UCA0BR1 = 0; // // UCA0MCTLW = 0; // No modulation UCA0CTLW0 &= ~UCSWRST; // **Initialize USCI state machine** UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt P8SEL0 = 0xE0; // Enable A/D channel inputs P8SEL1 = 0xE0; ADC12CTL0 = ADC12ON+ADC12MSC+ADC12SHT0_2; // Turn on ADC12, set sampling time ADC12CTL1 = ADC12SHP+ADC12CONSEQ_1; // Use sampling timer, single sequence ADC12MCTL0 = ADC12INCH_5; // ref+=AVcc, channel = A0 ADC12MCTL1 = ADC12INCH_6; // ref+=AVcc, channel = A1 ADC12MCTL2 = ADC12INCH_7; // ref+=AVcc, channel = A2 ADC12MCTL3 = ADC12INCH_3+ADC12EOS; // ref+=AVcc, channel = A3, end seq. ADC12IER0 = 0x08; // Enable ADC12IFG.3 ADC12CTL0 |= ADC12ENC; // Enable conversions // Configure reference // PMMCTL0_H = PMMPW_H; // Unlock the PMM registers // PMMCTL2 |= INTREFEN; // Enable internal reference // __delay_cycles(400); // Delay for reference settling // __no_operation(); P1OUT = 0; P1DIR &=~ BIT7; // Pulse input (P1.7) P1SEL0 |= BIT7; // Connect to timer // Initialize LCD segments 0 - 21; 26 - 43 LCDCPCTL0 = 0xFFFF; LCDCPCTL1 = 0xFC3F; LCDCPCTL2 = 0x0FFF; // L0~L26 & L36~L39 pins selected while(1) { LPS25H_read(); } } void LPS25H_read() // Ambient pressure and temp reading { //************************************ setup ****************************** // set up registers in LPS25H __delay_cycles(2); // Set low P1.7 SSN (active Low) GPIO_setOutputLowOnPin(GPIO_PORT_P1,GPIO_PIN4); TXData=0x20; // Ctrl1 UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission TXData=0x84; // turn on PD set to one shot turn on BDU UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission // SSN P1.7 high GPIO_setOutputHighOnPin(GPIO_PORT_P1,GPIO_PIN4); __delay_cycles(2); // Delay before next transmission GPIO_setOutputLowOnPin(GPIO_PORT_P1,GPIO_PIN4); __delay_cycles(2); // Delay before next transmission // //******************************** end********************************* //********************************* read ************************************** GPIO_setOutputLowOnPin(GPIO_PORT_P1,GPIO_PIN4); TXData=0x21; // CTRL2 UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission TXData=0x01; // One Shot read UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission // SSN P1.7 high GPIO_setOutputHighOnPin(GPIO_PORT_P1,GPIO_PIN4); __delay_cycles(2); // Delay before next transmission // Set low P1.7 SSN (active Low) GPIO_setOutputLowOnPin(GPIO_PORT_P1,GPIO_PIN4); TXData=0xE8; // read setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission TXData=0xff; // Init setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission // pressure_out_xl = RXData; pressure_out_xl=(RXData >> 1); TXData=0xff; // Init setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission pressure_out_l=(RXData << 8); TXData=0xff; // Init setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission pressure_out_h=(RXData); pressure_out_h = (pressure_out_h << 16); count = pressure_out_h | pressure_out_l | pressure_out_xl; pressure_mbar = (count / 4096); pressure_atu = pressure_mbar * 0.0145038; //*********************** temp ******************************* TXData=0xEB;// read setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission TXData=0xff;// Init setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission temp_out_h=(RXData << 8); TXData=0xff;// Init setting UCA0IE |= UCTXIE; // Enable TX interrupt __bis_SR_register( GIE); // Enter LPM0,enable interrupts __no_operation(); // For debug,Remain in LPM0 __delay_cycles(2); // Delay before next transmission temp_out_l=(RXData); mask=temp_out_h && 0x8000; temp_count= temp_out_h | temp_out_l; if (mask == 1) { temp_count=-(temp_count^0xFFFF); } TC = 42.5+(temp_count/480); TF = TC*1.8+32.0; } ////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////// Interrupts ////////////////////////////////// //****************************************************************************************** // This is the SPI send/receive interrupt service routine //****************************************************************************************** #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=USCI_A0_VECTOR __interrupt void USCI_A0_ISR(void) #elif defined(__GNUC__) void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void) #else #error Compiler not supported! #endif { switch(__even_in_range(UCA0IV,USCI_SPI_UCTXIFG)) { case USCI_NONE: break; // Vector 0 - no interrupt case USCI_SPI_UCRXIFG: RXData = UCA0RXBUF; UCA0IFG &= ~UCRXIFG; __bic_SR_register_on_exit(GIE); // Wake up to setup next TX break; case USCI_SPI_UCTXIFG: UCA0TXBUF = TXData; // Transmit characters UCA0IE &= ~UCTXIE; break; default: break; } }
If I comment out this section here
// Initialize LCD segments 0 - 21; 26 - 43 LCDCPCTL0 = 0xFFFF; LCDCPCTL1 = 0xFC3F; LCDCPCTL2 = 0x0FFF; // L0~L26 & L36~L39 pins selected
I get the receiving results as expected. If I leave that there, receiving buffer always receives 255.
I know there is a conflict with the LCD output segment (which I am not using only for SPI) but can't figure out how to use both at the same time. By the way, I'm using the launchpad right now.
Cassandra
Hi,
I need to retrieve the HEX file from a couple of MSP432 boards. I need to compare them to each other to confirm that data obtained with each board uses the same firmware version. Is there a way to do this via CCs V6?
Thanks,
-Edgar
Hello,
I examined the wakeup from LPM3.5 and found the first 0x200 bytes of SRAM bank0 memory was cleared or wrote by someone as bellow.
The variable of data and data0 are incremented at lpm3_5 wakeup, but data is cleared while data0 is retained.
My test condition is the following.
MSP-TS432PZ100, XDS100v2, CCSv6.2.0 + TI v16.6.0 STS, executing low power running, and attached test code
(Please visit the site to view this file)
Best regards,
Kazuo Yamauchi
When I download the MSP430FR6972 by BSL, the first time can successly download ,but the second time download the same chip is failure. After the first time downloading ,the power is on .But if I power down after every downloading, the subsequent download can success. Why?
Can you help me in programming MSP430F5528 for SPI configuration?
Hi all,
I need to store a large array of bytes (4ko) in my MSP430F247, to do a fixed lookup table.
The elements of this table will be access in read mode only, they are never updated (write access) by the main program.
I think the code to define the lookup table will be like this:
lookup_table DW 0,145,255,123,147,111,12 ;... (up to 4ko!!!) (please correct me if I'm wrong)
How can I proceed in assembler to choose the best memory location to store this fixed huge array?
Note that I don't use C, only assembler.
Thanks in advance for your help.
Kind regards.
Hi TI team,
Where I can get the gerber file for MSP 430F6736 EVM Energy meter.
Can you support on this item.
Regards
Khidhir
Hi, everyone!
I'm new to TI microcontrollers and having a bit simple problem. I'm using a MSP430FR5969 evaluation board and the single channel ADC is working fine, but can't get to work multiple channel at the same time. Also couldn't find any example.
There is 4 different mode:
- Single channel
- Sequence of channels
- Repeated single channel
- Repeated sequence of channels
I was trying the first two of these in while loops, but only single channel worked.
What I'm asking for is a simple example of any mode that can get me multiple channel ADC sampling.
Looking forward to your replies!
Regards,
Béla.
Hello everyone!
Can anyone provide example code about msp430f5529 launchpad with TMP006EVM?
thank you!
uart mode with smclk ,9600 baud rate,over baud rate generation
P1SEL0 = RXD + TXD; // primary module function selection TXD= BIT0 & RXD =BIT1
P1DIR = RXD + TXD;
working in loopback mode but data is not transmitted ovet txd pin
Please suggest modifications
Hi,
We want to force the MSP430F5514 start address(.cinit section) to a fixed address
and with some testing we found that below code in the linker command file forces
the start address to the necessary address.
Please let us know if this is the proper procedure and if there is any other
settings available in CCSv6 to fix the start address.
boot > 0xXXXX
{
/* -l rts430xl.lib<boot.obj>(.text) */
-l rts430xl.lib<boot_special.obj>(.text:_isr)
}
Best Regards
Kummi
Dear Sir/Madam,
We are developing a project using MSP430G2553. while uploading the program we got a error message. Herewith I attached the image of error we got. Schematic is cross verified with launch pad. There is no difference between the schematic. So kindly help us to solve the issue. What are all the possibilities of problem will come while upload the program. how to rectify those problems.
Hello!
I have developed simple board with MSP430F5310 in 48-pin package, whic have ADC in 3-wire SPI attacher to MCU and external interface to mainboard with 4-wire slave SPI. The problem is USCIB1 and USCIA1 is sharing STE and CLK ports with each over, so I cannot use STE for USCIA1 in slave SPI mode simultaneousely with USCIB1. What is the solution for this?
Can I reconfigure PM for some pins to USCIA0 and use it instead as it does not shared with USCI(A/B)1 ?
Thank you!
Hi
I'm trying to start my first example on MSP430FR5739 using blinking led code . When I debug and run the code this message is displayed and the LED is not
blinking
MSP430: There were 70 (code) and 66 (data) bytes written to FLASH/FRAM. The expected RAM usage is 160 (uninitialized data + stack) bytes.
what this message means and how can I fix it ?
Thanks for help
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR |= BIT0;
P1OUT |= BIT0;
while(1)
{
P1OUT ^= BIT0;
__delay_cycles(100000);
}
}
Hello, I was wondering if it would be possible to use a TI launchpad to evaluate code I intend to write for the MSP430F247 (a 64 pin package).
I was wondering if any of the evaluation boards other (and preferably cheaper) than the 64 pin one would be compatible with this microcontroller.
Hi,
New to the MSP430 Launchpad and code composer studio, which seem to be both awesome.
However I'm having an issue when I try to run this bit of code on my MSP430FR6989 Launchpad (See code and screenshot below).
So the issue appears to be that I cannot store an unsigned char value on my mcu with a value greater than 127 (which should be the upper limit for the signed char, which I have tested numerous times now, it stores numbers exactly like signed char), signed char works perfectly though, any thoughts?
I have an application for the MSP432 of putting Forth on it. I will be writing it in assembler. Is there assembler documentation? Also I will be using your FATFS file system which I believe was written by someone outside of TI. FATFS requires the user to write the interface between FATFS and the USB or SDCARD. Does TI have the code for using it with the SDCARD with SPI? Thank you for your help. Alvin...