-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add option to put LEDC into IRAM (IDFGH-10293) #11554
Comments
You can add a linker script rule not only in the component where the object file is located, but also from a component in your application. See, for example, how the GPIO driver is moved into IRAM in this example's esp-idf/examples/peripherals/spi_master/hd_eeprom/components/eeprom/linker.lf Lines 10 to 19 in 903af13
|
Thanks for hint, it worked! So basically, this solves my case, however I still think that having configuration option to place LEDC (or part of it) in IRAM may be beneficial for other users as well. Feel free to keep this issue open and add such option, or to close it with mentioned above solution. |
Is your feature request related to a problem?
I'm working on LED matrix display in which I can only select LEDs from single row at a time, so I have to switch display between rows frequently - I use it GPTimer in ISR context.
On the other hand, display brightness is controlled by PWM conntected to one GPIO. I use LEDC driver to control it.
I had to put function that display a row at LED matrix in ISR context, so it won't glitch i.e. when I perform flash write operations.
However I had to disable PWM when I configure display for another row. Otherwise, I see dimmed LEDs in one row below current new line. This is related to HW design of this LED matrix, which updates column index of enabled LED and in last operation, it switches selected row.
Working solution for my problem is to put LEDC functions (at least ledc_stop and ledc_update_duty) in IRAM (otherwise it can crash, when cache is disabled i.e. during flash write).
I did it by manually editing linker.lf and by adding there "ledc (noflash)".
Currently there is no option to put LEDC into IRAM via configuration. I also didn't find any way how to force linker to do it without modification of esp-idf itself.
Describe the solution you'd like.
Add option to put LEDC into IRAM (at least ledc_stop and ledc_update_duty functions).
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: