Skip to content

Commit

Permalink
Merge branch 'embedded' of github.com:umrover/mrover-ros into embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
tabiosg committed Oct 7, 2023
2 parents 78e4360 + 86997f2 commit 208c767
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
4 changes: 4 additions & 0 deletions src/esw/fw/pdb/Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ void Error_Handler(void);
#define CURR_2_GPIO_Port GPIOA
#define CURR_3_Pin GPIO_PIN_3
#define CURR_3_GPIO_Port GPIOA
#define RA_LASER_Pin GPIO_PIN_5
#define RA_LASER_GPIO_Port GPIOA
#define UV_BULB_Pin GPIO_PIN_6
#define UV_BULB_GPIO_Port GPIOA
#define RED_LED_Pin GPIO_PIN_7
#define RED_LED_GPIO_Port GPIOA
#define GREEN_LED_Pin GPIO_PIN_4
Expand Down
8 changes: 4 additions & 4 deletions src/esw/fw/pdb/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,20 @@ static void MX_GPIO_Init(void)
__HAL_RCC_GPIOB_CLK_ENABLE();

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(RED_LED_GPIO_Port, RED_LED_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, RA_LASER_Pin|UV_BULB_Pin|RED_LED_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GREEN_LED_GPIO_Port, GREEN_LED_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(BLUE_LED_GPIO_Port, BLUE_LED_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin : RED_LED_Pin */
GPIO_InitStruct.Pin = RED_LED_Pin;
/*Configure GPIO pins : RA_LASER_Pin UV_BULB_Pin RED_LED_Pin */
GPIO_InitStruct.Pin = RA_LASER_Pin|UV_BULB_Pin|RED_LED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(RED_LED_GPIO_Port, &GPIO_InitStruct);
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

/*Configure GPIO pin : GREEN_LED_Pin */
GPIO_InitStruct.Pin = GREEN_LED_Pin;
Expand Down
37 changes: 24 additions & 13 deletions src/esw/fw/pdb/pdb.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ FDCAN1.CalculateTimeBitNominal=5000
FDCAN1.CalculateTimeQuantumNominal=1000.0
FDCAN1.IPParameters=CalculateTimeQuantumNominal,CalculateTimeBitNominal,CalculateBaudRateNominal
File.Version=6
GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false
Mcu.CPN=STM32G431CBU3
Mcu.Family=STM32G4
Expand All @@ -65,22 +66,24 @@ Mcu.Name=STM32G431C(6-8-B)Ux
Mcu.Package=UFQFPN48
Mcu.Pin0=PF0-OSC_IN
Mcu.Pin1=PA0
Mcu.Pin10=PB11
Mcu.Pin11=PB12
Mcu.Pin12=PB14
Mcu.Pin13=PA11
Mcu.Pin14=PA12
Mcu.Pin15=PA13
Mcu.Pin16=PA14
Mcu.Pin10=PB1
Mcu.Pin11=PB2
Mcu.Pin12=PB11
Mcu.Pin13=PB12
Mcu.Pin14=PB14
Mcu.Pin15=PA11
Mcu.Pin16=PA12
Mcu.Pin17=PA13
Mcu.Pin18=PA14
Mcu.Pin2=PA1
Mcu.Pin3=PA2
Mcu.Pin4=PA3
Mcu.Pin5=PA7
Mcu.Pin6=PC4
Mcu.Pin7=PB0
Mcu.Pin8=PB1
Mcu.Pin9=PB2
Mcu.PinsNb=17
Mcu.Pin5=PA5
Mcu.Pin6=PA6
Mcu.Pin7=PA7
Mcu.Pin8=PC4
Mcu.Pin9=PB0
Mcu.PinsNb=19
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32G431CBUx
Expand Down Expand Up @@ -121,6 +124,14 @@ PA3.GPIOParameters=GPIO_Label
PA3.GPIO_Label=CURR 3
PA3.Mode=IN4-Single-Ended
PA3.Signal=ADC1_IN4
PA5.GPIOParameters=GPIO_Label
PA5.GPIO_Label=RA LASER
PA5.Locked=true
PA5.Signal=GPIO_Output
PA6.GPIOParameters=GPIO_Label
PA6.GPIO_Label=UV BULB
PA6.Locked=true
PA6.Signal=GPIO_Output
PA7.GPIOParameters=GPIO_Label
PA7.GPIO_Label=RED LED
PA7.Locked=true
Expand Down

0 comments on commit 208c767

Please sign in to comment.