⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
point85
Offline
Last seen: 2 years 6 months ago
Joined: 2018-06-29 15:31
HW_WKUP interrupt.

Hi,

 

I have followed the tutorial at:http://lpccs-docs.dialog-semiconductor.com/da1468x_external_interruption/implementation.html to get the hw_wkup to trigger an interrup on a GPIO pin. This is working well when the task is first run.

 

If i kill the task and then re-run the task the code gets stuck in a constant trigger of the callback even though the pin state is not changing.

 

Is this a bug in the hw_wkup control?

 

This is the code in the init of the task before the for loop.

hw_wkup_init(NULL);
hw_wkup_configure_pin(ACCEL_INT2_PORT,ACCEL_INT2_PIN, 1, HW_WKUP_PIN_STATE_LOW);
hw_wkup_set_counter_threshold(1);
hw_wkup_set_debounce_time(1);
hw_wkup_register_interrupt(accel_interrupt_cb, 1);

 

This is the code used to stop the interrupt on the deletion of the task.

hw_wkup_reset_interrupt();
hw_wkup_unregister_interrupt();

 

Device: 
PM_Dialog
Offline
Last seen: 9 months 1 day ago
Staff
Joined: 2018-02-08 11:03
Hi point85,

Hi point85,

I assume that you are not running the example as it is, and you have done some modification in the freertos_retarget code. To do so, could you share me the modifications that you have done in order to replicate you issue? Also, could you indicate where the code gets stuck if you run it in debug mode?

Thanks, PM_Dialog