OSD32MP1-BRK

Forums Devices OSD32MP15x OSD32MP1-BRK

Viewing 6 reply threads
  • Author
    Posts
    • #15698
      MLML
      Participant

        Hi all

        I would like to program the 4K EEPROM residing in OSD32MP157C chip.

        I am using OSD32MP1-BRK which contains the chip.

        Anyone can advise me how to do it?

      • #15700
        Neeraj Dantu
        Moderator

          ML,

          The EEPROM is configured in the device tree here: https://github.com/octavosystems/OSD32MP1-BRK-device-tree/blob/kirkstone/linux-v5.15.24-stm32mp1-r1/stm32mp157c-osd32mp1-brk.dts#L837. You should be able to access it using the SYSFS via ‘/sys/bus/i2c/devices/3-0050/’. ‘3’ is the I2C interface number that the EEPROM is on and ‘0050’ is the address of the EEPROM. This directory contains file “eeprom”, which you can use to interact with the EEPROM. Please see https://stackoverflow.com/a/60781512.

          There are a number of other ways including using Linux IOCTL/python libraries/[shell commands: i2ctools]. See https://wiki.st.com/stm32mpu/wiki/I2C_i2c-tools for useful info on using i2ctools.

          Best,
          Neeraj

        • #15746
          MLML
          Participant

            HI Neeraj, thanks for the reply!

            I am green horn in this area ;p so not quite sure what u meant by to access the EEPROM (in the device tree) via SYSFS.

            What are the appropriate software platform I will need to install in order to do what u meant? Also how do I download the modification (done to the EEPROM) to my development board – OSD32MP1-BRK? Many thanks to u again!

          • #15750
            Neeraj Dantu
            Moderator

              ML,

              Please see https://www.kernel.org/doc/Documentation/i2c/i2c-sysfs.rst for an overview of I2C SYSFS. The EEPROM driver invoked by the device tree provides entries in /sys/bus/i2c/devices directory that you can interact with as files.

              The default Linux image should come with EEPROM device driver enabled. Images for BRK are available here: https://octavosystems.com/octavo_products/osd32mp1-brk/#Software/. See also: https://octavosystems.com/app_notes/osd32mp1-brk-getting-started/.

              Best,
              Neeraj

            • #15772
              MLML
              Participant

                I follow the steps listed here https://octavosystems.com/app_notes/osd32mp1-brk-getting-started/#trouble

                But I am still unable to detect new network adapter called Remote NDIS Compatible Device though I have configured the boot switch to 101 and also saw the red LED blinking.

                I cannot find this adapter in network connection or under Other devices in the Device Manager.

                Can anyone advise me what can be done?

              • #15778
                Neeraj Dantu
                Moderator

                  ML,

                  I would suggest trying a different USB cable(some cables only provide power).

                  Also, you should be able to use a USB to UART adapter to connect to the UART interface(marked TX, RX and GND) near the SD card slot. This will allow you to use a program like Putty to open a terminal on your computer and monitor the console log output of the BRK board when it is booting. After it boots, it will also provide a console for you to type in commands like “ifconfig” to see the Ethernet configuration from the board side. An example adapter can be found here: https://learn.sparkfun.com/tutorials/sparkfun-usb-to-serial-uart-boards-hookup-guide/all.

                  Best,
                  Neeraj

                • #15779
                  MLML
                  Participant

                    Thanks Neeraj,

                    I did the following:

                    Write to EEPROM:

                    echo -n -e ‘\xAB\xCD\xEF’ | dd of=/sys/bus/i2c/devices/3-0050/eeprom bs=1 seek=16

                    Added delay

                    sleep 0.1  # Add a small delay to ensure write completion

                    Tried to read the EEPROM:

                    dd if=/sys/bus/i2c/devices/3-0050/eeprom bs=1 count=3 skip=16 2>/dev/null | hexdump -C

                    Result:

                    00000000  ff ff ff                                          |…|

                    00000003

                    I expected to see AB CD EF but did not. Can you advise me what went wrong?

                    • This reply was modified 1 day, 10 hours ago by MLML.
                Viewing 6 reply threads
                • You must be logged in to reply to this topic.