GPIO Questions

Started by gvi70000, February 06, 2016, 09:17:30 PM

Previous topic - Next topic

gvi70000

Hello

Is it ok to use PH07 as an interrpt input? in sys_config.fex
It is use in [lcd0_para] lcd_used = 1 and also in [lcd0_para] and [ms_para] but they are not used.
In the schematic i cant see any connection with lcd connector


;Serial for XBEE
[uart_para3]
uart_used = 1
uart_port = 3
uart_type = 4
uart_tx = port:PG06<4><1><default><default>
uart_rx = port:PG07<4><1><default><default>
uart_rts = port:PG08<4><1><default><default>
uart_cts = port:PG09<4><1><default><default>

[gpio_para]
gpio_used = 1
gpio_num = 7
;pin_name = port:XXYY<0 is as input, mux 1 as output>
;<pullup/down>
;<drive capability> defines the output drive in mA, values are 0-3 corresponding to 10mA, 20mA, 30mA and 40mA.>
gpio_en_gps = port:PB03<1><1><0><0>
gpio_en_mega = port:PB04<1><1><0><0>
gpio_en_xbee = port:PG03<1><1><0><0>
gpio_reset_xbee = port:PG04<1><1><0><0>
gpio_dtr_xbee = port:PG05<1><1><0><0>
;interrupts
gpio_int_imu = port:PH00<6><default><default><default>
gpio_int_mega = port:PH07<6><default><default><default>


in the init.nun7.rc i have added the following

#  BEGIN CUSTOM SETTINGS FOR GPIO FOR GVI BOARD
#  You will want to comment out these lines or change them to suit
#  your own boards GPIO configuration

# LED driver - Make sure it is off at boot time
# PH02 169 for the demo board

write /sys/class/gpio/export 169
write /sys/class/gpio/gpio169/direction out
write /sys/class/gpio/gpio169/value 0

chown system system /sys/class/gpio/gpio169/value
chmod 777 /sys/class/gpio/gpio169/value

# GPS_POWER_EN PB03

write /sys/class/gpio/export 27
write /sys/class/gpio/gpio27/direction out
write /sys/class/gpio/gpio27/value 0

chown system system /sys/class/gpio/gpio27/value
chmod 777 /sys/class/gpio/gpio152/value

# MEGA_POWER_EN PB04

write /sys/class/gpio/export 28
write /sys/class/gpio/gpio28/direction out
write /sys/class/gpio/gpio28/value 0

chown system system /sys/class/gpio/gpio28/value
chmod 777 /sys/class/gpio/gpio28/value

# XBEE_POWER_EN PG03

write /sys/class/gpio/export 152
write /sys/class/gpio/gpio152/direction out
write /sys/class/gpio/gpio152/value 0

chown system system /sys/class/gpio/gpio152/value
chmod 777 /sys/class/gpio/gpio152/value

# XBEE_RESET PG04

write /sys/class/gpio/export 153
write /sys/class/gpio/gpio153/direction out
write /sys/class/gpio/gpio153/value 0

chown system system /sys/class/gpio/gpio153/value
chmod 777 /sys/class/gpio/gpio153/value

# XBEE_DTR PG05

write /sys/class/gpio/export 154
write /sys/class/gpio/gpio154/direction out
write /sys/class/gpio/gpio154/value 0

chown system system /sys/class/gpio/gpio153/value
chmod 777 /sys/class/gpio/gpio154/value

# END CUSTOM SETTINGS

Are the pins defind in the correct way?
Do i have to define also the interrupt pins? if yes how can i do it?