I2C_Slave
Go to file
xiaoyuluoke 736a600702 第一次提交 2024-07-25 11:11:29 +08:00
.vscode 第一次提交 2024-07-25 11:11:29 +08:00
CMSIS 第一次提交 2024-07-25 11:11:29 +08:00
build 第一次提交 2024-07-25 11:11:29 +08:00
cmake 第一次提交 2024-07-25 11:11:29 +08:00
n32g430_std_periph_driver 第一次提交 2024-07-25 11:11:29 +08:00
source 第一次提交 2024-07-25 11:11:29 +08:00
.clang-format 第一次提交 2024-07-25 11:11:29 +08:00
.gitignore Initial commit 2024-07-25 11:10:24 +08:00
CMakeLists.txt 第一次提交 2024-07-25 11:11:29 +08:00
README.md 第一次提交 2024-07-25 11:11:29 +08:00
n32g430_flash.ld 第一次提交 2024-07-25 11:11:29 +08:00
project.cmake 第一次提交 2024-07-25 11:11:29 +08:00
startup_n32g430_gcc.s 第一次提交 2024-07-25 11:11:29 +08:00

README.md

1、功能说明

此例程展示了作为从机使用I2C收发数据。   

2、使用环境

软件开发环境: IDE工具KEIL MDK-ARM 5.34.0.0 IAR EWARM 8.50.1

硬件环境:
    开发板N32G430C8L7-STB V1.0

3、使用说明

1、主时钟128MHz
2、I2C 配置:
        SCL --> PB6
        SDA --> PB7         
        CLOCK:100KHz
        
3、UART1配置
        TX --> PA9
        RX --> PA10         
        波特率115200
    

4、测试步骤与现象
    a跳线连接主机I2C
    b编译下载代码复位运行
    c从串口看打印信息验证结果

4、注意事项 SCL及SDA必须接上拉

  1. Function description

    This routine demonstrates using I2C to send and receive data as a slave.

  2. Use environment

    Software development environment: IDE tool: KEIL MDK-ARM V5.34.0.0

    Hardware environment: Development board: N32G430C8L7-STB V1.0

  3. Instructions for use

    1. Main clock: 128MHz

    2. I2C1 configuration: SCL --> PB6 SDA --> PB7 CLOCK: 100KHz

    3. USART1 configuration: TX --> PA9 RX --> PA10 Baud rate: 115200

    4. Test steps and phenomena a, jumper to connect the host I2C1 b, compile and download the code to reset and run c, see the print information from the serial port, and verify the result

  4. Matters needing attention SCL and SDA must be pulled up