Disable SPI peripherials

Post here first, or if you can't find a relevant section!
Post Reply
alexandros
Posts: 52
Joined: Mon Oct 02, 2017 6:51 pm

Disable SPI peripherials

Post by alexandros » Sun Dec 03, 2017 10:39 am

Hello guys ,
is there any command i can use to disable the SPI peripherals and restore basic GPIO function for them ? for eaxample i dont want to use SCK in SPI , i just want to transfer data. but use the SCK pin for another purpose , is that possible?

i found this interesting article also https://devzone.nordicsemi.com/question ... a-on-mosi/

this worked for the guy

Code: Select all

NRF_SPI0->PSEL.SCK = 25;
nrf_drv_spi_transfer(&spi, buff_latch2, 14, m_rx_buf, 0);
NRF_SPI0->PSEL.SCK = 12;
i need to try this , if it works , but i dont know what is the PSEL
'class SPIClass' has no member named 'PSEL'

stevestrong
Posts: 1970
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Disable SPI peripherials

Post by stevestrong » Sun Dec 03, 2017 4:11 pm

Do you use SPI at all?
If not, just set the pinMode of the SPI pins as you wish.

Post Reply