bt_nus_send not working with cmsis_os2.h

Hallo Nordic support team

In a current project I have got stuck with cmsis_os. The micro restarts after trying to send the first package with bt_nus_send. 

The same code works with bt_nus_send in a Zephyr task or in the main but is not when using a cmsis task. In the code attached are the three options:

// #define USE_MAIN     // as in the original example --> is working

// #define USE_ZEPHYR   // sending in a Zephyr thread --> is working

#define USE_CMSIS   // sending in a cmsis thread --> is crashing with the first transmit!!!

 

What’s is wrong with the USE_CMSIS variant?

 

Thanks for help and improving the example for the community.

Andi

peripheral_nus.zip

Related