![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226049/Capture.jpeg)
Simulink - F28335 eQEP block is not working properly
3 次查看(过去 30 天)
显示 更早的评论
Hi again everyone;
This time I want so ask something about eQEP module for F28335 processor. However, before problem, let me introduce my tools:
- Matlab: R2019A and Embedded Coder Support Package v17.2.6
- Code Composer: CCS7
- CPU: F28335 processor with 140MHz CPU Clock and 40MHz Oscillatory clock
My aim was reading an incremental encoder –which is attached at the back of an electric motor- using eQEP module. First, in order to check whether hardware installed correctly or not, I wrote custom code in Code Composer Studio. This code had two main parts in order to read encoder, which were initializing and reading respectively. By this way, I read encoder properly. The code segments are presented in Picture 1 and picture 2.
![initalize_code.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225442/initalize_code.jpeg)
![read_code.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225443/read_code.jpeg)
On the other hand, I tried the same solution in Matlab/Simulink. I didn’t change any hardware componentand used same gpios for eQEP module, which are 50-51-52-53. Problem is eQEP block did not give any output. Even noise or any meaningless data was not recieved, just 0 came. While configuring eQEP, I used following configurations(I just used General and Position Counter tabs - other tabs are unchecked.)
![eQEP1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225444/eQEP1.jpeg)
![eQEP2.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225445/eQEP2.jpeg)
My question is what could be possible reasons for this situation? Am I missing any clocking issue, register issue or some interrupt service routine issue? Actually, I compared derived code and custom code, I could not see any considerable differences but I am not sure.
Thanks in advance, best regards;
Ömer Ç.
0 个评论
采纳的回答
Venkatesh Chilapur
2019-6-24
Hi Omer,
Please verify if the GPIO configuration are done accordingly in the hardware config pane.
![Capture.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226049/Capture.jpeg)
Regards,
Venkatesh C
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!