4 Replies Latest reply on Nov 25, 2020 10:07 AM by JoCh_1493306

    Timer Interrupt Not Working On a Custom BSP (based off CY8CKIT-062-WIFI-BT)




      I have a custom BSP created based off CY8CKIT-062-WIFI-BT. I copied the timer interrupt code from the "Hello World" example (which blinks a LED when a timer interrupt occurs), and tried to run that on my custom BSP. The project built ok and loaded to my board ok. However, I don't see the timer interrupt being generated when it runs. Below is my Device Configurator Systems page.


      The only change I made was to disable WCO (and changed CLK_BAK to CLK_LF, an changed CLK_LF to use the source from ILO). The reason of disabling WCO was due to some run-time error I ran into in cybsp_init() function (the error seems to relate to WCO not configured since this is a custom board). After disabling WCO it was running ok.


      However, now I am testing the timer interrupt code like in the "Hello World" example project, it doesn't seem to me the timer interrupt was happening at all (in the ISR, I have a LED blink function call and a printf(), but I did not see any of them happen).



      FYI I also disabled some pin functions in Device Configurator since they conflict with my custom board's actual routing (I used HAL in my code). I can see P0[0] and P0[1] are used by WCO. If I disabled them it would give me error.


      So here I have 2 questions:

      1. What did I miss in my project causing the timer interrupt not working?

      2. How do I configure WCO correctly for the custom board?


      ************************ Edited on 11/16 *********************

      I have attached a project which does not have the timer interrupt working in this moment.

      1. I created this project based off CY8CKIT-062-WIFI-BT "Hello World" example, and verified it worked well on the dev kit (LED was blinking ok by the timer interrupt)

      2. Then I created the custom BSP (TESTBSP1) from this project. I modified the UART and LED pin assignment to match what I have on the custom board. I did not change the code at all. It still works fine on my custom board.

      3. I need to enable the Wi-Fi feature on my custom board, so I added in "wifi-connection-manager" library from "Library Manager 1.2" (which also includes lots of other libraries, such as freertos). I also copied resource_map.h, FreeRTOSConfig.h, lwipopts.h, and mbedtls_user_config.h files to the project folder. Made changes to the makefile by modifying the variables below:








      I also copied wifi_nvram_image.h from TARGET_CY8CKIT-062-WIFI-BT folder to TARGET_TEST_BSP1 folder in order to get Wi-Fi feature enabled.


      The code was then built ok and loaded to my custom board ok. However, the timer interrupt stops working this time.


      So it looks like adding those Wi-Fi libraries messed up with the timer interrupt. Any idea how to fix that?