Hi all,
Before I write any code, I've been looking at the online documentation to try to get my head around PWM outputs, timers and LEDs with my shiny new Maple board and I beleive that I'm misunderstanding something quite fundemental.
I'm currently trying to understand the relationship with PWM and timers, using the libmaple. The documentation for pwmWrite (http://leaflabs.com/docs/lang/api/pwmwrite.html#lang-pwmwrite) gives a code snippet for using the on-board LED (BOARD_LED_PIN) which seems simple enough.
Now, BOARD_LED_PIN points to pin D13.
According to the Timer Pin Map (http://leaflabs.com/docs/hardware/maple.html#timer-pin-map), there doesn't seem to be a Timer that can be attached to pin D13 for PWM.
So, basically, my question is: is the code sample for pwmWrite wrong and that the onboard LED at D13 can't be used for PWM? Or am I being stupid and missing some obvious bit of information with the relationship between the timers and PWM? Does libmaple use a software implementation for PWM with pins that can't use the PWM feature of the STM32 chip?
To be honest, I'm not fussed whether the onboard LED is capable of hardware PWM, as my project doesn't require it. I shall be using another pin, with han IR LED, for that part of the project (a 38khz IR transceiver). I'm just trying to understand how it works. :-)
I'm not going to get the chance to be able to play with the actual hardware for a few days so I thought I'd try clear it all in my head before I do...
Thanks for listening, and best regards,
J.