![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 507](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827507.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
507 of 1441
NXP Semiconductors
UM10503
Chapter 20: LPC43xx/LPC43Sxx Serial GPIO (SGPIO)
In MCK master mode, the MCK input is divided down to generate the SCK and shift the
SD and WS signals. The slice setting that are different for slave mode (1) with 4x
oversampled clock MCK supplied at pin 9 are shown in :
20.8.1.3 I2S slice programming
After configuration the data patterns are loaded in REGi and REG_SSi.
For SD the audio samples are loaded in REGi and RE_SSi. Data is shifted out starting
from the LSB. After one sample is processed POS reaches countdown and REG_SSi is
swapped with REGi to load the next sample. The CPU should update REG_SSi with a
new sample before the next POS countdown when the current sample finishes.
The WS pattern repeats every 64-bit and is stored in REG9 and REG_SS9. To create a
WS pattern as shown in
for a 32-bit data width set REG9 = 0x0000.0001 and
REG_SS9=0xFFFF.FFFE.
The SCK pattern is static and stored in REG3 and REG_SS3. To create a SCK pattern as
shown in
set REG1 = 0x5555.5555 and REG_SS1 = 0x5555.5555. To invert the
clock phase use patterns 0xAAAA.AAAA instead.
MCK is not phase aligned to the other I2S signals. To toggle the output set
REG3 = 0x5555.5555 and REG_SS3 = 0x5555.5555. In slave mode MCK should be
divided by 4 to create SCK and the D and WS shift clock, this requires the pattern
11001100… hence REG3 = REG_SS3=0xCCCC.CCCC
All slices are started by enabling the COUNTERs by writing CTRL_ENABLE = 0x031B.
PRESETi
counter not used
counter not used
counter not used
counter not
used
COUNTi
counter not used
counter not used
counter not used
counter not
used
POS_PRESETi
0x1F/0x0F/0x07
0x1F
slice not used
slice not used
Table 324. SGPIO setting for I2S 5.1 (master mode, pin 8)
Table 325. SGPIO setting for I2S 5.1 (master mode, pin 9)
OUT_MUX_CFGi
A,I,E (i=0,8,4)
J (i=9)
B (i=1)
D (i=3)
P_out_cfg
0000: dout_doutm1
0000: dout_doutm1
1000: clk
x
P_oe_cfg
000: gpio_oe
000: gpio_oe
000: gpio_oe
x
GPIO_OUTREG
1
1
1
0
SGPIO_MUX_CFGi
ext_clk_enable
0: internal clock
0: internal clock
0: internal clock
1: pin
clk_source_pin
x
x
x
01: pin9
clk_source_slice
00: slice D
slice D
slice D
x
qualifier_mode
00: enable
00: enable
00: enable
00: enable
SLICE_MUX_CFGi
clk_gen_mode
1: use external clock
1: use external clock
1: use external clock
1: use external clock
clk_capture_mode
1: use falling clock
1: use falling clock
not used
x
PRESETi
not used
not used
not used
3: f=MCK/4
COUNTi
not used
not used
not used
0
POS_PRESETi
0x1F/0x0F/0x07
0x1F
not used
0x1F