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.

[参考译文] MSPM33C321A:Modbus 支持

Guru**** 2914110 points

Other Parts Discussed in Thread: MSPM33C321A, SYSCONFIG, MSPM0G3507

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1644194/mspm33c321a-modbus-supports

器件型号: MSPM33C321A
Thread 中讨论的其他器件: SysConfigMSPM0G3507

尊敬的专家:

1:MSPM33 系列的 Modbus 软件的发布计划是否有任何进展?
(+) MSPM33C321A:电机控制 SDK — 基于 Arm 的微控制器论坛 — 基于 Arm 的微控制器 — TI E2E 支持论坛 

2:我是否正确理解 MSPM33C321A 在功能上能够支持 Modbus?

3:是否有应用手册用于将 Modbus 软件从 MSPM0 SDK 移植到 MSPM33 系列?

此致、
正常

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

    您好、哦、

    1.我们没有看到太多的请求,因此没有在 SDK 的发行版中对其进行优先排序。 我将向我们的 SW 团队发送一条注释、因为已经两次请求这件事。

    2.是的,它应该能够在这里看到来自 M0 SDK 的代码示例: https://dev.ti.com/tirex/explore/node?isTheia=false&node=A__ALC9N7F92MDAw5vRBVdBlg__MSPM0-SDK__a3PaaoK__LATEST&search=modbus

    3.没有一个特定的应用程序不了解如何从 M0 -> M33 移植 Modbus 软件。 它们应该很容易从一个转换到另一个、因为 UART 的 API 非常相似。 可能需要进行的主要更改都在 SysConfig GUI 中。

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

    尊敬的 Erik Vaughn:

    感谢您的信赖。 我明白了。

    此致、
    正常

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

    您好 、Erik Vaughn、

    我基于 MSPM0 Modbus_controller 工程创建了一个基于 MSPM33 的工程。
    虽然我还没有验证运行时操作、但工程编译成功。
    如果您能指出任何可能需要改进的领域或任何潜在问题、我将不胜感激。
    【环境】
    • 器件:MSPM33C321A
    • 板:LP_MSPM33C321A
    • SDK:mspm33_sdk_1_03_00_01
    • IDE:Code Composer Studio Theia / CCS 20.5.1
    • 编译器:TI ARM Clang 4.0.4.LTS
    • 编译配置:NoRTOS、ticlang
    [从 MSPM0G3507 移植到 MSPM33C321A]的更改汇总
    • 导入“empty_LP_MSPM33C321A_nortos_ticlang“和“Modbus_controller_LP_MSPM0G3507_nortos_ticlang“
    • 将以下.c/h 文件复制 到 “empty_LP_MSPM33C321A_nortos_ticlang“。
      modbus_controller.c/h
      ModbusRTU.c/h
      ModbusRTU_priv.h
    • 随附的 sysconfig 文件基于“modbus_controller_LP_MSPM0G3507_nortos_ticlang“。
    • Cretate 新文件“modbus_msp33_compat.h“、为了避免修改 TI 的 ModbusRTU.c /、 ModbusRTU.h我添加了一个兼容性标头:
      typedef UNICOMM_UART Inst_Regs UART_Regs;
    • 添加编译器选项: “-include /empty_LP_MSPM33C321A_nortos_ticlang/modbus_msp33_compat.h“
    • 然后在“modbus_controller.h" 如下所示“中添加 include:
      #include “modbus_msp33_compat.h“

    如果这根本不是链接器问题、请告诉我。

    此致、
    正常

    e2e.ti.com/.../modbus_5F00_controller.ce2e.ti.com/.../modbus_5F00_controller.he2e.ti.com/.../modbus_5F00_msp33_5F00_compat.h

    modbus_controller_m33.syscfg

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "MSPM33C321X" --part "Default" --package "LQFP-100(PFA)" --product "mspm33_sdk@1.03.00.01"
     * @v2CliArgs --device "MSPM33C321A" --package "LQFP-100(PFA)" --product "mspm33_sdk@1.03.00.01"
     * @versions {"tool":"1.27.1+4634"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const GPIO   = scripting.addModule("/ti/driverlib/GPIO", {}, false);
    const GPIO1  = GPIO.addInstance();
    const GPIO2  = GPIO.addInstance();
    const TIMER  = scripting.addModule("/ti/driverlib/TIMER", {}, false);
    const TIMER1 = TIMER.addInstance();
    const UART   = scripting.addModule("/ti/driverlib/UART", {}, false);
    const UART1  = UART.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    GPIO1.$name                          = "GPIO_LEDS";
    GPIO1.associatedPins[0].$name        = "USER_LED_1";
    GPIO1.associatedPins[0].assignedPort = "PORTA";
    GPIO1.associatedPins[0].assignedPin  = "0";
    GPIO1.associatedPins[0].initialValue = "SET";
    
    const Board                       = scripting.addModule("/ti/driverlib/Board", {}, false);
    Board.peripheral.$assign          = "DEBUGSS";
    Board.peripheral.swclkPin.$assign = "PA20";
    Board.peripheral.swdioPin.$assign = "PA19";
    
    GPIO2.$name                   = "GPIO_DE_TX";
    GPIO2.associatedPins.create(2);
    GPIO2.associatedPins[0].$name = "TRANSMITTER";
    GPIO2.associatedPins[1].$name = "RECEIVER";
    
    const SYSCTL                 = scripting.addModule("/ti/driverlib/SYSCTL", {}, false);
    SYSCTL.forceDefaultClkConfig = true;
    SYSCTL.peripheral.$assign    = "SYSCTL";
    
    TIMER1.$name       = "TIMER_0";
    TIMER1.timerMode   = "PERIODIC";
    TIMER1.timerClkSrc = "LFCLK";
    TIMER1.timerPeriod = "100ms";
    
    UART1.$name                    = "UART_0";
    UART1.setExtDriverSetup        = 5;
    UART1.setExtDriverHold         = 5;
    UART1.enableFIFO               = true;
    UART1.uartMode                 = "RS485";
    UART1.stopBits                 = "TWO";
    UART1.rxFifoThreshold          = "DL_UART_RX_FIFO_LEVEL_ONE_ENTRY";
    UART1.txFifoThreshold          = "DL_UART_TX_FIFO_LEVEL_3_4_EMPTY";
    UART1.enabledInterrupts        = ["OVERRUN_ERROR","RX"];
    UART1.peripheral.$assign       = "UC13_0";
    UART1.peripheral.rxPin.$assign = "PB9";
    UART1.peripheral.txPin.$assign = "PB8";
    UART1.txPinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric0";
    UART1.rxPinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric1";
    
    const ProjectConfig              = scripting.addModule("/ti/project_config/ProjectConfig", {}, false);
    ProjectConfig.migrationCondition = true;
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    GPIO1.associatedPins[0].pin.$suggestSolution = "PA0";
    GPIO2.associatedPins[0].pin.$suggestSolution = "PA1";
    GPIO2.associatedPins[1].pin.$suggestSolution = "PA28";
    TIMER1.peripheral.$suggestSolution           = "TIMA0_0";

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

    您好、哦、

    我相信这对于配置来说看起来不错。 对于 HAL 层、该 API 应该非常相似。 如果您有任何问题或疑虑、请告诉我、我可以帮助进行调试。

    如果您有 MSPM0G3507 LP、您可以比较输出以查看其是否符合预期。

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

    您好 、Erik Vaughn、

    感谢您发送编修。  如果在实际操作过程中出现任何问题、我们将再次与您联系。

    最好的应届毕业生
    正常