9 years, 5 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:

Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard. cmsis, rtos, RTX

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 2014

http://developer.mbed.org/handbook/RTOS

  1. include "mbed.h"
  2. include "rtos.h"

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

1 Answer

9 years, 2 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.