Commit 5b94b8f0 authored by Alain Monney's avatar Alain Monney
Browse files

Corrected US sensors

parent e411a969
......@@ -86,3 +86,4 @@ motor_stm32/Debug/Core/Src/behaviour.su
motor_stm32/Debug/Core/Src/behaviour.o
motor_stm32/Debug/Core/Src/behaviour.o
motor_stm32/Debug/Core/Src/behaviour.su
motor_stm32/Debug/Core/Src/behaviour.d
......@@ -15,14 +15,14 @@
#define N_FRONT_IR_SENSORS 3
// IR : 1000 - 30 cm ; 1500 - 20 cm
#define IR_THRESHOLD 2500 //NEAR ~30cm
#define US_THRESHOLD 2500
#define US_BOTTLE_THRESHOLD 1000
#define US_VALID_LOW_THRESHOLD 300
#define US_THRESHOLD 2000
#define US_BOTTLE_THRESHOLD 500
#define US_VALID_LOW_THRESHOLD 120
#define US_VALID_THRESHOLD 23300
#define FAR_IR_THRESHOLD 700
//#define DIFF_THRESHOLD 100
#define SHOOTING_DIST 6
#define DIFF_US_RANGE_THRESHOLD 400
#define DIFF_US_RANGE_THRESHOLD 200
//TODO Change these values
#define MAX_IR 10000
#define MAX_US 10000
......@@ -36,6 +36,8 @@
#define END_OF_LOOP_VALUE 5000
#define INTERAVOIDANCE_DELAY 1000
void object_detection(uint32_t* range_data, bool* object_detected);
bool is_object_bottle(bool* object_detected);
bool object_in_front(bool* object_detected);
......
......@@ -21,7 +21,7 @@
#define N_US_SENSORS 2
#define N_IR_SENSORS 7
#define US_DELAY 200
#define US_DELAY 100
#define IR_DELAY 50
#define RANGE_LOG_DELAY 500
#define UART3_TIMEOUT 10
......@@ -62,7 +62,8 @@ int open_backdoor_command(UART_HandleTypeDef* huart, const char* msg);
int set_arm_angle_command(UART_HandleTypeDef* huart, UART_HandleTypeDef* huart_dynamixel, const char* UART_in_buffer);
int gather_command(UART_HandleTypeDef* huart, UART_HandleTypeDef* huart_dynamixel, const char* msg);
const char* remove_header(const char*);
void HCSR04_Read (TIM_HandleTypeDef* htim);
void HCSR04_Read (TIM_HandleTypeDef* htim, uint32_t* range_data);
void US_IC_callback(TIM_HandleTypeDef* htim, uint32_t* sensors_data);
void IR_Read(ADC_HandleTypeDef* hadc, uint32_t* adc_data);
void gatherBottle(UART_HandleTypeDef* huart, int delay);
//void initRakeAngle();
......
#include "behaviour.h"
#include <math.h>
#include <stdio.h>
#define MAX_IR 10000
#define MAX_US 10000
......@@ -59,7 +60,7 @@ void decision_making_based_on_range_sensors(uint32_t* range_data, UART_HandleTyp
for (int i=N_IR_SENSORS; i<N_IR_SENSORS+N_US_SENSORS; i++) //for each ultrasound sensors
{
if (range_data[i]<US_THRESHOLD && !(range_data[i]>US_VALID_THRESHOLD) && !(range_data[i]<US_VALID_LOW_THRESHOLD))
if ((range_data[i]<US_THRESHOLD) && !(range_data[i]>US_VALID_THRESHOLD) && !(range_data[i]<US_VALID_LOW_THRESHOLD))
{
for (int j=0; j<N_FRONT_IR_SENSORS; j++)
{
......@@ -121,7 +122,29 @@ void decision_making_based_on_range_sensors(uint32_t* range_data, UART_HandleTyp
void obstacle_avoidance(uint32_t* range_data, int smallest_ir_id)
{
int delay;
//TODO To be tested
// int id;
// uint32_t time = HAL_GetTick();
//
//
// static uint32_t old_time = 0;
// static int old_id = -1;
//
//
// if (time - old_time < INTERAVOIDANCE_DELAY)
// {
// id=old_id;
// }
// else
// {
// id=smallest_ir_id;
// }
//
// old_time = time;
// old_id = smallest_ir_id;
//
//
// switch (id)
switch (smallest_ir_id)
{
......@@ -226,13 +249,21 @@ void bottle_in_front(uint32_t* range_data, UART_HandleTypeDef* huart_dynamixel,
uint32_t timeout_counter=0;
while (((range_data[7] > US_BOTTLE_THRESHOLD || range_data[7]>US_VALID_THRESHOLD || range_data[7]<US_VALID_LOW_THRESHOLD) &&
(range_data[8] > US_BOTTLE_THRESHOLD || range_data[8]>US_VALID_THRESHOLD|| range_data[8]<US_VALID_LOW_THRESHOLD)) && (timeout_counter < END_OF_LOOP_VALUE))
// while (((range_data[7] > US_BOTTLE_THRESHOLD || range_data[8] > US_BOTTLE_THRESHOLD) ||
// (range_data[7]>US_VALID_THRESHOLD || range_data[7]<US_VALID_LOW_THRESHOLD) ||
// (range_data[8]>US_VALID_THRESHOLD || range_data[8]<US_VALID_LOW_THRESHOLD)) &&
// (timeout_counter < END_OF_LOOP_VALUE))
{
//Cancel function if values out of threshold
if ((range_data[7] > US_VALID_THRESHOLD) && (range_data[8] > US_VALID_THRESHOLD))
{
moveForward(10);
return;
}
// printf("%lu %lu \n", range_data[7], range_data[8]);
//// Cancel function if values out of threshold
// if ((range_data[7] > US_VALID_THRESHOLD) && (range_data[8] > US_VALID_THRESHOLD))
// {
// moveForward(10);
// return;
// }
int32_t range_diff = (int32_t) range_data[7] - range_data[8];
if (range_data[7]>US_VALID_LOW_THRESHOLD && range_data[8]>US_VALID_LOW_THRESHOLD)
......@@ -245,11 +276,15 @@ void bottle_in_front(uint32_t* range_data, UART_HandleTypeDef* huart_dynamixel,
{
customMotorControl(L_FW_ROT,R_FW_ROT, 10, MANEUVER_SPEED);
}
else
{
moveForward(MANEUVER_SPEED);
}
}
else
{
moveForward(MANEUVER_SPEED);
}
// else
// {
// moveForward(MANEUVER_SPEED);
// }
// moveForward(MANEUVER_SPEED);
......@@ -269,6 +304,7 @@ void bottle_in_front(uint32_t* range_data, UART_HandleTypeDef* huart_dynamixel,
return;
}
}
// printf("PICKING \n");
gathering_protocol(huart_dynamixel, 0);
}
......
......@@ -6,6 +6,12 @@
//static double i_rake_angle = 230.;
//static double i_bucket_angle = 270.;
static double i_backdoor_angle = 0.;
static uint8_t Is_First_Captured = 0;
static uint8_t US_Captured = 0;
static uint8_t activated_US_id = 0;
static uint32_t IC_Val1 = 0;
static uint32_t IC_Val2 = 0;
static uint32_t Difference = 0;
int sign(int);
......@@ -489,33 +495,117 @@ const char* remove_header(const char* msg)
return p_msg;
}
void HCSR04_Read (TIM_HandleTypeDef* htim)
void HCSR04_Read (TIM_HandleTypeDef* htim, uint32_t* range_data)
{
static int i = 0;
switch (i)
if (US_Captured == 0)
{
range_data[N_IR_SENSORS + activated_US_id] = 40000; //US_MAX_RANGE
}
Is_First_Captured = 0;
US_Captured = 0;
HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
delay_us(10); // wait for 10 us
HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_RESET); // pull the TRIG pin low
HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_RESET); // pull the TRIG pin HIGH
//
switch (activated_US_id)
{
case 0:
HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
delay_us(10); // wait for 10 us
HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_RESET); // pull the TRIG pin low
// HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
// delay_us(10); // wait for 10 us
// HAL_GPIO_WritePin(US_trigger1_GPIO_Port, US_trigger1_Pin, GPIO_PIN_RESET); // pull the TRIG pin low
__HAL_TIM_ENABLE_IT(htim, TIM_IT_CC1);
i++;
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2);
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_IT_CC1, TIM_INPUTCHANNELPOLARITY_RISING);
activated_US_id++;
break;
case 1:
HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
delay_us(10); // wait for 10 us
HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_RESET); // pull the TRIG pin low
// HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_SET); // pull the TRIG pin HIGH
// delay_us(10); // wait for 10 us
// HAL_GPIO_WritePin(US_trigger2_GPIO_Port, US_trigger2_Pin, GPIO_PIN_RESET); // pull the TRIG pin low
__HAL_TIM_ENABLE_IT(htim, TIM_IT_CC2);
i=0;
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_IT_CC2, TIM_INPUTCHANNELPOLARITY_RISING);
activated_US_id=0;
break;
default:
activated_US_id=0;
break;
}
}
void US_IC_callback(TIM_HandleTypeDef* htim, uint32_t* sensors_data)
{
uint32_t channel;
switch (htim->Channel)
{
case 1:
channel = TIM_CHANNEL_1;
break;
case 2:
channel = TIM_CHANNEL_2;
break;
default:
i=0;
break;
}
if (Is_First_Captured==0) // if the first value is not captured
{
IC_Val1 = HAL_TIM_ReadCapturedValue(htim, channel); // read the first value
Is_First_Captured = 1; // set the first captured as true
// Now change the polarity to falling edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, channel, TIM_INPUTCHANNELPOLARITY_FALLING);
}
else if (Is_First_Captured==1) // if the first is already captured
{
US_Captured = 1;
IC_Val2 = HAL_TIM_ReadCapturedValue(htim, channel); // read second value
__HAL_TIM_SET_COUNTER(htim, 0); // reset the counter
if (IC_Val2 > IC_Val1)
{
Difference = IC_Val2-IC_Val1;
}
else if (IC_Val1 > IC_Val2)
{
Difference = (0xffff - IC_Val1) + IC_Val2;
}
// Distance[0] = Difference[0] * .034/2;
Is_First_Captured = 0; // set it back to false
// avg_buffer[0][i] = Difference[0];
// i++;
// if (i>AVG_BUFFER_DEPTH-1)
// {
// i=0;
// }
//
// avg_US = 0;
// for (int k=0; k<AVG_BUFFER_DEPTH; k++)
// {
// avg_US += avg_buffer[0][k];
// }
// avg_US = (double) avg_US/AVG_BUFFER_DEPTH;
// sensors_data[N_IR_SENSORS] = avg_US;
sensors_data[N_IR_SENSORS+activated_US_id] = Difference;
// set polarity to rising edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, channel, TIM_INPUTCHANNELPOLARITY_RISING);
// __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
}
}
void IR_Read(ADC_HandleTypeDef* hadc, uint32_t* adc_data)
{
for (int i=0; i<N_IR_SENSORS; i++)
......@@ -542,7 +632,7 @@ void gatherBottle(UART_HandleTypeDef* huart, int delay)
HAL_Delay(delay);
setDynamixelAngle(huart, DYNAMIXEL_ARM_ID, ARM_TOP_ANGLE);
HAL_Delay(1500);
HAL_Delay(2500);
dynamixelReleaseTorque(huart);
}
......
......@@ -71,10 +71,10 @@ static uint32_t sensors_data[N_US_SENSORS + N_IR_SENSORS] = {0};
static uint32_t adc_data[N_IR_SENSORS/2+1];
static uint32_t IC_Val1[N_US_SENSORS] = {0};
static uint32_t IC_Val2[N_US_SENSORS] = {0};
static uint32_t Difference[N_US_SENSORS] = {0};
static uint8_t Is_First_Captured[N_US_SENSORS] = {0}; // is the first value captured ?
//static uint32_t IC_Val1[N_US_SENSORS] = {0};
//static uint32_t IC_Val2[N_US_SENSORS] = {0};
//static uint32_t Difference[N_US_SENSORS] = {0};
//static uint8_t Is_First_Captured[N_US_SENSORS] = {0}; // is the first value captured ?
//static uint32_t avg_buffer[N_US_SENSORS][AVG_BUFFER_DEPTH];
// static uint8_t Distance[3] = {0};
static uint8_t active = 0;
......@@ -166,7 +166,7 @@ int main(void)
HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_1);
HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_2);
HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_4);
// HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_4);
HAL_UART_Receive_DMA(&huart2, &UART_rx_byte, sizeof(UART_rx_byte));
......@@ -190,8 +190,9 @@ int main(void)
/* USER CODE BEGIN 3 */
UART_check_msg();
if (active)
// printf("%lu %lu \n", sensors_data[7], sensors_data[8]);
// HAL_Delay(100);
if (true)
{
// moveForward(20);
decision_making_based_on_range_sensors(sensors_data, &huart3);
......@@ -1088,6 +1089,10 @@ void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM2)
{
US_IC_callback(htim, sensors_data);
// static uint32_t IC_Val1[N_US_SENSORS] = {0};
// static uint32_t IC_Val2[N_US_SENSORS] = {0};
// static uint32_t Difference[N_US_SENSORS] = {0};
......@@ -1098,102 +1103,102 @@ void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
// uint32_t avg_US=0;
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) // if the interrupt source is channel1
{
if (Is_First_Captured[0]==0) // if the first value is not captured
{
IC_Val1[0] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); // read the first value
Is_First_Captured[0] = 1; // set the first captured as true
// Now change the polarity to falling edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_FALLING);
}
else if (Is_First_Captured[0]==1) // if the first is already captured
{
IC_Val2[0] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); // read second value
__HAL_TIM_SET_COUNTER(htim, 0); // reset the counter
if (IC_Val2[0] > IC_Val1[0])
{
Difference[0] = IC_Val2[0]-IC_Val1[0];
}
else if (IC_Val1[0] > IC_Val2[0])
{
Difference[0] = (0xffff - IC_Val1[0]) + IC_Val2[0];
}
// Distance[0] = Difference[0] * .034/2;
Is_First_Captured[0] = 0; // set it back to false
// avg_buffer[0][i] = Difference[0];
// i++;
// if (i>AVG_BUFFER_DEPTH-1)
// if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) // if the interrupt source is channel1
// {
// if (Is_First_Captured[0]==0) // if the first value is not captured
// {
// IC_Val1[0] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); // read the first value
// Is_First_Captured[0] = 1; // set the first captured as true
// // Now change the polarity to falling edge
// __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_FALLING);
// }
//
// else if (Is_First_Captured[0]==1) // if the first is already captured
// {
// IC_Val2[0] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); // read second value
// __HAL_TIM_SET_COUNTER(htim, 0); // reset the counter
//
// if (IC_Val2[0] > IC_Val1[0])
// {
// i=0;
// Difference[0] = IC_Val2[0]-IC_Val1[0];
// }
//
// avg_US = 0;
// for (int k=0; k<AVG_BUFFER_DEPTH; k++)
// else if (IC_Val1[0] > IC_Val2[0])
// {
// avg_US += avg_buffer[0][k];
// Difference[0] = (0xffff - IC_Val1[0]) + IC_Val2[0];
// }
// avg_US = (double) avg_US/AVG_BUFFER_DEPTH;
// sensors_data[N_IR_SENSORS] = avg_US;
sensors_data[N_IR_SENSORS] = Difference[0];
// set polarity to rising edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_RISING);
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
}
}
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_2) // if the interrupt source is channel1
{
if (Is_First_Captured[1]==0) // if the first value is not captured
{
IC_Val1[1] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); // read the first value
Is_First_Captured[1] = 1; // set the first captured as true
// Now change the polarity to falling edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_FALLING);
}
else if (Is_First_Captured[1]==1) // if the first is already captured
{
IC_Val2[1] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); // read second value
__HAL_TIM_SET_COUNTER(htim, 0); // reset the counter
if (IC_Val2[1] > IC_Val1[1])
{
Difference[1] = IC_Val2[1]-IC_Val1[1];
}
else if (IC_Val1[1] > IC_Val2[1])
{
Difference[1] = (0xffff - IC_Val1[1]) + IC_Val2[1];
}
// Distance[1] = Difference[1] * .034/2;
Is_First_Captured[1] = 0; // set it back to false
// avg_buffer[1][j] = Difference[1];
// j++;
// if (j>AVG_BUFFER_DEPTH-1)
//
// // Distance[0] = Difference[0] * .034/2;
// Is_First_Captured[0] = 0; // set it back to false
//// avg_buffer[0][i] = Difference[0];
//// i++;
//// if (i>AVG_BUFFER_DEPTH-1)
//// {
//// i=0;
//// }
////
//// avg_US = 0;
//// for (int k=0; k<AVG_BUFFER_DEPTH; k++)
//// {
//// avg_US += avg_buffer[0][k];
//// }
//// avg_US = (double) avg_US/AVG_BUFFER_DEPTH;
//// sensors_data[N_IR_SENSORS] = avg_US;
// sensors_data[N_IR_SENSORS] = Difference[0];
//
// // set polarity to rising edge
// __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_RISING);
// __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC1);
// }
// }
// if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_2) // if the interrupt source is channel1
// {
// if (Is_First_Captured[1]==0) // if the first value is not captured
// {
// IC_Val1[1] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); // read the first value
// Is_First_Captured[1] = 1; // set the first captured as true
// // Now change the polarity to falling edge
// __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_FALLING);
// }
//
// else if (Is_First_Captured[1]==1) // if the first is already captured
// {
// IC_Val2[1] = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_2); // read second value
// __HAL_TIM_SET_COUNTER(htim, 0); // reset the counter
//
// if (IC_Val2[1] > IC_Val1[1])
// {
// j=0;
// Difference[1] = IC_Val2[1]-IC_Val1[1];
// }
//
// avg_US = 0;
// for (int k=0; k<AVG_BUFFER_DEPTH; k++)
// else if (IC_Val1[1] > IC_Val2[1])
// {
// avg_US += avg_buffer[1][k];
// Difference[1] = (0xffff - IC_Val1[1]) + IC_Val2[1];
// }
// avg_US = (double) avg_US/AVG_BUFFER_DEPTH;
// sensors_data[N_IR_SENSORS+1] = avg_US;
sensors_data[N_IR_SENSORS+1] = Difference[1];
// set polarity to rising edge
__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_RISING);
__HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2);
}
}
//
// // Distance[1] = Difference[1] * .034/2;
// Is_First_Captured[1] = 0; // set it back to false
//// avg_buffer[1][j] = Difference[1];
//// j++;
//// if (j>AVG_BUFFER_DEPTH-1)
//// {
//// j=0;
//// }
////
//// avg_US = 0;
//// for (int k=0; k<AVG_BUFFER_DEPTH; k++)
//// {
//// avg_US += avg_buffer[1][k];
//// }
//// avg_US = (double) avg_US/AVG_BUFFER_DEPTH;
//// sensors_data[N_IR_SENSORS+1] = avg_US;
// sensors_data[N_IR_SENSORS+1] = Difference[1];
//
// // set polarity to rising edge
// __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_2, TIM_INPUTCHANNELPOLARITY_RISING);
// __HAL_TIM_DISABLE_IT(htim, TIM_IT_CC2);
// }
// }
// else if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4) // if the interrupt source is channel1
// {
// if (Is_First_Captured[2]==0) // if the first value is not captured
......@@ -1273,7 +1278,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim)
//ULTRASOUND
else if (htim->Instance == TIM9)
{
HCSR04_Read(&htim2);
HCSR04_Read(&htim2, sensors_data);
}
//INFRARED
else if (htim->Instance == TIM12)
......@@ -1287,6 +1292,11 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim)
}
}
int __io_putchar(int ch) {
ITM_SendChar(ch);
return ch;
}
/* USER CODE END 4 */
/**
......
......@@ -2,7 +2,7 @@
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="true"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.ip_address_local" value="localhost"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.limit_swo_clock.enabled" value="false"/>
......@@ -15,8 +15,9 @@
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.exception.unaligned" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.startuptab.haltonexception" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swd_mode" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_config_enabled" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_port" value="61235"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="16000000"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.swv_trace_hclk" value="84000000"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.useRemoteTarget" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.vector_table" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
......@@ -45,14 +46,23 @@
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="C:\Users\Alain\Documents\STM32_projects\motor_stm32\Debug\st-link_gdbserver_log.txt"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="enable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.low_power_debug" value="disable"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.max_halt_delay" value="2"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.reset_strategy" value="connect_under_reset"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_check_serial_number" value="true"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value="0668FF313736504157193555"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="enable"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{&quot;fVersion&quot;:1,&quot;fItems&quot;:[{&quot;fDisplayName&quot;:&quot;Reset&quot;,&quot;fIsSuppressible&quot;:false,&quot;fResetAttribute&quot;:&quot;Software system reset&quot;,&quot;fResetStrategies&quot;:[{&quot;fDisplayName&quot;:&quot;Software system reset&quot;,&quot;fLaunchAttribute&quot;:&quot;system_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Hardware reset&quot;,&quot;fLaunchAttribute&quot;:&quot;hardware_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset hardware\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;Core reset&quot;,&quot;fLaunchAttribute&quot;:&quot;core_reset&quot;,&quot;fGdbCommands&quot;:[&quot;monitor reset core\r\n&quot;],&quot;fCmdOptions&quot;:[&quot;-g&quot;]},{&quot;fDisplayName&quot;:&quot;None&quot;,&quot;fLaunchAttribute&quot;:&quot;no_reset&quot;,&quot;fGdbCommands&quot;:[],&quot;fCmdOptions&quot;:[&quot;-g&quot;]}],&quot;fGdbCommandGroup&quot;:{&quot;name&quot;:&quot;Additional commands&quot;,&quot;commands&quot;:[]},&quot;fStartApplication&quot;:true}]}"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.datatrace_0" value="Enabled=false:Address=0x0:Access=Read/Write:Size=Word:Function=Data Value"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.datatrace_1" value="Enabled=false:Address=0x0:Access=Read/Write:Size=Word:Function=Data Value"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.datatrace_2" value="Enabled=false:Address=0x0:Access=Read/Write:Size=Word:Function=Data Value"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.datatrace_3" value="Enabled=false:Address=0x0:Access=Read/Write:Size=Word:Function=Data Value"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.itmports" value="1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.itmports_priv" value="0:0:0:0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.pc_sample" value="0:16384"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.timestamps" value="1:1"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.swv.trace_events" value="Cpi=0:Exc=0:Sleep=0:Lsu=0:Fold=0:Exetrc=0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="threadx"/>
......
Supports Markdown
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