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.

TMS320F2812: Question about memcpy() function

Genius 3095 points
Part Number: TMS320F2812

Dear team:

When I use memcpy() function in F2812, I have included "string.h". The program does not prompt an error when compiling, but it will enter the illegal interrupt “interrupt void ILLEGAL_ISR(void)” as long as it runs to the memcpy() function after power on.

I transfer the initialization flash function from flash CD 3ee815 address to RAM through memcpy() function, and the running start address is 3f9915. After compiling, the MAP file is as follows:

FLASH_SET_FUNCS

*          0    003ee815    00000017     RUN ADDR = 003f9915

                 003ee815    00000017     DSP281x_SysCtrl.obj (FLASH_SET_FUNCS)

I checked that the assembly statement on 3ee815 address was correct, but after it was moved to ram, the assembly statement was confused. Check the address does not overlap, then what is the cause of this error?

Best Regards

  • FF,

    I believe that 0x3F9915 region in memory is protected by the code security module, and will read back all 0x0000 if the CSM is not unlocked.  This would result in a ITRAP0 if executed.

    This will be the case even if a password is not set, but all you need to do to disable the CSM is to do a read of the password locations in flash memory, at addresses 0x3F7FF8–0x3F7FFF

    Best,

    Matthew

  • Hi Matthew:

    Thank you for your reply.

    Where is the memcpy() function defined by default? Where can I find the definition and prototype of this function?

    Best Regards

  • Hi,

    The prototype of memcpy() function is defined in strings.h