STATIC const PINMUX_GRP_T pinmuxing[] = {
/* UART0 */
{0, 0, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* UART0 RX */
{0, 1, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* UART0 TX */
/* UART1 */
{0, 5, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* UART1 RX */
{0, 6, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* UART1 TX */
/* SPI0 */
{0, 11, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI0_SCK */
{0, 12, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI0_MOSI */
{0, 13, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI0_MISO */
{0, 14, (IOCON_FUNC0 | IOCON_MODE_PULLUP | IOCON_DIGITAL_EN)}, /* SPI0_SSEL0 software control */
/* SPI1 */
{1, 5, (IOCON_FUNC2 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI1_SSEL0 */
{1, 6, (IOCON_FUNC2 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI1_SCK */
{1, 7, (IOCON_FUNC2 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI1_MOSI */
{1, 8, (IOCON_FUNC2 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, /* SPI1_MISO */
/* I2C0 */
{0, 23, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN | IOCON_STDI2C_EN)}, /* I2C0_SCL (SCL) */
{0, 24, (IOCON_FUNC1 | IOCON_MODE_INACT | IOCON_DIGITAL_EN | IOCON_STDI2C_EN)}, /* I2C0_SDA (SDA) */
/* ADC Input */
{1, 4, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_ANALOG_EN)}, /* ADC7 */
/* LED Output */
{0, 30, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN | IOCON_DIGITAL_EN)},
{0, 29, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN | IOCON_DIGITAL_EN)},
{0, 8, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN | IOCON_DIGITAL_EN)},
{0, 7, (IOCON_FUNC0 | IOCON_MODE_PULLDOWN | IOCON_DIGITAL_EN)},
/* Key&Joy Input */
{0, 31, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // B2
{1, 13, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // B3
{1, 11, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // right
{1, 14, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // up
{1, 15, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // left
{1, 16, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)}, // select
{1, 17, (IOCON_FUNC0 | IOCON_MODE_INACT | IOCON_DIGITAL_EN)} // down
};
LCD_BLC位于PIO1_9,该引脚没有连接到任何Timer的输出引脚,不能使用Timer的PWM功能进行背光亮度调节,设计不当。
在使用杜邦线连接SPI到逻辑分析仪时,发现LCD显示有很多杂点,分析为SPI频率过高(DIV=1,SPI_SCLK = 50MHz),当DIV设置为较大值(比如DIV=10,SPI_SCLK=100M/11, DIV=49,SPI_SCLK = 100M/50 = 2MHz)。这个现象推测可能原因有:(1)过长的传输线(杜邦线)导致高频信号出现反射等信号完整性问题。(2)简易逻辑分析仪输入阻抗较低,造成高频信号畸变);
总之,该问题可以认为是一个信号完整性的问题。
(注:由于无示波器等仪器,无法呈现50MHz时加入杜邦线的波形畸变情况,有待条件完备时进行测试)
MDM2802_SPI-TFT-LCD_SPI-DIV=10.logicsession
MDM2802_SPI-TFT-LCD_SPI-DIV=49.logicsession
SPI-Flash
SPI_Flash_WriteStaReg(0x00);
SPI_Flash_DevID
SPI_Flash_ChipErase
SPI_Flash_PageWrite
SPI_Flash_Busy
SPI_Flash_Read
USART0_Bootloader
Synchronized
N
I2C Temp