Skip to content

Commit

Permalink
Boot files update cringe CI problems (#1247)
Browse files Browse the repository at this point in the history
### Changelist 
<!-- Give a list of the changes covered in this PR. This will help both
you and the reviewer keep this PR within scope. -->
- oops forgot to hit build all

### Testing Done
<!-- Outline the testing that was done to demonstrate the changes are
solid. This could be unit tests, integration tests, testing on the car,
etc. Include relevant code snippets, screenshots, etc as needed. -->

### Resolved Tickets
<!-- Link any tickets that this PR resolves. -->
  • Loading branch information
Lucien950 authored May 4, 2024
1 parent ebce203 commit dc1d9e3
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 2 deletions.
2 changes: 1 addition & 1 deletion firmware/quadruna/BMS/boot/cubemx/BMS_boot.ioc.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d8e20164eb3cb9792bfa189df427bdba
9a4a0a62090e5de58aec23391bcfd148
14 changes: 14 additions & 0 deletions firmware/quadruna/BMS/boot/cubemx/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ extern "C"
/* Private defines -----------------------------------------------------------*/
#define nBOOT_EN_Pin GPIO_PIN_13
#define nBOOT_EN_GPIO_Port GPIOC
#define AIR_P_EN_Pin GPIO_PIN_2
#define AIR_P_EN_GPIO_Port GPIOC
#define PRE_CHARGE_END_Pin GPIO_PIN_3
#define PRE_CHARGE_END_GPIO_Port GPIOC
#define BSPD_TEST_EN_Pin GPIO_PIN_4
#define BSPD_TEST_EN_GPIO_Port GPIOA
#define nCHIMERA_Pin GPIO_PIN_5
#define nCHIMERA_GPIO_Port GPIOA
#define DEBUG_LED_Pin GPIO_PIN_7
#define DEBUG_LED_GPIO_Port GPIOE
#define SPI_CS_Pin GPIO_PIN_12
#define SPI_CS_GPIO_Port GPIOB
#define BMS_OK_Pin GPIO_PIN_9
#define BMS_OK_GPIO_Port GPIOD

/* USER CODE BEGIN Private defines */

Expand Down
59 changes: 59 additions & 0 deletions firmware/quadruna/BMS/boot/cubemx/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,73 @@ static void MX_GPIO_Init(void)
/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOE_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOD_CLK_ENABLE();

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, AIR_P_EN_Pin | PRE_CHARGE_END_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(BSPD_TEST_EN_GPIO_Port, BSPD_TEST_EN_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(DEBUG_LED_GPIO_Port, DEBUG_LED_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(SPI_CS_GPIO_Port, SPI_CS_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(BMS_OK_GPIO_Port, BMS_OK_Pin, GPIO_PIN_SET);

/*Configure GPIO pin : nBOOT_EN_Pin */
GPIO_InitStruct.Pin = nBOOT_EN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(nBOOT_EN_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pins : AIR_P_EN_Pin PRE_CHARGE_END_Pin */
GPIO_InitStruct.Pin = AIR_P_EN_Pin | PRE_CHARGE_END_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

/*Configure GPIO pin : BSPD_TEST_EN_Pin */
GPIO_InitStruct.Pin = BSPD_TEST_EN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(BSPD_TEST_EN_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : nCHIMERA_Pin */
GPIO_InitStruct.Pin = nCHIMERA_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(nCHIMERA_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : DEBUG_LED_Pin */
GPIO_InitStruct.Pin = DEBUG_LED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(DEBUG_LED_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : SPI_CS_Pin */
GPIO_InitStruct.Pin = SPI_CS_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(SPI_CS_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : BMS_OK_Pin */
GPIO_InitStruct.Pin = BMS_OK_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(BMS_OK_GPIO_Port, &GPIO_InitStruct);

/* USER CODE BEGIN MX_GPIO_Init_2 */
/* USER CODE END MX_GPIO_Init_2 */
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/quadruna/FSM/boot/cubemx/FSM_boot.ioc.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a782ba6b8ff8e7b48f622b3d0790a73b
062b8c6254530dd03f43de74949f5ad9
2 changes: 2 additions & 0 deletions firmware/quadruna/FSM/boot/cubemx/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ extern "C"
/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define LED_Pin GPIO_PIN_13
#define LED_GPIO_Port GPIOC
#define nBOOT_EN_Pin GPIO_PIN_15
#define nBOOT_EN_GPIO_Port GPIOA

Expand Down
11 changes: 11 additions & 0 deletions firmware/quadruna/FSM/boot/cubemx/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,21 @@ static void MX_GPIO_Init(void)
/* USER CODE END MX_GPIO_Init_1 */

/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOH_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);

/*Configure GPIO pin : LED_Pin */
GPIO_InitStruct.Pin = LED_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : nBOOT_EN_Pin */
GPIO_InitStruct.Pin = nBOOT_EN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
Expand Down

0 comments on commit dc1d9e3

Please sign in to comment.