-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
LPC824: export to LPCXpresso, target running with wrong clock speed
Description
- Type: Bug
Bug
Target
LPC824, LPCXpresso824-MAX
Toolchain:
GCC_CR
Toolchain version:
LPCXpresso V8.2.0
meed-os sha:
729ef15 Merge pull request #2682 from ohagendorf/bugfix_can_loop_test
Expected behavior
System clock should be set to 30 MHz.
Actual behavior
System clock is 12 MHz.
Steps to reproduce
export blinky to LPCXpresso, use Blinky test program. Blink frequency is wrong by factor 2.5 (30 / 12).
Enhancement
Suggested enhancement
SystemInit() is not called in startup_LPC812_CR.cpp because of missing define:
#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
// Declaration of external SystemInit function
extern void SystemInit(void);
#endif
because of missing _USE_CMSIS define.
Solution:
_USE_CMSIS could be added in the project defines. But this define is used only once here. Maybe another existing define could be used for this purpose?
Activity
sg- commentedon Jan 19, 2017
Do you mind making a pull request with this fix?
JojoS62 commentedon Jan 20, 2017
I have commited the fix to my forked repo. (How) can I send the PR for this single commit? There are other committs that are not necessary or confusing?
theotherjimmy commentedon Jan 20, 2017
Assuming that
armmbed
is the name of the remote corresponding to this repo, and thatorigin
point to your fork:git checkout armmbed/master -b fix-lpcxpresso-clock
git cherry-pick 77fc7dc1c
git push origin
JojoS62:fix-lpcxpresso-clock
branchI hope that helps.
JojoS62 commentedon Jan 20, 2017
ok, that worked, hope I've done it right because this is my first PR.
theotherjimmy commentedon Jan 20, 2017
Yeah! It looks good.
Merge pull request #3621 from JojoS62/fix-lpcxpresso-clock
JojoS62 commentedon Jul 24, 2017
This issue is fixed and meanwhile GCC_CR has become obsolete. The startup code in GCC_ARM toolchain includes a call to SystemInit and this toolchain should be used.