This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't get nRF52 spi master to work.

Hello,

I couldn't understand the predefined header files for the spi, so I'm building the spi code from scratch. 

To build init_spi function, It's clearly mentioned in the datasheet that I have to configure the pins to be used before enable the spim.

So, I did, and no signal from sck pin nor mosi pin.

My questions are: 

Is there any function I need to build and initialize before using any peripheral specially spim, as I'm not using any of the predefined headers?

Do I've to build spi slave to get them work together as the master won't send without a slave to send to, and if so, can both of them initialized and work on the same devkit? 

Any insights will be appreciated, thanks.

Parents
  • Are you able to build the SPI Master Example in SDK 16? It's located in <InstallFolder>\examples\peripheral\spi. What are the reasons you're trying to build SPI Master from scratch? Is it because you want to understand it better? If I explain those "predefined header files" to you, can you then use the example in <InstallFolder>\examples\peripheral\spi?

    However, if you would like to build it from scratch, on a low (register) level, I can help you with that.

    I couldn't understand the predefined header files for the spi, so I'm building the spi code from scratch. 

     What, specifically, about the header file do you not understand?

     

    Is there any function I need to build and initialize before using any peripheral specially spim, as I'm not using any of the predefined headers?

     I'll wait to answer this question until I've gotten an answer to the questions above.

    Best regards,

    Simon

Reply
  • Are you able to build the SPI Master Example in SDK 16? It's located in <InstallFolder>\examples\peripheral\spi. What are the reasons you're trying to build SPI Master from scratch? Is it because you want to understand it better? If I explain those "predefined header files" to you, can you then use the example in <InstallFolder>\examples\peripheral\spi?

    However, if you would like to build it from scratch, on a low (register) level, I can help you with that.

    I couldn't understand the predefined header files for the spi, so I'm building the spi code from scratch. 

     What, specifically, about the header file do you not understand?

     

    Is there any function I need to build and initialize before using any peripheral specially spim, as I'm not using any of the predefined headers?

     I'll wait to answer this question until I've gotten an answer to the questions above.

    Best regards,

    Simon

Children
No Data
Related