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.

BSP for MSP430FR5969 Microcontroller

Other Parts Discussed in Thread: MSP430FG4618, SIMPLICITI, MSP430FR5969, MSP430FR5739, CC1125

Dear All,

I am trying to port the BSP from MSP430FG4618 SimpliciTI BSP code to work for an MSP430FR5969 board, please let me know if any BSP guide is available to make porting easy.

Thanks,

Raghu Devisetti

  • I am sorry to inform you that TI does not have such a document. The beta release is available for MSP430FR5739, 461x, and 543x. My guess is that one or more of these MSP are almost identical when it comes to SPI interface and timers, and the biggest job when porting the code is to set up the IOs correctly for your HW.
    BRSiri
  • Dear Siri,

    Thanks for the info, please let me know if any link is available to get the BSP folder for MSP430FR5739.

    Thanks,

    Raghu Devisetti

  • Hi Raghu

    I was wrong when saying that MSP540FR5739 was part of the beta release, but here are the files:

    EXP430FR5739.zip

    BR

    Siri

  • Thank you very much Siri! Sorry for late response.  have done the BSP for MSP430FR5969. I could build the project with no errors.

    But I need some clarifications..

    Please let me know if the following code in the functions of bsp_board.c is ok...

    /**************************************************************************************************
    * @fn BSP_InitBoard
    *
    * @brief Initialize the board.
    *
    * @param none
    *
    * @return none
    **************************************************************************************************
    */
    void BSP_InitBoard(void)
    {
    // Disable the GPIO power-on default high-impedance mode to activate
    // previously configured port settings
    PM5CTL0 &= ~LOCKLPM5;

    /* configure internal digitally controlled oscillator */
    PJSEL0 |= BIT4; // XT1
    PJSEL1 &= ~BIT4;

    CSCTL0_H = 0xA5; // Unlock register
    CSCTL1 |= DCOFSEL_3; // Set max. DCO setting; 8Mhz
    CSCTL2 = SELA_0 + SELS_3 + SELM_3; // set ACLK = XT1; S/MCLK = DCO
    CSCTL3 = DIVA_0 + DIVS_0 + DIVM_0; // set all dividers
    CSCTL4 = HFXTDRIVE0 + HFFREQ_2;
    CSCTL4 &= ~HFXTOFF_H;

    do
    {
    CSCTL5 &= ~HFXTOFFG;
    // Clear XT1 fault flag
    SFRIFG1 &= ~OFIFG;
    }while (SFRIFG1&OFIFG); // Test oscillator fault flag
    CSCTL0_H = 0x01; // Lock Register

    /* Configure TimerA for use by the delay function */

    /* Reset the timer */
    TA1CTL |= TACLR; /* Set the TACLR */

    /* Clear all settings */
    TA1CTL = 0x0;

    /* Select the clk source to be - SMCLK (Sub-Main CLK)*/
    TA1CTL |= TASSEL_2;

    #if defined(SW_TIMER)
    #define MHZ_CLOCKS_PER_USEC BSP_CLOCK_MHZ
    #define MHZ_CLOCKS_PER_ITERATION 10

    sIterationsPerUsec = (uint8_t)(((MHZ_CLOCKS_PER_USEC)/(MHZ_CLOCKS_PER_ITERATION))+.5);

    if (!sIterationsPerUsec)
    {
    sIterationsPerUsec = 1;
    }
    #endif /* SW_TIMER */
    }

    /**************************************************************************************************
    * @fn BSP_Delay
    *
    * @brief Sleep for the requested amount of time.
    *
    * @param # of microseconds to sleep.
    *
    * @return none
    **************************************************************************************************
    */
    void BSP_Delay(uint16_t usec)
    #if !defined(SW_TIMER)
    {
    TA1R = 0; /* initial count */
    TA1CCR0 = BSP_TIMER_CLK_MHZ*usec; /* compare count. (delay in ticks) */

    /* Start the timer in UP mode */
    TA1CTL |= MC_1;

    /* Loop till compare interrupt flag is set */
    while(!(TA1CCTL0 & CCIFG));

    /* Stop the timer */
    TA1CTL &= ~(MC_1);

    /* Clear the interrupt flag */
    TA1CCTL0 &= ~CCIFG;
    }
    #else /* !SW_TIMER */
    {
    /* Declared 'volatile' in case User optimizes for speed. This will
    * prevent the optimizer from eliminating the loop completely. But
    * it also generates more code...
    */
    volatile uint16_t repeatCount = sIterationsPerUsec*usec;

    while (repeatCount--) ;

    return;
    }

    Also please let me know the following ISR is ok?

    /**************************************************************************************************
    * @fn MRFI_GpioPort4Isr
    *
    * @brief -
    *
    * @param -
    *
    * @return -
    **************************************************************************************************
    */
    BSP_ISR_FUNCTION( BSP_GpioPort4Isr, PORT4_VECTOR )
    {
    /*
    * This ISR is easily replaced. The new ISR must simply
    * include the following function call.
    */
    MRFI_GpioIsr();
    }

    Also please let me know which GPIO pin (GPIO0 or GPIO2) shall I use for SPI Rx/Tx interrupt from CC1125? For MSP430FR5739 they have used GPIO0, am I correct?

    Thanks,

    Raghu Devisetti

  • Hi

    You need to implement interrupt on GPIO0 so you need to make sure that the port/pin used on the MSP430FR5969 has interrupt capabilities.

    I do not know the MSP430FR5969 MCU so unfortunately I cannot say if your porting is OK or not.

    The best thing you can do is to use a logic analyzer or scope to see that your SPI works as expected and that you are able to receive interrupt on the pin connected to GPIO0. You also have to make sure that your timers are set up correctly to get the delays needed by SimpliciTI.

    If you have questions registering configuring the MSP430FR5969 I recommend that you post these questions in an MSP430 forum.

    BR

    Siri

  • Thank you Siri for your suggestion and clarification!

    Thanks,
    Raghu Devisetti