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.

[参考译文] MSP432E411Y:通过 I2C 引导加载程序从 Windows 主机进行固件更新

Guru**** 2371130 points
Other Parts Discussed in Thread: MSP-EXP432E401Y
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1532916/msp432e411y-fw-update-from-windows-host-via-i2c-bootloader

部件号:MSP432E411Y

工具/软件:

您好的团队、  

客户正在其电路板上使用 MSP432E411YTZAD、并在 MCU 及其后端板(I2C/SMB 主机)之间使用 I2C 连接。 I2C 引导加载程序信号连接到 PB2/PB3 引脚  、如 BSL 用户指南的表 1 所示、并且在其源代码中、PB2 和 PB3 的定义是默认的。 他们希望使用这些 I2C 信号进行固件更新(不使用 JTAG/J-Link)、但不确定如何引导 BSL。

鉴于此、您能否告知启用 I2C 引导加载程序功能的过程? 我要求他们分享原理图和源代码、以便检查他们到目前为止实施的项目。  

此致、

Luke

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

     请参阅 适用于 MSP432E 的 C:\ti\bsl-Scripter\ScripptExampleWindows\E4xx_i2c 中的 i2c 引导加载程序示例。  运行 script_1.txt、script_2.txt 和 script_3.txt BSL 脚本程序通过 I2C0 下载固件。

     I2C 引导加载程序源代码和配置 (bl_config.h) 可在 C:\ti\simplelink_msp432e4_SDK_4_20_00_12\examples\nortos\MSP-EXP432E401Y\boot_loader\boot_serial_i2c_flash 中找到。

     如您在 bl_config.h(见下面的代码片段)中的  boot_serial_i2c_flash 示例所示、使用 I2C0、PB2 用于 SCL、PB3 用于 SDA。  

    //*****************************************************************************
    //
    // Selects the base address of the I2C peripheral module
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_CLOCK_ENABLE
    //
    //*****************************************************************************
    #define I2Cx I2C0

    //*****************************************************************************
    //
    // Selects the clock enable for the GPIO corresponding to I2C SCL pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SCLPIN_BASE, I2C_SCLPIN_PCTL and I2C_SCLPIN_POS
    //
    //*****************************************************************************
    #define I2C_SCLPIN_CLOCK_ENABLE SYSCTL_RCGCGPIO_R1

    //*****************************************************************************
    //
    // Selects the base address for the GPIO corresponding to I2C SCL pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SCLPIN_CLOCK_ENABLE, I2C_SCLPIN_PCTL and I2C_SCLPIN_POS
    //
    //*****************************************************************************
    #define I2C_SCLPIN_BASE GPIOB

    //*****************************************************************************
    //
    // Selects the port control value for the GPIO corresponding to I2C SCL pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SCLPIN_CLOCK_ENABLE, I2C_SCLPIN_BASE and I2C_SCLPIN_POS
    //
    //*****************************************************************************
    #define I2C_SCLPIN_PCTL 0x2

    //*****************************************************************************
    //
    // Selects the pin number for the GPIO corresponding to I2C SCL pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SCLPIN_CLOCK_ENABLE, I2C_SCLPIN_BASE and I2C_SCLPIN_PCTL
    //
    //*****************************************************************************
    #define I2C_SCLPIN_POS 2

    //*****************************************************************************
    //
    // Selects the clock enable for the GPIO corresponding to I2C SDA pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SDAPIN_BASE, I2C_SDAPIN_PCTL and I2C_SDAPIN_POS
    //
    //*****************************************************************************
    #define I2C_SDAPIN_CLOCK_ENABLE SYSCTL_RCGCGPIO_R1

    //*****************************************************************************
    //
    // Selects the base address for the GPIO corresponding to I2C SDA pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SDAPIN_CLOCK_ENABLE, I2C_SDAPIN_PCTL and I2C_SDAPIN_POS
    //
    //*****************************************************************************
    #define I2C_SDAPIN_BASE GPIOB

    //*****************************************************************************
    //
    // Selects the port control value for the GPIO corresponding to I2C SDA pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SDAPIN_CLOCK_ENABLE, I2C_SDAPIN_BASE and I2C_SDAPIN_POS
    //
    //*****************************************************************************
    #define I2C_SDAPIN_PCTL 0x2

    //*****************************************************************************
    //
    // Selects the pin number for the GPIO corresponding to I2C SDA pin
    //
    // Depends on: I2C_ENABLE_UPDATE
    // Exclusive of: None
    // Requires: I2C_SDAPIN_CLOCK_ENABLE, I2C_SDAPIN_BASE and I2C_SDAPIN_PCTL
    //
    //*****************************************************************************
    #define I2C_SDAPIN_POS 3