]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
H-bridge bug with checking period limit repair.
authorMichal Horn <hornmich@fel.cvut.cz>
Wed, 28 Aug 2013 19:21:51 +0000 (21:21 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Wed, 28 Aug 2013 19:21:51 +0000 (21:21 +0200)
rpp/include/rpp/hbr.h
rpp/src/drv/hbridge.c

index 3bbd15a345dc1c39fdf3311a4e180172273b2bf4..8d9d9973ca937d474ac45f214455507fddcd3a1d 100644 (file)
@@ -43,9 +43,7 @@ int8_t rpp_hbr_init();
  * required):
  * @par
  *     - Minimum value is [1us]:
- *         - 1us = 0.001 ms =>
- *         - 1000000 Hz = 1 MHz
- *         - A pulse of 1% of the duty cycle -> 100 MHz (X)
+ *         - 50us => 20 kHz
  *         - System clock is 80MHz.
  * @par
  *     - Maximum value is [2147483647us] (full 32bit signed integer):
index c6bafe07d75df437684a5cb06c689b82a76c80b6..e0a17e295c6b520ae969157a508a22934a413159 100644 (file)
@@ -187,7 +187,7 @@ int8_t drv_hbr_wdg_stop()
  * Set period and dutycycle to HBR_PWM pin.
  * Period is expected to be in us, duty cycle in percent of the period,
  *
- * If period is lower than 1 or duty greater than 100, function returns without having effect.
+ * If period is lower than 50us or duty greater than 100, function returns without having effect.
  *
  * @param[in]   period      Period of PWM in us
  * @param[in]   duty        Width of duty in %
@@ -200,7 +200,7 @@ int8_t drv_hbr_pwm_set_signal(double period, uint32_t duty)
         return FAILURE;
     }
 
-    if(period < 1) {
+    if(period < 50) {
         return FAILURE;
     }