I want to TX out the string "1234" as below:
Uart1_PutString("1234"); // pass pointer
volatile char *s_pointer; // global variable
s_pointer=s; // TX_isr() uses s_pointer to load the string character into TX register as // io.sci1.scidr=*s_pointer;
io.sci1.scicr |= TRANSMITTER_EMPTY_INT; // enable interrupt
Problem: the first character tx out is not 0x31 as expected but instead 0x57 incorrectly. I found the xROM was initialized incorrectly by the 56800E Flash Programmer.exe (I can't find the sw version) and USB TAP rev F (see xROM memory screen end of post).
Below are snippets to show the string const was stored in xROM location 0x4000:
From the xMAP file the const "1234" was initialized to xROM (internal data flash) at address 0x4000 with 3 words (6 bytes needed for 4 chars plus terminating NUL) starting form address 0x4000:
From main.asm file, I see string “1,2,3,4” is inititialized:
How do I fix this problem?