diff --git a/Code/ESP8266_UDP_Telemetry/src/main.cpp b/Code/ESP8266_UDP_Telemetry/src/main.cpp index ae7dbf3..d69c873 100644 --- a/Code/ESP8266_UDP_Telemetry/src/main.cpp +++ b/Code/ESP8266_UDP_Telemetry/src/main.cpp @@ -18,7 +18,7 @@ void setup() { pinMode(1, OUTPUT); pinMode(LED_BUILTIN_AUX, OUTPUT); pinMode(LED_BUILTIN, OUTPUT); - Serial.begin(921600); + Serial.begin(2000000); Serial.setTimeout(1); WiFi.hostname("PFC_GabrielLima"); WiFi.begin(WIFI_SSID, WIFI_PSK); diff --git a/Code/F407VG-PFC/Core/Src/main.c b/Code/F407VG-PFC/Core/Src/main.c index 69f665c..621625b 100644 --- a/Code/F407VG-PFC/Core/Src/main.c +++ b/Code/F407VG-PFC/Core/Src/main.c @@ -45,6 +45,7 @@ ADC_HandleTypeDef hadc1; I2C_HandleTypeDef hi2c1; SPI_HandleTypeDef hspi1; +SPI_HandleTypeDef hspi2; TIM_HandleTypeDef htim1; TIM_HandleTypeDef htim2; @@ -79,6 +80,7 @@ static void MX_UART4_Init(void); static void MX_UART5_Init(void); static void MX_ADC1_Init(void); static void MX_TIM10_Init(void); +static void MX_SPI2_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ @@ -129,6 +131,7 @@ int main(void) MX_UART5_Init(); MX_ADC1_Init(); MX_TIM10_Init(); + MX_SPI2_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ @@ -313,6 +316,44 @@ static void MX_SPI1_Init(void) } +/** + * @brief SPI2 Initialization Function + * @param None + * @retval None + */ +static void MX_SPI2_Init(void) +{ + + /* USER CODE BEGIN SPI2_Init 0 */ + + /* USER CODE END SPI2_Init 0 */ + + /* USER CODE BEGIN SPI2_Init 1 */ + + /* USER CODE END SPI2_Init 1 */ + /* SPI2 parameter configuration*/ + hspi2.Instance = SPI2; + hspi2.Init.Mode = SPI_MODE_MASTER; + hspi2.Init.Direction = SPI_DIRECTION_2LINES; + hspi2.Init.DataSize = SPI_DATASIZE_8BIT; + hspi2.Init.CLKPolarity = SPI_POLARITY_LOW; + hspi2.Init.CLKPhase = SPI_PHASE_1EDGE; + hspi2.Init.NSS = SPI_NSS_SOFT; + hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8; + hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB; + hspi2.Init.TIMode = SPI_TIMODE_DISABLE; + hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + hspi2.Init.CRCPolynomial = 10; + if (HAL_SPI_Init(&hspi2) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN SPI2_Init 2 */ + + /* USER CODE END SPI2_Init 2 */ + +} + /** * @brief TIM1 Initialization Function * @param None diff --git a/Code/F407VG-PFC/Core/Src/stm32f4xx_hal_msp.c b/Code/F407VG-PFC/Core/Src/stm32f4xx_hal_msp.c index 26784e5..115c759 100644 --- a/Code/F407VG-PFC/Core/Src/stm32f4xx_hal_msp.c +++ b/Code/F407VG-PFC/Core/Src/stm32f4xx_hal_msp.c @@ -276,6 +276,31 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) /* USER CODE END SPI1_MspInit 1 */ } + else if(hspi->Instance==SPI2) + { + /* USER CODE BEGIN SPI2_MspInit 0 */ + + /* USER CODE END SPI2_MspInit 0 */ + /* Peripheral clock enable */ + __HAL_RCC_SPI2_CLK_ENABLE(); + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**SPI2 GPIO Configuration + PB13 ------> SPI2_SCK + PB14 ------> SPI2_MISO + PB15 ------> SPI2_MOSI + */ + GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN SPI2_MspInit 1 */ + + /* USER CODE END SPI2_MspInit 1 */ + } } @@ -306,6 +331,25 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi) /* USER CODE END SPI1_MspDeInit 1 */ } + else if(hspi->Instance==SPI2) + { + /* USER CODE BEGIN SPI2_MspDeInit 0 */ + + /* USER CODE END SPI2_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_SPI2_CLK_DISABLE(); + + /**SPI2 GPIO Configuration + PB13 ------> SPI2_SCK + PB14 ------> SPI2_MISO + PB15 ------> SPI2_MOSI + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15); + + /* USER CODE BEGIN SPI2_MspDeInit 1 */ + + /* USER CODE END SPI2_MspDeInit 1 */ + } } diff --git a/Code/F407VG-PFC/F407VG-PFC.ioc b/Code/F407VG-PFC/F407VG-PFC.ioc index 2cc1cc9..5761848 100644 --- a/Code/F407VG-PFC/F407VG-PFC.ioc +++ b/Code/F407VG-PFC/F407VG-PFC.ioc @@ -14,21 +14,22 @@ Mcu.CPN=STM32F407VGT6 Mcu.Family=STM32F4 Mcu.IP0=ADC1 Mcu.IP1=I2C1 -Mcu.IP10=TIM5 -Mcu.IP11=TIM8 -Mcu.IP12=TIM10 -Mcu.IP13=UART4 -Mcu.IP14=UART5 -Mcu.IP15=USB_OTG_FS +Mcu.IP10=TIM4 +Mcu.IP11=TIM5 +Mcu.IP12=TIM8 +Mcu.IP13=TIM10 +Mcu.IP14=UART4 +Mcu.IP15=UART5 +Mcu.IP16=USB_OTG_FS Mcu.IP2=NVIC Mcu.IP3=RCC Mcu.IP4=SPI1 -Mcu.IP5=SYS -Mcu.IP6=TIM1 -Mcu.IP7=TIM2 -Mcu.IP8=TIM3 -Mcu.IP9=TIM4 -Mcu.IPNb=16 +Mcu.IP5=SPI2 +Mcu.IP6=SYS +Mcu.IP7=TIM1 +Mcu.IP8=TIM2 +Mcu.IP9=TIM3 +Mcu.IPNb=17 Mcu.Name=STM32F407V(E-G)Tx Mcu.Package=LQFP100 Mcu.Pin0=PH0-OSC_IN @@ -45,38 +46,41 @@ Mcu.Pin18=PE11 Mcu.Pin19=PE13 Mcu.Pin2=PC0 Mcu.Pin20=PE14 -Mcu.Pin21=PD12 -Mcu.Pin22=PD13 -Mcu.Pin23=PC6 -Mcu.Pin24=PC7 -Mcu.Pin25=PC8 -Mcu.Pin26=PC9 -Mcu.Pin27=PA9 -Mcu.Pin28=PA11 -Mcu.Pin29=PA12 +Mcu.Pin21=PB13 +Mcu.Pin22=PB14 +Mcu.Pin23=PB15 +Mcu.Pin24=PD12 +Mcu.Pin25=PD13 +Mcu.Pin26=PC6 +Mcu.Pin27=PC7 +Mcu.Pin28=PC8 +Mcu.Pin29=PC9 Mcu.Pin3=PC1 -Mcu.Pin30=PA13 -Mcu.Pin31=PA14 -Mcu.Pin32=PA15 -Mcu.Pin33=PC10 -Mcu.Pin34=PC11 -Mcu.Pin35=PC12 -Mcu.Pin36=PD2 -Mcu.Pin37=PB3 -Mcu.Pin38=PB4 -Mcu.Pin39=PB5 +Mcu.Pin30=PA9 +Mcu.Pin31=PA11 +Mcu.Pin32=PA12 +Mcu.Pin33=PA13 +Mcu.Pin34=PA14 +Mcu.Pin35=PA15 +Mcu.Pin36=PC10 +Mcu.Pin37=PC11 +Mcu.Pin38=PC12 +Mcu.Pin39=PD2 Mcu.Pin4=PC2 -Mcu.Pin40=PB6 -Mcu.Pin41=PB7 -Mcu.Pin42=PB8 -Mcu.Pin43=VP_SYS_VS_Systick -Mcu.Pin44=VP_TIM10_VS_ClockSourceINT +Mcu.Pin40=PB3 +Mcu.Pin41=PB4 +Mcu.Pin42=PB5 +Mcu.Pin43=PB6 +Mcu.Pin44=PB7 +Mcu.Pin45=PB8 +Mcu.Pin46=VP_SYS_VS_Systick +Mcu.Pin47=VP_TIM10_VS_ClockSourceINT Mcu.Pin5=PC3 Mcu.Pin6=PA0-WKUP Mcu.Pin7=PA1 Mcu.Pin8=PA2 Mcu.Pin9=PA5 -Mcu.PinsNb=45 +Mcu.PinsNb=48 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F407VGTx @@ -129,6 +133,15 @@ PB0.Signal=ADCx_IN8 PB1.GPIOParameters=GPIO_Label PB1.GPIO_Label=M0_CUR_B PB1.Signal=ADCx_IN9 +PB13.Locked=true +PB13.Mode=Full_Duplex_Master +PB13.Signal=SPI2_SCK +PB14.Locked=true +PB14.Mode=Full_Duplex_Master +PB14.Signal=SPI2_MISO +PB15.Locked=true +PB15.Mode=Full_Duplex_Master +PB15.Signal=SPI2_MOSI PB2.GPIOParameters=GPIO_Label PB2.GPIO_Label=BOOT1 PB2.Locked=true @@ -223,6 +236,8 @@ ProjectManager.RegisterCallBack= ProjectManager.StackSize=0x400 ProjectManager.TargetToolchain=STM32CubeIDE ProjectManager.ToolChainLocation= +ProjectManager.UAScriptAfterPath= +ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=true ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_TIM1_Init-TIM1-false-HAL-true,4-MX_TIM2_Init-TIM2-false-HAL-true,5-MX_TIM3_Init-TIM3-false-HAL-true,6-MX_TIM4_Init-TIM4-false-HAL-true,7-MX_TIM5_Init-TIM5-false-HAL-true,8-MX_TIM8_Init-TIM8-false-HAL-true,9-MX_USB_OTG_FS_PCD_Init-USB_OTG_FS-false-HAL-true,10-MX_I2C1_Init-I2C1-false-HAL-true,11-MX_SPI1_Init-SPI1-false-HAL-true,12-MX_UART4_Init-UART4-false-HAL-true,13-MX_UART5_Init-UART5-false-HAL-true,14-MX_ADC1_Init-ADC1-false-HAL-true,15-MX_TIM10_Init-TIM10-false-HAL-true RCC.48MHZClocksFreq_Value=48000000 @@ -315,6 +330,12 @@ SPI1.Direction=SPI_DIRECTION_2LINES SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate SPI1.Mode=SPI_MODE_MASTER SPI1.VirtualType=VM_MASTER +SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_8 +SPI2.CalculateBaudRate=5.25 MBits/s +SPI2.Direction=SPI_DIRECTION_2LINES +SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,BaudRatePrescaler +SPI2.Mode=SPI_MODE_MASTER +SPI2.VirtualType=VM_MASTER TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 TIM1.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 TIM1.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 diff --git a/Code/STM32/Core/Inc/stm32f1xx_it.h b/Code/STM32/Core/Inc/stm32f1xx_it.h index 6af0401..0c039f3 100644 --- a/Code/STM32/Core/Inc/stm32f1xx_it.h +++ b/Code/STM32/Core/Inc/stm32f1xx_it.h @@ -58,6 +58,7 @@ void SysTick_Handler(void); void DMA1_Channel4_IRQHandler(void); void DMA1_Channel5_IRQHandler(void); void DMA1_Channel7_IRQHandler(void); +void EXTI9_5_IRQHandler(void); void TIM4_IRQHandler(void); void USART1_IRQHandler(void); void USART2_IRQHandler(void); diff --git a/Code/STM32/Core/Src/Components/Encoder.cpp b/Code/STM32/Core/Src/Components/Encoder.cpp index 206f3cc..8d8b362 100644 --- a/Code/STM32/Core/Src/Components/Encoder.cpp +++ b/Code/STM32/Core/Src/Components/Encoder.cpp @@ -7,6 +7,8 @@ #include "Encoder.hpp" +#define pi 3.1415926535 + Encoder::Encoder(__IO uint32_t* cnt, __IO uint32_t* arr, uint32_t countsPerRevolution) : cnt(cnt), arr(arr), countsPerRevolution(countsPerRevolution) { @@ -17,6 +19,13 @@ Encoder::~Encoder() { } +void Encoder::callback(GPIO_PinState _direction){ + lastTick = currentTick; + currentTick = DWT->CYCCNT; + direction = _direction; + updated = true; +} + uint32_t Encoder::getCount(){ lastCount = *cnt; return lastCount; @@ -28,6 +37,20 @@ int16_t Encoder::getDelta(){ return delta; } +float Encoder::getOmega(){ + if(!updated){ + return 0; + } + updated = false; + float deltaT = (currentTick - lastTick)/(float)HAL_RCC_GetHCLKFreq(); + if(direction){ + return -8*pi/(countsPerRevolution*deltaT); // rad/s + }else{ + return 8*pi/(countsPerRevolution*deltaT); // rad/s + } + +} + uint32_t Encoder::getCountsPerRevolution(){ return countsPerRevolution; } diff --git a/Code/STM32/Core/Src/Components/Encoder.hpp b/Code/STM32/Core/Src/Components/Encoder.hpp index b6c933b..b5c5ba0 100644 --- a/Code/STM32/Core/Src/Components/Encoder.hpp +++ b/Code/STM32/Core/Src/Components/Encoder.hpp @@ -14,14 +14,20 @@ class Encoder { public: Encoder(__IO uint32_t* cnt, __IO uint32_t* arr, uint32_t countsPerRevolution); virtual ~Encoder(); + void callback(GPIO_PinState _direction); uint32_t getCount(); int16_t getDelta(); + float getOmega(); uint32_t getCountsPerRevolution(); private: __IO uint32_t* cnt; __IO uint32_t* arr; uint32_t lastCount = 0; uint32_t countsPerRevolution = 0; + uint32_t lastTick = 0; + uint32_t currentTick = 0; + bool direction; + bool updated; }; #endif /* SRC_COMPONENTS_ENCODER_HPP_ */ diff --git a/Code/STM32/Core/Src/Components/Motor.cpp b/Code/STM32/Core/Src/Components/Motor.cpp index c044a13..44b3c52 100644 --- a/Code/STM32/Core/Src/Components/Motor.cpp +++ b/Code/STM32/Core/Src/Components/Motor.cpp @@ -21,18 +21,18 @@ void Motor::setEncoder(Encoder* _encoder){ encoder = _encoder; } -float Motor::getCurrentRevPerTick(){ +float Motor::getCurrentRadPerSecond(){ #ifdef CONTROL_DISABLED - return (float)encoder->getDelta()/encoder->getCountsPerRevolution(); + return encoder->getOmega(); #else - return currentRevPerTick; + return currentRadPerSecond; #endif } -void Motor::pid(float inputRevPerTick){ - currentRevPerTick = (float)encoder->getDelta()/encoder->getCountsPerRevolution(); +void Motor::pid(float inputRadPerSecond){ + currentRadPerSecond = encoder->getOmega(); lastError = error; - error = inputRevPerTick - currentRevPerTick; + error = inputRadPerSecond - currentRadPerSecond; derror = error - lastError; ierror += error; if(ki*ierror > 1){ // Anti-windup (verificar possibilidades) diff --git a/Code/STM32/Core/Src/Components/Motor.hpp b/Code/STM32/Core/Src/Components/Motor.hpp index cc0c50f..fc84fc8 100644 --- a/Code/STM32/Core/Src/Components/Motor.hpp +++ b/Code/STM32/Core/Src/Components/Motor.hpp @@ -17,7 +17,7 @@ public: virtual ~Motor(); virtual void setPower(float power){} void setEncoder(Encoder* _encoder); - float getCurrentRevPerTick(); + float getCurrentRadPerSecond(); void pid(float inputRevPerTick); float kp; float ki; @@ -28,7 +28,7 @@ private: float ierror = 0; float derror = 0; float lastError = 0; - float currentRevPerTick = 0; + float currentRadPerSecond = 0; }; #endif /* SRC_COMPONENTS_MOTOR_HPP_ */ diff --git a/Code/STM32/Core/Src/Components/Robot.cpp b/Code/STM32/Core/Src/Components/Robot.cpp index b2113b9..5c16ef4 100644 --- a/Code/STM32/Core/Src/Components/Robot.cpp +++ b/Code/STM32/Core/Src/Components/Robot.cpp @@ -10,12 +10,10 @@ #include "SerialDebug.hpp" #include "Definitions.hpp" -#define CONVERSION (reductionRatio/(ticksPerSecond*2*3.14159*wheelRadius)) +#define CONVERSION (reductionRatio/wheelRadius) extern UART_HandleTypeDef huart1; -extern TIM_HandleTypeDef htim1; extern TIM_HandleTypeDef htim2; -extern TIM_HandleTypeDef htim3; extern TIM_HandleTypeDef htim4; extern I2C_HandleTypeDef hi2c1; extern SerialDebug debug; @@ -50,8 +48,8 @@ void Robot::controlCallback(){ motor1.pid(convertedSpeed1); #endif sprintf((char*)buf, ">Speed:%+0.6e,%+0.6e,%+0.6e,%+0.6e", - motor0.getCurrentRevPerTick()/CONVERSION, - motor1.getCurrentRevPerTick()/CONVERSION, + motor0.getCurrentRadPerSecond()/CONVERSION, + motor1.getCurrentRadPerSecond()/CONVERSION, desiredSpeed0, desiredSpeed1); HAL_UART_Transmit_DMA(&huart1, buf, 64); @@ -86,10 +84,6 @@ void Robot::init(){ motor1.ki = 22.3758/(ticksPerSecond*CONVERSION); motor1.kd = 0*ticksPerSecond/CONVERSION; debug.info("Init timers begin"); - //HAL_TIM_Encoder_Start(&htim1, TIM_CHANNEL_1); - HAL_TIM_Encoder_Start(&htim1, TIM_CHANNEL_ALL); - //HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_1); - HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_ALL); HAL_TIM_Base_Start(&htim2); HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2); diff --git a/Code/STM32/Core/Src/Components/Robot.hpp b/Code/STM32/Core/Src/Components/Robot.hpp index aec5363..a1076d2 100644 --- a/Code/STM32/Core/Src/Components/Robot.hpp +++ b/Code/STM32/Core/Src/Components/Robot.hpp @@ -20,6 +20,10 @@ public: void uartCallback(); void controlCallback(); void init(); + Encoder encoder0 = Encoder(&(TIM1->CNT), &(TIM1->ARR), 52); + Encoder encoder1 = Encoder(&(TIM3->CNT), &(TIM3->ARR), 52); + BTS7960B motor0 = BTS7960B(&(TIM2->CCR1), &(TIM2->CCR2), &(TIM2->ARR), &(TIM2->ARR), GPIOB, GPIO_PIN_4, GPIOB, GPIO_PIN_5); + BTS7960B motor1 = BTS7960B(&(TIM2->CCR3), &(TIM2->CCR4), &(TIM2->ARR), &(TIM2->ARR), GPIOB, GPIO_PIN_0, GPIOB, GPIO_PIN_1); private: void print_roll_pitch_yaw(); const float reductionRatio = 30; @@ -27,10 +31,6 @@ private: const float ticksPerSecond = 100; uint8_t rxBuffer[1500] = "0.000000,0.000000"; uint8_t txBuffer[1500]; - Encoder encoder0 = Encoder(&(TIM1->CNT), &(TIM1->ARR), 52); - Encoder encoder1 = Encoder(&(TIM3->CNT), &(TIM3->ARR), 52); - BTS7960B motor0 = BTS7960B(&(TIM2->CCR1), &(TIM2->CCR2), &(TIM2->ARR), &(TIM2->ARR), GPIOB, GPIO_PIN_4, GPIOB, GPIO_PIN_5); - BTS7960B motor1 = BTS7960B(&(TIM2->CCR3), &(TIM2->CCR4), &(TIM2->ARR), &(TIM2->ARR), GPIOB, GPIO_PIN_0, GPIOB, GPIO_PIN_1); MPU9250 imu0; }; diff --git a/Code/STM32/Core/Src/Components/Start.cpp b/Code/STM32/Core/Src/Components/Start.cpp index d523336..af58098 100644 --- a/Code/STM32/Core/Src/Components/Start.cpp +++ b/Code/STM32/Core/Src/Components/Start.cpp @@ -29,7 +29,16 @@ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) { } void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { - + switch(GPIO_Pin){ + case GPIO_PIN_8: + //encoder0 + robot.encoder0.callback(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_9)); + break; + case GPIO_PIN_6: + //encoder1 + robot.encoder1.callback(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_7)); + break; + } } void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size){ diff --git a/Code/STM32/Core/Src/main.c b/Code/STM32/Core/Src/main.c index aab9ffa..f8a8e87 100644 --- a/Code/STM32/Core/Src/main.c +++ b/Code/STM32/Core/Src/main.c @@ -43,9 +43,7 @@ ADC_HandleTypeDef hadc1; I2C_HandleTypeDef hi2c1; -TIM_HandleTypeDef htim1; TIM_HandleTypeDef htim2; -TIM_HandleTypeDef htim3; TIM_HandleTypeDef htim4; UART_HandleTypeDef huart1; @@ -68,8 +66,6 @@ static void MX_USART1_UART_Init(void); static void MX_TIM4_Init(void); static void MX_TIM2_Init(void); static void MX_USB_PCD_Init(void); -static void MX_TIM1_Init(void); -static void MX_TIM3_Init(void); static void MX_USART2_UART_Init(void); static void MX_ADC1_Init(void); static void MX_I2C1_Init(void); @@ -115,8 +111,6 @@ int main(void) MX_TIM4_Init(); MX_TIM2_Init(); MX_USB_PCD_Init(); - MX_TIM1_Init(); - MX_TIM3_Init(); MX_USART2_UART_Init(); MX_ADC1_Init(); MX_I2C1_Init(); @@ -287,56 +281,6 @@ static void MX_I2C1_Init(void) } -/** - * @brief TIM1 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM1_Init(void) -{ - - /* USER CODE BEGIN TIM1_Init 0 */ - - /* USER CODE END TIM1_Init 0 */ - - TIM_Encoder_InitTypeDef sConfig = {0}; - TIM_MasterConfigTypeDef sMasterConfig = {0}; - - /* USER CODE BEGIN TIM1_Init 1 */ - - /* USER CODE END TIM1_Init 1 */ - htim1.Instance = TIM1; - htim1.Init.Prescaler = 0; - htim1.Init.CounterMode = TIM_COUNTERMODE_UP; - htim1.Init.Period = 65535; - htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - htim1.Init.RepetitionCounter = 0; - htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - sConfig.EncoderMode = TIM_ENCODERMODE_TI12; - sConfig.IC1Polarity = TIM_ICPOLARITY_RISING; - sConfig.IC1Selection = TIM_ICSELECTION_DIRECTTI; - sConfig.IC1Prescaler = TIM_ICPSC_DIV1; - sConfig.IC1Filter = 0; - sConfig.IC2Polarity = TIM_ICPOLARITY_RISING; - sConfig.IC2Selection = TIM_ICSELECTION_DIRECTTI; - sConfig.IC2Prescaler = TIM_ICPSC_DIV1; - sConfig.IC2Filter = 0; - if (HAL_TIM_Encoder_Init(&htim1, &sConfig) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM1_Init 2 */ - - /* USER CODE END TIM1_Init 2 */ - -} - /** * @brief TIM2 Initialization Function * @param None @@ -408,55 +352,6 @@ static void MX_TIM2_Init(void) } -/** - * @brief TIM3 Initialization Function - * @param None - * @retval None - */ -static void MX_TIM3_Init(void) -{ - - /* USER CODE BEGIN TIM3_Init 0 */ - - /* USER CODE END TIM3_Init 0 */ - - TIM_Encoder_InitTypeDef sConfig = {0}; - TIM_MasterConfigTypeDef sMasterConfig = {0}; - - /* USER CODE BEGIN TIM3_Init 1 */ - - /* USER CODE END TIM3_Init 1 */ - htim3.Instance = TIM3; - htim3.Init.Prescaler = 0; - htim3.Init.CounterMode = TIM_COUNTERMODE_UP; - htim3.Init.Period = 65535; - htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; - htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; - sConfig.EncoderMode = TIM_ENCODERMODE_TI12; - sConfig.IC1Polarity = TIM_ICPOLARITY_RISING; - sConfig.IC1Selection = TIM_ICSELECTION_DIRECTTI; - sConfig.IC1Prescaler = TIM_ICPSC_DIV1; - sConfig.IC1Filter = 0; - sConfig.IC2Polarity = TIM_ICPOLARITY_RISING; - sConfig.IC2Selection = TIM_ICSELECTION_DIRECTTI; - sConfig.IC2Prescaler = TIM_ICPSC_DIV1; - sConfig.IC2Filter = 0; - if (HAL_TIM_Encoder_Init(&htim3, &sConfig) != HAL_OK) - { - Error_Handler(); - } - sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; - sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; - if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) - { - Error_Handler(); - } - /* USER CODE BEGIN TIM3_Init 2 */ - - /* USER CODE END TIM3_Init 2 */ - -} - /** * @brief TIM4 Initialization Function * @param None @@ -518,7 +413,7 @@ static void MX_USART1_UART_Init(void) /* USER CODE END USART1_Init 1 */ huart1.Instance = USART1; - huart1.Init.BaudRate = 921600; + huart1.Init.BaudRate = 2000000; huart1.Init.WordLength = UART_WORDLENGTH_8B; huart1.Init.StopBits = UART_STOPBITS_1; huart1.Init.Parity = UART_PARITY_NONE; @@ -651,6 +546,18 @@ static void MX_GPIO_Init(void) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(LED_BUILTIN_GPIO_Port, &GPIO_InitStruct); + /*Configure GPIO pins : PA6 PA8 IMU_INT_Pin */ + GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_8|IMU_INT_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /*Configure GPIO pins : PA7 PA9 */ + GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /*Configure GPIO pins : PB0 PB1 PB4 PB5 */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; @@ -664,11 +571,9 @@ static void MX_GPIO_Init(void) GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(BOOT1_GPIO_Port, &GPIO_InitStruct); - /*Configure GPIO pin : IMU_INT_Pin */ - GPIO_InitStruct.Pin = IMU_INT_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(IMU_INT_GPIO_Port, &GPIO_InitStruct); + /* EXTI interrupt init*/ + HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(EXTI9_5_IRQn); /* USER CODE BEGIN MX_GPIO_Init_2 */ /* USER CODE END MX_GPIO_Init_2 */ diff --git a/Code/STM32/Core/Src/stm32f1xx_hal_msp.c b/Code/STM32/Core/Src/stm32f1xx_hal_msp.c index f058b1b..a5e9e10 100644 --- a/Code/STM32/Core/Src/stm32f1xx_hal_msp.c +++ b/Code/STM32/Core/Src/stm32f1xx_hal_msp.c @@ -221,62 +221,6 @@ void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c) } -/** -* @brief TIM_Encoder MSP Initialization -* This function configures the hardware resources used in this example -* @param htim_encoder: TIM_Encoder handle pointer -* @retval None -*/ -void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef* htim_encoder) -{ - GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(htim_encoder->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspInit 0 */ - - /* USER CODE END TIM1_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM1_CLK_ENABLE(); - - __HAL_RCC_GPIOA_CLK_ENABLE(); - /**TIM1 GPIO Configuration - PA8 ------> TIM1_CH1 - PA9 ------> TIM1_CH2 - */ - GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN TIM1_MspInit 1 */ - - /* USER CODE END TIM1_MspInit 1 */ - } - else if(htim_encoder->Instance==TIM3) - { - /* USER CODE BEGIN TIM3_MspInit 0 */ - - /* USER CODE END TIM3_MspInit 0 */ - /* Peripheral clock enable */ - __HAL_RCC_TIM3_CLK_ENABLE(); - - __HAL_RCC_GPIOA_CLK_ENABLE(); - /**TIM3 GPIO Configuration - PA6 ------> TIM3_CH1 - PA7 ------> TIM3_CH2 - */ - GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; - GPIO_InitStruct.Pull = GPIO_PULLUP; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN TIM3_MspInit 1 */ - - /* USER CODE END TIM3_MspInit 1 */ - } - -} - /** * @brief TIM_Base MSP Initialization * This function configures the hardware resources used in this example @@ -348,53 +292,6 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim) } } -/** -* @brief TIM_Encoder MSP De-Initialization -* This function freeze the hardware resources used in this example -* @param htim_encoder: TIM_Encoder handle pointer -* @retval None -*/ -void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef* htim_encoder) -{ - if(htim_encoder->Instance==TIM1) - { - /* USER CODE BEGIN TIM1_MspDeInit 0 */ - - /* USER CODE END TIM1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM1_CLK_DISABLE(); - - /**TIM1 GPIO Configuration - PA8 ------> TIM1_CH1 - PA9 ------> TIM1_CH2 - */ - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_8|GPIO_PIN_9); - - /* USER CODE BEGIN TIM1_MspDeInit 1 */ - - /* USER CODE END TIM1_MspDeInit 1 */ - } - else if(htim_encoder->Instance==TIM3) - { - /* USER CODE BEGIN TIM3_MspDeInit 0 */ - - /* USER CODE END TIM3_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_TIM3_CLK_DISABLE(); - - /**TIM3 GPIO Configuration - PA6 ------> TIM3_CH1 - PA7 ------> TIM3_CH2 - */ - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_6|GPIO_PIN_7); - - /* USER CODE BEGIN TIM3_MspDeInit 1 */ - - /* USER CODE END TIM3_MspDeInit 1 */ - } - -} - /** * @brief TIM_Base MSP De-Initialization * This function freeze the hardware resources used in this example diff --git a/Code/STM32/Core/Src/stm32f1xx_it.c b/Code/STM32/Core/Src/stm32f1xx_it.c index 7f71fa5..3344546 100644 --- a/Code/STM32/Core/Src/stm32f1xx_it.c +++ b/Code/STM32/Core/Src/stm32f1xx_it.c @@ -245,6 +245,21 @@ void DMA1_Channel7_IRQHandler(void) /* USER CODE END DMA1_Channel7_IRQn 1 */ } +/** + * @brief This function handles EXTI line[9:5] interrupts. + */ +void EXTI9_5_IRQHandler(void) +{ + /* USER CODE BEGIN EXTI9_5_IRQn 0 */ + + /* USER CODE END EXTI9_5_IRQn 0 */ + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_6); + HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8); + /* USER CODE BEGIN EXTI9_5_IRQn 1 */ + + /* USER CODE END EXTI9_5_IRQn 1 */ +} + /** * @brief This function handles TIM4 global interrupt. */ diff --git a/Code/STM32/F103C8-PFC.ioc b/Code/STM32/F103C8-PFC.ioc index 16f3e0a..d6215a7 100644 --- a/Code/STM32/F103C8-PFC.ioc +++ b/Code/STM32/F103C8-PFC.ioc @@ -60,18 +60,16 @@ Mcu.CPN=STM32F103C8T6 Mcu.Family=STM32F1 Mcu.IP0=ADC1 Mcu.IP1=DMA -Mcu.IP10=USART1 -Mcu.IP11=USART2 -Mcu.IP12=USB +Mcu.IP10=USB Mcu.IP2=I2C1 Mcu.IP3=NVIC Mcu.IP4=RCC Mcu.IP5=SYS -Mcu.IP6=TIM1 -Mcu.IP7=TIM2 -Mcu.IP8=TIM3 -Mcu.IP9=TIM4 -Mcu.IPNb=13 +Mcu.IP6=TIM2 +Mcu.IP7=TIM4 +Mcu.IP8=USART1 +Mcu.IP9=USART2 +Mcu.IPNb=11 Mcu.Name=STM32F103C(8-B)Tx Mcu.Package=LQFP48 Mcu.Pin0=PC13-TAMPER-RTC @@ -121,6 +119,7 @@ NVIC.DMA1_Channel4_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DMA1_Channel5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DMA1_Channel7_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.EXTI9_5_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false @@ -155,18 +154,18 @@ PA3.Mode=Asynchronous PA3.Signal=USART2_RX PA4.Signal=ADCx_IN4 PA5.Signal=ADCx_IN5 -PA6.GPIOParameters=GPIO_PuPd -PA6.GPIO_PuPd=GPIO_PULLUP -PA6.Signal=S_TIM3_CH1 -PA7.GPIOParameters=GPIO_PuPd -PA7.GPIO_PuPd=GPIO_PULLUP -PA7.Signal=S_TIM3_CH2 -PA8.GPIOParameters=GPIO_PuPd -PA8.GPIO_PuPd=GPIO_PULLUP -PA8.Signal=S_TIM1_CH1 -PA9.GPIOParameters=GPIO_PuPd -PA9.GPIO_PuPd=GPIO_PULLUP -PA9.Signal=S_TIM1_CH2 +PA6.GPIOParameters=GPIO_ModeDefaultEXTI +PA6.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING +PA6.Locked=true +PA6.Signal=GPXTI6 +PA7.Locked=true +PA7.Signal=GPIO_Input +PA8.GPIOParameters=GPIO_ModeDefaultEXTI +PA8.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING +PA8.Locked=true +PA8.Signal=GPXTI8 +PA9.Locked=true +PA9.Signal=GPIO_Input PB0.Locked=true PB0.Signal=GPIO_Output PB1.Locked=true @@ -237,7 +236,7 @@ ProjectManager.ToolChainLocation= ProjectManager.UAScriptAfterPath= ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_TIM4_Init-TIM4-false-HAL-true,6-MX_TIM2_Init-TIM2-false-HAL-true,7-MX_USB_PCD_Init-USB-false-HAL-true,8-MX_TIM1_Init-TIM1-false-HAL-true,9-MX_TIM3_Init-TIM3-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_ADC1_Init-ADC1-false-HAL-true,12-MX_I2C1_Init-I2C1-false-HAL-true +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_TIM4_Init-TIM4-false-HAL-true,6-MX_TIM2_Init-TIM2-false-HAL-true,7-MX_USB_PCD_Init-USB-false-HAL-true,8-MX_USART2_UART_Init-USART2-false-HAL-true,9-MX_ADC1_Init-ADC1-false-HAL-true,10-MX_I2C1_Init-I2C1-false-HAL-true RCC.ADCFreqValue=12000000 RCC.ADCPresc=RCC_ADCPCLK2_DIV6 RCC.AHBFreq_Value=72000000 @@ -271,10 +270,10 @@ SH.ADCx_IN5.0=ADC1_IN5,IN5 SH.ADCx_IN5.ConfNb=1 SH.GPXTI10.0=GPIO_EXTI10 SH.GPXTI10.ConfNb=1 -SH.S_TIM1_CH1.0=TIM1_CH1,Encoder_Interface -SH.S_TIM1_CH1.ConfNb=1 -SH.S_TIM1_CH2.0=TIM1_CH2,Encoder_Interface -SH.S_TIM1_CH2.ConfNb=1 +SH.GPXTI6.0=GPIO_EXTI6 +SH.GPXTI6.ConfNb=1 +SH.GPXTI8.0=GPIO_EXTI8 +SH.GPXTI8.ConfNb=1 SH.S_TIM2_CH1_ETR.0=TIM2_CH1,PWM Generation1 CH1 SH.S_TIM2_CH1_ETR.ConfNb=1 SH.S_TIM2_CH2.0=TIM2_CH2,PWM Generation2 CH2 @@ -283,12 +282,6 @@ SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3 SH.S_TIM2_CH3.ConfNb=1 SH.S_TIM2_CH4.0=TIM2_CH4,PWM Generation4 CH4 SH.S_TIM2_CH4.ConfNb=1 -SH.S_TIM3_CH1.0=TIM3_CH1,Encoder_Interface -SH.S_TIM3_CH1.ConfNb=1 -SH.S_TIM3_CH2.0=TIM3_CH2,Encoder_Interface -SH.S_TIM3_CH2.ConfNb=1 -TIM1.EncoderMode=TIM_ENCODERMODE_TI12 -TIM1.IPParameters=EncoderMode TIM2.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE TIM2.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 TIM2.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 @@ -297,12 +290,10 @@ TIM2.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 TIM2.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4,Period,Prescaler,AutoReloadPreload TIM2.Period=2047 TIM2.Prescaler=0 -TIM3.EncoderMode=TIM_ENCODERMODE_TI12 -TIM3.IPParameters=EncoderMode TIM4.IPParameters=Prescaler,Period TIM4.Period=9999 TIM4.Prescaler=71 -USART1.BaudRate=921600 +USART1.BaudRate=2000000 USART1.IPParameters=VirtualMode,BaudRate USART1.VirtualMode=VM_ASYNC USART2.BaudRate=921600 diff --git a/Code/Untitled 1.vi b/Code/Untitled 1.vi index 7413ec9..b93a97f 100644 Binary files a/Code/Untitled 1.vi and b/Code/Untitled 1.vi differ diff --git a/Hardware/PFC_Motherboard/BallSensor.SchDoc b/Hardware/PFC_Motherboard/BallSensor.SchDoc index a05967e..290d72a 100644 Binary files a/Hardware/PFC_Motherboard/BallSensor.SchDoc and b/Hardware/PFC_Motherboard/BallSensor.SchDoc differ diff --git a/Hardware/PFC_Motherboard/Dribbler.SchDoc b/Hardware/PFC_Motherboard/Dribbler.SchDoc index f84df30..8df9ad4 100644 Binary files a/Hardware/PFC_Motherboard/Dribbler.SchDoc and b/Hardware/PFC_Motherboard/Dribbler.SchDoc differ diff --git a/Hardware/PFC_Motherboard/ESP8266.SchDoc b/Hardware/PFC_Motherboard/ESP8266.SchDoc index efb6059..54861cb 100644 Binary files a/Hardware/PFC_Motherboard/ESP8266.SchDoc and b/Hardware/PFC_Motherboard/ESP8266.SchDoc differ diff --git a/Hardware/PFC_Motherboard/IMU.SchDoc b/Hardware/PFC_Motherboard/IMU.SchDoc index 831d902..945655b 100644 Binary files a/Hardware/PFC_Motherboard/IMU.SchDoc and b/Hardware/PFC_Motherboard/IMU.SchDoc differ diff --git a/Hardware/PFC_Motherboard/Main.PcbDoc b/Hardware/PFC_Motherboard/Main.PcbDoc index 660b2e0..8a50432 100644 Binary files a/Hardware/PFC_Motherboard/Main.PcbDoc and b/Hardware/PFC_Motherboard/Main.PcbDoc differ diff --git a/Hardware/PFC_Motherboard/Main.SchDoc b/Hardware/PFC_Motherboard/Main.SchDoc index 541f426..57b7776 100644 Binary files a/Hardware/PFC_Motherboard/Main.SchDoc and b/Hardware/PFC_Motherboard/Main.SchDoc differ diff --git a/Hardware/PFC_Motherboard/MotorDriver.SchDoc b/Hardware/PFC_Motherboard/MotorDriver.SchDoc index 01ac8e3..8f81693 100644 Binary files a/Hardware/PFC_Motherboard/MotorDriver.SchDoc and b/Hardware/PFC_Motherboard/MotorDriver.SchDoc differ diff --git a/Hardware/PFC_Motherboard/PFC_Motherboard.PrjPcb b/Hardware/PFC_Motherboard/PFC_Motherboard.PrjPcb index 95858da..dc73939 100644 --- a/Hardware/PFC_Motherboard/PFC_Motherboard.PrjPcb +++ b/Hardware/PFC_Motherboard/PFC_Motherboard.PrjPcb @@ -143,8 +143,8 @@ AnnotateScope=All AnnotateOrder=2 DoLibraryUpdate=1 DoDatabaseUpdate=1 -ClassGenCCAutoEnabled=0 -ClassGenCCAutoRoomEnabled=0 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=1 ClassGenNCAutoScope=None DItemRevisionGUID= GenerateClassCluster=0 @@ -195,7 +195,7 @@ AnnotateOrder=5 DoLibraryUpdate=1 DoDatabaseUpdate=1 ClassGenCCAutoEnabled=1 -ClassGenCCAutoRoomEnabled=1 +ClassGenCCAutoRoomEnabled=0 ClassGenNCAutoScope=None DItemRevisionGUID= GenerateClassCluster=0 @@ -212,7 +212,7 @@ AnnotateOrder=6 DoLibraryUpdate=1 DoDatabaseUpdate=1 ClassGenCCAutoEnabled=1 -ClassGenCCAutoRoomEnabled=1 +ClassGenCCAutoRoomEnabled=0 ClassGenNCAutoScope=None DItemRevisionGUID= GenerateClassCluster=0 @@ -229,7 +229,7 @@ AnnotateOrder=7 DoLibraryUpdate=1 DoDatabaseUpdate=1 ClassGenCCAutoEnabled=1 -ClassGenCCAutoRoomEnabled=1 +ClassGenCCAutoRoomEnabled=0 ClassGenNCAutoScope=None DItemRevisionGUID= GenerateClassCluster=0 @@ -246,12 +246,46 @@ AnnotateOrder=8 DoLibraryUpdate=1 DoDatabaseUpdate=1 ClassGenCCAutoEnabled=1 -ClassGenCCAutoRoomEnabled=1 +ClassGenCCAutoRoomEnabled=0 ClassGenNCAutoScope=None DItemRevisionGUID= GenerateClassCluster=0 DocumentUniqueId=JOCLQKPX +[Document13] +DocumentPath=Radio.SchDoc +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=9 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=0 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 +DocumentUniqueId=MBDXMPIH + +[Document14] +DocumentPath=Display.SchDoc +AnnotationEnabled=1 +AnnotateStartValue=1 +AnnotationIndexControlEnabled=0 +AnnotateSuffix= +AnnotateScope=All +AnnotateOrder=10 +DoLibraryUpdate=1 +DoDatabaseUpdate=1 +ClassGenCCAutoEnabled=1 +ClassGenCCAutoRoomEnabled=0 +ClassGenNCAutoScope=None +DItemRevisionGUID= +GenerateClassCluster=0 +DocumentUniqueId=OZWSKPMY + [Configuration1] Name=Sources ParameterCount=0 @@ -367,21 +401,11 @@ OutputName20=WireList Netlist OutputDocumentPath20= OutputVariantName20= OutputDefault20=0 -OutputType21=SIMetrixNetlist -OutputName21=SIMetrix +OutputType21=XSpiceNetlist +OutputName21=Mixed Sim Netlist OutputDocumentPath21= OutputVariantName21= OutputDefault21=0 -OutputType22=SIMPLISNetlist -OutputName22=SIMPLIS -OutputDocumentPath22= -OutputVariantName22= -OutputDefault22=0 -OutputType23=XSpiceNetlist -OutputName23=Mixed Sim Netlist -OutputDocumentPath23= -OutputVariantName23= -OutputDefault23=0 [OutputGroup2] Name=Simulator Outputs @@ -393,16 +417,6 @@ OutputName1=Mixed Sim OutputDocumentPath1= OutputVariantName1= OutputDefault1=0 -OutputType2=SIMetrixSimulation -OutputName2=SIMetrix -OutputDocumentPath2= -OutputVariantName2= -OutputDefault2=0 -OutputType3=SIMPLISSimulation -OutputName3=SIMPLIS -OutputDocumentPath3= -OutputVariantName3= -OutputDefault3=0 [OutputGroup3] Name=Documentation Outputs @@ -487,6 +501,12 @@ OutputDocumentPath13= OutputVariantName13= OutputDefault13=0 PageOptions13=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-3|MediaType=1|DitherType=10|PrintScaleMode=1|PaperKind=Letter|PaperIndex=1 +OutputType14=PCBDrawing +OutputName14=Draftsman +OutputDocumentPath14= +OutputVariantName14=[No Variations] +OutputDefault14=0 +PageOptions14=Record=PageOptions|CenterHorizontal=True|CenterVertical=True|PrintScale=1.00|XCorrection=1.00|YCorrection=1.00|PrintKind=1|BorderSize=5000000|LeftOffset=0|BottomOffset=0|Orientation=2|PaperLength=1000|PaperWidth=1000|Scale=100|PaperSource=7|PrintQuality=-3|MediaType=1|DitherType=10|PrintScaleMode=1|PaperKind=Letter|PaperIndex=1 [OutputGroup4] Name=Assembly Outputs @@ -1227,10 +1247,16 @@ NetClassManualEnabled=1 NetClassSeparateForBusSections=0 [LibraryUpdateOptions] -SelectedOnly=0 +SelectedOnly=1 UpdateVariants=1 UpdateToLatestRevision=1 PartTypes=0 +ComponentLibIdentifierKind0=Library Name And Type +ComponentLibraryIdentifier0=Gabriel.SchLib +ComponentDesignItemID0=DS24W-MS +ComponentSymbolReference0=DS24W-MS +ComponentUpdate0=1 +ComponentIsDeviceSheet0=0 FullReplace=1 UpdateDesignatorLock=1 UpdatePartIDLock=1 @@ -1244,6 +1270,19 @@ RemoveParameters=0 AddModels=1 RemoveModels=1 UpdateCurrentModels=1 +ParameterName0=Comment +ParameterUpdate0=1 +ParameterName1=Component Kind +ParameterUpdate1=1 +ParameterName2=Description +ParameterUpdate2=1 +ParameterName3=Library Reference +ParameterUpdate3=1 +ModelTypeGroup0=PCBLIB +ModelTypeUpdate0=1 +ModelType0=PCBLIB +ModelName0=SODFL370X140-2N +ModelUpdate0=1 [DatabaseUpdateOptions] SelectedOnly=0 diff --git a/Hardware/PFC_Motherboard/PowerInput.SchDoc b/Hardware/PFC_Motherboard/PowerInput.SchDoc index f8e76b9..33e98f2 100644 Binary files a/Hardware/PFC_Motherboard/PowerInput.SchDoc and b/Hardware/PFC_Motherboard/PowerInput.SchDoc differ diff --git a/Hardware/PFC_Motherboard/Switches.SchDoc b/Hardware/PFC_Motherboard/Switches.SchDoc index f4d8cde..0e15cf2 100644 Binary files a/Hardware/PFC_Motherboard/Switches.SchDoc and b/Hardware/PFC_Motherboard/Switches.SchDoc differ diff --git a/Hardware/PFC_Motherboard/VoltageRegulator.SchDoc b/Hardware/PFC_Motherboard/VoltageRegulator.SchDoc index 688e45b..0ebec28 100644 Binary files a/Hardware/PFC_Motherboard/VoltageRegulator.SchDoc and b/Hardware/PFC_Motherboard/VoltageRegulator.SchDoc differ