Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAX2769 SPI interface not connected to GPIO with access to SPI module on STM32f4xx #4

Open
kwilsonpdx opened this issue Jun 12, 2014 · 5 comments
Assignees
Labels

Comments

@kwilsonpdx
Copy link
Member

This is a duplicate of avionics-cad repo. Issue 2.
(Perhaps it should only have been entered here.)

I have added mod wire proposals to the schematic for the v2 board.

@kwilsonpdx kwilsonpdx added the bug label Jun 12, 2014
@andrewgreenberg
Copy link
Member

We very carefully thought about this. As far as I remember:

  1. We absolutely need a SPI bus for the serial data output stream.

  2. I believe there are no other SPI busses available on that chip. Also, I'm not sure the "two wire interface" as they call it is SPI, it's more like I2C, but in any case, it's a write once kind of thing, and very slow, so we thought we'd bit bang it.

I'll go take a look at your proposals.

@andrewgreenberg
Copy link
Member

AARRRGHHH K is annoyingly correct. SPI2 is available and we should thus use it. How did we miss this? I approve of the mod wires for SPI2_MOSI and SPI2_SCLK.

K, I think there's no reason to use SPI2_NSS because that's really just a GPIO pin, and we can continue to just use PE12. I don't believe the NSS does anything when the SPI peripheral is in master mode. Can you please confirm this?

@JustRob83
Copy link
Member

I recommend not bothering with the NSS pin. On RTx, I happen to be using the pin designated NSS (external ADCs on SPI1), but I'm neither configuring it in its SPI Alternate Function, nor am I calling the SPISelect() or SPIUnselect() functions, but rather just setting/clearing this pin.Rob

On Fri, Jun 13, 2014 at 9:38 AM, Andrew Greenberg
[email protected] wrote:

AARRRGHHH K is annoyingly correct. SPI2 is available and we should thus use it. How did we miss this? I approve of the mod wires for SPI2_MOSI and SPI2_SCLK.

K, I think there's no reason to use SPI2_NSS because that's really just a GPIO pin, and we can continue to just use PE12. I don't believe the NSS does anything when the SPI peripheral is in master mode. Can you please confirm this?

Reply to this email directly or view it on GitHub:
#4 (comment)

@ThirteenFish
Copy link
Member

The SPI peripheral has some trivial master mode NSS management (see ref. man. p860), but ChibiOS opts not to use this feature and instead manage NSS through it's GPIO driver. The implementation of SPISelect is literally palClearPad(). Furthermore the SPIConfig struct lets you set any pin to be managed by the SPISelect function.

I too think it's fine to leave it alone.

@kwilsonpdx
Copy link
Member Author

I have removed the modwire proposal from the v2 schematic for SPI2_NSS. We can use the chip select connection (PE12) in GPIO mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants