Using SPI_SLAVE on STM32


Armando Visconti
 

Ciao guys,

I'm currently working on ArgonKey, which is a 96 board with a STM32F412
plus a bunch of motion and environmental sensors.

I'm exploring the possibility to put in place the communication from
HiKey to ArgonKey and I noticed that the stm32 SPI environment already
implements the SPI_SLAVE communication. Does somebody have already tried
it out and know what the status is? Is there any example (doesn't seem
so) where I can get a look from?

Thx,
Arm


Tomasz Bursztyka
 

Hi,

Check this PR: https://github.com/zephyrproject-rtos/zephyr/pull/5200
You probably need the first patch, and the second is an example how to
do it. Note however the API has changed a bit, you'll have to check.

Br,

Tomasz

Ciao guys,

I'm currently working on ArgonKey, which is a 96 board with a
STM32F412
plus a bunch of motion and environmental sensors.

I'm exploring the possibility to put in place the communication from
HiKey to ArgonKey and I noticed that the stm32 SPI environment
already
implements the SPI_SLAVE communication. Does somebody have already
tried
it out and know what the status is? Is there any example (doesn't
seem
so) where I can get a look from?

Thx,
Arm




Armando Visconti
 

Thx Tomasz,

On 05/04/2018 02:08 PM, Tomasz Bursztyka wrote:
Hi,
Check this PR: https://github.com/zephyrproject-rtos/zephyr/pull/5200
You probably need the first patch, and the second is an example how to
do it. Note however the API has changed a bit, you'll have to check.
It seems quite old. Why hasn't it been merged yet?
Is there something wrong that prevent it?


Tomasz Bursztyka
 

It has not been rebased against latest SPI API changes, thus why it
can't be merged. But it's a fine PR besides that.

Tomasz

Thx Tomasz,

On 05/04/2018 02:08 PM, Tomasz Bursztyka wrote:
Hi,

Check this PR: https://github.com/zephyrproject-rtos/zephyr/pull/52
00
You probably need the first patch, and the second is an example how
to
do it. Note however the API has changed a bit, you'll have to
check.
It seems quite old. Why hasn't it been merged yet?
Is there something wrong that prevent it?





Armando Visconti
 

Hello Thomasz,

Quick update before leaving for the week.

I took the patches suggested by you and I prepared
a very simple test environment. I have an issue
though: it seems that I'm not able to consume data
at the proper speed and OVR error is found in SR.

Just for testing I tried to comment the error out and
what I see is that I receive 1 byte evry 3.

I think I can slow down the spi master, but I think that
we would need to add DMA handling to stm32 spi. Is there
any plan?

Thanks,
Armando

On 05/04/2018 03:00 PM, Tomasz Bursztyka wrote:
It has not been rebased against latest SPI API changes, thus why it
can't be merged. But it's a fine PR besides that.
Tomasz

Thx Tomasz,

On 05/04/2018 02:08 PM, Tomasz Bursztyka wrote:
Hi,

Check this PR: https://github.com/zephyrproject-rtos/zephyr/pull/52
00
You probably need the first patch, and the second is an example how
to
do it. Note however the API has changed a bit, you'll have to
check.
It seems quite old. Why hasn't it been merged yet?
Is there something wrong that prevent it?





Tomasz Bursztyka
 

Hi Armando,


I am not maintaining stm32 driver, I won't much of any help about it.
Get in touch with PR 5200 owner or one of the guys that created the
driver (git blame).

Br,

Tomasz

Hello Thomasz,

Quick update before leaving for the week.

I took the patches suggested by you and I prepared
a very simple test environment. I have an issue
though: it seems that I'm not able to consume data
at the proper speed and OVR error is found in SR.

Just for testing I tried to comment the error out and
what I see is that I receive 1 byte evry 3.

I think I can slow down the spi master, but I think that
we would need to add DMA handling to stm32 spi. Is there
any plan?

Thanks,
Armando

On 05/04/2018 03:00 PM, Tomasz Bursztyka wrote:
It has not been rebased against latest SPI API changes, thus why it
can't be merged. But it's a fine PR besides that.

Tomasz


Thx Tomasz,

On 05/04/2018 02:08 PM, Tomasz Bursztyka wrote:
Hi,

Check this PR: https://github.com/zephyrproject-rtos/zephyr/pul
l/52
00
You probably need the first patch, and the second is an example
how
to
do it. Note however the API has changed a bit, you'll have to
check.
It seems quite old. Why hasn't it been merged yet?
Is there something wrong that prevent it?








Armando Visconti
 

On 05/14/2018 08:35 AM, Tomasz Bursztyka wrote:
Hi Armando,
I am not maintaining stm32 driver, I won't much of any help about it.
Get in touch with PR 5200 owner or one of the guys that created the
driver (git blame).
I see.

OK, for the moment I will work at 1Mhz speed which seems to work fine
(before was 10MHz). Then I will evaluate how to proceed here.
The code owner is superna9999 (Neil Armstrong on github)

Thanks,
Arm