TI中文支持网
TI专业的中文技术问题搜集分享网站

CC1310 I2C Master下载程序后跑不起来

你好:

我在使用cc1310的配置i2c接口,编译可以过,在下载时会出现以下错误提示:

Cortex_M3_0: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.0.27.9)

Cortex_M3_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.0.27.9)

代码如下,去掉I2C_transfer(i2c, &i2cTransaction);则不会出现上述问题。请问何解?

SDK版本:simplelink_cc13x0_sdk_2_20_00_38,工程用的是\examples\rtos\CC1310_LAUNCHXL\ti154stack\sensor_oad

I2C使用的引脚:

#define CC1350_LAUNCHXL_I2C0_SCL0 IOID_9
#define CC1350_LAUNCHXL_I2C0_SDA0 IOID_8

I2C操作如下:

I2C_Handle i2c_init(void)
{

I2C_Handle i2c;
I2C_init();
I2C_Params_init(&I2CParams);
I2CParams.bitRate = I2C_400kHz;
i2c = I2C_open(Board_I2C0, &I2CParams);

testGpioPin = PIN_open(&testGpioPinpinGpioState, testGpioPinTable);

if (testGpioPin == NULL) {
return false;
}

InterruptIntPinHandle = PIN_open(&InterruptPinState, testInterruptPinTable);
if(testInterruptPinTable == NULL) {
/* Error initializing button pins */
while(1);
}
/* Setup callback for button pins */
if (PIN_registerIntCb(testInterruptPinTable, &InterruptCallbackFxn0) != 0) {
/* Error registering button callback function */
while(1);
}

uint8_t txBuffer[2];
uint8_t rxBuffer[2];
I2C_Transaction i2cTransaction;
txBuffer[0] = reg;
txBuffer[1] = data;
i2cTransaction.slaveAddress = Board_i2c_ADDR;
i2cTransaction.writeBuf = txBuffer;
i2cTransaction.writeCount = 2;
i2cTransaction.readBuf = rxBuffer;
i2cTransaction.readCount = 1;

I2C_transfer(i2c, &i2cTransaction);

}

da qin zheng sheng:

使用哪种尺寸封装?把波特率修改为100k试试。

user5020968:

回复 da qin zheng sheng:

用的是QFN48封装的,改100K试过,还是不行,我用的是TI 15.4自组网的SDK,不 知道这个是否有影响,在i2ctmp007的例程里跑是正常的。

Viki Shi:

这个报错一般是JTAG连接或者硬件问题,复位有效吗?

user5020968:

回复 Viki Shi:

你好,在开始下载程序前有一次复位,下载完成后没有复位信号。

赞(0)
未经允许不得转载:TI中文支持网 » CC1310 I2C Master下载程序后跑不起来
分享到: 更多 (0)