I read this great tutorial about the PAL Event System and how to execute threads based on a GPIO port. https://www.playembedded.org/blog/buttons-stm32/
However some things are unclear to me. According to the chibiOS documentation, threads register to events by using an event listener. (Taken from here: http://chibios.org/dokuwiki/doku.php?id ... nel_events). However in the tutorial no event listeners a used. Just a simple wait function. How does the implementation in the tutorial differ from the one explained in the wiki? What happens if multiple threads execute the palWaitPadTimeout function for the same event? (That seems to work). Is there a similar way to enable a event for the end of an SPI receive?
Understanding PAL and ChibiOS Events
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Re: Understanding PAL and ChibiOS Events
Hi,
PAL events and RTOS events are two different and unrelated things, the article on play embedded is correct. RTOS events are a generic mechanism used by some other drivers.
Giovanni
PAL events and RTOS events are two different and unrelated things, the article on play embedded is correct. RTOS events are a generic mechanism used by some other drivers.
Giovanni
Re: Understanding PAL and ChibiOS Events
Thanks for the explanation, I figured the play article is correct, since it works. I just wanted to understand why it works the way it does
Maybe something can be done to differentiate the two different event types?
How does the PAL events deal with multiple threads waiting for the same event? I couldn't find any more documentation on it.
Maybe something can be done to differentiate the two different event types?
How does the PAL events deal with multiple threads waiting for the same event? I couldn't find any more documentation on it.
- Giovanni
- Site Admin
- Posts: 14444
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1074 times
- Been thanked: 921 times
- Contact:
Who is online
Users browsing this forum: No registered users and 13 guests