Gerald Ebmer / Mbed 2 deprecated HV_Pulsgenerator

Dependencies:   mbed

Revision:
3:a0ce23fb69d8
Parent:
2:7d25b12db2bc
--- a/main.cpp	Tue Jun 19 11:50:29 2018 +0000
+++ b/main.cpp	Wed Sep 05 17:31:20 2018 +0000
@@ -1,6 +1,10 @@
 #include "mbed.h"
 #include "stm32f7xx_hal.h"
 
+/* author: Gerald Ebmer
+ * date: 26.06.2018
+ */
+ 
 DigitalOut myled(LED1);
 uint16_t uhPrescalerValue;
 
@@ -27,15 +31,15 @@
      * TIM3 Ch1 (PB4):    |  |_______________________|
      *                    :  :            __         : 
      * TIM4 Ch1 (PB6):    :__:___________|  |________:__
-     *                    :TPulse_s         :        :
-     *                    :  TPulseframe_s  :        :
+     *                    :TPulse_s      :           :
+     *                    :  TPulseframe_s           :
      *                    :          TPeriod_s       :  
      */
       
     float Tclk_s = 1/ (float)TimerCLK;
     float TPulse_s = 0.000001; /* Tclk_s .. TPeriod_s 0.1 e.g. 1us */
-    float TPulseframe_s = 0.00001; /* TPulse_s .. TPeriod_s 0.1 e.g. 10us */
-    float TPeriod_s = 0.0001; /* 0.0001 .. 0.0065 s */
+    float TPulseframe_s = 0.0005; /* TPulse_s .. TPeriod_s 0.1 e.g. 10us */
+    float TPeriod_s = 0.001; /* 0.0001 .. 0.0065 s */
     
     /* timer register values */
     TPulse = (uint16_t)(TPulse_s / Tclk_s) + 1;
@@ -223,7 +227,7 @@
     GPIO_InitStruct.Pin = GPIO_PIN_4;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
     GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
     HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 
@@ -236,7 +240,7 @@
     GPIO_InitStruct.Pin = GPIO_PIN_6;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_NOPULL;
-    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
     GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
     HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
   }