Skip to content

I2C as Master, sending data. [3.1.2] #8961

Open
@Palingenesis

Description

@Palingenesis

Basic Infos

This is an I2C issue.

  • [?] This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP8266]
  • Core Version: [Latest does not work with this issue. The issue is I have to use old 2.0.10]
  • Development Env: [Arduino IDE]
  • Operating System: [Windows]

Settings in IDE

  • Module: [Nodemcu 1.0]
  • Flash Mode: [qio|dio|other]
  • Flash Size: [4MB(2M SPIFFS)]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [nodemcu]
  • Flash Frequency: [N/A]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200]

Problem Description

I have used a Data logger on the SDA and SCL

  1. (Write mode) the issue is between the Address Byte and the First Data Byte. There is a bit set high. 00000000 > 10000000. It could be because SDA is flipped at the wrong time during ACK.
  2. Also at the end of transmission the SCL has an extra pulse that holds onto the bus. I think it is the same reason as above.
  3. (Read mode) I think if you fix the write mode, this will be fixed also.

Ver. 3.1.2 results ISSUE
Ver. 2.5.0 results OK

My fix:

  1. Use version 2.5.0
  2. With version 2.5.0 it all works perfect.
  3. I do not know where the fault got introduced between 2.5.0 and now, I cant me arsed to find out. I have a working fix for my purposes.
  4. Note I had a similar issue when I wanted to use interrupts in a project, I had to do the same, use ver. 2.5.0

MCVE Sketch

#include <Arduino.h>
#include <Wire.h>

char Buffer_TX[64];		/* message				*/

void SendBufferOnI2C(int I2C_address) {

	Wire.beginTransmission(I2C_address);	//	Get device at I2C_address attention
	Wire.write(Buffer_TX, 64);			//	Send Buffer_TX
	Wire.endTransmission();				//	Stop transmitting

}

Debug Messages

See images.
The issue cannot be found with code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions