[help needed] TMS570 first steps

It's all about the code!
Post Reply
User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

TMS570 first steps

Post by russian » Wed Jan 28, 2015 2:08 pm

I am trying to figure out TMS570

First negative impression: not much starting information :( For example TI has a wiki page http://processors.wiki.ti.com/index.php/Category:TMS570 with some code example projects - but the projects are only compatible with CCS version 4 while current version is 6. And it looks like no one @ TI considers this a less then perfect state of affairs - http://e2e.ti.com/support/microcontroll ... 2/t/395610

First positive impression: http://e2e.ti.com/support/microcontroll ... les/f/312/ seems to be alive to some extent, that is already x100 times better then Fujitsu FM4 situation.

Another positive news: OpenOCD 0.8.0 has ti_tms570.cfg target file, hope it works, need to figure this out soon.

See also http://rusefi.com/wiki/index.php?title= ... nstruments

At the moment I have https://github.com/eye-scuzzy/TMS570_LS04x_RTOS from #82 by @ but still cannot figure out how to flash the binary into the mc.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
abecedarian
Posts: 387
Joined: Fri Nov 15, 2013 10:49 am

Re: TMS570 first steps

Post by abecedarian » Thu Jan 29, 2015 2:31 am

That is for the LS0432 board, the first Hercules LP. There is some information regarding using it, in particular how some of the projects require changing certain options in CCS.

If you're using the LS1224 board, maybe start here?

And download the dev tools from here:
http://www.ti.com/tool/nowecc
http://www.ti.com/tool/fmzpll_calculator
http://www.ti.com/tool/halcogen
http://www.ti.com/tool/het_ide
http://www.ti.com/tool/safeti-hercules-diag-lib-csp
http://www.ti.com/tool/uniflash


And the E2E community is actually very responsive, at least to the point where things don't infringe on what some would consider proprietary information... and I think that's where a lot of the hang ups regarding the HWAG functions of N2HET spawn from. I think TI developed that peripheral at the behest of some OEM and as such is contractually obligated to not release a lot of technical data about that. Sad state, really, but I'll press where I can to get more information.
You can lead the horticulture but you can't make them think.

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Thu Jan 29, 2015 3:31 am

The problem is that you are pointing me at too many links and too much information too fast. You are overloading me, that's pretty much same thing as pointing me at google. Sure thing, given an unlimited amount of time and google I can probably figure out something eventually.

I would much rather prefer do it in baby steps.

At the moment I still cannot figure out a Hello World application which I would be able to compile, write into the board and validate. At the moment I think that ECC generation tool "the capability to detect and correct memory faults" is not helping but instead holding me from figuring any of this out.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Thu Jan 29, 2015 3:35 am

The board I've got is TMS57004. Apparently this 6 month old board is too old to have a current demo project and I am supposed to get a new shiny TMS57012 which would have a current Demo project and tutorial, at least during the next 6 months I guess :)
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Thu Jan 29, 2015 3:56 am

I guess part of this is psychology or stubbornness - I am not comfortable with the WYCIWYG approach of HaloGen - it remind me of high school http://en.wikipedia.org/wiki/Logo_%28pr ... anguage%29

To be comfortable I need need a library I can use with notepad, not with a mouse. I am suspicious of the visual tool, it feels wrong. Did they create the visual tool because they cannot create a useable API and they need some black box to be generating voodoo code for me? This is wrong.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Thu Jan 29, 2015 4:25 am

russian wrote:I guess part of this is psychology or stubbornness - I am not comfortable with the WYCIWYG approach of HaloGen
And here is why I am not comfortable with WYCIWYG approach: because it's REALLY hard to create a good WYCIWYG tool. Looks like HALCoGen can not handle my 125% Windows font size. Apparently I would need to adjust screen settings and log-off/log-on each time I would need to use HALCoGen?

Image
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
abecedarian
Posts: 387
Joined: Fri Nov 15, 2013 10:49 am

Re: TMS570 first steps

Post by abecedarian » Thu Jan 29, 2015 5:19 pm

Hmm... I don't have that problem.
rus1.jpg
rus1.jpg (515.7 KiB) Viewed 3277 times
And I think it's fairly easy to see my screen is "magnified" a lot more than yours.

*edit- the screen cap is a dual monitor setup.
You can lead the horticulture but you can't make them think.

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Sat Feb 14, 2015 1:08 am

abecedarian wrote:Hmm... I don't have that problem.
Are you using 125% fonts? It could be that your Win8 is smarter then my Win7.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9779
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: TMS570 first steps

Post by russian » Sat Feb 14, 2015 1:09 am

Thank you @ for sending me two LAUNCHXL2-TMS57012!
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
abecedarian
Posts: 387
Joined: Fri Nov 15, 2013 10:49 am

Re: TMS570 first steps

Post by abecedarian » Sat Feb 14, 2015 1:13 am

russian wrote:Thank you @ for sending me two LAUNCHXL2-TMS57012!
:D :D :D :D :D
You can lead the horticulture but you can't make them think.

peredelkin
Posts: 24
Joined: Sat Jun 24, 2017 7:48 am
Location: Neftekamsk

Re: TMS570 first steps

Post by peredelkin » Sat Aug 10, 2019 1:03 pm

Has anyone already figured out how n2het + hwag works?

L00 CNT { next = L01, angle_count = ON, reg = B, comp = GE, max = 3839}
L01 ACMP { next = L02, en_pin_action = ON, pin = 1, action = SET, reg = B, data = 192 }
L02 ACMP { next = L00, en_pin_action = ON, pin = 1, action = CLEAR, reg = B, data = 256 }
I'm not shure that I shod to use CNT instruction with angle mode
The upper channel should be stationary.

User avatar
kb1gtt
contributor
contributor
Posts: 3489
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: TMS570 first steps

Post by kb1gtt » Sat Aug 10, 2019 11:17 pm

@abecedarian is the one who was making progress on this. I think I recall hearing that cancer did not go well for him, and I understand he will not be replying to your comments :(
Welcome to the friendlier side of internet crazy :)

peredelkin
Posts: 24
Joined: Sat Jun 24, 2017 7:48 am
Location: Neftekamsk

Re: TMS570 first steps

Post by peredelkin » Thu Aug 15, 2019 1:59 pm

https://e2e.ti.com/support/microcontrol ... 60#3066760
The situation is such that even at the Ti support forum there are not many questions about HWAG, and there are even fewer answers.
I’m not sure that they will answer my question there, but after re-reading the reference manual once again with my friend, we did not find anything criminal in the settings of the angle generator.
So far, everything looks like the generator is just not ticking in missing tooths. Because of this, there is a shift every revolution. Maybe I'm missing something.
=======
It seems TI does not want to solve the hwag problem.
the only (this is only my opinion) solution so far possible is to organize the transfer of the HWAACNT value to the register of angle counting in n2het with each capture of the crankshaft position sensor.
This will allow you to synchronize the angle count, because the values in hwaacnt are correct.

Post Reply