Accelerometer on toolboard 1.1
-
Hi, i have a custom made toolboard based on toolboard v1.1, where INT1 from accelerometer is connected to PA19. When trying to run input shaping plugin i got a "Failed to start accelerometer data collection : INT1 error". I have noticed that this pin changed from PA19 to PA00 in the newest toolboard, and so changed the Duet3Expansion firmware. Adding a diode as suggested in other topics is not that easy because it is a custom board, so i wanted to change this pin in firmware.
I have changed "Lis3dhInt1Pin" Pin to PortAPin(19) in config/TOOL1Lc.h, and the error went away, but a data acquisition is still not working. Im sending a M956 P20.0 S1000 A1 X and the code executes with no errors. Then i move X axis and check for results. The data file looks like this:
Now if i want to send same code again i get an error saying: M956: Accelerometer is already collecting data.
My guess is that a interrupt is not properly set up, and toolboard cant detect it resulting in never ending measurement. I will be very thankful if someone could help with this problem.
Same thing happens when i use input shaping plugin.
Hardware: Duet6XD and custom Toolboard based on v1.1
Software: RRF 3.4.6 and DSF 3.4.6 -
@ketirange have you enabled the pullup resistor on PA19?
-
@dc42 Yes, i have following line in StartCollecting method:
-
@ketirange does your pin table allocate the
correct EXINT number uniquely to the pin used for the accelerometer interrupt? -
@dc42 I have made following changes (also, im using TOOL1LC build configuration. if this is relevant):
line 139 - Changed pin to PA19
line 166 - Change pin tab -
@ketirange on line 166, Exint 14 is not valid for PA19. That pin can only use Exint 3, see section 6.1 of the SAMC21 datasheet. However, on the TOOL1LC Exint 3 is already allocated to PB3.
Currently the TOOL1LC expansion firmware does not use the interrupt on PB3, so you would get away with changing the value for PB3 to be Nx, then you could use Exint3 for PA19. However, future firmware versions might use the PB3 interrupt. PB3 is the DIAG output from the TMC2209, used to indicate stalls.
-
@dc42 Thank you for your help, changing to Exint 3 did the trick, and now accelerometer is working fine. I wil keep in mind the PB3 conflict.
-
-