Skip to content

tone function random crashes #52

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
PaulStoffregen opened this issue Oct 21, 2015 · 4 comments
Closed

tone function random crashes #52

PaulStoffregen opened this issue Oct 21, 2015 · 4 comments

Comments

@PaulStoffregen
Copy link

This sketch will crash after several minutes running on Arduino Zero. Serial output stops, and the frequency on pin 5 becomes approx 258 kHz.

void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 1500) ;
  delay(10);
  Serial.println("Tone Issue Test");
  delay(20);
}

void loop() {
  int frequency = 1500 + random(800);
  tone(5, frequency);
  Serial.println(frequency);
  delayMicroseconds(random(10000));
}
@PaulStoffregen
Copy link
Author

@aethaniel Any ideas?

@aethaniel
Copy link
Contributor

Hi @PaulStoffregen, not yet as I didn't implement this API. I will check the code with @agdl but not before next Wednesday, unfortunately.

@PaulStoffregen
Copy link
Author

I'm in no hurry. Just wanted to make sure you knew about the crashing.

@agdl
Copy link
Member

agdl commented Oct 22, 2015

@PaulStoffregen try this please #55

Your sketch has been running for 1 hour

@agdl agdl self-assigned this Oct 23, 2015
@agdl agdl added this to the Release 1.6.2 milestone Oct 23, 2015
@cmaglie cmaglie modified the milestones: Release 1.6.2, Release 1.6.3 Nov 4, 2015
@cmaglie cmaglie modified the milestones: Release 1.6.3, Release 1.6.4 Feb 15, 2016
@cmaglie cmaglie closed this as completed Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants