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.

TMS320F28388D: CM的外设I2C怎么查看寄存器,没有找到

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

想以写寄存器的方式进行配置,没有找到

  • 想以写寄存器的方式进行配置

    目前给出的都是driverlib下的例程

    写寄存器的话,您可以根据用户指南的寄存器结合driverlib下的例程的I2C配置注释说明来写

    https://www.ti.com.cn/cn/lit/ug/spruii0c/spruii0c.pdf 

  • 主要是我没找到I2C寄存器定义的文件

  • 您可以参考一下

    C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2838x\driverlib_cm\inc

    下的 hw_i2c.h 以及 C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2838x\driverlib_cm 下的i2c文件

  • 还有有没有例程,C2000里面的连管脚都没定义

  • 这个我看了,这都是封装好的写地址的方式,封装后写的不清不楚的,而且例程太简单了,管脚都没定义,我自己写我想写寄存器的方式,这样方便写,起码CPU以前都是写寄存器的知道怎么写,那个例程看了跟没看似的,没有用

  • C2000里面的连管脚都没定义

    管脚的话,您可以看一下 

    C:\ti\c2000\C2000Ware_3_04_00_00\device_support\f2838x\examples\cpu1 

    下例程内的定义

    我自己写我想写寄存器的方式,这样方便写,起码CPU以前都是写寄存器的知道怎么写,那个例程看了跟没看似的,没有用

    目前主要是driverlib的例程,CM寄存器例程的话,需要您自己编写

  • 我就是说下例程写的时候能不能有点心,还有I2C有两个,为什么例程配置体现不出来呢

    例程只是一个参考,在开发过程中使用时,可以给您提供一个框架

    具体开发代码的话,是需要开发工程师来对照数据手册以及用户指南来实现的

    起码CPU以前都是写寄存器的

    之后较新的芯片基本都会是driverlib下的例程

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //
    // Included Files
    //
    #include <stdint.h>
    #include <stdbool.h>
    #include "cm.h"
    //
    // Defines
    //
    #define SLAVE_ADDRESS 0x3C
    #define NUM_I2C_DATA 3
    #define PASS 0
    #define FAIL 1
    int Ucount;
    // Globals
    //
    uint32_t result = FAIL;
    uint32_t ui32DataTx;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //#############################################################################
    //
    // FILE: cm_common_config_c28x.c
    //
    // TITLE: C28x Common Configurations to be used for the CM Side.
    //
    //! \addtogroup driver_example_list
    //! <h1>C28x Common Configurations</h1>
    //!
    //! This example configures the GPIOs and Allocates the shared peripherals
    //! according to the defines selected by the users.
    //!
    //
    //#############################################################################
    // $TI Release: F2838x Support Library v3.04.00.00 $
    // $Release Date: Fri Feb 12 19:08:49 IST 2021 $
    // $Copyright:
    // Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/
    //
    // Redistribution and use in source and binary forms, with or without
    // modification, are permitted provided that the following conditions
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    就是这个例程简单的改了一下连续发送,

    问题1:禁止I2C_enableLoopback(I2C0_BASE);为什么还能进接收中断

    问题2:为什么测试32管教没有波形

    问题3:想确定这里的解释有没有写反,为什么I2C_MASTER_WRITE是读  那个是写

  • 请诉我CM的I2C读EEPROM怎么写