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.

TMS320F28069F: Cannot Modify SFRs in Assembly (e.g., 0x006C / 0x006D) While General Memory Writes Work on TMS320F28069F

Part Number: TMS320F28069F

Tool/software:

Hello TI support,

I'm developing an assembly program for the TMS320F28069F to toggle GPIO5. As part of the setup, I tested writing to general memory locations like 0x0020 and 0x0022, and these work correctly — I can verify the updated values in the CCS memory browser during debug.

However, when I attempt to write to Special Function Registers (SFRs) like 0x006C or 0x006D (e.g., to configure GPIO5 via GPAMUX1), the values do not update and remain unchanged (e.g., 0xFFFF).

Here's the relevant code:

.sect ".text"
.global _c_int00

_c_int00:
; Test general memory writes
MOVW DP, #0x000 >> 6
MOV @0x20, #0x1234
MOV @0x22, #0x6666

EALLOW
MOVW DP, #0x0060
MOV AL, @0x006C
AND AL, #0xFCFF
OR AL, #0x0000
MOV @0x006C, AL

MOV AH, @0x006D
AND AH, #0xF3
OR AH, #0x08
MOV @0x006D, AH
EDIS

here:
B here, UNC

Tools️ Toolchain: Code Composer Studio
 brain Observation: Memory writes work, but GPIO/SFR changes do not reflect in debug.

Can you help me identify what might be blocking access to the GPIO registers in this case?

Thanks in advance!

  • Hi Majd,

    Can you double check that your project is correctly pulling in the C headers to map to the EALLOW/EDIS macros? These are the macros which allow writing to the protected registers on the device and is likely why are you are not seeing the values change 

    Otherwise, another point of debug would be to use the BitField access to write to the desired GPIO fields then test that in CCS. If that is working for you, then you can look at the disassembly view in the CCS and use that as a reference for your assembly program

    Regards,

    Peter