We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62ab432 commit d7f49f7Copy full SHA for d7f49f7
1 file changed
samples/canopen/canopen_sample/main.cpp
@@ -50,8 +50,18 @@ int main() {
50
// Initialize system
51
core::platform::init();
52
53
+ // Initialize a configuration object for the timer.
54
+ dev::TimerConfiguration configuration = {
55
+ TIM_COUNTERMODE_UP,
56
+ TIM_CLOCKDIVISION_DIV1,
57
+ TIM_AUTORELOAD_PRELOAD_ENABLE,
58
+ TIM_CLOCKSOURCE_INTERNAL,
59
+ TIM_TRGO_RESET,
60
+ TIM_MASTERSLAVEMODE_DISABLE
61
+ };
62
+
63
// Initialize the timer
- dev::Timer& timer = dev::getTimer<dev::MCUTimer::Timer2>(100);
64
+ dev::Timer& timer = dev::getTimer<dev::MCUTimer::Timer2>(100, configuration);
65
66
// UART for testing
67
io::UART& uart = io::getUART<io::Pin::UART_TX, io::Pin::UART_RX>(9600);
0 commit comments