This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: Are there different ways to set a GPIO pins to "high or low" state?

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

I am new to TI MCU and CCS.

I want to control a GPIO pin (set it to high or set it to low state). 

CCS has a build-in sysconfig program, so user can setup GPIO pins easily.

My question is as following: If I want to control AM243x ALX GPIO1_36 pin and I setup it as output in sysconfig.

Could anybody help me to tell me how to apply the sysconfig generated files (some related GPIO) to be used by commands to set that GPIO1_36 pin to output a high state or a low state?

I appreciate your helps for providing complete instruction lines as examples to me.

If possible, please help to point out which sysconfig-generated-file can be referenced and what/where/which sysconfig-generated-flie-data could be used to control that pin? 

Thank you very much.

Best Regards,

JasonC.

  • Hello Jason,

    Thanks for your query.

    Please refer to DRIVERS_GPIO page to know how to configure GPIO as input/output and how to drive it.

    If you still face any difficulty please let us know.

    Regards,

    Tushar

  • Hello Tushar,

    Thank you very much for your help to provide me a web-link. I opened it (screen capture below, but I still have questions:)

    I still have problems using those GPIO APIs, because I don't know the relationship between "Target-config-ccxml-generated-file-data" and "those API parameters". I was wondering if there a generated file/table for this?

    Thank you very much.

    Best Regards,  JasonC.

  • Hi Jason,

    because I don't know the relationship between "Target-config-ccxml-generated-file-data"

    I think there is some misunderstanding, the target config file(*.ccxml) is used to launch the debug session. It is not required while building the example project.

    In your project there will be an example.syscfg file which will generate code according to the parameters configured.

    Whatever the name you configure for GPIO instance the corresponding code generated can be seen in ti_drivers_config.h file.

    If the name of GPIO instance is GPIO_LED then gGpioBaseAddr will be GPIO_LED_BASE_ADDR, pinNum will be GPIO_LED_PIN.

    Please refer below image.

    Hope the above information helps.

    Feel free to ask if you still have doubts on the above explanation.

    Regards,

    Tushar

  • Hello Tushar,

    Thank you very much. Your answer is very easy to understand (for a novice like me).

    Best Regards,  JasonC.

  • Hi Jason,

    Your answer is very easy to understand (for a novice like me).

    Thanks for your appreciation.

    Happy to help Slight smile

    Regards,

    Tushar