大家好。
我通过DMA通过I2C在STM8L152上遇到了麻烦。当接收1个数据字节时,它接收2个字节第1个:一些错误(0x1F,0x1E,0x0E)和第二个字节(看起来像必要的数据)。
在接收长序列的情况下,大约100个字节,相同的情况。第一个字节有些“垃圾”,下一个是普通数据。
我尝试与加速度计MMA8652进行
通信。
F_MCU = 2MHz。
F_I2C = 100kHz。
带有Cosmic编译器的STVD 4.3.10。
谁有在STM8L上使用DMA的I2C经验或同样的问题,这个问题的解决方法是什么?
#i2c #dma#stm8l
以上来自于谷歌翻译
以下为原文
Hello Everyone.
I have trouble on STM8L152 with I2C through DMA. When receiving 1 data byte its receive 2 bytes 1st: some wrong (0x1F, 0x1E, 0x0E), and second byte (looks like necessary data).
In case when receive long sequence, around 100 bytes, the same situa
tions. The first byte some 'rubbish', next one is normal data.
I'm try communicate with accelerometer MMA8652.
F_MCU = 2MHz.
F_I2C = 100kHz.
STVD 4.3.10 with Cosmic compiler.
Who have experience in I2C with DMA on STM8L or the same issue, what the workaround for this issue?
#i2c #dma #stm8l
0