The mutex should protect the "counter" variable in this example
And every time before using "counter" mutex also is used
The print function works using this:
void SWO_PrintChar(char const c, uint8_t const portNo)
{
volatile int timeout;
/* Check if Trace Control Register (ITM->TCR at 0xE0000E80 ...
Search found 5 matches
- Mon Aug 21, 2023 3:38 pm
- Forum: ChibiOS/RT
- Topic: Interrupts by timer and locked code sections
- Replies: 9
- Views: 33069
- Mon Aug 21, 2023 10:37 am
- Forum: ChibiOS/RT
- Topic: Interrupts by timer and locked code sections
- Replies: 9
- Views: 33069
Re: Interrupts by timer and locked code sections
Hello, thanks for support
I kind of fixed timer's callback
And added a mutex to the critical section as well
Everything works, but since there was a comment indicating the erroneous use of critical sections, I decided to attach the code again
If it's not difficult, please take a look: is ...
I kind of fixed timer's callback
And added a mutex to the critical section as well
Everything works, but since there was a comment indicating the erroneous use of critical sections, I decided to attach the code again
If it's not difficult, please take a look: is ...
- Mon Jul 31, 2023 10:08 am
- Forum: ChibiOS/RT
- Topic: Interrupts by timer and locked code sections
- Replies: 9
- Views: 33069
Re: Interrupts by timer and locked code sections
Thanks!
I have designated CH_DBG_SYSTEM_STATE_CHECK as TRUE in chconf.h, but now my nucleo freezes after the callback is triggered
Did I do something wrong?
What other violations are there?
I have designated CH_DBG_SYSTEM_STATE_CHECK as TRUE in chconf.h, but now my nucleo freezes after the callback is triggered
Did I do something wrong?
What other violations are there?
- Sun Jul 30, 2023 1:02 pm
- Forum: ChibiOS/RT
- Topic: Interrupts by timer and locked code sections
- Replies: 9
- Views: 33069
Re: Interrupts by timer and locked code sections
Hello
thank you so much for your help
(my question arose when I was experimenting with the library's capabilities)
That code I divided into 2 parts
This example demonstrates the operation of critical code blocks in threads
#include "ch.h"
#include "hal.h"
#include "rt_test_root.h ...
thank you so much for your help
(my question arose when I was experimenting with the library's capabilities)
That code I divided into 2 parts
This example demonstrates the operation of critical code blocks in threads
#include "ch.h"
#include "hal.h"
#include "rt_test_root.h ...
- Wed Jul 26, 2023 11:00 am
- Forum: ChibiOS/RT
- Topic: Interrupts by timer and locked code sections
- Replies: 9
- Views: 33069
Interrupts by timer and locked code sections
Hello
I will be very glad if I get help
I'm really trying to understand how to use interruptions and locked code blocks
I tried to realize interruptions by timer
I have not find smth like "cycle timer" (an timer object, that alarm by a period, until it will be enabled) yet, maybe it does not exist ...
I will be very glad if I get help
I'm really trying to understand how to use interruptions and locked code blocks
I tried to realize interruptions by timer
I have not find smth like "cycle timer" (an timer object, that alarm by a period, until it will be enabled) yet, maybe it does not exist ...