打印
[开发工具]

如何通过STVP_CmdLine读写MCU的OTP数据

[复制链接]
436|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
lanjackg2003|  楼主 | 2020-10-26 14:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问一下,如何通过STVP_CmdLine接口读取MCU的OTP数据
目前,STVP_CmdLine的使用帮助支持以下功能.
Usage:STVP_CmdLine [-BoardName=STxxx] [-Port=xxx] [-ProgMode=xxx] [-Device=STxxx]
[-Tool_ID=x]|[-NbTools=x] [-version] [-verbose]|[-no_verbose] [-log]|[-no_log] [-loop]|[-no_loop]
[-help] [-no_progProg] [-no_progData] [-no_progOption] [-progress]|[-no_progress]
[-warn_protect]|[-no_warn_protect] [-readProg] [-readData] [-readOption]
[-erase]|[-no_erase] [-blank]|[-no_blank] [-verif]|[-no_verif]
[-FileProg=fname.hex/s19] [-FileData=fname.hex/s19] [-FileOption=fname.hex/s19]
With:
[-BoardName=STxxx] ==========> Programming Tool name (ST-LINK, RLINK, STICE, ...)
[-Tool_ID=x] ================> ST-LINK Programming Tool ID (0, 1, 2...)
[-NbTools=x] ================> Number of ST-LINK Tools with same device connected (Tool_ID is automatically incremented)
[-Port=xxx] =================> Communication Port (USB, LPT1)
[-ProgMode=xxx] =============> Programming mode or protocol (SWIM, JTAG, SWD)
[-Device=STxxx] =============> Device name (exact same name as in STVP)
[-version] ==================> Display version of this application
[-verbose] ==================> Display messages, warnings, errors
[-log] ======================> Generate or append Result.log log file
[-loop] =====================> Loop on actions until 'Space' key hit
[-progress] =================> Display progress of each action
[-warn_protect] =============> Message Box if programming Option Byte protection
[-no_progProg] ==============> Do not program PROGRAM MEMORY (used to verify device from a file)
[-no_progData] ==============> Do not program DATA MEMORY (used to verify device from a file)
[-no_progOption] ============> Do not program OPTION BYTE (used to verify device from a file)
[-readProg] =================> Read PROGRAM MEMORY
[-readData] =================> Read DATA MEMORY
[-readOption] ===============> Read OPTION BYTE
[-erase] ====================> Erase the device (before programming)
[-blank] ====================> Blank Check the device (before programming)
[-verif] ====================> Verify the device after programming
[-FileProg=fname.hex/s19] ===> File name to program PROGRAM MEMORY area (hex or s19)
[-FileData=fname.hex/s19] ===> File name to program DATA MEMORY area (hex or s19)
[-FileOption=fname.hex/s19] => File name to program OPTION BYTE area (hex or s19)
可以对PROGRAM MEMORY与OPTION BYTE进行读取,依OPTION读取为示例
STVP_CmdLine.exe -BoardName=ST-LINK -ProgMode=SWD -Tool_ID=0 -Device=STM32F205xG -progress -readOPTION
STVP_CmdLine version 1.6

Verbose ON
Log activity ON
Display Progress ON
Message box warning if protect option byte ON
Loop mode ON
Erase device OFF
Blank check device OFF
Verify device ON

Configuration:
BoardName=ST-LINK ST-LINK_ID=0 Device=STM32F205xG Port=USB ProgMode=SWD

Hit 'Esc' key to abort during communication.

>>> Reading OPTION BYTE
25 50 75 100 <<< Reading OPTION BYTE succeeds

由于其没有支持OTP数据参数,所以不知道如何读取OTP的数据。

如果传参使用-readData,命令行返回
>>> Reading DATA MEMORY
(API) ERROR : Unknown memory Area name
<<< Reading DATA MEMORY fails





使用特权

评论回复
沙发
氧化二氢| | 2020-10-26 23:02 | 只看该作者
谢谢分享

使用特权

评论回复
板凳
香水城| | 2020-10-28 07:23 | 只看该作者

STLINK UTiltiy 也支持命令行,你用它试试。

使用特权

评论回复
地板
lanjackg2003|  楼主 | 2020-11-13 12:52 | 只看该作者
香水城 发表于 2020-10-28 07:23
STLINK UTiltiy 也支持命令行,你用它试试。

是的,后面改用这个
解决了问题

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

55

主题

426

帖子

7

粉丝