You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple Sketch works fine. Now I am trying to run a Stepper with the TMC2130 and an Arduino UNO. I tried to use the StallGuard Example but when compiling it says
exit status 1
'PORTF' was not declared in this scope
The text was updated successfully, but these errors were encountered:
I have the same issue. Seems like teemuatlut is using bit manipulation to step the motor with interrupts. Such operations are much faster than using digital write. PORTF is present in Mega2560 but not in Nano (which I use) and it covers the analog pins A0-A7 on the Mega so the STEP-pin in our case. What you need to do is to either use another port and change the code, or to not use ports (and change the code).
So, how to solve it?
I solved it still using ports by changing the port to PORTD (D0-D7 on my Nano) since this is present in my Nano (and in your UNO which is based on AtMega168: https://www.arduino.cc/en/Reference/PortManipulation). I connected the STEP pin to D7. Then I changed the interrupt function to do an XOR with PORTD and a bitmask.
Hi,
Simple Sketch works fine. Now I am trying to run a Stepper with the TMC2130 and an Arduino UNO. I tried to use the StallGuard Example but when compiling it says
exit status 1
'PORTF' was not declared in this scope
The text was updated successfully, but these errors were encountered: