GithubHelp home page GithubHelp logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Correction: IDL2 is connected to PB0 (pin 19).

Original comment by [email protected] on 23 Sep 2011 at 11:03

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024

Original comment by [email protected] on 23 Sep 2011 at 11:03

  • Changed title: V4.0 -- Won't boot if IDL2 switch active.

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Pin 19 /SS is tied up with the SPI bus. Said bus is shared with the in-circuit 
serial programming bus (ISP). Holding this pin low at start-up must be driving 
the ISP system into an inappropriate state.

Regardless, /SS is usually used for SPI chip select operations -- that is, as a 
/CS. Note that we have SD_CS connected to PB4 instead, however.

Thus, for both these reasons now understood, we need to swap IDL2 with SD_CS.

Original comment by [email protected] on 24 Sep 2011 at 2:55

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Changes are already done and ready to commit, however we need to find 
documentation of this effect the /SS pin is having to be truly sure to avoid 
any further disasters. I cannot be happy till I see it in a datasheet. A quick 
Google search yeilds nothing, as did a scan through the 2560 datasheet. Need to 
find the ISP protocol sheet.

Cam. 

Original comment by [email protected] on 24 Sep 2011 at 11:20

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Strange thing is according to the datasheet the SPI hardware is disabled at 
boot, and the /SS pin doesn't get used for ISP. Does not compute !

Still looking for the ISP protocol sheet.

Original comment by [email protected] on 24 Sep 2011 at 11:58

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Found the ISP datasheet:

http://www.atmel.com/atmel/acrobat/doc0943.pdf

It makes no mention of the /SS pin, not even as a consideraton. Also the CPU 
has to be held in RESET for the ISP to work, so it's hard to imagine that it's 
an ISP issue.

Maybe something to do with HVPP (High Voltage Parallel Programming) interface ??

Original comment by [email protected] on 24 Sep 2011 at 2:02

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Found it where I started in the ATMega2560 datasheet:

When the SPI is configured as a Master (MSTR in SPCR is set), the user can 
determine the direction of the SS pin.

If SS is configured as an output, the pin is a general output pin which does 
not affect the SPI system. Typically, the pin will be driving the SS pin of the 
SPI Slave.

If SS is configured as an input, it must be held high to ensure Master SPI 
operation. If the SS pin is driven low by peripheral circuitry when the SPI is 
configured as a Master with the SS pin defined as an input, the SPI system 
interprets this as another master selecting the SPI as a slave and starting to 
send data to it. To avoid bus contention, the SPI system takes the following
actions:

1. The MSTR bit in SPCR is cleared and the SPI system becomes a Slave. As a 
result of
the SPI becoming a Slave, the MOSI and SCK pins become inputs.

2. The SPIF Flag in SPSR is set, and if the SPI interrupt is enabled, and the 
I-bit in SREG is set, the interrupt routine will be executed.

Thus, when interrupt-driven SPI transmission is used in Master mode, and there 
exists a possibility that SS is driven low, the interrupt should always check 
that the MSTR bit is still set. If the MSTR bit has been cleared by a slave 
select, it must be set by the user to re-enable SPI Master mode.

Bugger it's ok as an general purpose output but duff as an input. Please let 
this be the last V4.0 error or I may have to tender my resignation :(

Original comment by [email protected] on 24 Sep 2011 at 2:26

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Yup. "Duff as an input". I discovered the same. So it's when the code goes to 
initialise the SD card I guess. The SPI bus is stuck in slave mode, which is nt 
expected, hence things go bad.

But of course, we need an SD_CS (output) anyway, so we should use this pin as 
intended.

Here's how it needs to end up.

Pin 19 (/SS)  = SD_CS
Pin 23 (PB4)  = IDL2_SW
Pin 25 (OC1B) = PPM_OUT

I'll add Cam's photo of this mod to the Build Your Own Board (PcbAssembly) wiki 
page. Thanks Cam.

(We both cut the SD_CS track in about exactly same place, which I found 
interesting. Great minds thinking alike? Or just the obvious choice. Perhaps 
we'll never know. :P)

Original comment by [email protected] on 25 Sep 2011 at 12:14

from gruvin9x.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024

Original comment by [email protected] on 26 Sep 2011 at 9:15

  • Changed state: Verified

from gruvin9x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.