Skip to main content
This topic has been closed for replies.

3 replies

Pavel A.
March 19, 2022

For STM32L4 you want to use its specific header file, rather than something of STM32F10

https://github.com/STMicroelectronics/cmsis_device_l4/blob/master/Include/stm32l432xx.h

jgauthier
jgauthierAuthor
Senior
March 20, 2022

It doesn't document how to use them.

ie:

typedef struct
{
 __IO uint32_t TIR; /*!< CAN TX mailbox identifier register */
 __IO uint32_t TDTR; /*!< CAN mailbox data length control and time stamp register */
 __IO uint32_t TDLR; /*!< CAN mailbox data low register */
 __IO uint32_t TDHR; /*!< CAN mailbox data high register */
} CAN_TxMailBox_TypeDef;

The only reference to TIR in that file.

		/* Request transmission */
		SET_BIT(hcan->Instance->sTxMailBox[TxMailbox].TIR, CAN_TI0R_TXRQ)

This is in HAL_CAN_AddTxMessage()

Also,

		/* Set up the Transmit Global Time mode */
		if (pHeader->TransmitGlobalTime == ENABLE) {
			SET_BIT(hcan->Instance->sTxMailBox[TxMailbox].TDTR, CAN_TDT0R_TGT);
		}

I'm looking for documentation on what to do with these registers.

mƎALLEm
ST Technical Moderator
March 21, 2022

Hello,

You can refer to STM32L4xx reference manual RM0394 / section 44 and more specifically the section 44.9 CAN registers that provides detailed descriptions of different bits.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.