Skip to content

Comments

Fix BLTOUCH and FAN PWM conflicts on SKR E3 v2 boards#19205

Closed
Asterchades wants to merge 1 commit intoMarlinFirmware:2.0.xfrom
Asterchades:2.0.x
Closed

Fix BLTOUCH and FAN PWM conflicts on SKR E3 v2 boards#19205
Asterchades wants to merge 1 commit intoMarlinFirmware:2.0.xfrom
Asterchades:2.0.x

Conversation

@Asterchades
Copy link

Requirements

  • Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.

Description

Corrects the same issue as #15547 on the newer SKR Mini E3 v2 boards. Also re-ordered the conditions to put all the SKR Mini E3s together, though that has no functional benefit (though if someone knows how to wild-card the condition it could be more evident what needs to be included).

Benefits

Prevents some Z probes (notably certain BLTouch clones) from deploying randomly when the PWM fan is triggered while using a newer BTT SKR Mini E3 v2 board. Prevents damage to both the print and probe. Tested for over an hour with zero random deployments mid-print.

Configurations

N/A

Related Issues

None listed. Personal issue encountered during recent experiments which, given the previous issue, is likely to impact other users with similar configurations.

Corrects the same issue as #15547 (#15547) on the newer SKR Mini E3 v2 boards.
@ellensp
Copy link
Contributor

ellensp commented Aug 31, 2020

Cannot do PR's against MarlinFirmware:2.0.x has to be against bugfix.


#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_DIP, MKS_ROBIN_LITE)
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SKR Mini E3 V2 uses PC6 instead of PA8 as FAN_PIN, so this comment is no longer true.

Copy link
Author

@Asterchades Asterchades Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left as much alone as I could while trying to find a solution. Someone else will need to look into that. I can't even pretend to know enough about the hardware or software to do anything else.

#endif

#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_DIP, MKS_ROBIN_LITE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like both fan pins on this board use timer 8. That means this PR should introduce a problem, rather than solve one.

More work is probably needed to identify why this seems to solve the submitter’s problem, because this looks incorrect to me.

Copy link
Contributor

@AnHardt AnHardt Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???
When using hardware-PWM
Using the same timer means using the same PWM-frequency - not using the the same PWM-ratio what's defined per pin.
Why shouldn't the fans share the same PWM-frequency? Do we have a way to configure different frequencies for different fans?

When using software_PWM
all fans do use the same timer anyway (that for the temperature interrupt)
.
A mixed setup is currently not possible for Marlin anyway.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is attempting to resolve a conflict between fans and Servo output, not between the two fans. Setting fan values when they share a timer with servo output corrupts the servo output frequency.

@Asterchades
Copy link
Author

Asterchades commented Aug 31, 2020

My bad. First ever pull request, so I'm not in the least bit surprised I got something wrong.

Will close here and re-open over on bugfix.

PS If you're still here, please review #19207. I don't understand how this Git system is meant to work and I'm not convinced it does either, since it's showing I'm requesting 78 commits dating back to 2019 instead of just the one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants