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

How do I switch the target from a Nrf51422_xxAC to Nrf51422_xxAB in Keil

I have a development board with the AC variant, but for my custom board I have an AB. I am able to flash code using Keil to the development board, but when I change the device to the AB variant for the same code, I get the errors below. I change the device setting through the "Options for Target" menu. Will a hex file compiled for AC work on AB (assuming the size is not an issue)?

C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.0\gpiote\nrf_drv_gpiote.c(30): error:  #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined
  nrf_drv_gpiote_evt_handler_t handlers[NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS];
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.0\gpiote\nrf_drv_gpiote.c(148): error:  #20: identifier "GPIOTE_CONFIG_IRQ_PRIORITY" is undefined
      nrf_drv_common_irq_enable(GPIOTE_IRQn, GPIOTE_CONFIG_IRQ_PRIORITY);

I am using the 110 softdevice within the 8.0.0 SDK. I have made the change to the target board as mentioned below. The vales for iROM and iRAM are auto-populated due to the change in target board, so I did not change them. I still get the two errors shown above with the target change.

Right now I am trying to just get an example to compile for the AB chip. The end application will be a custom board that will be emitting a custom advertising packet every 5 seconds and then going to sleep.

image description

Parents
  • Your current error is not related to these settings, you need to include definitions for GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS and GPIOTE_CONFIG_IRQ_PRIORITY.

    However you will encounter an error related to the project options after this is solved.

    While the iRAM and iROM will automatically populate, they are not populated correctly. You need the Start values as they are for the xxAC, and then you need to modify the size according to the reduction in memory available. Your iROM will be half of the value described for xxAC. The iRAM will be a function of your SoftDevice, e.g. 16K(0x4000) total, S110 uses 0x2000 so we are left with 0x2000 which is the size we should use for IRAM.

Reply
  • Your current error is not related to these settings, you need to include definitions for GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS and GPIOTE_CONFIG_IRQ_PRIORITY.

    However you will encounter an error related to the project options after this is solved.

    While the iRAM and iROM will automatically populate, they are not populated correctly. You need the Start values as they are for the xxAC, and then you need to modify the size according to the reduction in memory available. Your iROM will be half of the value described for xxAC. The iRAM will be a function of your SoftDevice, e.g. 16K(0x4000) total, S110 uses 0x2000 so we are left with 0x2000 which is the size we should use for IRAM.

Children
No Data
Related