2014-05-19 04:21 PM
hello
I am using STM32f100C8 on this controller implemented :so if input capture can solve this problem to get where this bug generated
plz show me the code to configure the timer and remap this timer as this is my first time to deal with input capture thanks in advance #input-capture2014-05-19 04:51 PM
Review the code more carefully.
Have the hardware generate the PWM, if software crashes input capture isn't going to help. Make sure you don't program the HW PWM with any values which will cause if to operate out-of-bounds, set it to zero so it doesn't generate any signal. Figure out how to debug the current set up, use GPIO, SWV or USART to output real-time telemetry information. Having a debugger dead-stop critical systems where things can burn out is a bad plan. Have a kill button to place the system in a safe state, consider a software watchdog to do the same. Code something on a system you CAN debug, by emulating the hardware cap/coil, and fake ADC readings. Experiment and test this system with a scope until you understand the mechanics and the mode of failure in your current system. Review other input capture or pwm input examples, and add them to your emulation. If you have to get real measurements to do this, rather than figure out how it should behave, then set up a system to record and/or output diagnostic reading via a serial port. Capture this, and sacrifice a few coils to understand and replicate this in your emulation model.2014-05-25 02:05 AM
thanks I have tried it all but unfortunately it didn't work
so I want to ask if there is any way that I can stop the program once the high pulse width become more than a certain valuecan input capture be triggered to activate a interrupt if the pulse width come over a certain value ?thanks in advance