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.

TMS570LS3137: ISSUE: Memory map prevented reading 0x******(Memory Address)

Part Number: TMS570LS3137
Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN,

Dear Sir/Madam,

I have the code that I am able to compile without any error. I can build the CCS project and generate the ".out" file of the code and I am able to load it in my TMS570LC4357ZWT MCU without any problem. The code is run properly on this MCU. Then I tried to switch MCU type from TMS570LC4357ZWT to TMS570LS3137ZWT. I have configured HalcoGen file according to TMS570LS3137 version correctly and created the project file. Then, I have built the same code and generated the ".out" file for TMS570LS3137 MCU. When I loaded the ".out" file into the TMS570LS3137 MCU, I have encountered the problem which I have never encountered with TMS570LC4357 MCU. The problem is when the code comes to the "errn = writeEXIHeader(stream)" line, I can not see the values of "stream" in the expression window as seen in Figure1. The error is "Memory map prevented reading 0x07FFFF38", I have not see this error in the TMS570LC4357 MCU in the "encode_appHandExiDocument" function . This caused the code to go into "sys_intvecs.asm - > prefetchEntry -> b _dabort" without going into the function "writeEXIHeader(stream)". In the "encode_appHandExiDocument" function, the "stream" memory cannot be achieved and code goes and stuck at "b _dabort". I have not encountered this problem in the TMS570LC4357 MCU. The same code, same functions, nothing is changed but the problem arises when I have changed the MCU type. I did not intend to change the code because the code can be compıled wıthout any error and works fıne in the TMS570LC4357 MCU. How can I solve this issue? I am waiting for your advises. Thank you in advance.

I have attached the code block as Figure2 and the expression window as Figure1.

Best regards. 

Kemal

Figure2                                                                                     Figure1

  • Hi Kemal,

    The 0x07xxxxxx is located in a reserved memory area which is not implemented. Accessing this un-implemented memory location will generate abort (data or prefetch).

    The TMS570LC43x is a cortex-R5F based MCU, but LS3137 is Cortex-R4F based device. The flash and RAM ECC on LS3137 is not enabled by default. 

    When you load the code to the LS31x flash, is the ECC generated and programmed as well? Can you try a big stack size?

  • Dear Wang,

    First of all, thank you very much for your detailed explanaiton. 

    Because of my inexperience in this matter, I dont know how to check the ECC is generated and programmed as well. But I have tried to enabe ECC in the HalcoGen as seen in "flash_ecc" and "ram_ecc" figures. The code is generted properly and loaded into the MCU again, but it did not work unortunately. What else I can do to try a big stack size or enable the ECC properly, which steps should I follow?

    Thanks again for your patience and help.

    Kemal

    Best regards.

    1) ram_ecc                                                                                    2) flash_ecc

  • Hello Kemal,

    What is happening here is, that the stack associated to the User and System modes gets full and the SP gets decremented below the lowest SRAM address (0x08000000) this will cause a data or prefetch abort.


    You have to increase the User Stack, this can be done in HALCoGen under the Device Tap --> RAM -- Stack configuration.

    or you can adjust the stack size in sys_core.asm

  • Dear Wang, 

    Thanks to your support, the problem has been resolved.

    I wish you and your family happy and healthy days.

    Best regards.

    Kemal.

  • Thanks Kemal!