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

5 Ansichten (letzte 30 Tage)
Paul Moore
Paul Moore am 20 Sep. 2024
Kommentiert: Paul Moore am 20 Sep. 2024
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.

Antworten (1)

Omega
Omega am 20 Sep. 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.
  1 Kommentar
Paul Moore
Paul Moore am 20 Sep. 2024
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?

Melden Sie sich an, um zu kommentieren.

Tags

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by