MC1321x Serial Peripheral Interface (SPI)
MC1321x Reference Manual, Rev. 1.6
Freescale Semiconductor
4-19
4.11.3
Special Case - Packet RAM Access
Modem Packet RAM access is a special case access when the modem is used in the Packet Mode. The
modem contains three embedded 128-byte ‘Packet RAMs’ used to facilitate reception and transmission of
packet data. One RAM is dedicated for receive packet data and two are dedicated for transmit packet data.
The Packet RAMs are configured in 64-word by 16-bit format and are both read and write accessible via
the SPI. The recursive data ‘burst’ access mode is used to efficiently access Packet RAM data.
Although the Packet RAMs are completely static, any RAM access requires the MC1321x to be in an
active state; the reference clock circuit must be active. RAM read and write operations are prohibited while
the device is in Hibernate or Doze Mode.
Reading and writing the MC1321x Packet RAMs is accomplished by SPI burst accesses to dedicated
Packet RAM register addresses within the register map. The RX_Pkt_RAM Register 01 is mapped to the
Rx Packet RAM, and TX_Pkt_RAM Register 02 is mapped to the Tx Packet RAMs (choice is selected by
the tx_ram2_select bit TX_Pkt_Ctl Register 03, Bit 15). The 16-bit data payload of the SPI access maps
directly to the 16-bit word in the Packet RAM.
4.11.3.1
Recursive Receive Packet RAM Read Access
The receive Packet RAM is normally accessed when the modem is in Packet Data Mode and a valid frame
has been received (as indicated by rx_rcvd_irq and crc_valid). The number of receive data bytes in the
queue is shown by the rx_pkt_latch[6:0] field (this includes the full payload with the 2 CRC bytes).
The data is read by accessing RX_Pkt_RAM Register 01 with a recursive read. When accessing
RX_Pkt_RAM Register 01, the SPI register address pointer is NOT incremented, instead, the Packet RAM
read address pointer is incremented. Therefore, by using a recursive read, up to 64 words of packet
memory can be read from the SPI with an access that requires but a single header field. A read access to
Packet RAM always starts at the bottom of the RAM, i.e., the read address pointer always starts at the
beginning of the data for a given read.
4.11.3.1.1
Receive Packet RAM Read Access Flow
Once receive data has been determined to be in Packet RAM, the following is a typical flow to read access
the data:
1. Read rx_pkt_latch[6:0] to determine the number of payload bytes in receive Packet RAM. Note
that this number includes 2 CRC bytes.
2. Calculate the number of SPI bursts that are required to access the Rx packet data, noting the
following:
a) The CRC is not normally accessed, so the number of bytes is reduced by 2.
NOTE
If the 2-byte CRC data is read. The byte order is reversed (last CRC byte is
read first).
b) All data read during an access must be done on 16-bit or 2-byte boundaries. Therefore, for an
odd number of bytes, the byte count must be rounded up to an even number.
Содержание freescale semiconductor MC13211
Страница 40: ...MC1321x Pins and Connections MC1321x Reference Manual Rev 1 6 2 6 Freescale Semiconductor...
Страница 100: ...MC1321x Serial Peripheral Interface SPI MC1321x Reference Manual Rev 1 6 4 24 Freescale Semiconductor...
Страница 166: ...Modem Modes of Operation MC1321x Reference Manual Rev 1 6 7 22 Freescale Semiconductor...
Страница 172: ...Modem Interrupt Description MC1321x Reference Manual Rev 1 6 8 6 Freescale Semiconductor...
Страница 186: ...MCU Modes of Operation MC1321x Reference Manual Rev 1 6 10 8 Freescale Semiconductor...
Страница 208: ...MCU Memory MC1321x Reference Manual Rev 1 6 11 22 Freescale Semiconductor...
Страница 244: ...MCU Parallel Input Output MC1321x Reference Manual Rev 1 6 13 20 Freescale Semiconductor...
Страница 288: ...MCU Central Processor Unit CPU MC1321x Reference Manual Rev 1 6 15 20 Freescale Semiconductor...
Страница 308: ...MCU Timer PWM TPM Module MC1321x Reference Manual Rev 1 6 17 16 Freescale Semiconductor...
Страница 338: ...Inter Integrated Circuit IIC MC1321x Reference Manual Rev 1 6 19 14 Freescale Semiconductor...
Страница 372: ...Development Support MC1321x Reference Manual Rev 1 6 21 20 Freescale Semiconductor...