Skip to content

Commit

Permalink
examples: Continue self-test even if calibration is unsuccessful
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean THOMAS committed Aug 6, 2020
1 parent d36a795 commit 5b248f9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions examples/firmware/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,24 @@ int main(void) {
.rdly_p0 = 2,
.rdly_p1 = 2,
};
struct gramProfile profile2;
gram_init(&ctx, &profile, (void*)0x10000000, (void*)0x00009000, (void*)0x00008000);
uart_writestr("done\n");

uart_writestr("Auto calibrating... ");
res = gram_generate_calibration(&ctx, &profile);
res = gram_generate_calibration(&ctx, &profile2);
if (res != GRAM_ERR_NONE) {
uart_writestr("failed\n");
while (1);
} else {
gram_load_calibration(&ctx, &profile2);
}
gram_load_calibration(&ctx, &profile);
uart_writestr("done\n");

uart_writestr("Auto calibration profile:");
uart_writestr("p0 rdly:");
uart_writeuint32(profile.rdly_p0);
uart_writeuint32(profile2.rdly_p0);
uart_writestr(" p1 rdly:");
uart_writeuint32(profile.rdly_p1);
uart_writeuint32(profile2.rdly_p1);
uart_writestr("\n");

uart_writestr("DRAM test... \n");
Expand Down

0 comments on commit 5b248f9

Please sign in to comment.