i need help to understanding the LED code .what are the register are using and why? And explain those registers.
In the below link article you get complete hardware details about led interfacing with TMS320C6745. go through it
The GPIO peripheral provides dedicated general-purpose pins that can be configured as either inputs or outputs.
When configured as an output, you can write to an internal register to control the state driven on the output pin.
When configured as an input, you can detect the state of the input by reading the state of
an internal register.
it just like the microcontroller , you have some register to define GPIO direction[INPUT/OUTPUT] and also GPIODATA out register.
kindly go through the attached pdf to know more about the GPIO register. refer page 18 in TMS320C6745 gpio document their you get the offset address of each gpio register. Base address for gpio register can refer page 22 in TMS320C6745 datasheet memory map summary.
0x01E26010 - [gpio_dir01]address of GPIO port0 and port1 direction register.
0x01E26014 - [gpio_out_data01]address of GPIO port0 and port1 dataout register.
To configure a given GPIO signal as an output, clear the bit in DIR that is associated with the desired GPIO signal.
gpio_dir01 = 0xF000FFFF;
Modify the bit in OUT_DATA associated with the desired GPIO signal
*gpio_out_data01 = 0x0FFF0000; // all the 12 leds will ON
*gpio_out_data01 = 0x00000000; // all the 12 leds will OFF
*gpio_out_data01 = 0x05550000; // toggling the 12 leds
*gpio_out_data01 = 0x0AAA0000; // toggling the 12 leds