/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / SPI and Timer

Username:     
Password:     
             

Forum

# 1   2007-11-08 15:21:48 SPI and Timer

Allure99
New member
Registered: 2007-11-08
Posts: 4

SPI and Timer

2 Question:

1) When the ports are configured as SPI, on the STM it takes up 4 lines: MOSI, MISO, CLK, NSS
the last one NSS is a slave select line, ie a slave can the the stm32 which is a master to turn itself into a slave.

what i want to know is that if i don't use this option, can i use the NSS as a general GPIO, even when SPI is enable?

2)similarly, when some of the ports are configured as timer, say TIM1, which takes up 4 lines TIM CH1-4, if i only use one of them, can i use the other ports as GPIO?

Thanks

Offline

 

# 2   2007-11-08 15:31:08 SPI and Timer

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

Re: SPI and Timer

The uses of IOs as alternate functions are optional. Therefore, there are free to be used as standard GPIOs as long as they are not specifically used by the peripheral.
For the SPI, the use of NSS is optional (i.e. the peripheral can be used without the management of NSS).

Offline

 

# 3   2007-11-08 16:09:05 SPI and Timer

Allure99
New member
Registered: 2007-11-08
Posts: 4

Re: SPI and Timer

Hi Francis,
Thanks for your reply.
Just to confirm is that right to say that,
if Time1 is enable, I  can use channel 1 and 2 as timer and keep channel  3 and 4 as GPIO?

Thanks

Offline

 

# 4   2007-11-08 16:55:31 SPI and Timer

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

Re: SPI and Timer

I would say yes (the different channel seem to be very independent), but I will ask ST to confirm...

Offline

 

# 5   2007-11-08 16:55:51 SPI and Timer

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

Re: SPI and Timer

I would say yes (the different channel seem to be very independent), but I will ask ST to confirm...

Offline

 

# 6   2007-11-08 17:17:16 SPI and Timer

Allure99
New member
Registered: 2007-11-08
Posts: 4

Re: SPI and Timer

That will be great, Thanks again.

Offline

 

# 7   2007-11-09 09:00:38 SPI and Timer

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

Re: SPI and Timer

I got the confirmation: you "can use the non configured channels as GPIO"

Offline

 

# 8   2007-11-09 09:32:11 SPI and Timer

Allure99
New member
Registered: 2007-11-08
Posts: 4

Re: SPI and Timer

Okie Dokey...
many Thanks Francis!!
smile

Offline

 

Board footer