Input Capture Block Error on Supported Pin in Simulink
4 views (last 30 days)
Show older comments
I'm encountering an issue with the Input Capture block in Simulink when attempting to change the pin number for input capture functionality. Despite selecting pins that are listed as supported in the pin map, I receive the following error message:
"Input capture functionality is not supported on the selected pin. Please click the 'view pin map' button to open the list of pins supported for input capture."
This issue persists even though I am using the exact pins designated for input capture in the pin map. I've verified this on several different devices, all running MATLAB 2024b, but the error remains consistent.
I've also ensured that the software and support packages are up-to-date. Has anyone else experienced this issue, or does anyone have suggestions for troubleshooting?
Answers (1)
Kautuk Raj
on 4 Dec 2024
Edited: Kautuk Raj
on 4 Dec 2024
I understand that you encountered an error when you tried to set the pin in the "Input Capture" block in a Simulink model, where the hardware implementation is set to "ESP32-WROOM (Arduino Compatible)".
This error occurs because the ESP32 hardware implementation does not support any pin for the "Input Capture" block. The pin map indicates that only PWM blocks support pins in the ESP32 hardware implementation, which you can also find at the following MathWorks documentation page: https://www.mathworks.com/help/releases/R2024b/simulink/supportpkg/arduino_ug/pin-mapping-for-arduino-timer-dependent-blocks.html
From the comments, I can see that you also tried using an Arduino Mega 2560, but are still getting an error stating that input capture isn’t supported on the selected pin. I was able to reproduce this issue.
The pin map in the documentation page below indicates that only pins 48 and 49 are supported for the "Input Capture" block, with the hardware implementation set to "Arduino Mega 2560". However, the section below that addresses "Conflicting Pin Configurations on Arduino Timer" says that "Arduino Pin Connections for Input Capture Block" can be 2, 3 and 5 for Timer 3: https://www.mathworks.com/help/releases/R2024b/simulink/supportpkg/arduino_ug/pin-mapping-for-arduino-timer-dependent-blocks.html
I think this is a typo error on the page wherein the columns for Timers 1 and 3 got interchanged for Input Capture and PWM. It should be N/A for Input Capture for Timers 1 and 3.
You can try using pin 48 or 49 to see if it resolves the issue for you, it worked for me.
0 Comments
See Also
Categories
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!