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.

[参考译文] RTOS/TDC7200EVM:可以#39;t 写入寄存器、但可以读取所有内容吗?

Guru**** 2587365 points
Other Parts Discussed in Thread: TDC7200EVM, CC2640R2F

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

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/617343/rtos-tdc7200evm-can-t-write-to-registers-but-can-read-all

器件型号:TDC7200EVM
主题中讨论的其他器件: CC2640R2F

工具/软件:TI-RTOS

大家好、我将 TDC7200EVM 与 CC2640R2F (非 MSP430Fxx)配合使用。 我还无法在 Windows 10上安装 GUI、它出现 KernelBase.dll 和 NationalInstrumentsLabView 错误。

我阅读了有关此错误的每篇文章。 我不明白什么可能出错?

#include 
#include 
#include 
#include 

#include "Board.h"

uint8_t regComm[2]={0x40、0x08};
uint8_t regRad[2]={NULL};

void spiCallback (SPI_Handle handle、SPI_Transaction *事务){
system_printf ("%u\n"、*((uint8_t *)事务->rxBuf);
system_printf ("%u\n"、*(((uint8_t *)事务->rxBuf)+ 1));
}

void * mainThread (void * arg0)
{
GPIO_init();
spi_init();

GPIO_WRITE (23、0);
Task_sleep (1E1);
GPIO_WRITE (23、1);
Task_sleep (1E1);
GPIO_WRITE (11、1);
Task_sleep (1E1);
GPIO_WRITE (11、0);

SPI_Handle 句柄;
SPI_Params 参数;
SPI_Transaction 事务;
SPI_PARAMS_INIT (params);

params.mode = SPI_MASTER;
params.dataSize = 8;
params.transferMode = SPI_MODE_CALLACK;
params.transferCallbackFxn = spiCallback;
句柄= SPI_OPEN (Board_SPI0、&params);
if (handle =NULL){
System_printf ("错误.\n");
}
transaction.count = 2;
transaction.txBuf = regComm;
transaction.rxBuf = regRead;

while (1){
bool transferOK = SPI_transfer (handle、&transaction);
if (!transferOK){
System_printf ("错误.\n");
}
Task_sleep (1e5);
}
}

感谢你的帮助。

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

    我找到了解决方案。 您必须在每次传输后取消芯片选择的置位。 此外、在这之后、您需要添加一些延迟以使寄存器移位该值。