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.

CCS/MSP430FR2422: a further Problem to solve my I2C Problem

Part Number: MSP430FR2422
Other Parts Discussed in Thread: MSP430F2012, MSP430FR2422

Tool/software: Code Composer Studio

Hello...,

Since I find no solution with the MSP430F2012 to realize a functional I2C slave, I used another MSP430 (MSP430FR2422). The MSP4302F422 has better I2C features in my opinion.
Unfortunately I got other problems with this device.

If I program the ports 1.0 .. 1.7 as outputs, the  outputs 1.0..1.3. are no longer present after a power off / on. It seems like they have become analog inputs. The outputs are only available, if I do the following:

1) erase the memory of the MSP430FR2422 with the program "Elprotronic"
2) reprogram the Device.

Then, after a power off / on, the outputs are again no longer available.
I can repeat this procedure multiple times.
Always after a power off/on the outputs 1.0 .. 1.3. are no longer available.
my assembler I have testet tis at CSS:
;-------------------------------------------------------------------------------
; MSP430 Assembler Code Template for use with TI Code Composer Studio
;
;
;-------------------------------------------------------------------------------
            .cdecls C,LIST,"msp430.h"       ; Include device header file
            
;-------------------------------------------------------------------------------
            .def    RESET                   ; Export program entry-point to
                                            ; make it known to linker.
;-------------------------------------------------------------------------------
            .text                           ; Assemble into program memory.
            .retain                         ; Override ELF conditional linking
                                            ; and retain current section.
            .retainrefs                     ; And retain any sections that have
                                            ; references to current section.

;-------------------------------------------------------------------------------
RESET       mov.w   #__STACK_END,SP         ; Initialize stackpointer
StopWDT     mov.w   #WDTPW|WDTHOLD,&WDTCTL  ; Stop watchdog timer

            mov.b    #0xff,&P1DIR
repeat
            mov.b    #0xff,&P1OUT
            call    #delay
            mov.b    #0,&P1OUT
            call    #delay
            jmp        repeat

            nop

delay
            mov        #10,R11
repeat1        clr        r12
dekrem        dec        r12
            jnz        dekrem
            dec        r11
            jnz        repeat1
            ret
regards Jurgen
  • Hello Juergen,
    as a general good practice I would recommend you looking into our code examples, available for each and every device. You can find them either on the device specific home page, or included in our CCS IDE within the TI Resource Explorer.

    The problem you're facing is related to an FRAM specific behavior, where we have integrated a protection feature for the GPIOs. To enable any changes you're trying to apply to the control registers of the GPIOs, you need to unlock them. This is done by the following instruction, you could see also in our code examples:
    PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
    // to activate previously configured port settings

    Best regards
    Peter
  • Hello Peter,
    thank you very much for your help.
    best regards Jurgen

**Attention** This is a public forum