Skip to content

Commit a502fbc

Browse files
Enable system clock before enabling ADC0 (#26)
* NOT FOR RELEASE: Disable ADC * NOT FOR RELEASE: Check if ADC0 is available on testing boards * NOT FOR RELEASE: System clock before ADC0 enable * NOT FOR RELEASE: Confirm clock needed to be enabled * NOT FOR RELEASE: Check if ADC0 is available on testing boards (again) * NOT FOR RELEASE: System clock before ADC0 enable (again) * NOT FOR RELEASE: Confirm bug * Final sanity check
1 parent 4f5e3e4 commit a502fbc

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

docker_env/src/bin/fob.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@ fn paired_fob_pairing() {
238238
return
239239
}
240240

241-
// Took too long...
242-
if get_remaining_us_delay_timer() < 100_000 {
243-
wait_delay_timer();
244-
sleep_us(4_000_000);
245-
uart_writeb_board(MAGIC_PAIR_RST);
246-
log!("Paired fob: Sent PAIR_RST to unpaired fob");
247-
return
248-
}
249-
250241
// 5. Compute hash equality
251242
let mut eeprom_pin_hash_w: [u32; LENW_PIN_HASH] = [0; LENW_PIN_HASH];
252243
eeprom_read(&mut eeprom_pin_hash_w, FOBMEM_PIN_HASH);

docker_env/tivaware/driverlib/wrapper.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ static void tick_timer_init(void) {
118118
* This function initializes the system peripherals and sets up the board link.
119119
*/
120120
void init_system(void) {
121+
// Set the clocking to run directly from the crystal.
122+
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_INT);
123+
121124
// Initialize the ADC temperature sensor
122125
adc_init();
123126

41.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)