Page 56 of 90
CCT24
4.2.7 Bank 6 - I/O Setup
Size in Range
Bank
Loc'n
Name
R/W
bytes
in bits
Default; Options
0x06
0x00
GPIO_Dir
R/W
1
6
0
(all inputs)
0x06
0x01
GPIO_Init
R/W
1
6
0
(all zeros)
0x06
0x02
GPIO_Alt
R/W
1
6
0x08
= use GPIO3 for RS485 enable
0x06
0x03
GPIO_Edge Trigger
R/W
1
8
0x00
0x06
0x04
GPIO_SleepMode
R/W
1
1
0 = off
; 1 = use sleep I/O states
0x06
0x05
GPIO_SleepDir
R/W
1
6
0
(all inputs)
0x06
0x06
GPIO_SleepState
R/W
1
6
0
(all zeros)
0x06
0x07
PWM0_Init
R/W
2
10
0x0000
0x06
0x09
PWM1_Init
R/W
2
10
0x0000
0x06
0x0B
ADC_SampleIntvl
R/W
2
16
0x0001
(10 ms)
0x06
0x0D
ADC0 ThresholdLo
R/W
2
10
0x0000
0x06
0x0F
ADC0_ThresholdHi
R/W
2
10
0x03FF
0x06
0x11
ADC1_ThresholdLo
R/W
2
10
0x0000
0x06
0x13
ADC1_ThresholdHi
R/W
2
10
0x03FF
0x06
0x15
ADC2_ThresholdLo
R/W
2
10
0x0000
0x06
0x17
AC2_ThresholdHi
R/W
2
10
0x03FF
0x06
0x19
IO_ReportTrigger
R/W
1
0..1
0x01 (GPIO0)
0x06
0x1A
IO_ReportInterval
R/W
4
32
0x00000BB8
(every 30 seconds)
0x06
0x1E
IO_ReportPreDel
R/W
1
8
0x00
0x06
0x1F
IO_ReportRepeat
R/W
1
8
0x01
GPIO_Dir
- this parameter is a bitmask that sets whether the GPIOs are inputs (0) or outputs (1). The
default is all inputs.
GPIO_Init
- this parameter is a bitmask that sets the initial value for any GPIOs which are enabled as
outputs.
GPIO_Alt
- this parameter is a bitmask to select alternate functions for GPIO3, GPIO4 and GPIO5 as
shown below:
Bit
Alternate function
3
GPIO3 functions as an RS-485 driver enable output
4
GPIO4 functions as an SPI_RX_AVL (SPI RX data available) flag
5
GPIO5 functions as an antenna diversity control output
GPIO_EdgeTrigger
- when GPIO triggers are enabled for automatic I/O reporting, this function controls
the trigger behavior:
bits 7..6
GPIO3 edge function
bits 5..4
GPIO2 edge function
bits 3..2
GPIO1 edge function
bits 1..0
GPIO0 edge function
The bit values for each GPIO map to the following settings:
Value
GPIO edge behavior
11
Rising edge trigger, neither level keeps remote awake
10
Bidirectional edge trigger, neither level keeps remote awake
01
Rising edge trigger, holding high keeps remote awake
00
Falling edge trigger, holding low keeps remote awake
GPIO_SleepMode
- this parameter is a bitmask that enables configuring the I/O direction and state of
GPIO0..GPIO5 when the module is sleeping. Bits 0..5 correspond to GPIO0..GPIO5. Setting a
Gpio-
SleepMode
bit to 1 enables sleep mode configuration of the corresponding GPIO. Setting a
GpioSleep-
Mode
bit to 0 causes the corresponding GPIO to remain configured as in active mode. Note that when the