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.

F28M35H52C: ARM部分I2C,互相传输问题

Part Number: F28M35H52C

测试过程描述:
1.使用TI的历程i2c_loopback_m3,只使用一块F28M35H52C开发板,配置寄存器I2CMCR_LPBK=1,开启loopback模式,能完成数据的收发,也在CCS上看到数据以及寄存器的变化,但是用逻辑分析仪在对应的引脚上看不到波形的变化。
2.使用两块F28M35H52C开发板,两台电脑,让其中一块开发板做master transmitter 模式,另外一块开发板做slave receiver  模式配置,将引脚相连,寄存器I2CMCR_LPBK=0,不能完成数据的收发,也在CCS上也不能看到数据以及寄存器的变化,用逻辑分析仪在对应的引脚上看不到波形的变化。
下面第一个代码是I2C做master部分的代码

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//###########################################################################
// FILE: i2c_loopback.c
// TITLE: Example demonstrating a simple I2C message
// transmission and reception.
//###########################################################################
// $TI Release: F28M35x Support Library v220 $
// $Release Date: Tue Sep 26 15:35:11 CDT 2017 $
// $Copyright: Copyright (C) 2011-2017 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_i2c.h"
#include "inc/hw_nvic.h"
#include "inc/hw_sysctl.h"
#include "driverlib/i2c.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/flash.h"
#include "utils/uartstdio.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
,第二个是I2C做slave部分的代码
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//###########################################################################
// FILE: i2c_loopback.c
// TITLE: Example demonstrating a simple I2C message
// transmission and reception.
//###########################################################################
// $TI Release: F28M35x Support Library v220 $
// $Release Date: Tue Sep 26 15:35:11 CDT 2017 $
// $Copyright: Copyright (C) 2011-2017 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_i2c.h"
#include "inc/hw_nvic.h"
#include "inc/hw_sysctl.h"
#include "driverlib/i2c.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/flash.h"
#include "utils/uartstdio.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX