Go Down

Topic: PORTB, 3 flashes at startup (Read 337 times) previous topic - next topic

timtailors

Feb 11, 2019, 02:04 pm Last Edit: Feb 11, 2019, 02:08 pm by timtailors
Hi,

on my ATSAMD21G18A "PORTB,  3" flashes at startup.

Can I disable that somehow?

My test code is
Code: [Select]
void setup()
{
  digitalWrite(30, LOW);
  pinMode(30, OUTPUT);
}
void loop() {}




variant.cpp
Code: [Select]
  // 30..31 - RX/TX LEDS (PB03/PA27)
  // --------------------
  { PORTB,  3, PIO_OUTPUT, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // used as output only

timtailors

#1
Feb 11, 2019, 02:31 pm Last Edit: Feb 11, 2019, 02:45 pm by timtailors
OK, solved that flashing issue maybe. Mapped in variant.h #define PIN_LED_TXL  to an unused pin


A remaining question is if PortA13 has interrupt capabilities? As far as I understood according variant.cpp it should be possible?
Code: [Select]
{ PORTA, 13, PIO_PWM, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM0_CH5, TCC0_CH0, EXTERNAL_INT_13 },

MartinL

Hi timtailors,

Quote
A remaining question is if PortA13 has interrupt capabilities? As far as I understood according variant.cpp it should be possible?
All IO pins (both analog and digital) on the SAMD21 have standard interrupt capability with the exception of port pin PA08, which is the non maskable interrrupt (NMI).

timtailors

Hi,
thanks! Does the "standard" also include waking up the device from sleep or is there a kind of "extended" capability necessarily?

MartinL

Quote
Does the "standard" also include waking up the device from sleep or is there a kind of "extended" capability necessarily?
Yes, each interrupt pin has a wake up capability. The Arduino attachInterrupt() function activates the wake up option by default.

Go Up