UC3A3256 Pin Toggling

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I am using STK600 to connect to UC3A3256. Here is the code

int main (void)
{
	
	pm_switch_to_osc0(&AVR32_PM, FOSC0,SC0_STARTUP);
	gpio_enable_gpio_pin(AVR32_PIN_PX22);
	gpio_enable_gpio_pin(AVR32_PIN_PA00);
	gpio_enable_gpio_pin(AVR32_PIN_PX41);
	while(1){
		gpio_tgl_gpio_pin(AVR32_PIN_PX22);
		gpio_tgl_gpio_pin(AVR32_PIN_PA00);
		gpio_tgl_gpio_pin(AVR32_PIN_PX41);
		
		for(int i=0;i<10000;i++);//for delay
			
	}	
		
	}

optimization is zero...
The problem is only Pin PA00 toggles. the other two pins are not toggling. Is there any thing which I have missed out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It might be an issue with your clock and startup time. PA00 is a type x3 pin. PX22 and PX44 are x2. That means they have different rise and fall times, as well as max output frequency. If you are going through your toggles faster than the pin can toggle, you probably wouldn't see a toggle. x3 pins are able to toggle faster than x2 pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With a delay in the loop and running from OSC0, it's probably not a speed issue unless you've got some capacitors on the output pins.

Do you have anything hooked to the output pins? What instrument/circuit are you measuring the toggling with?

Jeff Nichols