<?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>Kinetis MicrocontrollersのトピックRe: Problems with SPI0 MOSI on a K64F</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439248#M25675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your willingness; in the meantime I did some other tries in the attempt to solve the problem by myself:&lt;/P&gt;&lt;P&gt;- I soldered an external pull-up resistor to the MOSI line: NO SUCCESS&lt;/P&gt;&lt;P&gt;- I changed the FRDM-K64F board with a twin one: NO SUCCESS&lt;/P&gt;&lt;P&gt;- I changed the SPI port connecting the OLED display to the RF/WIFI connector (J6), so now SCK = PTD5, CS = PTC12, MOSI = PTD6: NO SUCCESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all my tries the aspect of the MOSI signal when attached to the display is always the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other hint will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT: carefully reading the data sheet of the "K64 Sub-Family Reference Manual" (Rev. 2, January 2014, &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf&lt;/A&gt;) at page 283-284, I saw that in the PORTD_PCR2 register there is bit 6 named DSE (Drive Strength Enable), when set to 1, configures the high drive strength on the corresponding pin (PD2 in my case), if pin is configured as a digital output.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried to change the optional code valid only for FRDM-K64F to:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;#ifdef TARGET_K64F&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;PORTD_PCR2 |= 0x40;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compiling the code, uploading it to the FRDM-K64F and capturing the MOSI signal on PD2 with the oscilloscope, it now appears exactly the same as the one I can see on the FRDM-KL25Z, even with PD2/MOSI connected to the display!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At the moment the display doens't show any output but, now that the most difficult problem is solved, it is only a matter of time and.. patience!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I will write here the complete description of the problem when (if...) I find it.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 07:03:26 GMT</pubDate>
    <dc:creator>francescoadamo</dc:creator>
    <dc:date>2015-08-19T07:03:26Z</dc:date>
    <item>
      <title>Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439244#M25671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing a strange problem on a K64F interfaced to an SSD1306-based 128 x 64 OLED Display (following images); I use the FRDM-K64F and a FRDM-KL25Z with the MBED platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="oled_dispaly.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52487i326641EABD67E135/image-size/large?v=v2&amp;amp;px=999" role="button" title="oled_dispaly.jpg" alt="oled_dispaly.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20150813_171453 (2).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52430i8AE2A885540D6C7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="20150813_171453 (2).jpg" alt="20150813_171453 (2).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the OLED display on the SPI port of the FRDM-KL25Z it works properly; when I use the same display or a twin one on the SPI0 port of the FRDM-K64F with the same code, all signals are correct except the MOSI one which is connected to the DIN line of the display: on the FRDM-K64F it appears greatly attenuated (almost with a factor of 10:1) or distorted with the shorter bits greatly attenuated and the display doesn't work at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried also to use a different code on the FRDM-K64F sending the result of a 16-bit incrementing counter on the MOSI line and the result is the same: the signal is greatly attenuated until the MOSI line is connected to the DIN line of the display:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20150813_171641.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52462i11B7ED5EE95CC199/image-size/large?v=v2&amp;amp;px=999" role="button" title="20150813_171641.jpg" alt="20150813_171641.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I disconnect the MOSI signal from the display, it returns normal:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20150813_171730.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52488i2E0C0BAFC44696EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="20150813_171730.jpg" alt="20150813_171730.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I recompile and load the same code on the FRDM-KL25Z, the MOSI signal is always perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: on both the previous pics the top waveform is the CS signal (used as the trigger) and the bottom signal is the MOSI one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simple code I use to generate the previous signals:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "mbed.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifdef TARGET_K64F&lt;/P&gt;&lt;P&gt;#define SPI_SCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD1&lt;/P&gt;&lt;P&gt;#define SPI_MOSI&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD2&lt;/P&gt;&lt;P&gt;#define SPI_MISO&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD3&lt;/P&gt;&lt;P&gt;#define SPI_CS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD0&lt;/P&gt;&lt;P&gt;#define I2C_SDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTE25&lt;/P&gt;&lt;P&gt;#define I2C_SCL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTE24&lt;/P&gt;&lt;P&gt;#define displayDC&amp;nbsp;&amp;nbsp; PTC4&lt;/P&gt;&lt;P&gt;#define displayRST&amp;nbsp; PTC3&lt;/P&gt;&lt;P&gt;#elif defined(TARGET_KL25Z)&lt;/P&gt;&lt;P&gt;#define SPI_SCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD1&lt;/P&gt;&lt;P&gt;#define SPI_MOSI&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD2&lt;/P&gt;&lt;P&gt;#define SPI_MISO&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD3&lt;/P&gt;&lt;P&gt;#define SPI_CS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTD0&lt;/P&gt;&lt;P&gt;#define I2C_SDA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTE0&lt;/P&gt;&lt;P&gt;#define I2C_SCL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTE1&lt;/P&gt;&lt;P&gt;#define displayDC&amp;nbsp;&amp;nbsp; PTD5&lt;/P&gt;&lt;P&gt;#define displayRST&amp;nbsp; PTA13&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DigitalOut myled(LED_GREEN);&lt;/P&gt;&lt;P&gt;DigitalOut spi_cs(SPI_CS);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t k = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi_cs = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi.format(8,3);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi.frequency(2000000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myled = !myled;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi_cs = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi.write((k &amp;amp; 0xff00) &amp;gt;&amp;gt; 8);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi.write(k &amp;amp; 0xff);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi_cs = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait(0.1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the schematic of the FRDM-K64F it seems that the MOSI line of the SPI0 peripheral (PD2) is connected directly to the Arduino-like header whitout any series resistor and the same is on the FRDM-KL25Z; no other onboard peripherals are connected to these lines on both board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, from the datasheet of the SSD1306, I read that the DIN signal is a normal digital input signal; no explicit note is reported about its input impedance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reasons I am unable to find the cause of the MOSI attenuation on the K64F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyone else that has tried to interface this kind of displays to the FRDM-K64F? If yes any hint will be appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 15:42:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439244#M25671</guid>
      <dc:creator>francescoadamo</dc:creator>
      <dc:date>2015-08-13T15:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439245#M25672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to enable the PTD2 pin internal pull up with PORTD_PCR2 register and check if with the same issue.&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 06:09:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439245#M25672</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-08-14T06:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439246#M25673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to apply your hint adding the following code immediately after the declaration of the variable k in the main routine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;#ifdef TARGET_K64F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;PORTD_PCR2 |= 0x03;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;#endif&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately nothing has changed: the MOSI/PTD2 signal appears in the same manner as I described in my first post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway for your answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439246#M25673</guid>
      <dc:creator>francescoadamo</dc:creator>
      <dc:date>2015-08-17T09:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439247#M25674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the feedback.&lt;/P&gt;&lt;P&gt;I will do a test on my site and check if PTD2 pin with same issue on my site.&lt;/P&gt;&lt;P&gt;While, for I was engaged in a training this week and could that test next Monday.&lt;/P&gt;&lt;P&gt;Thank you for the patience.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 01:51:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439247#M25674</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-08-19T01:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439248#M25675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your willingness; in the meantime I did some other tries in the attempt to solve the problem by myself:&lt;/P&gt;&lt;P&gt;- I soldered an external pull-up resistor to the MOSI line: NO SUCCESS&lt;/P&gt;&lt;P&gt;- I changed the FRDM-K64F board with a twin one: NO SUCCESS&lt;/P&gt;&lt;P&gt;- I changed the SPI port connecting the OLED display to the RF/WIFI connector (J6), so now SCK = PTD5, CS = PTC12, MOSI = PTD6: NO SUCCESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In all my tries the aspect of the MOSI signal when attached to the display is always the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other hint will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT: carefully reading the data sheet of the "K64 Sub-Family Reference Manual" (Rev. 2, January 2014, &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf&lt;/A&gt;) at page 283-284, I saw that in the PORTD_PCR2 register there is bit 6 named DSE (Drive Strength Enable), when set to 1, configures the high drive strength on the corresponding pin (PD2 in my case), if pin is configured as a digital output.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried to change the optional code valid only for FRDM-K64F to:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;#ifdef TARGET_K64F&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;PORTD_PCR2 |= 0x40;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Compiling the code, uploading it to the FRDM-K64F and capturing the MOSI signal on PD2 with the oscilloscope, it now appears exactly the same as the one I can see on the FRDM-KL25Z, even with PD2/MOSI connected to the display!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;At the moment the display doens't show any output but, now that the most difficult problem is solved, it is only a matter of time and.. patience!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I will write here the complete description of the problem when (if...) I find it.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 07:03:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439248#M25675</guid>
      <dc:creator>francescoadamo</dc:creator>
      <dc:date>2015-08-19T07:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439249#M25676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the latest updates, when you set the [Drive Strength Enable] bit in PORTD_PCR2 register, you could get the SPI_MOSI signal as expected. Right?&lt;/P&gt;&lt;P&gt;The high drive strength will enhance the drive capability from 2mA to 8mA.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 02:46:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439249#M25676</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-08-24T02:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439250#M25677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is the actual status of the problem: now I have a correct MOSI signal (as seen on the oscilloscope), but the display doesn't not display anithing yet; however I am working to solve this problem too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 08:53:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439250#M25677</guid>
      <dc:creator>francescoadamo</dc:creator>
      <dc:date>2015-08-25T08:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439251#M25678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad to inform you that finally I found the solution to this problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was related to an undocumented configuration of the SPI port of the OLED display: on both my display samples (manufactured by WaveShare, &lt;A href="http://www.wvshare.com/product/0.96inch-OLED-B.htm" title="http://www.wvshare.com/product/0.96inch-OLED-B.htm"&gt;.96inch OLED (B) | SPI I2C&lt;/A&gt; ) the DIN line was paralleled to some other internal signal by means of a 0R resistor (R1 in the following schematic diagram and pic):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Untitled-1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54780i7FD06496D4C5E4C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled-1.png" alt="Untitled-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a mixed signal oscilloscope I observed that the distortion of the DIN signal was limited to the initial part of the byte transferred from the FRDM-K64F to the display; carefully analyzing the circuit I found the 0R resistor and after its removal the display immediately started to work correctly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also verified that it is not necessary to enable the DSE bit of PORTD_PCR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Francesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:01:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439251#M25678</guid>
      <dc:creator>francescoadamo</dc:creator>
      <dc:date>2015-09-03T17:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SPI0 MOSI on a K64F</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439252#M25679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Francesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the update to let us know the root cause.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Sep 2015 04:49:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problems-with-SPI0-MOSI-on-a-K64F/m-p/439252#M25679</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2015-09-06T04:49:51Z</dc:date>
    </item>
  </channel>
</rss>

