AnsweredAssumed Answered

STM32F769I - Possible CAN errata

Question asked by holeman.brad on Sep 20, 2016
Latest reply on Sep 26, 2016 by holeman.brad

During evaluation of this chip, we found that the microcontroller apparently sets the ACK bit too early when receiving messages from other devices.

Bus was 250 KBaud with a sample point of 80% (also tried 75% and 85%).  This device used a 3.3V transceiver and connected to devices that had 5.0V transceivers. 

While the HAL drivers correctly were able to send and receive messages.  The microcontroller would start the ACK bit 2-3 uS early (during the CRC delimiter bit).

I found no errata associated with the behavior and am not aware of any register setting that can be modified to change when the CAN hardware sends the ACK bit.

Could this be an issue with 3.3V and 5 V signals on the same bus?  Was 250 KBaud not tested?

/* CAN1 init function */
voidMX_CAN1_Init(void)
{

hcan1.Instance = CAN1;

/* Prescaler = (Baud Rate Prescaler BRP[9:0] + 1) */
hcan1.Init.Prescaler =10;
hcan1.Init.Mode = CAN_MODE_NORMAL;
hcan1.Init.SJW = CAN_SJW_1TQ;
/* BS1 = TS1[3:0] + 1 */
hcan1.Init.BS1 = CAN_BS1_14TQ;
/* BS2 = TS2[2:0] + 1 */
hcan1.Init.BS2 = CAN_BS2_5TQ;
hcan1.Init.TTCM = DISABLE;
hcan1.Init.ABOM = DISABLE;
hcan1.Init.AWUM = DISABLE;
/* Only attempt one transmission, no retries. */
hcan1.Init.NART = ENABLE; // BSH Disable this before release!!!
   hcan1.Init.RFLM = DISABLE;
hcan1.Init.TXFP = DISABLE;
if (HAL_CAN_Init(&hcan1) != HAL_OK)
{
//Error_Handler();
printf("Initialization failure \n" );
}
/* CAN Filter initialization must come AFTER CAN initialization. */
vCan1FilterInit();
}

voidvCan1FilterInit()
{
/* Initialize the filter (x = filter bank number). */
sCanRxFilterConfig.BankNumber =0/* x */
sCanRxFilterConfig.FilterIdHigh =0xFFFF;
sCanRxFilterConfig.FilterIdLow =0xFFFF;
sCanRxFilterConfig.FilterMaskIdHigh =0x0000;
sCanRxFilterConfig.FilterMaskIdLow =0x0000;
sCanRxFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK; /* (FBMx=0) */
sCanRxFilterConfig.FilterNumber =0;
sCanRxFilterConfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;
sCanRxFilterConfig.FilterActivation = ENABLE;
sCanRxFilterConfig.FilterScale = CAN_FILTERSCALE_32BIT;/* (FSCx=1) */
HAL_CAN_ConfigFilter(&hcan1, &sCanRxFilterConfig);
}/* vCan1FilterInit() */

 

 

For this capture, the STM sends the ACK 2 uS early.  The portion highlighted in white should encompass 3 bit fields (of 4 uS) with the last field being the CRC delimiter.  Notice the voltage drop associated with the 3.3 V transceiver

 

 

Without the STM on the bus, the message is acked by the other receiving device at the correct point.

 


Outcomes