This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_delay_us() is getting me a fatal error!

Hello, 

I'm currently developing a PS2 code to read the inputs of a mouse and transmit it over BLE, nrf_delay_us() is giving me a fatal error every time according to debug.

I tried the PS2 code only when developing the code and it worked flawlessly. but when I try to use it with the BLE HID mouse example it fails.

I think nrf_delays_us() is giving me those errors due to a timer being initialized (although not sure if that makes senso or not).

I would love to implement any other way of "waiting ", but I dont think I know how, maybe I should try to use the app_timer itself to generate the waiting? (300 microseconds is my biggest waiting time, but the code needs to follow a sequence).

Once again, thank you very much I trully appreciate all the effort.

Parents
  • Sorry Hakon, all i can see in the serial monitor here is a fatal error.

    An extra information is : I figure out that the error is only happening when I call advertising_start.

    I'm thinking on trying to implement a FreeRTOS idk, only to see if I can make it work. I wish I could make the communication work in a better way but the only way i'm aware of if setting the pin states and waiting a bit.

    Maybe FreeRTOS will help me archive this in a way that its not going to mess with the advertising.

    Thank you for your attention on the subject!

Reply
  • Sorry Hakon, all i can see in the serial monitor here is a fatal error.

    An extra information is : I figure out that the error is only happening when I call advertising_start.

    I'm thinking on trying to implement a FreeRTOS idk, only to see if I can make it work. I wish I could make the communication work in a better way but the only way i'm aware of if setting the pin states and waiting a bit.

    Maybe FreeRTOS will help me archive this in a way that its not going to mess with the advertising.

    Thank you for your attention on the subject!

Children
No Data
Related