Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE
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.
Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE
Geoff,
The thing that comes to mind here is register protection. I looked it up and I don't think CANMD or CANME have EALLOW protection on them, but we've had errors in our documentation before. Could you try putting an EALLOW; before this code and see if the writes go through?
BR,
No luck I'm afraid Trey,
I tried putting an EALLOW, or as it's done in the motorware program "asm(" EALLOW");", but it makes no difference.
I then tried changing the values of CANME and CANMD using the EcanRegs in the Expressions window to just any random value and this worked. Then I checked the actual register values in the Registers window and they had also changed to the values I typed in.
I was sceptical that the EALLOW would work because as you say, the documentation doesn't say you need to do this, but more importantly, when I run the ControlSuite Example_2806xECanBack2Back on the same hardware (a 69M-KIT board) the registers write successfully.
Looking at that program, the last line in the InitECana() function, which comes before CANME and CANMD are written, is an EDIS. Following that there are no EALLOW statements before the CANME and CANMD are written.
So, it's still a bit of a mystery.
I can try to send you my whole project folder if you like, but do I need to email this rather than attaching it to a post, where it would be public ?
Best Regards,
Geoff
Geoff,
Hrmmm....that's very interesting. The addresses that the CPU is using for these registers are generated from the same information which is used for the expressions window, while the registers view comes from a separate XML file in the CCS installation. The fact that you're able to correlate these means the addresses the CPU is trying to access are correct.
Debugger reads/writes are slightly different from CPU read/writes, but the CPU should still be able to write to those.
Its up to you if you want to post a project on here. If you do it will be public, so don't post any sensitive IP. If you add me as a friend on e2e I can send you a private message with my email address.
BR,
Hi,
is there any update on this? (and in eCAN support in MotorWare in general?)
I am about to start developping a Motorware application that needs CAN and so far I have come to the conclusion that the best place to start is to port the ControlSuite code (F280Yx_ECan.[ch]) to MotorWare. Is there a better alternative?
Hi Giannis,
I did get the ecan working with some help from TI. In the end I'd made a couple of mistakes with a declaration on the ecan registers, as far as I can remember, although I'd have to do a bit of searching to find out what the exact mistake was.
As far as I'm aware, TI haven't done a motorware ecan.c file, so you have to produce your own. I found that was quite a job, but maybe my programming skills aren't that good. As you may already be aware, the ContolSuite and Motorware styles of coding are very different.
I started with the ControlSuite example and did end up with a working ecan peripheral in motorware.
Hope that's some help.
Geoff