How to change fw_version of device_info_t in FXLC95000?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to change fw_version of device_info_t in FXLC95000?

ソリューションへジャンプ
1,697件の閲覧回数
vitaliysiplichu
Contributor III

Hello!

I use Code warrior IDE with ISF1. I have example project "eCompass_Project". I want to edit some code of this project and I think that I will have some cnanges in the future. And I want to have possibility to check version of FXLC95000 firmware in my host application to know when I need to update it. I know that I can read Dev info using command 0x00 0x00.

In the file isf.h I see next code:

 

typedef struct {

    uint_32              device_id;   /**< ROM: Pseudo random part identification value           */

    uint_16              rom_version; /**< ROM: ROM version code: major.minor                     */

    uint_16              fw_version;  /**< FW:  Firmware version code: major.minor                */

    uint_16              hw_version;  /**< ROM: Hardware version code: major.minor                */

    uint_16              build_code;  /**< FW:  Firmware build number and date code. The value is

                                      *        encoded in the following bit fields:

                                      *        - [15:12] daily build number, 0 to 15

                                      *        - [11: 8] build month, 1 to 12

                                      *        - [ 7: 3] build day, 1 to 31

                                      *        - [ 2: 0] build year, 2010 to 2017                 */

    uint_16              part_number; /**< FW:  BCD encoded part number, e.g. 0x500x              */

    uint_8               reset_cause; /**< FW:  Lower 5 bits from the RCSR reports reset source   */

    uint_8               secure_mode; /**< FW:  Lower 2 bits of FOPT report the security mode of

                                      *         the device: 2 = secure, otherwise not secure      */

} device_info_t;

 

 

So, my question is how can I change firmware information and what information can I change? Will be enaugh to change

uint_16              fw_version;

uint_16              build_code;

???

If yes, how can I do that?

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,163件の閲覧回数
jimmcglasson
Contributor III

Hello, Vitaliy,

The fw information is designed to report information about the version of ISF that is being used and that information is compiled into the ISF library.

So this information cannot be changed.

I suggest that you create your own command by adding your own code to the switch statement in your CI APP callback function.

Add a

case CI_CMD_READ_VERSION: /* defined as 0 in isf_ci.h */

in that case you can your own specific version information:

something like:

pAppPacket->bytes_xfer = (uint8)isf_ci_app_write(pHostPacket->appId, sizeof(gMyAppVersionData), (uint8*)gMyAppVersionData);

Then declare your version info data structure with whatever you like in it.

typedef struct {

uint8 fw_version_major;

uint8 fw_version_minor;

uint8 fw_build_number;

} myAppVersionInfo_t;

static const myAppVersionInfo_t gMyAppVersionData = { .fw_version_major=1, .fw_version_minor=2, .build_number=6 };

-Jim McGlasson

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,164件の閲覧回数
jimmcglasson
Contributor III

Hello, Vitaliy,

The fw information is designed to report information about the version of ISF that is being used and that information is compiled into the ISF library.

So this information cannot be changed.

I suggest that you create your own command by adding your own code to the switch statement in your CI APP callback function.

Add a

case CI_CMD_READ_VERSION: /* defined as 0 in isf_ci.h */

in that case you can your own specific version information:

something like:

pAppPacket->bytes_xfer = (uint8)isf_ci_app_write(pHostPacket->appId, sizeof(gMyAppVersionData), (uint8*)gMyAppVersionData);

Then declare your version info data structure with whatever you like in it.

typedef struct {

uint8 fw_version_major;

uint8 fw_version_minor;

uint8 fw_build_number;

} myAppVersionInfo_t;

static const myAppVersionInfo_t gMyAppVersionData = { .fw_version_major=1, .fw_version_minor=2, .build_number=6 };

-Jim McGlasson

0 件の賞賛
返信