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
  • Hi,

    A hex compiled for xxAC will not work for xxAB.

    Chose the correct device, go in "Options for target"

    image description

    And chose the nRF51422_xxAB. Next we need to set the target size settings, for the AB you will have 128K flash, compared to the 256K of the AC. This means you will have halve the size for your project IROM. You also have to change the size for your IRAM as the AB has 16K ram compared to the 32K of the AC.

    image description

    For additional info on which RAM and ROM settings to use see the SoftDevice Specification, which can be found for the relevant SoftDevices on infocenter.

    Best regards,

    Øyvind

Reply
  • Hi,

    A hex compiled for xxAC will not work for xxAB.

    Chose the correct device, go in "Options for target"

    image description

    And chose the nRF51422_xxAB. Next we need to set the target size settings, for the AB you will have 128K flash, compared to the 256K of the AC. This means you will have halve the size for your project IROM. You also have to change the size for your IRAM as the AB has 16K ram compared to the 32K of the AC.

    image description

    For additional info on which RAM and ROM settings to use see the SoftDevice Specification, which can be found for the relevant SoftDevices on infocenter.

    Best regards,

    Øyvind

Children
Related