Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The CAN bit rate is coded by the index of the CAN bit timing table according to /CiA-305/. The index of the default CAN bit rate is specified about the compiler-define BITRATE_INDEX_<bit_rate> in /atsam4e/bl_config.h:

#define BL_USED_BITRATE_INDEX   BITRATE_INDEX_125K

The default CAN bit rate is 125 kbit/s and can be changed by LSS services. The LSS services are described in /Paulus_man/ and base on /CiA-305/. The supported CAN bit rates are depending on the clock of the CAN controller and are listed in /atsam4e/atsam4e_can.c. The value FFh for segment2 marks unsupported CAN bit rates. The clock for the activation of the CAN bit rate is generated by timer TC0 with a period of 1 ms.

...

By the compiler-define DEBUG a debug output can be activated about the serial interface usart1. The compiler-define is set in file /atsam4e/bl_config.h:

#define DEBUG 1

In general the initialization function will initialize only the absolutely necessary peripherals like clock system, CAN controller, memory management as needed by Paulus. Nevertheless, there might be situations where it makes sense that Paulus initializes other functionalities which are later used by the application as well. As an example consider the serial interface for debug messages.

...

The application program has to be prepared for download by the following steps:·        

  •     build the application program in binary format

...

  •     calculate the CRC of the application program, build the application header and generate the

...

  • application software to download

...

  •     configure the start address of the application software in Paulus

...

Paulus checksum

The program paulus_cksum calculates the CRC checksum of the binary application program, generates the application header and stores the application header and the application program in a new file. This file can be loaded in the device by Paulus.

...

It is important that the start address of the application software in the flash memory and the information in the Paulus configuration in atsam4e/atsam4e_flash.h are identical. The application software is stored as a separate program in the flash memory additionally to the bootloader program. Therefore the application software is flashed to: 

#define FLASH_PROGRAM_START_ADR   0x00410000 

The length of the application header is 256 byte. The program start of the application is at address (FLASH_PROGRAM_START_ADR + 256 bytes).

...