⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssp_abstract.txt

📁 LPCXpresso1768
💻 TXT
字号:
The SSP project is a simple program to test both SSP master
and slave mode on the NXP LPC17xx microcontroller. 

There are three modes in SSP: loopback, master or slave.

Here are the combination of all the tests. You need to modify
the setting in ssp.h first in order to configure the proper mode
for testing:

(1) LOOPBACK test:	LOOPBACK_MODE=1, TX_RX_ONLY=0, USE_CS=1;
(2) Serial EEPROM test:	LOOPBACK_MODE=0, TX_RX_ONLY=0, USE_CS=0; (default)
(3) TX(Master) Only:	LOOPBACK_MODE=0, SSP_SLAVE=0, TX_RX_ONLY=1, USE_CS=1
(4) RX(Slave) Only:	LOOPBACK_MODE=0, SSP_SLAVE=1, TX_RX_ONLY=0, USE_CS=1

#define LOOPBACK_MODE	0	/* 1 is loopback, 0 is normal operation. */
#define SSP_SLAVE	0	/* 1 is SLAVE mode, 0 is master mode */
#define TX_RX_ONLY	0	/* 1 is TX or RX only depending on SSP_SLAVE
				flag, 0 is either loopback mode or communicate
				with a serial EEPROM. */

If USE_CS is zero, set SSEL as GPIO that the master has total control of the 
sequence. Depending on the timing sequence of the slave device, manually control 
the SSEL may be required on the master side.

When test serial SEEPROM(LOOPBACK_MODE=0, TX_RX_ONLY=0), set USE_CS to 0.
When LOOPBACK_MODE=1 or TX_RX_ONLY=1, set USE_CS to 1.

#define USE_CS			0

The result of the RX may also be checked in the dest_addr[].


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -