3 Replies Latest reply on Nov 19, 2020 3:40 PM by RodolfoG_11

    Code got stuck at cyhal_system_delay_ms()

    JoCh_1493306

      Hi,

       

      I have a test code running on my custom BSP and it somehow got stuck at cyhal_system_delay_ms(). I ran the debug mode and found that inside cyhal_system.c "cy_rtos_delay_milliseconds(milliseconds);" never returns:

       

       

      I did include "freertos.h" and "task.h". But even though I don't include these 2 libraries, I still see it got stuck here.

       

      Then I replaced "cyhal_system_delay_ms()" with "CyDelay()" and it works. What is difference between these 2 APIs? And what does it crash at "cyhal_system_delay_ms()"?

       

      Does it have anything to do with the system clock setup?

       

      Thank you!