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

nRF52832 GCC Issues

Hello,

I'm trying to prototype an application on the nRf52 DK (PCA10040) using the GCC toolchain. I followed all of the tutorial for setting things up and I can build and flash things fine, but I don't think the application is working correctly.

I'm starting with the HID keyboard example as a baseline. I have not modified any of the source and it builds without errors. The application comes up, the light blinks, but my phone (galaxy S8) cannot see the device. I can occasionally see the device in nRF connect, but the advertisment frequency nRF connect shows does not jive with the configured advertising intervals of 25ms / 2 seconds in the example.

If I flash the board with the hex files provided with the examples everything works nicely. I'm guessing the examples were not built with GCC? I'm thinking this may be the problem may be with the tool chain. I, perhaps foolishly, grabbed the newest version of the GNU ARM (6 2017-q2-update). Are there any known issues with this version? Or is there an older version that is recommended?

I've tried SDK versions 12.3 and 14.2, with the same results

Thanks, Josh

Edit 1: Here is the hex file I referenced in the comment below, couldn't attach to a comment for some reason. Hex file

  • That gcc has been working fine for me for the last few months. Can you check the advertising intervals values in the c file (most likely the main.c module)?

  • Haven't changed them from the default example values:

    #define APP_ADV_FAST_INTERVAL            0x0028
    #define APP_ADV_SLOW_INTERVAL            0x0C80
    #define APP_ADV_FAST_TIMEOUT             30    
    #define APP_ADV_SLOW_TIMEOUT             180
    

    I'm definitely getting some bizarre behavior...I'm planning to try a different version of the toolchain, if I'm still having issues I can at least rule that out...

  • I've now tried 3 different versions of the GNU ARM compiler, and I get strange / erratic behavior no matter which one I use.

    I think it has to be something in my configuration of the tools that is causing issues. I've tried building the HID example with no changes to the v12.3 SDK, with the exception of updating Makefile.common to properly point to my GNU ARM installation directory.

    I've been through the tutorial for setting up GCC/Eclipse several times and I've followed it as exactly as I can, some menus have moved around in the newest Eclipse version, but I'm pretty sure I've configured everything correctly.

  • I've now tried 3 different versions of the GNU ARM compiler, and I get strange / erratic behavior no matter which one I use.

    I think it has to be something in my configuration of the tools that is causing issues. I've tried building the HID example with no changes to the v12.3 SDK, with the exception of updating Makefile.common to properly point to my GNU ARM installation directory.

    I've been through the tutorial for setting up GCC/Eclipse several times and I've followed it as exactly as I can, some menus have moved around in the newest Eclipse version, but I'm pretty sure I've configured everything correctly. I've tried building both the HID and HRS examples, I switched to the HRS example since it's the one in the tutorial and the project files were provided for it.

  • It's also worth noting that with the HRS example I am seeing the device advertising in Android, but it always fails to pair. When I switch to the precompiled example hex file things pair smoothly.

Related