{{page>en:hw:004-edge:edge-in-development-hidden}} ====== Other peripherals ====== ===== TPM ===== {{section>.:tpm-hidden#reduced&noheader}} ==== TPM technical parameters ==== {{section>.:tpm-hidden#technical_parameters&noheader}} ===== Retain ===== Retain memory is a fast non-volatile memory used for storing current values of chosen variables. It is separated from eMMC storage and thus do not reduce the lifespan of the main storage. /* Character device */ |< 100% 35% >| | Path in the OS | /run/unipi-plc/by-sys/retain/mem | ==== Retain technical parameters ==== |< 100% 35% >| | Memory size | 128 kB (default) | | Memory type | NVRAM | | Bus | SPI (30 MHz) | /* spi4 */ | Model | MB85RS1MT | | Lifespan | 1013 times / byte | /* | Write speed | 1,7 - 2,1 MB/s | | Chip | FRAM (MB85RS1MTPNF-G) | ==== ==== */ ===== RTC ===== RTC (Real-time clock) can keep track of elapsed time, even when the device is powered off or is not connected to internet. |< 100% 35% >| | Path in the OS | /dev/rtc | ==== RTC technical parameters ==== |< 100% 35% >| | Battery | CR2032 lithium battery | /* tohle bych nechal aby se dalo najít jak dlouho to přibližně vydrží... pokud ten údaj budeme mít tak poté se tento řádek může výdrží bez napájení nahradit */ /* | Calibrated | Yes | */ | Bus | I2C | /* i2c-1 */ | Model | MCP79410 | | Lifetime | approx. 10 years | /* | Battery life without power | approx. x days |*/ ==== ==== ===== Hardware Watchdog ===== /* Hardwarový watchdog hlídá přítomnost periodických pulsů na pinu WDG (GPIO27) a vyresetuje jednotku s pomocí úplného vypnutí napájecího zdroje, pokud puls nepřijde v desetisekundovém časovém okně. Vzhledem k tomu, že se vyhodnocení děje na konci pevného desetisekundového okna (viz obrázek), může se stát, že k resetu dojde v čase mezi Tmin=10sec až Tmax=20sec od posledního platného pulsu. Tyto časy nelze standardním způsobem customizovat. Hardwarový watchdog je neaktivní dokud není aktivován prvním pulsem. Automatické generování pulsů na pinu WDG je ve standardním firmware zapnuté, první pulsy již generuje //uboot// obsluhující zavaděč systému a následně obsluhu po bootu přebírá démon //systemd//. Pokud běží kernel i systemd tak generuje jeden pasivační puls každé 4 sekundy. Systemd lze nastavit, aby hlídal více aplikací současně. Když aplikace neposílá zprávu do `systemd`, může tento být nastaven, aby onu službu restartoval. Více viz dokumentace nástroje //systemd//. Tato automatická ochrana pomocí systemd může být v customizovaném image pro zákazníka vypnuta a funkcionalita přenechána pro speciální případy přímo uživatelské aplikaci. Doporučujeme ji mít však pro kritické aplikace zapnutou. Jednotka disponuje i funkcionalitou, nazvanou MasterWatchdog, která hlídá komunikaci I/O subsystému s jednotkou. Tato funkcionalita je na hardwarovém watchdogu nezávislá a implementována odlišně (viz sekce MasterWatchdog) */ ### Hardware watchdog checks for periodic pulses on WDG pin (GPIO27) and reboots the devices by [[#cold_reboot|cutting off the power supply]] if no pulse is detected within 10 second window. It is possible the reboot happens somewhere between Tmin=10 sec and Tmax=20 sec after last pulse, because the check is a the end of fixed 10 second window (see image). The intervals cannot be normally changed. Hardware watchdog is inactive until it is activated by first pulse. ### ### Automatic pulse generation on WDG pin is by default enabled in firmware. First pulses are generated by **uboot** boot loader, after that the pulse generation is left to **systemd** daemon. If both kernel and **systemd** are running, then **systemd** generates one pulse every 4 seconds. **Systemd** can be configured to watch multiple application at once. When the application is not sending messages to **systemd**, it can be set up to reset the application in such case. More information can be found in the **systemd** documentation. This automatic safeguard using **systemd** can be disabled for customers in customized image and for this special case the functionality is passed to user application. We recommend to have this functionality enabled for critical applications. ### /* The device also features functionality named MasterWatchdog, which checks communication between I/O subsystem and the device. This functionality is independent from hardware watchdog and implemented differently (see MasterWatchdog section). */ {{ en:hw:edge-ig019.png?620 |}} {{ :files:img_warning-line_b.png?nolink |}} {{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(!)}} **Note:** \\ Dedicated watchdog and [[..:02-description-of-io:01-description-of-di#mwd|Master watchdog (MWD)]] are two separate systems! {{ :files:img_breakline_light_blue.png?nolink |}} While dedicated watchdog monitors if the operating system is running correctly, the MWD is present only for variants with I/O and monitors communication with I/O subsystems. /* ==== Studený restart jednotky ==== Studený restart jednotky (Cold boot / Cold reboot / Cold start .. synonyma vyber si) Jednotka umožňuje studený restart sama sebe s pomocí pinu GPIO26, který při nastavení do log. 1 na dobu alespoň 1 ms provede hardwarové odpojení napájecích zdrojů na dobu alespoň 50 ms a tím restartuje řídící počítač i se všemi periferiemi. Tento proces je ve standardním operačním systému prováděn automaticky ve vhodný okamžik po spuštění příkazů **poweroff** i **reboot**. Tyto příkazy tedy oba vyvolají studený restart jednotky. Uživatel, nebo aplikace může v případě potřeby této HW funkcionality využít. POZOR: Jednotku nelze se standardním programovým vybavením "vypnout" ani přepnout do neaktivního, úsporného režimu, pouze restartovat. */ ===== Cold reboot ===== The device can cold reboot itself with pin GPIO26. When this pin is set to log. 1 for at least 1 ms, then all power supplies in the device are cut off for at least 50 ms, which reboots the compute module and all peripheral. In standard OS this process is done automatically after calling **poweroff** or **reboot** command at appropriate moment. Both command will cause a cold reboot of the device. User or any application with correct rights can use this HW feature. {{ :files:img_warning-line_b.png?nolink |}} {{ :en:hw:09_safety-instructions_pseudo-ISO-7010-attention.png?nolink |(!)}} **Attention:** \\ In standard SW the unit cannot be turned off, go to sleep/hibernation or switched to low power mode, but only rebooted. ===== Service button ===== Input device emulating the ENTER key. It is also used to access the service mode. |< 100% 35% >| | Path in the OS | /dev/input/event0 | ===== ULED ===== User programmable LEDs which can be set to indicate any event or state. They can be controlled from the user program or directly from OS. |< 100% 35% >| | Path in the OS | /run/unipi-plc/by-sys/ULED**x**/brightness | {{ :files:img_warning-line_b.png?nolink |}} {{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(!)}} **Note:** \\ Replace **x** with ULED number. ---- |< 100% 35% >| | Color | Green | | Off value | 0 | | On value | 1 (or any other than 0) | {{ :files:img_warning-line_b.png?nolink |}} {{ :en:hw:09_safety-instructions_pseudo-ISO-7010-attention.png?nolink |(!)}} **Attention:** \\ When reading ULED from Modbus registers mind that this value is cached (together with ULED coils). Avoid using Modbus and sysfs together to read/write ULEDs, otherwise the Modbus can return incorrect values.