AN93
Rev. 1.4
303
Software Description
Hardware Access Layer
This layer contains all the routines to access the MCU and modem hardware at the most basic level. The
application layer typically does not need to access these functions directly.
Interrupt Service and Polling Layer
This block contains the interrupt service routines for both modem access and MCU to PC UART access. The
application layer typically does not need to access these functions directly. The next two sections detail out the
functioning of the polling and interrupt modes.
Polling HIR1 Method
Transmitting and receiving data to and from the modem is accomplished by polling HIR1 status bits TXE and REM.
Polling is implemented by the following code fragment, which runs in an infinite loop:
static char bytesToSend == 12; // Declared in modemCommunicationUpdate()
if ( ( readModem( HIR1 ) & SiREM ) == 0 && rxBufferSize < MODULUS_MASK )
{
readModemByte;
}
if ( gUARTToModemBufferSize > 0 ) // If there are data to be sent
{
if ( bytesToSend == 12 ) // Check TXE only every twelve bytes sent
{
status = readModem( HIR1 ) & SiTXE;
if ( status ) // If transmit FIFO empty
{
writeModem( HIR0, pullByteForModem(), 0xFF );
bytesToSend--;
}
}
else // No need to check TXE because transmit FIFO is twelve deep
{
writeModem( HIR0, pullByteForModem(), 0xFF );
bytesToSend--;
// If the bytes to send count = 0,
reset the count
if ( bytesToSend == 0 )
{
bytesToSend = 12;
}
}
}
Содержание Si2404
Страница 2: ...AN93 2 Rev 1 4 ...
Страница 27: ...AN93 Rev 1 4 27 Figure 7 Parallel Interface Read Timing Figure 8 Parallel Interface Write Timing ...
Страница 200: ...AN93 200 Rev 1 4 Figure 31 TAM Handset and Speakerphone Voice Paths ...
Страница 201: ...AN93 Rev 1 4 201 Figure 32 Si3000 Codec Gain and Signal Selection Options ...
Страница 290: ...AN93 290 Rev 1 4 Figure 57 256 Band Spectral Display Figure 58 2048 Band Spectral Display ...
Страница 305: ...AN93 Rev 1 4 305 Figure 76 Parallel or SPI Port Interrupt Service Flowchart ...