<?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: MPC5744P SPI in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694046#M8640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;Could you please send me one of your SPI? Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;If the library function version is better&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Oct 2017 03:49:28 GMT</pubDate>
    <dc:creator>金广陈</dc:creator>
    <dc:date>2017-10-16T03:49:28Z</dc:date>
    <item>
      <title>MPC5744P SPI</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694043#M8637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to program for MPC5744 SPI, now I can get the SCK but I can't test any signal from the SOUT pin .&lt;/P&gt;&lt;P&gt;wenn I write to PUSHR, I see the TXFR get the correct data, but it doesn't send it, even all the 5 TXFR is filled. &amp;nbsp;Please help me. thank you!&lt;/P&gt;&lt;P&gt;hier is my code:&lt;/P&gt;&lt;P&gt;#include "derivative.h" /* include peripheral declarations */&lt;/P&gt;&lt;P&gt;unsigned int data;&lt;BR /&gt;void sys_config(void)&lt;BR /&gt;{&lt;BR /&gt; MC_ME.RUN_PC[0].B.DRUN=1;//open all pheriphral clock in DRUN mode&lt;BR /&gt; MC_ME.DRUN_MC.B.SYSCLK=2;//use pll0 to SYSCLK&lt;/P&gt;&lt;P&gt;//config PLL0 200Mhz&lt;BR /&gt; MC_ME.DRUN_MC.B.XOSCON=1;//Open XOSC in DRUN mode&lt;BR /&gt; MC_CGM.AC3_SC.B.SELCTL=1;//select XOSC as source of pll0;&lt;BR /&gt; PLLDIG.PLL0DV.R = 0x50000000 |0x00020000 |0x00002000 |0x0014 ; //predefined PLL0 divider register&lt;BR /&gt; MC_ME.DRUN_MC.B.PLL0ON=1;//Enable pll0;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt; //config ADC_CLK&lt;BR /&gt; MC_CGM.AC0_SC.B.SELCTL=2;//Select pll0 as ADC_clk source&lt;BR /&gt; MC_CGM.AC0_DC2.R=0x80010000;// ADC_CLK=PLL0/(1+1)&lt;BR /&gt; */&lt;/P&gt;&lt;P&gt;//config DSPI_CLK&lt;BR /&gt; MC_CGM.SC_DC0.R=0x80030000;//set PBRIDGEx_CLK 50mhz&lt;/P&gt;&lt;P&gt;//enter DRUN&lt;BR /&gt; MC_ME.MCTL.R = 0x30005AF0;&lt;BR /&gt; MC_ME.MCTL.R = 0x3000A50F;&lt;/P&gt;&lt;P&gt;//wait until done&lt;BR /&gt; while(!MC_ME.GS.B.S_PLL0); //ME_GS Wait for PLL stabilization.&lt;BR /&gt; while(MC_ME.GS.B.S_MTRANS);//Waiting for end of transaction&lt;BR /&gt; while(MC_ME.GS.B.S_CURRENT_MODE != 0x3);// ME_GS Check DRUN mode has successfully been entered&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void SPI0_padconfig()&lt;BR /&gt;{&lt;BR /&gt; //config DSPI0&lt;BR /&gt; //config CS0&lt;BR /&gt; SIUL2.MSCR[36].B.SSS = 1; //Config C[4] as CS0&lt;BR /&gt; SIUL2.MSCR[36].B.OBE = 1; //Enable output buffer&lt;BR /&gt; SIUL2.MSCR[36].B.SRC = 3; // Full strength slew rate&lt;/P&gt;&lt;P&gt;SIUL2.MSCR[37].B.SSS = 1; //C[5] as SCK&lt;BR /&gt; SIUL2.MSCR[37].B.OBE = 1; //Enable output buffer&lt;BR /&gt; SIUL2.MSCR[37].B.SRC = 3; // Full strength slew rate&lt;/P&gt;&lt;P&gt;SIUL2.MSCR[38].B.SSS = 2; //C[6] as SOUT&lt;BR /&gt; SIUL2.MSCR[38].B.OBE = 1; //Enable output buffer&lt;BR /&gt; SIUL2.MSCR[38].B.SRC = 3; // Full strength slew rate&lt;/P&gt;&lt;P&gt;SIUL2.MSCR[39].B.IBE = 1; //Enable input buffer of C[7]&lt;BR /&gt; SIUL2.IMCR[41].B.SSS = 1; //C[7] as input pin SIN&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void init_SPI0()&lt;BR /&gt;{&lt;BR /&gt; SPI_0.MCR.R = 0x80000001; //master mode, halt&lt;BR /&gt; SPI_0.MODE.CTAR[0].R = 0x78021004; //config baud rate&lt;BR /&gt; //DBR=0,FMSZ=1111,CPOL=0,CPHA=0,LSBFE=0,PCSSCK=00,PASC=00,PDT=00,PBR=10&lt;BR /&gt; //CSSCK=0001,ASC=0000,DT=0000,BR=0100&lt;BR /&gt; SPI_0.MCR.B.HALT = 0x0; //start spi0&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void read_data_SPI_0(void)&lt;BR /&gt;{&lt;BR /&gt; while (SPI_0.SR.B.RFDF != 1){} //Wait for Receive FIFO Drain Flag = 1&lt;BR /&gt; data =SPI_0.POPR.R; //Read received data&lt;BR /&gt; SPI_0.SR.R = 0xDA0A0000; // Clear ALL status flags by writing 1 to them&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; int cont;&lt;BR /&gt; sys_config();&lt;BR /&gt; SPI0_padconfig();&lt;BR /&gt; init_SPI0();&lt;BR /&gt; /* Loop forever */&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt; SPI_0.PUSHR.PUSHR.R = 0x08015678; // Transmit data&lt;BR /&gt; cont=SPI_0.SR.B.TXCTR;&lt;BR /&gt; while(SPI_0.SR.B.TCF!=1); //Wait for transfer complete&lt;BR /&gt; read_data_SPI_0();&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 07:04:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694043#M8637</guid>
      <dc:creator>donnerx</dc:creator>
      <dc:date>2017-05-28T07:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P SPI</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694044#M8638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find the reason.. I write the code&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;SIUL2.MSCR[38].B.SSS = 2; //C[6] as SOUT, it should be&amp;nbsp;&lt;SPAN&gt;SIUL2.MSCR[38].B.SSS = 1; //C[6] as SOUT.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Then , C[6] is used as SOUT.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2017 08:19:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694044#M8638</guid>
      <dc:creator>donnerx</dc:creator>
      <dc:date>2017-05-28T08:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P SPI</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694045#M8639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;能把你的SPI 程序发给我一个吗 谢谢啦&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 02:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694045#M8639</guid>
      <dc:creator>金广陈</dc:creator>
      <dc:date>2017-10-16T02:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P SPI</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694046#M8640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;Hi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;Could you please send me one of your SPI? Thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2e3033; font-family: Arial, 'Microsoft YaHei', 微软雅黑, 宋体, 'Malgun Gothic', Meiryo, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #eef0f2; display: inline !important; float: none;"&gt;If the library function version is better&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 03:49:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-SPI/m-p/694046#M8640</guid>
      <dc:creator>金广陈</dc:creator>
      <dc:date>2017-10-16T03:49:28Z</dc:date>
    </item>
  </channel>
</rss>

