Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[USBDevice] Fix for https://github.com/mbedmicro/mbed/issues/690 #746

Merged
merged 1 commit into from Nov 28, 2014
Merged

[USBDevice] Fix for https://github.com/mbedmicro/mbed/issues/690 #746

merged 1 commit into from Nov 28, 2014

Conversation

Sissors
Copy link
Contributor

@Sissors Sissors commented Nov 27, 2014

In the old K64F register .h file (same for K22F),
SIM_SOPT2_PLLFLLSEL_MASK was incorrectly set as a 1-bit field, like it
was in the KLXX devices, while it now is a 2-bit field. This has been
fixed in the current register maps, however the USB clock was set by
taking the entire mask, while only the first bit needs to be set.

This is now fixed by using the SHIFT definition, and should work also on
other Freescale targets (verified on K64, K22 and KL25)

Also the sooner you decide on my other pull request the sooner they can be automatically merged again ;)

In the old K64F register .h file (same for K22F),
SIM_SOPT2_PLLFLLSEL_MASK was incorrectly set as a 1-bit field, like it
was in the KLXX devices, while it now is a 2-bit field. This has been
fixed in the current register maps, however the USB clock was set by
taking the entire mask, while only the first bit needs to be set.

This is now fixed by using the SHIFT definition, and should work also on
other Freescale targets (verified on K64, K22 and KL25)
@Sissors
Copy link
Contributor Author

Sissors commented Nov 27, 2014

Also if it makes anyone feel better: The exact same bug is also in the official clock setup files for USB enabled clock. However since USBDevice overwrites it anyway it doesn't matter for us. Someone might mention it to them though.

@matthewelse
Copy link
Contributor

I've just tried out this fix on Windows, and it seems to have fixed the problem I was having - I will try on Linux and OSX in the next few days to see if there are any issues, but I can't imagine that there will be any.

@0xc0170 0xc0170 merged commit 10156c5 into ARMmbed:master Nov 28, 2014
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 28, 2014

@Sissors , please update you branch to the latest master for the future, I had to resolve conflicts because your branch was behind master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants