Monarco-HAT-Hardware-Reference-Manual

Monarco HAT Hardware Reference Manual 20190728-1
9
ID EEPROM 3.1.2.
Monarco HAT contains EEPROM with device-tree-overlay which is automatically loaded by
Raspberry Pi bootloader. This overlay enables SPI interface and I2C with real time clock (MCP79410)
and 1-Wire controller (DS2482-100) device nodes.
Note for Raspberry Pi 3: In default configuration, UART0 (ttyAMA0, PL011 UART) is used for
embedded Bluetooth interface on Raspberry Pi 3. Monarco HAT EEPROM overlay automatically
remaps UART0 (ttyAMA0) to a standard location (header pins 8, 9) and UART1 (ttyS0, mini-UART) to
Bluetooth controller just like the overlay pi3-miniuart-bt provided by Raspbian. Additional
configuration may be needed to make Bluetooth working because UART1 has limited functionality
3
.
Use Raspbian version released at 2016-05-27 or later with Raspberry Pi 3, as this version introduced
hciuart.service configured to use serial1 device, which is aliased to ttyS0 with Monarco.
The EEPROM contains HAT identification which can be read in /proc/device-tree/hat/:
vendor: REX Controls
product: Monarco HAT
product_id: 0x0001
product_ver: 0x<dtv>106 (may be changed with future hardware revisions)
uuid: fe0f39bf-7c03-4eb6-9a91-df861ae5abcd
Where <dtv> is a version of device-tree-overlay structure. In very rare cases internal device-tree
format can be incompatibly modified between Linux kernel versions. Version history:
0: initial version for Raspbian Linux kernel 4.4, since 06/2016
1: updated version for Raspbian Linux kernel 4.9+ which introduced incompatible rename of
serial ports related device-tree nodes, since 06/2017
Monarco HAT boards are shipped with version compatible with the latest released Raspbian at that
time. After Raspbian upgrade between incompatible versions, additional device-tree-overlay file can
be manually applied, or ID EEPROM can be upgraded to the new format using firmware flashing tool.
More information can be found in the Monarco HAT Documentation GitHub repository
4
.
Note for owfs/owserver users: Device tree overlay provided in EEPROM leads to automatic load of
Linux kernel w1 family drivers. If you want to use owfs/owserver userspace daemon, we
recommend disabling kernel drivers and use i2c-dev directly from owserver for performance
reasons. The most appropriate way to disable Linux kernel drivers and enable i2c-dev is to execute:
echo "blacklist ds2482" > /etc/modprobe.d/blacklist-ds2482.conf
echo "i2c-dev" > /etc/modules-load.d/i2c-dev.conf
3
Option core_freq=250 should be set in /boot/config.txt because baudrate of mini-UART is tied to core
frequency. Baudrate in hciuart.service should be changed to 115200.
4
https://github.com/monarco/monarco-hat-documentation