-
Notifications
You must be signed in to change notification settings - Fork 75
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
grbl-lpc on LPC1768 at 100MHz #5
Comments
I guess you are right, but I'm not the LPC specialist here. |
I'll try to explain later when I have time. The quick answer is: no, it's complicated enough that you need to use one of Arm's wizards to edit the headers to change clock frequency. |
At least I can say that grbl-LPC works on the MKS SBase board (LPC1768) without changes ;) |
MKS used a '68? Lame! There's not much price difference between the two chips. |
@cprezzi if you have a scope handy, I'd be curious to hear if the step rate is coming out correctly. I think I know what MKS might have done; if so the normal build would throw off the timers instead of overclocking the chip. |
As far as I know this is the mks sbase schematic, can't recall where I got it. |
Thanks @TomKeddie! In this schematics, it is a 1769, but on my board (from aliexpress) it is a 1768 and grbl-LPC works with my board. |
The schematic is missing a critical value: Y1's oscillator frequency. The ARM wizard needs to know this value to modify the header file to set the PLL config bits correctly. The PLL converts the input oscillator to the various clocks within the chip. The wizard figures out how to configure the PLL to do that correctly. 2 possibilities:
|
@tbfleming Y1 on my board is 12.000 MHz and Y2 is 25.000 MHz |
@cprezzi that means we're currently overclocking your chip. |
@tbfleming I didn't realize any problems yet, but I will check if the MCU gets hot. |
@cprezzi I'm not sure it's like that for small micros. The LPC1768 and LPC1769 are likely the same chip tested and sorted according to the testing. I think it's more likely the chip will misbehave if the external environment makes it hot. Perhaps we should tag this issue as an enhancement and plan to generate an alternate 100MHz config that people can switch in the Makefile? |
Hi Claudio,
I'm looking around for some hardware to retrofit into a laser cutter and use laserweb/grbl-lpc. I hope you have a moment to answer my question.
From looking at the grbl-lpc code it looks like it runs at 120MHz.
#define XTAL (12000000UL) /* Oscillator
frequency */
This would imply an LPC1769 is needed and the LPC1768 is not fast enough (or code changes are needed for 100MHz).
I see mention on reddit that it works on some 1768 boards, should I adjust the above for 100MHz perhaps?
https://www.reddit.com/r/hobbycnc/comments/6b9p48/grbllpc/
Many thanks,
Tom
The text was updated successfully, but these errors were encountered: