394645065 发表于 2020-2-19 12:23:31

CSR8670如何锁SPI口

8670的datasheet描述了芯片支持锁SPI接口,但是我找遍文档也没找到具体的操作步骤,请问群友知道如何去锁住SPI接口吗?谢谢!
另外除了锁SPI接口,请问还有什么方法能防止代码被dump的吗?

628495173 发表于 2020-2-19 16:57:04

自己写个小工具,按照bluesuite里面提供的库

wgc2013 发表于 2020-2-20 11:43:39

或者买一个别人写好工具,直接使用

394645065 发表于 2020-2-20 12:01:40

谢谢回复,用testengine可以锁SPI。
步骤是先将8670 set bootmode0, 然后调用test engine api 去锁SPI。
我 写了个简单的代码,供同样问题的人参考

#include "pch.h"
#include "testengine.h"
#include <windows.h>
#include <iostream>
#include <stdint.h>

/* key length is fixed 128 bits*/
uint8_t key = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};

int main()
{
        int ret;
        /* Get device handle */
        uint32 deviceHandle = openTestEngine(USB, "\\\\.\\csr0", 0, 5000, 1000);

        if (deviceHandle != 0)
        {
                /* Set secure key to chip */
                ret = bccmdSetSpiLockCustomerKey(deviceHandle, (uint32*)key);
                /* Lock SPI */
                ret = bccmdSpiLockInitiateLock(deviceHandle);
        }

    std::cout << "Hello World!\n";
}

忙忙碌碌 发表于 2020-2-21 15:55:07

感谢分享:lol:lol

chzhssr 发表于 2020-10-12 10:53:38

不懂 不懂

Eric9527 发表于 2021-4-5 13:12:15

加密芯片

lingbio 发表于 2022-2-25 00:03:40

感谢分享

BG7DGM 发表于 2022-11-24 10:53:05

不懂 不懂;P;P

深圳市 发表于 2023-11-25 11:02:20

学习
页: [1] 2
查看完整版本: CSR8670如何锁SPI口