Dear Sir/Madam,
I'am new to segger embedded studio.I would like to do SPI interfacing of an IC using nRF51822 with segger embedded studio.
Please guide me how to add the necessary driver files into my project.
Regards
Pavankumar S
Dear Sir/Madam,
I'am new to segger embedded studio.I would like to do SPI interfacing of an IC using nRF51822 with segger embedded studio.
Please guide me how to add the necessary driver files into my project.
Regards
Pavankumar S
Hi,
If you do not already have the SES project for nRF51 up and running, there is a tutorial on how to convert a Keil project available here.
Regarding usage of SES with our SDK, please have a look the this video tutorial playlist on YouTube.
Best regards,
Jørgen
Hi Holmefjord,
Thank you for your support.
But What I need exactly is
Steps that has to be followed to create a new project in Segger Embedded studio to do spi interfacing using nrf51822 mcu.
What are the drivers I'am supposed to add into the project and Where should I get them.
Please help me out since I'am running out of time in completing this simple task.
Regards,
Pavankumar S
Hi,
There is a SPI Master Example in the SDK that you can reference. The SPI master driver is found in "nRF5_SDK_12.3.0_d7731ad\components\drivers_nrf\spi_master", use the nrf_drv_spi.c/h version.
Best regards,
Jørgen
Hi,
I found the spi related drivers in the path suggested by you,and created a new folder(inside the project in SES) and added the required files(spi master files) in that folder,But getting some errors.
What is the procedure we need to follow to add those required files into my project.
Regards
Pavankumar S
You can add the driver to the project without copying it. The following should be sufficient to use the driver:
// <e> SPI_ENABLED - nrf_drv_spi - SPI/SPIM peripheral driver //========================================================== #ifndef SPI_ENABLED #define SPI_ENABLED 1 #endif #if SPI_ENABLED // <o> SPI_DEFAULT_CONFIG_IRQ_PRIORITY - Interrupt priority // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice // <0=> 0 (highest) // <1=> 1 // <2=> 2 // <3=> 3 #ifndef SPI_DEFAULT_CONFIG_IRQ_PRIORITY #define SPI_DEFAULT_CONFIG_IRQ_PRIORITY 3 #endif // <e> SPI0_ENABLED - Enable SPI0 instance //========================================================== #ifndef SPI0_ENABLED #define SPI0_ENABLED 1 #endif #if SPI0_ENABLED // <q> SPI0_USE_EASY_DMA - Use EasyDMA #ifndef SPI0_USE_EASY_DMA #define SPI0_USE_EASY_DMA 0 #endif // <o> SPI0_DEFAULT_FREQUENCY - SPI frequency // <33554432=> 125 kHz // <67108864=> 250 kHz // <134217728=> 500 kHz // <268435456=> 1 MHz // <536870912=> 2 MHz // <1073741824=> 4 MHz // <2147483648=> 8 MHz #ifndef SPI0_DEFAULT_FREQUENCY #define SPI0_DEFAULT_FREQUENCY 1073741824 #endif #endif //SPI0_ENABLED // </e> // <e> SPI1_ENABLED - Enable SPI1 instance //========================================================== #ifndef SPI1_ENABLED #define SPI1_ENABLED 0 #endif #if SPI1_ENABLED // <q> SPI1_USE_EASY_DMA - Use EasyDMA #ifndef SPI1_USE_EASY_DMA #define SPI1_USE_EASY_DMA 0 #endif // <o> SPI1_DEFAULT_FREQUENCY - SPI frequency // <33554432=> 125 kHz // <67108864=> 250 kHz // <134217728=> 500 kHz // <268435456=> 1 MHz // <536870912=> 2 MHz // <1073741824=> 4 MHz // <2147483648=> 8 MHz #ifndef SPI1_DEFAULT_FREQUENCY #define SPI1_DEFAULT_FREQUENCY 1073741824 #endif #endif //SPI1_ENABLED // </e> // <e> SPI2_ENABLED - Enable SPI2 instance //========================================================== #ifndef SPI2_ENABLED #define SPI2_ENABLED 0 #endif #if SPI2_ENABLED // <q> SPI2_USE_EASY_DMA - Use EasyDMA #ifndef SPI2_USE_EASY_DMA #define SPI2_USE_EASY_DMA 0 #endif // <q> SPI2_DEFAULT_FREQUENCY - Use EasyDMA #ifndef SPI2_DEFAULT_FREQUENCY #define SPI2_DEFAULT_FREQUENCY 0 #endif #endif //SPI2_ENABLED // </e> // <e> SPI_CONFIG_LOG_ENABLED - Enables logging in the module. //========================================================== #ifndef SPI_CONFIG_LOG_ENABLED #define SPI_CONFIG_LOG_ENABLED 0 #endif #if SPI_CONFIG_LOG_ENABLED // <o> SPI_CONFIG_LOG_LEVEL - Default Severity level // <0=> Off // <1=> Error // <2=> Warning // <3=> Info // <4=> Debug #ifndef SPI_CONFIG_LOG_LEVEL #define SPI_CONFIG_LOG_LEVEL 3 #endif // <o> SPI_CONFIG_INFO_COLOR - ANSI escape code prefix. // <0=> Default // <1=> Black // <2=> Red // <3=> Green // <4=> Yellow // <5=> Blue // <6=> Magenta // <7=> Cyan // <8=> White #ifndef SPI_CONFIG_INFO_COLOR #define SPI_CONFIG_INFO_COLOR 0 #endif // <o> SPI_CONFIG_DEBUG_COLOR - ANSI escape code prefix. // <0=> Default // <1=> Black // <2=> Red // <3=> Green // <4=> Yellow // <5=> Blue // <6=> Magenta // <7=> Cyan // <8=> White #ifndef SPI_CONFIG_DEBUG_COLOR #define SPI_CONFIG_DEBUG_COLOR 0 #endif #endif //SPI_CONFIG_LOG_ENABLED // </e> #endif //SPI_ENABLED // </e>
It would be easier to help you if you could post the actual error codes that you get.