How to program EMW3165 using command line interface?


(1) Erase and update bootloader.


  1. Execute the control program from Command Prompt Window.

    You need to be able to be execute the command of "ST-LINK Utility". For standard installation, PATH should include following path:

    "\Program Files\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility"
    

    Then, invoke following command line:

    > ST-LINK_CLI -c SWD UR LPM -ME -P Desktop\hacker-emblem.hex 0x80000000 -V after_programming -HardRst
    

    which does:

    • specify SWD UR LPM (SWD, Under Reset, Low Power Mode)
    • Erase flash memory (-ME option)
    • Program flash memory (-P option with filename)
    • Verify flash memory (-V option)
    • Assert hardware reset signal of target board

Note that -ME option is not required for the initial programming of the MCU.

And you can download several bin files at one time.


(2)Download application code and RF driver code using UART 1.

Use python library Pyserial to download the code to board following yModem protocol. I finished it . Great!

bv

The code will be pasted here.


追加: 实际上我在这里做了个用串口终端下载程序到3165的东西,代码是用Python实现的,协议用了yModem。因为3165的sdk就是这么做的。效果不错。20170530







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值