| Target Support Package™ IC1 | ![]() |
Target Support Package IC1/ C166 Driver Library/ Asynchronous/Synchronous Serial Interface

The Serial Transmit block transmits bytes over the Infineon C166 microcontroller Synchronous/Asynchronous Serial Interface ASC0. You can use it either to transmit a fixed number of bytes, or by enabling the second input, transmit a variable number of bytes each time this block is called.
When the block is called, the specified number of bytes are placed in a FIFO buffer that is internal to the device driver. If this buffer is already full, or if the number of spaces available is too few, then not all of the bytes requested will actually be queued for transmit; in this case, the number of bytes actually transmitted can be determined from block output.
Once bytes are queued for transmit, they will be sent as fast as possible by the serial interface hardware with no further intervention required by the main application. Note that after each byte is sent, a Peripheral Event Controller (PEC) interrupt is generated to fetch the next byte from the internal buffer. The PEC interrupts are extremely fast and have minimal effect on the rest of the application.
To configure the serial interface bit rate, buffer size, PEC interrupt priority, and other parameters, see Asynchronous/Synchronous Serial Interface Configuration Parameters.
Note If your model contains a serial transmit or receive block, it is not possible to perform on-chip debugging over the same serial interface. Attempting to use the debugger in this case causes an error. If you need to debug an application that includes the serial transmit and receive blocks, you must run the debugger using a hardware simulator; alternatively, it may be possible to run your debugger on-chip without using the serial interface, for example if debugging over CAN is available. See Debugging and Using The Code Profile Report. |
Block Inputs and Outputs
The first input contains the data to be transmitted; this input signal may be either a vector or scalar with data type uint8.
The optional second input must be a scalar and may be used to control the number of bytes transmitted. The number of bytes to transmit should not be greater than the width of the first input signal.
The block output port actual number of bytes output gives the number of bytes queued for transmit. If there was sufficient space in the buffer, this number will be equal to the requested number of bytes to transmit.

The time interval between samples. To inherit the sample time, leave this parameter at the default -1. See "Specifying Sample Time" in the Simulink documentation for more information.
Enable/disable the number of bytes to send. If not selected, the number of bytes sent is just the width of the first inport; if selected, the second input is enabled, which controls the number of bytes to send.
Enable/disable the number of bytes actually sent. If selected, this value is available from the first output.
![]() | Serial Receive | Switch External Mode Configuration | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |