English
Language : 

PXN20RM Datasheet, PDF (809/1376 Pages) Freescale Semiconductor, Inc – PXN20 Microcontroller
Media Local Bus (MLB)
While processing the circular buffer, the CSCRn[RDY] bit is not automatically cleared by hardware, as it
is with ping-pong buffering. For circular buffer, the CSCRn[RDY] bit can only be cleared by software
through the peripheral bus interface. Once CNBCRn[BSA] and CNBCRn[BEA] are initially loaded,
software should set the CSCRn[RDY] bit to initiate buffer processing. This bit may be cleared by software,
as needed, to halt the buffer processing.
System design must ensure synchronous data is loaded into the circular buffer at the same rate at which it
is unloaded.
An example of the circular buffering for synchronous channels is provided in Figure 27-21.
Synchronous Data Circular Buffering Example
Beginning of Circular Buffer
CNBCRn[BSA]
Once software programs
CNBCRn[BSA] and CNBCRn[BSA],
it should set CSCRn[RDY] to initiate
processing of the circular buffer.
At this point, software should not alter
the addresses of the CNBCRn[BSA]
and CNBCRn[BEA] fields.
BCA
BCA
BCA
Legend
= 16-bit address pointer
End of Circular Buffer
CNBCRn[BEA] = CNBCRn[BFA]
BCA
Figure 27-21. Circular Buffering of Synchronous Data
Synchronous data using circular buffering should be handled in the following manner:
• Before buffer processing can begin, software must define the beginning address (CNBCRn[BSA])
and ending address of the circular buffer (CNBCRn[BEA]). Once the circular buffer beginning and
ending addresses are defined, software must set the CSCRn[RDY] bit to initiate buffer processing.
• At the start of buffer processing, the beginning address of the circular buffer (CNBCRn[BSA]) is
loaded into CCBCRn[BCA] CCBCRn[BCA]. Additionally, the ending address of the circular
buffer (CNBCRn[BEA]) is loaded into CCBCRn[BFA].
• During the processing of the circular buffer, CCBCRn[BCA] is updated to indicate which quadlet
of the synchronous data is currently being processed.
• Once the end of the buffer is reached and CCBCRn[BCA] = CCBCRn[BFA], the CCBCRn[BCA]
field is reloaded to point to the beginning address of the circular buffer (CNBCRn[BSA]).
• The CSCRn[RDY] bit remains set during the processing of the circular buffer. Software may clear
this bit, as needed, to halt buffer processing.
Freescale Semiconductor
PXN20 Microcontroller Reference Manual, Rev. 1
27-37