ASSERT_WARNING
Hello Support!
I woulu like to know about the "ASSERT_WARNING".
rwble.c
>> void power_up(void)
>>
>> if ( GetBits32(BLE_INTSTAT_REG, SLPINTSTAT) )
>> ASSERT_WARNING(0);
>>
>> while ( !GetBits32(BLE_INTSTAT_REG, SLPINTSTAT) ) {};
Q1)
Could you please let me know the conditions of "BLE_INTSTAT_REG, SLPINTSTAT"
and when & how "SLPINTSTAT" is TRUE.
I can not find them in the datasheet.
And if this condtions("GetBits32(BLE_INTSTAT_REG, SLPINTSTAT)" is FALSE) is kept,
I think that it is in the state such as FREEZE at the last "while" statement.
Q2-1)
Is it avalable WDT?
Q2-2)
Then this "while" statement,
Original:
while ( !GetBits32(BLE_INTSTAT_REG, SLPINTSTAT) ) {};
Proposal:
while ( SetBits32(BLE_INTACK_REG, EVENTINTACK,0) );
I expect that waiting state(such like as FLEEZE state) is avoided.
Could you please let me know whether or not the proposalis correct?
regards,
Jun-ichi
Hi Jun-ichi Tobe,
Q1) SLPINTSTAT is the bitfiled in the BLE_INTSTAT_REG that denotes the ending of the sleeping period of the 580.
Q2) What do you mean ?
Q3) I dont quite get what you want to do with thewhile ( SetBits32(BLE_INTACK_REG, EVENTINTACK,0) ); that bitfiled resets the SLPINTSTAT interrupt and its a write only, the device is not going to work if you make this modification. In general those functions should not be changed in anyway.
Thanks MT_dialog
Hello support!
Thank you for your support.
我将问题如下。
1)
When or how this "ASSERT_WARNING" occurs ?
2)
Would tell me the logic sequence of this "ASSERT_WARNING"?
Or which documents should be a reference for this "ASSERT_WARNING"?
3)
In order to avoid this "ASSERT_WARNING", what should we do?
Regards.
Jun-ichi
Hi Jun-ichi Tobe,
1) The ASSERT_WARNING occurs if you spend much time in the waking up procedure (in the LP handler). In case you ve spend too much time and the interrupt for exiting the sleep period occurs that means that probably you will miss the connection, so the code is warning you for not waking up in time.
2) The waking up procedure is part of the riviera waves implementation, documentation regarding the waking up procedure is not available and stack details are not available either.
3) As i ve allready mentioned its not a good idea to mess with those functions, the SDK is developed and it is stable as is. Also in your code, do you get this ASSERT_WARNING in the SLP Handler ?
Thanks MT_dialog