cancel
Showing results for 
Search instead for 
Did you mean: 

TTCAN on STM32H743: Problem with setup of a BACKUP-TIME-Master

GK_CPfal2020
Associate II

Dear Madame or Sir.

We have a problem to setup a TTCAN BACKUP-TIME-Master in STM32H743 MCU. .

We have two NODES.

ONE should be work as CURRENT-TIME-Master and the other node, if MASTER fails, as BACKUP-TIME-Master.

But it seems to be (according to the TTOST register) that the node which is configured as BACKUP-TIME-Master will also be a CURRENT-TIME MASTER.

The node which is configured as CURRENT-TIME-MASTER (highest priority) receive reference messages from the other node, which is configured as BACKUP-TIME-Master (lowest priority) even the CURRENT-TIME-MASTER is valid.

The BACKUP-TIME-Master shouldn’t do this as long the CURRENT-TIME-Master do this. Right ?

The node which is configured as BACKUP-TIME-MASTER receives only ONE reference message from the CURRENT-TIME-MASTER node at the startup.

It seems to be, that NODE 1 (configured as CURRENT-TIME Master) is working as

BACKUP-TIME-MASTER and NODE 2 (configured as BACKUP-TIME Master)

is working as CURRENT-TIME Master.

Functionallity is vice versa as expected.

We are wondering, because according to the TTOST register both nodes are CURRENT-TIME-Masters at the same time. But this is impossible, isn’t it ?

In the TTOST the value TMP is always 0x07 (lowest priority) for both nodes.

Also the RTO value is 0x00 for both nodes, although the IRTO value in the TTOCF register of the BACKUP-TIME-Master is 0x7F (lowest priority).

Our Questions:

  1. Is our current configuration wrong ?
  2. What can we do to correct them ?
  3. Will TWO CURRENT-TIME-Master at the same time disturb the communication and the TTCAN timing ?
  4. Is it possible to release a code example of a valid TTCAN CURRENT- / BACKUP-TIME-Master and TIME-Slave configuration as code example or as special document ?

At the moment there is nothing available.

Only the description of the TTCAN functionallity of FDCAN1 module in the

reference manual is available. It was not easy for us to configure the TTCAN

functionallity.

Configuration

  • The FDCAN module is working at peripheral clock of 80 MHz.
  • We use CAN-FD functionality with BITRATE SWITCHING 1 MBIT / 2 MBIT.
  • The TUR-NUMERATOR and DENOMINATOR are set in a way, to reach the smallest timebase of ONE µs for the TIMEMARKs in der trigger list.
  • Every millisecond the reference message (TIMEMARK = 1000) will be sent.

  • NODE 1 (CURRENT-TIME-Master) will be configured with sTtCanKonfig.InitRefTrigOffset = 0;
  • NODE 2 (BACKUP-TIME-Master) will be configured with sTtCanKonfig.InitRefTrigOffset = 127;

  • For test purposes we set an acceptance filter to the reference message in NODE 1, to check if NODE 2 will never sent the reference message as long NODE 1 will working properly.
  • Also we set for test purposes an acceptance filter to the reference message in

NODE 2, to check if we always receive the reference message from NODE 1

as long NODE 1 will working properly.

  • Code lines and screenshots of the TTCAN registers which shows the current TTCAN configuration, can you find in the attachement PDF file, because this post is too long.

Best regards

Christian

0 REPLIES 0