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.

UCD90320: Programming via data flash script fails

Part Number: UCD90320

Tool/software:

I am using the data flash script file to program the UCD chip from host. I use a function that converts and executes each step in the data flash script file into corresponding i2c read/write. I am observing that the programming fails with below error 

Jan 01 00:05:03 system update: Executing 0x11, 0xE3, 0x0400000000
Jan 01 00:05:03 system p1: Traceback (most recent call last):
Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 187, in <module>
Jan 01 00:05:03 system p1: execute_commands_from_csv(CONFIG_FILE)
Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 105, in execute_commands_from_csv
Jan 01 00:05:03 system p1: execute_BLOCKWRITE(row)
Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 53, in execute_BLOCKWRITE
Jan 01 00:05:03 system p1: bus.write_block_data(dev_addr, pmbus_cmd, data_arg)
Jan 01 00:05:03 system p1: File "/usr/lib/python3.8/site-packages/smbus2/smbus2.py", line 543, in write_block_data
Jan 01 00:05:03 system p1: ioctl(self.fd, I2C_SMBUS, msg)
Jan 01 00:05:03 system p1: OSError: [Errno 5] Input/output error

Note:
1. It's not that its failing from very first step but it fails with above error after executing certain steps from the dataflash script file. 

2. The same program works without any issue on other system. 

Any pointers to why this might be happening? 

  • I also tried changing delay between commands from 0.2ms to 0.5ms but that did not help as well. 

  • Hi,

    Our expert on this device is currently out of office. I will check with the rest of the team, but we may not be able to provide an answer until they return.

    Regards,

    Troy

  • Hi, 

    Did the program fail on random steps or certain step? Can you provide detail on the fail step: what is the command code, what is written data? Is PEC byte enable?

    Anne

  • I have a script which takes in the data flash script (.csv file) and converts each line in the file to a respective PMBus command. For instance, 

    BlockWrite,0x11,0xE2,0x06020100000104 will be converted to a bus.write_block_data,
    BlockRead,0x11,0xE3,0x1000001027000000080000000000000000 will be converted to bus.read_block_data

    When my system starts up, the UCD is powered on and then the script is executed which is supposed to program the configuration of the UCD chip. The script can see the UCD chip on the bus as it can read the device id, check other registers. It then starts programming the chip but fails with below error,

    Jan 01 00:05:03 system update: Executing 0x11, 0xE3, 0x0400000000
    Jan 01 00:05:03 system p1: Traceback (most recent call last):
    Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 187, in <module>
    Jan 01 00:05:03 system p1: execute_commands_from_csv(CONFIG_FILE)
    Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 105, in execute_commands_from_csv
    Jan 01 00:05:03 system p1: execute_BLOCKWRITE(row)
    Jan 01 00:05:03 system p1: File "/usr/local/bin/obmc-nto-ucd-update.py", line 53, in execute_BLOCKWRITE
    Jan 01 00:05:03 system p1: bus.write_block_data(dev_addr, pmbus_cmd, data_arg)
    Jan 01 00:05:03 system p1: File "/usr/lib/python3.8/site-packages/smbus2/smbus2.py", line 543, in write_block_data
    Jan 01 00:05:03 system p1: ioctl(self.fd, I2C_SMBUS, msg)
    Jan 01 00:05:03 system p1: OSError: [Errno 5] Input/output error

    Every time it fails at different step from the data flash script file. Also, the PEC is disabled. 

  • Hi, Dhruv,

    Can you try enable PEC byte? If failures still occur, can you provide detail such as: what is the command code and what is the data bytes?

    Regards

    Anne