Commit Graph

11 Commits

Author SHA1 Message Date
Nico Tonnhofer a1cca9bdad arduino_stm32: correct channel for pwm 2017-04-03 23:07:17 +02:00
Nico Tonnhofer dcd67e402a STM32F411: rework serial-stuff.
Simplify changing the USART for debug or serial output.
Implement all 3 USARTs for the stm32f411re.
2017-03-05 15:00:13 +01:00
Nico Tonnhofer 230572b1d0 STM32F411: simplify cmsis files for stm32f411
Delete some macros from cmsis-file we will never use again.
Also replace magic numbers.
Add missing flag to allow -O0 (using R7 as register)
2017-03-05 15:00:12 +01:00
Nico Tonnhofer aeb98b557b STM32F411: cleanup code with using pinio.h macros. 2017-03-03 18:54:57 +01:00
Nico Tonnhofer afc4c3e8e4 STM32F411: Allow non-PWM pins as heater output. 2017-03-03 18:54:57 +01:00
Nico Tonnhofer df78b8d826 STM32F411: implement heater-stm32.c partially.
Like Traumflugs implementation at a fixed frequency of 1kHz and a fixed duty
cycle of 10%.
2017-03-03 18:54:57 +01:00
Nico Tonnhofer 4cb6f85e3c STM32F411: implement analog-stm32.c
It's not that easy like LPC. We need later an DMA to control all ADCs, because there is only one register to read the ADC.
2017-03-03 18:54:57 +01:00
Nico Tonnhofer a798cfac34 STM32F411: get timer.c in, so far only with the system clock.
This test code in SysTickHandler() should give you a rather
accurate clock with only a few seconds deviation per hour:

  #include "serial.h"
  #include "sersendf.h"
  void SysTick_Handler(void) {
    static uint32_t count = 0;
    static uint8_t minutes = 0, seconds = 0;

    count++;

    if ( ! (count % 500)) {   // A full second.
      seconds++;
      if ( ! (seconds % 60)) {
        seconds = 0;
        minutes++;
      }
      sersendf_P(PSTR("%su:"), minutes);
      if (seconds < 10)
        serial_writechar('0');
      sersendf_P(PSTR("%su\n"), seconds);
    }
  [...]
2017-03-03 18:54:56 +01:00
Nico Tonnhofer 7dd657d56a STM32F411: rename mbed-stm32f4xx.h to cmsis-stm32f4xx.h.
Part of the effort to rename all CMSIS-provided files to "cmsis-".
2017-03-03 18:54:56 +01:00
Nico Tonnhofer a890fecc6d STM32F411: use arduino.h for UART pinout.
delete 11 mbed-files
    SIZES          ARM...     stm32f411
    FLASH  :  3124 bytes           1%
    RAM    :   212 bytes           1%
    EEPROM :     0 bytes           0%
2017-03-03 18:54:55 +01:00
Nico Tonnhofer 3a9a442c26 STM32F411: get FastIO for writing into place. 2017-03-03 18:54:55 +01:00