CANape XCP Measurement, Calibration, bootloader

CANape 应用笔记,测量标定以及标定数据存储,及基于XCP bootloader 实现


For measure signal configuration in CANape.

1. Event List
a) Select “on” option of SUPPRESS_EVENT_DETECTION in Expert setting.
b) Modify Event time to 10ms for Rate in General tab.
c) and keep the default value for other options.
2. Time stamp
a) Use “on request” selected in Slave provides time stamp.
b) Use “from the PC” selected in Master uses time stamp.
c) and keep the default value for other options.
3. Measurement mode and Rate setting
a) There are three options are available for measurement mode, Event, Cyclic and Polling, using Cyclic as your selection are recommended, you can set varied rate in Cyclic mode, but set value less than the sample rate 10ms is not available; and an Event in event list is accessible, but only one Event channel is available at present; the last option “polling” depends on Master send rate” SET_MTA” and “Upload”.

For calibration parameter configuration in CANape.
1. Make sure all parameters are defined in Calibration_Param.c, because this file have been allocated at a fixed address in linker file.
2. All required calibration parameters are saved into a hex file(the NVRAM & DataNVM specific addresses are detailed below), which is also recommended. then use Program download operation.

For calibration parameter(RAM data) stored into Non-Volatile Flash(pFlash).
The setting is similar with xcp bootloader, but different(characters in red).
1. In Memory Flash of Device Configuration(Mandatory)
a) Start Address: 0x15E000
b) Size: 0X10100(hint: actual utilization size is recommended within 0xf000 size in your calibration hex image file)
c) xcp -> flash options -> flash strategy: Present data, the hex file for calibration parameter will be generated in a block record, and also this is consistent with creating checksum for verification.
d) Expert settings -> FLASH_PROGRAM_VERIFY: PROGRAM_VERIFY
e) Expert settings -> FLASH_VERIFY_VALUE: checksum decimal value(use Hexview or equivalent tool to create checksum value with project’s cali hex file, if checksum value is hexadecimal, please convert it into decimal value, then put converted decimal value here for xcp flash bootloader program verification sequence).
2. Start programming
a) Tools -> Program -> Download ->Add or replace your cali hex file
b) Start
c) It will indicate download successfully or failed after program sequences ends.
3. After programming
a) If download successfully, software reset action will be proceed
b) New Calibration parameters will be active instead of old values or default/initialized values.

For xcp bootloader.
1. Use the revised version bootloader which extended with xcp bootloader(use flash tool, like Multilink to flash the latest bootloader hex file).
2. In Memory Flash of Device Configuration(Mandatory)
a) Start Address: 0x10000
b) Size: 0x170000(hint: the address contains calibration rom-data address range)
c) xcp -> flash options -> flash strategy: Present data, due to the hex file will be generated in two blocks, and also this is consistent with creating checksum for verification.
d) Expert settings -> FLASH_PROGRAM_VERIFY: PROGRAM_VERIFY
e) Expert settings -> FLASH_VERIFY_VALUE: checksum decimal value(use Hexview or equivalent tool to create checksum value with project’s app hex file, if checksum value is hexadecimal, please convert it into decimal value, then put converted decimal value here for xcp flash bootloader program verification sequence).
3. Start programming
a) Tools -> Program -> Download ->Add or replace your app hex file
b) Start
c) It will indicate download successfully or failed after program sequences ends.
4. After programming
a) If download successfully, software reset action will be proceed
b) System/Application will be running
5. Additional information
a) in XCP bootloader, CAN channel 1 baud rate is 500k bps in default, so it’s better that the baud rate is also set 500k bps in application runtime before jumping to bootloader, or unrecognizable error will occur.
b) CANape baud rate requires the same set value.

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值