Hello, as oppose to S110, the function sd_ble_enable for S140 now includes one more parameter p_app_ram_base, which points to a value that stores the app base ram address, namely APP_RAM_BASE.
Since that the S140 technical documents are not officially released, I made reference to S132 softdevice and according to this page here:
infocenter.nordicsemi.com/index.jsp
and I quote:
The value of APP_RAM_BASE is obtained by calling sd_softdevice_enable, which will always return the required minimum start address of the application RAM region for the given configuration.
The problem is, in the program originally for S110, I did not find any functions calls made to sd_softdevice_enable, since it was working properly, I got this impression that softdevices work autonomously and needs no enabling (I could be completely wrong, but using a very capable software doing a thorough search gave a negative on the invoking of sd_softdevice_enable).
So it appears, if I were to use sd_ble_enable on S140 device, the appropriate steps should be:
- Call the sd_softdevice_enable function, and obtain a value and make sure it is stored in a global variant called "APP_RAM_BASE" (I hope this name is not problematic)
- use a pointer to point at "APP_RAM_BASE"
- Call sd_ble_enable, with that pointer passed to the corresponding parameter of the function.
So here are 3 questions that I can't possibly solve on my own in short term:
- Is this the only way? I mean it's kind of inefficient, or even dumb, there must be a better way to skip this step and come up with a all-encompassing, "can't possibly fail" value, like, setting the value really big?
- Interesting thing that "sd_softdevice_enable" does not seem to return an address at all, it's the same in S110, it's the same in S132, maybe different in S140?
- Where would be the best place to call sd_softdevice_enable, should that calling sd_softdevice_enable is inevitable?