Forums - SPI Communication between qca4020 and stm32 as master

2 posts / 0 new
Last post
SPI Communication between qca4020 and stm32 as master
karanpandey844
Join Date: 1 May 20
Posts: 12
Posted: Wed, 2020-06-10 03:01

Hi,

I am working on qca4020 with 3.1 sdk. I want to communicate between qca4020 and stm32 over spi communication. as per user guide I enabled the  peripheral option as below:

and started module as htc slave spi as 

Peripherals\HTCSlave> 4 1
 
Peripherals\HTCSlave: Start Mailbox Ping test on endpoint 0
Peripherals\HTCSlave: Buffers Per MBOX: 32
Peripherals\HTCSlave: Buffer Size: 256
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Credits Per MBOX: 4
Peripherals\HTCSlave: Start Mailbox Ping test on endpoint 1
Peripherals\HTCSlave: Buffers Per MBOX: 32
Peripherals\HTCSlave: Buffer Size: 256
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Credits Per MBOX: 4
Peripherals\HTCSlave: Start Mailbox Ping test on endpoint 2
Peripherals\HTCSlave: Buffers Per MBOX: 32
Peripherals\HTCSlave: Buffer Size: 256
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Credits Per MBOX: 4
Peripherals\HTCSlave: Start Mailbox Ping test on endpoint 3
Peripherals\HTCSlave: Buffers Per MBOX: 32
Peripherals\HTCSlave: Buffer Size: 256
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Max Message Size: 2048
Peripherals\HTCSlave: Credits Per MBOX: 4
 
Peripherals\HTCSlave>
 

now in slave side there are 6 pin as MOSI,MISO,SCK,CS,INTR.

 

In Host side i generated code using stm32cubemx for spi communication which is giving only three pins as

MOSI,MISO,SCK and one GPIO pin i selected as CS pin which I am toggeling(HI/LOW) before and after sending data.this process is not working there is nothing happening in slave side.

and I am not getting any idea what is interrupt(INTR) pin in slave side. and how to control it from host(stm32) side.

 Please help me asap.

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2020-07-30 11:38

The demo uses mailbox, hence INTR pin is used to enable interrupt going from SPI core to Mailbox.
Interrupt will be generated for error conditions and packet available within read buffer.SPI core to Mailbox.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.