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

nrfx_spim example + ble_app_uart example

Hi,

Previously I  have merged spi with ble_app_uart on NRF52832 based ISP1507 test board . It has performed successfully which was enough to carryout the evaluation phase. Now I am working on my custom board with ISP1507. 

I have noticed that the SPI module is deprecated and SPIM which uses DMA is suggested instead. Now I am trying to merge nrfx_spim (board 10056 only) and ble_app_uart using SDK15.3. However I have encountered some errors which I have not been able to overcome. 

I  have added the nrfx_spim.c file to the nRF_Drivers folder, enabled NRFX_SPIM_ENABLED and NRFX_SPIM0_ENABLED from the configuration wizard. The error I get is; 

 error: #20: identifier "NRFX_SPIM0_INST_IDX" is undefined
static const nrfx_spim_t spi =
RFX_SPIM_INSTANCE(SPI_INSTANCE); /**< SPI instance. */

If I change the spi instance say from 0 to 2, I get the same error for 2. I have gone through the forum and found some related posts. One of them suggests commenting SPI_ENABLED lines which I tried. It did not change anything. The other one was saying the legacy related lines in the sdk_config.h should be commented. I am not sure what I should comment in the file. If this is the solution, can you please tell me what I should comment? If not, please give me some guidance about how I can progress from here. 

As a note; the IDE gives an error "fatal error: 'sdk_config.h' file not found" error in the nrfx_config.h file. However compilation does not give me any errors regarding this. I have read that IDE has bug that causes this. So I am ignoring it. Do you agree?

Regards,

Den

Parents
  • Hi again, 

    I now got it. As said, the solution is to comment out the old spi macros in the sdk_config. I was commenting out the nrfx_spi macros. However I should have comment out the nrf_drv_spi macros. My bad sorry. I am still not used to the notations. 

    So as a reference to others who are having same issue, you should comment out the lines between lines 5356 and 5444 - so called the legacy layer in the sdk_config.h of ble_app_uart. 

    And for the sdk_config.h not found error; it does not give me any compilation errors. It should indeed be an IDE bug; can be ignored. 

    Thanks,

    Den

Reply
  • Hi again, 

    I now got it. As said, the solution is to comment out the old spi macros in the sdk_config. I was commenting out the nrfx_spi macros. However I should have comment out the nrf_drv_spi macros. My bad sorry. I am still not used to the notations. 

    So as a reference to others who are having same issue, you should comment out the lines between lines 5356 and 5444 - so called the legacy layer in the sdk_config.h of ble_app_uart. 

    And for the sdk_config.h not found error; it does not give me any compilation errors. It should indeed be an IDE bug; can be ignored. 

    Thanks,

    Den

Children
Related