Other Parts Discussed in Thread: UNIFLASH,
In hw_fcfg.h, the deviceInfo struct as this:
I have two questions:
1. As comments the majorRev default value should be 1, but I read out 0.
2. These elements are readonly, How can I change the value.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi David,
I read it like this
sprintf(firmwareRev, "%02d.%02d.%02d", fcfg->deviceInfo.partId.majorRev, fcfg->deviceInfo.partId.minorRev, FIRMWARE_PATCH_NUM);
Hello Xuefeng,
Are you able to read the other values correctly or are they zero as well?
Where in the code are you running the previous printing command?
BR,
David.
Another element partIdValid in same struct value is 1.
I run the code in app_dev_info.c->DevInfo_start.
Hello Xuefeng,
Have you tried this using another board and do you get the same result?
BR,
David.
Hi David,
I used two boards to check this, they have the same result.
sprintf(firmwareRev, "partIdValid:%d,majorRev:%02d,minorRev:%02d", fcfg->deviceInfo.partId.partIdValid, fcfg->deviceInfo.partId.majorRev, fcfg->deviceInfo.partId.minorRev); MenuModule_printf(APP_MENU_PROFILE_STATUS_LINE1, 0, "firmwareRev:%s", firmwareRev);
Hello Xuefeng,
Understood. I am double checking on my side as well and I will report this. Thank you.
Could you please confirm what SDK version are you using?
In the meantime, could you please confirm you are able to get this information from UNIFLASH? Connect device to uniflash, go to Settings & Utilities, scroll down and clikc on Read Device Info. The revision information should be B (2.0).
BR,
David.
Hello Xuefeng,
Thanks. I have reported this issue. I will be back to you as soon as I get an answer from the team.
Could you please confirm what SDK version you are using?
May I ask if this is blocking the development efforts at the moment and what is the use case?
BR,
David
Could you please confirm what SDK version you are using?
My SDK version is simplelink_lowpower_f3_sdk_7_20_00_29
May I ask if this is blocking the development efforts at the moment and what is the use case?
We want to use this as our firmware version header. We can wait for few days, but hope this fix as soon as possible.
Hello Xuefeng,
Understood. Thanks.
I will update you as soon as possible.
Just to clarify, do you want to send this information through Bluetooth LE? See basic_ble example (<SDK>\examples\rtos\LP_EM_CC2340R5\ble5stack) inside Services -> dev_info_service.c (HARDWARE_REV_UUID). But first we need to get the information correctly.
BR,
David.
do you want to send this information through Bluetooth LE?
Yes, this information need share with other device.
I use a const value temporary, wait for get correct information.
Best Regards.
Hello Xuefeng,
Understood. I just wanted to confirm you were using DevInfo_setParameter() with DEVINFO_HARDWARE_REV param inside the DevInfo_start() function. I will keep you updated on this. Appreciate the patience.
BR,
David.
Hello Xuefeng,
Thanks for the patience.
The majorRev and minorRev are not use for identifying the device revision/PG. I still need to discuss further with the team about if this fields need to be modified inside the struct to avoid confusion.
However, in order to read the revision version I would ask you to do it the same way UNIFLASH does it, by reading the following register: SYS0:DEVICEID. with memory address: 0x400043F8. You should potentially read back 0x1BB8402F0 (depending on the exact device) from which the version number is defined in bits [31:28]. PG 2.0 represented by 0b0001 and PG 1.0 by 0b0000.
Hope this helps.
BR,
David.
Hello Xuefeng,
I would suggest to first check this register while in debug mode (see register window and search for SYS0:DEVICEID).
If you want to read the address you could do memcpy() using the source pointer with address: 0x400043F8.
Let me know how it goes.
David,
Hello Xuefeng,
The version number is defined in bits [31:28]. PG 2.0 represented by 0b0001 and PG 1.0 by 0b0000.
BR,
David.
Hello Xuegeng,
The value from address 0x400043F8 is 0x1BB8402F (00011011101110000100000000101111), where the [31:28] represent the version. PG 2.0 represented by 0b0001 and PG 1.0 by 0b0000.
BR,
David.
Hi David,
Thanks very much.
And I want to know, is SYS0_DEVICEID always in address 0x400043F8 ?
Is there a way to use a variable can be use in program instead write address straightly?
Hi,
Due to holidays, there may be unexpected delays in this thread. I apologize for any inconvenience this may cause. For register addresses, instead of using raw addresses, I would recommend using the base address defines. For SYS0, this is SYS0_BASE and this may be found in the hw_memmap.h file. For the deviceID section, you should use SYS0_O_DEVICEID (this define is found in hw_sys0.h). To write/read registers, please use HWREG instead of directly manipulating the address during. This function is defined in hw_types.h. You should do something like:
HWREG(SYS0_BASE + SYS0_O_DEVICEID)
Best Regards,
Jan
HWREG(SYS0_BASE + SYS0_O_DEVICEID)
Hi Jan,
Through this, I found ChipInfoGetVersion in chipinfo.h, and this return 1. But I read version is 2.0 with Uniflash.
Hi,
Can you share where you are reading the register? Is this during normal application code or during boot up?
Best regards,
Jan
Hello Xuefeng,
I think this is due to the fact that PG 2.0 is represented by 0b0001 and PG 1.0 by 0b0000 as mentioned before.
BR,
David.