cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769I - Possible CAN errata

holeman
Associate II
Posted on September 20, 2016 at 20:29

During evaluation of this chip, we found thatthe microcontroller apparently sets the ACK bittoo 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 */

void

MX_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

();

}

void

vCan1FilterInit

()

{

/* 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.

can-bxcan

5 REPLIES 5
Walid FTITI_O
Senior II
Posted on September 21, 2016 at 19:52

Hi holeman.brad,

Have you tested it for different baudrates and in other hardware. Try to check the transceiver and their supply accurency. I recommend that you replace your transceivers.

It will be better then to test with analyser.

(Ps: the figures does not appear, try to attach files)

-Hannibal-
holeman
Associate II
Posted on September 21, 2016 at 20:08

Thank you Hannibal for your response.  Unfortunately the only baud rate we will ever use is 250K.  That is the J1939 standard.  Even if it works at a different baud rate, it will be unusable for our purposes.  We are just looking for confirmation that the errata does exist for this baud rate so we can move on to a different microcontroller. 

How could a transceiver which only translates levels have an impact on only one particular bit in a 100+ bit stream, the same bit by the same amount each time?

One additional note: we are running this with the IAR debugger.  I don't think that should have any impact.

I submitted a request to ST support on Monday and they have yet to respond.

I will attempt to re-upload the files.

Walid FTITI_O
Senior II
Posted on September 21, 2016 at 20:27

Hi holeman.brad,

There is no such behaviour described in the

http://www.st.com/content/ccc/resource/technical/document/errata_sheet/group0/23/a6/11/0b/30/24/46/a5/DM00257543/files/DM00257543.pdf/jcr:content/translations/en.DM00257543.pdf

.

I think once they treat your request they will respond you.

-Hannibal-

holeman
Associate II
Posted on September 22, 2016 at 16:31

That is correct.  We believe this to be a new errata.

We were unable to find any register that would effect the timing of the ACK bit alone.  The register settings should affect all bits equally.  Do you agree?

I attempted to upload the scope traces multiple times and was unable to.  I have had one response from ST support.  They asked me to check the errata which I had of course already done.  Hopefully I get an answer today.

Out of curiosity, what baud rate do use for your CAN?

holeman
Associate II
Posted on September 26, 2016 at 17:50

Ok the problem is apparently resolved.  The project was set up to use the internal oscillator.  ST recommended using the external oscillator.  When this was done, the problem was resolved.