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/MSP430F5529: Passing string into a function

Part Number: MSP430F5529


Tool/software: Code Composer Studio

Ok, it's been awhile since I programmed but I tried it on a computer and it passed it all fine but on code composer it doesn't. It only passes 10 of the 20 char values....it should pass "12345678901234567890" but it only passes "0123456789"...

  

#include <msp430F5529.h>
#include <string.h>

char StrBuffer[22];
int i;

void func(char *string_char);

int main(void)

{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
strcpy(StrBuffer, "12345678901234567890");  //Fill the buffer with a custom string
func(StrBuffer); //pass it to a simple function
return 0;
}

void func(char *string_char)
{
i = sizeof(string_char);
}