background image

AURIX™ TC2xx Microcontroller Training
V1.0.0

ASCLIN_Shell_UART_1

Shell via UART communication

Please read the Important Notice and Warnings at the end of this document

Содержание ASCLIN Shell UART 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 ASCLIN_Shell_UART_1 Shell via UART communication Please read the Important Notice and Warnings at the end of this document ...

Страница 2: ...e is used to interface with the Shell through the USB port via UART 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 2 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 3: ...ial communication with external devices 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 3 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 4: ...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 1 4 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 5: ...set txPriority rxPriority and erPriority the interrupt priorities for transmission reception and error events typeOfService the service provider responsible for handling the interrupt which can be any of the available CPUs or the DMA pins a structure that allows to set which port pins are used for the communication rxBuffer rxBufferSize txBuffer txBufferSize parameters that allow to configure the ...

Страница 6: ... default values through the function Ifx_Shell_initConfig Then the following parameters are modified standardIo that allows to set the module used for serial communication commandList that allows to set the list of commands supported by the shell The command list is an array of structures of the type Ifx_Shell_Command that contains commandLine the actual command which will be sent to the shell by ...

Страница 7: ...haracter is entered Configure and control the LEDs The LEDs are toggled by controlling the port pins to which they are connected using methods from the iLLD headers IfxPort h 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 7 2019 10 17 Copyright In...

Страница 8: ...he macro IFX_INTERRUPT isr vectabNum priority 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 8 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 9: ...or must be configured with the following parameters to enable the communication between the board and the PC 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 9 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 10: ...vice perform the following steps 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 10 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 11: ... www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questions and support use the AURIX Forum https www infineonforums com forums 13 Aurix Forum 11 2019 10 17 Copyright Infineon Technologies AG 2019 All rights reserved ...

Страница 12: ...f the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology delivery terms and conditions and prices please contact your nearest Infineon Technologies office www infineon com WARNINGS Due to technical requirements products may contain dangerous substances For inf...

Отзывы: