Esp32 c3 led pwm#8
Conversation
alexandruradovici
left a comment
There was a problem hiding this comment.
The next step is to implement the Pwm related trait.
|
|
||
| //functions regarding interrupts | ||
|
|
||
| pub fn handle_interrupt(&self) { |
There was a problem hiding this comment.
Do you need to handle interrupts? What is the purpose of interrupts?
There was a problem hiding this comment.
The same questions I've asked myself and haven't found answers yet. Thought they made the interrupt for a reason and it is imperative to handle them
There was a problem hiding this comment.
Please document that and post a link to the documentation text.
There was a problem hiding this comment.
|
Any updates here? |
|
The LED PWM clock frequency is based off the clock source used for the CPU and/or the CPU clock frequency. Should the "get_maximum_frequency_hz()" function from the Pwm hil return the maximum frequency achievable with any clock source or with the in-use clock source ? |
|
This needs to be the max freq that the PWM outputs. |
| interrupts::IRQ_LEDC => { | ||
| //handler is unimplemented yet | ||
| //not sure exactly what to do :) | ||
| self.led_pwm.handle_interrupt(); |
There was a problem hiding this comment.
What is the purpose of the PWM interrupt?
There was a problem hiding this comment.
It is triggered either when a timer counter overflows for a set number of times, when a fade has finished or when a timer counter has reached it's max value.
| //x used for timers, value between [0, 3] | ||
| //n used for pwm generators, value between [0, 5] |
There was a problem hiding this comment.
The following sections refer to the timers collectively as Timerx (where x ranges from 0 to 3). Likewise, the six PWM generators are also identical in features and operation, and thus are collectively referred to as PWMn (where n ranges from 0 to 5).
as seen in the official documentation
If it is a method, than the in-use clock source, if it is an associated function, than for any clock source (probably you have to receive the clock as a parameter). |
Pull Request Overview
This pull request adds partial Led Pwm support for the esp32-c3
Testing Strategy
This pull request was tested by me :)
TODO or Help Wanted
This pull request still needs Pwm generators implementation
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.