WildernessLabs / Meadow_Issues

Public repo for bugs and issues with Meadow
15 stars 0 forks source link

PWM on `D05` on F7Featherv2 does nothing #729

Closed ctacke closed 1 month ago

ctacke commented 2 months ago

Create an app that does this:

var pwm = Device.Pins.D05.CreatePwmPort(50.Hertz());
pwm.Start();

Scope says the line is flatlined - no pulses at all.

An ioctl is properly being sent from Core with the following: Channel: 1 Timer: 3 Duty: 32767 Frequency: 50

Peter-Moody commented 1 month ago

For F7FeatherV2 the F7's Timer 3, Channel 1 is shared by D05 (PB4) and D09 (PC6). PWM does work on D09. Looks like the decision was made to support D09and not D05 for PWM. Behavior Attempting to use D05 just silently doesn't work. However, attempting to use D06 throws an exception. D05 should do the same.

patridge commented 1 month ago

This seems to have highlighted some inconsistencies on Docs.

We have this generic-named pinout diagram (technically v1, I think) that says D05 is PWM-capable.

Then, we have two v2-specific pinout diagrams that differ based on the pinouts in that area of the board.

We also have mention of what I think is this same issue in the Beta6 release notes.

@Peter-Moody Trying to put together a list of docs changes needed, if you can verify. Then, based on that, we've got a lengthy to-do list on our end.

Questions:

Action items for docs:

patridge commented 1 month ago

Possible impact of locations from changes coming in #776.

Peter-Moody commented 1 month ago

What I noticed was that the F7FeatherV2 image of the board showed both D05 and D06 supported PWM. Neither one do. Our website text was correct. I think that @jorgedevs has fixed the image, but I could be wrong.

Peter-Moody commented 1 month ago

I have no reason to believe that there is anything wrong with the F7FeatherV1 documentation.

jorgedevs commented 1 month ago

@patridge D05 and D06 on the F7v1 does work. Is just that v2 they added more features, so drawback was dropping PWM capability to D05 and D06.

patridge commented 1 month ago

We should have everything addressed now, removing that as a PWM option everywhere we can.