Forum: DSP The doubt about GPXDAT

von Ling L. (Company: none) (ling1995)

Rate this post
not useful
Good afternoon~all
When I begin to learn DSP ,the chip I used is TMS320F28335,(This is the 
TMS320F28335's datasheet: 
develop environment is CCS6.0 . After entering into the experiment of 
open leds, I found a very odd questions:
Three LEDs are controlled by three I/O,it’s defined as followings:
#define LED2_ON GpioDataRegs.GPADAT.bit.GPIO0
#define LED3_ON GpioDataRegs.GPADAT.bit.GPIO1
#define LED4_ON GpioDataRegs.GPADAT.bit.GPIO2
Then the leds will flash in the while(1)

                LED2_ON = 1;
                LED3_ON = 1;
                LED4_ON = 1;


                LED2_ON = 0;
                LED3_ON = 0;
                LED4_ON = 0;

However,there just two leds flashed when the hardware simulating.After I 
changed the programs:
#define LED2_ON GpioDataRegs.GPASET.bit.GPIO0
#define LED3_ON GpioDataRegs.GPASET.bit.GPIO1
#define LED4_ON GpioDataRegs.GPASET.bit.GPIO2

#define LED2_OFF GpioDataRegs.GPACLEAR.bit.GPIO0
#define LED3_OFF GpioDataRegs.GPACLEAR.bit.GPIO1
#define LED4_OFF GpioDataRegs.GPACLEAR.bit.GPIO2
Then the main function is :

                LED2_ON = 1;
                LED3_ON = 1;
                LED4_ON = 1;


                LED2_OFF = 1;
                LED3_OFF = 1;
                LED4_OFF = 1;

Who can tell me why it still can’t realize three leds flashed together?
Thanks a lot!


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.