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.
Hello,
I'm working with TMS320F2809.
I already used it for some project and I know about some driver.
I used to download a bootloader with SDFLASH but the fact is I can't run SDFLASH on a windows 7 machine. So, I use a windows XP machine with usb to serial adapter (I pull up or down the correct GPIO).
So, I decided to developped my own application (c#) which use the CAN bus to download a bootloader faster.
As mentionned on SPRU722C datasheet :
- I did my boot table with hex2000 Projet.out -boot -gpio8 -a (also tried hex2000 Projet.out -boot -can8 -a but it seems to be the same)
- I'd configured my bus can at 500kb/s 2 bytes ID1
- I send message like it is said (0xAA and then 0x08)
But in my case it happened nothing...
My programme is a blinky LED on GPIO23 and may be my problem come from F2809.cmd file.
Somebody can help me please?
Thank you
Any reply?
I still havve this problem and I think it could be the same for others family devices
Hi,
I'm using the ROM bootloader and a c# application to talk with the CAN bootloader in ROM.
Which Blinky project are talking about? I tried some project but it seems to not worked properly.
How can I be sure that my blinky project is correctly running from RAM?
Thank you Sal
Hi Lemoine,
+ to what Sal said.
Before you start to debug the bootloader itself, you need to be 100% sure that the code you are trying to load is fine and that the datastream is fine. If it's a custom hardware, you should also verify that the hardware is fine (GPIO levels are for CAN bootload, CAN transceiver is ok, etc.).
You say you have LED on GPIO23. So for this, my suggestion would be to go for a Controlsuite example, import one such as cpu_timer. Scroll down the code to the 3 cpu interrupts, put these lines inside one of the interrupts:
EALLOW;
GpioDataRegs.GPATOGGLE.bit.GPIO23 = 1;
EDIS;
*maybe EALLOW/EDIS is not required, I don't remember but won't harm anyway.
Burn this code, check that your LED is toggling every second. Then go for Project->Properties->Build go to the Step tab and add to the Post-Build steps following command: "${CG_TOOL_HEX}" "${BuildArtifactFileName}" -boot -can8 -a -o "${BuildArtifactFileBaseName}.txt", this way after each time you build your code in the project folder (inside the Debug folder) CCS will produce .txt file that you should use to burn your code with CAN. Or use your hex2000 tool instead.
This way you will be sure that your code is fine and that the data stream in the .txt file is fine. So now you are alone with your C# application :)
Btw, what type of CAN transceiver you use on a PC side? Have you checked simple CAN communications with MCU? I personally used a PEAK CAN-USB transceiver. But not for a bootloading.
Yes, trying together is always fine :)
My first question is: which version of CCS and ControlSuite you are using? And the second goes right away: what hardware are you using? Is it some custom PCB?
Normally, if you are using 28069 processor, you would need to import a project from f2806x folder. Mine path, for example, is C:\ti\controlSUITE\device_support\f2806x\v150\F2806x_examples_ccsv5\cpu_timer
I omitted GPIO initialization stage. Nice that you noticed and fixed that. To run this simple example project you need only two command files. One is 28069_RAM_lnk.cmd and the other is F2806x_Headers_nonBIOS.cmd
Hi,
it stil doesn't work well.
I have some trouble to erase the flash and the main problem is after sending my program by CAN bus the LED is blinking but when i restart the board the LED is not blinking.
I'll tried to find the 2809.cmd file.
Oh god... The whole thread I thought it was about 28069.... Sorry for that.
I wish I could be more helpful :(
Btw, have you tried the same flash code on your demo board, does it work after restart there? (of course with appropriate command files)
Hi,
ok so the problem is here.
I tried your solution but it still doesn't work and may be it's worth.
I download the bootloader and any LED is blinking and it's the same after restarting the board
So attached my new files
LEMOINE,
Using flash command file is only one step to prepare your code for flash memory. Have you also accomplished other necessary steps? Have you included FlashInit(), memcopy, etc. in your program code?
If not, I can give you a very quick and dirty guide how to do it. Just tell me.
Otherwise - for a more detailed description - look at SPRA958L and SPRAAU8
Alexandre,
For my latest projects (using the latest ControlSuite version) I do the following to transfer my code to flash (of course, when I'm satisfied with the default flash command file, my program fits, etc.):
1) Add the flash command file to the project and exclude the RAM command file (you have already done it).
2) Add the following lines of code (after the InitPieVectTable()):
// Copy time critical code and Flash setup code to RAM
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);
InitFlash();
3) Make sure your can compile your code and you have no warnings.
*) I used to also do the following: go to Project properties -> Build -> C2000 Compiler -> Advanced Options -> Predefined Symbols and add a "_FLASH" symbol there. I used it in some of my previous projects. Not sure if you need to do this step. Maybe some TI experts will advise.
You can also check the example project. Example_2809_Flash (I believe that is the name) to see all steps in details.
Alexandre,
Your code looks perfectly fine for me. Does it (with appropriate command files) work on your test demo board with 2808 processor?
P.S. I Guess, and that is a very bad guess, that it's not possible to load code to flash via default CAN bootloader. It is necessary to use something similar to flash kernel.
Sorry Alexandre.
I have no experience with 280x devices, so I don't know how to help you further.
On other devices from C2000 family (2806x family for example) I would suggest you to take a look at flash kernel. Try it and implement something similar via CAN. It's not a piece of cake though.
Maybe Sal Pezzino can help. He is one of the authors of Flash programming solution and a nice person overall.
I wish you all the best of luck with your project.