Author Topic: TMS320F240 and emulator BH-USB-2, what utility to flash?  (Read 3030 times)

0 Members and 1 Guest are viewing this topic.

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
TMS320F240 and emulator BH-USB-2, what utility to flash?
« on: November 08, 2024, 07:19:55 pm »
Code Composer 3.3 works fine with the blackhawk-usb2.0 emulator, but the flashburn utility does not support it. The Uniflash utility does, but it does not have TMS320F240.
There are executables for loading into TMS, but if I can clean and erase by running them, how do I write a firmware file if I need to somehow feed data for writing?
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #1 on: November 09, 2024, 07:11:13 am »
I looked at the used Code Composer dll and dvr, copied everything to the folders to the utilities, but it still doesn't work. It complains about the CSM, and the TMS320F240 doesn't have a CSM.
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #2 on: November 12, 2024, 03:53:19 am »
I found a homemade program that has the source code of the algorithms for the newer TMS320. The text shows that the algorithms were once exactly what I needed, but they were modified, and now they need to be modified back.
https://www.egorz.ru/project/tms320prog/tms320prog.rar
 

Online daisizhou

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: cn
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #3 on: November 12, 2024, 05:59:32 am »
Is this a DSP chip? Do you want to load firmware into it?
daisizhou#sina.com #=@
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #4 on: November 12, 2024, 01:00:38 pm »
Is this a DSP chip? Do you want to load firmware into it?
Yes, these chips are called DSP. In fact, it is a regular mcu.
Yes, I need to write firmware to its flash. If you look at the TI site, you will find that all questions about this chip remain unanswered.
However, the archive in the link above has everything you need to make the firmware functions yourself, using Code Composer.
If you have something ready, I would be happy not to mess with it.
 

Online daisizhou

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: cn
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #5 on: November 12, 2024, 11:43:50 pm »
Yes, it is an MCU chip.But it contains EEPROM or FLASH,Usually requires firmware to be written to work correctly.

I also have a TMS320F2812,It is broken, but I don't know how to write new firmware to the newly acquired 2812.
I have looked for very few standalone programmers that support it,Someone suggested using online JTAG programming, but I still don't know how to use it, in other words, what type of JTAG programmer should I buy?
If you know please tell me, thanks
daisizhou#sina.com #=@
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #6 on: November 13, 2024, 12:08:09 am »
... I also have a TMS320F2812,It is broken, but I don't know how to write new firmware to the newly acquired 2812.
I have looked for very few standalone programmers that support it,Someone suggested using online JTAG programming, but I still don't know how to use it, in other words, what type of JTAG programmer should I buy?
If you know please tell me, thanks
There are no problems with your TMS320F2812. It is listed and supported by software (pdf file).
You can buy the adapter at this link, but there is no software in the kit, you will have to download it separately and figure out how it works.
https://www.aliexpress.com/item/1005007446681354.html

Only 32-bit system is supported! Windows XP is preferred.
« Last Edit: November 13, 2024, 12:13:01 am by Postal2 »
 

Online daisizhou

  • Frequent Contributor
  • **
  • Posts: 940
  • Country: cn
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #7 on: November 13, 2024, 01:33:38 am »
Sorry, I can't access https://www.aliexpress.com/item/1005007446681354.html, can you tell me the exact model or name?
daisizhou#sina.com #=@
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #8 on: November 13, 2024, 01:50:01 am »
I cut it out of the screenshot, all sellers have the same photo. It's called "XDS510-USB2.0", in fact it's not that, but it works very well, I liked it.
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #9 on: November 16, 2024, 08:03:35 am »
It turns out that the flashburn program can be launched after all by entering the contents of addresses 0x40,0x41,0x42,0x43 instead of a password. But it still loaded it in the wrong place (to 0xFF00 instead of 0xFE00) and it broke. With the correct algorithm files, everything will work.
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #10 on: November 17, 2024, 07:26:40 pm »
I have suspended work on the algorithms for now because the original firmware in the processor is damaged. For comparison, I have archived the original firmware and the one in the new one. The photo shows the board where such a processor is installed.
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #11 on: December 08, 2024, 01:39:18 pm »
I received the firmware, although a different version, but it's worth a try.

Since the code for the algorithms is small and should fit in 256 bytes, I decided to edit the closest one from the flashburn utility kit.

The flashburn utility declares "limited untested support" for this series of processors. Finally, after many years, I tested it and can say that the algorithms do not work. Additional correction of *.out files is needed. So far, I was able to run the precondition/clear algorithm in the CCS 3.3 environment, and it worked correctly.

I found that all algorithms are configured to use a clock frequency of 20 MHz. Since the write pulses are generated by software cycles, this is very critical. Therefore, in the CCS 3.3 environment, it is necessary to correct the CKCR0 registers at address 0x702A and CKCR1 at address 0x702C in the data space. Since I have a 4 MHz crystal, I first wrote 0 to CKCR0, then 0x00E4 to CKCR1, and finally 0x00C3 to CKCR0.

If you load *.out files into the 0xFE00 program space, you need to write ST1 "FFFF" after each reset to set the CNF bit. You also need to pay attention to the SXM bit if you start the program from the middle. If you can't set the Program Counter, you need to debug->reset. Also remember that registers in the register field can only be written in full (by entering 4 digits), although in the data window (CKCR0,...) this is not necessary.
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #12 on: December 10, 2024, 09:20:38 pm »
So far only the "erase" algorithm is ready. You can load it into CCS 3.3 and see. It is applied after the "clear" algorithm, so you can't run it, only for review (although the algorithm is fully functional). All algorithms are made strictly for TMS320F240. To load it into CCS 3.3, run debug->reset, then ffff->ST1, then load it.

I have corrected the "clear" algorithm, it works. Now you can erase your TMS320F240. First you need to run BCX, after it the flash will contain zeros. After that you need to run BEX and TMS320F240 will contain FF. The algorithms are designed for 20 MHz, above is described how to set it.
« Last Edit: December 11, 2024, 12:19:10 am by Postal2 »
 

Offline Postal2Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 826
  • Country: 00
Re: TMS320F240 and emulator BH-USB-2, what utility to flash?
« Reply #13 on: December 11, 2024, 01:23:33 am »
And finally, the file recording algorithm. It worked successfully, but it requires the Flashburn utility version 3.1. Since TMS320F240 has already been erased in the CCS 3.3 environment, we only need to start recording the firmware. To do this, in the CCS 3.3 environment, run debug->reset, ffff->ST1, debug->disconnect and close CCS. Copy the necessary files directly to the utility folder and run the command line (without resetting!):

BhFlashBurn.exe -p 0 -n 0 -f ccBrd0.dat -d tixds24x.dvr -q- c2xx_bpx.out f240firmware.out

That's all.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf