<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LPC18S37 and SSP1 clock signal issue in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1378525#M47162</link>
    <description>&lt;P&gt;Helllo sener,&lt;/P&gt;
&lt;P&gt;If pin mux configuration like your below comment, it is wrong.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;/*
HW Name  PinName    TFBGA100	Name	       Type    Func   Port     Pin
LCD_L_CS      P1_0	H1	GPIO0[4]	I/O	1	0	4
SSP1_SCK      PF_4	H4	SSP1_SCK	I/O	1	
SSP1_MOSI     P1_4	J2	SSP1_MOSI	I/O	6	0	11
*/
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Alll the Func number need subtract&amp;nbsp; 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1638241994881.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163504iA3913D6FAEC8549B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1638241994881.png" alt="Alice_Yang_0-1638241994881.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_1-1638242024090.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163505i0DE5A89091814A46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_1-1638242024090.png" alt="Alice_Yang_1-1638242024090.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 03:13:58 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2021-11-30T03:13:58Z</dc:date>
    <item>
      <title>LPC18S37 and SSP1 clock signal issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1377826#M47136</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a custom board with LPC18S37 and an LCD connected via SPI (only MOSI, SCK, CS and DC).&lt;BR /&gt;Since I couldn't have success on interfacing LCD, I've started to troubleshoot hardware and software respectively. Hardware side seems to be alright and I've started to look in the code.&lt;/P&gt;&lt;P&gt;I am using files from NXP for drivers and examples (you may see them attached).&lt;/P&gt;&lt;P&gt;Here is the simplified code from my work;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;lpc1850_db1.h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include "/Drivers/Include/lpc18xx_scu.h"

/*
HW Name  PinName    TFBGA100	Name	       Type    Func   Port     Pin
LCD_L_CS      P1_0	H1	GPIO0[4]	I/O	1	0	4
SSP1_SCK      PF_4	H4	SSP1_SCK	I/O	1	
SSP1_MOSI     P1_4	J2	SSP1_MOSI	I/O	6	0	11
*/

#define LCD_L_CS_SCU_CONFIG       0x1, 0, MD_PLN, FUNC0 // LCD_L_CS
#define LCD_SCK_SCU_CONFIG        0xF, 4, MD_PLN_FAST, FUNC0 // SSP1_SCK
#define LCD_MOSI_SCU_CONFIG       0x1, 4, MD_PUP | MD_EZI | MD_ZI, FUNC5 // SSP1_MOSI

#define LCD_L_CS_SCU_PORT     0x1
#define LCD_L_CS_SCU_PIN      0
#define LCD_L_CS_GPIO_PORT    0
#define LCD_L_CS_GPIO_PIN     4
#define LCD_L_CS_GPIO_MASK    (1 &amp;lt;&amp;lt; LCD_L_CS_GPIO_PIN)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;main.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include "RTOS.h"
#include "LPC18xx.h" // Device specific header file, contains CMSIS
#include "LCDST7735.h"
#include "LCDMain.h"
#include "Common.h"
#include "/Drivers/Include/LPC18xx_ssp.h"
#include "../OS/Setup/Boards/lpc1850_db1.h"

SSP_CFG_Type SSP_ConfigStruct;

scu_pinmux(LCD_SCK_SCU_CONFIG);
scu_pinmux(LCD_MOSI_SCU_CONFIG);
// initialize SSP configuration structure to default
SSP_ConfigStructInit(&amp;amp;SSP_ConfigStruct);

// Initialize SSP peripheral with parameter given in structure above
SSP_Init(LPC_SSP1, &amp;amp;SSP_ConfigStruct);

// Enable SSP peripheral
SSP_Cmd(LPC_SSP1, ENABLE);
OS_Delay(200);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The rest of the code, LCD related command and data.&lt;/P&gt;&lt;P&gt;Here is the shot from the scope which I find it very interesting.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LPC18S37 LCD SPI driver trial - LCS looks like a clok - hmmm 2.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163373iB14A5D9329D17D34/image-size/large?v=v2&amp;amp;px=999" role="button" title="LPC18S37 LCD SPI driver trial - LCS looks like a clok - hmmm 2.png" alt="LPC18S37 LCD SPI driver trial - LCS looks like a clok - hmmm 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looks like SCK and LCS (CS actually) are switched their places. I thought that I swapped the probes by mistake. No, it wasn't actually, they were correct. I've also traced back the connections up until the LPC18S37 pins. They are also correct.&lt;BR /&gt;&lt;BR /&gt;From this point, before I continue my troubleshooting on the LCD interfacing, I like to understand what happens here. For example, am I making a mistake in pin muxing and it is resulting in this issue? Any pointer greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Nov 2021 23:15:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1377826#M47136</guid>
      <dc:creator>sener</dc:creator>
      <dc:date>2021-11-28T23:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18S37 and SSP1 clock signal issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1378525#M47162</link>
      <description>&lt;P&gt;Helllo sener,&lt;/P&gt;
&lt;P&gt;If pin mux configuration like your below comment, it is wrong.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;/*
HW Name  PinName    TFBGA100	Name	       Type    Func   Port     Pin
LCD_L_CS      P1_0	H1	GPIO0[4]	I/O	1	0	4
SSP1_SCK      PF_4	H4	SSP1_SCK	I/O	1	
SSP1_MOSI     P1_4	J2	SSP1_MOSI	I/O	6	0	11
*/
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Alll the Func number need subtract&amp;nbsp; 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1638241994881.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163504iA3913D6FAEC8549B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1638241994881.png" alt="Alice_Yang_0-1638241994881.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_1-1638242024090.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163505i0DE5A89091814A46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_1-1638242024090.png" alt="Alice_Yang_1-1638242024090.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 03:13:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1378525#M47162</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-11-30T03:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18S37 and SSP1 clock signal issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1378755#M47167</link>
      <description>&lt;P&gt;Thank you for your response Alice.&lt;/P&gt;&lt;P&gt;But, I can't see if it is wrong with the function number.&lt;/P&gt;&lt;P&gt;/* Pin function */&lt;BR /&gt;#define FUNC0 0x0 /** Function 0 */&lt;BR /&gt;#define FUNC1 0x1 /** Function 1 */&lt;BR /&gt;#define FUNC2 0x2 /** Function 2 */&lt;BR /&gt;#define FUNC3 0x3 /** Function 3 */&lt;BR /&gt;#define FUNC4 0x4&lt;BR /&gt;#define FUNC5 0x5&lt;BR /&gt;#define FUNC6 0x6&lt;BR /&gt;#define FUNC7 0x7&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LCD pinmux-Sener.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/163554i7509F8A95AAE0B14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LCD pinmux-Sener.png" alt="LCD pinmux-Sener.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:49:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1378755#M47167</guid>
      <dc:creator>sener</dc:creator>
      <dc:date>2021-11-30T09:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18S37 and SSP1 clock signal issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1379513#M47185</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Compare with the configuration with SSP demo, and confirm your connection .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:22:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1379513#M47185</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-12-01T08:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18S37 and SSP1 clock signal issue</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1379802#M47190</link>
      <description>&lt;P&gt;For whom has a similar issue, I mark my solution here.&lt;BR /&gt;&lt;BR /&gt;I solved the issue with SPI and LCD at the same time. It was just a missing line. Since my LCD doesn't need the MISO line, I have just ignored it since the beginning. Reading after reading, although it wasn't clearly written anywhere, I finally came to a conclusion that MISO line has to be setup anyway. I did so and It worked!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You must pinmux MISO line!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define LCD_MISO_SCU_CONFIG       0x1, 3, MD_PLN | MD_EZI | MD_ZI, FUNC5  // SSP1_MISO
scu_pinmux(LCD_MISO_SCU_CONFIG);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that: Besides, although things are working OK now, I have still more or less same scope output. So, don't ask (I don't ask anymore) why the scope output is like that which was my original question.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Sener&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 23:01:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18S37-and-SSP1-clock-signal-issue/m-p/1379802#M47190</guid>
      <dc:creator>sener</dc:creator>
      <dc:date>2021-12-01T23:01:46Z</dc:date>
    </item>
  </channel>
</rss>

