11 External Memory Interface (EMI)
93
CW6632B Bluetooth 3.0 Audio Player SOC
Version 1.0.0
Copyright ©2015, www.appotech.com. All Rights Reserved.
EMIBUF is the entrance of 6 bytes EMI output buffer. The 6 bytes EMI output buffer is emibuf0, emibuf1, emibuf2,
emibuf3, emibuf4 and emibuf5. When CPU writes to EMIBUF, internal counter will add
“1”, CPU data is pushed
corresponding buffer. You should clear internal counter by writing
“0” to emicon1 bit 7;
PWM mode: should write eight times for eight channels PWM of P2
When EMIM = 0, emibuf0 will output to P2. Emibuf0 is updated with CPU write data.
When EMIM = 1 and in no convert mode, emibuf0 will output to P2. Emibuf0 is updated with SPI1 DMA data.
When SPI2EMI = 1 and in convert mode, there are 3 output modes:
Corresponding bit
0
1
1 byte mode
emibuf0
emibuf3
2 byte mode
emibuf0
emibuf1
emibuf3
emibuf4
3 byte mode
emibuf0
emibuf1
emibuf2
emibuf3
emibuf4
emibuf5
When EMIM = 0 and EMIEN = 1, EMI transfer will be started by writing to EMIBUF.
When EMIM = 1 and EMIEN = 1, EMI transfer will be started by SPI DMA.
PWM Operation Guide
1. Configure EMICON1 register;
2. Read data from FFT output buffer;
3. Write data to PWMDAT register.