This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DS90UH927QEVM: DS90UH927QEVM how to send 4 byte data.

Part Number: DS90UH927QEVM
Other Parts Discussed in Thread: ALP

HI

I have received the board that our customer needs for testing.

Following the customer's requirements, I issued I2C commands with the aim of ultimately controlling the PWM duty cycle of the MCU.

However, since the PWM did not change, I used a logic analyzer to verify the I2C signals.

I want to send 4 bytes of I2C data, but in actual measurements,

it is being divided into two separate transmissions.

[system block]

[customer MCU I2C command ]

  • Hi Adams,

    Could you please give us more information about the registers being written to for the PWN LED control?  If you could share that section of the MCU PWM control, then we can look further into how it works.
    What are the registers on the MCU to control this? What is the function of the "ADD" 2byte? 

    Best regards,
    Ikram

  • Dear Ikram

    Since we are OEM manufacturers for our customers, the MCU firmware is not designed by us.

    We need to test the customer's board during production using DS90UH927.

    The customer has provided I2C communication specifications and control commands, such as PWM 100% (0xE2, 0x02, 0xFF, 0x03).

    For example, when using  board.WriteI2C(0xE2, 0x02, [0xFF, 0x03]) to send an I2C command once,

    the data sent by DS90UH928, as measured through a logic analyzer, appears to be split into two sets of 3-byte data: 0xE2, 0x02, 0xFF, and 0xE2, 0x02, 0x03.

    I'm unsure if this discrepancy is causing the lack of PWM response.

  • Hi Adams,

    Are the other I2C commands to the MCU working as needed? We're wondering if there is an addressing issue.
    In your post you shared the script used on ALP. Could you please share the full initialization script from there? 

    It seems like the multi-byte write command is being split into two transactions. I will test this in the lab and get back to you by Wednesday.

    Best regards,
    Ikram

  • Dear Ikram,

    I wrote a simple I2C transmission program using another EVB board, connected it to the DS90UH928 and the MCU's I2C BUS.

    By sending (PWM duty 100%) 0xE2, 0x02, 0xFF, 0x03, and (PWM duty 0%) 0xE2, 0x02, 0x00, 0x00, I could successfully control the MCU's PWM.

    This confirms that the MCU can be controlled properly. 

    WriteI2C(0xE2, 0x02, [0xFF, 0x03]) on the Analog LaunchPAD and measuring the I2C of DS90UH928, the I2C data is split into two sets: 0xE2, 0x02, 0xFF, and 0xE2, 0x03, 0x03.

    This seems to be the reason why the MCU cannot be controlled properly.

    How can I resolve the issue of sending 4-byte I2C data being split into two sets of 3-byte data?

  • Thank you Adams, I will test this in the lab and get back to you.

    Best regards,
    Ikram

  • Dear Ikram,

    When testing the reading of I2C data, I found that errors occur when attempting to read commands exceeding 4 bytes.

    Is there any additional configuration required before issuing commands in scripting?

    I feel like I might have missed a step.

  • Hi Adams,

    You can do the I2C read using this command: 
    board.ReadI2C(addr, reg, reg_length)

    eg. board.ReadI2C(0xE2,0x70,4) for a 4 byte address

    Best regards,
    Ikram

  • Dear Ikram,
    Regarding the issue of sending 4-byte I2C data being split into two sets of 3-byte data,

    do you have any thoughts on the matter at the moment?
    I still can't find a solution.

  • Hi Adams, 

    I am still working to bring this up with the same EVMs and capture the transactions. Another question; are you able to read from this MCU? And are there other writes to 1 byte registers which are successful? I am wondering if this is only an issue with the 2 byte registers.

    - Ikram

  • Dear Ikram,

    Over the past few days, I have been trying other methods to resolve the issue.

    1.When sending the command board.WriteI2C(0xE2, 0x02, [0xFF, 0x03]) from the Analog LaunchPAD, I observed that the I2C output from the ATMEL MCU on the DS90UB927 EVM is already split into two sets of data: 0xE2, 0x02, 0xFF and 0xE2, 0x03, 0x03.

    2.Reading from DS90UB927 or DS90UH928 is not an issue when the data is 1 byte. Therefore, using board.ReadI2C works fine. However, attempts to read using the customer-provided MCU read commands (0xE2, 0x30, 0xE3, 0x30, 0x01 and 0xE2, 0x00, 0xE3, 0x00, 0x07) through the Analog LaunchPAD seem unsuccessful.

    3.I attempted to use another EVB connected to the ATMEL MCU's I2C on the DS90UB927 EVM to directly send signals to DS90UB927 as a replacement for the Analog LaunchPAD, but so far, it has not been successful.

    Best regards,

    Adams

  • Hi Adams,

    That's a great observation about the ATMEL MCU data already being split. 

    I attempted to use another EVB connected to the ATMEL MCU's I2C on the DS90UB927 EVM to directly send signals to DS90UB927

    Did you mean you tried to use the external I2C controller on the 927 EVM? If possible could you try to write to that bus using a separate MCU board? If that's what you tried, was there still the same issue showing with the logic analyzer?

    Best regards,
    Ikram

  • Dear Ikram,

    Yes, as shown in the picture, I have connected the ESP32 EVB to the DS90UB927EVM.

    Reading/writing to the MCU via ESP32 I2C is functioning normally.

    However, there is an issue when the DS90UB927EVM is powered up; attempting to configure the registers of DS90UB927 directly from ESP32 using I2C does not work.

    It seems that an initial configuration using ALP is necessary, and I am unsure if ALP performs any additional setup for the Atmel AVR on DS90UB927EVM.

    Currently, my proposed solution is to consolidate the register settings for both 927 and 928 into a Python script and execute it once using ALP.

    Subsequent testing will be conducted on the ESP32 EVB.

    Best regards,

    Adams

  • Hi Adams,

    Using the ESP32 connected to the 927 are you now able to write to the remote MCU on the 928? 

    Using the 927 EVM I2C you should be able to run the initialization scripts to set up I2C passthrough. You mentioned that function is not working right now. Is the device not acknowledging the I2C transactions?

    - Ikram