You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DeveloperAlpha 48b48663ce -u origin main 3 months ago
..
EIDE -u origin main 3 months ago
EWARM -u origin main 3 months ago
Inc -u origin main 3 months ago
MDK-ARM -u origin main 3 months ago
Src -u origin main 3 months ago
readme.txt -u origin main 3 months ago

readme.txt

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

================================================================================
                                样例使用说明
                             Sample Description
================================================================================
功能描述:
此样例演示了主机I2C通过DMA方式进行通讯从机使用EEPROM外设芯片P24C32按下user按
键主机先向从机写15bytes数据为0x1~0xf然后再从EEPROM中将写入的数据读出读取成
功后,主机板上的小灯处于“常亮”状态。

Function descriptions:
This sample demonstrates communication between the master device using I2C and 
the slave device using the EEPROM peripheral chip P24C32. When the user button 
on the master device is pressed, the master device first writes 15 bytes of 
data to the slave device, ranging from 0x1 to 0xF. Then it reads the written 
data from the EEPROM. Once the data is successfully read, the LED on the master 
board will remain constantly lit.
================================================================================
测试环境:
测试用板PY32F403_STK
MDK版本 5.28
IAR版本 9.20
GCC版本GNU Arm Embedded Toolchain 10.3-2021.10

Test environment:
Test board: PY32F403_STK
MDK Version: 5.28
IAR Version: 9.20
GCC Version: GNU Arm Embedded Toolchain 10.3-2021.10
================================================================================
使用步骤:
1. 编译下载程序到MCU并运行
2. 先复位从机,然后再复位主机
3. 复位完成后按下主机user按键先写15bytes数据0x1-0xf
4. 延时100ms后从eeprom读取15bytes数据
5. 观察主机的LED灯当主机LED灯由常暗转为常亮状态则表明主机收发数据成功当
主机LED灯处于闪烁状态则表明主机收发数据失败。

Example execution steps:
1.Compile and download the program to the MCU and run it.
2.Reset the slave device first, then reset the master device.
3.After the reset is complete, press the user button on the master device to 
write 15 bytes of data ranging from 0x1 to 0xF to the slave device.
4.After a delay of 100 milliseconds, read 15 bytes of data from the EEPROM.
5.Observe the LED on the master board. If the LED transitions from constantly 
dim to constantly lit, it indicates successful data transmission and reception 
by the master. If the LED is blinking, it indicates data transmission or 
reception failure.
================================================================================
注意事项:
PB6  -------> I2C1_SCL
PB7  -------> I2C1_SDA

Notes:
PB6  -------> I2C1_SCL
PB7  -------> I2C1_SDA
================================================================================