Skip to content

Add example to show Apollo3 IC revision #76

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

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* Author: Nathan Seidle
Created: October 16th, 2019
License: MIT. See SparkFun Arduino Apollo3 Project for more information

This example demonstrates how to display the revision of the Apollo3.
See the Ambiq website for errata on each revision: https://ambiqmicro.com/mcu/
*/
void setup()
{
Serial.begin(115200);
delay(10); //Wait for any bootloader UART interactions to complete
Serial.println();
Serial.print("Apollo3 IC revision code: ");

if (APOLLO3_A0)
{
Serial.print("A0");
}
else if (APOLLO3_A1)
{
Serial.print("A1");
}
else if (APOLLO3_B0)
{
Serial.print("B0");
}
else if (APOLLO3_GE_B0)
{
Serial.print("Unknown revision but it's greater than B0");
}
else
{
Serial.print("Unknown revision");
}
Serial.println();
Serial.println("All done");
}

void loop()
{
//Do nothing
}