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

Adding Drivers with CMSIS Wizard

I wanted to add TWI functionality to the flash fds example and was confused about adding drivers with CMSISwizard.  I manually added all the necessary twi drivers based off of the twi scanner example and added the necessary #includes.  

From my understanding I still needed to enable these drivers through the sdk_config file, but in the CMSIS wizard the drivers I had added weren't showing up.  I manually opened the  sdk_config.h file and added lines of code such as:

 

// <e> NRFX_TWIM_ENABLED - nrfx_twim - TWIM peripheral driver
//==========================================================
#ifndef NRFX_TWIM_ENABLED
#define NRFX_TWIM_ENABLED 1
#endif

but I was wondering if there was a way to do this through CMSIS wizard.  

When adding drivers is there a way to make the CMSIS wizard recognize that drivers have been newly added so that they can be enabled through the wizard?  Or do the added drivers need to be manually enabled within the sdk_config file by adding lines of code to enable the drivers? 

Also, is there a proper format to follow when adding lines of code to enable drivers within the sdk_config file?  Now when I open the CMSIS wizard no drivers come up even though my project builds and runs properly, so I'm assuming when I added lines to the sdk_config file that I messed up the format somehow.

Thanks!

Parents
  •  Hi,

    When adding drivers is there a way to make the CMSIS wizard recognize that drivers have been newly added so that they can be enabled through the wizard?  Or do the added drivers need to be manually enabled within the sdk_config file by adding lines of code to enable the drivers? 

    Unfortunately no, there isn't any. A typical approach would be to compare the config file of an example that already uses the peripheral that you want to use and then add all of the relevant macros that are missing to the config file. 

     

    Also, is there a proper format to follow when adding lines of code to enable drivers within the sdk_config file?  Now when I open the CMSIS wizard no drivers come up even though my project builds and runs properly, so I'm assuming when I added lines to the sdk_config file that I messed up the format somehow.

    The correct format is shown in the SDK examples. Also you should configure the NRF macros not the NRFX, as the former overwrites the latter, this is due to legacy stuff. 

    regards

    Jared 

Reply
  •  Hi,

    When adding drivers is there a way to make the CMSIS wizard recognize that drivers have been newly added so that they can be enabled through the wizard?  Or do the added drivers need to be manually enabled within the sdk_config file by adding lines of code to enable the drivers? 

    Unfortunately no, there isn't any. A typical approach would be to compare the config file of an example that already uses the peripheral that you want to use and then add all of the relevant macros that are missing to the config file. 

     

    Also, is there a proper format to follow when adding lines of code to enable drivers within the sdk_config file?  Now when I open the CMSIS wizard no drivers come up even though my project builds and runs properly, so I'm assuming when I added lines to the sdk_config file that I messed up the format somehow.

    The correct format is shown in the SDK examples. Also you should configure the NRF macros not the NRFX, as the former overwrites the latter, this is due to legacy stuff. 

    regards

    Jared 

Children
No Data
Related