Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

I Think I Found a bug in SPI

spi

  • Please log in to reply
4 replies to this topic

#1 orenduino

orenduino

    Member

  • Members
  • PipPip
  • 26 posts

Posted 12 May 2014 - 11:12 AM

Hi

I am trying to transmit some data to SPI.

My system captures the DATA on CLOCK Falling Edge.

 

I have defined it like this:

static SPI.Configuration WBT_SPI = new SPI.Configuration(
         Pins.GPIO_PIN_D10, // SS-pin
         false,             // SS-pin active state
         0,                 // The setup time for the SS port
         0,                 // The hold time for the SS port
         true,              // The idle state of the clock
         false,             // The sampling clock edge
         1,              // The SPI clock rate in KHz
         SPI_Devices.SPI1   // The used SPI bus (refers to a MOSI MISO and SCLK pinset)
        );

my code for writing 5x bytes of zreoes  to the SPI is as follow: (View Image1.jpg for more details)

wbt_bus.Write(DataTransmitToSPI);

I have analized the sigals of the NETDUINO SPI port with LOGIC ANALIZER. (See IMAGE2)

you can clearly see that the DATA is being write correctly.

FRAME (SS) = '0'

and the clock is falling when the DATA signal = '0'

But

after the transmissin is done (after the 5th byte), the CLOCK signal stays high, the DATA stays high, the SS stays low (Active) .

after a while, the clock is falling again ( to its idle state) but the DATA is '1' and the SS = '0' (Slave still active)

it means that it writes '1' to the SPI.

 

I have tried to change the SPI clock idle state to both true/false, but the idle clk idle state stays on '0' always.

 

Am I doing something wrong ?

Attached Files



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 May 2014 - 04:03 AM

Hi orenduino,

Are you running the 4.3.1 firmware (which has the latest SPI patches)?

Chris

#3 orenduino

orenduino

    Member

  • Members
  • PipPip
  • 26 posts

Posted 13 May 2014 - 05:30 AM

Hi Chris

I have Netduino 1 with firmware v4.2, so I cant upgrade to fitmware v4.3.1

Is there any workaround for this ?

We are little tight at work

Thanks

Oren



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 May 2014 - 05:43 PM

Hi Oren,

You have PM.

Chris

#5 mcinnes01

mcinnes01

    Advanced Member

  • Members
  • PipPipPip
  • 325 posts
  • LocationManchester UK

Posted 23 May 2014 - 09:15 PM

Hi Chris,

 

Is this a hint towards a beta 4.3 for netduino 1?

 

Cheers,

 

Andy







Also tagged with one or more of these keywords: spi

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.