• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FRAM access
#1
If I try that with a python:2 container, I get the following error when starting:
linux runtime spec devices: error gathering device information while adding custom device "/dev/i2c-1": lstat /dev/i2c-1: no such file or directory

Sorry, my mistake. Works perfect now.
  Reply
#2
netPI RTE 3 features an 8KB FRAM of type FM24CL64B from Cypress that is connected to the netPI's I2C bus. Linux instantiates this I2C bus as device named /dev/i2c-1.

To access the FRAM in a container you have to expose this host device /dev/i2c-1 to the container when you set up its start parameter in the Docker web UI: configure Advanced container settings/Runtime/add device/Host path=/dev/i2c-1 -> Container Path=/dev/i2c-1.

The FRAM operates as an I2C slave device and occupies the I2C address 54hex. It shares the I2C bus with the RTC chip occupying the I2C address 51hex. Install a command line toolkit with apt-get install i2c-tools to make some I2C tests in a shell. Using the command i2cdetect for example outpus a scan list of all detected I2C devices. You wll get indications for devices at address 51hex and 54hex.

The FRAM's datasheet explains the sequence of bytes to be exchange over the I2C bus for proper read and write operations. If you have installed the GNU compiler using the apt-get install build-essential your are able to compile the example code appended. Before you start the compilation you need to install the needed I2C library on your system with apt-get install libi2c-dev. Compile it then with gcc -o fram_test fram_test.c and start it with ./fram_test.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  netPI RTE + remote access + IO data access on ethernet/ip MGharat 1 2,172 December-24th-2020, 01:43 PM
Last Post: Armin@netPI
  SPI access using extender Irina Grinberg 8 4,957 January-16th-2020, 03:15 PM
Last Post: Armin@netPI
Photo [SOLVED] netPI Access Problem Rahulsagar 5 5,039 October-18th-2018, 12:05 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)