/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Primer2 second SPI needed

Username:     
Password:     
             

Forum

# 1   2009-02-02 23:35:11 Primer2 second SPI needed

chico
New member
Registered: 2009-02-02
Posts: 4

Primer2 second SPI needed

Hello,
i want to connect 2 devices via SPI to the Primer2, is there an easy way to get to a second SPI next to the one on JP2 ? As I understood the schema, PB12 to PB15 are connected to JP2, but where are PA4 to PA7 connected at? And the third SPI is not connected at all?

Thanks for your answers.

Offline

 

# 2   2009-02-03 08:16:54 Primer2 second SPI needed

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Primer2 second SPI needed

No easy way.
There are 3 SPIs on this chip. One (SPI1) is used for the MEMS, and the 2 others are used for the audio chip. One of them (SPI2) is shared with the extension connector (you must disable the voice mode when you wish to use it on the extension connector). But you can still 'play music' or use the tone generator.
The schematic is available in the 'resource => Primer2' section.

Offline

 

# 3   2009-02-03 09:19:41 Primer2 second SPI needed

chico
New member
Registered: 2009-02-02
Posts: 4

Re: Primer2 second SPI needed

I'm evaluating the Primer2 to integrate it in our Project, because we don't want (and are not able) to design a whole board. I have read the "Programming the CODEC" topic and it was very interesting.
So if I understood it correctly, I cannot record from the internal microphone if I connect a device to SPI2.

Our problem is, that we want to record audio with 16-bit and at least 44khz and transfer it with a module that uses SPI later. The interface to get 16-bit 44khz is not defined and can be chosen by myself.

The only way seems to be to deactivate the MEMS to use it for the module with SPI interface and then have the choice to use either der internal 12-bit for testing or adding a 16-bit over I²S or SPI2. But when I think about it, Audio Playback is not needed on the Primer2, so it's easier to use SPI3?

Last edited by chico (2009-02-03 11:01:12)

Offline

 

# 4   2009-02-03 12:02:42 Primer2 second SPI needed

sjoerd
Member
From: Stad aan het Haringvliet
Registered: 2008-09-04
Posts: 65

Re: Primer2 second SPI needed

If you want to use SPI3 you need to wire:
- PB3 (JTDO/SPI3_SCK/I2S3_CK)
- PB4 (JNTRST/SPI3_MISO) -> possibly only available on the chip itself
- PB5 (SPI3_MOSI/I2S3_SD)
and perhaps PA14 (SPI3_NSS/I2S3_WS) 'to the outside world' because none of them is connected to the extension connector.

I guess doing approx. 90kb/sec cannot be done using a SW SPI implementation.

Last edited by sjoerd (2009-02-03 12:04:10)

Offline

 

# 5   2009-04-22 19:19:13 Primer2 second SPI needed

Saulis
Member
From: Lithuania
Registered: 2009-04-09
Posts: 34

Re: Primer2 second SPI needed

I think there is one more solution. Using uart2 in synchronous mode performs 'almost' SPI-master-only interface. uart2 rx,  tx and clk are on extension connector.

Offline

 

# 6   2010-06-17 17:38:58 Primer2 second SPI needed

XeBiT
New member
Registered: 2010-06-10
Posts: 1

Re: Primer2 second SPI needed

Why the external connector was not used SPI1? He is in the system is used as a SPI constantly. Then it would connect more SPI devices with the aid of different lines of select, and modification SPI driver to the shared.

Last edited by XeBiT (2010-06-17 17:42:29)

Offline

 

Board footer