Embedded coder not letting me read and write to GPIO c2000 block

조회 수: 5 (최근 30일)
Paul Moore
Paul Moore 2024년 9월 20일
댓글: Paul Moore 2024년 9월 20일
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:
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.

답변 (1개)

Omega
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.
  댓글 수: 1
Paul Moore
Paul Moore 2024년 9월 20일
Divit,
What is the GPIO conflict the callback is detecting?
The processor GPIO may be read and written. That's how it works. I must read and write to this output pin. Coding in 'C' of course works properly. Coding with the C2000 blockset that I purchased is the problem. Does the GPIO block need to be revised?

댓글을 달려면 로그인하십시오.

태그

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by