Dear friends..
currently I have connected 8 LEDs on these GPIO pins and easily i can access them bit by bit using WRITE_PIN and READ_PIN using gpio-mmap.h file,
These LEDs are glowing according to given values,.
But I want to access all pin at once as a GPIO Port so that I can read all 8 bits in single cycle When I use GPIO_BASE macro from gpio-mmap.h , it given an error "Segmentation fault"..
I am unable to read them, any body can help regarding this topic....
Thanks and Regards,
PRAMOD
Solved! Go to Solution.
HW_PINCTRL_DOUTx registers can change all pins in one shot.
HW_PINCTRL_DOUT0 is defined in arch/arm/mach-mx23/regs-pinctrl.h:
#define HW_PINCTRL_DOUT0 (0x00000500)
#define HW_PINCTRL_DOUT0_SET (0x00000504)
#define HW_PINCTRL_DOUT0_CLR (0x00000508)
#define HW_PINCTRL_DOUT0_TOG (0x0000050c)
I would suggest you to add a new method in arch/arm/mach-mx23/gpio.c which can access the whole HW_PINCTRL_DOUTx register.
You may look into mx23_gpio_set() 's implementation and add your new method.
Regards,
Jacky
Please click Correct Answer if your question has been answered.
Thanks,
Yixing
HW_PINCTRL_DOUTx registers can change all pins in one shot.
HW_PINCTRL_DOUT0 is defined in arch/arm/mach-mx23/regs-pinctrl.h:
#define HW_PINCTRL_DOUT0 (0x00000500)
#define HW_PINCTRL_DOUT0_SET (0x00000504)
#define HW_PINCTRL_DOUT0_CLR (0x00000508)
#define HW_PINCTRL_DOUT0_TOG (0x0000050c)
I would suggest you to add a new method in arch/arm/mach-mx23/gpio.c which can access the whole HW_PINCTRL_DOUTx register.
You may look into mx23_gpio_set() 's implementation and add your new method.
Regards,
Jacky