Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

STM32F105RBT6 -> No interrupt from CAN2

Status
Not open for further replies.

HitTive

Newbie level 3
Joined
Oct 12, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
Hi, I have a problem. I can transmit data with Can2 but input data isnt generate any interrupt. I use a HAL libraries. I can see a correct input data in CAN_RDL0R and CAN_RDH0R register. CAN1 work properly.

Code:
CAN1 and CAN2 configuration code:
if (_hCANx == &hcan1) {
		CAN_FilterConfTypeDef filter;

		filter.FilterNumber = 0;
		filter.FilterMode = CAN_FILTERMODE_IDMASK;
		filter.FilterScale = CAN_FILTERSCALE_32BIT;
		filter.FilterIdHigh = 0x0000;
		filter.FilterIdLow = 0x0000;
		filter.FilterMaskIdHigh = 0x0000;
		filter.FilterMaskIdLow = 0x0000;
		filter.FilterFIFOAssignment = CAN_FILTER_FIFO0;
		filter.FilterActivation = ENABLE;
		filter.BankNumber = 0;
		HAL_CAN_ConfigFilter(&hcan1, &filter);

		HAL_CAN_Receive_IT(&hcan1, CAN_FIFO0);

		_Status |= CAN_INITIATED;

		return 0;
	} else if (_hCANx == &hcan2) {
		CAN_FilterConfTypeDef filter;

		filter.FilterNumber = 14;
		filter.FilterMode = CAN_FILTERMODE_IDMASK;
		filter.FilterScale = CAN_FILTERSCALE_32BIT;
		filter.FilterIdHigh = 0x0000;
		filter.FilterIdLow = 0x0000;
		filter.FilterMaskIdHigh = 0x0000;
		filter.FilterMaskIdLow = 0x0000;
		filter.FilterFIFOAssignment = CAN_FILTER_FIFO1;
		filter.BankNumber = 14;
		filter.FilterActivation = ENABLE;
		HAL_CAN_ConfigFilter(&hcan2, &filter);

		HAL_CAN_Receive_IT(&hcan2, CAN_FIFO1);

		_Status |= CAN_INITIATED;

		return 0;
	}

and rest configuration od CAN2 is the same like CAN1 (without GPIO of course)
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top