Marlin_Firmware/Marlin
victorpv a5150c83a2 [2.0.x] Multiple updates to STM32F1 HAL (#8733)
* STM32F1 HAL

Adding files for STM32F1 HAL based on libmaple/stm32duino core.
Current persistent_store uses cardreader changes to be sent in separate
commit, but could be changed to use i2c eeprom.
There is another persistent_store implementation that uses the MCU flash memory
to emulate eeprom
Adding readme with some information about the stm32 HAL.

* Switch to Timer4 to avoid a hard reset on STM32F103C6 boards

On bluepill STM32F103C6 boards, using Timer5 results in a error() vector call. Switch to 4 since these are both general purpose, 16 bit timers.

* Add support for EEPROM emulation using Flash

Some low end machines doe not have EEPROM support. Simulate it using the last two pages of flash. Flash does not allow rewrite between erases, so skip writing the working version if that's enabled.

* Basic Pins for a malyan M200

This is a work in progress to go hand in hand with the STM32 work.

* Add support for ADC with DMA. This work has exposed a problem with the pin enumerations in STM boards vs what marlin expects (i.e, try defining PA0 as a temp pin). The hack can be removed with we go to fastio completely. To see this work, set something in adc_pins to a value like PA0 and connect your pullup resistor'd thermistor.

* Missing file - change HAL_adc_init to actually do something

We have an actual ADC init function now.

* Remove pinmode hack

Remove the pin mode hack that I was using to init PA0.

Updated Readme.md

* Several changes to timers and GPIO

Faster GPIO, and faster timer functions by accesing registers and
libmaple.
Still more changes pending for the Timer's code to skip using the
HardwareTimer class altogether.

Switch all enums to be within #defines

This change allows a user to have, for instance, TEMP_4 and TEMP_BED definied but nothing else. The enums which are not defined move "out", allowing the first ones to take the slots in the enum, and since the array is sized on ADC_PIN_COUNT, we always have the right size data and in order.

* Update Malyan M200 pins

Update Malyan M200 pins with correct fan values.

* Test all pins on actual hardware, update definitions

Some of the pin definitions were from knowlege base/pdfs. Now they've been tested against actual hardware. This should be very close to final.

* Update HAL_timers_Stm32f1.cpp

* Add sample configurations for Malyan M200

Add sample configuration for Malyan M200 without bed leveling, and move fan to auto cool E0 since this printer by default has only one fan.


Choose the timer based on MCU defintion. Timer5 is not valid on C8/CB class boards, so use Timer4 for the step timer.


readme.md update

* Updates to timers, and some stm32 boards definitiions

* Correct pin toggle macro.

* Remove duplicated Malyan M200 entry from pins.h

* Update configuration_store.cpp

* Formatting, indentation

* Formatting in HAL_Stm32f1.cpp
2017-12-10 23:12:45 -06:00
..
lib Module updates 2017-09-21 16:26:42 -05:00
src [2.0.x] Multiple updates to STM32F1 HAL (#8733) 2017-12-10 23:12:45 -06:00
Configuration_adv.h PROBE_DOUBLE_TOUCH => MULTIPLE_PROBING 2017-12-07 16:44:13 -06:00
Configuration.h Shorter segments may be better 2017-12-09 06:29:14 -06:00
Marlin.ino [2.0.x] UltiMachine Archim2 (#8190) 2017-11-03 04:48:15 -05:00
README.h Add a README.h file for Arduino IDE users 2017-10-11 18:10:15 -05:00

/*
================================================================================

  Marlin Firmware

  (c) 2011-2017 MarlinFirmware
  Portions of Marlin are (c) by their respective authors.
  All code complies with GPLv2 and/or GPLv3

================================================================================

Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.

To configure Marlin you must edit Configuration.h and Configuration_adv.h
located in the root 'Marlin' folder. Check the config/examples folder to see if
there's a more suitable starting-point for your specific hardware.

Before diving in, we recommend the following essential links:

Marlin Firmware Official Website

  - http://marlinfw.org/
    The official Marlin Firmware website contains the most up-to-date
    documentation. Contributions are always welcome!

Configuration

  - https://www.youtube.com/watch?v=3gwWVFtdg-4
    A good 20-minute overview of Marlin configuration by Tom Sanladerer.
    (Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
    Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin

  - http://marlinfw.org/docs/configuration/configuration.html
    Marlin's configuration options are explained in more detail here.

Getting Help

  - http://forums.reprap.org/list.php?415
    The Marlin Discussion Forum is a great place to get help from other Marlin
    users who may have experienced similar issues to your own.

  - https://github.com/MarlinFirmware/Marlin/issues
    With a free GitHub account you can provide us with feedback, bug reports,
    and feature requests via the Marlin Issue Queue.

Contributing

  - http://marlinfw.org/docs/development/contributing.html
    If you'd like to contribute to Marlin, read this first!

  - http://marlinfw.org/docs/development/coding_standards.html
    Before submitting code get to know the Coding Standards.
*/