Download Print this page
Infineon ASCLIN Shell UART 1 Manual

Infineon ASCLIN Shell UART 1 Manual

Shell via uart communication

Advertisement

Quick Links

ASCLIN_Shell_UART_1
Shell via UART communication
AURIX™ TC2xx Microcontroller Training
V1.0.0
Please read the Important Notice and Warnings at the end of this document

Advertisement

loading
Need help?

Need help?

Do you have a question about the ASCLIN Shell UART 1 and is the answer not in the manual?

Questions and answers

Summary of Contents for Infineon ASCLIN Shell UART 1

  • Page 1 ASCLIN_Shell_UART_1 Shell via UART communication AURIX™ TC2xx Microcontroller Training V1.0.0 Please read the Important Notice and Warnings at the end of this document...
  • Page 2: Scope Of Work

    The ASCLIN module is configured for UART communication. The Shell from iLLDs exploits the ASCLIN module to interpret and manage commands from the user like “info”, “toggle [x]” or “help”. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 3 In this example, it is used to interface with the PC through the USB port via UART communication. › A Shell is a user interface for parsing commands and accessing services. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 4: Hardware Setup

    Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC-Step. The board should be connected to the PC through the USB port (1). 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 5 The function IfxAsclin_Asc_initModuleConfig() fills the configuration structure with default values and IfxAsclin_Asc_initModule() function initializes the module with the user configuration. Both the functions can be found in the iLLD header IfxAsclin_Asc.h. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 6 The Ifx_Shell_init() function initializes the shell with the user configuration. The functions Ifx_Shell_initConfig() and Ifx_Shell_init() can be found in the iLLD header Ifx_Shell.h, while the function initShellInterface() is defined in the header UART_ASCLIN_Shell.h. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 7 The LED port pins have to be configured to output push-pull mode using the function IfxPort_setPinMode(). During program execution, the LEDs are switched on and off using the function IfxPort_setPinState(). 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 8 Since the Shell uses the ASCLIN module to interface with the user, three ISR are needed to be configured for transmission, reception and error events. Each of the ISR should call the handler for the respective operation (transmit, receive or error) by passing the ASC handle. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 9: Run & Test

    › Port: COMx (e.g. COM5, COM port number depends on the setup) › Baud rate: 115200 › Data bits: 8 › Parity: None › Stop bits: 1 › Handshaking: None 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 10 Type “help” to see the list of available commands › Type “toggle [0/1/2/3/4]” to respectively: turn on all LEDs, toggle LED D107, toggle LED D108, toggle LED D109 or toggle LED D110 › Check command execution. 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 11 More code examples can be found on the GIT repository: › https://github.com/Infineon/AURIX_code_examples › For additional trainings, visit our webpage: › https://www.infineon.com/aurix-expert-training › For questions and support, use the AURIX™ Forum: › https://www.infineonforums.com/forums/13-Aurix-Forum 2019-10-17 Copyright © Infineon Technologies AG 2019. All rights reserved.
  • Page 12 Infineon Technologies in in personal injury. customer’s applications. The data contained in this document is exclusively intended for technically trained staff.