I don't know the answers to your detail memory architectural questions, but you should know that this level of understanding is not normally required as the mini-driver which resides in firmware will load your application into the available RAM when you program the part. Available RAM for your application is generally right around 27-28K on A1 silicon.
thanks for your reply.
Can i say that only the memory space from 0x00204F70 to 0x00204F70+28K is for user app and the other space is reserved for LE STACK (configuration, buffer, heap, etc) in A1 silicon?
thanks a lot.
26K is probably a safer number to use. Exactly address where the application starts and stops can be tricky as there are alot of things happening dynamically within RAM as described here (uses Hello_Sensor as the example): BCM20732 Memory Map Architecture
Scroll down to this point where the explanation becomes much more detailed:
As you can see, there is overlap between Patches and Beginning of Application
So after the Patches are finished loaded, a portion of the RAM is available for the Application
Here is what is happening:
- Patches start at where the ROM finished 0x00204568
- Patches end at 0x00204AFC, but the Application starts at 0x00204974 even before the Patches end
- So there is an overlap.
- Once the application ends at 0x00204C28, but dynamic allocation starts even before this.
- The reason is that in the order in which we boot, The Patches get copied in first and they will get initialized.
- Then the section of the code where there in Patch initialization, that will get reused and we will put the application on top of it and overlay the application.
- Once the Patch Init code is running, we can replace that section with the application code.
- We are re-using the RAM from the Boot Loader and Reusing the application initialization code also for dynamic allocation
- Once we have initialized, we don/t need that code anymore.
- The ROM boots and copies in ALL of the patches
- And then it will run the Patch Init Code and installs all of the MANDATORY patches
- Once that copy is done, you don’t need that Patch Init Code
- The ROM will copy the Application on top of it.
- Overwrite the Patch Init Code with Application Code
- Application Code will be 1.7K of code or less.
- The App calls the App Init Function and will say, available RAM is here
- Then the ROM starts Dynamic Allocation from here
- What goes in?
- Buffer,xx, Stack Buffer Tools, and Data
- Call Back Registrations
- Dump the Stack on the Peripheral UART and reset
thanks a lot ^_^