AnsweredAssumed Answered

Not able to access RAM in MK65F180M using MQX

Question asked by Vivek Srinivasan on Apr 9, 2015

Hello everyone,

 

We are trying to port our Bluetooth stack to MK65F180M using MQX.

From the IAR flash file, we understand that the below are the RAM and ROM memory locations;


ROM - 0x00000000 to 0x000FFFFF

RAM - 0x1FFF0000 to 0x2002FFF0


We were trying to use the hello example from the MQX. We were able to run that successfully.

When we look at the IAR MQX plugin we can see MQX memory allocations (Please see the attached file Mem_Alloc.pdf).

I can see that a maximum of 10 KB is used for the Kernel including the thread stack.

To make sure that the rest 245 KB is accessible to us, I wrote a small code to write to the free RAM locations. From 0x1FFF27c0 to 0x20000000 (free 55K) and from 0x20000001 to 0x2002FFF0 (Free 192K) (Please refer to the attached file Write_RAM.txt).

But when I execute the test application, control goes to _int_kernel_isr (I believe because of some hard fault) while trying to write to some random memory location (this address keeps changing every time I restart the application).

I’m not sure if something I do here is wrong. Also, when I look at the Flash file used in IAR, I can see certain RAM locations are used by the Kernel. For example.


define exported symbol __KERNEL_AREA_START = __ICFEDIT_region_RAM_start__;

define exported symbol __KERNEL_AREA_END = 0x20007FF0;

 

So, I’m a little bit confused about which part of the RAM is actually given to the USER. Please help me understand which part of the RAM can be used by the USER without any interference from the kernel. I have also attached the flash file that I’m using for your reference(initflash.icf).


Your help is much appreciated. Thank you.


Regards,

Vivek

Original Attachment has been moved to: Write_RAM.txt.zip

Original Attachment has been moved to: intflash.icf.zip

Attachments

Outcomes