Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBDevice_STM32F103 by
Diff: USBDevice/USBHAL_KL25Z.cpp
- Revision:
- 38:dfe51ad5cacf
- Parent:
- 37:9506bdafbf94
- Child:
- 43:c0605f23f916
--- a/USBDevice/USBHAL_KL25Z.cpp Wed Nov 19 09:00:30 2014 +0000
+++ b/USBDevice/USBHAL_KL25Z.cpp Fri Nov 28 07:15:18 2014 +0000
@@ -16,7 +16,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if defined(TARGET_KL25Z) | defined(TARGET_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F)
+#if defined(TARGET_KL25Z) | defined(TARGET_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F) | defined(TARGET_K22F)
#include "USBHAL.h"
@@ -135,7 +135,8 @@
SIM->SOPT2 |= SIM_SOPT2_USBSRC_MASK;
#else
// choose usb src as PLL
- SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL_MASK);
+ SIM->SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK;
+ SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | (1 << SIM_SOPT2_PLLFLLSEL_SHIFT));
// enable OTG clock
SIM->SCGC4 |= SIM_SCGC4_USBOTG_MASK;
