![Atmel SAM4S Series Скачать руководство пользователя страница 550](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408550.webp)
550
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
29.5.13.3
Restrictions
• Configuration fields DSIZE, ALWYS, HALFS and FRSTS in PIO_PCMR (
) can be changed ONLY if the parallel capture mode is disabled at
this time (PCEN = 0 in PIO_PCMR).
• Frequency of PIO controller clock must be strictly superior to 2 times the frequency of the
clock of the device which generates the parallel data.
29.5.13.4
Programming Sequence
Without PDC
1.
Write PIO_PCIDR and PIO_PCIER (
“PIO Parallel Capture Interrupt Disable Register”
and
“PIO Parallel Capture Interrupt Enable Register”
) in order to configure the parallel
capture mode interrupt mask.
2.
Write PIO_PCMR (
“PIO Parallel Capture Mode Register”
) to set the fields DSIZE,
ALWYS, HALFS and FRSTS in order to configure the parallel capture mode WITHOUT
enabling the parallel capture mode.
3.
Write PIO_PCMR to set the PCEN bit to 1 in order to enable the parallel capture mode
WITHOUT changing the previous configuration.
4.
Wait for a data ready by polling the DRDY flag in PIO_PCISR (
) or by waiting the corresponding interrupt.
5.
Check OVRE flag in PIO_PCISR.
6.
Read the data in PIO_PCRHR (
“PIO Parallel Capture Reception Holding Register”
).
7.
If new data are expected go to step
.
8.
Write PIO_PCMR to set the PCEN bit to 0 in order to disable the parallel capture mode
WITHOUT changing the previous configuration.
With PDC
1.
Write PIO_PCIDR and PIO_PCIER (
“PIO Parallel Capture Interrupt Disable Register”
and
“PIO Parallel Capture Interrupt Enable Register”
) in order to configure the parallel
capture mode interrupt mask.
2.
Configure PDC transfer in PDC registers.
3.
Write PIO_PCMR (
“PIO Parallel Capture Mode Register”
) to set the fields DSIZE,
ALWYS, HALFS and FRSTS in order to configure the parallel capture mode WITHOUT
enabling the parallel capture mode.
4.
Write PIO_PCMR to set PCEN bit to 1 in order to enable the parallel capture mode
WITHOUT changing the previous configuration.
5.
Wait for end of transfer by waiting the interrupt corresponding the flag ENDRX in
PIO_PCISR (
“PIO Parallel Capture Interrupt Status Register”
6.
Check OVRE flag in PIO_PCISR.
7.
If a new buffer transfer is expected go to step
8.
Write PIO_PCMR to set the PCEN bit to 0 in order to disable the parallel capture mode
WITHOUT changing the previous configuration.
Содержание SAM4S Series
Страница 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Страница 1142: ...1142 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 3 100 ball VFBGA Package Drawing ...
Страница 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Страница 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...