Embedded coder not letting me read and write to GPIO c2000 block
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Omega
el 20 de Sept. de 2024
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.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!