-
-
Notifications
You must be signed in to change notification settings - Fork 7k
XMega timer problem #4281
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
Closed
Closed
XMega timer problem #4281
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Code to github and updated to 0022 release, with the blessing from GorillaCoder.
…ated avrdude (5.11) from the original package
…e it possible to use non-sequencial portmapping work with external interupts.
commit d9f9676 Author: David A. Mellis <[email protected]> Date: Tue Oct 25 11:15:14 2011 -0400 Bug fix in replace(). http://code.google.com/p/arduino/issues/detail?id=694
commit 18838fb Author: David A. Mellis <[email protected]> Date: Mon Oct 24 16:45:44 2011 -0400 Renaming LED to LED_BUILTIN. http://code.google.com/p/arduino/issues/detail?id=651
…loat(). (Paul Stoffregen) (1000186)
…ino#2039 and this fix is just a workaround
…8.1' into xmegaduino-with-avr-toolchain-gcc-4.8.1
noticed that sometimes delays were necessary to have serial "work" in some applications. this made them unnecessary
improved performance of HardwareSerial
This makes Xmegaduino use DTR signal when programming and correctly reset Akafuino. (Only really needed on Windows)
…), to allow for multiple SPI ports and remove hard-coded values for MISO/MOSI/SCK etc. See SPI.h for details and usage.
…ers for dynamic usage (SPSR,SPDR,SPCR now work in 3rd party libs, when using dynamic port settings), refinements to naming conventions and additional documentation. Pat Deegan, Nov 4 2014.
Multi-port SPI library patch
…dcard lib (boy I wish we used namespaces).
Changed SPISettings name to SPIPortSettings
I suspect this pullrequest was intended to be submitted to XMegaDuino? I don't think it looks relevant to normal Arduino, and at the least the PR is way too big. I'm closing it, feel free to comment if I understood things wrong. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this solve the RTC timer problem.
I use this changes in wiring.c
define CLK_RTCSRC_RCOSC32_gc (0x06<<1)// Set the internal 32.768kHZ oscillator as clock source for RTC.
ifdef USE_RTC
/* Turn on internal 32kHz. */
OSC.CTRL |= OSC_RC32KEN_bm; //cal RC Oscillator
do {
/* Wait for the 32kHz oscillator to stabilize. */
} while ( ( OSC.STATUS & OSC_RC32KRDY_bm ) == 0);
/* Set internal 32.768kHZ oscillator as clock source for RTC. */
CLK.RTCCTRL = CLK_RTCSRC_RCOSC32_gc | CLK_RTCEN_bm;//32.768kHZ RC RTC clock
if defined(USE_RTC)
do {
/* Wait until RTC is not busy. */
} while ( RTC.STATUS & RTC_SYNCBUSY_bm );
/* Configure RTC period to 1 millisecond. */
RTC.PER = 129;//1ms
RTC.CNT = 0;
RTC.COMP = 129;
RTC.CTRL = ( RTC.CTRL & ~RTC_PRESCALER_gm ) | RTC_PRESCALER_DIV1_gc;