Hi,
I'm trying to get CAN working, and I ran into this error:
'Can1' is not a member of 'xpcc::stm32::SystemClock<...>'
As a reminder, I'm using the feature/stm32f103_support_experimental branch, which is using the experimentel system_clock branch, so that may be the problem.
[…]
Recompile and it should just automagically work.
Yeah, probably not. CAN needs very accurate prescaler settings for BS1, BS2. Kevin has added some more frequency values lately, so I’ve merged the develop branch into the feature/stm32f103 branch. Still, only 8, 30, 36, 42 and 48 MHz input frequencies are accepted, with 36MHz being the maximum for the APB1 domain. https://github.com/salkinium/xpcc/blob/feature/stm32f103_support_experimenta... You’ll have to configure your PLL and APB1 Prescaler to generate one of those frequencies. I think you said you run at 48MHz? That would mean 24MHz for APB1 (because divided by 2 so you get less than 36MHz). So you need to calculate BS1 and BS2 values for 24MHz. (Or drop CPU frequency to 36MHz with APB1 Prescaler of 1. Don’t do that, that’s stupid). Niklas