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.
Cheetah,
Let me loop in someone from MW to answer this directly.
Best,
Matthew
Cheetah,
Just had a quick email with Elprotronic, they mentioned this is supported in the DLL that installs with the support FW.
The example code is here C:\Program Files (x86)\Texas Instruments\C2000-GANG\Examples\ along with the documentation in the User's Guide should get you started.
Best,
matthew
Hi Matthew,
I tried the example code but actually I am not so familiar with the software, it is a bit difficult to understand these examples even if I review the Chapter 4 in the user's guide.
Do we have a console or some exe file so that I can try the commands, since I still cannot connect to our C2000-GANG? I mean except for the GUI, I need a place to input any commands to communicate with the C2000-GANG.
Best Regards,
Cheetah
hi Matthew,
I fixed the COMM4 ERROR and we moved to the next step.
There is another error says:
Load DLL C2000-Gang.dll Operation successful.
C2000GANGInitCom COM4 Operation successful.
C2000GANGDefaultConfig Operation successful.
C2000GANGSetMCUName TMS320F2808 Operation successful.
C2000GANGSetConfig(SetT) 200ms Operation successful.
C2000GANGSetConfig(TarEn) 1 Operation successful.
C2000GANGSetConfig(OSC) 20.000 MHz Operation successful.
C2000GANGReadCodeFile ..\Lib\Demo-F2808.txt ERROR 355: Open File error
Detach DLL Operation successful.
Hi MattewPate,
These are the logs we copied when we use a terminal to run the two test example:
1) C:\>"C:\Program Files (x86)\Texas Instruments\C2000-GANG\Examples\Output\C-DLLtest.exe"
C2000GANG DLL: Application example in C language
Load DLL C2000-Gang.dll Operation successful.
C2000GANGInitCom COM4 Operation successful.
C2000GANGDefaultConfig Operation successful.
C2000GANGSetMCUName TMS320F2808 Operation successful.
C2000GANGSetConfig(SetT) 200ms Operation successful.
C2000GANGSetConfig(TarEn) 1 Operation successful.
C2000GANGSetConfig(OSC) 20.000 MHz Operation successful.
C2000GANGReadCodeFile ..\Lib\Demo-F2808.txt ERROR 355: Open File error
Detach DLL Operation successful.
2) When we click the Cpptest.exe, C:\Program Files (x86)\Texas Instruments\C2000-GANG\Examples\Output\Cpp-DLLtest.exe" , it says:
C2000-GANG Gang Programmer connected.
C2000GANG_InitCom Operation successful.
C2000GANG_Default_Config Operation successful.
C2000GANG_Set_MCU_Name ERROR 344: Wrong target device connected !
C2000GANG_SelectImage Operation successful.
C2000GANG_EraseImage Operation successful.
C2000GANG_Load_Image_File ERROR 355: Open File error
3) At the same time, the C2000-GANG programmer says:
Image no.11
Done...
Hui,
Were you able open the DLLTest.c file to see if the settings match your config? This is what will set the device type(although it looks like F2808 is the default in that file for me). It seems like the error is just related to the local .txt file that is part of the example though.
I have notified Elpro of this thread, they were offsite at conference this week, but they may be back next week and can give more direction.
Best,
Matthew
hi MatthewPate,
We tried and now seems every step shows Successful.
1) Then how can we use this example.exe to flash our image?
2) Which NO. should we put our image file. Now I put our image file to NO.1 and NO.10
3) Since our Product IC named as "F28069" but not "F2808". Do we need to change the source code for replacing all F2808 to F28069?
Thank you and waiting for your soon reply.
Best Regards,
Cheetah
hi MatthewPate,
We met a new problem:
it says "8 Get PIL Status: PIL freq err Failed! Err70." when I flash my own FW, after we tried the simpleC2000Gang.exe
Do you know how to fix it?
Best Regards,
Cheetah
Hi MathewPate,
The C2000-GANG always says "PLL freq Error 70" when I use it to flash my FW, do you know how I can fix it?
Best Regards,
Cheetah
Cheetah,
What is the frequency specification of the external crystal/oscillator you have on your PCB that goes to the F2808 MCU? It looks like the default in the example file is 20MHz.
Best,
Matthew
hi MatthewPate,
What is the frequency specification of the external crystal/oscillator you have on your PCB that goes to the F2808 MCU? ===>Do you know how to check it?
Actually it says "8 Get PIL Status: PIL freq err Failed! Err70." when I flash my own FW, after we tried the simpleC2000Gang.exe
Would that because my PCB is F28069MCU while the example.exe is set to F2808MCU?
Best Regards,
Cheetah
Yes, I believe so. You should just have to change the target device to F28069 in the DLLTest.c file. That device uses an internal 10MHz clock source that is constant.
Best,
matthew
Hi MatthewPate,
Thank you for informing me that important information and I am so glad that it is possible to fix my PLL error issue due to your guidance.
As I noticed the crystal/oscillator showing in the GUI does be 10MHZ for my F28069 MCU that is marked GREY (I cannot change it)
And could you be helpful to share any screenshot on how I can "change the target device to F28069 in the DLLTest.c file" ?
Best Regard,
Cheetah
Cheetah,
For devices with an internal 0-pin oscillator the GANG will always use that to program the flash since it is known frequency and doesn't rely on external X-tal value to be entered correctly. Pretty much any device after F2802x(including the F2806x you have) has this feature. So GANG will grey this out since there is no reason to use other clock, even if it exists on your PCB(this is just for flash programming).
/--- globals -------------------------------------------------------------- // #define ComPort "COM4" #define DLL_C2000 "C2000-Gang.dll" #define Baudrate 115200 #define FileName "..\\Lib\\Demo-F2808.txt" #define DeviceType "TMS320F2808" #define TargetOSCkHz 20000 //value in kHz. Must be present for DSP without internal generator #define SettleTime 10 //Settle Time in multiples of 20ms //#define TargetEn 0xFF //enable all 8 targets #define TargetEn 0x01 //enable only first target #define ERR_NO_DLL 100 #define ImageName "DLLtestC" //Name to be shown on Programmer #define ImageIndex 10 //Index to be used for image on Programmer - 0..15 #define StartSerNum 0x12345678 #define SerNumAddress 0x3E8000
You should see the above code near the beginning of DLLTest.c, you should modify ComPort to match the comport shown on the C2000-GANG GUI, the Device Type will change from "TMS320F2808" to "TMS320F28069" a and the file/image you want loaded will replace the "..\\Lib\\Demo-F2808.txt" file
Best,
Matthew
Hi MathewPate,
Thank you for your reply but I just saw it. I will try one more time and let you know the result. But yesterday, I tried to changed the 20MHz to 10MHz and this is the log but the PLL Error still exists.
Let me show you my log.txt
C:\C2000-GANG\Examples\Output>C-DLLtest.exe
C2000GANG DLL: Application example in C language
Load DLL C2000-Gang.dll Operation successful.
C2000GANGInitCom COM4 Operation successful.
C2000GANGDefaultConfig Operation successful.
C2000GANGSetMCUName TMS320F2808 Operation successful.
C2000GANGSetConfig(SetT) 200ms Operation successful.
C2000GANGSetConfig(TarEn) 1 Operation successful.
C2000GANGSetConfig(OSC) 10.000 MHz Operation successful.
C2000GANGReadCodeFile ..\Lib\Demo-F2808.txt Operation successful.
C2000GANGCreateGangImage DLLtestC Operation successful.
C2000GANGSelectImage 10 Operation successful.
C2000GANGEraseImage Operation successful.
C2000GANGLoadImage Operation successful.
C2000GANGVerifyImage Operation successful.
C2000GANGMainProcess Analysis Below:
Target 1-2-3-4-5-6-7-8
Success 0 0 0 0 0 0 0 0
================================
Enabled 1 0 0 0 0 0 0 0
Connected 1 0 0 0 0 0 0 0
Erase 0 0 0 0 0 0 0 0
Blank Check 0 0 0 0 0 0 0 0
Programmed 0 0 0 0 0 0 0 0
Verify 0 0 0 0 0 0 0 0
Secured 0 0 0 0 0 0 0 0
Vcc err 0 0 0 0 0 0 0 0
JTAG init err 0 0 0 0 0 0 0 0
fuse prev.blown 0 0 0 0 0 0 0 0
MCU type err 0 0 0 0 0 0 0 0
Done
C2000GANGReleaseCom Operation successful.
Detach DLL Operation successful.
Program successfully finished -
Hi Matthew,
I tried as you told me but there is Open File Error when I run it.
C:\C2000-GANG\Examples\Output>C:\C2000-GANG\Examples\Output\C-DLLtest.exe
C2000GANG DLL: Application example in C language
Load DLL C2000-Gang.dll Operation successful.
C2000GANGInitCom COM4 Operation successful.
C2000GANGDefaultConfig Operation successful.
C2000GANGSetMCUName TMS320F28069 Operation successful.
C2000GANGSetConfig(SetT) 200ms Operation successful.
C2000GANGSetConfig(TarEn) 1 Operation successful.
C2000GANGSetConfig(OSC) 10.000 MHz Operation successful.
C2000GANGReadCodeFile ..\Lib\Demo-F28069.txt ERROR 355: Open File error
Detach DLL Operation successful.
Program aborted -
C:\C2000-GANG\Examples\Output
Also there is a sign saying
Could you help give any further instructions?
Best Regards,
Cheetah
Hi Matthew,
Thank you for your time and patience together with marvelous guidance!
Cheetah,
You will need to build your CCS project with the hex utility enabled. I've taken a screen shot of where to enable this if you right click on the project and select properties.
You will need to set the romwidth to 16 and the output format to intel_hex(both shown below)
Best,
matthew
Hi MatthewPate,
Thank you for your time and guidance. We thought very hard on your proposal and we have two questions about that:
1) For #You will need to build your CCS project with the hex utility enabled. I've taken a screen shot of where to enable this if you right click on the project and select properties.# ======> Do you mean that we use the hex file generated from the CCS to replace the "Demo-F28069.txt" in our C-DLLtest.exe? Am I right?
2) For #You will need to set the romwidth to 16 and the output format to intel_hex(both shown below)# =====>Does this help fix the PLL Error?
Extend my sincerest gratitude to you and your invaluable time.
Best Regards,
Cheetah
1) For #You will need to build your CCS project with the hex utility enabled. I've taken a screen shot of where to enable this if you right click on the project and select properties.# ======> Do you mean that we use the hex file generated from the CCS to replace the "Demo-F28069.txt" in our C-DLLtest.exe? Am I right?
Yes
2) For #You will need to set the romwidth to 16 and the output format to intel_hex(both shown below)# =====>Does this help fix the PLL Error?
No, this is just the correct settings to get the hex file in the right format.
Let me look back at the DLL settings one more time to see if I can reproduce this issue locally.
Best,
Matthew
Hi Matthew,
Thank you for your confirmation and for the hex file.
We will now try it and let you know once we have any update.
For #Let me look back at the DLL settings one more time to see if I can reproduce this issue locally.#
====>Thank you for your great help and what can i provide to help duplicate this phenomenon such as any source code?
Best Regards,
Cheetah
Hi Matthew,
we tried that HEX file and we changed the form from hex to text and replace our previous Demo-F28069.txt, finally got the below response:
Error354: Code in the file contains invalid data.
If you don't mind my asking what the possible solution to this 354 Error would probably be.
Best Regards,
Cheetah
Hi Matthew,
Omggg so happy!
We did it after my client provided the original HEX file and now it can be flashed into client's FW via DLLtestC.
But the program will say "Error41"when finishing FW flash although the Terminal log says " Program successfully finished".
Anyway, it can help ATE at least. Thank you for all you did for our team and my case. Thank you Matthew.
Best Regards,
cheetah
Cheetah,
I'm glad you got the DLL working, seems the correct hex file format was the missing piece.
I'm going to ask Elpro to comment on Err41, according to the documentation I don't think this is a valid error message according to the documentation.
Best,
Matthew
Hi Matthew,
Thank you for your kindness and professionness. Except for the Err41, i found a more important risk.
i found the new image that was gengerted by our ATE SW has a different checksum and storage with the original FW image.
As the image storage changed from the initial 268.5KB to 265.5 KB. And I use this smaller image to flash FW by hand, there will not be PLL Error.
so maybe something in the image changed after i use the ATE SW.
Do you know why the checksun and storage canged and how could we set it back? Thank you
Best regards,
Cheetah
Hi Cheetah, Matthew is out of office for the rest of the year. I have reached out to Elprotronic to see if they can assist and if so, I'll be sure to reply with their feedback.
Hi dear Joe and Matthew,
Do we have any update on our Checksum differences?
Waiting for your reply, best regards,
Cheetah
Cheetah,
If the hex file was the same, it should be the same image getting programmed. I've only seen file size/checksum differences when the source project is compiled with a different version of Code Generation Tools(CGT). This typically happens if a newer version of CCS is used to build the project vs when it was originally created. You can manually change the CGT version in use by CCS to get things to be the same, but we would need to know which was the original CCS version.
However, you mentioned all that is provided to your team is the hex file(not the source code), is this correct? If the hex file is the same, the size and checksum should not be changing.
I'm not clear on what you mean by PLL not working/working when flashed by hand. Do you mean with non-automated C2000-GANG or with CCS and JTAG?
Best,
Matthew
Hi Matthew,
Thank you so so much for what you helped us sincerely.
For different Checksum issue:
1) If the hex file was the same, it should be the same image getting programmed. ===>Actually what we first got from my client is a gangbin file and a gangimage file, so I cannot compare the final Working HEX is the same with the initial gangbin file and a gangimage file or not bacause they are in different file form.
2) I've only seen file size/checksum differences when the source project is compiled with a different version of Code Generation Tools(CGT).===>My client said: We can confirm you the HEX code is generated from the same source.
3) You can manually change the CGT version in use by CCS to get things to be the same, but we would need to know which was the original CCS version.===> can I copy this part to ask my client to try it for us?
4)However, you mentioned all that is provided to your team is the hex file(not the source code), is this correct? If the hex file is the same, the size and checksum should not be changing.===> Yes, my client seems not okay to provide the source code for privacy.
===>>>I listed the information comparing the two FW images as below:
Name of FW (shown on C2000-GANG Programmer) |
XX_XX_PCON_1234(19D2) |
XX_XX_PCON_1234(F81B) |
Generated Method |
via loading gangbin image in into Programmer |
via reading HEX code file and create Gang Image |
Source |
Provided by my client |
C-DLLtest.exe |
Original File |
XX_XX_PCON_1234_combined.c2000gangbin/ XX_XX_PCON_1234_combined.c2000gangimage (Created at September 11, 2023 at 17:00) |
XX_XX_PCON_1234_combined_ti_hex (Created at September 11, 2023 at 16:38) |
Method to Flash DUT |
Only Manual Flash |
ATE SW Flash + Manual Flash |
Manual Flash Supportive |
N (C2000-GangProgrammer says PLL Error) |
Y |
Form |
gangbin |
? |
Checksum (shown on C2000-GANG Programmer) |
19D2 |
F81B |
Storage (shown on C2000-GANG GUI) |
268.5KB |
265.5KB |
SW Version (read by GUI) |
1,2,3,45 |
1,2,3,45 |
For C2000GangProgrammer says PLL error:
5)I'm not clear on what you mean by PLL not working/working when flashed by hand. Do you mean with non-automated C2000-GANG or with CCS and JTAG?===>Sorry for that, I mean there will be an Error warning on C2000-Gang programmer (herinafter as C2000GangProgrammer old) when I choose the FW image XX_XX_PCON_1234(19D2) provided from my client and cannot flash successfully.
Also I buy a totally new C2000GangProgrammer (herinafter as C2000GangProgrammer new) and I put the image XX_XX_PCON_1234(19D2) provided from my client into it and flash, there will still be the PLL Error warning and fail to flash. Maybe it is because the MCU ever occurs such problem and I will try to apply a new MCU chip and do further validation with the two C2000GangProgrammers, the old one and the new one.
Best Regards,
Cheetah
Cheetah,
I'll reply to the last question in another reply, but first I want to explain about the code gen tools, etc.
You can ask your customer to look in the directory where the CCS project is kept(the original one) for a CCSPROJECT file. They can open this with a text editor, and it will give the project info that looks like below. What they need to look for is the "codegenToolVersionvalue", for the original build. Once they have this I can find this build and post the CGT back to here and then give instructions on how to tell CCS where to find it etc.
If we compile with the same version of the CGT as was used, then the output hex/binary will match, no matter the version of CCS used.
<?xml version="1.0" encoding="UTF-8" ?>
<?ccsproject version="1.0"?>
<projectOptions>
<ccsVersion value="12.2.0"/>
<deviceVariant value="TMS320C28XX.TMS320F280039C"/>
<deviceFamily value="C2000"/>
<deviceEndianness value="little"/>
<codegenToolVersion value="22.6.0.LTS"/>
<isElfFormat value="true"/>
<rts value="libc.a"/>
<createSlaveProjects value=""/>
<templateProperties value="id=dac_ex1_enable.projectspec.dac_ex1_enable"/>
<origin value="C:\ti\c2000\C2000Ware_4_03_00_00\device_support\f28003x\examples\dac\CCS\dac_ex1_enable.projectspec"/>
<filesToOpen value=""/>
</projectOptions>
Best,
Matthew
Cheetah,
For the PLL issue, I think it would be best to get on a call with Elprotronic so we can see the issue together live. I will send you an offline email to your my.ti.com email address and we can set something up with all 3 of us.
Best,
Matthew
Hi Matthew,
Sorry for taking you so much time and I will try to talk that with our customers but actually they are less active than us on the ATE proposal. But truly I will do it.
And truly thank you for helping us with so many details. I just want to confirm whether we can use the ATE FW to do our factory's Mass Production but seems no one can promise that.
Best Regards,
Cheetah
Hi MatthewPate,
Thank you for that. I am in China, Mainland (UTC+8) and seems there is a 11-16 hours' difference among us.
Anytime I am okay but our LAB is available from 8:00AM-8:00PM, from Monday to Saturday.
Could you help give any proper time to have a call?
Best Regards,
Cheetah
Hi Matthew,
Could you help tell me what your current time is since for my side, it is around 1AM.
Best regards,
Cheetah
Cheetah,
I sent another email offline. Just for reference when you sent the last reply it was 10:48AM in my time zone. Based on the lab hours it will likely be toward the beginning of your day and evening for us. Hope to get the scheduled soon.
Matt
All,
Just wanted to reply back as to the results of the debug.
Q1)PLL lock, programming issues, etc. This was related to the GANG image being in an older format vs the current tools from Elprotronic. Once we got everything updated to the latest FW release, and re-created the GANG image from the original hex file things worked correctly.
Q2)GANG GUI Checksum. FYI the checksum that is listed in the main GANG GUI includes the build time/date as part of the checksum. So even if your source binary is the same, this particular Checksum will change depending on those other variables. This is intended to have better traceablilty of the translated binary to GANG image file. A different checksum in this case does not necessarily indicate the values programmed to the flash are different .
Best,
Matthew