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.

[参考译文] AFE7950:在哪里可以找到"spi_convert.py"?

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

https://e2e.ti.com/support/rf-microwave-group/rf-microwave/f/rf-microwave-forum/1460784/afe7950-where-to-find-the-spi_convert-py

器件型号:AFE7950
主题中讨论的其他器件:LMK04828

工具与软件:

你好

   sba412a  ‘S、在 AFE79xx Secure 文件夹中、您可以找到一个名为"SPI_Convert.py"的脚本、用于将生成的 SPI 日志转换为正确格式。 此脚本应在 AFE79xx GUI 中‘、并在运行脚本后、‘将生成两个名为"SAFEspiwrites.c"和"SLMKspiwrites.c"的文件。

   但我找不到那个脚本。 你能给我一个吗?

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

    你好

        我发现 Latte v2.60完成了从日志文件到 C 文件的转换。 但找不到 LMK04828 SPI 初始代码。

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

    你好、Xiao、

    要启用 LMK 寄存器写入日志记录、您可以将以下代码添加到 LMK 配置脚本的末尾。 然后、生成文件后、可以使用下面的附加代码转换 LMK SPI 写入。

    启用 LMK 日志记录:  

    lmklogDumpInst=mLogDump.logDump (Asterix_DIR+devices_DIR+r"\Afe79xxPg1lmk.txt")

    lmklogDumpInst.logFormat=0x1  

    lmk.logClassInst = lmklogDumpInst

    lmk.rawWriteLogEn=1

    LMK SPI 写入转换:  

    inpFile = open(ASTERIX_DIR+DEVICES_DIR+r"\Afe79xxPg1lmk.txt",'r')  #Path and filename for Latte's dump file
    lines = inpFile.readlines()
    f2 = open(DEVICES_DIR+r"\LMKspiwrites.txt",'w')  #Path and filename for SPI output file 
    
    lineNo = 1
    for line in lines:
    	if line[0]=='S':
    		if line[3]=='W': #SPIWrite
    			addr = int(line[8:13],16)
    			data = int(line[14:16],16)
    			f2.write("\tLMK04828_RegWrite(0x%x,0x%x);\n"%(addr,data))
    
    		lineNo=lineNo+1
    f2.write('\n')		
    inpFile.close()
    f2.close()

    此致、

    David Chaparro