Skip to content
Snippets Groups Projects
Commit 0ee6f046 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Fix bug with calculating SWV triggers.

parent dd9eb1a7
Branches
Tags
No related merge requests found
......@@ -521,7 +521,7 @@ void swv_experiment(int16_t start, int16_t stop, uint16_t step, uint16_t pulse_h
//calculate time to ADC trigger
period = ceil((1/(double)frequency)*F_CPU);
uint8_t temp_div = ceil((double)period/65536);
uint16_t temp_div = ceil((double)period/65536);
if (temp_div == 1)
tc_write_clock_source(&TCF0,TC_CLKSEL_DIV1_gc);
......
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment