EasyManuals Logo

Microchip Technology dsPIC33 series User Manual

Microchip Technology dsPIC33 series
116 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #66 background imageLoading...
Page #66 background image
dsPIC33/PIC24 Family Reference Manual
DS70005340A-page 66 2018 Microchip Technology Inc.
5.4.4 RECEIVE FIFO CONFIGURATION
FIFO 1 through FIFO 31 can be configured as receive FIFOs by clearing TXEN in the
C1FIFOCONxL register. The number of message objects in each receive FIFO is configured
using the FSIZE<4:0> bits (C1FIFOCONxH<12:8>). All objects in one receive FIFO use the
same payload size (number of data bytes), which is determined by the PLSIZE<2:0> bits
(C1FIFOCONxH<15:13>). Received messages can be timestamped by setting the RXTSEN bit
(C1FIFOCONxL<5>).
5.4.5 CALCULATION OF REQUIRED MESSAGE MEMORY
The size of required RAM depends on the configuration of each FIFO. Equation 5-17 through
Equation 5-19 specify the sizes of the TEF, TXQ and the FIFOs in bytes. The TEF or TXQ is not
used if their size is zero.
Since the size of the integrated RAM is limited, the user must check that the memory configuration
fits into RAM. Equation 5-20 can be used to calculate the total RAM usage in bytes.
The size of the TEF objects depends on the enabling of timestamping. If TEFTSEN is set, then
tefts = 4, else tefts = 0.
The PayLoad(i) is defined in data bytes.
The size of a message object of an RX FIFO varies dependent on the enabling of timestamping.
If RXTSEN = 1 and TXEN = 0 for FIFO(i), then rxts(i) =4, else rxts(i) =0.
N is defined as the number of FIFOs used in addition to the TEF and the TXQ.
Equation 5-17: Size of TEF
Equation 5-18: Size of TXQ
Equation 5-19: Size of FIFOs
Equation 5-20: Total RAM Usage
For example:
If TEF is 4 messages deep (N
Elements
(TEF) = 4) and TEFTSEN is clear,
then the size of TEF = S
TEF
= 4 x (0 + 8) = 32 bytes
•If N
Elements
(TXQ) = 1, PayLoad (TXQ) = 12,
then the size of TXQ = S
TXQ
= 1 x (8 + 12) = 20 bytes
•If N
Elements
(FIFO) = 3, PayLoad (FIFO) = 8,
then the size of FIFO = S
FIFO
= 3 x (8 + 8) = 48 bytes
Therefore, SRAM = S
TEF
+ S
TXQ
+ S
FIFO
= 32 + 20 + 48 = 100 bytes.
S
TEF
N
Elements
TEFtefts 8+=
S
TXQ
N
Elements
TXQ8 PayLoad TXQ+=
S
FIFO
i N
Elements
i rxts i 8 PayLoad i++=
S
RAM
S
TEF
S
TXQ
S
FIFO
i
i1=
N
++




=

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Microchip Technology dsPIC33 series and is the answer not in the manual?

Microchip Technology dsPIC33 series Specifications

General IconGeneral
BrandMicrochip Technology
ModeldsPIC33 series
CategoryMotherboard
LanguageEnglish

Related product manuals