<?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>LPC Microcontrollers中的主题 Re: LPCopen Sdcard on LPC15xx</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579021#M19938</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Wed Apr 23 00:10:14 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed the&amp;nbsp; _WFI loop but it wasnt the cause for the delay. The time between two byte excnage is still around 13uS which is too much.&amp;nbsp; Perhaps a new optimised instance of Chip_SPI_Int_RWFrames&amp;nbsp; must be created &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;Status Chip_SPI_Int_RWFrames(LPC_SPI_T *pSPI, SPI_DATA_SETUP_T *pXfSetup)
{
uint32_t Status;

Status = Chip_SPI_GetStatus(pSPI);
/* Check&amp;nbsp; error in STAT register */
if (Status &amp;amp; (SPI_STAT_RXOV | SPI_STAT_TXUR)) {
/* Clear errors */
Chip_SPI_ClearStatus(pSPI, SPI_STAT_CLR_RXOV | SPI_STAT_CLR_TXUR);
return ERROR;
}

if (pXfSetup-&amp;gt;TxCnt == 0) {
if (pXfSetup-&amp;gt;pRx == NULL) {
Chip_SPI_SetControlInfo(pSPI, pXfSetup-&amp;gt;DataSize, pXfSetup-&amp;gt;ssel | SPI_TXCTL_EOF | SPI_TXCTL_RXIGNORE);
}
else {
Chip_SPI_SetControlInfo(pSPI, pXfSetup-&amp;gt;DataSize, pXfSetup-&amp;gt;ssel | SPI_TXCTL_EOF);
}
}

if (pXfSetup-&amp;gt;pRx == NULL) {
if ((Status &amp;amp; SPI_STAT_TXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;TxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Send_Data_RxIgnore(pSPI, pXfSetup);
}
}
else {
/* check if Tx ready */
if ((Status &amp;amp; SPI_STAT_TXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;TxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Send_Data(pSPI, pXfSetup);
}

/* check if RX FIFO contains data */
if ((Status &amp;amp; SPI_STAT_RXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;RxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Receive_Data(pSPI, pXfSetup);
}
}

return SUCCESS;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:18:38 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:18:38Z</dc:date>
    <item>
      <title>LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579010#M19927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Tue Apr 08 04:08:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Have someone used sdcard with lpc open files on the new micro controllers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boyko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579010#M19927</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579011#M19928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Thu Apr 17 06:30:32 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is the prototype for&amp;nbsp; SPI function in LPC open:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/* Interrupt error code (used as semaphore) */
static volatile int intErrCode;
/* SPI Transfer Setup */
static SPI_DATA_SETUP_T spi1Setup;
uint8_t rx_buff[100];
 void WriteSpiMssg(uint16_t *xferPtr, uint32_t xferSize)
 {
 /* Init variable used as semaphore */
 intErrCode = -1;
 // Setup Transfer structure, this data should be retained for the entire transmission
 spi1Setup.pTx = xferPtr;//Transmit Buffer
 spi1Setup.pRx = rx_buff;//Receive Buffer
 spi1Setup.DataSize =8;//Data size ( bits)
 spi1Setup.Length = xferSize;//total frame length
 spi1Setup.ssel = SPI_TXCTL_ASSERT_SSEL0 | SPI_TXCTL_DEASSERT_SSEL1 | SPI_TXCTL_DEASSERT_SSEL2 | SPI_TXCTL_DEASSERT_SSEL3; //assert SSEL0
 spi1Setup.TxCnt = 0;
 spi1Setup.RxCnt = 0;
 if (Chip_SPI_Int_RWFrames(LPC_SPI1, &amp;amp;spi1Setup) == ERROR) {
 errorSPI();
 }
 
 Chip_SPI_Int_Cmd(LPC_SPI1, SPI_INTENSET_RXRDYEN | SPI_INTENSET_TXRDYEN | SPI_INTENSET_RXOVEN | SPI_INTENSET_TXUREN, ENABLE);
 // Enable Interrupt when receiver data is available
 // Enable Interrupt when the transmitter holding register is available.
 // Enable Interrupt when a receiver overrun occurs
 // Enable Interrupt when a transmitter underrun occurs (In Slave Mode Only)

 /* Sleep until transfer is complete, but allow IRQ to wake system
&amp;nbsp;&amp;nbsp;&amp;nbsp; to handle SPI IRQ */
 while (intErrCode == -1) {
 __WFI();
 }
 uint8_t SPIReceiveByte(uint8_t data)
 {
 WriteSpiMssg(data, 1);

&amp;nbsp; return *rx_buff;
 }

 void SPI1_IRQHandler(void)
 {
 uint32_t i;

 if (spi1Setup.RxCnt &amp;lt; spi1Setup.Length) {
 /* Call driver function until transmission is complete */
 if (Chip_SPI_Int_RWFrames(LPC_SPI1, &amp;amp;spi1Setup) == ERROR) {
 errorSPI();
 }
 }
 else {
 /* Disable interrupts after transmission is complete */
 Chip_SPI_Int_Cmd(LPC_SPI1, SPI_INTENSET_RXRDYEN | SPI_INTENSET_TXRDYEN | SPI_INTENSET_RXOVEN | SPI_INTENSET_TXUREN, DISABLE);
&amp;nbsp; 
 intErrCode = (int) LPC_OK;
 }
 }
 }&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;Why simple byte exchange like the one&amp;nbsp; below doesn't work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt; uint8_t SPIReceiveByte(uint8_t data)
 {
 WriteSpiMssg(data, 1);

return *rx_buff;
 }&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sorry if it is something obvious but when it gets to pointers and arrays my head gets dizzy.&amp;nbsp; SPIReceiveByte is the core of my working sdcard library (at least it was working with lpc1343).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will appreciate any assistance or guidance how i can get my code up and running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boyko&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579011#M19928</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579012#M19929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Thu Apr 17 17:46:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Greetings Boyko,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My guess is you are getting compile errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that the structure members spi1Setup.pTx and spi1Setup.pRx are pointers to uint16_t not uint8_t (word pointers not byte pointers).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Likewise the xferPtr parameter to WriteSpiMssg() is a pointer to a uint16_t (not uint8_t).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The array rx_buff[] is defined as an array of type uint8_t.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get this to compile, try these changes...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;//&amp;nbsp;&amp;nbsp; This needs to be an array of words...
//
uint16_t rx_buff[100];

&amp;lt;snip&amp;gt;

//&amp;nbsp;&amp;nbsp; Note the type changes here as well...
//
uint8_t SPIReceiveByte(uint8_t data)
{
//&amp;nbsp;&amp;nbsp; Must send a pointer to a word to WriteSpiMssg.
// put the value to send in a word.
//
uint16_t wordToSend = data;

//&amp;nbsp;&amp;nbsp; Pass the address of wordToSend (the pointer to wordToSend).
// 
WriteSpiMssg( &amp;amp;wordToSend, 1);

return (uint8_t) rx_buff[0];
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't expect this to fix everything.&amp;nbsp; But it will at least get it to compile.&amp;nbsp; You then probably have some debug to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579012#M19929</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579013#M19930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Fri Apr 18 10:04:44 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words...&amp;nbsp; the Chip_SPI_xxx routines operate on 16 bit words (uint16_t), not 8 bit bytes (uint8_t).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579013#M19930</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579014#M19931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Fri Apr 18 12:07:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the answer. Otherwise said the sd card lib cannot be made to work effectivly with the spi from lpc ooen lib. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boyko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579014#M19931</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579015#M19932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Fri Apr 18 14:16:03 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the sd card lib supplied by NXP?&amp;nbsp; (If so, what version? Which device?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, which version/device of LPC Open?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579015#M19932</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579016#M19933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Sat Apr 19 03:32:33 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, I have sd lib that i used with my lpc1343. The core of its structure was simple byte exchange(spi send and receive) . but now when i migrated to lpc1549 and lpc open (2.08b) things are done differently.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579016#M19933</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579017#M19934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Sat Apr 19 04:07:08 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sorry, I have not used the LPC1549 before, but what is so different to LPC1343? The SPI itself is usually not so different, therefore easy to port.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And SPI is only a very small part of the complete SD-Card implemention. Which problem occured?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579017#M19934</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579018#M19935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Tue Apr 22 00:31:30 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the changes to the code,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but sending two bytes brings a lot of delay between the two transmissions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;here i am calling it with a RIT interrupt and there is significant delay between the two bytes. ( probably because the spi submits&amp;nbsp; 16 bits)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void RIT_IRQHandler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Clear interrupt */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_RIT_ClearIntStatus(LPC_RITIMER);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SPIReceiveByte(0xBB);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SPIReceiveByte(0xCC);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boyko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579018#M19935</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579019#M19936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Tue Apr 22 09:40:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Boyko,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SPIRecieveByte() isn't really designed to be called from interrupt context.&amp;nbsp; Notice that at the end of WriteSpiMssg() (called by SPIReceiveByte()) there is a while loop that calls __WFI().&amp;nbsp; That's usually a bad thing to do in an ISR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It might be possible to get this to work.&amp;nbsp; The SPI interrupt will need to be at a higher priority than the RIT.&amp;nbsp; But such a design is usually deprecated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579019#M19936</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579020#M19937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Tue Apr 22 10:42:29 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The simple byte exchange method seems fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It should continue to work fine on LPC1549 and LPC open 2.x.&amp;nbsp; Your approach is good.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579020#M19937</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579021#M19938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bobi-one on Wed Apr 23 00:10:14 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed the&amp;nbsp; _WFI loop but it wasnt the cause for the delay. The time between two byte excnage is still around 13uS which is too much.&amp;nbsp; Perhaps a new optimised instance of Chip_SPI_Int_RWFrames&amp;nbsp; must be created &lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;Status Chip_SPI_Int_RWFrames(LPC_SPI_T *pSPI, SPI_DATA_SETUP_T *pXfSetup)
{
uint32_t Status;

Status = Chip_SPI_GetStatus(pSPI);
/* Check&amp;nbsp; error in STAT register */
if (Status &amp;amp; (SPI_STAT_RXOV | SPI_STAT_TXUR)) {
/* Clear errors */
Chip_SPI_ClearStatus(pSPI, SPI_STAT_CLR_RXOV | SPI_STAT_CLR_TXUR);
return ERROR;
}

if (pXfSetup-&amp;gt;TxCnt == 0) {
if (pXfSetup-&amp;gt;pRx == NULL) {
Chip_SPI_SetControlInfo(pSPI, pXfSetup-&amp;gt;DataSize, pXfSetup-&amp;gt;ssel | SPI_TXCTL_EOF | SPI_TXCTL_RXIGNORE);
}
else {
Chip_SPI_SetControlInfo(pSPI, pXfSetup-&amp;gt;DataSize, pXfSetup-&amp;gt;ssel | SPI_TXCTL_EOF);
}
}

if (pXfSetup-&amp;gt;pRx == NULL) {
if ((Status &amp;amp; SPI_STAT_TXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;TxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Send_Data_RxIgnore(pSPI, pXfSetup);
}
}
else {
/* check if Tx ready */
if ((Status &amp;amp; SPI_STAT_TXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;TxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Send_Data(pSPI, pXfSetup);
}

/* check if RX FIFO contains data */
if ((Status &amp;amp; SPI_STAT_RXRDY) &amp;amp;&amp;amp; (pXfSetup-&amp;gt;RxCnt &amp;lt; pXfSetup-&amp;gt;Length)) {
SPI_Receive_Data(pSPI, pXfSetup);
}
}

return SUCCESS;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579021#M19938</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen Sdcard on LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579022#M19939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gideon196 on Wed Apr 23 15:29:59 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It isn't specifically the _WFI() that is deprecated.&amp;nbsp; It's invoking and waiting for a lengthy interrupt driven process from another interrupt service routine that's the issue.&amp;nbsp; At minimum, such a design requires nested interrupts, careful tuning of interrupt priorities and exhaustive design review to make sure the rest of the system has adequate interrupt latency/response times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this is a separate issue from the 13uS delay between frames.&amp;nbsp; Because it works at all (it doesn't hang) the interrupt priorities must be OK--the SPI interrupt is able to interrupt the RIT interrupt service routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You might try using Chip_SPI_RWFrames_Blocking() instead of Chip_SPI_Int_RWFrames().&amp;nbsp; The transfers&amp;nbsp; in this function are done using polling techniques rather than being interrupt driven.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This approach will still spend longer in the RIT interrupt service routine than I would recommend (the duration of two SPI frames), but I would like to find out if this reduces the delay between frames.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-Sdcard-on-LPC15xx/m-p/579022#M19939</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:38Z</dc:date>
    </item>
  </channel>
</rss>

