Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 217352

Forum Post: TMS320F28379D: eCAP Zero Spike Issue on 1 kHz PWM Input Despite Interrupt Mode (F28379D, Simulink):

$
0
0
Part Number: TMS320F28379D Tool/software: I'm using a Texas Instruments F28379D microcontroller with Simulink Embedded Coder to capture a 1 kHz PWM signal from a TAS (Torque Angle Sensor) using the eCAP module in interrupt mode . System Setup: Input: 1 kHz PWM signal from TAS sensor (clean signal, verified on oscilloscope) Capture: Using ECAP module with interrupts enabled Simulink task rate: 100 kHz (10 µs base rate) Data access: ECAP value is either read inside ISR or passed to Simulink for processing or CAN transmission Issue observed: Intermittent zero spikes in the captured pulse width Tools used: Monitor & Tune (Simulink) and CAN output (same spike appears in both) For now i am running sampling time as 20khz without interrupt. Observed Problem: Despite a clean input signal and correct eCAP configuration with interrupts, the measured pulse width occasionally drops to zero unexpectedly. These spikes are not present in the actual signal and appear randomly. Even when using a Triggered Subsystem or an interrupt-driven capture routine , the issue persists. The pulse width is generally correct, but occasionally the system records a zero-width pulse , causing downstream problems. Questions: What’s the best practice in Simulink for safe access of ECAP data when working with slow input PWM and fast sample loops? Should I buffer ECAP data inside the ISR and use a "new data available" flag for the main loop? Is using a Function-Call Subsystem triggered by ECAP interrupt more reliable than Triggered Subsystems? Any known best practices or common pitfalls when capturing low-frequency PWM (e.g., 1 kHz) using ECAP in Simulink? Thanks for any guidance or suggestions!

Viewing all articles
Browse latest Browse all 217352

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>