Event system to control GPIO pin (SAMR34) not working in sleepwalking (with standby)

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everybody!

 

 

Hoping somebody here has extended experience with the event system.

 

I am trying to set the output of a GPIO pin with the event system, but it doesn't allow me to.
 

Current setup, based on the low power dynamic sleepwalking example.

connected TC4 to a prescaled clock that runs in standby to have an overflow event generated.
I still leave the ADC eventuser (start conversion) attached as being used by the example.

Also the DMA is still configured.

 

Configured the PORT_INPUT_EVENT_0 to be attached to the LED pin.

and attached the EVSYS_ID_USER_PORT_EV_0 to that same eventchannel based off TC4 OVF.

 

void enable_port_events(void)
{
    struct port_input_event_config config_port_events;
    port_input_event_get_config_defaults(&config_port_events);
    config_port_events.gpio_pin = LED_0_PIN;
    config_port_events.action = PORT_INPUT_EVENT_ACTION_TGL;
    port_input_event_set_config(PORT_INPUT_EVENT_0,&config_port_events);
    port_enable_input_event(LED_0_PIN,PORT_INPUT_EVENT_0);
}

 

 

 

 

 

The led blinks during active and idle, so i know the event system is steup correctly.

 

However if i try to do this in standby, it simply doesn't work anymore.

The adc still get triggered, and those values are still available in the memory after wake up, so i know the event system is running in standby as well.

 

I already fondled with the clocks, put all of them in run on standby.
I already looked at voltage regulators, maybe i thought the GPIO pins would be in sort of retention state, but no luck there either.

 

What am i missing here that this pin doesn't update from the eventsystem in standby mode?
 

 

thanks all

 

 

 

 

 

 

 

 

 

-noobs have rights too-

Last Edited: Fri. Nov 8, 2019 - 11:43 AM