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

nRF51822 problem with programming application using Keil

Hi!

I developed my application using nRF51 DK with nRF51422 QFACA10 chip on it, and everything works fine. But now i would like to program this application on nRF51822 QFAAH00 chip i have, and i have some problems with it. In "options for target" in Keil i chose nRF51822_xxAA device, and i can see that IRAM1 size changed from 0x8000 to 0x4000, which is logical since my new device have only 16kB RAM instead of 32kB. Everything looks fine, but in target select list i still can see only "nRF51422_xxac_s110" or "flash_softdevice", no new target appeared. When i build my application and try to flash memory i get this error:

No ULINK Device found Error: Flash Download failed - Target DLL has been cancelled.

I am using P20 on nRF51DK to program nRF51822 chip, but i dont think that this is a problem, because nRFgo Studio recognized my chip and i was able to program SoftDevice succesfully. I used the same SoftDevice for both chips, but as far as i understand it correctly, it is not an issue - both are revision 3 so they should be compatible if i use bluetooth in my application, not ANT.

If i cant program application using keil, is it OK if i build it in Keil and then load .hex file created by Keil using nRFgo Studio? Are memory settings in Keil configured correctly for nRF51822 QFAA target?

Read-only memory areas: IROM1(on-chip): 0x0(start), 0x40000(size)

Read/write memory areas: IRAM1(on-chip): 0x20000000(start), 0x4000(size)

I am using Keil uVision5.14, s110_nRF51_8.0.0 SoftDevice and nRF51_SDK_9.0.0 SDK.

Regards, Ina

Parents
  • Hi

    Keil has a tendency to reset some of your settings when you change target. Including the debugger settings. Try to go into the Debug tab and select J-Link instead of ULINK:

    image description

    I'm not sure why the "Select Target" drop down list doesn't update, but as long as you have the correct memory settings you should be good anyway.

    Using P20 to program should not lead to any troubles at all. If you want you can certainly load the .hex file using nRFgo or nrfjprog as well.

  • Thank You for Your quick answer.

    I selected "J-LINK/J-TRACE Cortex", but now i get this error in Keil:

    Flash download failed - "Cortex-M0".

    When I try to load .hex file using nRFgo Studio i get the error:

    programming failed: this hex file has data in SoftDevice region.

    So i think that problem might be in using wrong version of SoftDevice, or incorrect memory settings, and i dont know how to fix this. According to nRF51 Series Compatibility Matrix, this SoftDevice should be suitable for nRF51822_QFAA, so i think this is a memory settings issue. What are correct settings for nRF51822_QFAA?

Reply
  • Thank You for Your quick answer.

    I selected "J-LINK/J-TRACE Cortex", but now i get this error in Keil:

    Flash download failed - "Cortex-M0".

    When I try to load .hex file using nRFgo Studio i get the error:

    programming failed: this hex file has data in SoftDevice region.

    So i think that problem might be in using wrong version of SoftDevice, or incorrect memory settings, and i dont know how to fix this. According to nRF51 Series Compatibility Matrix, this SoftDevice should be suitable for nRF51822_QFAA, so i think this is a memory settings issue. What are correct settings for nRF51822_QFAA?

Children
No Data
Related