Commit 02ea8fd9 authored by Benoit Rat's avatar Benoit Rat Committed by Miguel Jimenez Lopez

dio: correct doc and comments for first channel (ch0) mode

The first channel is set with 0 so that we force it to be output mode
p/P & i/I mode will be only available for ch0, and D,d,1,0 will not be
working (they will be seen as p/P).
parent 0870a959
......@@ -108,7 +108,7 @@ Note that dio channels time base work wth 8 ns accuracy for inputs time-tagging.
In order to use input/output channels as previously described, the following actions are required:
* The I/O mode of each channel controlled by the `dio_iomode` register:
* [0-1]: The two first bit correspond to which signal its connected: 0 (00) GPIO, 1 (01) DIO core, 2 (10) Undefined, 3 (11) Undefined
* [0-1]: The two first bit correspond to which signal its connected: 0 (00) GPIO, 1 (01) DIO core, 2 (10) Clock, 3 (11) Undefined
* [2]: Output Enable Negative (Input enable)
* [3]: 50 Ohm termination enable.
......@@ -118,9 +118,9 @@ In order to use input/output channels as previously described, the following act
By default the register is set with:
1. 0x0 (PPS Output without termination)
#. 0x0 (GPIO out without termination)
#. 0x0 (...)
#. 0x0 (...)
#. 0x4 (Input without termination)
#. 0x6: Clock[^clkinput] input without termination.
......
......@@ -840,9 +840,9 @@ begin
if rising_edge(clk_sys_i) then
-- Set default configuration for each channel at reset
if rst_n_i = '0' then
dio_iomode_reg(0*c_IOMODE_NB+3 downto 0*c_IOMODE_NB) <= "0000"; -- mode 0 0
dio_iomode_reg(0*c_IOMODE_NB+3 downto 0*c_IOMODE_NB) <= "0000"; -- mode 0 p
dio_iomode_reg(3*c_IOMODE_NB+3 downto 3*c_IOMODE_NB) <= "0100"; -- mode 3 i
dio_iomode_reg(4*c_IOMODE_NB+3 downto 4*c_IOMODE_NB) <= "0110"; -- mode 4 C
dio_iomode_reg(4*c_IOMODE_NB+3 downto 4*c_IOMODE_NB) <= "0110"; -- mode 4 c
else
-- Set up register iomode for each channel
for i in 0 to 4 loop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment