1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

STM32F411 fix to DCC period

This commit is contained in:
pmantoine 2022-08-09 12:28:15 +08:00
parent f56e3bec9e
commit c9612984e8
2 changed files with 13 additions and 13 deletions

View File

@ -51,7 +51,7 @@ void DCCTimer::begin(INTERRUPT_CALLBACK callback) {
timer.pause(); timer.pause();
timer.setPrescaleFactor(1); timer.setPrescaleFactor(1);
// timer.setOverflow(CLOCK_CYCLES * 2); // timer.setOverflow(CLOCK_CYCLES * 2);
timer.setOverflow(DCC_SIGNAL_TIME * 2, MICROSEC_FORMAT); timer.setOverflow(DCC_SIGNAL_TIME, MICROSEC_FORMAT);
timer.attachInterrupt(Timer1_Handler); timer.attachInterrupt(Timer1_Handler);
timer.refresh(); timer.refresh();
timer.resume(); timer.resume();

View File

@ -37,7 +37,7 @@ framework = arduino
upload_protocol = sam-ba upload_protocol = sam-ba
lib_deps = ${env.lib_deps} lib_deps = ${env.lib_deps}
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -std=c++17 build_flags = -std=c++17
[env:samd21-zero-usb] [env:samd21-zero-usb]
@ -47,7 +47,7 @@ framework = arduino
upload_protocol = sam-ba upload_protocol = sam-ba
lib_deps = ${env.lib_deps} lib_deps = ${env.lib_deps}
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -std=c++17 build_flags = -std=c++17
[env:samc21-firebox] [env:samc21-firebox]
@ -59,7 +59,7 @@ lib_deps =
${env.lib_deps} ${env.lib_deps}
SparkFun External EEPROM Arduino Library SparkFun External EEPROM Arduino Library
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -std=c++17 build_flags = -std=c++17
[env:mega2560-debug] [env:mega2560-debug]
@ -71,7 +71,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -DDIAG_IO -DDIAG_LOOPTIMES build_flags = -DDIAG_IO -DDIAG_LOOPTIMES
[env:mega2560-no-HAL] [env:mega2560-no-HAL]
@ -83,7 +83,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -DIO_NO_HAL build_flags = -DIO_NO_HAL
[env:mega2560-I2C-wire] [env:mega2560-I2C-wire]
@ -95,7 +95,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = -DI2C_USE_WIRE build_flags = -DI2C_USE_WIRE
[env:mega2560] [env:mega2560]
@ -107,7 +107,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
[env:mega328] [env:mega328]
platform = atmelavr platform = atmelavr
@ -118,7 +118,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
[env:unowifiR2] [env:unowifiR2]
platform = atmelmegaavr platform = atmelmegaavr
@ -129,7 +129,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
build_flags = "-DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200" build_flags = "-DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO_WIFI_DEV_ED -DARDUINO_ARCH_AVR -DESP_CH_UART -DESP_CH_UART_BR=19200"
[env:nanoevery] [env:nanoevery]
@ -141,7 +141,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
upload_speed = 19200 upload_speed = 19200
build_flags = -DDIAG_IO build_flags = -DDIAG_IO
@ -154,7 +154,7 @@ lib_deps =
arduino-libraries/Ethernet arduino-libraries/Ethernet
SPI SPI
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
[env:nano] [env:nano]
platform = atmelavr platform = atmelavr
@ -163,7 +163,7 @@ board_upload.maximum_size = 32256
framework = arduino framework = arduino
lib_deps = ${env.lib_deps} lib_deps = ${env.lib_deps}
monitor_speed = 115200 monitor_speed = 115200
monitor_flags = --echo monitor_echo = yes
[env:ESP32] [env:ESP32]
platform = espressif32 platform = espressif32