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.

MSP430FR5994: Ideas to test code files for proper configuration

Part Number: MSP430FR5994

Hi everyone, 

I was wondering if there is a way to check a main.c file to see if GPIO is configured properly. 

For example, we know that Port 7 should be configured in the following manner:

P7DIR |= 0xFF;

Is there a way to check if this has been done, given a main.c file?

Ideally, we would use a testing framework or simulate the code and read the hardware registers from there, but I'm unsure if this exists for TI microcontrollers. 

A trivial solution would be to make a Python script that parses the .c file and searches for "P7DIR |= 0xFF;" or some combination of that. Are there any better approaches to this?

  • Hi DeMarcus Cousins

    I think simulation is the good option. 

    Simulation is supported on IAR. So, if you have IAR, you can check the register value during simulation

    CCS doesn't support msp430 simulation, So, you need the launchpad and check the register value during debug mode.

    at the same time, some methods can be considered. for example, read the register and store it on the global variable and output this global variable through UART.

    Thanks

**Attention** This is a public forum