Hi Did this ever get implemented ?
There was alot of talk about it pre 3.0
SPI Slave Driver
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SPI Slave Driver
Giovanni wrote:Not yet, I have no a clear idea of how a SSPI API should look like.
Giovanni
I'm trying to hack together something using the SPIv1 (on F103) setting up should not be an issue as just needed to let the lower level driver know its either Master or Slave, do this by adding another variable to the SPIConfig struct.
The issue will be around what does one do to wait for incoming data from SPI master ?
Do you have any ideas ? Would be nice a callback interface, so every reception from the SPI you get a callback where you can process the recieved data and then send back response message.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SPI Slave Driver
The problem is when you have a scenario when the incoming data is not of fixed size (you can hack the existing driver for that). Imagine having to implement an SD/MMC card in SPI mode, a driver should be flexible enough to allow something like that.
Giovanni
Giovanni
Re: SPI Slave Driver
If the data is fixed length, then will the current driver able able to receive data and send data when set in slave mode ?
if so what is the best method / API calls i.e
spiExchange(&SPID1, 1, txbuf, rxbuf); /* Atomic transfer operations. */
or
spiReceive
spiSend
if so what is the best method / API calls i.e
spiExchange(&SPID1, 1, txbuf, rxbuf); /* Atomic transfer operations. */
or
spiReceive
spiSend
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SPI Slave Driver
I know somebody did it, I have no details.
I think you can use any of those functions, depending on what you need to do.
Giovanni
I think you can use any of those functions, depending on what you need to do.
Giovanni
Re: SPI Slave Driver
Giovanni wrote:I know somebody did it, I have no details.
I think you can use any of those functions, depending on what you need to do.
Giovanni
but i believe they used a raw interface not the dma one as used by the current driver.
So not sure if the dma will cause me issues
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SPI Slave Driver
Tabulous wrote:Giovanni wrote:I know somebody did it, I have no details.
I think you can use any of those functions, depending on what you need to do.
Giovanni
but i believe they used a raw interface not the dma one as used by the current driver.
So not sure if the dma will cause me issues
It does: you need to know the transfer size beforehand.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 8 guests