<?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: SPI not working on twr-k70f120m tower module</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603821#M35519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Sorry for the late reply!&lt;BR /&gt;Would you please tell me which pin are you testing?&lt;BR /&gt;I test that SPIMaster_LDD polling example, there is clock coming on spi:clk pin(PTA15) of the board.&lt;/P&gt;&lt;P&gt;I have attach that project here, you can test it on your TWR-K70F120M board.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPIMaster_LDD polling.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6952iF5C73D1A8C51FF60/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPIMaster_LDD polling.png" alt="SPIMaster_LDD polling.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI clk PTA15.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6995iFDAC419630CD8382/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI clk PTA15.jpg" alt="SPI clk PTA15.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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, 17 Apr 2017 02:17:11 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2017-04-17T02:17:11Z</dc:date>
    <item>
      <title>SPI not working on twr-k70f120m tower module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603820#M35518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using kinetis design studio v3.2 and processor expert to write a code for spi on k70 chip (twr-k70f120m tower board) I have used the polling method example given by help component&lt;/P&gt;&lt;P&gt;but when i check there is no clock coming on spi:clk pin of the board&lt;/P&gt;&lt;P&gt;so to check whether program is running i also added a led blink code which blinks led every one second using timer interrupt,it is working but still no clock on spi:clk of the above board&lt;/P&gt;&lt;P&gt;What is missing in the code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I have used following component setup as per the example&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Interrupt service/event&lt;/STRONG&gt;: Disabled &lt;BR /&gt;&lt;STRONG&gt;Input pin&lt;/STRONG&gt;: Enabled &lt;BR /&gt;&lt;STRONG&gt;Output pin&lt;/STRONG&gt;: Enabled &lt;BR /&gt;&lt;STRONG&gt;Attribute set list&lt;/STRONG&gt;: 2 &lt;BR /&gt;&lt;STRONG&gt;Attribute set 0 and 1&lt;/STRONG&gt;: configured as slaves require &lt;BR /&gt;&lt;STRONG&gt;Width&lt;/STRONG&gt;: 8 bits &lt;BR /&gt;&lt;STRONG&gt;Enabled in init. code&lt;/STRONG&gt;: yes &lt;BR /&gt;&lt;STRONG&gt;Event mask/OnError&lt;/STRONG&gt;: Enabled &lt;BR /&gt;&lt;STRONG&gt;Methods&lt;/STRONG&gt;: SendBlock, ReceiveBlock, GetBlockReceivedStatus, GetError &lt;BR /&gt;&lt;STRONG&gt;Events&lt;/STRONG&gt;: OnError&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following is main.c&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#include "Cpu.h"&lt;BR /&gt;#include "Events.h"&lt;BR /&gt;#include "SM1.h"&lt;BR /&gt;#include "Bit1.h"&lt;BR /&gt;#include "BitIoLdd1.h"&lt;BR /&gt;#include "TI1.h"&lt;BR /&gt;#include "TimerIntLdd1.h"&lt;BR /&gt;#include "TU1.h"&lt;BR /&gt;/* Including shared modules, which are used for whole project */&lt;BR /&gt;#include "PE_Types.h"&lt;BR /&gt;#include "PE_Error.h"&lt;BR /&gt;#include "PE_Const.h"&lt;BR /&gt;#include "IO_Map.h"&lt;/P&gt;&lt;P&gt;#define BLOCK_SIZE 4&lt;BR /&gt;uint8_t OutData[BLOCK_SIZE] = "0123";&lt;BR /&gt;uint8_t InpData[BLOCK_SIZE];&lt;BR /&gt;volatile LDD_SPIMASTER_TError ComError = 0U;&lt;BR /&gt;LDD_TError Error;&lt;BR /&gt;LDD_TDeviceData *MySPIPtr;&lt;BR /&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/P&gt;&lt;P&gt;/*lint -save -e970 Disable MISRA rule (6.3) checking. */&lt;BR /&gt;void main(void)&lt;BR /&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;BR /&gt;{&lt;BR /&gt; /* Write your local variable definition here */&lt;/P&gt;&lt;P&gt;/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt; PE_low_level_init();&lt;BR /&gt; /*** End of Processor Expert internal initialization. ***/&lt;/P&gt;&lt;P&gt;/* Write your code here */&lt;BR /&gt; /* For example: for(;;) { } */&lt;/P&gt;&lt;P&gt;MySPIPtr = SM1_Init(NULL);&lt;BR /&gt; SM1_Enable(MySPIPtr) ;/* Initialization of SM1 component */&lt;BR /&gt; //SM1_Sel; /* Select chip select 0 and attribute set 0 */&lt;BR /&gt; Error = SM1_ReceiveBlock(MySPIPtr, InpData, BLOCK_SIZE); /* Request data block reception */&lt;BR /&gt; Error = SM1_SendBlock(MySPIPtr, OutData, BLOCK_SIZE); /* Start transmission/reception */&lt;BR /&gt; while (!SM1_GetBlockReceivedStatus(MySPIPtr)) { /* Wait until data block is transmitted/received */&lt;BR /&gt; SM1_Main(MySPIPtr);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;for(;;){}&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;BR /&gt;} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/P&gt;&lt;P&gt;/* END main */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Following is event.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#include "Cpu.h"&lt;BR /&gt;#include "Events.h"&lt;/P&gt;&lt;P&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Cpu_OnNMIINT(void)&lt;BR /&gt;{&lt;BR /&gt; /* Write your code here ... */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;** ===================================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void SM1_OnBlockSent(LDD_TUserData *UserDataPtr)&lt;BR /&gt;{&lt;BR /&gt; /* Write your code here ... */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;void SM1_OnBlockReceived(LDD_TUserData *UserDataPtr)&lt;BR /&gt;{&lt;BR /&gt; /* Write your code here ... */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;extern volatile LDD_SPIMASTER_TError ComError;&lt;BR /&gt;extern LDD_TError Error;&lt;BR /&gt;extern LDD_TDeviceData *MySPIPtr;&lt;/P&gt;&lt;P&gt;void SM1_OnError(LDD_TUserData *UserDataPtr)&lt;BR /&gt;{&lt;BR /&gt; Error = SM1_GetError(MySPIPtr, (LDD_SPIMASTER_TError *)&amp;amp;ComError); /* Get communication errors if occured */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;void TI1_OnInterrupt(void)&lt;BR /&gt;{&lt;BR /&gt; Bit1_NegVal(); /* Write your code here ... */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* END Events */&lt;/P&gt;&lt;P&gt;#ifdef __cplusplus&lt;BR /&gt;} /* extern "C" */&lt;BR /&gt;#endif&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 06:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603820#M35518</guid>
      <dc:creator>sameerarvikar</dc:creator>
      <dc:date>2017-04-12T06:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPI not working on twr-k70f120m tower module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603821#M35519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Sorry for the late reply!&lt;BR /&gt;Would you please tell me which pin are you testing?&lt;BR /&gt;I test that SPIMaster_LDD polling example, there is clock coming on spi:clk pin(PTA15) of the board.&lt;/P&gt;&lt;P&gt;I have attach that project here, you can test it on your TWR-K70F120M board.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPIMaster_LDD polling.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6952iF5C73D1A8C51FF60/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPIMaster_LDD polling.png" alt="SPIMaster_LDD polling.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI clk PTA15.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6995iFDAC419630CD8382/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI clk PTA15.jpg" alt="SPI clk PTA15.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&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, 17 Apr 2017 02:17:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603821#M35519</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-04-17T02:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPI not working on twr-k70f120m tower module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603822#M35520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;I am using ptd12 pin i.e the right twrpi socket pin&lt;/P&gt;&lt;P&gt;and where is attached project&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 04:43:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603822#M35520</guid>
      <dc:creator>sameerarvikar</dc:creator>
      <dc:date>2017-04-28T04:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: SPI not working on twr-k70f120m tower module</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603823#M35521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was in my last reply.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Attachments.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14310i2BA782ED8515294A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attachments.png" alt="Attachments.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2017 09:02:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-not-working-on-twr-k70f120m-tower-module/m-p/603823#M35521</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2017-04-28T09:02:31Z</dc:date>
    </item>
  </channel>
</rss>

