-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
[FR] Use softpwm for rgb pins when PWM_PIN on the pin is false #16300
Comments
Same problem here but with a normal LED as cabin light and latest bugfix downloades today, I will give a try to your solution and will provide some update. Regards |
@LinoBarreca — The last change to this file moved timer 3 to timer 8, labeled " |
@thinkyhead i don't want to blame anyone(not even myself) without checking it on the computer but I remember that I completely rewrote the pinout taking it from stm (so what it pinX in code). I will check in a few hours what happened to the pins and who changed it. If no one else but me did then it's either some copy/paste gone wrong or a BTT mistake on the PCB marking. 2am here. I go back to sleep. |
Tried the solution proposed of replacing PeripheralPins.c file with a previous version that was working for me without results. Regards |
@davidcgu that was probably a misunderstanding! I had to exchange the file to get RGB running at all! Merry Christmas! |
I don't understan, what I can tell is that previosuly was working fine and with latest bugfix I have a normal led and turns off when starts printing and on top of that is not possible to turn it on anymore until print is fhinished, I guess at some moment was done some change wrong on marlin. Regards |
note: with 2.0 stable it was working fine |
My apoligies... forget what I told previously, discovered I used some pins defined in stock for fan1-2, I assigned the pins on the config but forgot to comment the original definition for same pins on pins file what drived the issue to happen. Solved by commenting corresponding lines on pins file. merry Xmas guys |
@LinoBarreca Cheers |
I checked the PeripheralPins file. To define them as PWM pins uncomment these lines:
Be careful: activating them as "PWM pins" will use three different timers (no, you can't change them for hardware PWM, they are linked in hardware) I suggest you to use, if available, other pins which use the (already used for pwm) timers 3,4,8 or 9. Leaving those lines uncommented (as in the file before my modifications) causes any analogwrite mess up with the timers used in marlin as soon as the instruction is encountered. Read it as "do not do it". If marlin uses software pwm for rgb strip then the problem lies elsewhere. |
Which pins would you recommend using for RGB? Kind regards, |
I don't have a computer now so take what I am writing with the proper caution.
All those are addressed with neopixel.
...but if I must use an rgb strip I would use the three (hardware pwm) fan ports for R,G&B and configure marlin to do soft pwm for fans... |
Edit: from here https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/feature/leds/leds.cpp |
okay. I triple checked it. The behavior of the pins is correct according to the schema and the definition I would open a feature request about softpwm for RGB lights but the behavior of marlin is actually correct according to the board and the specifications. It's the user that uses the wrong pins. The only PWM pin for the expansion port is PC9, all the others are digital and can't be used as PWM output. |
like that? and title should be: Use softpwm for rgb pins when PWM_PIN on the pin is false ?? |
yep |
@boelle that's not a skr-pro related feature request. it's for every board. |
done :-D |
@arminth @viper93458 until the feature request is open you can workaround as I suggested: |
tittle changed :-D i just assumed it should stay there |
@arminth @viper93458 I just made other changes to fix another bug. |
When the above will be merged you can use PC9 (r), PC6 (g), PC7 (b) |
Duplicate of #16752 |
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 am using an RGB-strip and a Neopixel ring on my Delta with SKR 1.1 pro.
When I start a print (from Octoprint), LED start showing the correct status from blue to magenta until bed is heated and then from magenta to red until nozzletemp is reached.
When printing starts, neopixel switches to white, RGB strip switches off! I can still switch it on manually.
My Configurations
Marlin_configuration.zip
Steps to Reproduce
Start a print.
Expected behavior: all LED switch to white when print starts.
Actual behavior: Neopixel goes white, RGB go out.
Additional Information
I had to replace PeripheralPins.c from
C:\BIGTREETECH\Marlin-2.0.x\buildroot\share\PlatformIO\variants\BIGTREE_SKR_PRO_1v1
with PeripheralPins.c from Marlin-bugfix-2.0.x "2019-11-10"
C:\BIGTREETECH\Working Mega CoreXY\newer\Marlin-bugfix-2.0.x\buildroot\share\PlatformIO\variants\BIGTREE_GENERIC_STM32F407_5X
because of
#16158
It shouldn't affect the behavior, as LED in general work.
The text was updated successfully, but these errors were encountered: