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.

MSP430F5438A: Any MSP430F5438A Example C/C++ Programs for the TI Smart RF Transceiver Evaluation Board?

Part Number: MSP430F5438A


Hello,

I am working with TI "Smart RF Transceiver Evaluation Board Rev 1.7" and it has MSP430F5438A Micro Controller.

This board has Break out I/O ports 1 to 10 and each of these ports has 8 GPIO holes (total 80 holes for header pins) on this PCB.

Are there any MSP430F5438A C/C++ example programs and tutorials that illustrate how to use these Ports and GPIO pins that are on this PCB board?

Please let me know the folders/subfolder & paths to the C/C++ code that use USB, UART, SPI etc.

Thanks and best regards,

SSJ

  • Is there any another TI board that I can purchase and connect to these break out ports and see outputs signals from these ports and receive/read inputs from these ports please?

    Thanks,

    SSJ

  • Hi Swamy,

    Regarding your first question, there a several examples using the GPIO pins for this device in the TI Resource Explorer (or TIREX as we like to refer to it).  The link below should take you right to examples for the MSP430F5438A device.

    https://dev.ti.com/tirex/explore/node?node=AP7gpEq4Q6jtlePRvD9mrw__IOGqZri__LATEST&search=msp430f5438a

    Here is an example from the TIREX.  It monitors bit 4 on port P1 and toggles bit 0 depending on the state of bit4.

    #include <msp430.h>
    
    int main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
      P1DIR |= 0x01;                            // Set P1.0 to output direction
    
      while (1)                                 // Test P1.4
      {
        if (0x010 & P1IN)
          P1OUT |= 0x01;                        // if P1.4 set, set P1.0
        else
          P1OUT &= ~0x01;                       // else reset
      }
    }

    Here is another example that introduces how to use the interrupt feature of the GPIO pin.

    #include <msp430.h>
    
    int main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
      P1DIR |= 0x01;                            // Set P1.0 to output direction
      P1REN |= 0x10;                            // Enable P1.4 internal resistance
      P1OUT |= 0x10;                            // Set P1.4 as pull-Up resistance
      P1IE |= 0x10;                             // P1.4 interrupt enabled
      P1IES |= 0x10;                            // P1.4 Hi/Lo edge
      P1IFG &= ~0x10;                           // P1.4 IFG cleared
    
      __bis_SR_register(LPM4_bits + GIE);       // Enter LPM4 w/interrupt
      __no_operation();                         // For debugger
    }
    
    // Port 1 interrupt service routine
    #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
    #pragma vector=PORT1_VECTOR
    __interrupt void Port_1(void)
    #elif defined(__GNUC__)
    void __attribute__ ((interrupt(PORT1_VECTOR))) Port_1 (void)
    #else
    #error Compiler not supported!
    #endif
    {
      P1OUT ^= 0x01;                            // P1.0 = toggle
      P1IFG &= ~0x010;                          // P1.4 IFG cleared
    }

    Now, for you second question, yes.  There are dozens of different MSP430 launchpads, but you will need to program them to monitor your IO pins.  In my opinion that is a lot more work than getting the GPIO on your device to work.

    There are examples for various communications interfaces, such as SPI, UART, and I2C.

  • Hello Dennis,

    Thank you very much for the excellent information and the link to MSP430F5438A examples.

    I am marking this question as resolved.

    I have a related questions please:

    Following is the URL you have provided for Register Level Examples:

    https://dev.ti.com/tirex/explore/node?node=AMG0G4bDkAUNjJAhdKxRYA__IOGqZri__LATEST&search=msp430f5438a

    Is there way to select all the C programs and copy them to a folder on my laptop please?

    Again, many thanks for providing help very quickly.

**Attention** This is a public forum