Page 1 of 1
RevPi Compact EERAM
Posted: 26 Nov 2020, 14:52
by Archie
Has anyone tested the ability to use the EERAM in Codesys on the RevPi Compact? In the past I had to abandon the Connect+ because the lack of non-volatile memory when using Codesys. The only option was to attach a UPS to the system which made it too complex. I'm hoping the Compact resolves this issue to give us a powerful CodeSys based PLC with Non-volatile memory.
Re: RevPi Compact EERAM
Posted: 26 Nov 2020, 15:31
by dirk
Hello Archie, the Memory is also volatile in the Compact Module, so do you think that this EERAM feature from Codesys is able provide non-volatile memory here?
Re: RevPi Compact EERAM
Posted: 26 Nov 2020, 16:11
by lukas
I've documented the EERAM's usage internally but apparently that part of the documentation hasn't found its way to the
Compact Tutorials page yet:
Briefly, the EERAM is exposed as a generic file called /sys/bus/nvmem/devices/1-00500/nvmem. You just need to open/read/write/close this file. Anything written will survive a reboot or sudden power outage.
Whether and how this file can be accessed in Codesys I don't know.
Re: RevPi Compact EERAM
Posted: 27 Nov 2020, 10:44
by lukas
Forgot to mention, support for the EERAM was added after the Stretch 6/2020 image was released. My former colleagues at Kunbus haven't pushed a new release of the raspberrypi-kernel package to the apt-repository since then. Until they do that, you need to build your own kernel with
kernelbakery. Sorry for the inconvenience.
My recollection is that no driver changes were necessary to bring up the EERAM. Only the devicetree overlay had to be amended. So it may be sufficient to just swap /boot/overlay/revpi-compact.dtbo with an updated version. For some reason the devicetree overlay on the official
revpi-4.19 branch does not contain the requisite changes. Not sure what went wrong there, perhaps someone destroyed them. I still have the changes locally in my git repo and pushed them to a new
revpi-4.19-compact branch.
Re: RevPi Compact EERAM
Posted: 27 Nov 2020, 21:52
by Archie
Thank you for the responses. I am taking this to CodeSys to see if the software can be configured to make use of the EERAM through the file path.