Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 5 months ago.
PWM out for different location
I have currently created a target for the Gecko G800 STK and based it on one of the other targets to create the port. I am using the gecko startup/linker script source files from the Silabs peripheral libraries and have manage to get the LED and serial port working but I am having issue with the PWM output.
I am trying to set PD1 on the eval board but this is located in location 3. From reading the pwmout_api.c, it seems to be set to location 1 by default but there doesn't seem to be an api to set the location. Would this feature be added in the near future or I have I miss something out?
My code for setting up the pwm is shown below. I imagine by setting it, it will use the default period of 20ms.
pwmout for gecko board
#include "mbed.h" PwmOut myPWM(PD1); int main(void) { while (1) { } }
My linker script change for the gecko board is shown below and copied all the efm32g source and header from the peripheral libs to the cmsis target folder. I have copied the cmsis files from STK3700 and made the change to the number of vectors; #define NVIC_NUM_VECTORS (16 + 30) . Is there anything that I may have missed out?
linked script change
I fork the mbed repo and added the new target. https://github.com/ubergeekNZ/mbed
posted by Paul Lee 15 Jun 2015Ok figure out where it is set.
posted by Paul Lee 15 Jun 2015