diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 5aede8f..96f5bd0 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/App/Src/test.cpp b/App/Src/test.cpp index de428a7..8da1340 100644 --- a/App/Src/test.cpp +++ b/App/Src/test.cpp @@ -15,35 +15,83 @@ sta::STM32CanController canController(handle); - //canController.start(); + canController.start(); - CAN_TxHeaderTypeDef txHeader; + /*CAN_TxHeaderTypeDef txHeader; txHeader.DLC = 8; - txHeader.IDE = CAN_ID_STD; - txHeader.RTR = CAN_RTR_DATA; - txHeader.StdId = 0x030; - txHeader.ExtId = 0x02; - txHeader.TransmitGlobalTime = DISABLE; + txHeader.IDE = CAN_ID_STD; + txHeader.RTR = CAN_RTR_DATA; + txHeader.StdId = 0x030; + //txHeader.ExtId = 0x02; + txHeader.TransmitGlobalTime = DISABLE;*/ - HAL_CAN_Start(handle); + //HAL_CAN_Start(handle); // Create a CanTxHeader for your message - /*sta::CanTxHeader txHeader; + sta::CanTxHeader txHeader; txHeader.id.format = sta::CanIdFormat::STD; // Set to EXT for extended ID - txHeader.id.sid = 0x123; // Set the standard ID or extended ID - txHeader.payloadLength = 8; // Set the payload length (max 8 bytes)*/ + txHeader.id.sid = 0x030; // Set the standard ID or extended ID + txHeader.payloadLength = 8; // Set the payload length (max 8 bytes) // Create your message payload uint8_t payload[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; - bool okay; uint32_t canMailbox; //CAN Bus Mail box variable // Send the CAN message while (true){ - //okay = canController.sendFrame(txHeader, payload); - HAL_CAN_AddTxMessage(handle,&txHeader,payload,&canMailbox); + canController.sendFrame(txHeader, payload); + //HAL_CAN_AddTxMessage(handle,&txHeader,payload,&canMailbox); HAL_Delay(1000); } } + extern "C" void testCanMsg(CAN_HandleTypeDef * handle, uint8_t payload[8]){ + + sta::STM32CanController canController(handle); + + //canController.start(); + + + CAN_TxHeaderTypeDef txHeader; + txHeader.DLC = 8; + txHeader.IDE = CAN_ID_STD; + txHeader.RTR = CAN_RTR_DATA; + txHeader.StdId = 0x030; + //txHeader.ExtId = 0x02; + txHeader.TransmitGlobalTime = DISABLE; + + //HAL_CAN_Start(handle); + // Create a CanTxHeader for your message + /*sta::CanTxHeader txHeader; + txHeader.id.format = sta::CanIdFormat::STD; // Set to EXT for extended ID + txHeader.id.sid = 0x123; // Set the standard ID or extended ID + txHeader.payloadLength = 8; // Set the payload length (max 8 bytes)*/ + + uint32_t canMailbox; //CAN Bus Mail box variable + // Send the CAN message + //okay = canController.sendFrame(txHeader, payload); + HAL_CAN_AddTxMessage(handle,&txHeader,payload,&canMailbox); + HAL_Delay(1000); + + + } + + void unpackValues(uint8_t packedByte, uint8_t* type_id, uint8_t* sensor_ID, uint8_t* value, uint8_t* include) { + *type_id = (packedByte >> 6) & 0x03; // Extracting two bits for type_id + *sensor_ID = (packedByte >> 3) & 0x07; // Extracting three bits for sensorID + *include = (packedByte >> 2) & 0x01; // Extracting the flag for included value + *value = (packedByte >> 1) & 0x01; // Extracting one bit for value + } + + uint8_t packValues(uint8_t type_id, uint8_t sensor_ID, uint8_t value, uint8_t include) { + uint8_t packedByte = 0; + + // Shifting and ORing the values + packedByte |= (type_id & 0x03) << 6; // Two bits for type_id, left-shifted by 6 + packedByte |= (sensor_ID & 0x07) << 3; // Three bits for sensorID, left-shifted by 3 + packedByte |= (include & 0x01) << 2; // Flag for included value + packedByte |= (value & 0x01) << 1; // One bit for value + + return packedByte; + } diff --git a/CAN-Card_Module_Software.ioc b/CAN-Card_Module_Software.ioc index 5650f82..d8e3280 100644 --- a/CAN-Card_Module_Software.ioc +++ b/CAN-Card_Module_Software.ioc @@ -24,28 +24,30 @@ Mcu.Name=STM32F407Z(E-G)Tx Mcu.Package=LQFP144 Mcu.Pin0=PH0-OSC_IN Mcu.Pin1=PH1-OSC_OUT -Mcu.Pin10=PA14 -Mcu.Pin11=PA15 -Mcu.Pin12=PC10 -Mcu.Pin13=PC11 -Mcu.Pin14=PC12 -Mcu.Pin15=PB3 +Mcu.Pin10=PA13 +Mcu.Pin11=PA14 +Mcu.Pin12=PA15 +Mcu.Pin13=PC10 +Mcu.Pin14=PC11 +Mcu.Pin15=PC12 +Mcu.Pin16=PB3 Mcu.Pin2=PA0-WKUP Mcu.Pin3=PA1 Mcu.Pin4=PB12 Mcu.Pin5=PB13 Mcu.Pin6=PD8 -Mcu.Pin7=PA11 -Mcu.Pin8=PA12 -Mcu.Pin9=PA13 -Mcu.PinsNb=16 +Mcu.Pin7=PD9 +Mcu.Pin8=PA11 +Mcu.Pin9=PA12 +Mcu.PinsNb=17 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F407ZGTx -MxCube.Version=6.9.2 -MxDb.Version=DB.6.0.92 +MxCube.Version=6.10.0 +MxDb.Version=DB.6.0.100 NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.CAN1_RX0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true +NVIC.CAN1_RX1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false @@ -91,6 +93,8 @@ PC12.Locked=true PC12.Signal=SPI3_MOSI PD8.Locked=true PD8.Signal=GPIO_Output +PD9.Locked=true +PD9.Signal=GPIO_Output PH0-OSC_IN.Locked=true PH0-OSC_IN.Mode=HSE-External-Oscillator PH0-OSC_IN.Signal=RCC_OSC_IN diff --git a/Core/Inc/stm32f4xx_it.h b/Core/Inc/stm32f4xx_it.h index f4ba1b9..8f0ee5b 100644 --- a/Core/Inc/stm32f4xx_it.h +++ b/Core/Inc/stm32f4xx_it.h @@ -56,6 +56,7 @@ void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); void CAN1_RX0_IRQHandler(void); +void CAN1_RX1_IRQHandler(void); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ diff --git a/Core/Src/main.c b/Core/Src/main.c index 4a706b7..0ed4b75 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -23,6 +23,9 @@ /* USER CODE BEGIN Includes */ //#include extern void testCan(CAN_HandleTypeDef * handle); +extern void testCanMsg(CAN_HandleTypeDef * handle, uint8_t payload[8]); +extern void unpackValues(uint8_t packedByte, uint8_t* type_id, uint8_t* sensor_ID, uint8_t* value, uint8_t* include); +extern uint8_t packValues(uint8_t type_id, uint8_t sensor_ID, uint8_t value, uint8_t include); /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -35,8 +38,10 @@ extern void testCan(CAN_HandleTypeDef * handle); CAN_RxHeaderTypeDef rxHeader; //CAN Bus Transmit Header CAN_TxHeaderTypeDef txHeader; //CAN Bus Receive Header uint8_t canRX[8] = {0,0,0,0,0,0,0,0}; //CAN Bus Receive Buffer -CAN_FilterTypeDef canfil; //CAN Bus Filter +CAN_FilterTypeDef canfilterconfig; uint32_t canMailbox; //CAN Bus Mail box variable + +uint8_t received = 0; /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ @@ -99,19 +104,35 @@ int main(void) MX_CAN1_Init(); /* USER CODE BEGIN 2 */ - txHeader.DLC = 8; + /*txHeader.DLC = 8; txHeader.IDE = CAN_ID_STD; txHeader.RTR = CAN_RTR_DATA; txHeader.StdId = 0x030; txHeader.ExtId = 0x02; - txHeader.TransmitGlobalTime = DISABLE; + txHeader.TransmitGlobalTime = DISABLE;*/ - HAL_CAN_ConfigFilter(&hcan1,&canfil); + canfilterconfig.FilterActivation = CAN_FILTER_ENABLE; + canfilterconfig.FilterBank = 18; + canfilterconfig.FilterFIFOAssignment = CAN_RX_FIFO0; + canfilterconfig.FilterIdHigh = 0; + canfilterconfig.FilterIdLow = 0x466<<5; + canfilterconfig.FilterMaskIdHigh = 0; + canfilterconfig.FilterMaskIdLow = 0x466<<5; + canfilterconfig.FilterMode = CAN_FILTERMODE_IDMASK; + canfilterconfig.FilterScale = CAN_FILTERSCALE_32BIT; + canfilterconfig.SlaveStartFilterBank = 20; + + HAL_CAN_ConfigFilter(&hcan1, &canfilterconfig); HAL_CAN_Start(&hcan1); //HAL_CAN_ActivateNotification(&hcan1,CAN_IT_RX_FIFO0_MSG_PENDING); + + if (HAL_CAN_ActivateNotification(&hcan1, CAN_IT_RX_FIFO0_MSG_PENDING) != HAL_OK) + { + Error_Handler(); + } //HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12, GPIO_PIN_SET); - //testCan(&hcan1); + testCan(&hcan1); /* USER CODE END 2 */ @@ -124,18 +145,26 @@ int main(void) //HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12, GPIO_PIN_RESET); //HAL_Delay(100); //HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12, GPIO_PIN_SET);# + //testCan(&hcan1); - HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &rxHeader, canRX); + /*HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &rxHeader, canRX); if (canRX[0] != 0){ HAL_GPIO_TogglePin(GPIOD,GPIO_PIN_8); HAL_Delay(1000); } uint8_t csend[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08}; - HAL_CAN_AddTxMessage(&hcan1,&txHeader,csend,&canMailbox); + //HAL_CAN_AddTxMessage(&hcan1,&txHeader,csend,&canMailbox);*/ /*HAL_GPIO_WritePin(GPIOD,GPIO_PIN_8, GPIO_PIN_RESET); HAL_Delay(100); HAL_GPIO_WritePin(GPIOD,GPIO_PIN_8, GPIO_PIN_SET);*/ + + //testCanMsg(&hcan1, canRX); + + if (received == 1){ + testCanMsg(&hcan1, canRX); + received = 0; + } HAL_Delay(1000); /* USER CODE END WHILE */ @@ -282,7 +311,7 @@ static void MX_GPIO_Init(void) HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12|GPIO_PIN_13, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOD, GPIO_PIN_8, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOD, GPIO_PIN_8|GPIO_PIN_9, GPIO_PIN_RESET); /*Configure GPIO pins : PB12 PB13 */ GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13; @@ -291,8 +320,8 @@ static void MX_GPIO_Init(void) GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - /*Configure GPIO pin : PD8 */ - GPIO_InitStruct.Pin = GPIO_PIN_8; + /*Configure GPIO pins : PD8 PD9 */ + GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; @@ -316,10 +345,22 @@ void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan1) { HAL_GPIO_TogglePin(GPIOD,GPIO_PIN_8); - HAL_Delay(1000); + received = 1; HAL_CAN_GetRxMessage(hcan1, CAN_RX_FIFO0, &rxHeader, canRX); + /*uint8_t type_id, sensor_ID, value, include; + + unpackValues(canRX, *type_id, *sensor_ID, *value, *include); + + if (type_id == 0 && sensor_ID == 1){ + if (value == 0){ + HAL_GPIO_WritePin(GPIOD,GPIO_PIN_8, GPIO_PIN_RESET); + }else{ + HAL_GPIO_WritePin(GPIOD,GPIO_PIN_8, GPIO_PIN_SET); + } + }*/ + } @@ -336,6 +377,8 @@ void Error_Handler(void) __disable_irq(); while (1) { + HAL_GPIO_TogglePin(GPIOD,GPIO_PIN_9); + HAL_Delay(1000); } /* USER CODE END Error_Handler_Debug */ } diff --git a/Core/Src/stm32f4xx_hal_msp.c b/Core/Src/stm32f4xx_hal_msp.c index 7737668..29e028f 100644 --- a/Core/Src/stm32f4xx_hal_msp.c +++ b/Core/Src/stm32f4xx_hal_msp.c @@ -109,6 +109,8 @@ void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) /* CAN1 interrupt Init */ HAL_NVIC_SetPriority(CAN1_RX0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN1_RX0_IRQn); + HAL_NVIC_SetPriority(CAN1_RX1_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(CAN1_RX1_IRQn); /* USER CODE BEGIN CAN1_MspInit 1 */ /* USER CODE END CAN1_MspInit 1 */ @@ -140,6 +142,7 @@ void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan) /* CAN1 interrupt DeInit */ HAL_NVIC_DisableIRQ(CAN1_RX0_IRQn); + HAL_NVIC_DisableIRQ(CAN1_RX1_IRQn); /* USER CODE BEGIN CAN1_MspDeInit 1 */ /* USER CODE END CAN1_MspDeInit 1 */ diff --git a/Core/Src/stm32f4xx_it.c b/Core/Src/stm32f4xx_it.c index 4f4b663..4a486fd 100644 --- a/Core/Src/stm32f4xx_it.c +++ b/Core/Src/stm32f4xx_it.c @@ -212,6 +212,20 @@ void CAN1_RX0_IRQHandler(void) /* USER CODE END CAN1_RX0_IRQn 1 */ } +/** + * @brief This function handles CAN1 RX1 interrupt. + */ +void CAN1_RX1_IRQHandler(void) +{ + /* USER CODE BEGIN CAN1_RX1_IRQn 0 */ + + /* USER CODE END CAN1_RX1_IRQn 0 */ + HAL_CAN_IRQHandler(&hcan1); + /* USER CODE BEGIN CAN1_RX1_IRQn 1 */ + + /* USER CODE END CAN1_RX1_IRQn 1 */ +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/Debug/App/Src/test.cyclo b/Debug/App/Src/test.cyclo index ee142c0..cae9e65 100644 --- a/Debug/App/Src/test.cyclo +++ b/Debug/App/Src/test.cyclo @@ -1 +1,4 @@ ../App/Src/test.cpp:14:18:void testCan(CAN_HandleTypeDef*) 1 +../App/Src/test.cpp:49:18:void testCanMsg(CAN_HandleTypeDef*, uint8_t*) 1 +../App/Src/test.cpp:80:7:void unpackValues(uint8_t, uint8_t*, uint8_t*, uint8_t*, uint8_t*) 1 +../App/Src/test.cpp:87:10:uint8_t packValues(uint8_t, uint8_t, uint8_t, uint8_t) 1 diff --git a/Debug/App/Src/test.o b/Debug/App/Src/test.o index fc1ae9f..5eefe41 100644 Binary files a/Debug/App/Src/test.o and b/Debug/App/Src/test.o differ diff --git a/Debug/App/Src/test.su b/Debug/App/Src/test.su index 978d7ac..8cab856 100644 --- a/Debug/App/Src/test.su +++ b/Debug/App/Src/test.su @@ -1 +1,4 @@ -../App/Src/test.cpp:14:18:void testCan(CAN_HandleTypeDef*) 624 static +../App/Src/test.cpp:14:18:void testCan(CAN_HandleTypeDef*) 608 static +../App/Src/test.cpp:49:18:void testCanMsg(CAN_HandleTypeDef*, uint8_t*) 616 static +../App/Src/test.cpp:80:7:void unpackValues(uint8_t, uint8_t*, uint8_t*, uint8_t*, uint8_t*) 24 static +../App/Src/test.cpp:87:10:uint8_t packValues(uint8_t, uint8_t, uint8_t, uint8_t) 24 static diff --git a/Debug/Core/Src/main.cyclo b/Debug/Core/Src/main.cyclo index c9e806a..530be79 100644 --- a/Debug/Core/Src/main.cyclo +++ b/Debug/Core/Src/main.cyclo @@ -1,7 +1,7 @@ -../Core/Src/main.c:74:5:main 2 -../Core/Src/main.c:152:6:SystemClock_Config 3 -../Core/Src/main.c:198:13:MX_CAN1_Init 2 -../Core/Src/main.c:235:13:MX_UART4_Init 2 -../Core/Src/main.c:268:13:MX_GPIO_Init 1 -../Core/Src/main.c:315:6:HAL_CAN_RxFifo0MsgPendingCallback 1 -../Core/Src/main.c:332:6:Error_Handler 1 +../Core/Src/main.c:79:5:main 3 +../Core/Src/main.c:181:6:SystemClock_Config 3 +../Core/Src/main.c:227:13:MX_CAN1_Init 2 +../Core/Src/main.c:264:13:MX_UART4_Init 2 +../Core/Src/main.c:297:13:MX_GPIO_Init 1 +../Core/Src/main.c:344:6:HAL_CAN_RxFifo0MsgPendingCallback 1 +../Core/Src/main.c:373:6:Error_Handler 1 diff --git a/Debug/Core/Src/main.o b/Debug/Core/Src/main.o index 384a827..b9be503 100644 Binary files a/Debug/Core/Src/main.o and b/Debug/Core/Src/main.o differ diff --git a/Debug/Core/Src/main.su b/Debug/Core/Src/main.su index de7dda4..c6d3934 100644 --- a/Debug/Core/Src/main.su +++ b/Debug/Core/Src/main.su @@ -1,7 +1,7 @@ -../Core/Src/main.c:74:5:main 16 static -../Core/Src/main.c:152:6:SystemClock_Config 88 static -../Core/Src/main.c:198:13:MX_CAN1_Init 8 static -../Core/Src/main.c:235:13:MX_UART4_Init 8 static -../Core/Src/main.c:268:13:MX_GPIO_Init 48 static -../Core/Src/main.c:315:6:HAL_CAN_RxFifo0MsgPendingCallback 16 static -../Core/Src/main.c:332:6:Error_Handler 4 static,ignoring_inline_asm +../Core/Src/main.c:79:5:main 8 static +../Core/Src/main.c:181:6:SystemClock_Config 88 static +../Core/Src/main.c:227:13:MX_CAN1_Init 8 static +../Core/Src/main.c:264:13:MX_UART4_Init 8 static +../Core/Src/main.c:297:13:MX_GPIO_Init 48 static +../Core/Src/main.c:344:6:HAL_CAN_RxFifo0MsgPendingCallback 16 static +../Core/Src/main.c:373:6:Error_Handler 8 static,ignoring_inline_asm diff --git a/Debug/Core/Src/stm32f4xx_hal_msp.cyclo b/Debug/Core/Src/stm32f4xx_hal_msp.cyclo index 82a9ef0..ad44939 100644 --- a/Debug/Core/Src/stm32f4xx_hal_msp.cyclo +++ b/Debug/Core/Src/stm32f4xx_hal_msp.cyclo @@ -1,5 +1,5 @@ ../Core/Src/stm32f4xx_hal_msp.c:64:6:HAL_MspInit 1 ../Core/Src/stm32f4xx_hal_msp.c:86:6:HAL_CAN_MspInit 2 -../Core/Src/stm32f4xx_hal_msp.c:125:6:HAL_CAN_MspDeInit 2 -../Core/Src/stm32f4xx_hal_msp.c:156:6:HAL_UART_MspInit 2 -../Core/Src/stm32f4xx_hal_msp.c:192:6:HAL_UART_MspDeInit 2 +../Core/Src/stm32f4xx_hal_msp.c:127:6:HAL_CAN_MspDeInit 2 +../Core/Src/stm32f4xx_hal_msp.c:159:6:HAL_UART_MspInit 2 +../Core/Src/stm32f4xx_hal_msp.c:195:6:HAL_UART_MspDeInit 2 diff --git a/Debug/Core/Src/stm32f4xx_hal_msp.o b/Debug/Core/Src/stm32f4xx_hal_msp.o index 1016e7e..5306db2 100644 Binary files a/Debug/Core/Src/stm32f4xx_hal_msp.o and b/Debug/Core/Src/stm32f4xx_hal_msp.o differ diff --git a/Debug/Core/Src/stm32f4xx_hal_msp.su b/Debug/Core/Src/stm32f4xx_hal_msp.su index 5f2442a..4b1f979 100644 --- a/Debug/Core/Src/stm32f4xx_hal_msp.su +++ b/Debug/Core/Src/stm32f4xx_hal_msp.su @@ -1,5 +1,5 @@ ../Core/Src/stm32f4xx_hal_msp.c:64:6:HAL_MspInit 16 static ../Core/Src/stm32f4xx_hal_msp.c:86:6:HAL_CAN_MspInit 48 static -../Core/Src/stm32f4xx_hal_msp.c:125:6:HAL_CAN_MspDeInit 16 static -../Core/Src/stm32f4xx_hal_msp.c:156:6:HAL_UART_MspInit 48 static -../Core/Src/stm32f4xx_hal_msp.c:192:6:HAL_UART_MspDeInit 16 static +../Core/Src/stm32f4xx_hal_msp.c:127:6:HAL_CAN_MspDeInit 16 static +../Core/Src/stm32f4xx_hal_msp.c:159:6:HAL_UART_MspInit 48 static +../Core/Src/stm32f4xx_hal_msp.c:195:6:HAL_UART_MspDeInit 16 static diff --git a/Debug/Core/Src/stm32f4xx_it.cyclo b/Debug/Core/Src/stm32f4xx_it.cyclo index ba9f3c5..7f6fb32 100644 --- a/Debug/Core/Src/stm32f4xx_it.cyclo +++ b/Debug/Core/Src/stm32f4xx_it.cyclo @@ -8,3 +8,4 @@ ../Core/Src/stm32f4xx_it.c:170:6:PendSV_Handler 1 ../Core/Src/stm32f4xx_it.c:183:6:SysTick_Handler 1 ../Core/Src/stm32f4xx_it.c:204:6:CAN1_RX0_IRQHandler 1 +../Core/Src/stm32f4xx_it.c:218:6:CAN1_RX1_IRQHandler 1 diff --git a/Debug/Core/Src/stm32f4xx_it.o b/Debug/Core/Src/stm32f4xx_it.o index df2c037..ce497a4 100644 Binary files a/Debug/Core/Src/stm32f4xx_it.o and b/Debug/Core/Src/stm32f4xx_it.o differ diff --git a/Debug/Core/Src/stm32f4xx_it.su b/Debug/Core/Src/stm32f4xx_it.su index 3b4c4e9..2a2d6e7 100644 --- a/Debug/Core/Src/stm32f4xx_it.su +++ b/Debug/Core/Src/stm32f4xx_it.su @@ -8,3 +8,4 @@ ../Core/Src/stm32f4xx_it.c:170:6:PendSV_Handler 4 static ../Core/Src/stm32f4xx_it.c:183:6:SysTick_Handler 8 static ../Core/Src/stm32f4xx_it.c:204:6:CAN1_RX0_IRQHandler 8 static +../Core/Src/stm32f4xx_it.c:218:6:CAN1_RX1_IRQHandler 8 static diff --git a/Debug/Core/Src/system_stm32f4xx.o b/Debug/Core/Src/system_stm32f4xx.o index c5140f0..40aaae2 100644 Binary files a/Debug/Core/Src/system_stm32f4xx.o and b/Debug/Core/Src/system_stm32f4xx.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o index 2c9b967..c5e063c 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.o index 93540a2..c59d8e2 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o index 88d9b23..1a50f84 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o index afc119b..1a9f627 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o index 0f4bc9a..af9b81c 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o index 1376790..be43c67 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o index 8516ce7..1568d75 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o index 3ff6557..dfb497a 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o index 8b538dd..8734093 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o index 48bb89d..4133d91 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o index 6f88330..8c545ec 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o index 7f2b867..08bcde1 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o index 4ba53bd..33de621 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o index 58d33fb..e50e0a5 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o differ diff --git a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o index 5a16751..a84311c 100644 Binary files a/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o and b/Debug/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/adc.o b/Debug/Libs/sta-core/src/devices/stm32/adc.o index f9b5fa3..1affeec 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/adc.o and b/Debug/Libs/sta-core/src/devices/stm32/adc.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/bus/i2c.o b/Debug/Libs/sta-core/src/devices/stm32/bus/i2c.o index da81bed..d9f47e7 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/bus/i2c.o and b/Debug/Libs/sta-core/src/devices/stm32/bus/i2c.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/bus/spi.o b/Debug/Libs/sta-core/src/devices/stm32/bus/spi.o index 28cd5fa..00ef8b9 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/bus/spi.o and b/Debug/Libs/sta-core/src/devices/stm32/bus/spi.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/bus/uart.o b/Debug/Libs/sta-core/src/devices/stm32/bus/uart.o index 7071de6..f087fef 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/bus/uart.o and b/Debug/Libs/sta-core/src/devices/stm32/bus/uart.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/can.cyclo b/Debug/Libs/sta-core/src/devices/stm32/can.cyclo index 42ccf5d..7b3d3b3 100644 --- a/Debug/Libs/sta-core/src/devices/stm32/can.cyclo +++ b/Debug/Libs/sta-core/src/devices/stm32/can.cyclo @@ -4,14 +4,14 @@ ../Libs/sta-core/src/devices/stm32/can.cpp:25:10:void sta::STM32CanController::start() 1 ../Libs/sta-core/src/devices/stm32/can.cpp:30:10:void sta::STM32CanController::stop() 1 ../Libs/sta-core/src/devices/stm32/can.cpp:36:10:virtual bool sta::STM32CanController::sendFrame(const sta::CanTxHeader&, const uint8_t*) 3 -../Libs/sta-core/src/devices/stm32/can.cpp:61:10:virtual bool sta::STM32CanController::receiveFrame(uint8_t, sta::CanRxHeader*, uint8_t*) 3 -../Libs/sta-core/src/devices/stm32/can.cpp:92:14:virtual uint32_t sta::STM32CanController::getRxFifoFlags() 2 -../Libs/sta-core/src/devices/stm32/can.cpp:100:10:virtual void sta::STM32CanController::configureFilter(uint8_t, const sta::CanFilter&, bool) 3 -../Libs/sta-core/src/devices/stm32/can.cpp:125:10:virtual void sta::STM32CanController::enableFilter(uint8_t) 1 -../Libs/sta-core/src/devices/stm32/can.cpp:134:10:virtual void sta::STM32CanController::disableFilter(uint8_t) 1 -../Libs/sta-core/src/devices/stm32/can.cpp:143:10:virtual void sta::STM32CanController::clearFilters() 3 -../Libs/sta-core/src/devices/stm32/can.cpp:159:10:void sta::STM32CanController::initFilters() 2 -../Libs/sta-core/src/devices/stm32/can.cpp:173:13:virtual uint8_t sta::STM32CanController::maxFilterCount() const 1 -../Libs/sta-core/src/devices/stm32/can.cpp:176:13:virtual uint8_t sta::STM32CanController::maxFifoCount() const 1 -../Libs/sta-core/src/devices/stm32/can.cpp:179:13:virtual uint8_t sta::STM32CanController::maxPayloadSize() const 1 -../Libs/sta-core/src/devices/stm32/can.cpp:184:23:virtual sta::CanPendingRxFifos sta::STM32CanController::getPendingRxFifos() 1 +../Libs/sta-core/src/devices/stm32/can.cpp:60:10:virtual bool sta::STM32CanController::receiveFrame(uint8_t, sta::CanRxHeader*, uint8_t*) 3 +../Libs/sta-core/src/devices/stm32/can.cpp:91:14:virtual uint32_t sta::STM32CanController::getRxFifoFlags() 2 +../Libs/sta-core/src/devices/stm32/can.cpp:99:10:virtual void sta::STM32CanController::configureFilter(uint8_t, const sta::CanFilter&, bool) 3 +../Libs/sta-core/src/devices/stm32/can.cpp:124:10:virtual void sta::STM32CanController::enableFilter(uint8_t) 1 +../Libs/sta-core/src/devices/stm32/can.cpp:133:10:virtual void sta::STM32CanController::disableFilter(uint8_t) 1 +../Libs/sta-core/src/devices/stm32/can.cpp:142:10:virtual void sta::STM32CanController::clearFilters() 3 +../Libs/sta-core/src/devices/stm32/can.cpp:158:10:void sta::STM32CanController::initFilters() 2 +../Libs/sta-core/src/devices/stm32/can.cpp:172:23:virtual sta::CanPendingRxFifos sta::STM32CanController::getPendingRxFifos() 1 +../Libs/sta-core/src/devices/stm32/can.cpp:182:13:virtual uint8_t sta::STM32CanController::maxFilterCount() const 1 +../Libs/sta-core/src/devices/stm32/can.cpp:186:13:virtual uint8_t sta::STM32CanController::maxFifoCount() const 1 +../Libs/sta-core/src/devices/stm32/can.cpp:190:13:virtual uint8_t sta::STM32CanController::maxPayloadSize() const 1 diff --git a/Debug/Libs/sta-core/src/devices/stm32/can.o b/Debug/Libs/sta-core/src/devices/stm32/can.o index b9a3954..94fefb8 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/can.o and b/Debug/Libs/sta-core/src/devices/stm32/can.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/can.su b/Debug/Libs/sta-core/src/devices/stm32/can.su index 05517e6..586dc7a 100644 --- a/Debug/Libs/sta-core/src/devices/stm32/can.su +++ b/Debug/Libs/sta-core/src/devices/stm32/can.su @@ -4,14 +4,14 @@ ../Libs/sta-core/src/devices/stm32/can.cpp:25:10:void sta::STM32CanController::start() 16 static ../Libs/sta-core/src/devices/stm32/can.cpp:30:10:void sta::STM32CanController::stop() 16 static ../Libs/sta-core/src/devices/stm32/can.cpp:36:10:virtual bool sta::STM32CanController::sendFrame(const sta::CanTxHeader&, const uint8_t*) 56 static -../Libs/sta-core/src/devices/stm32/can.cpp:61:10:virtual bool sta::STM32CanController::receiveFrame(uint8_t, sta::CanRxHeader*, uint8_t*) 56 static -../Libs/sta-core/src/devices/stm32/can.cpp:92:14:virtual uint32_t sta::STM32CanController::getRxFifoFlags() 24 static -../Libs/sta-core/src/devices/stm32/can.cpp:100:10:virtual void sta::STM32CanController::configureFilter(uint8_t, const sta::CanFilter&, bool) 32 static -../Libs/sta-core/src/devices/stm32/can.cpp:125:10:virtual void sta::STM32CanController::enableFilter(uint8_t) 24 static -../Libs/sta-core/src/devices/stm32/can.cpp:134:10:virtual void sta::STM32CanController::disableFilter(uint8_t) 24 static -../Libs/sta-core/src/devices/stm32/can.cpp:143:10:virtual void sta::STM32CanController::clearFilters() 24 static -../Libs/sta-core/src/devices/stm32/can.cpp:159:10:void sta::STM32CanController::initFilters() 24 static -../Libs/sta-core/src/devices/stm32/can.cpp:173:13:virtual uint8_t sta::STM32CanController::maxFilterCount() const 16 static -../Libs/sta-core/src/devices/stm32/can.cpp:176:13:virtual uint8_t sta::STM32CanController::maxFifoCount() const 16 static -../Libs/sta-core/src/devices/stm32/can.cpp:179:13:virtual uint8_t sta::STM32CanController::maxPayloadSize() const 16 static -../Libs/sta-core/src/devices/stm32/can.cpp:184:23:virtual sta::CanPendingRxFifos sta::STM32CanController::getPendingRxFifos() 16 static +../Libs/sta-core/src/devices/stm32/can.cpp:60:10:virtual bool sta::STM32CanController::receiveFrame(uint8_t, sta::CanRxHeader*, uint8_t*) 56 static +../Libs/sta-core/src/devices/stm32/can.cpp:91:14:virtual uint32_t sta::STM32CanController::getRxFifoFlags() 24 static +../Libs/sta-core/src/devices/stm32/can.cpp:99:10:virtual void sta::STM32CanController::configureFilter(uint8_t, const sta::CanFilter&, bool) 32 static +../Libs/sta-core/src/devices/stm32/can.cpp:124:10:virtual void sta::STM32CanController::enableFilter(uint8_t) 24 static +../Libs/sta-core/src/devices/stm32/can.cpp:133:10:virtual void sta::STM32CanController::disableFilter(uint8_t) 24 static +../Libs/sta-core/src/devices/stm32/can.cpp:142:10:virtual void sta::STM32CanController::clearFilters() 24 static +../Libs/sta-core/src/devices/stm32/can.cpp:158:10:void sta::STM32CanController::initFilters() 24 static +../Libs/sta-core/src/devices/stm32/can.cpp:172:23:virtual sta::CanPendingRxFifos sta::STM32CanController::getPendingRxFifos() 16 static +../Libs/sta-core/src/devices/stm32/can.cpp:182:13:virtual uint8_t sta::STM32CanController::maxFilterCount() const 16 static +../Libs/sta-core/src/devices/stm32/can.cpp:186:13:virtual uint8_t sta::STM32CanController::maxFifoCount() const 16 static +../Libs/sta-core/src/devices/stm32/can.cpp:190:13:virtual uint8_t sta::STM32CanController::maxPayloadSize() const 16 static diff --git a/Debug/Libs/sta-core/src/devices/stm32/delay.o b/Debug/Libs/sta-core/src/devices/stm32/delay.o index 42c9c51..edf6d69 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/delay.o and b/Debug/Libs/sta-core/src/devices/stm32/delay.o differ diff --git a/Debug/Libs/sta-core/src/devices/stm32/gpio_pin.o b/Debug/Libs/sta-core/src/devices/stm32/gpio_pin.o index 9841557..5c23ba3 100644 Binary files a/Debug/Libs/sta-core/src/devices/stm32/gpio_pin.o and b/Debug/Libs/sta-core/src/devices/stm32/gpio_pin.o differ diff --git a/Debug/makefile b/Debug/makefile index f6e1b1a..b20416d 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -38,6 +38,9 @@ endif ifneq ($(strip $(C++_DEPS)),) -include $(C++_DEPS) endif +ifneq ($(strip $(CCM_DEPS)),) +-include $(CCM_DEPS) +endif ifneq ($(strip $(C_UPPER_DEPS)),) -include $(C_UPPER_DEPS) endif @@ -50,6 +53,12 @@ endif ifneq ($(strip $(S_UPPER_DEPS)),) -include $(S_UPPER_DEPS) endif +ifneq ($(strip $(CXXM_DEPS)),) +-include $(CXXM_DEPS) +endif +ifneq ($(strip $(C++M_DEPS)),) +-include $(C++M_DEPS) +endif ifneq ($(strip $(C_DEPS)),) -include $(C_DEPS) endif diff --git a/Debug/sources.mk b/Debug/sources.mk index d596482..ce43c03 100644 --- a/Debug/sources.mk +++ b/Debug/sources.mk @@ -3,21 +3,26 @@ # Toolchain: GNU Tools for STM32 (11.3.rel1) ################################################################################ +C++M_SRCS := +CPP_SRCS := +S_UPPER_SRCS := +O_SRCS := ELF_SRCS := C_UPPER_SRCS := CXX_SRCS := +CCM_SRCS := C++_SRCS := OBJ_SRCS := S_SRCS := CC_SRCS := C_SRCS := -CPP_SRCS := -S_UPPER_SRCS := -O_SRCS := +CXXM_SRCS := CYCLO_FILES := OBJDUMP_LIST := +CCM_DEPS := C_UPPER_DEPS := S_DEPS := +CXXM_DEPS := C_DEPS := CC_DEPS := SIZE_OUTPUT := @@ -28,6 +33,7 @@ OBJS := CXX_DEPS := MAP_FILES := S_UPPER_DEPS := +C++M_DEPS := CPP_DEPS := # Every subdirectory with source files must be described here