Jump to content
43oh

Strange problem with stellaris launchpad... PORTB (PB6 and PB7) not working properly if PORTD is enabled!


Recommended Posts

Hi,

 I am having a starnge problem with stellaris launchpad..

When PORTB is enabled and if I am writing 1 to pins, it is giving 3.3V.

 

BUT

 

when PORTD is also activated and not connected to anywhere and if I am writing 1 to all pins of PORTB,

the PORTB bits - PB6 & PB7 are not properly working, means their voltage is 2v only....

 

What would be the reason?

 

 

Here is my two codes...

 

ROM_SysCtlClockSet(SYSCTL_SYSDIV_2|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);

ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIO_PORTB_DIR_R = 255;
GPIO_PORTB_DEN_R = 255;
////IF I AM INCLUDING BELOW CODE, PORTB bits 6 and 7 is not providing enough output voltage!
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);
GPIO_PORTF_DIR_R = 255;
GPIO_PORTF_DEN_R = 255;
 

 

If I am removing the last 3 lines of code, it works perfectly. I can read 3.3v from the P6 and P7 if I am writign to GPIO_PORTB_DATA_R.

 

So what is the relation between PORTD and PORTB?

Any internal short or damage to my chip? :o

 

When PORTD is clocked, I cannot obtain 3.3v at PB6 and PB7, all other bits are okay...

 

But this problem is there only when I am configuring PORTD along with PORTB, I tried PORTF and PORTB at a time but this time I have no problem...

 

 

Any idea?

Link to post
Share on other sites

Also if I am writing  GPIO_PORTD_DATA_R |= 1<<0;

 Then the PORTB BIT 6 minimum voltage is as high as 2.3v

At that time if I am writing 1 to PB6 it becomes 3.2 and if writing 0 it gives 2.3 instead of 0V....

 

So I am totally confused! Dont know if my launchpad is damaged or not... But I am sure that I didn't used my launchpad much and there is no chance of any shorting the gpio externally by mistake...

Link to post
Share on other sites

Also if I am writing  GPIO_PORTD_DATA_R |= 1<<0;

 Then the PORTB BIT 6 minimum voltage is as high as 2.3v

At that time if I am writing 1 to PB6 it becomes 3.2 and if writing 0 it gives 2.3 instead of 0V....

 

So I am totally confused! Dont know if my launchpad is damaged or not... But I am sure that I didn't used my launchpad much and there is no chance of any shorting the gpio externally by mistake...

Not damaged. The pins are shorted via a 0R resistor. See pg 9 of stellaris  user manual.

 

Capture.JPG

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...