I running a netFp code on Core 0 of K2L6630 evm. In the function Pktlib_createHeap() , a queue threshold is set when numPkts !=0 & dataBufferPktThreshold>0 .
On executing the code I get the following error
[C66xx_0] Pktlib_createHeap(): [Error=-4] - Unable to create netfpDataRxHeap private heap
which is the error for MPU not being Configured.
The error occurs only when dataBufferPktThreshold=8 & not when 0.
After studying the MPU2(SPRUGW5A) user guide I programmed the instances of MPU2 & MPU5 in Core 0 main file in the following manner
CSL_MpuHandle hMpu5,hMpu2;
hMpu5 = (CSL_MpuHandle)CSL_MPU_5_REGS;
hMpu5->PROG_REGION[0].PROG_START_ADDRESS = 0x02A04000;
hMpu5->PROG_REGION[0].PROG_END_ADDRESS = 0x02B00000;
/* Programmable Range n Memory Protection Page Attribute Register (PROGn_MPPA)
* 31-26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
* Reserved AID15 AID14 AID13 AID12 AID11 AID10 AID9 AID8 AID7 AID6 AID5 AID4 AID3 AID2 AID1 AID0 AIDX Reserved NS EMU SR SW SX UR UW UX
*/
hMpu5->PROG_REGION[0].PROG_MPPA = 0x03FFFCBF;
hMpu2 = (CSL_MpuHandle)CSL_MPU_2_REGS;
hMpu2->PROG_REGION[0].PROG_START_ADDRESS = 0x02A00000;
hMpu2->PROG_REGION[0].PROG_END_ADDRESS = 0x02B00000;
/* Programmable Range n Memory Protection Page Attribute Register (PROGn_MPPA)
* 31-26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
* Reserved AID15 AID14 AID13 AID12 AID11 AID10 AID9 AID8 AID7 AID6 AID5 AID4 AID3 AID2 AID1 AID0 AIDX Reserved NS EMU SR SW SX UR UW UX
*/
hMpu2->PROG_REGION[0].PROG_MPPA = 0x03FFFCBF;
I program the 2 instances because their address overlaps which each other according to K2L user guide.
But executing the code again give the same error again
[C66xx_0] Pktlib_createHeap(): [Error=-4] - Unable to create netfpDataRxHeap private heap
Here is the screenshot of Registers of MPU's
As can be seen from user guide of K2L the Master id is of CorePAC 0 CFG & having a supervisor write fault even though I have enable it in the MPU2 instance.
And I want to Know what is Transfer ID ??
Also I've run the example project pktlib_DspOnlyk2lTestProject, where call to test the threshold heap function was disable(the calling of the function was commented). After enabling the test, it showed the same error.
Please tell how to resolve the error.