How do I submit bug reports for Atmel Start code?

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

How do I submit bug reports for Atmel Start code?

Last Edited: Thu. Mar 26, 2020 - 06:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip support ticket system.

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

dnoyeB wrote:
How do I submit bug reports for Atmel Start code?

 

Care to share the bug? 

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Today's bug is that the data direction registers are set before the value is set. So you always get a momentary 0 on your output even if you tell Start you want a default of 1.

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

Ok, what part is this for?  Can you post the code that does this for others to evaluate?  Did you look to see what the data sheet says about the registers?  There is usually(always) an internal diagram of how the ports are configured.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Attiny series 0 and 1. in drivers_init.c

 

void system_init()
{
	mcu_init();
 ...
 
    // Set pin direction to output
    PWR1_En_set_dir(PORT_DIR_OUT);

    PWR1_En_set_level(
        // <y> Initial level
        // <id> pad_initial_level
        // <false"> Low
        // <true"> High
        true);
        
...
}
static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
{
    switch (dir) {
    case PORT_DIR_IN:
        VPORTC.DIR &= ~(1 << pin);
        break;
    case PORT_DIR_OUT:
        VPORTC.DIR |= (1 << pin);
        break;
    case PORT_DIR_OFF:
        *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
        break;
    default:
        break;
    }
}
static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
{
    if (level == true) {
        VPORTC.OUT |= (1 << pin);
    } else {
        VPORTC.OUT &= ~(1 << pin);
    }
}

 

 

 

Last Edited: Thu. Mar 26, 2020 - 06:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am guessing your complaint is pointed at this:

  // Set pin direction to output
    PWR1_En_set_dir(PORT_DIR_OUT);

    PWR1_En_set_level(
        // <y> Initial level
        // <id> pad_initial_level
        // <false"> Low
        // <true"> High
        true);

I would think that what you are seeing is correct that the output will go to zero firs as thats what the output register is set to by default at power up, but the direction is defaulted to INPUT so the pins are left floating until you set them as outputs, in which case as written above they will go low for a few nano/microseconds until you set them high.

 

 

What happens if you reverse the order?

 

 
    PWR1_En_set_level(
        // <y> Initial level
        // <id> pad_initial_level
        // <false"> Low
        // <true"> High
        true);
        
        
   // Set pin direction to output
    PWR1_En_set_dir(PORT_DIR_OUT);

 

Untested.

 

 

I don't think this is a bug.  It's just how START set it up.  If it is not what you want then you can change it.  START cannot read your mind and configure accordingly.

 

Try reversing the setup like I suggested and see what happens.

 

JIm

 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

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

Since the TINY-0/1 is closely related to teh XMEGA which I am using now I took a peek at what my CodeVision Wizard did to configure a port....Look what it did:

void ports_init(void)
{
// PORTA initialization
// OUT register
PORTA.OUT=0x00;
// Pin0: Input
// Pin1: Input
// Pin2: Input
// Pin3: Input
// Pin4: Input
// Pin5: Output
// Pin6: Input
// Pin7: Input
PORTA.DIR=0x20;
// Pin0 Output/Pull configuration: Totempole/No
// Pin0 Input/Sense configuration: Sense both edges
// Pin0 Inverted: Off
PORTA.PIN0CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin1 Output/Pull configuration: Totempole/No
// Pin1 Input/Sense configuration: Sense both edges
// Pin1 Inverted: Off
PORTA.PIN1CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin2 Output/Pull configuration: Totempole/No
// Pin2 Input/Sense configuration: Sense both edges
// Pin2 Inverted: Off
PORTA.PIN2CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin3 Output/Pull configuration: Totempole/No
// Pin3 Input/Sense configuration: Sense both edges
// Pin3 Inverted: Off
PORTA.PIN3CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin4 Output/Pull configuration: Totempole/No
// Pin4 Input/Sense configuration: Sense both edges
// Pin4 Inverted: Off
PORTA.PIN4CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin5 Output/Pull configuration: Totempole/No
// Pin5 Input/Sense configuration: Sense both edges
// Pin5 Inverted: Off
PORTA.PIN5CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin6 Output/Pull configuration: Totempole/No
// Pin6 Input/Sense configuration: Sense both edges
// Pin6 Inverted: Off
PORTA.PIN6CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Pin7 Output/Pull configuration: Totempole/No
// Pin7 Input/Sense configuration: Sense both edges
// Pin7 Inverted: Off
PORTA.PIN7CTRL=PORT_OPC_TOTEM_gc | PORT_ISC_BOTHEDGES_gc;
// Interrupt level: Disabled
PORTA.INTCTRL=PORT_INTLVL_OFF_gc;
// Pin0 Pin Change interrupt : Off
// Pin1 Pin Change interrupt : Off
// Pin2 Pin Change interrupt : Off
// Pin3 Pin Change interrupt : Off
// Pin4 Pin Change interrupt : Off
// Pin5 Pin Change interrupt : Off
// Pin6 Pin Change interrupt : Off
// Pin7 Pin Change interrupt : Off
PORTA.INTMASK=0x00;

}

In my case the output is set BEFORE the input.  IIRC I can tell the Wizard how I want the pins to default at startup.

 

Like I said, try it and report back.  I do not think you have a bug.  It's just the way you want things is different than the way START does things.

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user