Posted on May 17, 2011 at 15:07Dear Sirs, I found a bug in how the latest STVD release manages ASM include files. The attached archieve contains a default project to which I added MyInc.inc This file contains only a .NOLIST directive and a #define. ...
Posted on May 17, 2011 at 15:07TIM4 doesn't suit your needs. It can measure up to 2.024 ms time intervals @ 16 MHz. It's better to use TIM3 or TIM2 and choose a prescaler so that timer resolution is optimal. Besides timer choice, your idea works! Ci...
Posted on May 17, 2011 at 15:07Hello Spectre! If a counter is running, you can make a software input capture by reading its value. Then you do the usual math... Of course, this math is easier if the auto-reload counter value is maximum (i.e. 0xFFFF ...
Posted on May 17, 2011 at 15:06abelmeg, if Average_Zero_Cross_Time is a two byte quantity, its product by tmp_u8 (which I suppose is an eight bit quantity) is a three byte quantity. The most significant byte of this product is: HIGH_BYTE( HIGH_BYTE(...
Posted on May 17, 2011 at 15:06Hello, fangelin. The STM8 family manual (RM0016) says at page 43: Quote:During block programming, interrupts are masked by hardwareSo you don't have to care of interrupts at all during block programming. EtaPhi