cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Point CAN Bootloader?

Knut Knusper
Associate II
Posted on February 19, 2017 at 21:38

I am currently reading the AppNote AN2606 and AN3154 to use the CAN Bootloader.

But in the AppNotes I found no information to the CAN timings.

Can someone tell me how the sample point must be adjusted to communicate with the STM32?

best regards

Stefan

5 REPLIES 5
T J
Lead
Posted on February 20, 2017 at 00:04

HI, I purchased a CanDo unit from the UK.

It is a very quick and easy way to get your code running.

here is the screen shot and my Cube MX init

/* CAN init function */

void MX_CAN_Init(void)

{

hcan.Instance = CAN;

hcan.Init.Prescaler = 12;

hcan.Init.Mode = CAN_MODE_NORMAL;

hcan.Init.SJW = CAN_SJW_1TQ;

hcan.Init.BS1 = CAN_BS1_13TQ;

hcan.Init.BS2 = CAN_BS2_2TQ;

hcan.Init.TTCM = DISABLE;

hcan.Init.ABOM = ENABLE;

hcan.Init.AWUM = DISABLE;

hcan.Init.NART = DISABLE;

hcan.Init.RFLM = DISABLE;

hcan.Init.TXFP = DISABLE;

if (HAL_CAN_Init(&hcan) != HAL_OK)

{

Error_Handler();

}

________________

Attachments :

CanDo SamplePoint.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyX2&d=%2Fa%2F0X0000000bDq%2F0ygXjRrKYFAoUiVAFo6T_jKMblccX_vCWBdB5SpjOAs&asPdf=false
Posted on February 22, 2017 at 14:26

Hi,

thanks for your reply but unfortunately it does not answer my question.

I mean the sample point of the embedded CAN bootloader from ST.

Best regards

Stefan

Posted on February 27, 2017 at 17:33

Hi

Stefan (

Stockert.Stefan

‌)

All bootloader timings are available within the AN2606 Application Note, you can just refer to the

'Bootloader timing' section. For CAN connection timing, you can refer to the USART values to know how long time it takes to check/connect to the interface (values are the same).

Regards,

Montassar.

Posted on March 13, 2017 at 13:33

Hi

BEN_ROMDHANE.Mon

‌,

thanks for your reply, but unfortunately this also answers not my question.

Best regards

Stefan

Knut Knusper
Associate II
Posted on March 13, 2017 at 14:35

Hi,

in the last days I had some time to try it out and now I want to share my experience here.

Here my test setup:

cable length <1m on the bench top

baudrate of 125kBit / s

USB to CAN Adapter --> PCAN-USB FD from Peak System

The CAN Bootloader implemented by STM was accessible with the PCAN-USB and a sample point configuration of 12,5% - 81,5%.

12,5%

Tq = 500ns

Time Quanta = 16

tseg1 = 1

tseg2 = 14

SyncJump With = 1

81,5%

Tq=500ns

Time Quanta = 16

tseg1 = 12

tseg2 = 3

SyncJump With = 1

best regards

Stefan