Comments (1)
The issue seems to be caused by the gpio_int_callback
instm32_common_gpio.c
starting an atomic section (and thus disabling all interrupts).
The complete flow causing the bug would be as follows:
drive_output_high_task
is scheduled on the timer- the hw timer is configured so it will fire after
0.5 * TIMER_TICKS_PER_SEC
- The scheduler will then schedule
__feed_watchdog_task
on the timer (which will stay in the timer queue) - Timer fires after
0.5 * TIMER_TICKS_PER_SEC
drive_output_high_task
is scheduled in the scheduler to be executed as the next task- the hw timer is configured to fire for the next task of the timer queue, which at this point is the __feed_watchdog_task. Doing this will set
cmp_reg_write_pending
to true. This value is set to false again by the timer interrupt (thus indicating the hw timer cmp reg is set properly) drive_output_high_task
is executed by the schedulerdrive_output_high_task
will set the gpio pin high- The GPIO interrupt fires
gpio_int_callback
will start an atomic section (disabling all interrupts!) and callsdrive_output_low_ISR
drive_output_low_ISR
will scheduledrive_output_low_task
on the timer- As
drive_output_low_ISR
would need to be executed before __feed_watchdog_task, the hwtimer is configured - as the timer interrupt has not yet fired at this point to indicate the cmp reg was set successfully, the processor will hang on
while(cmp_reg_write_pending)
- As we are in an atomic section, interrupts are disabled and the timer interrupt will never fire
from sub-iot-stack.
Related Issues (20)
- noise_logger.c compile fails - userbutton.h not found HOT 2
- sniffer.c compile fails - alp_cmd_handler.h not found HOT 1
- I2C on B_L072Z_LRWAN1 platform HOT 2
- Sensor Action example: assertion "is_fs_init_completed" failed HOT 1
- Sensor Action example: incorrect value in RTT logs HOT 4
- STM32 hw_get_unique_id() bug HOT 4
- Gateway software ? HOT 1
- RTT Logging does not work well with Sleep
- Performance results available? HOT 1
- Bug scheduling messages in the unsollicited response callback HOT 8
- Board resets when sending message using default access class at index 1 set to normal rate. HOT 6
- Unkown hardfault when running C++ on B-L072Z-LRWAN1 HOT 2
- Enforce .clang-format
- Assertion fail in timer_fired() HOT 5
- Some compiler flags that cause errors now that might be worth it to be fixed HOT 2
- ALP_ITF_ID_D7ASP interface config format doesn't seem to match spec (same with pyd7a impl) HOT 2
- One-Hop Routing HOT 2
- ALP layer: unsolicited commands are sent back in the response HOT 1
- Compilation Error while running make HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sub-iot-stack.