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.

MSP432P401R: I2C BSL not work

Part Number: MSP432P401R
Other Parts Discussed in Thread: MSP-FET, MSPBSL

Hi Champion

I used the BSL scripter, MSP-FET, MSP-EXP432P401R to test I2C BSL function.

I connected MSP-FET SDA, SCL and GND to launchpad P3.6, P3.7. 

Then build the blinking project with below setting, and load to device:

#define BSL_PARAM 0xFC488FFF // I2C slave address = 0x48, Interface selection = I2C 0xFC489FFF
#define BSL_API_TABLE_ADDR 0x00202000 // Address of BSL API table
#define BSL_ENTRY_FUNCTION (*((uint32_t *)BSL_API_TABLE_ADDR))

((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM);  // call this function before while loop

Next is open BSL scripter in command line, 

BSL-Scripter.exe  script_P4xx_i2c.txt

But it looks MSP432 BSL doesn't work, and I can see the data and clock in the MSP-FET using scope. Please check the log.

---------------------------------------------------------
BSL Scripter 3.2.1
PC software for BSL programming
2017-Apr-27 16:10:01
---------------------------------------------------------
Input file script is : C:/Users/a0220213/Desktop/msp430/msp432 BSL/MSPBSL_Scripter_win/bsl-scripter-windows/script_P4xx_i2c.txt
MODE P4xx I2C 400000 COM80 
//gives wrong password to do
//mass erase in the memory
RX_PASSWORD_32 .\pass256_wrong.txt
	Read Txt File  : C:\Users\a0220213\Desktop\msp430\msp432 BSL\MSPBSL_Scripter_win\bsl-scripter-windows\pass256_wrong.txt
	[ACK_ERROR_MESSAGE]Unknown ACK value!
RX_PASSWORD_32 .\pass256_default.txt
	Read Txt File  : C:\Users\a0220213\Desktop\msp430\msp432 BSL\MSPBSL_Scripter_win\bsl-scripter-windows\pass256_default.txt
	[ACK_ERROR_MESSAGE]Unknown ACK value!
MASS_ERASE
	[ACK_ERROR_MESSAGE]Unknown ACK value!
RX_DATA_BLOCK_32 .\Blink_LED.txt
	Read Txt File  : C:\Users\a0220213\Desktop\msp430\msp432 BSL\MSPBSL_Scripter_win\bsl-scripter-windows\Blink_LED.txt
	[ACK_ERROR_MESSAGE]Unknown ACK value!
	Time elapsed of writing 256 bytes : 1.026 seconds
	Speed of writing data :0.2436(kB/s)
//RX_DATA_BLOCK_32 .\Blink_LED.hex
TX_BSL_VERSION_32
	[ACK_ERROR_MESSAGE]Unknown ACK value!
TX_DATA_BLOCK_32 0x0000 0x4000 .\ReadBlock_MSP432P401R.txt
	Write Txt File : C:/Users/a0220213/Desktop/msp430/msp432 BSL/MSPBSL_Scripter_win/bsl-scripter-windows/./ReadBlock_MSP432P401R.txt
	[ACK_ERROR_MESSAGE]Unknown ACK value!
	Time elapsed of reading 0 bytes : 1.048 seconds
	Speed of reading data : 0(kB/s)
//TX_DATA_BLOCK_32 0x0000 0x4000 .\ReadBlock_MSP432P401R.hex
REBOOT_RESET

  • Eric,
    Have you done anything to configure the BSL through the boot override flash mailbox? I have reached out to the BSL experts for comment.

    Thanks and Regards,
    Chris
  • Hi Chris

    I didn't know about flash mailbox.

    I just use the default example as you can see in \MSPBSL_Scripter_win\ScriptExample\P4xx_i2c

    and MPS432 BSL Invocation is done by attached code:

    /* --COPYRIGHT--,BSD
     * Copyright (c) 2015, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * --/COPYRIGHT--*/
    //***************************************************************************************
    //  Blink the LED Demo - Software Toggle P1.0
    //
    //  Description; Toggle P1.0 inside of a software loop.
    //  ACLK = n/a, MCLK = SMCLK = default DCO
    //
    //                MSP432P4xx
    //             -----------------
    //         /|\|              XIN|-
    //          | |                 |
    //          --|RST          XOUT|-
    //            |                 |
    //            |             P1.0|-->LED
    //
    //  E. Chen
    //  Texas Instruments, Inc
    //  March 2015
    //  Built with Code Composer Studio v6
    //***************************************************************************************
    
    #include <driverlib.h>
    #define BSL_PARAM 0xFC488FFF // I2C slave address = 0x48, Interface selection = I2C 0xFC489FFF
    #define BSL_API_TABLE_ADDR 0x00202000 // Address of BSL API table
    #define BSL_ENTRY_FUNCTION (*((uint32_t *)BSL_API_TABLE_ADDR))
    
    
    void main(void)
    {
        volatile uint32_t i;
    
        // Stop watchdog timer
        WDT_A_hold(WDT_A_BASE);
    
        // Set P1.0 to output direction
        GPIO_setAsOutputPin(
            GPIO_PORT_P1,
            GPIO_PIN0
            );
    
        ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM); // Call the BSL with given BSL parameters
    
        while(1)
        {
            // Toggle P1.0 output
            GPIO_toggleOutputOnPin(
                GPIO_PORT_P1,
    			GPIO_PIN0
    			);
    
            // Delay
            for(i=100000; i>0; i--);
        }
    }
    
     

  • Additional information:
    UART BSL is work using similar operation.
  • Hi Eric,

    I'm running into the same issue with the msp-fet tool (in i2c mode). I was able to connect successfully using the MSP-BSL - Rocket (in i2c mode), so there might an issue with how we are configuring msp-fet tool.

    I'm discussing this internally and I'll keep you updated as soon as we get it to work.

    Thanks for your patience.

    David
  • Hi David
    Thanks for your feedback, please help to address the problem, as customer also fail to use I2C BSL using BSL host.

    Eric
  • Hi Eric,

     I talked to the tools team and unfortunately the msp-fet tool (in i2c mode) does not support for the MSP432. The tools team will update the documentation to reflect this change.

     I made the request to have this feature implemented for the msp432, so this might be added in the future but for the time being please make sure your customer uses the MSP-BSL - Rocket.

     Thank you for your patience.

      Best regards,

       David  

  • Yes, FET cannot work in I2C mode. Finally I can use the G2 host project to communicate with the target in I2C mode.
    Eric

**Attention** This is a public forum