<?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: How to read sensor's registers using SPI and Processor Expert ? in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301262#M633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui Ma&lt;/P&gt;&lt;P&gt;Thanks for the important notice that FXOS8700CQ supports only 1 master and 1 slave in both SPI as well as I2C mode So I will connect this with a dedicated SPI. For the rest of the sensors I will connect to another SPI bus. Here I am facing another issue , my CS pin is not going low. I have configured it through internal SPI's chip select pin. The above waveforms shown is when nothing is connected to that pin. i.e no sensor is connected to PTDO. I tried using both &lt;STRONG&gt;Synchromaster &lt;/STRONG&gt;and &lt;STRONG&gt;SPIMaster_LDD &lt;/STRONG&gt;I don't know what I am doing wrong. May be because I Have configured it and I am not using any of its function in the above program, instead I am using functions from SPI_PDD. Can that be the reason ? If so How to do chip select using SPI_PDD component ? I also tried the same using the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPI_PDD_SetChipSelectInactiveStateMask(SPI0_BASE_PTR, SPI_PDD_CHIP_SELECT_0, SPI_PDD_CHIP_SELECT_0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this also didn't work. One last question In the above waveforms when the MISO is sending data , initially there is a small fluctuation for the first 8 bits with very low amplitude then the data signal is send. So is there any way to suppress that? I tried adding 10K pull up it didn't work then also tried it with 10k pull down but not much effective. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Amit Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Apr 2014 10:37:14 GMT</pubDate>
    <dc:creator>Amit_Kumar1</dc:creator>
    <dc:date>2014-04-25T10:37:14Z</dc:date>
    <item>
      <title>How to read sensor's registers using SPI and Processor Expert ?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301258#M629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;attached Image shows the timing diagram for SPI sensor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="11131_11131.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119774i446C7B3ED6C2273D/image-size/large?v=v2&amp;amp;px=999" role="button" title="11131_11131.jpg" alt="11131_11131.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI diagram.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44135i7A29412D2D897E24/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI diagram.jpg" alt="SPI diagram.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the register values for read/write operation is given below&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="11132_11132.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119775i1BD7C10E190D153D/image-size/large?v=v2&amp;amp;px=999" role="button" title="11132_11132.jpg" alt="11132_11132.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Timing registers.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44197iE1E051310C25FC82/image-size/large?v=v2&amp;amp;px=999" role="button" title="Timing registers.jpg" alt="Timing registers.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="western"&gt;Right now I wanted to extract values from &lt;STRONG&gt;0x20&lt;/STRONG&gt; for that I am writing the following code, Aslo I have tried with 0x2000(i.e from the above register values 100000 00000000) instead of 0xE000 (11100000 00000000)&amp;nbsp; in the following code but it didn't work&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; rbuff[5];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;LDD_TDeviceData&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *Sensor;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*lint -save -e970 Disable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;main&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* Write your local variable definition here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. DON'T REMOVE THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;PE_low_level_init();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;Sensor = SM1_Init(NULL);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** End of Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* Write your code here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(;;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; SM1_SendBlock(Sensor, 0xE000, 2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; SM1_ReceiveBlock(Sensor, rbuff, &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;sizeof&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(rbuff));&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #642880;"&gt;&lt;STRONG&gt;printf&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff;"&gt;"%s\n"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, rbuff);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; WAIT1_Waitms(100);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#ifdef&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; PEX_RTOS_START&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: Courier New,monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;PEX_RTOS_START(); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** End of RTOS startup code. ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(;;){}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #000000;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;BR /&gt; But I am not receiving any thing right now, Can anyone help me out in this?&lt;/P&gt;&lt;P class="western" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="western"&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P class="western"&gt;Amit Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 06:22:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301258#M629</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-04-21T06:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to read sensor's registers using SPI and Processor Expert ?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301259#M630</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;I find your attached SPI timing is so strange, the correct one should same with below picture:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI_timing_diagram.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43877i1A26A1C70BDE855A/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI_timing_diagram.png" alt="SPI_timing_diagram.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;BR /&gt; &lt;BR /&gt;Best regards,&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>Thu, 24 Apr 2014 04:38:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301259#M630</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-04-24T04:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to read sensor's registers using SPI and Processor Expert ?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301260#M631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using &lt;STRONG&gt;Synchromaster&lt;/STRONG&gt;&amp;nbsp; SPI component for SPI and following is the settings, When I probed the CS pin I found it is at one steady state of logic high. It is not changing its logic level. I somehow managed to get the o/p from slave's WHO_AM_I register but when I am leaving cs pin floating then only I am getting the values that too with uncertainty. Sometimes the values come but some times 0x00. the occurrence is not proper,I tried with external bit_io pin as cs pin but that also didn't worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="spi-setting.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44359i820D2E2D373918A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="spi-setting.jpg" alt="spi-setting.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the waveform of SCLK-MOSI is following, here I am sending 0xA0FF value . Starting A0--&amp;gt; r/w + other register's address as discussed above. FF--&amp;gt; these are don't care bits.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scl-mosi.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/42889iF88A16D823A8F956/image-size/large?v=v2&amp;amp;px=999" role="button" title="scl-mosi.JPG.jpg" alt="scl-mosi.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the waveform of sclk-MISO is following. In this as per the diagram mentioned earlier the data bits are acquired in the last 8 bits. The response as expected was 0xB1 which I am getting some times.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scl-miso.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44360iE54BE63F90C83242/image-size/large?v=v2&amp;amp;px=999" role="button" title="scl-miso.JPG.jpg" alt="scl-miso.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the value dosen't come then waveform for sclk-MISO is following. Here I am getting 0x00&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scl-miso-not-working.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43441i613E46EC3E02A161/image-size/large?v=v2&amp;amp;px=999" role="button" title="scl-miso-not-working.JPG.jpg" alt="scl-miso-not-working.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the combined waveform of MOSI-MISO is following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Mosi-miso.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43686iD7F8D48ADABF66EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mosi-miso.JPG.jpg" alt="Mosi-miso.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned the CS pin (here PTD0) is not working it is by default in disable state so its waveform is below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SCLK-CS.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43740i4E7D000C118E1804/image-size/large?v=v2&amp;amp;px=999" role="button" title="SCLK-CS.JPG.jpg" alt="SCLK-CS.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Current code which is using the SPI_PDD . thanks to &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;for his link for PDD driver is below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #005032;"&gt;int32_t&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; i;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*lint -save -e970 Disable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;main&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* Write your local variable definition here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. DON'T REMOVE THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;PE_low_level_init();&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** End of Processor Expert internal &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; text-decoration: underline;"&gt;initialization&lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;. ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/* Write your code here */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(;;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; SPI_PDD_WriteSlaveData16Bits(SPI0_BASE_PTR, 0xA0FF);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; i = SPI_PDD_ReadData8bits(SPI0_BASE_PTR);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #642880; text-decoration: underline;"&gt;&lt;STRONG&gt;printf&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; text-decoration: underline;"&gt;"0x%0X\n"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; text-decoration: underline;"&gt;,i);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New,monospace;"&gt; WAIT1_Waitms(400);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;#ifdef&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; PEX_RTOS_START&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN style="font-family: Courier New,monospace;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;PEX_RTOS_START(); &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #7f0055; font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** End of RTOS startup code. ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #7f0055;"&gt;&lt;STRONG&gt;for&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(;;){}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: 10pt; font-family: Courier New,monospace;"&gt;/*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New,monospace;"&gt;&lt;SPAN style="color: #000000;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f;"&gt;/*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;the o/p in terminal window (when CS pin is floating)&lt;/P&gt;&lt;P class="western"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="hterm.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43787iDB6CE41470D30251/image-size/large?v=v2&amp;amp;px=999" role="button" title="hterm.jpg" alt="hterm.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;When CS pin connected to 0 or 3.3V I am getting the following o/p&lt;/P&gt;&lt;P class="western"&gt;&lt;/P&gt;&lt;P class="western"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="paint.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43788i6AE67882C1FD7ED8/image-size/large?v=v2&amp;amp;px=999" role="button" title="paint.jpg" alt="paint.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="western"&gt;Regards&lt;/P&gt;&lt;P class="western"&gt;Amit Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 10:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301260#M631</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-04-24T10:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to read sensor's registers using SPI and Processor Expert ?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301261#M632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FXOS8700CQ datasheet shows FXOS8700CQ only supports a point-to-point SPI protocol, with only one master (MCU) and one slave device (FXOS8700CQ) present on the bus. The CS_B pin is driven low at the start of a SPI transaction, held low for the duration of the transaction, and driven high after the transaction is complete. &lt;/P&gt;&lt;P&gt;From your description, it should use SPI CS pin during the communication.&lt;/P&gt;&lt;P&gt;More detailed info, please check below link chapter 5.2.1 General SPI operation:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf"&gt;http://cache.freescale.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt; &lt;BR /&gt;Best regards,&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, 25 Apr 2014 09:18:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301261#M632</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-04-25T09:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to read sensor's registers using SPI and Processor Expert ?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301262#M633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hui Ma&lt;/P&gt;&lt;P&gt;Thanks for the important notice that FXOS8700CQ supports only 1 master and 1 slave in both SPI as well as I2C mode So I will connect this with a dedicated SPI. For the rest of the sensors I will connect to another SPI bus. Here I am facing another issue , my CS pin is not going low. I have configured it through internal SPI's chip select pin. The above waveforms shown is when nothing is connected to that pin. i.e no sensor is connected to PTDO. I tried using both &lt;STRONG&gt;Synchromaster &lt;/STRONG&gt;and &lt;STRONG&gt;SPIMaster_LDD &lt;/STRONG&gt;I don't know what I am doing wrong. May be because I Have configured it and I am not using any of its function in the above program, instead I am using functions from SPI_PDD. Can that be the reason ? If so How to do chip select using SPI_PDD component ? I also tried the same using the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPI_PDD_SetChipSelectInactiveStateMask(SPI0_BASE_PTR, SPI_PDD_CHIP_SELECT_0, SPI_PDD_CHIP_SELECT_0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this also didn't work. One last question In the above waveforms when the MISO is sending data , initially there is a small fluctuation for the first 8 bits with very low amplitude then the data signal is send. So is there any way to suppress that? I tried adding 10K pull up it didn't work then also tried it with 10k pull down but not much effective. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Amit Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 10:37:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-read-sensor-s-registers-using-SPI-and-Processor-Expert/m-p/301262#M633</guid>
      <dc:creator>Amit_Kumar1</dc:creator>
      <dc:date>2014-04-25T10:37:14Z</dc:date>
    </item>
  </channel>
</rss>

