fix
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "ultrasonic_driver.h"
|
||||
|
||||
#define ULTRASONIC_CYCLES 0x05U
|
||||
#define ULTRASONIC_TRAN_US 1000 // (ms)
|
||||
#define ULTRASONIC_TRAN_US 50 // (ms)
|
||||
|
||||
extern uint32_t capture_value;
|
||||
|
||||
@@ -33,7 +33,7 @@ int main(void)
|
||||
|
||||
|
||||
/* ---------- debug start ---------- */
|
||||
ultrasonic_transmit_delay(240);
|
||||
ultrasonic_transmit_delay(250);
|
||||
recevice_exti_config();
|
||||
ultrasonic_echo_timer_config();
|
||||
|
||||
|
@@ -176,7 +176,7 @@ void ultrasonic_echo_timer_config(void)
|
||||
timer_icinitpara.icpolarity = TIMER_IC_POLARITY_BOTH_EDGE;
|
||||
timer_icinitpara.icselection = TIMER_IC_SELECTION_INDIRECTTI;
|
||||
timer_icinitpara.icprescaler = TIMER_IC_PSC_DIV1;
|
||||
timer_icinitpara.icfilter = 0x0A; // 设置滤波器
|
||||
timer_icinitpara.icfilter = 0x03; // 设置滤波器
|
||||
timer_input_capture_config(TIMER16, TIMER_CH_0, &timer_icinitpara);
|
||||
|
||||
// timer_enable(TIMER16);
|
||||
|
Reference in New Issue
Block a user