- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are trying to figure out a reboot/timing issue that we are seeing with the CYW20719 MCU.
What we are noticing is that if we have debug enabled and are outputting debug statements to the PUART via WICED_BT_TRACE, the program runs fine.
If we disable/remove the WICED_BT_TRACE statement the program crashes, and the board goes into a constant reboot cycle and continues to crash at the point where we removed the WICED_BT_TRACE statement.
This is occurring with exchanging data over SPI2 with a memory chip that we have. The operation that is being performed are multiple consecutive reads over the SPI2 Bus.
We are wondering if the WICED_BT_TRACE is creating enough of a time delay to allow the bus to recover and possible we need to add a delay somewhere?
If we do need to add a delay, what is the best way to do so?
Solved! Go to Solution.
- Labels:
-
Wireless
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think, the watchdog reset is happening in the function where you perform the read operation. The default watchdog timeout is set to 2 seconds and watchdog petting is done in the idle thread periodically. You should ensure that the idle thread gets enough time to pet the watchdog. So you should provide some delay. WICED_BT_TRACE might be giving the required delay so that it avoids the watchdog reset.
FYI.
Check wiced_hal_wdog.h
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think, the watchdog reset is happening in the function where you perform the read operation. The default watchdog timeout is set to 2 seconds and watchdog petting is done in the idle thread periodically. You should ensure that the idle thread gets enough time to pet the watchdog. So you should provide some delay. WICED_BT_TRACE might be giving the required delay so that it avoids the watchdog reset.
FYI.
Check wiced_hal_wdog.h
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dhreeraj,
Thank you! It is definitely related to the Watchdog thread, I was able to confirm this by temporarily disabling the watchdog, and the long running reads and writes or long for loops were able to complete, some take longer than 2 seconds.
What would be the correct method to reset/delay to prevent the wdog from rebooting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can give a rtos delay in the loop which causes the wdog to triggers. Check wiced_rtos.h. Use ALLOW_THREAD_TO_SLEEP as delay_type where ever possible.
Production applications need not pet the watchdog.
Thanks,
-Dheeraj.P.K