-
Notifications
You must be signed in to change notification settings - Fork 585
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
RPI4 PWM can't be used with Windows11 #1640
Comments
@ChesterHuang999 Windows 11 is not supported at the moment. I'm not sure how could you have changed /boot/config.txt which is linux file on Windows 11... I believe the only scenarios which will work on Window at the moment are:
then once you get I2C you can get Pca9685 for PWM. I don't think anyone of us have tried to make it work with Win11 but supposedly we could make Linux |
Sorry, I did not try Win11 on the PI. FWIW in my projects I always use a small external PWM card as I found to be more reliable (because of the timings) than the internal RPi PWM. |
@ChesterHuang999 Please describe exactly on what kind of hardware and operating system you were trying to run the code. There's no PWM hardware on typical Windows desktop PCs, and there's no Windows 11 for Raspberry Pi. |
[Triage]: If you could share steps on how to install windows 11 on Pi4 then we can try to get a repro environment and investigate. |
Thank you all for your replies. The hardware platform is RPI4 B which ram is 4GB. First, in addition to PWM, I experimented using "System.Device.GPIO" to control GPIO. The GPIO can work normally. For how to install Windows 11 on RPI4, please refer to: @krwq "I'm not sure how could you have changed /boot/config.txt which is linux file on Windows 11" |
@ChesterHuang999 I rapidly read the article and, at a certain point, it says "The Raspberry Pi’s onboard Wi-Fi, Bluetooth and GPIO do not work so you’ll need to use Ethernet or a USB Wi-Fi dongle to get online". BTW, you could give a try with Windows 10 and see if this is a Win11 specific issue or, as I believe, you need the "Windows IoT" specific SKU to make the peripheral work. |
I think there's nothing we can do here, until the low-level drivers are in place. |
Relates to this issue: #1705 |
@ChesterHuang999 as @pgrawehr and @raffaeler wrote, there is no PWM drivers. So this is not supported on an already not supported scenario (Windows 11 on the Raspberry Pi). So changes you have to make it working are quite low honestly. Any strong reason why Windows on this non supported scenario and why not simply Raspberry Pi OS? |
One more point. This thread was created before the RTM Windows build. Said that, there is a third-party project that I never tested and found by surfing the web. I don't know the author and it has nothing to do with Microsoft of Raspberry PI Foundation. |
@raffaeler Pretty complex task to get that installed, but since Windows 11 will (very likely) be officially available for ARM64 (see here: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64) we should start investigating this setup. Not sure if I find time to do this, but it does sound interesting. |
Yes, it sounds complicated but it looks like being the only practical solution at the moment. As it is definitely interesting, I'll investigate as well and see. |
Describe the bug
When I execute the Sample code, I get an error message like the following.
Unhandled exception. System.ArgumentException: No PWM device exists for PWM chip at index 0. (Parameter 'chip')
at System.Device.Pwm.Channels.Windows10PwmChannel..ctor(Int32 chip, Int32 channel, Int32 frequency, Double dutyCycle)
at System.Device.Pwm.PwmChannel.CreateWindows10PwmChannel(Int32 chip, Int32 channel, Int32 frequency, Double dutyCyclePercentage)
at System.Device.Pwm.PwmChannel.Create(Int32 chip, Int32 channel, Int32 frequency, Double dutyCyclePercentage)
at GPIOTry.Program.Main(String[] args) in D:\Chester\Project\RPI4\Windows\GPIOTry\GPIOTry\Program.cs:line 16
I changed the boot/config.txt according to "https://github.com/dotnet/iot/blob/main/Documentation/raspi-pwm.md",
But the same problem still occurs.
The text was updated successfully, but these errors were encountered: