* workaround for failing flash writes
* Root cause fix for EEPROM emulation on STM32
* Oops, remove some debugging functions.
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
* Add eeprom reset with key
* small improvements
* increased robustness against accidental erase of EEPROM.
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
* Added PWM Fan functionality
PWM Fan output for Teensy and STM32
* Teensy3.5 timer fix for PWM Fan.
* Fix the conflicts with incorporate AFR
* Possibility to use PWM fan on mega too
Not tested at this stage!! Do not merge yet.
* Fix log entry size
* Remove duplicate stuff and use same way off toggling fan
* Fix typo errors
* Move fan pin definitions to globals.h
* Fix problems related to PWM fan.
* Revert previous change.
* Fix problems with idle things
* fix idle duty getting stuck at 100%
* Revert "fix idle duty getting stuck at 100%"
This reverts commit 7e9779483b.
* Revert "Fix problems with idle things"
This reverts commit 8bccb56d9a.
* Revert "Revert previous change."
This reverts commit fcb962864a.
* Remove mega support
* fixes
* more fixes
* moar fixes
* Should be working now
* Update speeduino.ini
* Lots of tweaking
* Update to work better with current FW
* Fix compiler warnings and include update things.
* Minor fixes
* Update logger.ino
* Fan duty working on mega too and fan output will be on/off
Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
* refactor: use a loop for writeAllConfig.
Future proofing: new pages will get automatically
written
* Call existing [read|store]EEPROMVersion functions
* Common function to compute CRC address
* Bulk write calibration tables
* Use EEPROM get/put instead of hand rolled code
* Typedef the EEPROM address
I.e. the EEPROM.read() parameter type
* Encapsulate eepromWritesPending
* Remove C++ namespaces
* Use table iterators for read/write
* Rename storage.ino to .cpp
This fixes a warning
* fix!: fix ODR violations
* refactor: move page specific code into a separate CPP file
* refactor: page getter/setter share mapping logic
Extract common page-to-entity mapping logic from
getPageValue() & setPageValue() - place in map_page_offset_to_entity()
and share.
* performance: optimize CRC calc
Calculate page CRC by iterating over entities & tables.
* CRC table calculation - use table iterator
* refactor: use iterators for sendPage()
Re-implement sendPage() using page & table iterators
Future proof & fast
* refactor: sendPageASCII()
Pull put shared code into functions.
Use table iterator
* refactor: use shared axis factor
This puts the axis factor usage in one place
* refactor: encapsulate page size & count
Added getPageCount() & getPageSize()
* Added static_assert for all pages.
* Remove C++ language elements
namesapces, scope resolution, enum struct
* Rename comms.ino to comms.cpp
Provides better encapsulation of non-global
data & functions.
INO files are all mashed together by some
custom process. So everything becomes global and
static functions/variables aren't really private to
the translation unit. Thus breaking encapsulation :-(
* STM32 fixes and tweaks
Removed generic STM32F103 options from PlatformIO
Added optional serial compilations on PlatforIO
Make sure all timers are stoped at boot
Small speed improve at SPIasEEPROM
Added timers usage table to board_stm32_official.h
* Added base board
* fix building for STM32F401CC and general macro cleanup
* Now building for all generic STM32F4x7 boards in arduino IDE is ok.
* buildflag cleanup
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
* STM32 jump to DFU
This enable jumping to hardware bootloader with software command.
Based on @iLeeeZi previous work.
Co-Authored-By: iLeeeZi <3372213+iLeeeZi@users.noreply.github.com>
Co-Authored-By: Pasi Kemppainen <48950874+pazi88@users.noreply.github.com>
* lowercase functions fixes
Co-authored-by: iLeeeZi <3372213+iLeeeZi@users.noreply.github.com>
Co-authored-by: Pasi Kemppainen <48950874+pazi88@users.noreply.github.com>
* Added pinIsReserved macro
Function used to don't initialize reserved pins such as USB on ARM boards, each pin must be defined on board.h file
* Update board_teensy35.h
Include Serial and CAN0 pins
* CAN-bus library for STM32
This adds CAN-bus library for STM32. Mainly for STM32F4, but others can be added later.
* CAN2 and F446 support added for STM32 CAN library
Adds support for second can interface and F446 bit timings.
* Fix STM32 CAN pin selection and STM32F1 support
The previous way to select CAN pins wasn't actually working, so this fixes that problem and also the F1 support too.
* Fix building for Mega/Teensy
* Update cancomms.ino
* Update speeduino.ino
Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
* Fix building for FRAM with globals.h setting
On request of vitor boss. A lot has been changed around to make the selection of EEPROM emulation type from the globals.h (including FRAM selection)
* Add support for EEPROM emulation on internal flash of STM32F7
* Updates on SPI Flash EEPROM
* Fix building for BACKUPSRAM as EEPROM.
* Add put() and get() functions to the EEPROM emulation. This is needed for the latest terminstor and other calibrations routines
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
* Fixed 32 bit timers again
* Set the battery voltage to a default value when board starts. So before a sensible value is read this is 0. The dwell correction is creating the ignition spurious pulses direct after reset of the board. (When "flying start" the engine)
* Added new Flash EEPROM emulation
# Conflicts:
# platformio.ini
# speeduino/board_stm32_official.ino
# speeduino/init.ino
# speeduino/src/SPIAsEEPROM/SPIAsEEPROM.cpp
# speeduino/src/SPIAsEEPROM/SPIAsEEPROM.h
* changes to storage to make SPI flash work again
* cleanup
* fix building with spi flash as config storage
* Fixing build with spi flash as EEPROM. Changed some pin numbers to match the board i am designing and testing now.
* Now cs pin for spi eeprom is settable by flag in build enviroment.
* Correct overflow for 32bit timers
* fix pins PA0-PA5 on some f407 boards
* Enable access to SRAM Backup domain at boot
* Add missing callback functions
* Change timer resolutions. Corrects idle/aux timer frequencies
* 32 bit overflow only for STM32F4
* Update platformio.ini
debug tool added as default
* fix building with spi flash as config storage
* Fixing build with spi flash as EEPROM. Changed some pin numbers to match the board i am designing and testing now.
* Now cs pin for spi eeprom is settable by flag in build enviroment.
* Update platformio.ini
debug tool added as default
* Update cancomms.ino
Removed CAN build on black_F407VE for now. It needs fixing the build fails otherwise.
Co-authored-by: hoogendijkta <tjeerdie@users.noreply.github.com>
Co-authored-by: iLeeeZi <ilari.vehniainen@hotmail.fi>
* Some Fixes to work
* Fix BluePill
* Remove libmaple defs
* STM32 Timers rework
* GCC9 Fix
* BlackPill update
* Disable FRAM as default for STM32
* STM32 storage options for all cores
* STM32 fixes 2
* Update FRAM lib
* Some Fixes to work
* Fix BluePill
* Remove libmaple defs
* STM32 Timers rework
* GCC9 Fix
* BlackPill update
* Disable FRAM as default for STM32
* STM32 storage options for all cores