EasyManua.ls Logo

NXP Semiconductors PXN2020 - Page 809

NXP Semiconductors PXN2020
1376 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
Loading...
Media Local Bus (MLB)
PXN20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor 27-37
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.
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.
Legend
= 16-bit address pointer
BCA
Circular Buffer
Synchronous Data Circular Buffering Example
BCA
BCA
BCA
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.
End of Circular Buffer
CNBCRn[BEA] = CNBCRn[BFA]
Location in system memory should not change

Table of Contents

Related product manuals