This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision V5.16a GPIOTE error on compilation

Hi,

I am new to Nordic. Will someone help me figure out what is wrong with UVision V5.16a. I get sample codes from pack installer example the "ble_app_hrs_s310_pca10028" for nRF51422xxAC and compile it using Uvison v5.16a.

My problem is that, the uVision always has an error during compilation of sample programs. The problems are:

  1. C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.1\gpiote\nrf_drv_gpiote.c(43): error: #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined

  2. C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.1\gpiote\nrf_drv_gpiote.c(157): error: #20: identifier "GPIOTE_CONFIG_IRQ_PRIORITY" is undefined

Do I need some configuration setting in order to eliminate this error? Or the sample code are to be modified to work correctly?

Below are my configuration setting:

*******************************uVision5.16a ****************************************** License Information:



LIC=----

Tool Version Numbers: Toolchain: MDK-Lite Version: 5.16a Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin C Compiler: Armcc.exe V5.06 (build 20) Assembler: Armasm.exe V5.06 (build 20) Linker/Locator: ArmLink.exe V5.06 (build 20) Library Manager: ArmAr.exe V5.06 (build 20) Hex Converter: FromElf.exe V5.06 (build 20) CPU DLL:
Dialog DLL:
Target DLL: Segger\JL2CM3.dll V2.99.15.2 Dialog DLL: TARMCM1.DLL V1.9.0.0

PACK INSTALLER************* Version: 1.3.7.0

My nRF51 kit is loaded with "s310_nrf51422_3.0.0_softdevice.hex" using nRFgo Studio with QT version 5.3.2.

Thanks for the help.

  • Please search for similar problems before you post a new thread about it. The fix for your compilation error can be found as answer in this thread

  • Thanks Aryan,

    The GPIOTE problem is fix when enabling the macro.

    But as I debug it keeps on resetting the code in Main(), using the example "ble_app_hrs_s310_pca10028". I Think I have the same problem with this thread. It compiles but wont flash on my nrF51 dev kit because the code it keeps on resetting. I also program it with simple LED blink and it works.

    My apology for the duplicate thread.

  • Why are you using hrs_s310? are you working with ANT protocol as well? If not then you should use nRF51_SDK_9.0.0_2e23562\examples\ble_peripheral\ble_app_hrs\pca10028\s130 example. You should also program softdevice first from

    nRF51_SDK_9.0.0_2e23562\components\softdevice\s130\hex
    

    before you program your application. If you have already done all that then you should try to debug and see at what point your code is resetting the chip.

    Normally any error in APP_ERROR_CHECK fail will cause a system reset in app_error_handler. The behaviour you are seeing could be just some function failing and the macro APP_ERROR_CHECK resetting your device. Search this forum about it, there should be a lot of info.

  • Hi Aryan,

    I am soon working with ANT. But before that the BLE is most important.

    Your sample code works very fine. I was able to compile and run it without problem. I tried to solve why the sample code in the installer pack differs from the available code you've given me.

    The changes I made from the pack installer is the following:

    #define GPIOTE_ENABLED 1 - this solve the compiler error #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 6 - this solve the reset proble.

    over all this is my configuration from the sample of pack installer that runs without error: (ble_app_hrs_s310_pca10028)

    /* GPIOTE */ #define GPIOTE_ENABLED 1 // MDC TODO: change from 0 to 1

    #if (GPIOTE_ENABLED == 1) #define GPIOTE_CONFIG_USE_SWI_EGU false #define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 6 //MDC TODO: changed from 1 to 6 #endif

    Thanks for helping me out. I can now go on...

Related