2020-03-02 05:00 AM
i want to generate pulse which on time is fix(100us) but off time is variable(between 0-10ms) and it is synchronous with external interrupt how can i do this using HAL libraries ?
2020-03-06 07:05 AM
@parth kothiya, did you ever get this working? I'm attempting the same thing for an R/C controller to perform the ancient PPM modulation scheme. If so how did you do it?
I have my first pass 12 channel working a combination of software timers that kick off the single 100uS pulse but it's hacky and unsatisfying. Thanks!
2020-03-06 09:41 AM
2020-03-06 11:37 AM
I didn't see it - thank you for the pointer. I'll work it once I fix the complementary channel output. Assuming I can fix the complementary output on TIM17 in OPM comparison mode.
2020-03-07 04:11 AM
But this would be another timer, wouldn't it? TIM17 has no slave mode.
2020-03-07 09:26 AM
Indeed it would: TIM17 and 16 on my H743 are "lite" timers. And I couldn't fix the complementary channel, no matter what I do it has that weird "pulse from the future" that precedes the normal channel's one pulse. Anyway, for ganged timers I think I need to be on TIM1 and 15 or something that's not a lite timer. I picked a lot of these timers to avoid conflicting with timers our contractor selected for a sibling product that runs 95% of the same code, except for these timers =)
People higher up the corporate food chain will decide if they want me to put time into un-hackifying it and doing it properly with two timers. I'd like to work on it because I hate the jitter I'm getting with my software timer, which is actually tolerable and never worse than 1% but it feels wrong and it looks bad on the scope. Unfortunately allocating my time isn't my decision to make.