ledc:add option to put LEDC function into IRAM

The caches are disabled when reading/writing/erasing flash.
All CPUs should always execute code and access data from internal RAM.
Add an IRAM option to enhance the performance of LEDC.

Closes https://github.com/espressif/esp-idf/issues/11554
This commit is contained in:
Chen Jichang
2023-06-14 12:25:05 +08:00
parent 01fde9ada9
commit 5150c578fd
12 changed files with 49 additions and 12 deletions

View File

@@ -393,6 +393,7 @@ static inline void ledc_ll_set_fade_param(ledc_dev_t *hw, ledc_mode_t speed_mode
*
* @return None
*/
__attribute__((always_inline))
static inline void ledc_ll_set_sig_out_en(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc_channel_t channel_num, bool sig_out_en)
{
hw->channel_group[speed_mode].channel[channel_num].conf0.sig_out_en = sig_out_en;
@@ -423,6 +424,7 @@ static inline void ledc_ll_set_duty_start(ledc_dev_t *hw, ledc_mode_t speed_mode
*
* @return None
*/
__attribute__((always_inline))
static inline void ledc_ll_set_idle_level(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc_channel_t channel_num, uint32_t idle_level)
{
hw->channel_group[speed_mode].channel[channel_num].conf0.idle_lv = idle_level & 0x1;