Repository navigation
Replies: 4 comments 12 replies
|
SW mechanisms of those jobs and add_job function is not clear |
|
Here are the basic steps involved in an I2C request: The master device initiates communication by sending a START signal on the I2C bus. The start signal is a transition from high to low of the SDA (serial data) line while the SCL (serial clock) line is high. This signals the beginning of a new communication sequence on the I2C bus. When a start signal is sent, all slave devices connected to the bus will read the incoming address and data, and respond accordingly. The start signal is followed by the 7-bit slave address and a bit to indicate whether the master wants to write to or read from the slave device. The least significant bit (LSB) of the 7-bit slave address is used to indicate the direction of the communication. When the LSB is 0, it indicates that the master device wants to write data to the slave device. When the LSB is 1, it indicates that the master device wants to read data from the slave device. If the slave device is present on the bus, it will send an ACK (acknowledge) signal back to the master device.The ACK signal is a brief pulse of the SDA (serial data) line going low, while the SCL (serial clock) line is high. If the master device does not receive an ACK signal after sending a data byte to a slave device, it knows that the transfer has failed and can retry the transfer, send a stop signal, or take other appropriate action. If the master wants to write data to the slave device, it sends the data to the slave device. data is 8 bits long, and the ACK bit is sent after the 8th data bit has been received. Therefore, the ACK bit is an additional bit that follows the 8 data bits. ACK is sent after every data byte received. If the master wants to read data from the slave device, it sends a repeated START signal followed by the slave's address and a bit to indicate that it wants to read from the slave device. The slave device then sends the requested data back to the master device. master device can specify how many bytes it expects to receive from the slave device during a read request by sending an additional data byte called the "read request length" or "read command". The read command consists of a single data byte that is sent by the master device after the slave device has acknowledged the read request. The specific format of the read command byte can vary depending on the implementation of the I2C protocol, but typically the most significant bit (MSB) of the byte is set to 1 to indicate that it is a read command. The remaining bits of the byte can be used to specify the number of bytes to be read, or to encode additional information such as the register address or other control bits. Once the slave device receives the read command from the master device, it knows how many bytes of data to send in response. The slave device will then send the specified number of data bytes to the master device, and the master device will acknowledge each byte with an ACK signal until it has received all of the expected data. The master device sends a STOP signal to end the communication. The stop signal is typically represented by a "stop condition" on the bus, which consists of a high-to-low transition on the SDA (data) line while the SCL (clock) line is high. This is also known as a "negative edge" transition, since it involves the SDA line transitioning from a high level to a low level while the SCL line remains high |
|
Yes, I think so. I am not aware if we changed this (tx-rx transition) between pegasus and climb. But if you tell me that you changed onl flatbed and PSU firmware and it broke, then I don't see any value in changing/analysing OBC-Code !? ;-) -> look for flatbed hardware and PSU software changes to get what broke it.... |
|
I think, this I2C Master -> Slave procedure 1. Write Some bytes M->S and then immediate 2. read some bytes is pretty standard for master slave data transfer. |




Uh oh!
There was an error while loading. Please reload this page.
Need to implement a delay between adding the jobs (processing ??)for I2C.
Delay between write and read job should be implemented in accordance to cooperative multitasking. (what on an example is wrong)
All reactions