Control functions.
More...
|
HAL_StatusTypeDef | HAL_CAN_Start (CAN_HandleTypeDef *hcan) |
| Start the CAN module. More...
|
|
HAL_StatusTypeDef | HAL_CAN_Stop (CAN_HandleTypeDef *hcan) |
| Stop the CAN module and enable access to configuration registers. More...
|
|
HAL_StatusTypeDef | HAL_CAN_RequestSleep (CAN_HandleTypeDef *hcan) |
| Request the sleep mode (low power) entry. When returning from this function, Sleep mode will be entered as soon as the current CAN activity (transmission or reception of a CAN frame) has been completed. More...
|
|
HAL_StatusTypeDef | HAL_CAN_WakeUp (CAN_HandleTypeDef *hcan) |
| Wake up from sleep mode. When returning with HAL_OK status from this function, Sleep mode is exited. More...
|
|
uint32_t | HAL_CAN_IsSleepActive (const CAN_HandleTypeDef *hcan) |
| Check is sleep mode is active. More...
|
|
HAL_StatusTypeDef | HAL_CAN_AddTxMessage (CAN_HandleTypeDef *hcan, const CAN_TxHeaderTypeDef *pHeader, const uint8_t aData[], uint32_t *pTxMailbox) |
| Add a message to the first free Tx mailbox and activate the corresponding transmission request. More...
|
|
HAL_StatusTypeDef | HAL_CAN_AbortTxRequest (CAN_HandleTypeDef *hcan, uint32_t TxMailboxes) |
| Abort transmission requests. More...
|
|
uint32_t | HAL_CAN_GetTxMailboxesFreeLevel (const CAN_HandleTypeDef *hcan) |
| Return Tx Mailboxes free level: number of free Tx Mailboxes. More...
|
|
uint32_t | HAL_CAN_IsTxMessagePending (const CAN_HandleTypeDef *hcan, uint32_t TxMailboxes) |
| Check if a transmission request is pending on the selected Tx Mailboxes. More...
|
|
uint32_t | HAL_CAN_GetTxTimestamp (const CAN_HandleTypeDef *hcan, uint32_t TxMailbox) |
| Return timestamp of Tx message sent, if time triggered communication mode is enabled. More...
|
|
HAL_StatusTypeDef | HAL_CAN_GetRxMessage (CAN_HandleTypeDef *hcan, uint32_t RxFifo, CAN_RxHeaderTypeDef *pHeader, uint8_t aData[]) |
| Get an CAN frame from the Rx FIFO zone into the message RAM. More...
|
|
uint32_t | HAL_CAN_GetRxFifoFillLevel (const CAN_HandleTypeDef *hcan, uint32_t RxFifo) |
| Return Rx FIFO fill level. More...
|
|
Control functions.
==============================================================================
##### Control functions #####
==============================================================================
[..] This section provides functions allowing to:
(+) HAL_CAN_Start : Start the CAN module
(+) HAL_CAN_Stop : Stop the CAN module
(+) HAL_CAN_RequestSleep : Request sleep mode entry.
(+) HAL_CAN_WakeUp : Wake up from sleep mode.
(+) HAL_CAN_IsSleepActive : Check is sleep mode is active.
(+) HAL_CAN_AddTxMessage : Add a message to the Tx mailboxes
and activate the corresponding
transmission request
(+) HAL_CAN_AbortTxRequest : Abort transmission request
(+) HAL_CAN_GetTxMailboxesFreeLevel : Return Tx mailboxes free level
(+) HAL_CAN_IsTxMessagePending : Check if a transmission request is
pending on the selected Tx mailbox
(+) HAL_CAN_GetRxMessage : Get a CAN frame from the Rx FIFO
(+) HAL_CAN_GetRxFifoFillLevel : Return Rx FIFO fill level
◆ HAL_CAN_AbortTxRequest()
HAL_StatusTypeDef HAL_CAN_AbortTxRequest |
( |
CAN_HandleTypeDef * |
hcan, |
|
|
uint32_t |
TxMailboxes |
|
) |
| |
Abort transmission requests.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
TxMailboxes | List of the Tx Mailboxes to abort. This parameter can be any combination of
|
- Return values
-
Definition at line 1350 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_AddTxMessage()
Add a message to the first free Tx mailbox and activate the corresponding transmission request.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
pHeader | pointer to a CAN_TxHeaderTypeDef structure. |
aData | array containing the payload of the Tx frame. |
pTxMailbox | pointer to a variable where the function will return the TxMailbox used to store the Tx message. This parameter can be a value of
|
- Return values
-
Definition at line 1250 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_GetRxFifoFillLevel()
uint32_t HAL_CAN_GetRxFifoFillLevel |
( |
const CAN_HandleTypeDef * |
hcan, |
|
|
uint32_t |
RxFifo |
|
) |
| |
Return Rx FIFO fill level.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
RxFifo | Rx FIFO. This parameter can be a value of
|
- Return values
-
Number | of messages available in Rx FIFO. |
Definition at line 1608 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_GetRxMessage()
Get an CAN frame from the Rx FIFO zone into the message RAM.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
RxFifo | Fifo number of the received message to be read. This parameter can be a value of
|
pHeader | pointer to a CAN_RxHeaderTypeDef structure where the header of the Rx frame will be stored. |
aData | array where the payload of the Rx frame will be stored. |
- Return values
-
Definition at line 1508 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_GetTxMailboxesFreeLevel()
Return Tx Mailboxes free level: number of free Tx Mailboxes.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Number | of free Tx Mailboxes. |
Definition at line 1399 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_GetTxTimestamp()
uint32_t HAL_CAN_GetTxTimestamp |
( |
const CAN_HandleTypeDef * |
hcan, |
|
|
uint32_t |
TxMailbox |
|
) |
| |
Return timestamp of Tx message sent, if time triggered communication mode is enabled.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
TxMailbox | Tx Mailbox where the timestamp of message sent will be read. This parameter can be one value of
|
- Return values
-
Timestamp | of message sent from Tx Mailbox. |
Definition at line 1474 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_IsSleepActive()
Check is sleep mode is active.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Status |
- 0 : Sleep mode is not active.
- 1 : Sleep mode is active.
|
Definition at line 1219 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_IsTxMessagePending()
uint32_t HAL_CAN_IsTxMessagePending |
( |
const CAN_HandleTypeDef * |
hcan, |
|
|
uint32_t |
TxMailboxes |
|
) |
| |
Check if a transmission request is pending on the selected Tx Mailboxes.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
TxMailboxes | List of Tx Mailboxes to check. This parameter can be any combination of
|
- Return values
-
Status |
- 0 : No pending transmission request on any selected Tx Mailboxes.
- 1 : Pending transmission request on at least one of the selected Tx Mailbox.
|
Definition at line 1442 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_RequestSleep()
Request the sleep mode (low power) entry. When returning from this function, Sleep mode will be entered as soon as the current CAN activity (transmission or reception of a CAN frame) has been completed.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Definition at line 1141 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_Start()
Start the CAN module.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Definition at line 1034 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_Stop()
Stop the CAN module and enable access to configuration registers.
- Parameters
-
hcan | pointer to an CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Definition at line 1086 of file stm32f4xx_hal_can.c.
◆ HAL_CAN_WakeUp()
Wake up from sleep mode. When returning with HAL_OK status from this function, Sleep mode is exited.
- Parameters
-
hcan | pointer to a CAN_HandleTypeDef structure that contains the configuration information for the specified CAN. |
- Return values
-
Definition at line 1172 of file stm32f4xx_hal_can.c.