EasyManua.ls Logo

Maxim Integrated MAX32665 - Page 161

Maxim Integrated MAX32665
457 pages
Print Icon
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...
MAX32665-MAX32668 User Guide
Maxim Integrated Page 161 of 457
8.2.2.4 Sample SPIXFM Master Configuration - Execute Code
Complete the following steps to execute the SPIXFM Master Configuration sample:
1. Turn on ICache XIP Clock (GCR_PCLK_DIS1.icachexipf = 1).
a. The cache can be put into different power states. See GCR_MEM_CLK for options.
2. Configure the SPIXF Master mode, slave select polarity, slave number, and slave select timing.
a. Example:
i. SPI Mode 0
ii. Slave select high
iii. Slave #0
iv. 1 SPI clock per 2 AHB clocks
v. SPIXFM_CFG = 0x1104.
3. Configure the command value, the command, address, data width, and whether the address is three- or
four-byte mode.
a. Example Read command:
i. command value = 0x03
ii. command width = single data I/O
iii. address bit = single data I/O,
iv. data width = single data I/O
v. 3-byte address mode
vi. SPIXFM_FETCH_CTRL = 0x0003.
4. Configure the SPIXF mode/dummy field and the data for the mode/dummy field
a. Example:
i. Mode clocks = 0 (no dummy field)
ii. SPIXFM_MODE_CTRL = 0x0
5. Enable the SPIXF feedback clock control.
a. Example:
i. SPIXF feedback clock enabled using non-inverted serial feedback clock
ii. SPIXFM_FB_CTRL = 0x0001.
6. Jump to the start of application code in SPI flash space.
a. Example pseudo code:
i. jump_to_external_flash = (void) (0x08000001)
ii. jump_to_external_flash()
8.2.2.5 Clock Phase and Polarity Control
The SPIXFM clock phase and polarity should match the configuration set up by the SPIXFC Master Controller. For more
information about clock phase and polarity control please. See 8.2.1.1.4 Clock Phase and Polarity Control for the SPIXFC.
8.2.2.6 Serial Clock Feedback Mode
The SPIXFM supports high-speed transfer up to 48MHz using the Serial Feedback Clock Mode (SPIXFM_FB_CTRL .fbmd=1).
The master output clock is routed back into the digital logic to sample incoming data from the slave. This allows for
automatic alignment of the master clock to the input slave data for faster speeds. The Serial Feedback Mode should not be
changed while the SPIXFM slave select is low. This configuration should be done prior to SPIXFM transactions and remain
unchanged while reading or executing from SPIXFM space. If the Serial Feedback Mode needs to be changed after the

Table of Contents