[En-Nut-Discussion] SJA1000
Petri Hyötylä
phyotyla at cc.hut.fi
Wed Aug 29 14:17:30 CEST 2007
Quoting Ole Reinhardt <ole.reinhardt at embedded-it.de>:
> Hi,
>
>> It seems that it works when I send frames with extended ID but when I send
>> frames with standard ID it returns a frame with ID with bits shifted
>> three bits
>
> In fact you perhaps found a bug in the driver. I have to read the
> datasheets again to find out how the ID is created. Could you please try
> a little test:
>
> Please create a standard frame by hand and send the id 0x50 from the
> board. What ID do you get on the debugger? This little test will help me
> to figure out if there is a bug in the receive or the send routine.
>
> Bye,
>
> Ole Reinhardt
>
>
> --
> _____________________________________________________________
> | |
> | Embedded-IT Hard- und Softwarelösungen |
> | |
> | Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 |
> | Luisenstraße 29 Mobil: +49 (0)177 7420433 |
> | 57076 Siegen eMail: ole.reinhardt at embedded-it.de |
> | Germany Web: http://www.embedded-it.de |
> | UstID / VAT: DE198944716 |
> |_____________________________________________________________|
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
Hello
I did a lot more testing than you asked because tomorrow the debugger
is required in another project.
These standard IDs sent by the ethernut show as 0x000 in the debugger.
0x7FF 0xEF 0xE 0x050
0x6FF 0xDF 0xD 0x500
0x5FF 0xCF 0xC
0x4FF 0xBF 0xB
0x3FF 0xAF 0xA
0x2FF 0x9F 0x9
0x1FF 0x8F 0x8
0x0FF 0x7F 0x7
0x6F 0x6
0x5F 0x5
0x4F 0x4
0x3F 0x3
0x2F 0x2
0x1F 0x1
0x0F 0x0
Then I used extended frame to send back the IDs that I received from debugger
0x700 0x1C000000 0x30 0xC00000
0x600 0x18000000 0x20 0x800000
0x500 0x14000000 0x10 0x400000
0x400 0x10000000 0xF 0x3C0000
0x300 0x0C000000 0xE 0x380000
0x200 0x08000000 0xD 0x340000
0x100 0x04000000 0xC 0x300000
0xF0 0x3C00000 0xB 0x2C0000
0xE0 0x3800000 0xA 0x280000
0xD0 0x3400000 0x9 0x240000
0xC0 0x3000000 0x8 0x200000
0xB0 0x2C00000 0x7 0x1C0000
0xA0 0x2800000 0x6 0x180000
0x90 0x2400000 0x5 0x140000
0x80 0x2000000 0x4 0x100000
0x70 0x1C00000 0x3 0xC0000
0x60 0x1800000 0x2 0x80000
0x50 0x1400000 0x1 0x40000
0x40 0x1000000 0x0 0x00000
Short ones are standard IDs from debugger to ethernut.
Long ones are extended IDs from ethernut to debugger.
I guess there is enough data for you to see a pattern.
I certainly see a pattern. Relevant part of the code below.
BTW Should I use some other Base Address than 0x8000 because in the
future I will use ethernet as well as CAN and ethernet base address is
0x8300
-----------------------------------------------------------
txCanFrame.id = rxCanFrame.id;
txCanFrame.len = 8;
txCanFrame.ext = 1;
txCanFrame.byte[0] = rxCanFrame.byte[0]+1;
txCanFrame.byte[1] = rxCanFrame.byte[1]+1;
txCanFrame.byte[2] = rxCanFrame.byte[2]+1;
txCanFrame.byte[3] = rxCanFrame.byte[3]+1;
txCanFrame.byte[4] = rxCanFrame.byte[4]+1;
txCanFrame.byte[5] = rxCanFrame.byte[5]+1;
txCanFrame.byte[6] = rxCanFrame.byte[6]+1;
txCanFrame.byte[7] = rxCanFrame.byte[7]+1;
--
Petri
More information about the En-Nut-Discussion
mailing list