Skip to content

Commit c6093a5

Browse files
committed
fail on power supply bad
1 parent 9d9c309 commit c6093a5

File tree

1 file changed

+2
-0
lines changed
  • ports/mimxrt10xx/apps/factory_test

1 file changed

+2
-0
lines changed

ports/mimxrt10xx/apps/factory_test/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@ void loop(void) {
137137
Serial_printf("5V out = %d\n\r", (int)five_mV);
138138
if (abs(five_mV - 5000) > 500) {
139139
Serial_printf("5V power supply reading wrong?");
140+
return;
140141
}
141142
// Test 5V
142143
int nine_mV = (float)analogRead(AD0) * 11.0 * 3.3 * 1000 / 4095.0;
143144
Serial_printf("9V out = %d\n\r", (int)nine_mV);
144145
if (abs(nine_mV - 9000) > 1000) {
145146
Serial_printf("9V power supply reading wrong?");
147+
return;
146148
}
147149
Serial_printf("*** TEST OK! ***\n\r");
148150
}

0 commit comments

Comments
 (0)