Hi,
I am using FREE RTOS on STM32F429. Facing "Data read write issue" in internal SRAM Memory address. Need help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-06-28 9:37 PM
I had created single task with normal priority. The task has three functions. In one function ,I am writing the 2 byte data into internal SRAM (starting address for e.g. 0x20010204) .The 2 byte data is written on memory addresses 0x20010204 and 0x20010205 respectively. But after completion of one function execution data becomes zero when program control goes into another function call.
The Function I'm using to write sram data as:
uint32_t DummyIP1;
DummyIP1 = 500;
Write_SRAM_Data(ANALOG_INPUT_1,DummyIP1); //ANALOG_INPUT_1 = 0x20010204 ;
//Function defination
void Write_SRAM_Data(uint32_t *ldMemoryAdd,uint32_t lwData)
{
*ldMemoryAdd = lwData;
}
Please suggest that this method is correct or not. If not then suggest correct method for data writing into internal SRAM address and Bit banding addresses.
Thanks!
Anagha
Solved! Go to Solution.
- Labels:
-
FreeRTOS
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-02 2:21 AM
Hello @ADank.2 ,
Are you sure that the memory addresses you have chosen are allocated and the linker knows about it?
Otherwise, take a look at this reference to get an idea of how to define variables to an absolute address with gcc :
https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/
BeST Regards,
Walid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-02 2:21 AM
Hello @ADank.2 ,
Are you sure that the memory addresses you have chosen are allocated and the linker knows about it?
Otherwise, take a look at this reference to get an idea of how to define variables to an absolute address with gcc :
https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/
BeST Regards,
Walid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-05 9:53 PM
Thanks Walid. It is really helpful for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-06 1:51 AM
Glad to help you :smiling_face_with_smiling_eyes:.
