| STM32L - BlueNRG-1 BLE stack APIs, Events and Constants

- Main Page
- Modules
- Classes
- Files

Functions
ACI HAL events

ACI HAL events layer. More...

## Functions

| WEAK_FUNCTION (void aci_blue_initialized_event(uint8_t Reason_Code))
| This event inform the application that the network coprocessor has been reset. If the reason code is a system crash, a following event aci_blue_crash_info_event will provide more information regarding the system crash details. More...
| WEAK_FUNCTION (void aci_hal_end_of_radio_activity_event(uint8_t Last_State, uint8_t Next_State, uint32_t Next_State_SysTime))
| This event is generated when the device completes a radio activity and provide information when a new radio acitivity will be performed. Informtation provided includes type of radio activity and absolute time in system ticks when a new radio acitivity is schedule, if any. Application can use this information to schedule user activities synchronous to selected radio activitities. A command aci_hal_set_radio_activity_mask is provided to enable radio activity events of user interests, by default no events are enabled. User should take into account that enablinng radio events in application with intense radio activity could lead to a fairly high rate of events generated. Application use cases includes synchronizing notification with connection interval, switiching antenna at the end of advertising or performing flash erase operation while radio is idle. More...
| WEAK_FUNCTION (void aci_blue_events_lost_event(uint8_t Lost_Events[8]))
| This event is generated when an overflow occurs in the event queue read by the external microcontroller. This is normally caused when the external microcontroller does not read pending events. The returned bitmap indicates which event has been lost. Please note that one bit set to 1 indicates one or more occurrences of the particular events. The event ACI_BLUE_EVENTS_LOST_EVENT cannot be lost and it will inserted in the event queue as soon as a position is freed in the event queue. This event should not happen under normal operating condition where external microcontroller promptly reads events signaled by IRQ pin. It is provided to detected unexpected behavior of the external microcontroller or to allow application to recover situations where critical events are lost. More...
| WEAK_FUNCTION (void aci_blue_crash_info_event(uint8_t Crash_Type, uint32_t SP, uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3, uint32_t R12, uint32_t LR, uint32_t PC, uint32_t xPSR, uint8_t Debug_Data_Length, uint8_t Debug_Data[]))
| This event is given to the application after the aci_blue_initialized_event when a system crash is detected. This events returns system crash information for debugging purposes. Information reported are useful to understand the root cause of the crash. More...

## Detailed Description

ACI HAL events layer.

## Function Documentation

WEAK_FUNCTION | ( | void | aci_blue_initialized_eventuint8_t Reason_Code | ) |

This event inform the application that the network coprocessor has been reset. If the reason code is a system crash, a following event aci_blue_crash_info_event will provide more information regarding the system crash details.

Parameters

  Reason_Code | Reason code describing why device was reset and in which mode is operating (Updater or Normal mode)

Return values

  None |

WEAK_FUNCTION | ( | void | aci_hal_end_of_radio_activity_eventuint8_t Last_State, uint8_t Next_State, uint32_t Next_State_SysTime | ) |

This event is generated when the device completes a radio activity and provide information when a new radio acitivity will be performed. Informtation provided includes type of radio activity and absolute time in system ticks when a new radio acitivity is schedule, if any. Application can use this information to schedule user activities synchronous to selected radio activitities. A command aci_hal_set_radio_activity_mask is provided to enable radio activity events of user interests, by default no events are enabled. User should take into account that enablinng radio events in application with intense radio activity could lead to a fairly high rate of events generated. Application use cases includes synchronizing notification with connection interval, switiching antenna at the end of advertising or performing flash erase operation while radio is idle.

Parameters

  Last_State | Completed radio events
  Next_State | Incoming radio events
  Next_State_SysTime | 32bit absolute current time expressed in internal time units.

Return values

  None |

WEAK_FUNCTION | ( | void | aci_blue_events_lost_eventuint8_t Lost_Events[8] | ) |

This event is generated when an overflow occurs in the event queue read by the external microcontroller. This is normally caused when the external microcontroller does not read pending events. The returned bitmap indicates which event has been lost. Please note that one bit set to 1 indicates one or more occurrences of the particular events. The event ACI_BLUE_EVENTS_LOST_EVENT cannot be lost and it will inserted in the event queue as soon as a position is freed in the event queue. This event should not happen under normal operating condition where external microcontroller promptly reads events signaled by IRQ pin. It is provided to detected unexpected behavior of the external microcontroller or to allow application to recover situations where critical events are lost.

Parameters

  Lost_Events | Bitmap of lost events. Each bit indicates one or more occurrences of the specific event: 0x0000000000000001 HCI_DISCONNECTION_COMPLETE_EVENT 0x0000000000000002 HCI_ENCRYPTION_CHANGE_EVENT 0x0000000000000004 HCI_READ_REMOTE_VERSION_INFORMATION_COMPLETE_EVENT 0x0000000000000008 HCI_COMMAND_COMPLETE_EVENT 0x0000000000000010 HCI_COMMAND_STATUS_EVENT 0x0000000000000020 HCI_HARDWARE_ERROR_EVENT 0x0000000000000040 HCI_NUMBER_OF_COMPLETED_PACKETS_EVENT 0x0000000000000080 HCI_ENCRYPTION_KEY_REFRESH_COMPLETE_EVENT 0x0000000000000100 ACI_BLUE_INITIALIZED_EVENT 0x0000000000000200 ACI_GAP_LIMITED_DISCOVERABLE_EVENT 0x0000000000000400 ACI_GAP_PAIRING_COMPLETE_EVENT 0x0000000000000800 ACI_GAP_PASS_KEY_REQ_EVENT 0x0000000000001000 ACI_GAP_AUTHORIZATION_REQ_EVENT 0x0000000000002000 ACI_GAP_SLAVE_SECURITY_INITIATED_EVENT 0x0000000000004000 ACI_GAP_BOND_LOST_EVENT 0x0000000000008000 ACI_GAP_PROC_COMPLETE_EVENT 0x0000000000010000 ACI_GAP_ADDR_NOT_RESOLVED_EVENT 0x0000000000020000 ACI_L2CAP_CONNECTION_UPDATE_RESP_EVENT 0x0000000000040000 ACI_L2CAP_PROC_TIMEOUT_EVENT 0x0000000000080000 ACI_L2CAP_CONNECTION_UPDATE_REQ_EVENT 0x0000000000100000 ACI_GATT_ATTRIBUTE_MODIFIED_EVENT 0x0000000000200000 ACI_GATT_PROC_TIMEOUT_EVENT 0x0000000000400000 ACI_ATT_EXCHANGE_MTU_RESP_EVENT 0x0000000000800000 ACI_ATT_FIND_INFO_RESP_EVENT 0x0000000001000000 ACI_ATT_FIND_BY_TYPE_VALUE_RESP_EVENT 0x0000000002000000 ACI_ATT_READ_BY_TYPE_RESP_EVENT 0x0000000004000000 ACI_ATT_READ_RESP_EVENT 0x0000000008000000 ACI_ATT_READ_BLOB_RESP_EVENT 0x0000000010000000 ACI_ATT_READ_MULTIPLE_RESP_EVENT 0x0000000020000000 ACI_ATT_READ_BY_GROUP_TYPE_RESP_EVENT 0x0000000040000000 ACI_ATT_WRITE_RESP_EVENT 0x0000000080000000 ACI_ATT_PREPARE_WRITE_RESP_EVENT 0x0000000100000000 ACI_ATT_EXEC_WRITE_RESP_EVENT 0x0000000200000000 ACI_GATT_INDICATION_EVENT 0x0000000400000000 ACI_GATT_NOTIFICATION_EVENT 0x0000000800000000 ACI_GATT_PROC_COMPLETE_EVENT 0x0000001000000000 ACI_GATT_ERROR_RESP_EVENT 0x0000002000000000 ACI_GATT_DISC_READ_CHAR_BY_UUID_RESP_EVENT 0x0000004000000000 ACI_GATT_WRITE_PERMIT_REQ_EVENT 0x0000008000000000 ACI_GATT_READ_PERMIT_REQ_EVENT 0x0000010000000000 ACI_GATT_READ_MULTI_PERMIT_REQ_EVENT 0x0000020000000000 ACI_GATT_TX_POOL_AVAILABLE_EVENT 0x0000040000000000 ACI_GATT_SERVER_CONFIRMATION_EVENT 0x0000080000000000 ACI_GATT_PREPARE_WRITE_PERMIT_REQ_EVENT 0x0000100000000000 HCI_LE_CONNECTION_COMPLETE_EVENT 0x0000200000000000 HCI_LE_ADVERTISING_REPORT_EVENT 0x0000400000000000 HCI_LE_CONNECTION_UPDATE_COMPLETE_EVENT 0x0000800000000000 HCI_LE_READ_REMOTE_USED_FEATURES_COMPLETE_EVENT 0x0001000000000000 HCI_LE_LONG_TERM_KEY_REQUEST_EVENT

Return values

  None |

WEAK_FUNCTION | ( | void | aci_blue_crash_info_eventuint8_t Crash_Type, uint32_t SP, uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3, uint32_t R12, uint32_t LR, uint32_t PC, uint32_t xPSR, uint8_t Debug_Data_Length, uint8_t Debug_Data[] | ) |

This event is given to the application after the aci_blue_initialized_event when a system crash is detected. This events returns system crash information for debugging purposes. Information reported are useful to understand the root cause of the crash.

Parameters

  Crash_Type | Crash type
  SP | Stack pointer
  R0 | Register R0
  R1 | Register R1
  R2 | Register R2
  R3 | Register R3
  R12 | Register R12
  LR | Link register
  PC | Program counter where crash occurred
  xPSR | xPSR register
  Debug_Data_Length | Length of Debug_Data field
  Debug_Data | Debug data

Return values

  None |