2017-02-19 12:38 PM
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
2017-02-19 03:04 PM
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=false2017-02-22 06:26 AM
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
2017-02-27 08:33 AM
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.
2017-03-13 06:33 AM
Hi
BEN_ROMDHANE.Mon
,thanks for your reply, but unfortunately this also answers not my question.
Best regards
Stefan
2017-03-13 06:35 AM
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 = 16tseg1 = 1tseg2 = 14SyncJump With = 181,5%Tq=500nsTime Quanta = 16tseg1 = 12tseg2 = 3SyncJump With = 1best regards
Stefan