OpenCores
Issue List
Question about TIMERA #25
Closed THUer opened this issue over 9 years ago
THUer commented over 9 years ago

Hello Oliver,

I'm trying to port openMSP430 to Artix-7.Now,I am troubled by one question. I compile the C program with IAR and get HEX files,next I transform hex files to coe and initialize the RAM gengrated by ISE.When I run some simple programs without using TIMERA and I'll get the right result,however,I was wrong when I run the programs which enter LPMx modes.I do not where is wrong. For example,the C program as follow:

#include <msp430x44x.h> void main(void) { WDTCTL=WDTPW+WDTHOLD; FLL_CTL0|=XCAP14PF; TACTL=TASSEL0+TACLR; CCR0=512-1; CCTL1=OUTMOD_7; CCR1=384; CCTL2=OUTMOD_7; CCR2=128; P1DIR|=0x04; P1SEL|=0x04; P2DIR|=0x01; P2SEL|=0x01; TACTL|=MC0; for(;;) { _BIS_SR(LPM3_bits); _NOP(); } }

The HEX file as follows: :020000020000FC :1080000031400006B0120C80B0125A80B240805A43 :108010002001F2D020005300B24004016001B240C0 :10802000FF017201B240E0006401B24080017401BE :10803000B240E0006601B24080007601E2D2220048 :10804000E2D22600D2D32A00D2D32E00B2D0100022 :10805000600132D0D0000343FC3F30405E803040AE :048060006280FF3FFC :02FFFE00008081 :040000030000800079 :00000001FF

and the coe file as follows(I'm using 16bits RAM as PMEM): memory_initialization_radix=16; memory_initialization_vector = 4031 0600 12B0 800C 12B0 805A 40B2 5A80 0120 D0F2 0020 0053 40B2 0104 0160 40B2 01FF 0172 40B2 00E0 0164 40B2 0180 0174 40B2 00E0 0166 40B2 0080 0176 D2E2 0022 D2E2 0026 D3D2 002A D3D2 002E D0B2 0010 0160 D032 00D0 4303 3FFC 4030 805E 4030 8062 3FFF 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 ...... 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 8000 (Line 2048)

The DMEM is 1KB including high(512B RAM) and low(512B RAM).

I run all the programs(5 in total).The error result as follows: tar_nxt is no assigned to tar. else if (tar_clk & ~dbg_freeze) tar <= tar_nxt;did't work.

When i use other programes to run the openMSP430 in the LPM0 mode,the tar count and the interrupts are generated normally.But the GPIO have no output namely the final result is wrong.

Where is wrong in my process? I need your help ! Thanks a lot!

THUer commented over 9 years ago

add to up question

and I run other program to run openMSP430 in LPM3.The tar counts and interrupted normally.But GPIO have no output. Where is wrong in my porcess?I need your help. Thank a lot! I'm very sorry the format is so bad!

olivier.girard commented over 9 years ago

Hi Xiao,

could you please re-post your problem in the discussion group ? http://groups.google.com/group/discuss_openmsp430?hl=en

it is much simpler to attach files and it also keeps the test formating ;-)

If possible, could you also attach your program to the message (C, header, makefile).

Thanks a lot, Olivier

olivier.girard was assigned over 9 years ago
olivier.girard closed this almost 9 years ago

Assignee
olivier.girard
Labels
Request