This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
I am using SDK8.3.0 with custom OS ThreadX.
There have been many changes in both the SDK and the OS.
When I use the FreeRTOS included in the SDK, the DDR read and write functions works fine.
However, when I changed the operating system to ThreadX, the read and write of DDR became abnormal.
My test results are as follows
case 1.Write/Read 32byte to/from DDR address 0x80000000 OK
case 2.Write/Read 32byte to/from DDR address 0x80000010 NG
Write: Only 16 bytes of data were written between addresses 0x80000010 and 0x80000020
Read: The program crashed in the Func HwiP_data_abort_handler() function
When i change the DDR MPU setting .isSharable from 0 to 1 , the test in case 2 worked normally.
{
.baseAddr = 0x80000000u,
.size = MpuP_RegionSize_2G,
.attrs = {
.isEnable = 1,
.isCacheable = 1,
.isBufferable = 1,
.isSharable = 1,
.isExecuteNever = 0,
.tex = 1,
.accessPerm = MpuP_AP_ALL_RW,
.subregionDisableMask = 0x0u
},
Can you give some advice about why the ddr work incorrectly when i change the OS.
Hi Qiao,
Thanks for you query.
Can you give some advice about why the ddr work incorrectly when i change the OS.
Please allow some time to check the above details and revert back.
Regards,
Tushar
Hi Qiao,
There have been many changes in both the SDK and the OS.
Have you done any changes related to DDR configuration?
When i change the DDR MPU setting .isSharable from 0 to 1 , the test in case 2 worked normally.
Can you please share the *.map file of the example project?
Regards,
Tushar
Hi Tushar
Have you done any changes related to DDR configuration?
>I think YES. The DDR config file is as below.
Can you please share the *.map file of the example project?
> The Map file seems too big to upload. Can you give a URL to upload it?
Hi Qiao,
Are you not able to upload it as zip also?
What is the size of the *.map file?
Regards,
Tushar
Hi Qiao,
Apologies for the delayed response.
Can you please debug the MpuM_Init() function and check for the MPU attributes?
Put a breakpoint in the MpuM_init() function and in CCS variable view check for the values of region and see if there is any difference or value mismatch at this function.
Please refer below image.
Regards,
Tushar