Improve Teensy 4.x support, add hardware PWM for Laser / Spindle / FAST_PWM_FAN #27608
+89
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is an attempt at providing more complete support for Teensy 4.x boards, this includes:
Requirements
Benefits
Configurations
#define MOTHERBOARD BOARD_TEENSY41
For checks:
For hardware PWM:
Laser / Spindle:
Working freeMemory() function
Related Issues
[FR] LASER / SPINDLE pwm control on teensy 4.1
Notes on freeMemory() and Teensy 4.x memory layout
Regarding freeMemory(), it reports memory free for it's second RAM region used for malloc(), from https://forum.pjrc.com/index.php?threads/how-to-display-free-ram.33443/#post-275506
(More recent versions of the Platform.io teensy platform make this arrangement clearer in the build summary, though updating that is going to be a follow up PR if I find a workable solution for changes to the SD library dependency other than just including the old library via #lib_deps.)