Page 1 of 1
Using mmap for PWM Control Instead of sysfs to Improve Performance
Posted: 2024-10-31 16:53
by pdoanthuannb96
Hello everyone,
I'm currently working on a project where precise PWM control is essential, and I need to achieve higher performance than what the sysfs interface offers. I’ve read that direct memory mapping (MMAP) can significantly improve I/O performance by reducing latency, and I’m considering implementing MMAP for PWM control rather than using sysfs.
My main questions are:
1. Has anyone successfully mapped MMAP for PWM control before, and if so, how much of a performance boost did you experience compared to sysfs?
2. Are there any notable challenges or limitations with MMAP for PWM (e.g., hardware compatibility, stability)?
Any example code or resources to get started with MMAP for PWM control would be highly appreciated.
Thanks in advance for any insights!
Re: Using mmap for PWM Control Instead of sysfs to Improve Performance
Posted: 2024-11-01 1:33
by Alenwowo
pdoanthuannb96 wrote: ↑2024-10-31 16:53
Hello everyone,
I'm currently working on a project where precise PWM control is essential, and I need to achieve higher performance than what the sysfs interface offers. I’ve read that direct memory mapping (MMAP) can significantly improve I/O performance by reducing latency, and I’m considering implementing MMAP for PWM control rather than using sysfs.
My main questions are:
1. Has anyone successfully mapped MMAP for PWM control before, and if so, how much of a performance boost did you experience compared to sysfs?
2. Are there any notable challenges or limitations with MMAP for PWM (e.g., hardware compatibility, stability)?
Any example code or resources to get started with MMAP for PWM control would be highly appreciated.
Thanks in advance for any insights!
Hello, we have not tried to replace the sysfs to drive pwm, although according to you can improve performance, but now the most common is still sysfs to control, but for your question, I can recommend a few blogs, you can refer to, hope to find inspiration:
https://blog.csdn.net/ diqiyong3212/article/details/102053106
https://blog.csdn.net/qq_33611327/artic ... s/81709612
Re: Using mmap for PWM Control Instead of sysfs to Improve Performance
Posted: 2024-11-03 8:33
by pdoanthuannb96
Alenwowo wrote: ↑2024-11-01 1:33
pdoanthuannb96 wrote: ↑2024-10-31 16:53
Hello everyone,
I'm currently working on a project where precise PWM control is essential, and I need to achieve higher performance than what the sysfs interface offers. I’ve read that direct memory mapping (MMAP) can significantly improve I/O performance by reducing latency, and I’m considering implementing MMAP for PWM control rather than using sysfs.
My main questions are:
1. Has anyone successfully mapped MMAP for PWM control before, and if so, how much of a performance boost did you experience compared to sysfs?
2. Are there any notable challenges or limitations with MMAP for PWM (e.g., hardware compatibility, stability)?
Any example code or resources to get started with MMAP for PWM control would be highly appreciated.
Thanks in advance for any insights!
Hello, we have not tried to replace the sysfs to drive pwm, although according to you can improve performance, but now the most common is still sysfs to control, but for your question, I can recommend a few blogs, you can refer to, hope to find inspiration:
https://blog.csdn.net/ diqiyong3212/article/details/102053106
https://blog.csdn.net/qq_33611327/artic ... s/81709612
Thank you very much for sharing these links!
Could you also guide me on finding the PWM control registers for a SoC similar to the V3S mentioned in the articles?
Specifically, I'm looking for details on configuring PWM, as the document "Rockchip_RV1103_User_Manual_GPIO" only shows how to configure GPIO.
Re: Using mmap for PWM Control Instead of sysfs to Improve Performance
Posted: 2024-11-04 1:22
by Alenwowo
pdoanthuannb96 wrote: ↑2024-11-03 8:33
Alenwowo wrote: ↑2024-11-01 1:33
pdoanthuannb96 wrote: ↑2024-10-31 16:53
Hello everyone,
I'm currently working on a project where precise PWM control is essential, and I need to achieve higher performance than what the sysfs interface offers. I’ve read that direct memory mapping (MMAP) can significantly improve I/O performance by reducing latency, and I’m considering implementing MMAP for PWM control rather than using sysfs.
My main questions are:
1. Has anyone successfully mapped MMAP for PWM control before, and if so, how much of a performance boost did you experience compared to sysfs?
2. Are there any notable challenges or limitations with MMAP for PWM (e.g., hardware compatibility, stability)?
Any example code or resources to get started with MMAP for PWM control would be highly appreciated.
Thanks in advance for any insights!
Hello, we have not tried to replace the sysfs to drive pwm, although according to you can improve performance, but now the most common is still sysfs to control, but for your question, I can recommend a few blogs, you can refer to, hope to find inspiration:
https://blog.csdn.net/ diqiyong3212/article/details/102053106
https://blog.csdn.net/qq_33611327/artic ... s/81709612
Thank you very much for sharing these links!
Could you also guide me on finding the PWM control registers for a SoC similar to the V3S mentioned in the articles?
Specifically, I'm looking for details on configuring PWM, as the document "Rockchip_RV1103_User_Manual_GPIO" only shows how to configure GPIO.
Sorry we can only use it according to Rockchip_RV1103_User_Manual_GPIO as well, we don't have much energy to research about other ways to use PWM!