[开发工具] 关于STVP programming toolkit的GetProtectionList的问题

[复制链接]
 楼主| lanjackg2003 发表于 2015-11-18 19:20 | 显示全部楼层 |阅读模式
在调用GetProtectionList的时,发现无法获取芯片支持的保护级别列表,通过调用CGetLastError()查看错误
返回如下错误信息:
C:\Program Files (x86)\STMicroelectronics\st_toolset\stvp\DBCFILE.CNF : DEVICE.STM32F417xG.Eprcore.Tab.OPTION BYTE.Protection not found

请问一下,在调用GetProtectionList的时候,是否还需要设置什么参数呢?

我用官网的ST Visual Programmer.exe可以在Option Byte的页面找到保护级别列表,因此应该不是DBCFILE.CNF这个文件损坏的原因.

mintspring 发表于 2015-11-18 21:30 | 显示全部楼层
感觉这个问题是不是需要操作前对什么寄存器进行解锁呢?
 楼主| lanjackg2003 发表于 2015-11-19 10:25 | 显示全部楼层
mintspring 发表于 2015-11-18 21:30
感觉这个问题是不是需要操作前对什么寄存器进行解锁呢?
GetProtectionList
Fills the output buffer with the list of protections supported by a given device.
Note: Protection is an optional state that allows user to protect some reserved addresses, for
instance the RC Calibration bytes for some ST7LITE microcontrollers. When protection is
set, the relevant addresses are not programmed (see ESetProtection).
In the Output buffer, the items in the list are separated by ’\n’.
When the function returns an error, the error is due to a database access problem. Use the
CGetLastError function to retrieve the error message.
Prototype: int GetProtectionList(const char*szDeviceName, char* szListBuffer, int
iBufferSize)
Parameters:
szDeviceName: device name
szListBuffer: output buffer that contains the list of protection options supported by the
device
iBufferSize: size of the output buffer
Return: 0 if error, 1 if success

这个是STVP programming toolkit的文档,但是看不出还需要调用什么函数,开启特别的东西。
那些配置参数都是正常的,因为我调用编程接口/检测空片接口 都是能够正常工作的.


有没有遇到此问题的大侠,或者能够正常使用此函数的大侠支持一下啊
 楼主| lanjackg2003 发表于 2015-11-20 19:00 | 显示全部楼层
托一下
mintspring 发表于 2015-11-22 23:25 | 显示全部楼层
Protection is an optional state that allows user to protect some reserved addresses, for
instance the RC Calibration bytes for some ST7LITE microcontrollers. When protection is
set, the relevant addresses are not programmed (see ESetProtection).
 楼主| lanjackg2003 发表于 2015-11-23 10:11 | 显示全部楼层
mintspring 发表于 2015-11-22 23:25
Protection is an optional state that allows user to protect some reserved addresses, for
instance th ...

我选择的芯片是STM32F405这个型号.这个MCU是有保护位的.
stvp里面在option bytes里面也是可以选择保护等级。

只是我调用GetProtectionList这个函数,它一直返回失败.无法获取保护等级的列表。
ESetProtection这个函数需用GetProtectionList返回的列表中的某个值作为参数.

太奇怪了
 楼主| lanjackg2003 发表于 2015-11-26 16:42 | 显示全部楼层
还是没头绪....
 楼主| lanjackg2003 发表于 2015-12-9 13:02 | 显示全部楼层
想到办法解决,结贴吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

56

主题

441

帖子

7

粉丝
快速回复 在线客服 返回列表 返回顶部