-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 2.0.5.3 Laser & servo (Bltouch) error in sanity check #18973
Comments
Current research:
|
AFAIK Marlin usually doesn't use H/W pwm, so the relationship between timer and pwm handling timer is not 1:1. I think that a better test might be: this new test will allow you to disable timer 3 and configure your machine |
P.S your config is 020005, needs upgrate to 020006 to use updated releases |
2.0.5.3?? |
@boelle this error will appears also in bugfix. Is how sanity is done and which H/W is used. |
@chepo92 update your configuration and test PR |
Tested Bugfix the same day, issue is still there @GMagician I have made a change similar to your PR that works (but still needs improvements), I'll test yours but I think it may not work as _useTimer3 will be defined when servos file is imported (I passed through that), so for now i commented out _useTimer3, see my branch: |
@chepo92 of course you have to disable _useTimer3 to let it works. A different approach may be to limit used timers depending on nr of servos installed...I mat think about that |
@chepo92 I changed code, now AVR should release timers resources when not needed, try it and let me know |
It would be nice if setting NUMSERVOS to 0 it released all servo timers (including timer3 ), as BLtouch doesn't use timer3 by default |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug Description
I'm configuring a Creality CR10S (mega 2560 board) with TTL laser, Bltouch and filament runout sensor,
I can't figure out a wiring for everything that also compiles, I don't want to make any change to wiring every time i have to change to laser or 3D printing, so I want a dedicated pin for everything.
I have assigned in pin_RAMPS and RAMPS_creality:
Also:
After changing the confings and start compiling I get a sanity check error: "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system", so far i have read, enabling Bltouch enables servos and only leaves timer "A" pins unavailable, but pin 2 is on TIMER3B,
Sanity check line is doing:
#elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5)
#error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system."
I think maybe it's not doing the check correctly, as far as I understand the laser and servo configuration working and conditionals, servo.cpp and servoTimers.h
, enabling certain number of servos should occupy a timer ¿"A"? and it's related pin and leave the rest of pins and timers for other uses, i.e.
Pin 2 and 3 are related to TIMER3B and TIMER3C, so it should not be a problem to even set any NUM_SERVOS > 0 , and use them for PWM, or is it ?, moreover I only need servo 0 for the BLtouch so I'm not even using Timer 3 for servos
Sorry for the length of the issue, any advice or comment would be apreciated
My Configurations
I attach my configs and ramps/creality pins assignment
ramps.zip
Steps to Reproduce
Expected behavior: Compiles flawlessly
Actual behavior: sanity check error
Additional Information
I'm going to disable the sanity check line to see what happens, at least it allowed me to compile (will test if it works)
The text was updated successfully, but these errors were encountered: