ADXL345 INT1 INT2 pin mapping for ISR to run

73 views
Skip to first unread message

Prakash Dash

unread,
Nov 24, 2018, 1:36:46 AM11/24/18
to BeagleBoard
I am using 4.9 kernel which is having ADXL34x driver configured as module.
After cross compile i am able to detect the device in kernel but ADXL345 interrupt is not generating.

I made this below changes in device tree. I mapped interrupt 5 of the interrupt controller to adxl345 device.
i could not able to see any interrupt generating while i am rotating the device.

Actually i porting this device externally with the beaglebone black board.

pin configuration of ADXL345 device with the beaglebone black board.

Header                   Pin             ADXL345 Pin
=======                ===           ===========
P-9                          17             SCL
P-9                          18             SDA
P-9                          01             GND
P-9                          03              VCC

But i did not map INT1 and INT2 pin of ADXL345 device to any of the pin header of Beaglebone black. but i mapped the interrupt number  <5> of Interrupt controller to
ADXL345 in devicetree configuration.

&i2c1 {

          adxl345@0 {
                        
                                compatible = "ti,adxl34x";
                                reg = <0x53>
                                interrupt-parent = <&intc>
                                interrupts = <5>
           };
};

can someone please tell me whether i am following the right procedure or not.if the procedure is correct then ca someone please tell me why interrupt is not generating.

if the procedure is not correct then can someone please help me on this to how to generate interrupt in ADXL345 device.


For me device pin mapping is done using breddboard to P-9  header of the Beaglebone Black.
I am able to detect the device but while rotating the device i am not getting the X,Y,Z co-ordinate.
Even register update also not happening.

I am trying to read the DATA_READY bit of INT_SOURCE register inside the ISR routine to collect the data of X,Y,Z axis but ISR routine is not calling.


For ISR should run is it required to map INT1 or INT2 pin of ADXL345 from  breadboard to any of the pin of the P-9 header so that CPU will get notified and call the device ISR for run.

Can someone please help me on this.

Jim F

unread,
Nov 24, 2018, 8:37:39 PM11/24/18
to beagl...@googlegroups.com
You'd have to read the data sheet of the sensor to know if it can work that way. Most of the time the interrupt pins need to actually be connected to the processor somehow to work. I'd suggest that you connect them to gpios, configure the BB gpio pins as interrupts, and check the data sheet to see if you need to configure the sensor to set the interrupts. 

J

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/50616419-2f72-4e09-8088-792eb4d56eb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prakash Dash

unread,
Nov 24, 2018, 10:25:40 PM11/24/18
to beagl...@googlegroups.com
Hi Jim,

My driver is implemented based on the Interrupt not poll based so i configured one of the GPIO pin for interrupt.

Could you please tell me what is the use of these two interrupt pin INT1 and INT2 given for the device.

As per my understanding i can use these device in poll based without mapping these interrupt pins but
My ADXL345 client driver support interrupt based that is why i mapped one of the interrupt pin INT1 to one of the GPIO
pin.

could you please correct me if i am wrong.

Thanks
Prakash

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/9TOPrQh6cbQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAGS%2B2h88MyLvfDEWb-dS1vvQER3hMrrSdmWZm2WB172GKArd3w%40mail.gmail.com.

Jim F

unread,
Nov 24, 2018, 11:07:33 PM11/24/18
to beagl...@googlegroups.com
I'd check out the data sheet. Page 20 covers an overview of the interrupt configuration. I guess you can use either one, depending on how you set the registers. 

You can poll that sensor all day long. But if you want to use the interrupts, you have to connect the pins, at least one of them, and then configure.

J

Prakash Dash

unread,
Dec 3, 2018, 9:38:21 PM12/3/18
to beagl...@googlegroups.com
Hi Jim,

Want to integrate and port one TouchScreen device into beaglebone black.
Could you please tell me Focal Tech FT5x06 Touch Screen will be supported in Beaglebone Black or not.

if not Could you please suggest which TouchScreen will be good and where should i get the Kernel Driver for that TouchScreen.


Thanks
Prakash

Reply all
Reply to author
Forward
0 new messages