# Q2687 SPI Problem

**URL:** <https://forum.sierrawireless.com/t/q2687-spi-problem/3545>\
**Category:** Legacy AirPrime modules\
**Created:** [August 10, 2009, 1:31pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545 "2009-08-10T13:31:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eraser](https://avatars.discourse-cdn.com/v4/letter/e/c4cdca/32.png) [@Eraser](https://forum.sierrawireless.com/u/Eraser)\
**Post date:** [August 10, 2009, 1:31pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/1 "2009-08-10T13:31:08Z")

</div>

I am trying to interface an ENC28J60 from MicroChip with  
Q26 Developement Board.

The only thing I can read is 0x0 , and i believe that the board doesn’t generate  
the Clock Signal .  
I’ve heard that there is a bug in Open At , which makes the board act like this.

It is true ?  
If someone has any ideea at lot i would be thankfull…

---

<div class="post-metadata">

**Author:** ![Eraser](https://avatars.discourse-cdn.com/v4/letter/e/c4cdca/32.png) [@Eraser](https://forum.sierrawireless.com/u/Eraser)\
**Post date:** [August 10, 2009, 1:32pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/2 "2009-08-10T13:32:49Z")

</div>

I’ve forgot … i use spi bus

---

<div class="post-metadata">

**Author:** ![yuantuh](https://avatars.discourse-cdn.com/v4/letter/y/e47c2d/32.png) [@yuantuh](https://forum.sierrawireless.com/u/yuantuh)\
**Post date:** [August 11, 2009, 11:24am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/3 "2009-08-11T11:24:58Z")

</div>

Q2686/87 SPI bus is OK. I can play wave files from 2GB FAT16 SD card throught SPI 6.5Mb speed. You may check your SPI initialisation. You had better use a GPIO as CS. Also you need to setup proper SPI speed interfacing to ENC28J60.

---

<div class="post-metadata">

**Author:** ![Eraser](https://avatars.discourse-cdn.com/v4/letter/e/c4cdca/32.png) [@Eraser](https://forum.sierrawireless.com/u/Eraser)\
**Post date:** [August 24, 2009, 9:18am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/4 "2009-08-24T09:18:41Z")

</div>

From what i know about enc28j60 is needed to be setup at least 12 Mhz to work fine,  
i set it up to 13 Mhz , maximum allowed by SPI Bus and all i can read is 0xFF and i don’t understand why…

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 11, 2009, 10:57am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/5 "2009-09-11T10:57:39Z")

</div>

Hi yuantuh,  
I am Developing basic spi communication. I facing lots of problems . can u send me basic sample code for spi…  
thanks  
kiran

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 11, 2009, 11:09am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/6 "2009-09-11T11:09:14Z")

</div>

> [@kiranreddysingareddy](#):
>
> can u send me basic sample code for spi.

Have you looked at the samples included with the SDK ❓

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 15, 2009, 7:01am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/7 "2009-09-15T07:01:21Z")

</div>

Hi awneil,  
i looked at sample code its designed for some external eeprom . Just i need basic spi to communicate with another microcontroller . just send data receive data …just spi configuration bus access read and write.if u have any basic sample code please copy to me.

thank you…  
kiran

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 15, 2009, 7:48am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/8 "2009-09-15T07:48:40Z")

</div>

> [@kiranreddysingareddy](#):
>
> Just i need basic spi to communicate with another microcontroller

In what way does “basic SPI communication with another microcontroller” differ, essentially, from basic SPI communication with any slave device - such as a memory…?

> [@](#):
>
> just send data receive data …just spi configuration bus access read and write.

That is pretty much what the SDK sample provides!

- Configuration is there;
- Bus writing is there - ie, sending data;
- Bus reading is there - ie, receiving data.

---

<div class="post-metadata">

**Author:** ![Madouc](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Madouc](https://forum.sierrawireless.com/u/Madouc)\
**Post date:** [September 15, 2009, 8:20am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/9 "2009-09-15T08:20:45Z")

</div>

You just mentioned the things you need right here :

> [@kiranreddysingareddy](#):
>
> […] just spi configuration bus access read and write.[…]

if you look at the documentation you get the exact commands you need…  
if you then look at the example code you can find the implementation of these commands.

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 15, 2009, 11:15am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/10 "2009-09-15T11:15:29Z")

</div>

> [@Madouc](#):
>
> You just mentioned the things you need right here :
> 
> > [@kiranreddysingareddy](#):
> >
> > […] just spi configuration bus access read and write.[…]
> 
> if you look at the documentation you get the exact commands you need…  
> if you then look at the example code you can find the implementation of these commands.

hi , i studied basic example code but its not understandable form .tell what are basic thing i have to instillation for SPI communication.  
i know something is it right …

1. adl\_busSPISettings\_t (spi bus settings)
2. adl\_busSubscribe (bus subcribing)  
3.adl\_busWrite  
4.ad\_busRead  
apart from i have to any functions or setting are required.  
let me know plz.

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 15, 2009, 11:24am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/11 "2009-09-15T11:24:01Z")

</div>

> [@awneil](#):
>
> > [@kiranreddysingareddy](#):
> >
> > Just i need basic spi to communicate with another microcontroller
> 
> In what way does “basic SPI communication with another microcontroller” differ, essentially, from basic SPI communication with any slave device - such as a memory…?
> 
> > [@](#):
> >
> > just send data receive data …just spi configuration bus access read and write.
> 
> That is pretty much what the SDK sample provides!
> 
> - Configuration is there;
> - Bus writing is there - ie, sending data;
> - Bus reading is there - ie, receiving data.

hi just i want to know what are the basic functions i have to use in my programming for simple spi communication (q2686).

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 15, 2009, 11:31am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/12 "2009-09-15T11:31:10Z")

</div>

> [@kiranreddysingareddy](#):
>
> i studied basic example code but its not understandable

In what way is it “not understandable”?

Are you familiar with the basic operation of Open-AT applications in general - particularly their Event-Driven nature?  
And how to effectively use the TRACE facilities?  
If not, then you need to spend some time gaining that familiarity first.

Have you actually tried running the examples?  
Even with no memory device connected, you should be able to observe the activity on the Q26 Clock, Chip-Select, and SPI output lines as it attempts to send commands to the (non-existant) chip - and reads should either give all-ones or all-zeros (depending on the state of the Q26 SPI input line).

You should be able to see the diagnostic TRACEs - and you can add further TRACEs of your own as you require.

Obviously, you will have to modify the points at which the code tries to wait for specific responses from the memory chip.

It might help you to also study the datasheet for the memory chip - that will show you what commands the chip is expecting from its master, and what responses it would give.

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 15, 2009, 11:56am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/13 "2009-09-15T11:56:57Z")

</div>

```auto
/*
 * spi_test.c
 *
 * Created on: Sep 14, 2009
 * Author: Kiran
 */

#include "adl_global.h"
#include "adl_bus.h"
adl_busAccess_t SpiBus_Access;
   // Bus access structure compute function
   void ComputeBusAccess ( u8 Opcode, u32 Address )
   {
          // Compute Bus Access structure from provided opcode & address
       u8 OpcodeMax = 32, AddressMax = 32;
       u8 OpcodeLength = 8, AddressLength = 16;

       // Set opcode
       SpiBus_Access.Opcode = Opcode << ( OpcodeMax - OpcodeLength );

       // Check if address is required
       if ( Address != 0xFFFF )
       {
           // Set address
           SpiBus_Access.Address = Address << ( AddressMax - AddressLength );
       }
       else
       {
           AddressLength = 0;
           SpiBus_Access.Address = 0;
       }
   }

const u16 wm_apmCustomStackSize = 1024;

// SPI Subscription data
adl_busSPISettings_t MySPIConfig =
   {
       5, // Clk_Speed (2 MHz)
       ADL_BUS_SPI_CLK_MODE_0, // Clk_Mode;
       ADL_BUS_SPI_ADDR_CS_GPIO, // ChipSelect;
       ADL_BUS_SPI_CS_POL_LOW, // ChipSelectPolarity;
       ADL_BUS_SPI_MSB_FIRST, // LsbFirst;
       ADL_IO_GPIO | 35, // GpioChipSelect;
       ADL_BUS_SPI_FRAME_HANDLING, // WriteHandling;
       ADL_BUS_SPI_DATA_UNIDIR, // DataLinesConf;
       ADL_BUS_SPI_MASTER_MODE,
       ADL_BUS_SPI_BUSY_UNUSED
   };

// Write/Read buffer sizes
#define WRITE_SIZE 5
#define READ_SIZE 3

// BUS Handles
s32 MySPIHandle;
// Data buffers
u8 WriteBuffer [WRITE_SIZE], ReadBuffer [READ_SIZE];
// Somewhere in the application code, used as an event handler
void HelloWorld_TimerHandler ( u8 ID, void * Context )
{
	int a;
u32 AddSize=0;

adl_atSendResponse(ADL_AT_RSP, "\r\nmy function \r\n");
// Subscribe to the SPI1 BUS
[b]MySPIHandle = adl_busSubscribe ( ADL_BUS_ID_SPI, 1, &MySPIConfig );[/b]
TRACE((1,"MYSPIHANDLE %d",MySPIHandle));

// Configure the Address length to 0 (rewrite the default value)
adl_busIOCtl ( MySPIHandle, ADL_BUS_CMD_SET_ADD_SIZE, &AddSize );
// Write 5 bytes set to '0' on the SPI & I2C bus
//wm_memset ( WriteBuffer, WRITE_SIZE, 0 );
ComputeBusAccess(0x02,0xFFFF);
[b]a=adl_busWrite ( MySPIHandle, &SpiBus_Access, 3, "Emx" );[/b]
TRACE((1,"write %d",a));
// Read 3 bytes from the SPI & I2C bus
//adl_busRead ( MySPIHandle, &SpiBus_Access, READ_SIZE, ReadBuffer );
// Unsubscribe from subscribed BUS
adl_busUnsubscribe ( MySPIHandle );

}
void adl_main(adl_InitType_e adlInitType)
{
	adl_atSendResponse(ADL_AT_RSP, "\r\nMain Task\r\n");
	  /* Set 1s cyclic timer */
	    adl_tmrSubscribe ( TRUE, 10, ADL_TMR_100MS_MAX_VALUE, HelloWorld_TimerHandler );

}
```

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 15, 2009, 12:02pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/14 "2009-09-15T12:02:51Z")

</div>

the above code will work ?  
what are main possible errors are there?  
//  
exp code:  
i am using 3 wire mode (mosi ,miso,cs)Q2686 as master mode ,for every 100ms its sending data to slave device .  
test result:  
i checked with CRO its giving output at MOSI or at PIN NO 25.its giving fine wave forms.  
if i connected to microcontrller its giving some garbage info…  
what is the expected error in this code?  
any help?..

---

<div class="post-metadata">

**Author:** ![Madouc](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Madouc](https://forum.sierrawireless.com/u/Madouc)\
**Post date:** [September 15, 2009, 12:28pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/15 "2009-09-15T12:28:37Z")

</div>

> [@kiranreddysingareddy](#):
>
> i am using 3 wire mode (mosi ,miso,cs)Q2686 as master mode ,for every 100ms its sending data to slave device .

I hope the above is a typo?  
3 wire mode consists of SPI-CLK, SPI-IO and SPI-CS (GPIO 28, 29, 31 respectively for SPI-1).  
you can’t leave out the Clock signal.

On the software side you need to:

1. set up the bus properties
2. subscribe to the bus-service

after that it depends on what your device expects from the spi-bus.  
you might need to:

1. set the op-code or the address
2. read or write from the bus

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 15, 2009, 1:18pm UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/16 "2009-09-15T13:18:52Z")

</div>

As Madouc says, you cannot have SPI without the Clock signal!! 😮

You also need to ensure that both Master & Slave are using the same SPI Mode…

---

<div class="post-metadata">

**Author:** ![kiranreddysingareddy](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kiranreddysingareddy](https://forum.sierrawireless.com/u/kiranreddysingareddy)\
**Post date:** [September 30, 2009, 5:16am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/17 "2009-09-30T05:16:09Z")

</div>

Hi

One basic Doubt before initialization of SPI. Is it necessary to configure GPIO’s (sck-o/p,spi1-i as input,SPI1-i/o as Output )by using b[/b].  
i am using 4 wire mode .  
thanks and regards  
kiran

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 30, 2009, 5:56am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/18 "2009-09-30T05:56:02Z")

</div>

Look at the sample!

---

<div class="post-metadata">

**Author:** ![fakulatus](https://avatars.discourse-cdn.com/v4/letter/f/b782af/32.png) [@fakulatus](https://forum.sierrawireless.com/u/fakulatus)\
**Post date:** [September 30, 2009, 9:38am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/19 "2009-09-30T09:38:49Z")

</div>

I try to use the SPI for 3 or 4 days already and have read all your comments.

Yes, i looked at the samples and yes, i know the basics of AT-Programming, but i’ve still have a Problem.

I can write to the bus without Problems, but i can not read!

Here is my code. Please, tell my, what’s wrong?

```auto
#define SPI_SPEED 1
/ ************************************************************** /
void spiInit()
{
	s32 returncode ;
	u32 data ;

	adl_busSPISettings_t spiSettings = {
		SPI_SPEED ,
		ADL_BUS_SPI_CLK_MODE_3 ,
		ADL_BUS_SPI_ADDR_CS_GPIO ,
		ADL_BUS_SPI_CS_POL_LOW ,
		ADL_BUS_SPI_MSB_FIRST ,
		ADL_IO_GPIO | 31 ,
		ADL_BUS_SPI_LOAD_UNUSED,	// LoadSignal
		ADL_BUS_SPI_DATA_UNIDIR, // DataLinesConf
		ADL_BUS_SPI_MASTER_MODE,	// MasterMode
		ADL_BUS_SPI_BUSY_UNUSED,	// BusySignal
	} ;

	TRACE((TL_SPEICHER,"spiInit()"));

	spiHandl = adl_busSubscribe(ADL_BUS_ID_SPI, 1, &spiSettings) ;

	TRACE((TL_SPEICHER, "adl_busSubscribe(SPI) : %d", spiHandl)) ;

     data = 8 ;
     returncode = adl_busIOCtl( spiHandl, ADL_BUS_CMD_SET_DATA_SIZE, &data) ;
     TRACE((TL_SPEICHER, "adl_busIOCtl( SPI, ADL_BUS_CMD_SET_DATA_SIZE, &data ) : %d", returncode )) ;
     data = 0 ;
     returncode = adl_busIOCtl( spiHandl, ADL_BUS_CMD_SET_ADD_SIZE, &data) ;
     TRACE((TL_SPEICHER, "adl_busIOCtl( SPI, ADL_BUS_CMD_SET_ADD_SIZE, &data ) : %d", returncode )) ;
     data = 0 ;
     returncode = adl_busIOCtl( spiHandl, ADL_BUS_CMD_SET_OP_SIZE, &data) ;
     TRACE((TL_SPEICHER, "adl_busIOCtl( SPI, ADL_BUS_CMD_SET_OP_SIZE, &data ) : %d", returncode )) ;

     TRACE((TL_SPEICHER, "spi_Init() complete")) ;
}
/ ************************************************************** /
void m25pSendSPI(charStream* sendData, charStream* reciveData)
{
	s32 returnwert;
	int i;

	adl_busAccess_t spiWriteMode = {0, 0} ;

	TRACE((TL_SPEICHER,"m25pSendSPI() %d",sendData->length));

	for(i=0;i<sendData->length;i++)
	{
		TRACE((TL_SPEICHER,"Data: %x",sendData->pChar[i]));
	}

	returnwert = adl_busWrite(spiHandl, &spiWriteMode, sendData->length, sendData->pChar) ;
	TRACE((TL_SPEICHER,"adl_busWrite: %d",returnwert));

	if(reciveData->length>0)
	{
	  returnwert=adl_busRead(spiHandl,&spiWriteMode,reciveData->length,reciveData->pChar);
	  TRACE((TL_SPEICHER,"adl_busRead: %d",returnwert));
	}
}
/ ************************************************************** /
bool readExFlash( u32 udAddr, charStream *data)
{
    charStream sendStream;
    u8 pIns_Addr[5];

    // Step 1: Validate address input
    if(!(udAddr+data->length < FLASH_SIZE))
    {
    	errorLog("Flash-Read-Instruction for wrong Address",udAddr);
    	return FALSE;
    }

    // Step 2: Initialize the data (i.e. Instruction) packet to be sent serially
    sendStream.length = 5;
    sendStream.pChar = pIns_Addr;
    pIns_Addr[0] = SPI_FLASH_INS_READ;
    pIns_Addr[1] = udAddr>>16;
    pIns_Addr[2] = udAddr>>8;
    pIns_Addr[3] = udAddr;
    pIns_Addr[4] = SPI_FLASH_INS_DUMMY;

    // Step 3: Send the packet serially, and fill the buffer with the data being returned
    m25pSendSPI(&sendStream, data);

    return TRUE;
}
/ ************************************************************** /
void testFunction(void)
{
    charStream stream;
    stream.length=20;
    stream.pChar=adl_memGet(stream.length);

  //Initial SPI
   spiInit();

   stream.length=20;

   for(i=0;i<stream.length;i++)
   {
     stream.pChar[i]=0;
  }

   readExFlash(0x100,&stream);

   TRACE((1,"StreamerLenght: %d",stream.length));

   for(i=0;i<stream.length;i++)
   {
      TRACE((1,"Resived Data: %x",stream.pChar[i]));
   }
 
}
```

adl\_busWrite without problems, adl\_busRead doesn’t work

09/09/30,11:34:31:476 ADL 5 spiInit()  
09/09/30,11:34:31:476 ADL 5 adl\_busSubscribe(SPI) : 403456816  
09/09/30,11:34:31:476 ADL 5 adl\_busIOCtl( SPI, ADL\_BUS\_CMD\_SET\_DATA\_SIZE, &data ) : 0  
09/09/30,11:34:31:476 ADL 5 adl\_busIOCtl( SPI, ADL\_BUS\_CMD\_SET\_ADD\_SIZE, &data ) : 0  
09/09/30,11:34:31:476 ADL 5 adl\_busIOCtl( SPI, ADL\_BUS\_CMD\_SET\_OP\_SIZE, &data ) : 0  
09/09/30,11:34:31:476 ADL 5 spi\_Init() complete  
09/09/30,11:34:31:476 ADL 5 m25pSendSPI() 5  
09/09/30,11:34:31:476 ADL 5 Data: 3  
09/09/30,11:34:31:476 ADL 5 Data: 0  
09/09/30,11:34:31:476 ADL 5 Data: 1  
09/09/30,11:34:31:476 ADL 5 Data: 0  
09/09/30,11:34:31:476 ADL 5 Data: aa  
09/09/30,11:34:31:476 ADL 5 adl\_busWrite: 0  
09/09/30,11:34:31:476 ADL 5 adl\_busRead: 0  
09/09/30,11:34:31:476 ADL 1 StreamerLenght: 20  
09/09/30,11:34:31:476 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff  
09/09/30,11:34:31:585 ADL 1 Resived Data: ff

I always read 0xFF

With the KO, i messure the most bytes 0x00 and some others, but not 0xFF

I’m going to be crasy

---

<div class="post-metadata">

**Author:** ![Madouc](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Madouc](https://forum.sierrawireless.com/u/Madouc)\
**Post date:** [September 30, 2009, 11:25am UTC](https://forum.sierrawireless.com/t/q2687-spi-problem/3545/20 "2009-09-30T11:25:02Z")

</div>

obviously your SPI1-I (GPIO 30) is being held high.  
are you sure your data is getting trough?

writing to the bus will always seem to go correct.  
did you check the correct arrival of data on the slave side? (aka the component you’re trying to communicate with?

[Next page](https://forum.sierrawireless.com/t/q2687-spi-problem/3545.md?page=2)
