Ready for install: Switch to CAN1 and add unused PWM IDs for front

This commit is contained in:
2025-05-15 13:23:56 +02:00
parent 7c50101f9e
commit 3a8b90acc8
3 changed files with 16 additions and 6 deletions

View File

@ -191,8 +191,8 @@ int main(void)
MX_NVIC_Init();
/* USER CODE BEGIN 2 */
hMainCAN = &hfdcan2;
hPeriCAN = &hfdcan1;
hMainCAN = &hfdcan1;
hPeriCAN = &hfdcan2;
if (HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK)
Error_Handler();
@ -226,8 +226,8 @@ int main(void)
filter.FilterIndex = 0;
filter.FilterType = FDCAN_FILTER_MASK;
filter.FilterConfig = FDCAN_FILTER_TO_RXFIFO0;
filter.FilterID1 = 0x0DD;
filter.FilterID2 = 0x7FE; // Match 0x0DC and 0x0DD
filter.FilterID1 = CAN_PWM_BASE_ID;
filter.FilterID2 = CAN_PWM_FILTER_MASK;
if (HAL_FDCAN_ConfigFilter(hMainCAN, &filter) != HAL_OK)
Error_Handler();