Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I have an MSP430EXP5739 board and the MSP430FR5739 failed so I thought that I would cut off the FET-UIF and use it communicate to other MSP430 samples that I had received. Starting with the MSP430G2231; I was unable to communicate to the FET-UIF. Does anyone have any ideas :?:
  2. TimGS

    I/O Stuck High

    I am 90% sure it is an MSP430FR5739 that is installed on the MSP-EXP430FR5739 board. XMS vs MSP Would that make a difference?
  3. TimGS

    I/O Stuck High

    I am experiencing what I think is a failed MSP430FR5739. P1.1 is has 3.3vdc measured at the P1.1 pin on the MSP-EXP430FR5739 board when I set P1.1as an input with a pulldown resistor enabled... the same on P2.5 void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT // compare input P1DIR = 0x00; P1OUT = 0x00; P1REN = 0xFF; __no_operation(); // Break for debug } Looking for an opinion...What do you think? :problem:
  4. To summarize: When writing to flash: *Data must be written in Blocks *Blocks must be zeroed to prevent damage before writing to prevent damage When using FRAM processors you are already using non-volatile memory. FRAM is a nonvolatile storage memory that retains its data even after the power is turned off. http://www.ti.com/rfid/govid/fram.shtml I guess I should have read more about the processor I was using before using it. :crazy: http://www.ti.com/tool/msp-exp430fr5739
  5. RobG, Yes Non-Volatile is what I needed and I had it all along. Had I not initialized my all variables early on in my code I might have accidentally found that out. Rockets4kids, Thank You for your reply and your warning. I did not know that I could cause physical damage. I have other MSP430 processors as well that I have been playing with and I will be sure to zero the flash location (blocks) first.
  6. Thank You again definitely more elegant. :thumbup: I was just reading the FRAM MSP430FR5xx Family Users Guide ...slau272.pdf FRAM is Non-Volatile memory. I am going to have to rethink my approach. Thanks again
  7. Thank You RobG That simple circuit you have created is an excellent idea; thank you for sharing. I am a Newb; so please bear with me. When you declare ... unsigned int * const savedDataPtr = (unsigned int *)(0x1000); ...Are you telling the compiler where to store the saved data to flash? I have 5 variables I want to store to flash. Do I have to map out my flash first? As in the following Code Example Start.... Please note the following is not syntactically correct. #include "msp430g2231.h" //default data unsigned int data1=1; unsigned int data2=2; unsigned int data3=8; unsigned int * const savedDataPtr1 = (unsigned int *)(0x1000); unsigned int * const savedDataPtr2= (unsigned int *)(0x1001); unsigned int * const savedDataPtr3 = (unsigned int *)(0x1002); void main(void) { WDTCTL = WDTPW + WDTHOLD; //Max Value 0xFF used to indicate uninitialized data if(*savedDataPtr1 < 0xFF){ data1 = *savedDataPtr1; //Use value stored in flash } if(*savedDataPtr2 < 0xFF){ data2 = *savedDataPtr1; //Use value stored in flash } if(*savedDataPtr3 < 0xFF){ data3 = *savedDataPtr1; //Use value stored in flash } _bis_SR_register(GIE); while(1) { //Wait for user input } P1OUT ^= BIT0; } } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { //I plan to use a button push to enter the data into flash memory // Save value...I will make this a function call void SaveToFlash(savedDataPtr, data) FCTL2 = FWKEY + FSSEL0 + FN1; FCTL1 = FWKEY + ERASE; FCTL3 = FWKEY; *savedDataPtr = 0; FCTL1 = FWKEY + WRT; *savedDataPtr = data; FCTL1 = FWKEY; FCTL3 = FWKEY + LOCK; P1IFG &= ~BIT1; } I am using an EXP430FR5739. How did you determine what Flash memory location to use? Thank You for your help
  8. I am looking for a way to store user modifiable setup variables that can be modified then stored in flash so that they can be used to return the project to the user defined setup after power has been removed (Power Up Condition). Dummy Code Example: uint_8 NumberOfSensors; //User Defined; number of sensors/markers on the rotating axis 1-255 unint_8 FunctionToGetUserDefinedNumberOfSensors(NumberOfSensors); void FunctionToStoreNumberOfSensorsToFlash(NumberOfSensors); I am programing in C. Thank You For helping me to learn :geek:
  9. I have the display working now. Removing the UCTXIE from my code did the trick. I am going away for >week on vacation and I want to cleanup it up a bit before I post it (get rid of some of the debug fluff). I will post the code for the display when I return. I am sure it isn't much different than anyone else's as far as initializing the display goes. I already had this code working with a UCI-SPI interface on an MSP430g2452; the code is very similar but you have to keep track of the register counter because the SPI is not double buffered.
  10. This is for a EA DOGM163x-A display... When I finally get this "tach project" working I will post the most interesting parts of the code using code tags; I didn't know I had too or how to but I will learn too
  11. I removed the UCA0IE |= UCTXIE; and everything seemed to work fine. I will have to review how GIE and UCTXIE and USCI interfaces work.
  12. I am using the MSP430fr5739 Master SPI 3-Wire interface for communicating (tx only) to an LCD. I have found that when I initialize the LCD my code works fine until I send a LPM0 + GIE command or just a GIE then the USCI just hangs. _bis_SR_register(LPM0_bits + GIE); I exit the LPM mode using LPM0_Exit SPI init code... //============================================================================================================= // includes //============================================================================================================= #include "msp430fr5739.h" #include "msp430fr5739_SPI.h" //============================================================================================================= // Functions //============================================================================================================= void spiMasterInitialization(void){ P1SEL0 &= ~BIT5; //P1.5 UCA0CLK P2SEL0 &= ~(BIT0 + BIT1); //P2.0 UCA0SIMO P2.1 UCA0SOMI P1SEL1 |= BIT5; //P1.5 UCA0CLK P2SEL1 |= BIT0 + BIT1; //P2.0 UCA0SIMO P2.1 UCA0SOMI Not used UCA0CTLW0 |= UCSWRST; //USCI held in reset state during initialization UCA0CTLW0 |= UCCKPL + UCMSB + UCMST + UCSYNC; UCA0CTLW0 |= UCSSEL_1; //ACLK UCA0BR0 = 0x0; // UCA0BR1 = 0; // UCA0MCTLW = 0; //No modulation UCA0CTLW0 &= ~UCSWRST; //USCI reset released after initialization UCA0IE |= UCTXIE; } ======================= I am sending data out at a pretty slow rate so I thought that I would monitor the output using LEDs in the ISR... ======================= #pragma vector=USCI_A0_VECTOR __interrupt void USCI_A0_ISR(void) /* 0xFFF0 USCI A0 Receive/Transmit */ { switch(__even_in_range(UCA0IV,0x04)) { case 0: break; //0: No Interrupt Pending case USCI_SPI_UCRXIFG: //2: Data Received break; case USCI_SPI_UCTXIFG: //4: Transmit buffer empty PJOUT ^= LED4; // PJ.3 toggle every clock overflow PJOUT ^= LED3; // PJ.2 toggle every clock overflow break; default: for (;{} //Failure Loop Forever } } ==================== The following is what I used to send the data via the SPI to the LCD.... ==================== void mcpWriteSPI2LCD(DOGM *lcd, uint8_t data, uint8_t command) { mcpPortWrite(lcd->_csb_port, lcd->_csb_portNumber, LOW);//Write if(command){ mcpPortWrite(lcd->_rs_port, lcd->_rs_portNumber, LOW); } else { //data mcpPortWrite(lcd->_rs_port, lcd->_rs_portNumber, HIGH); } //PJOUT ^= LED3; // PJ.1 toggle every clock overflow //PJOUT ^= LED4; // PJ.0 toggle every clock overflow delayMilliseconds(10); //loop delay to be optimized out while(!(UCA0IFG & UCTXIFG)){ //While UCA0TXBUF is not ready, wait =================== "I have been hanging here if I envoke the GIE because UCTXIFG in the UCA0IFG register=0" =================== //wait for buffer to empty } UCA0TXBUF = data; //copy data to USI Low Register delayMilliseconds(10); //loop delay to be optimized out mcpPortWrite(lcd->_csb_port, lcd->_csb_portNumber, HIGH);//Deselect LCD to be optimized out } ===================== Does anyone have any suggestions? Thank You
  13. Thank you for your help... View>Debug helped me see the start arrow and since then I have created a number of small programs... msp430g2452 to DOGM LCD/HD44780 via SPI/8-bit Parallel/4-bit Parallel msp430g2452 to PC via SW UART over the launchpad's USP The only issue I run into now is when the program is in LP mode while waiting for an interrupt; if I cancel the debug session the CCS v4 hangs.
  • Create New...