Compare commits
No commits in common. "develop" and "master" have entirely different histories.
|
@ -28,4 +28,3 @@ dist
|
|||
/MDK-ARM/*.bin
|
||||
/MDK-ARM/.pack
|
||||
.vscode/settings.json
|
||||
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
#define __MAIN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
|
@ -50,7 +49,6 @@ extern "C"
|
|||
/* USER CODE BEGIN Includes */
|
||||
#include "sys.h"
|
||||
#include "delay.h"
|
||||
#include "btn.h"
|
||||
#include "lib.h"
|
||||
#include "bsp.h"
|
||||
|
||||
|
@ -91,26 +89,20 @@ extern "C"
|
|||
#define TMC2240_MISO_GPIO_Port GPIOA
|
||||
#define TMC2240_MOSI_Pin LL_GPIO_PIN_7
|
||||
#define TMC2240_MOSI_GPIO_Port GPIOA
|
||||
#define TMC2240_STEP_Pin LL_GPIO_PIN_0
|
||||
#define TMC2240_STEP_GPIO_Port GPIOB
|
||||
#define TMC2240_DIR_Pin LL_GPIO_PIN_1
|
||||
#define TMC2240_DIR_GPIO_Port GPIOB
|
||||
#define OLED_SDA_Pin LL_GPIO_PIN_12
|
||||
#define OLED_SDA_GPIO_Port GPIOB
|
||||
#define OLDE_SCK_Pin LL_GPIO_PIN_13
|
||||
#define OLDE_SCK_GPIO_Port GPIOB
|
||||
#define KEY_1_Pin LL_GPIO_PIN_14
|
||||
#define KEY_1_GPIO_Port GPIOB
|
||||
#ifndef NVIC_PRIORITYGROUP_0
|
||||
#define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bit for pre-emption priority, \
|
||||
#define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bit for pre-emption priority,
|
||||
4 bits for subpriority */
|
||||
#define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bit for pre-emption priority, \
|
||||
#define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bit for pre-emption priority,
|
||||
3 bits for subpriority */
|
||||
#define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority, \
|
||||
#define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority,
|
||||
2 bits for subpriority */
|
||||
#define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority, \
|
||||
#define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority,
|
||||
1 bit for subpriority */
|
||||
#define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority, \
|
||||
#define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority,
|
||||
0 bit for subpriority */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ extern "C" {
|
|||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_TIM1_Init(void);
|
||||
void MX_TIM2_Init(void);
|
||||
void MX_TIM3_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
|
|
@ -59,7 +59,7 @@ void MX_GPIO_Init(void)
|
|||
LL_GPIO_ResetOutputPin(GPIOA, TMC2240_EN_Pin|TMC2240_CS_Pin);
|
||||
|
||||
/**/
|
||||
LL_GPIO_ResetOutputPin(GPIOB, TMC2240_DIR_Pin|OLED_SDA_Pin|OLDE_SCK_Pin);
|
||||
LL_GPIO_ResetOutputPin(GPIOB, OLED_SDA_Pin|OLDE_SCK_Pin);
|
||||
|
||||
/**/
|
||||
GPIO_InitStruct.Pin = LED_BLUE_Pin;
|
||||
|
@ -74,8 +74,8 @@ void MX_GPIO_Init(void)
|
|||
LL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/**/
|
||||
GPIO_InitStruct.Pin = LL_GPIO_PIN_0|LL_GPIO_PIN_1|LL_GPIO_PIN_2|LL_GPIO_PIN_8
|
||||
|LL_GPIO_PIN_11|LL_GPIO_PIN_12|LL_GPIO_PIN_15;
|
||||
GPIO_InitStruct.Pin = LL_GPIO_PIN_0|LL_GPIO_PIN_2|LL_GPIO_PIN_8|LL_GPIO_PIN_11
|
||||
|LL_GPIO_PIN_12|LL_GPIO_PIN_15;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_ANALOG;
|
||||
LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
|
@ -87,16 +87,10 @@ void MX_GPIO_Init(void)
|
|||
LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
/**/
|
||||
GPIO_InitStruct.Pin = TMC2240_DIR_Pin;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_OUTPUT;
|
||||
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
|
||||
LL_GPIO_Init(TMC2240_DIR_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/**/
|
||||
GPIO_InitStruct.Pin = LL_GPIO_PIN_2|LL_GPIO_PIN_10|LL_GPIO_PIN_11|LL_GPIO_PIN_15
|
||||
|LL_GPIO_PIN_3|LL_GPIO_PIN_4|LL_GPIO_PIN_5|LL_GPIO_PIN_6
|
||||
|LL_GPIO_PIN_7|LL_GPIO_PIN_8|LL_GPIO_PIN_9;
|
||||
GPIO_InitStruct.Pin = LL_GPIO_PIN_0|LL_GPIO_PIN_1|LL_GPIO_PIN_2|LL_GPIO_PIN_10
|
||||
|LL_GPIO_PIN_11|LL_GPIO_PIN_14|LL_GPIO_PIN_15|LL_GPIO_PIN_3
|
||||
|LL_GPIO_PIN_4|LL_GPIO_PIN_5|LL_GPIO_PIN_6|LL_GPIO_PIN_7
|
||||
|LL_GPIO_PIN_8|LL_GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_ANALOG;
|
||||
LL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
|
@ -108,12 +102,6 @@ void MX_GPIO_Init(void)
|
|||
GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;
|
||||
LL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/**/
|
||||
GPIO_InitStruct.Pin = KEY_1_Pin;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = LL_GPIO_PULL_UP;
|
||||
LL_GPIO_Init(KEY_1_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
|
|
@ -99,6 +99,7 @@ int main(void)
|
|||
/* Initialize all configured peripherals */
|
||||
MX_GPIO_Init();
|
||||
MX_DMA_Init();
|
||||
MX_TIM2_Init();
|
||||
MX_USART1_UART_Init();
|
||||
MX_TIM1_Init();
|
||||
MX_TIM3_Init();
|
||||
|
|
|
@ -47,7 +47,7 @@ void MX_SPI1_Init(void)
|
|||
*/
|
||||
GPIO_InitStruct.Pin = TMC2240_SCK_Pin|TMC2240_MOSI_Pin;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
|
||||
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
|
||||
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH;
|
||||
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
|
||||
LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
|
@ -64,7 +64,7 @@ void MX_SPI1_Init(void)
|
|||
SPI_InitStruct.ClockPolarity = LL_SPI_POLARITY_HIGH;
|
||||
SPI_InitStruct.ClockPhase = LL_SPI_PHASE_2EDGE;
|
||||
SPI_InitStruct.NSS = LL_SPI_NSS_SOFT;
|
||||
SPI_InitStruct.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV16;
|
||||
SPI_InitStruct.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV32;
|
||||
SPI_InitStruct.BitOrder = LL_SPI_MSB_FIRST;
|
||||
SPI_InitStruct.CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE;
|
||||
SPI_InitStruct.CRCPoly = 10;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "sys.h"
|
||||
#include "flow.h"
|
||||
#include "board.h"
|
||||
#include "btn.h"
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
@ -243,7 +243,6 @@ void TIM1_UP_IRQHandler(void)
|
|||
{
|
||||
TIM_IRQ_HANDLER(TASK_TIM);
|
||||
LL_IncTick();
|
||||
button_ticks();
|
||||
FLOW_TICK_UPDATE();
|
||||
}
|
||||
/* USER CODE END TIM1_UP_IRQn 1 */
|
||||
|
@ -258,13 +257,9 @@ void TIM3_IRQHandler(void)
|
|||
|
||||
/* USER CODE END TIM3_IRQn 0 */
|
||||
/* USER CODE BEGIN TIM3_IRQn 1 */
|
||||
if (IS_TIM_IT_FLAG(TMC2240_TIM))
|
||||
if (IS_TIM_IT_FLAG(WORK_TIM))
|
||||
{
|
||||
if (LL_TIM_IsActiveFlag_CC3(TMC2240_TIM))
|
||||
{
|
||||
tmc2240_motor_update(TMC2240_1);
|
||||
}
|
||||
TIM_IRQ_HANDLER(TMC2240_TIM);
|
||||
TIM_IRQ_HANDLER(WORK_TIM);
|
||||
}
|
||||
/* USER CODE END TIM3_IRQn 1 */
|
||||
}
|
||||
|
|
|
@ -58,6 +58,55 @@ void MX_TIM1_Init(void)
|
|||
|
||||
/* USER CODE END TIM1_Init 2 */
|
||||
|
||||
}
|
||||
/* TIM2 init function */
|
||||
void MX_TIM2_Init(void)
|
||||
{
|
||||
|
||||
/* USER CODE BEGIN TIM2_Init 0 */
|
||||
|
||||
/* USER CODE END TIM2_Init 0 */
|
||||
|
||||
LL_TIM_InitTypeDef TIM_InitStruct = {0};
|
||||
LL_TIM_OC_InitTypeDef TIM_OC_InitStruct = {0};
|
||||
|
||||
LL_GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
/* Peripheral clock enable */
|
||||
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM2);
|
||||
|
||||
/* USER CODE BEGIN TIM2_Init 1 */
|
||||
|
||||
/* USER CODE END TIM2_Init 1 */
|
||||
TIM_InitStruct.Prescaler = 0;
|
||||
TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;
|
||||
TIM_InitStruct.Autoreload = 7199;
|
||||
TIM_InitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
|
||||
LL_TIM_Init(TIM2, &TIM_InitStruct);
|
||||
LL_TIM_EnableARRPreload(TIM2);
|
||||
LL_TIM_SetClockSource(TIM2, LL_TIM_CLOCKSOURCE_INTERNAL);
|
||||
LL_TIM_OC_EnablePreload(TIM2, LL_TIM_CHANNEL_CH2);
|
||||
TIM_OC_InitStruct.OCMode = LL_TIM_OCMODE_PWM2;
|
||||
TIM_OC_InitStruct.OCState = LL_TIM_OCSTATE_DISABLE;
|
||||
TIM_OC_InitStruct.OCNState = LL_TIM_OCSTATE_DISABLE;
|
||||
TIM_OC_InitStruct.CompareValue = 0;
|
||||
TIM_OC_InitStruct.OCPolarity = LL_TIM_OCPOLARITY_LOW;
|
||||
LL_TIM_OC_Init(TIM2, LL_TIM_CHANNEL_CH2, &TIM_OC_InitStruct);
|
||||
LL_TIM_OC_EnableFast(TIM2, LL_TIM_CHANNEL_CH2);
|
||||
LL_TIM_SetTriggerOutput(TIM2, LL_TIM_TRGO_RESET);
|
||||
LL_TIM_DisableMasterSlaveMode(TIM2);
|
||||
/* USER CODE BEGIN TIM2_Init 2 */
|
||||
|
||||
/* USER CODE END TIM2_Init 2 */
|
||||
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
|
||||
/**TIM2 GPIO Configuration
|
||||
PA1 ------> TIM2_CH2
|
||||
*/
|
||||
GPIO_InitStruct.Pin = LL_GPIO_PIN_1;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
|
||||
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
|
||||
LL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
/* TIM3 init function */
|
||||
void MX_TIM3_Init(void)
|
||||
|
@ -68,47 +117,29 @@ void MX_TIM3_Init(void)
|
|||
/* USER CODE END TIM3_Init 0 */
|
||||
|
||||
LL_TIM_InitTypeDef TIM_InitStruct = {0};
|
||||
LL_TIM_OC_InitTypeDef TIM_OC_InitStruct = {0};
|
||||
|
||||
LL_GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
/* Peripheral clock enable */
|
||||
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM3);
|
||||
|
||||
/* TIM3 interrupt Init */
|
||||
NVIC_SetPriority(TIM3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0));
|
||||
NVIC_SetPriority(TIM3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),3, 0));
|
||||
NVIC_EnableIRQ(TIM3_IRQn);
|
||||
|
||||
/* USER CODE BEGIN TIM3_Init 1 */
|
||||
|
||||
/* USER CODE END TIM3_Init 1 */
|
||||
TIM_InitStruct.Prescaler = 71;
|
||||
TIM_InitStruct.Prescaler = 7199;
|
||||
TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;
|
||||
TIM_InitStruct.Autoreload = 1000;
|
||||
TIM_InitStruct.Autoreload = 99;
|
||||
TIM_InitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
|
||||
LL_TIM_Init(TIM3, &TIM_InitStruct);
|
||||
LL_TIM_DisableARRPreload(TIM3);
|
||||
LL_TIM_OC_EnablePreload(TIM3, LL_TIM_CHANNEL_CH3);
|
||||
TIM_OC_InitStruct.OCMode = LL_TIM_OCMODE_PWM1;
|
||||
TIM_OC_InitStruct.OCState = LL_TIM_OCSTATE_DISABLE;
|
||||
TIM_OC_InitStruct.OCNState = LL_TIM_OCSTATE_DISABLE;
|
||||
TIM_OC_InitStruct.CompareValue = 0;
|
||||
TIM_OC_InitStruct.OCPolarity = LL_TIM_OCPOLARITY_HIGH;
|
||||
LL_TIM_OC_Init(TIM3, LL_TIM_CHANNEL_CH3, &TIM_OC_InitStruct);
|
||||
LL_TIM_OC_DisableFast(TIM3, LL_TIM_CHANNEL_CH3);
|
||||
LL_TIM_SetClockSource(TIM3, LL_TIM_CLOCKSOURCE_INTERNAL);
|
||||
LL_TIM_SetTriggerOutput(TIM3, LL_TIM_TRGO_RESET);
|
||||
LL_TIM_DisableMasterSlaveMode(TIM3);
|
||||
/* USER CODE BEGIN TIM3_Init 2 */
|
||||
|
||||
/* USER CODE END TIM3_Init 2 */
|
||||
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOB);
|
||||
/**TIM3 GPIO Configuration
|
||||
PB0 ------> TIM3_CH3
|
||||
*/
|
||||
GPIO_InitStruct.Pin = TMC2240_STEP_Pin;
|
||||
GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
|
||||
GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
|
||||
LL_GPIO_Init(TMC2240_STEP_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -125,7 +125,7 @@
|
|||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>CMSIS_AGDI</Key>
|
||||
<Name>-X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0CS32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:CS32F103C8$Flash\CS32F10x_128.FLM)</Name>
|
||||
<Name>-X"" -O206 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0CS32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:CS32F103C8$Flash\CS32F10x_128.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -153,19 +153,64 @@
|
|||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>_tmc2240,0x0A</ItemText>
|
||||
<ItemText>buffer</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>app,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>work,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>3</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>ch</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>4</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>dd</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>5</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>i,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>6</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>progress_text</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>7</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>x,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>8</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>_tmc2240</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>9</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>wdata</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>10</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>rdata</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>0</SubType>
|
||||
<ItemText>0x20003450</ItemText>
|
||||
<ItemText>0x20003440</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
|
@ -364,18 +409,6 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\application\key.c</PathWithFileName>
|
||||
<FilenameWithoutPath>key.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
@ -386,7 +419,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -398,7 +431,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -410,7 +443,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -422,7 +455,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -434,7 +467,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -446,7 +479,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -458,7 +491,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>18</FileNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -470,7 +503,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>19</FileNumber>
|
||||
<FileNumber>18</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -482,7 +515,7 @@
|
|||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>20</FileNumber>
|
||||
<FileNumber>19</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -495,11 +528,23 @@
|
|||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Drivers/STM32F1xx_HAL_Driver</GroupName>
|
||||
<GroupName>User/lib</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>20</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\aes.c</PathWithFileName>
|
||||
<FilenameWithoutPath>aes.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>21</FileNumber>
|
||||
|
@ -507,8 +552,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_gpio.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_gpio.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\clist.c</PathWithFileName>
|
||||
<FilenameWithoutPath>clist.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -519,8 +564,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_dma.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_dma.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\cmac.c</PathWithFileName>
|
||||
<FilenameWithoutPath>cmac.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -531,8 +576,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_spi.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_spi.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\cmd.c</PathWithFileName>
|
||||
<FilenameWithoutPath>cmd.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -543,8 +588,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_rcc.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_rcc.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\data_analysis.c</PathWithFileName>
|
||||
<FilenameWithoutPath>data_analysis.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -555,8 +600,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_utils.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_utils.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\debug.c</PathWithFileName>
|
||||
<FilenameWithoutPath>debug.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -567,8 +612,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_exti.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_exti.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\filter.c</PathWithFileName>
|
||||
<FilenameWithoutPath>filter.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -579,8 +624,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_pwr.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_pwr.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\lib.c</PathWithFileName>
|
||||
<FilenameWithoutPath>lib.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -591,8 +636,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_tim.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_tim.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\src\malloc.c</PathWithFileName>
|
||||
<FilenameWithoutPath>malloc.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -603,6 +648,182 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\mlist.c</PathWithFileName>
|
||||
<FilenameWithoutPath>mlist.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\pbuf.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pbuf.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\sqqueue.c</PathWithFileName>
|
||||
<FilenameWithoutPath>sqqueue.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\storage.c</PathWithFileName>
|
||||
<FilenameWithoutPath>storage.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\src\wl_flash.c</PathWithFileName>
|
||||
<FilenameWithoutPath>wl_flash.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\flow\flow_core.c</PathWithFileName>
|
||||
<FilenameWithoutPath>flow_core.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Drivers/STM32F1xx_HAL_Driver</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_gpio.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_gpio.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_dma.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_dma.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_spi.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_spi.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_rcc.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_rcc.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_utils.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_utils.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_exti.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_exti.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_pwr.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_pwr.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_tim.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_tim.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usart.c</PathWithFileName>
|
||||
<FilenameWithoutPath>stm32f1xx_ll_usart.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
@ -612,13 +833,13 @@
|
|||
|
||||
<Group>
|
||||
<GroupName>User/board</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -628,182 +849,6 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\driver\ssd1306_oled.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ssd1306_oled.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\driver\tmc2240.c</PathWithFileName>
|
||||
<FilenameWithoutPath>tmc2240.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>User/system/lib</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\aes.c</PathWithFileName>
|
||||
<FilenameWithoutPath>aes.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\clist.c</PathWithFileName>
|
||||
<FilenameWithoutPath>clist.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\cmac.c</PathWithFileName>
|
||||
<FilenameWithoutPath>cmac.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\cmd.c</PathWithFileName>
|
||||
<FilenameWithoutPath>cmd.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\data_analysis.c</PathWithFileName>
|
||||
<FilenameWithoutPath>data_analysis.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\debug.c</PathWithFileName>
|
||||
<FilenameWithoutPath>debug.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\filter.c</PathWithFileName>
|
||||
<FilenameWithoutPath>filter.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\lib.c</PathWithFileName>
|
||||
<FilenameWithoutPath>lib.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\malloc.c</PathWithFileName>
|
||||
<FilenameWithoutPath>malloc.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\mlist.c</PathWithFileName>
|
||||
<FilenameWithoutPath>mlist.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\pbuf.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pbuf.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\sqqueue.c</PathWithFileName>
|
||||
<FilenameWithoutPath>sqqueue.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>45</FileNumber>
|
||||
|
@ -811,8 +856,8 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\storage.c</PathWithFileName>
|
||||
<FilenameWithoutPath>storage.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\driver\ssd1306_oled.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ssd1306_oled.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
@ -823,20 +868,76 @@
|
|||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\src\wl_flash.c</PathWithFileName>
|
||||
<FilenameWithoutPath>wl_flash.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\driver\tmc2240.c</PathWithFileName>
|
||||
<FilenameWithoutPath>tmc2240.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>User/lib/control</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>47</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\system\lib\flow\flow_core.c</PathWithFileName>
|
||||
<FilenameWithoutPath>flow_core.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\User\lib\control\src\pid.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pid.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>48</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\control\src\pid_auto_tune.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pid_auto_tune.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>49</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\control\src\pid_common.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pid_common.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>50</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\control\src\pid_fuzzy.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pid_fuzzy.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>51</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\lib\control\src\pid_neural.c</PathWithFileName>
|
||||
<FilenameWithoutPath>pid_neural.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
<RunIndependent>0</RunIndependent>
|
||||
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
|
||||
<Capability>1</Capability>
|
||||
<DriverSelection>4096</DriverSelection>
|
||||
<DriverSelection>4101</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>1</bUseTDR>
|
||||
<Flash2>BIN\UL2CM3.DLL</Flash2>
|
||||
|
@ -339,7 +339,7 @@
|
|||
<MiscControls></MiscControls>
|
||||
<Define>STM32,STM32F103xB,USE_FULL_LL_DRIVER,HSE_VALUE=8000000,HSE_STARTUP_TIMEOUT=100,LSE_STARTUP_TIMEOUT=5000,LSE_VALUE=32768,HSI_VALUE=8000000,LSI_VALUE=40000,VDD_VALUE=3300,PREFETCH_ENABLE=1</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>../Core/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc;../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../Drivers/CMSIS/Include;../User;../User/application;../User/board;../User/system/inc;../User/system/bsp;../User/system/lib/inc;../User/system/lib/flow;../User/system/lib/control/inc;../User/system/lib/driver</IncludePath>
|
||||
<IncludePath>../Core/Inc;../Drivers/STM32F1xx_HAL_Driver/Inc;../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../Drivers/CMSIS/Include;../User;../User/application;../User/board;../User/system/inc;../User/system/bsp;../User/lib/inc;../User/lib/flow;../User/lib/control/inc;../User/lib/driver</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
|
@ -652,11 +652,6 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>..\User\application\app.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>key.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\application\key.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -709,6 +704,86 @@
|
|||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>User/lib</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>aes.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\aes.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>clist.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\clist.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cmac.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\cmac.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cmd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\cmd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>data_analysis.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\data_analysis.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>debug.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\debug.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>filter.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\filter.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lib.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\lib.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>malloc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\malloc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>mlist.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\mlist.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>pbuf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\pbuf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>sqqueue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\sqqueue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>storage.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\storage.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>wl_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\src\wl_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flow_core.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\lib\flow\flow_core.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Drivers/STM32F1xx_HAL_Driver</GroupName>
|
||||
<GroupOption>
|
||||
|
@ -1298,92 +1373,42 @@
|
|||
<File>
|
||||
<FileName>ssd1306_oled.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\driver\ssd1306_oled.c</FilePath>
|
||||
<FilePath>..\User\lib\driver\ssd1306_oled.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>tmc2240.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\driver\tmc2240.c</FilePath>
|
||||
<FilePath>..\User\lib\driver\tmc2240.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>User/system/lib</GroupName>
|
||||
<GroupName>User/lib/control</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>aes.c</FileName>
|
||||
<FileName>pid.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\aes.c</FilePath>
|
||||
<FilePath>..\User\lib\control\src\pid.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>clist.c</FileName>
|
||||
<FileName>pid_auto_tune.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\clist.c</FilePath>
|
||||
<FilePath>..\User\lib\control\src\pid_auto_tune.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cmac.c</FileName>
|
||||
<FileName>pid_common.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\cmac.c</FilePath>
|
||||
<FilePath>..\User\lib\control\src\pid_common.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cmd.c</FileName>
|
||||
<FileName>pid_fuzzy.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\cmd.c</FilePath>
|
||||
<FilePath>..\User\lib\control\src\pid_fuzzy.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>data_analysis.c</FileName>
|
||||
<FileName>pid_neural.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\data_analysis.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>debug.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\debug.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>filter.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\filter.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lib.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\lib.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>malloc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\malloc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>mlist.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\mlist.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>pbuf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\pbuf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>sqqueue.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\sqqueue.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>storage.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\storage.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>wl_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\src\wl_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flow_core.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\system\lib\flow\flow_core.c</FilePath>
|
||||
<FilePath>..\User\lib\control\src\pid_neural.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -2,28 +2,18 @@
|
|||
#include "app.h"
|
||||
#include "board.h"
|
||||
#include "flow.h"
|
||||
#include "key.h"
|
||||
|
||||
static struct flow business_fw; // 业务流程
|
||||
static struct flow idle_fw; // 空闲任务
|
||||
|
||||
app_t app;
|
||||
|
||||
void key_1_callback(PressEvent e)
|
||||
{
|
||||
app.angel = 360;
|
||||
}
|
||||
|
||||
static uint8_t business_inspection(struct flow *fl)
|
||||
{
|
||||
FL_HEAD(fl);
|
||||
for (;;)
|
||||
{
|
||||
if (app.angel != 0)
|
||||
{
|
||||
tmc2240_motor_set_angle(TMC2240_1, app.angel);
|
||||
app.angel = 0;
|
||||
}
|
||||
|
||||
tmc2240_position_read(TMC2240_1);
|
||||
FL_LOCK_DELAY(fl, FL_CLOCK_SEC);
|
||||
}
|
||||
FL_TAIL(fl);
|
||||
|
@ -44,11 +34,8 @@ static uint8_t idle_inspection(struct flow *fl)
|
|||
for (;;)
|
||||
{
|
||||
GPIO_TOGGLE(LED_BLUE_GPIO_Port, LED_BLUE_Pin);
|
||||
tmc2240_config_read(TMC2240_1);
|
||||
ssd1306_f6x8_string(0, 2, " tick:");
|
||||
ssd1306_f6x8_number(40, 2, tick++, 0);
|
||||
ssd1306_f6x8_string(0, 4, " cfg:");
|
||||
ssd1306_f6x8_number(40, 4, tmc2240_get(TMC2240_1)->config.gconf.data, 0);
|
||||
ssd1306_update_screen();
|
||||
FL_LOCK_DELAY(fl, FL_CLOCK_SEC);
|
||||
}
|
||||
|
@ -83,11 +70,12 @@ void app_init(void)
|
|||
{
|
||||
ssd1306_draw_progress_bar(i);
|
||||
}
|
||||
ssd1306_clear();
|
||||
key_init();
|
||||
|
||||
FL_INIT(&business_fw); // 业务流程
|
||||
FL_INIT(&idle_fw); // 空闲任务
|
||||
|
||||
ENABLE_TIM(TASK_TIM);
|
||||
ENABLE_TIM(TMC2240_TIM);
|
||||
ENABLE_TIM(WORK_TIM);
|
||||
|
||||
ssd1306_clear();
|
||||
}
|
||||
|
|
|
@ -11,12 +11,10 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
int32_t angel;
|
||||
} app_t;
|
||||
|
||||
extern app_t app;
|
||||
|
||||
void app_init(void);
|
||||
void app_run(void);
|
||||
|
||||
#endif // APP_H
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
#include "key.h"
|
||||
#include "btn.h"
|
||||
|
||||
#define INVALID_BUTTON_TICKS 200 // 无效按键时间 毫秒
|
||||
static uint32_t key_start_ticks = 0;
|
||||
/* 按钮 */
|
||||
struct Button key_1;
|
||||
struct Button key_2;
|
||||
struct Button key_3;
|
||||
struct Button key_4;
|
||||
struct Button key_5;
|
||||
struct Button key_6;
|
||||
|
||||
static BOOL allow_condition(void)
|
||||
{
|
||||
/**
|
||||
* key的初始化在LCD板子上电之前,因为是低电平有效,所以会误判为按键按下
|
||||
*/
|
||||
if (sys_millis() - key_start_ticks < INVALID_BUTTON_TICKS) // 仿真的时候按键会有毛刺,在xx秒之后按下有效
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static uint8_t read_button_gpio(button_id_e button_id)
|
||||
{
|
||||
if (allow_condition() == FALSE)
|
||||
{
|
||||
return ACTIVE_LEVEL_HIGH;
|
||||
}
|
||||
switch (button_id)
|
||||
{
|
||||
case KEY_1:
|
||||
return GPIO_READ(KEY_1_GPIO_Port, KEY_1_Pin);
|
||||
|
||||
default:
|
||||
return ACTIVE_LEVEL_LOW;
|
||||
}
|
||||
}
|
||||
|
||||
static void key_1_press_down_handler(void *btn)
|
||||
{
|
||||
key_1_callback(PRESS_DOWN);
|
||||
}
|
||||
|
||||
void key_init(void)
|
||||
{
|
||||
key_start_ticks = sys_millis();
|
||||
GPIO_SET_INPUT(KEY_1_GPIO_Port, KEY_1_Pin);
|
||||
|
||||
button_init(&key_1, read_button_gpio, ACTIVE_LEVEL_LOW, KEY_1, KEY_1);
|
||||
|
||||
button_attach(&key_1, PRESS_DOWN, key_1_press_down_handler);
|
||||
|
||||
button_start(&key_1);
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef _KEY_H_
|
||||
#define _KEY_H_
|
||||
#include "main.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
KEY_1 = 1,
|
||||
} button_id_e;
|
||||
|
||||
void key_1_callback(PressEvent e);
|
||||
|
||||
void key_init(void);
|
||||
#endif // _KEY_H_
|
|
@ -42,6 +42,7 @@ void board_init(void)
|
|||
ssd1306_init();
|
||||
|
||||
{
|
||||
GPIO_RESET(TMC2240_EN_GPIO_Port, TMC2240_EN_Pin);
|
||||
spi_gpio_group_t gpios;
|
||||
gpios.cs = gpio_create(TMC2240_CS_GPIO_Port, TMC2240_CS_Pin);
|
||||
gpios.mosi = gpio_create(TMC2240_MOSI_GPIO_Port, TMC2240_MOSI_Pin);
|
||||
|
@ -49,8 +50,8 @@ void board_init(void)
|
|||
gpios.miso = gpio_create(TMC2240_MISO_GPIO_Port, TMC2240_MISO_Pin);
|
||||
gpios.rst = gpio_create(NULL, 0);
|
||||
gpios.rdy = gpio_create(NULL, 0);
|
||||
tmc2240_init(TMC2240_1, SPI1, TMC2240_TIM, TMC2240_TIM_CH3, &gpios);
|
||||
tmc2240_get(TMC2240_1)->en = gpio_create(TMC2240_EN_GPIO_Port, TMC2240_EN_Pin);
|
||||
tmc2240_get(TMC2240_1)->dir = gpio_create(TMC2240_DIR_GPIO_Port, TMC2240_DIR_Pin);
|
||||
tmc2240_init(TMC2240_1, &gpios);
|
||||
tmc2240_get(TMC2240_1)->spi->interface.hardware_enable(tmc2240_get(TMC2240_1)->spi, SPI1);
|
||||
tmc2240_config(TMC2240_1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
#define UART_TXSIZE (240u) // 发送240个字节
|
||||
|
||||
#define TASK_TIM TIM1
|
||||
#define TMC2240_TIM TIM3
|
||||
#define TMC2240_TIM_CH3 LL_TIM_CHANNEL_CH3
|
||||
#define PWM_TIM TIM2
|
||||
#define PWM_CHANNEL LL_TIM_CHANNEL_CH2
|
||||
#define WORK_TIM TIM3
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* data */
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
#include "dac161p997.h"
|
||||
#include "tims.h"
|
||||
static dac161p997_t _handle;
|
||||
#include "delay.h"
|
||||
|
||||
static void delay_us(uint32_t us)
|
||||
{
|
||||
RESET_TIM_COUNT(TIME_1US);
|
||||
while (LL_TIM_GetCounter(TIME_1US) < us)
|
||||
; // 等待计数器达到指定值
|
||||
}
|
||||
static dac161p997_t _handle;
|
||||
|
||||
static void dac161p997_output_0()
|
||||
{
|
||||
|
@ -130,8 +124,17 @@ void dac161p997_swif_write_reg(uint16_t data, uint8_t tag)
|
|||
*/
|
||||
void dac161p997_output_current(float32 current)
|
||||
{
|
||||
uint16_t adc = (uint16_t)(current * DAC161P997_CURRENT_SLOPE);
|
||||
dac161p997_swif_write_reg(adc, DACCODE_WRITE);
|
||||
uint8_t adc = (uint16_t)(current * DAC161P997_CURRENT_SLOPE) >> 8;
|
||||
static uint8_t last_adc;
|
||||
if (adc == last_adc)
|
||||
{
|
||||
last_adc = adc;
|
||||
return;
|
||||
}
|
||||
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG_UNLOCK, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_ERR_LOW_REG + adc, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG_LOCK, CONFIG_WRITE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -146,9 +149,13 @@ void dac161p997_output_current(float32 current)
|
|||
*/
|
||||
void dac161p997_init()
|
||||
{
|
||||
ENABLE_TIM_COUNT(TIME_1US);
|
||||
_handle.io = gpio_create(DAC161P997_IO_PORT, DAC161P997_IO_PIN);
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG + DAC161P997_LCK_REG_UNLOCK, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_CONFIG2_REG, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG + DAC161P997_LCK_REG_LOCK, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG_UNLOCK, CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_CONFIG2_REG +
|
||||
DAC161P997_CONFIG2_REG_LOOP +
|
||||
DAC161P997_CONFIG2_REG_CHANNEL +
|
||||
DAC161P997_CONFIG2_REG_PARITY +
|
||||
DAC161P997_CONFIG2_REG_FRAME,
|
||||
CONFIG_WRITE);
|
||||
dac161p997_swif_write_reg(DAC161P997_LCK_REG_LOCK, CONFIG_WRITE);
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
#define __DAC161P997_H__
|
||||
#include "main.h"
|
||||
#include "gpios.h"
|
||||
#define TIME_1US TIM1
|
||||
|
||||
#define DAC161P997_IO_PORT (DAC161P997_GPIO_Port)
|
||||
#define DAC161P997_IO_PIN (DAC161P997_Pin)
|
||||
|
||||
|
@ -60,15 +60,15 @@
|
|||
#define DACCODE_20mA (0xD555)
|
||||
#define DACCODE_24mA (0xFFFF)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DAC161P997_IDLE_SYM,
|
||||
// cycles
|
||||
// #define QUARTER_CYCLES (625)
|
||||
// #define HALF_CYCLES (1250)
|
||||
// #define THREE_CYCLES (1875)
|
||||
// #define FULL_CYCLES (2500)
|
||||
|
||||
} dac161p997_e;
|
||||
typedef struct
|
||||
{
|
||||
gpio_t *io;
|
||||
uint8_t count;
|
||||
} dac161p997_t;
|
||||
|
||||
void dac161p997_output_0(void);
|
||||
|
@ -76,7 +76,6 @@ void dac161p997_output_1(void);
|
|||
void dac161p997_output_d(void);
|
||||
void dac161p997_output_symbol(uint8_t sym);
|
||||
void dac161p997_swif_write_reg(uint16_t data, uint8_t tag);
|
||||
|
||||
extern void dac161p997_output_current(float32 current);
|
||||
extern void dac161p997_init(void);
|
||||
#endif
|
|
@ -0,0 +1,96 @@
|
|||
#include "tmc2240.h"
|
||||
|
||||
tmc2240_t _tmc2240[TMC2240_MAX];
|
||||
|
||||
static void tmc2240_write(tmc2240_index_e index, uint8_t *data)
|
||||
{
|
||||
DBG_ASSERT(index < TMC2240_MAX __DBG_LINE);
|
||||
tmc2240_t *tmc = &_tmc2240[index];
|
||||
|
||||
tmc->spi->gpios.cs->reset(*tmc->spi->gpios.cs);
|
||||
for (uint16_t i = 0; i < 5; i++)
|
||||
{
|
||||
tmc->spi->interface.u.normal.spi_send(tmc->spi, data[i]);
|
||||
}
|
||||
|
||||
tmc->spi->gpios.cs->set(*tmc->spi->gpios.cs);
|
||||
}
|
||||
|
||||
static void tmc2240_read(tmc2240_index_e index, uint8_t *wdata, uint8_t *rdata)
|
||||
{
|
||||
DBG_ASSERT(index < TMC2240_MAX __DBG_LINE);
|
||||
tmc2240_t *tmc = &_tmc2240[index];
|
||||
|
||||
tmc->spi->gpios.cs->reset(*tmc->spi->gpios.cs);
|
||||
for (uint16_t i = 0; i < 5; i++) // 循环读取数据
|
||||
{
|
||||
rdata[i] = tmc->spi->interface.u.normal.spi_send(tmc->spi, wdata[i]);
|
||||
}
|
||||
tmc->spi->gpios.cs->set(*tmc->spi->gpios.cs);
|
||||
|
||||
__NOP();
|
||||
__NOP();
|
||||
__NOP();
|
||||
|
||||
tmc->spi->gpios.cs->reset(*tmc->spi->gpios.cs);
|
||||
for (uint16_t i = 0; i < 5; i++) // 循环读取数据
|
||||
{
|
||||
rdata[i] = tmc->spi->interface.u.normal.spi_send(tmc->spi, wdata[i]);
|
||||
}
|
||||
tmc->spi->gpios.cs->set(*tmc->spi->gpios.cs);
|
||||
}
|
||||
|
||||
void tmc2240_config(tmc2240_index_e index)
|
||||
{
|
||||
uint8_t wdata[5];
|
||||
wdata[0] = 0x80 | TMC2240_REG_GCONF; // 写入 GCONF 寄存器
|
||||
wdata[1] = 0x00;
|
||||
wdata[2] = 0x00;
|
||||
wdata[3] = 0x00;
|
||||
wdata[4] = 0x01;
|
||||
tmc2240_write(index, wdata);
|
||||
|
||||
// 读取 GCONF 寄存器
|
||||
uint8_t rdata[5] = {0};
|
||||
wdata[0] = TMC2240_REG_GCONF;
|
||||
tmc2240_read(index, wdata, rdata);
|
||||
_tmc2240[index].data.gconf = rdata[4];
|
||||
}
|
||||
|
||||
void tmc2240_init(tmc2240_index_e index, spi_gpio_group_t *gpios)
|
||||
{
|
||||
DBG_ASSERT(index < TMC2240_MAX __DBG_LINE);
|
||||
tmc2240_t *tmc = &_tmc2240[index];
|
||||
|
||||
tmc->spi = spi_create(SPI_TYPE_NORMAL, *gpios, 0);
|
||||
DBG_ASSERT(tmc->spi != NULL __DBG_LINE);
|
||||
}
|
||||
|
||||
tmc2240_t *tmc2240_get(tmc2240_index_e index)
|
||||
{
|
||||
DBG_ASSERT(index < TMC2240_MAX __DBG_LINE);
|
||||
return &_tmc2240[index];
|
||||
}
|
||||
|
||||
int32_t tmc2240_position_read(tmc2240_index_e index)
|
||||
{
|
||||
DBG_ASSERT(index < TMC2240_MAX __DBG_LINE);
|
||||
tmc2240_t *tmc = &_tmc2240[index];
|
||||
uint8_t wdata[5] = {0};
|
||||
uint8_t rdata[5] = {0};
|
||||
|
||||
wdata[0] = 0x21; // XACTUAL register address
|
||||
tmc2240_read(index, wdata, rdata);
|
||||
|
||||
int32_t response = 0;
|
||||
|
||||
response |= (rdata[1]);
|
||||
response <<= 8;
|
||||
response |= (rdata[2]);
|
||||
response <<= 8;
|
||||
response |= (rdata[3]);
|
||||
response <<= 8;
|
||||
response |= (rdata[4]);
|
||||
tmc->data.position = response;
|
||||
return response;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef __TMC2240_H
|
||||
#define __TMC2240_H
|
||||
#include "main.h"
|
||||
#include "spis.h"
|
||||
#define TMC2240_REG_GCONF 0x00
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMC2240_1,
|
||||
TMC2240_MAX,
|
||||
} tmc2240_index_e;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
spi_t *spi;
|
||||
struct
|
||||
{
|
||||
int32_t gconf;
|
||||
int32_t position;
|
||||
} data;
|
||||
} tmc2240_t;
|
||||
|
||||
void tmc2240_init(tmc2240_index_e index, spi_gpio_group_t *gpios);
|
||||
void tmc2240_config(tmc2240_index_e index);
|
||||
tmc2240_t *tmc2240_get(tmc2240_index_e index);
|
||||
|
||||
int32_t tmc2240_position_read(tmc2240_index_e index);
|
||||
#endif // __TMC2240_H
|
|
@ -8,8 +8,8 @@
|
|||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": true,
|
||||
"cwd": "e:/work/stm32/study/motor_cs103/User/system/lib/driver",
|
||||
"program": "e:/work/stm32/study/motor_cs103/User/system/lib/driver/build/Debug/outDebug",
|
||||
"cwd": "e:/work/stm32/epm/User/lib/flow",
|
||||
"program": "e:/work/stm32/epm/User/lib/flow/build/Debug/outDebug",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"setupCommands": [
|
|
@ -4,7 +4,7 @@
|
|||
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||
"C_Cpp_Runner.cStandard": "",
|
||||
"C_Cpp_Runner.cppStandard": "",
|
||||
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||
"C_Cpp_Runner.useMsvc": false,
|
||||
"C_Cpp_Runner.warnings": [
|
||||
"-Wall",
|
||||
|
@ -54,6 +54,5 @@
|
|||
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||
"C_Cpp_Runner.showCompilationTime": false,
|
||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||
"C_Cpp_Runner.useLinkTimeOptimization": false
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue