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

nRF52810 Central and UART

Hi, I would like to develop a BLE central node that sends over UART when a button is pressed. I understand the memory is limited on nRF52810, but I think it'll fit. The example app (ble_app_uart_pca10040) uses VFP register arguments. Would it be complex to modify this example to not need FPU support? Basically looking for a pca10040e version.

I noticed there's a thread where the Nordic team agreed to update Gazelle libraries for non-FPU devices (https://devzone.nordicsemi.com/f/nordic-q-a/44042/using-nrf52810-with-gzll_nrf52_arm-lib/172741#172741). I'm not sure if it ever finished. I'm hoping my request isn't too complicated I can figure it out with some guidance.

For completeness:

developing in SES using nRF52 DK with a nRF52832 (but actually developing for nRF52810). SDK 16.0.0 and S132 v7.0.1.

Parents Reply Children
  • Vidar thanks for the response. A bit more info maybe useful: I'm developing a system that has nRF on both sides (1 central/1 peripheral). The variables I need to track are a button press on one side and when the 2 nodes are in proximity of each other. Specifically, if the button is pressed while in proximity, and then proximity is lost (without releasing the button), then an alarm needs to be raised.

    So, one of the 2 sides will need to be Central.

    Initially, I explored using a broadcaster/observer model, but it wasn't optimal. If I change the advertising data (due to button press/release), then how quickly the observer picks up on the information is based on how often I'm scanning. This isn't great for battery life, and both sides are power constrained. Also, detecting proximity when not connected seemed to vary in real-world performance. Basically, connecting seems to be the better choice. In your opinion, is this still the better method? I could re-visit the simpler broadcast/observe vs trying to get UART working with the 52810 on both sides. 

    My original question: how complex is it to modify the ble_uart_central app to remove support of FPU?

  • Thanks for confirming and for the additional information.  As you indicated,  a broadcaster/observer model will have worse performance in terms of power consumption and/or latency, so I think you have chosen the correct model for the use case you outlined. 

    The other thread you linked to about the Gazell library (support got added in SDK 16 by the way) was more related to the fact that we have not distributed a non-FPU variant of it. Our Softdevice binaries work both with and without the FPU present. It's usually quite straight forward to create a new pca10040e configuration. You can see the difference between a pca10040 and pca10040e configuration by doing a side-by-side comparison of the *.emProject files from a project that has both. E.g. from the ble_app_hrs project as shown below. This is also covered by the "Developing for nRF52810" guide.

  • Thanks Vidar. That's exactly what I ended up doing -- a diff on the s112 vs s132 project settings and I was able to successfully compile and run. For arm_fpu_type, it works with both "soft" and "none". What happens on each if I keep arm_fp_abi = "soft"?

    for reference for future searches, these links helped me:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fnrf52810_user_guide.html

    https://devzone.nordicsemi.com/f/nordic-q-a/33812/developing-for-nrf52810---the-full-story

    https://devzone.nordicsemi.com/f/nordic-q-a/48318/multiple-definition-of-uarte0_uart0_irqhandler

  • For arm_fpu_type, it works with both "soft" and "none".

    There is no difference between these two settings when you have selected the Soft ABI as far as I can tell. But it seems like we should have selected "none" as the "soft" option is not documented.   

  • Got it thanks. 

    It compiles but won't download anymore. I'm getting the "cannot download multiple load files because they overlap" error. I'm guessing my ram start/stop/sizing is incorrect.

    I did some searching on the internet and figuring out the start/stop/ram sizes seems to be pretty difficult. The RAM needed depends on the config, so I get that it's not clear until you actually run it. I followed the ble_stack_init where it fetches the ramstart address and got 0x2a28 (using S132 on 52832 project)

    For the same project using S132 v.7.01, but hoping to emulate a 52810, my settings are:

    linker_section_placement_macros="

    FLASH_PH_START=0x0;

    FLASH_PH_SIZE=0x30000; (192kb)

    RAM_PH_START=0x20000000;

    RAM_PH_SIZE=0x6000; (24kb)

    FLASH_START=0x26000; 

    FLASH_SIZE=0x4000;

    RAM_START=0x20002a28;

    RAM_SIZE=0x35d8"

    linker_section_placements_segments="

    FLASH RX 0x0 0x30000;

    RAM RWX 0x20000000 0x6000"

    Does it look right?

    In the base ble_app_uart_c_pca10040_s132 project, the memory usage is telling me that it's using 32KB (31.9KB free of 64KB), which is a bad sign, since the 52810 only has 24kb. I'm hoping this isn't optimized and that I can squeeze it in. For the default project, can you tell me if that project will fit in 24kb of RAM? I basically need it as-is.

Related