Firmware: PWM Servo tested with ESC
This commit is contained in:
@@ -222,4 +222,5 @@
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
@@ -189,7 +189,7 @@
|
||||
#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */
|
||||
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */
|
||||
#define USE_HAL_SPI_REGISTER_CALLBACKS 1U /* SPI register callback enabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */
|
||||
#define USE_HAL_TIM_REGISTER_CALLBACKS 1U /* TIM register callback enabled */
|
||||
#define USE_HAL_UART_REGISTER_CALLBACKS 1U /* UART register callback enabled */
|
||||
#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */
|
||||
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
|
||||
|
||||
@@ -32,12 +32,15 @@ extern "C" {
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern TIM_HandleTypeDef htim8;
|
||||
|
||||
extern TIM_HandleTypeDef htim10;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_TIM8_Init(void);
|
||||
void MX_TIM10_Init(void);
|
||||
|
||||
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* PWMServo.cpp
|
||||
*
|
||||
* Created on: Jul 30, 2024
|
||||
* Author: Gabriel
|
||||
*/
|
||||
|
||||
#include "PWMServo.hpp"
|
||||
|
||||
PWMServo::PWMServo(PWM_Pin* pwmPin, float pulseWidthMinUs, float pulseWidthMaxUs) :
|
||||
pwmPin(pwmPin), pulseWidthMinUs(pulseWidthMinUs), pulseWidthMaxUs(pulseWidthMaxUs) {
|
||||
|
||||
}
|
||||
|
||||
PWMServo::~PWMServo() {
|
||||
|
||||
}
|
||||
|
||||
int32_t PWMServo::init() {
|
||||
if(pulseWidthMaxUs <= pulseWidthMinUs){
|
||||
// Max pulse width not greater than min pulse width
|
||||
return -1;
|
||||
}
|
||||
if(pwmPin->init()){
|
||||
// Could not initialize PWM pin
|
||||
return -1;
|
||||
}
|
||||
initialized = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t PWMServo::setPosition(float position) {
|
||||
if(!initialized){
|
||||
// Not initialized
|
||||
return -1;
|
||||
}
|
||||
if(position < 0 || position > 1){
|
||||
// position out of range
|
||||
return -1;
|
||||
}
|
||||
float frequency;
|
||||
if(pwmPin->getFrequency(&frequency)){
|
||||
// Error getting PWM frequency
|
||||
return -1;
|
||||
}
|
||||
float pulseWidthUs = pulseWidthMinUs + position*(pulseWidthMaxUs - pulseWidthMinUs);
|
||||
float dutyCycle = pulseWidthUs*frequency/1000000;
|
||||
return pwmPin->setDutyCycle(dutyCycle);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* PWMServo.hpp
|
||||
*
|
||||
* Created on: Jul 30, 2024
|
||||
* Author: Gabriel
|
||||
*/
|
||||
|
||||
#ifndef SRC_COMPONENTS_PWMSERVO_HPP_
|
||||
#define SRC_COMPONENTS_PWMSERVO_HPP_
|
||||
|
||||
#include <cinttypes>
|
||||
#include "PWM_Pin.hpp"
|
||||
|
||||
class PWMServo {
|
||||
public:
|
||||
PWMServo(PWM_Pin* pwmPin, float pulseWidthMinUs = 500, float pulseWidthMaxUs = 1500);
|
||||
virtual ~PWMServo();
|
||||
int32_t init();
|
||||
int32_t setPosition(float position);
|
||||
private:
|
||||
bool initialized = false;
|
||||
PWM_Pin* pwmPin;
|
||||
float pulseWidthMinUs;
|
||||
float pulseWidthMaxUs;
|
||||
};
|
||||
|
||||
#endif /* SRC_COMPONENTS_PWMSERVO_HPP_ */
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* PWM_Pin.hpp
|
||||
*
|
||||
* Created on: Jul 30, 2024
|
||||
* Author: Gabriel
|
||||
*/
|
||||
|
||||
#ifndef SRC_COMPONENTS_PWM_PIN_HPP_
|
||||
#define SRC_COMPONENTS_PWM_PIN_HPP_
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
class PWM_Pin {
|
||||
public:
|
||||
virtual int32_t init() = 0;
|
||||
virtual int32_t setDutyCycle(float dutyCycle) = 0;
|
||||
virtual int32_t getFrequency(float* frequency) = 0;
|
||||
virtual int32_t reset() = 0;
|
||||
};
|
||||
|
||||
#endif /* SRC_COMPONENTS_PWM_PIN_HPP_ */
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* PWM_Pin_STM32.cpp
|
||||
*
|
||||
* Created on: Jul 30, 2024
|
||||
* Author: Gabriel
|
||||
*/
|
||||
|
||||
#include "PWM_Pin_STM32.hpp"
|
||||
|
||||
PWM_Pin_STM32::PWM_Pin_STM32(TIM_HandleTypeDef* htim, uint32_t channel) : htim(htim), channel(channel) {
|
||||
|
||||
}
|
||||
|
||||
PWM_Pin_STM32::~PWM_Pin_STM32() {
|
||||
|
||||
}
|
||||
|
||||
int32_t PWM_Pin_STM32::init() {
|
||||
if(HAL_TIM_PWM_Start(htim, channel) == HAL_OK){
|
||||
return 0;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t PWM_Pin_STM32::setDutyCycle(float dutyCycle) {
|
||||
if(dutyCycle<0 || dutyCycle>1){
|
||||
// dutyCycle out of range
|
||||
return -1;
|
||||
}
|
||||
uint32_t arr = __HAL_TIM_GET_AUTORELOAD(htim);
|
||||
uint32_t ccr = dutyCycle*arr;
|
||||
__HAL_TIM_SET_COMPARE(htim, channel, ccr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t PWM_Pin_STM32::getFrequency(float* frequency){
|
||||
// FIXME: May work only on STM32F4
|
||||
float timClkFreq;
|
||||
if((uint32_t*)htim->Instance >= (uint32_t*)APB1PERIPH_BASE && (uint32_t*)htim->Instance < (uint32_t*)APB2PERIPH_BASE){
|
||||
// Timer on APB1
|
||||
timClkFreq = HAL_RCC_GetPCLK1Freq()*2;
|
||||
}else if((uint32_t*)htim->Instance > (uint32_t*)APB2PERIPH_BASE){
|
||||
// Timer on APB2
|
||||
timClkFreq = HAL_RCC_GetPCLK2Freq()*2;
|
||||
}else{
|
||||
// Unknown bus
|
||||
return -1;
|
||||
}
|
||||
if(frequency){
|
||||
*frequency = timClkFreq/((htim->Instance->ARR+1) * (htim->Instance->PSC+1));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t PWM_Pin_STM32::reset(){
|
||||
// TODO: test if this implementation works to force reload
|
||||
__HAL_TIM_SET_COUNTER(htim, 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* PWM_Pin_STM32.hpp
|
||||
*
|
||||
* Created on: Jul 30, 2024
|
||||
* Author: Gabriel
|
||||
*/
|
||||
|
||||
#ifndef SRC_COMPONENTS_PWM_PIN_STM32_HPP_
|
||||
#define SRC_COMPONENTS_PWM_PIN_STM32_HPP_
|
||||
|
||||
#include "main.h"
|
||||
#include "PWM_Pin.hpp"
|
||||
|
||||
class PWM_Pin_STM32 : public PWM_Pin {
|
||||
public:
|
||||
PWM_Pin_STM32(TIM_HandleTypeDef* htim, uint32_t channel);
|
||||
virtual ~PWM_Pin_STM32();
|
||||
int32_t init();
|
||||
int32_t setDutyCycle(float dutyCycle);
|
||||
int32_t getFrequency(float* frequency);
|
||||
int32_t reset();
|
||||
private:
|
||||
TIM_HandleTypeDef* htim;
|
||||
uint32_t channel;
|
||||
};
|
||||
|
||||
#endif /* SRC_COMPONENTS_PWM_PIN_STM32_HPP_ */
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "GPIO_Pin_STM32.hpp"
|
||||
#include "BinLeds.hpp"
|
||||
#include "LogDriver.hpp"
|
||||
#include "PWMServo.hpp"
|
||||
#include "PWM_Pin_STM32.hpp"
|
||||
|
||||
GPIO_Pin_STM32 ledOrange(GPIOD, GPIO_PIN_13);
|
||||
GPIO_Pin_STM32 ledGreen(GPIOD, GPIO_PIN_12);
|
||||
@@ -18,7 +20,9 @@ GPIO_Pin_STM32 ledRed(GPIOD, GPIO_PIN_14);
|
||||
GPIO_Pin_STM32 ledBlue(GPIOD, GPIO_PIN_15);
|
||||
BinLeds discoveryLeds((GPIO_Pin*[]){&ledOrange, &ledGreen, &ledRed, &ledBlue}, 4);
|
||||
|
||||
uint8_t recvBuffer[12];
|
||||
extern TIM_HandleTypeDef htim8;
|
||||
PWM_Pin_STM32 escPin(&htim8, TIM_CHANNEL_3);
|
||||
PWMServo esc(&escPin, 1000, 2000);
|
||||
|
||||
void executableDispatch(void* _executable){
|
||||
Executable* executable = static_cast<Executable*>(_executable);
|
||||
@@ -43,5 +47,13 @@ void start(){
|
||||
LogDriver::getInstance()->init();
|
||||
TaskHandle_t hTaskLogDriver;
|
||||
xTaskCreate(executableDispatch, "LogDriver", 256, LogDriver::getInstance(), 20, &hTaskLogDriver);
|
||||
esc.init();
|
||||
esc.setPosition(0);
|
||||
vTaskDelay(10000);
|
||||
esc.setPosition(1);
|
||||
vTaskDelay(10000);
|
||||
esc.setPosition(0);
|
||||
vTaskDelay(10000);
|
||||
esc.setPosition(0.5);
|
||||
vTaskDelete(nullptr);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ int main(void)
|
||||
MX_TIM10_Init();
|
||||
MX_USART2_UART_Init();
|
||||
MX_USB_OTG_FS_PCD_Init();
|
||||
MX_TIM8_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
@@ -24,8 +24,79 @@
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
TIM_HandleTypeDef htim8;
|
||||
TIM_HandleTypeDef htim10;
|
||||
|
||||
/* TIM8 init function */
|
||||
void MX_TIM8_Init(void)
|
||||
{
|
||||
|
||||
/* USER CODE BEGIN TIM8_Init 0 */
|
||||
|
||||
/* USER CODE END TIM8_Init 0 */
|
||||
|
||||
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
|
||||
TIM_MasterConfigTypeDef sMasterConfig = {0};
|
||||
TIM_OC_InitTypeDef sConfigOC = {0};
|
||||
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};
|
||||
|
||||
/* USER CODE BEGIN TIM8_Init 1 */
|
||||
|
||||
/* USER CODE END TIM8_Init 1 */
|
||||
htim8.Instance = TIM8;
|
||||
htim8.Init.Prescaler = 50;
|
||||
htim8.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim8.Init.Period = 65535;
|
||||
htim8.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||
htim8.Init.RepetitionCounter = 0;
|
||||
htim8.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
|
||||
if (HAL_TIM_Base_Init(&htim8) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
|
||||
if (HAL_TIM_ConfigClockSource(&htim8, &sClockSourceConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
if (HAL_TIM_PWM_Init(&htim8) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
|
||||
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
|
||||
if (HAL_TIMEx_MasterConfigSynchronization(&htim8, &sMasterConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||
sConfigOC.Pulse = 0;
|
||||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
|
||||
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
|
||||
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
|
||||
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
|
||||
if (HAL_TIM_PWM_ConfigChannel(&htim8, &sConfigOC, TIM_CHANNEL_3) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE;
|
||||
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE;
|
||||
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
|
||||
sBreakDeadTimeConfig.DeadTime = 0;
|
||||
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
|
||||
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
|
||||
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE;
|
||||
if (HAL_TIMEx_ConfigBreakDeadTime(&htim8, &sBreakDeadTimeConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/* USER CODE BEGIN TIM8_Init 2 */
|
||||
|
||||
/* USER CODE END TIM8_Init 2 */
|
||||
HAL_TIM_MspPostInit(&htim8);
|
||||
|
||||
}
|
||||
/* TIM10 init function */
|
||||
void MX_TIM10_Init(void)
|
||||
{
|
||||
@@ -71,7 +142,18 @@ void MX_TIM10_Init(void)
|
||||
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||
{
|
||||
|
||||
if(tim_baseHandle->Instance==TIM10)
|
||||
if(tim_baseHandle->Instance==TIM8)
|
||||
{
|
||||
/* USER CODE BEGIN TIM8_MspInit 0 */
|
||||
|
||||
/* USER CODE END TIM8_MspInit 0 */
|
||||
/* TIM8 clock enable */
|
||||
__HAL_RCC_TIM8_CLK_ENABLE();
|
||||
/* USER CODE BEGIN TIM8_MspInit 1 */
|
||||
|
||||
/* USER CODE END TIM8_MspInit 1 */
|
||||
}
|
||||
else if(tim_baseHandle->Instance==TIM10)
|
||||
{
|
||||
/* USER CODE BEGIN TIM10_MspInit 0 */
|
||||
|
||||
@@ -87,7 +169,27 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
|
||||
{
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(timHandle->Instance==TIM10)
|
||||
if(timHandle->Instance==TIM8)
|
||||
{
|
||||
/* USER CODE BEGIN TIM8_MspPostInit 0 */
|
||||
|
||||
/* USER CODE END TIM8_MspPostInit 0 */
|
||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||
/**TIM8 GPIO Configuration
|
||||
PC8 ------> TIM8_CH3
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_8;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF3_TIM8;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/* USER CODE BEGIN TIM8_MspPostInit 1 */
|
||||
|
||||
/* USER CODE END TIM8_MspPostInit 1 */
|
||||
}
|
||||
else if(timHandle->Instance==TIM10)
|
||||
{
|
||||
/* USER CODE BEGIN TIM10_MspPostInit 0 */
|
||||
|
||||
@@ -114,7 +216,18 @@ void HAL_TIM_MspPostInit(TIM_HandleTypeDef* timHandle)
|
||||
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
|
||||
{
|
||||
|
||||
if(tim_baseHandle->Instance==TIM10)
|
||||
if(tim_baseHandle->Instance==TIM8)
|
||||
{
|
||||
/* USER CODE BEGIN TIM8_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END TIM8_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_TIM8_CLK_DISABLE();
|
||||
/* USER CODE BEGIN TIM8_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END TIM8_MspDeInit 1 */
|
||||
}
|
||||
else if(tim_baseHandle->Instance==TIM10)
|
||||
{
|
||||
/* USER CODE BEGIN TIM10_MspDeInit 0 */
|
||||
|
||||
|
||||
@@ -66,8 +66,9 @@ Mcu.CPN=STM32F407VGT6
|
||||
Mcu.Family=STM32F4
|
||||
Mcu.IP0=DMA
|
||||
Mcu.IP1=FREERTOS
|
||||
Mcu.IP10=USART2
|
||||
Mcu.IP11=USB_OTG_FS
|
||||
Mcu.IP10=TIM10
|
||||
Mcu.IP11=USART2
|
||||
Mcu.IP12=USB_OTG_FS
|
||||
Mcu.IP2=I2C1
|
||||
Mcu.IP3=I2S3
|
||||
Mcu.IP4=NVIC
|
||||
@@ -75,8 +76,8 @@ Mcu.IP5=RCC
|
||||
Mcu.IP6=SPI1
|
||||
Mcu.IP7=SPI2
|
||||
Mcu.IP8=SYS
|
||||
Mcu.IP9=TIM10
|
||||
Mcu.IPNb=12
|
||||
Mcu.IP9=TIM8
|
||||
Mcu.IPNb=13
|
||||
Mcu.Name=STM32F407V(E-G)Tx
|
||||
Mcu.Package=LQFP100
|
||||
Mcu.Pin0=PE3
|
||||
@@ -116,38 +117,40 @@ Mcu.Pin39=PD15
|
||||
Mcu.Pin4=PH1-OSC_OUT
|
||||
Mcu.Pin40=PC6
|
||||
Mcu.Pin41=PC7
|
||||
Mcu.Pin42=PC9
|
||||
Mcu.Pin43=PA8
|
||||
Mcu.Pin44=PA9
|
||||
Mcu.Pin45=PA10
|
||||
Mcu.Pin46=PA11
|
||||
Mcu.Pin47=PA12
|
||||
Mcu.Pin48=PA13
|
||||
Mcu.Pin49=PA14
|
||||
Mcu.Pin42=PC8
|
||||
Mcu.Pin43=PC9
|
||||
Mcu.Pin44=PA8
|
||||
Mcu.Pin45=PA9
|
||||
Mcu.Pin46=PA10
|
||||
Mcu.Pin47=PA11
|
||||
Mcu.Pin48=PA12
|
||||
Mcu.Pin49=PA13
|
||||
Mcu.Pin5=PC0
|
||||
Mcu.Pin50=PA15
|
||||
Mcu.Pin51=PC10
|
||||
Mcu.Pin52=PC12
|
||||
Mcu.Pin53=PD4
|
||||
Mcu.Pin54=PD5
|
||||
Mcu.Pin55=PD6
|
||||
Mcu.Pin56=PD7
|
||||
Mcu.Pin57=PB3
|
||||
Mcu.Pin58=PB4
|
||||
Mcu.Pin59=PB5
|
||||
Mcu.Pin50=PA14
|
||||
Mcu.Pin51=PA15
|
||||
Mcu.Pin52=PC10
|
||||
Mcu.Pin53=PC12
|
||||
Mcu.Pin54=PD4
|
||||
Mcu.Pin55=PD5
|
||||
Mcu.Pin56=PD6
|
||||
Mcu.Pin57=PD7
|
||||
Mcu.Pin58=PB3
|
||||
Mcu.Pin59=PB4
|
||||
Mcu.Pin6=PC3
|
||||
Mcu.Pin60=PB6
|
||||
Mcu.Pin61=PB7
|
||||
Mcu.Pin62=PB8
|
||||
Mcu.Pin63=PB9
|
||||
Mcu.Pin64=PE1
|
||||
Mcu.Pin65=VP_FREERTOS_VS_CMSIS_V2
|
||||
Mcu.Pin66=VP_SYS_VS_tim7
|
||||
Mcu.Pin67=VP_TIM10_VS_ClockSourceINT
|
||||
Mcu.Pin60=PB5
|
||||
Mcu.Pin61=PB6
|
||||
Mcu.Pin62=PB7
|
||||
Mcu.Pin63=PB8
|
||||
Mcu.Pin64=PB9
|
||||
Mcu.Pin65=PE1
|
||||
Mcu.Pin66=VP_FREERTOS_VS_CMSIS_V2
|
||||
Mcu.Pin67=VP_SYS_VS_tim7
|
||||
Mcu.Pin68=VP_TIM8_VS_ClockSourceINT
|
||||
Mcu.Pin69=VP_TIM10_VS_ClockSourceINT
|
||||
Mcu.Pin7=PA0-WKUP
|
||||
Mcu.Pin8=PA2
|
||||
Mcu.Pin9=PA3
|
||||
Mcu.PinsNb=68
|
||||
Mcu.PinsNb=70
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F407VGTx
|
||||
@@ -416,6 +419,8 @@ PC7.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
||||
PC7.Locked=true
|
||||
PC7.Mode=Master_Clock_Activated
|
||||
PC7.Signal=I2S3_MCK
|
||||
PC8.Locked=true
|
||||
PC8.Signal=S_TIM8_CH3
|
||||
PC9.GPIOParameters=GPIO_Label
|
||||
PC9.GPIO_Label=NRF24_B_CE
|
||||
PC9.Locked=true
|
||||
@@ -564,7 +569,7 @@ ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=F407V-PWMServoTester.ioc
|
||||
ProjectManager.ProjectName=F407V-PWMServoTester
|
||||
ProjectManager.ProjectStructure=
|
||||
ProjectManager.RegisterCallBack=SPI,ADC,I2C,UART
|
||||
ProjectManager.RegisterCallBack=ADC,I2C,SPI,TIM,UART
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=STM32CubeIDE
|
||||
ProjectManager.ToolChainLocation=
|
||||
@@ -626,6 +631,8 @@ SH.GPXTI9.0=GPIO_EXTI9
|
||||
SH.GPXTI9.ConfNb=1
|
||||
SH.S_TIM10_CH1.0=TIM10_CH1,PWM Generation1 CH1
|
||||
SH.S_TIM10_CH1.ConfNb=1
|
||||
SH.S_TIM8_CH3.0=TIM8_CH3,PWM Generation3 CH3
|
||||
SH.S_TIM8_CH3.ConfNb=1
|
||||
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_256
|
||||
SPI1.BaudRatePrescaler-Full_Duplex_Master=SPI_BAUDRATEPRESCALER_2
|
||||
SPI1.CalculateBaudRate=328.125 KBits/s
|
||||
@@ -643,6 +650,10 @@ SPI2.Mode=SPI_MODE_MASTER
|
||||
SPI2.VirtualType=VM_MASTER
|
||||
TIM10.Channel=TIM_CHANNEL_1
|
||||
TIM10.IPParameters=Channel
|
||||
TIM8.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE
|
||||
TIM8.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
|
||||
TIM8.IPParameters=Channel-PWM Generation3 CH3,Prescaler,AutoReloadPreload
|
||||
TIM8.Prescaler=50
|
||||
USART2.IPParameters=VirtualMode
|
||||
USART2.VirtualMode=VM_ASYNC
|
||||
USB_OTG_FS.IPParameters=VirtualMode
|
||||
@@ -653,6 +664,8 @@ VP_SYS_VS_tim7.Mode=TIM7
|
||||
VP_SYS_VS_tim7.Signal=SYS_VS_tim7
|
||||
VP_TIM10_VS_ClockSourceINT.Mode=Enable_Timer
|
||||
VP_TIM10_VS_ClockSourceINT.Signal=TIM10_VS_ClockSourceINT
|
||||
VP_TIM8_VS_ClockSourceINT.Mode=Internal
|
||||
VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT
|
||||
board=STM32F407G-DISC1
|
||||
boardIOC=true
|
||||
rtos.0.ip=FREERTOS
|
||||
|
||||
Reference in New Issue
Block a user