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.
10 years, 1 month ago.
k64f support?
I would like to have support for the k64f on this library :/
any plan?
Question relating to:
1 Answer
10 years, 1 month ago.
Well no idea why it didn't work earlier, but now it seems to work.
@Andrea, If you import the latest version of the lib it might work. Or not :P. I don't have my logic analyzer with me currently, so I only verified by observer a fading LED.
Currently max period is roughly 0.1 second (I saw there is an alternate clock source which I might add later for lower frequencies, but tbh GPIO will do fine too in those cases). Max resolution is the bus clock, 60MHz on my K22F.
it doesen't eve compile, i just added "#inclue fastpwm.h"
Error: Identifier "CLOCK_SYS_GetFreq" is undefined in "FastPWM/Device/FastPWM_KSDK.cpp", Line: 24, Col: 5
posted by 01 Oct 2014Good point. Delete your mbed library, and instead import mbed-src (http://mbed.org/users/mbed_official/code/mbed-src/). Recompile and it should work.
Reason for this is that in the latest mbed version the underlying KSDK code completely changed (blame Freescale). FastPWM is designed using that version, but the real mbed lib won't have those changes until the next version is released, while mbed-src already does have the changes.
posted by 01 Oct 2014
It is essentially equal to that of the other Freescale ones, only it is build on top of the mbed library, and the mbed library is different for the K64F, making it some work to do this. Since it supports Nucleo targets the required changes can be made (Nucleo ones have a similar problem as the K64F).
I will have a look at it, but that can mean it is done tomorrow, or that it takes a few weeks. As long as no one pays me it depends on my mood :D.
posted by Erik - 30 Sep 2014@Andrea,
feel free to contribute and add k64f support.
@Erik, your mood is usually up for programming, so will take a day :-D
posted by Martin Kojtal 30 Sep 2014I would be if my K22F didn't seem to refuse all register writes for the PWM modules :(
posted by Erik - 30 Sep 2014