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.

TMS320F280037C: DCSM 및 FLASH 영역 Read/Write 관련 질문

Part Number: TMS320F280037C

Hello!! champs

There is a part in my program that writes and erases data in the FLASH (0x83000) area.

If you set DCSM as follows,

An error occurs when data is written to and deleted from FLASH.

In this regard, the questions are as follows:

1. Is it impossible to read/write in the FLASH area when DCSM is set?

1-1. Is there a workaround if this is not possible?

Please answer.

We always appreciate your help.

  • Hi,

    When you secure any flash sector by assigning it to a zone, program and erase operation can not be performed to these secure flash sector unless -

    1. The zone is unlocked by using password match flow
    2. program/erase code is running from secure RAM assigned to same zone as of the secure flash sectors.

    Hope this is clear.

    You can refer this app note also which provides detail on similar topic.

    Regards,

    Vivek Singh

  • Thank you for answer.

    "program/erase code is running from secure RAM assigned to same zone as of the secure flash sectors."

    As for the above, if all FLASH/RAM is allocated to ZONE 1, does PROGRAM/ERASE work?

    Regards.

  • Yes, that will work.

    Regards,

    Vivek Singh

  • thank you for your answer

    All FLASH Sector/RAM is allocated to Zone2.

    CMD files are in RAMGS for bss, data, system, and const.

    Text is assigned to RAMLS.

    Maybe I did something wrong with the settings in the CMD file?

    The CMD file I set up is as follows.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    MEMORY
    {
    BEGIN : origin = 0x00080000, length = 0x00000002
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    BOOTROM : origin = 0x003F8000, length = 0x00007FC0
    SECURE_ROM : origin = 0x003F2000, length = 0x00006000
    RESET : origin = 0x003FFFC0, length = 0x00000002
    RAMM0 : origin = 0x00000128, length = 0x000002D8 /* stack */
    RAMM1 : origin = 0x00000400, length = 0x00000380 /* on-chip RAM block M1 */
    BOOT_RSVD_SYSBIOS : origin = 0x00000780, length = 0x00000080
    RAMLS0_1 : origin = 0x00008000, length = 0x00001000
    RAMLS2_7 : origin = 0x00009000, length = 0x00003000
    RAMGS0_2 : origin = 0x0000C000, length = 0x00003000
    RAMGS3 : origin = 0x0000F000, length = 0x00001000
    /* Flash sectors */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    what can i check ??

    regards.

  • I am not sure what issue you are facing and what is the flow of your operation. How are you trying to program the device ? Please provide more detail on what you are trying to achieve and what issue you are facing.

    Regards,

    Vivek Singh

  • There was insufficient information on the question.
    Sorry about that.

    The problems faced are as follows:

    1. What you want to implement
    - I want to prevent unwanted access to the FLASH/RAM area using DCSM.
    - I want to do READ/WRITE for the FLASH area during application operation with DCSM set.

    2. Progress
    - The following settings were made through DCSM.
    Both FLASH and RAM are allocated to ZONE2.
    Z2_GRABSECT1R = 0x55555555
    Z2_GRABSECT2R = 0x55555555
    Z2_GRABSECT3R = 0x55555555
    Z2_GRABRAM1R = 0x00005555

    PASSWORD was set by setting CSMKEY.


    - I modified the CMD file and set it as follows.
    assign text to RAMLS
    Assign bss , data, system, const to RAMGS

    3. Test results
    - Before setting up DCSM
    READ/WRITE is possible in the FLASH area during application operation.

    - After setting up DCSM
    READ/WRITE is not possible in FLASH area during application operation after Power On Reset.
    READ/WRITE is possible if you emulate and drive CSMPSWD during the Debug setting.
    (GPIO 24 Low, GPIO 32 High in wait mode)



    I want to make a program that reads/writes to the FLASH area with DCSM set.
    I checked the user guide you sent me earlier.
    It is explained that READ/WRITE is possible for RAM/FLASH allocated to the same zone.
    I thought it would be READ/WRITE in the FLASH area by allocating it to ZONE2,
    The test results did not.
    I'm not sure what I'm doing wrong, so I ask for wisdom.

    Regards.

  • Would it be ok re-explain the problem i'm facing??

    regards

  • Hi,

    READ/WRITE is not possible in FLASH area during application operation after Power On Reset.

    Once you set the security on, the READ/WRITE operation can be performed  by code running from same zone. One thing you need to check is you have done proper configuration of FLSEM register to change SEM bit field value to '10' so that Zone2 code can access flash control register. If his is not done then programming will not work.

    Regards,

    Vivek Singh

  • Hello

    This problem is solved. After setting up FLSEM, it works as desired.
    Regards