cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-L476RG (STM32L476RG) CAN peripheral does not work with CubeMX design code.

YS.K
Associate III

CAN peripheral test in NUCLEO-L476RG MB1136 rev C (C-04) Board.

and work with ​STM32CubeIDE (1.3.1) + STM32Cube_FW_L4_V1.15.1.

​(1) The CAN1_RX(PB8) and CAN1_TX(PB9) pins of STM32L476RG do not drop the voltage to 0 Volt. Low voltage is 1 Volt.

Tested voltage level with the code below.

hal_gpio_togglepin(GPIOB, GPIO_PIN_8 | GPIO_PIN_9);

(2) Due to the above phenomenon, CAN1_RX(PB8) cannot be lowered to 0Volt to use the built-in CAN bootloader mode of STM32L476RG.

CAN Transceiver does not fall below 2.5 Volt of CAN1_RX(PB8) pin.

(3) When using CAN1_RX(PA11) and CAN1_TX(PA12), there is no problem from 3.3V to 0V.

However, the CAN Tx output level of the CAN1_TX(PA12) pin remains 3.3V unchanged even when sent from the CAN below function code made with CubeMX.

 if (HAL_CAN_AddTxMessage(&hcan1, &TxHeader, TxData, &TxMailbox) != HAL_OK)

(The oscilloscope measured the point where there is no change in the output pin.)

If the CAN baudrate is not correct, the signal should be output to the CAN1_TX(PA12) pin, but there is no level change. (test 125Kbps)

(4) In loopback mode, the TX data is entered as RX. (called HAL_CAN_RxFifo0MsgPendingCallback)

(but there is no level change of TX pin.)

<The test environment is as follows.>

Window ​PC <--usb--> usb to can <--can--> Nucleo-L476RG

There is someone who has done CAN Tx Rx on the Nucreo-L476RG board, and please give us some advice.

Thank you for reading through.

0693W000001qb48QAA.gif

An 8Mhz external crystal has been installed,

but it is irrelevant to the CAN problem, when internal clock occurs the same problem.

0693W000001qb4DQAQ.gif

0693W000001qb4mQAA.gif

0 REPLIES 0