Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 11 months ago.
mbed-rtos cannot work with nrf51822
I tried the official example and it's not working. Is this a bug or requiring other tricks?
This buddy also met the same problem.
https://developer.mbed.org/questions/4672/Basic-RTOS-Thread-operations-not-working/
Hope fixed soon.
Thanks
Question relating to:
1 Answer
9 years, 9 months ago.
Hi,
There's an issue on github. The nrf51 does not have SysTick which is the timer used by RTX. Look at https://github.com/mbedmicro/mbed/issues/902.
There are multiple questions regarding this, so I am just updating all of you with a reason why it's not working.
Which example and what are the revisions of libraries? Mbed lib and the RTOS library? The latest ones are not functional ?
posted by Martin Kojtal 01 Dec 2014http://developer.mbed.org/handbook/RTOS
DigitalOut led1(LED1); DigitalOut led2(LED2);
void led2_thread(void const *args) { while (true) { led2 = !led2; Thread::wait(1000); } }
int main() { Thread thread(led2_thread);
while (true) { led1 = !led1; Thread::wait(500); } }
posted by Klein Yuan 01 Dec 2014