Scanning causes crash

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
HeGi_2497906
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

This was part of another string and is a continuation of the observer/peripheral switching constantly.

As soon as we turn on scanning, the main loop crashes.

Sometimes I can get a scan report, sometimes not, any ideas would be appreciated.

Can you help, new bundle attached.

H

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Please refer to the attached modified project.

Please refer to the below points.

1. Don't write big code inside any ISR. Instead, set a variable inside ISR and check the variable status and call the function in main loop.

2. Always keep the Bless interrupt to highest priority i.e., bless interrupt priority to 0.

3. Please clear the WDT interrupt properly after completion using CySysWdtClearInterrupt(), this function will Clears all the WDT counter interrupts set in the mask.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Please refer to the attached modified project.

Please refer to the below points.

1. Don't write big code inside any ISR. Instead, set a variable inside ISR and check the variable status and call the function in main loop.

2. Always keep the Bless interrupt to highest priority i.e., bless interrupt priority to 0.

3. Please clear the WDT interrupt properly after completion using CySysWdtClearInterrupt(), this function will Clears all the WDT counter interrupts set in the mask.

Thanks,

P Yugandhar.

0 Likes