doc: write README

This commit is contained in:
King Kévin 2022-08-09 10:47:08 +02:00
parent bb00e9c67d
commit 695e5dc9f4
1 changed files with 54 additions and 2 deletions

View File

@ -1,2 +1,54 @@
firmware template for ST STM8S micro-controller.
includes register definitions using macros and structures.
firmware for [HDMI firewall v2](https://git.cuvoodoo.info/kingkevin/board/src/branch/hdmi_firewall).
usage
=====
functions:
- upon request by the device/source over the HDMI DDC interface, the HDMI firewall returns the EDID stored in its EEPROM
- if the EDID/7 switch is on the ALLOW/ON position, when powered (e.g. device plugs in), it will retrieve the monitors EDID and store it in EEPROM (ERROR LED will blink once)
- once the EDID copied, it will try to re-connect to device by pulsing the Hot Plug Detect (HPD)
- stored EDID adds a '|' at the end of the name to indicate firewall is used
- if DDC is forwarded (e.g. SCL and SDA switches are on the ALLOW position), the HDMI firewall does no interfere with the signals, does not return the stored EDID, and does not firewall the communication
if the ERROR LED is on, the possible cause is one of the following:
- no EDID might is present in the EEPROM
- tried reading the EDID from the monitor, but it is not connected
- communication with monitor failed, due to damaged cable
- monitor EDID is invalid
limitations
===========
stored EDID has only up 1 EDID extension.
some monitors might use more to offer additional features, but I haven't encountered this case yet.
flashing
========
the firmware is for an STM8S103.
the debug port on the HDMI firewall allows to flash and debug the firmware.
to compile the firmware using [SDCC](http://sdcc.sourceforge.net/):
~~~
make
~~~
to flash the firmware with [stm8flash](https://github.com/vdudouyt/stm8flash) using an ST-LINK/V2 (clone):
~~~
make flash
~~~
to store the generic HD EDID profile in EEPROM:
~~~
make eeprom
~~~
this uses the `edid_cuvoodoo.bin` binary EDID, which you can replace with your own.
to enable printf debugging, set `DEBUG` to `1` in `main.c`.
the serial configuration in 115200 8N1.