Embedded coder not letting me read and write to GPIO c2000 block
조회 수: 5 (최근 30일)
이전 댓글 표시
This is the error message when I have simulink build the C code:
Error evaluating 'InitFcn' callback of F2837x GPIO Digital Input block (mask) 'smcModel/stateMachine/invFaults/FLT_N_A_H'. Callback string is 'validateC280xGPIO; codertarget.registry.registerC28xPeripheralBlocks(gcb);'
Caused by:
- The GPIO pin GPIO77 is already used by smcModel/HiTskISR/HiTskSub/enInverter/cgEnInverter/cgEnInverter_SMCV2/GPIO77_FAULT_AH_L.
Component:Simulink | Category:Block diagram error
Usage of GPIO block is to write it in one task and read it in another. Coder complains its already in use.
Thank you for your help.
댓글 수: 0
답변 (1개)
Omega
2024년 9월 20일
Hi Paul,
I understand that you are encountering an error message while trying to generate code for your Simulink model. The error message indicates that the GPIO Digital Input pin, GPIO77, conflicts with the pin in "GPIO77_FAULT_AH_L."
GPIO77 is already being used by the "GPIO_FAULT_AH_L" block in the path "smcModel/HiTskISR/HiTskSub/enInverter/cgEnInverter/cgEnInverter_SMCV2/GPIO77_FAULT_AH_L."
The init callback function for the GPIO Digital Input block validates the model for the configured GPIO Digital Input pin and will display an error if there is a GPIO conflict with other peripherals.
To resolve this issue, start by finding an unused pin and then reassign the conflicting pin to this available one.
I hope this helps.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!