Do we have a return time contract in a BLE GAP event?
Posted: Thu Dec 14, 2017 6:07 am
In my logic, I am performing work in a BLE GAP event handler. Specifically, I am looking at the responses that come back from a scan requests when my ESP32 is being a BLE Central. I see the events arrive and I do some processing on them. When I perform the scan, I specify how many seconds we should scan for.
With this background, here is the puzzle.
If my processing logic within the GAP event handler takes 50msecs, then when the scan time completes, the ESP32 crashes. However, if my processing time in the GAP event handler takes virtually 0 time, then when the scan time completes, all is normal.
The exception logged in the console is also like none I have ever seen before:
ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c .... repeats
My "gut" is saying that I have a timing issue and that I have to get "out" of the GAP event handler quicker than I am. If this is true, then that starts to make me feel that there is some metric or maximum which might have to be documented about the maximum time we can spend in a GAP event handler.
With this background, here is the puzzle.
If my processing logic within the GAP event handler takes 50msecs, then when the scan time completes, the ESP32 crashes. However, if my processing time in the GAP event handler takes virtually 0 time, then when the scan time completes, all is normal.
The exception logged in the console is also like none I have ever seen before:
ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c at line 293ASSERT_PARAM(-218959118 0), in arch_main.c .... repeats
My "gut" is saying that I have a timing issue and that I have to get "out" of the GAP event handler quicker than I am. If this is true, then that starts to make me feel that there is some metric or maximum which might have to be documented about the maximum time we can spend in a GAP event handler.