Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ISR.cpp
00001 #include <string> 00002 #include "main.h" 00003 #include "Functions.h" 00004 #include "Definitions.h" 00005 #include "Boolean.h" 00006 #include "NextionLCD.h" 00007 #include "mbed_debug.h" 00008 #include "mbed.h" 00009 #include "Languages.h" 00010 #include "Ser25lcxxx.h" 00011 #include "NVM.h" 00012 #include "Watchdog.h" 00013 #include "NextionPages.h" 00014 #include "Controls.h" 00015 #include "Threads.h" 00016 #include "FastPWM.h" 00017 00018 00019 InterruptIn tachoIn(FG_OUT); 00020 Timer t1Sec; 00021 volatile float rpm = 0; 00022 00023 00024 void isr1(){ 00025 /* 00026 Tacho feedback from BLDC drive controller 00027 */ 00028 static uint16_t cntr =0; 00029 static bool pulse = HI; 00030 00031 if(cntr > 5){ 00032 ml+=0.1; 00033 cntr = 0; 00034 } 00035 cntr++; 00036 00037 /* 00038 if(pulse){//tacho pulse rising edge 00039 t1Sec.reset(); 00040 t1Sec.start(); 00041 //startLED = ON; 00042 } 00043 else{ 00044 t1Sec.reset();//tacho pulse falling edge 00045 t1Sec.start(); 00046 //startLED = OFF; 00047 } 00048 pulse^=1; 00049 */ 00050 }
Generated on Tue Jul 19 2022 00:58:42 by
1.7.2