About the CAN controller.

Beck-Sisyphus
Posts: 13
Joined: Sun Jan 03, 2016 12:15 am

Re: About the CAN controller.

Postby Beck-Sisyphus » Mon May 22, 2017 2:32 am

Successfully built with thanks!

ThomasB wrote:Merged

miles0815
Posts: 3
Joined: Fri May 19, 2017 10:27 am

Re: About the CAN controller.

Postby miles0815 » Mon May 22, 2017 1:10 pm

Hi,

i can now build the project. Thanks!

Now i have another issue. I'm using then pins 4 and 5. CAN_init() and CAN_write_frame(&__TX_frame) both return 0, so i think i'm good here. The problem is, that i'm not able to see any signals on pin 5 (using an logic analyser directly connected to TX). Any idea what could be going wrong?

Thanks

miles0815
Posts: 3
Joined: Fri May 19, 2017 10:27 am

Re: About the CAN controller.

Postby miles0815 » Mon May 22, 2017 2:20 pm

Hi again,

all is working now. It was just a wiring issue.

Thanks again an keep up the great work!

Beck-Sisyphus
Posts: 13
Joined: Sun Jan 03, 2016 12:15 am

Re: About the CAN controller.

Postby Beck-Sisyphus » Tue May 23, 2017 3:12 pm

Things didn't go that well on me.
I've built the PCB with Texas Instrument SN65HVD232, and got the code built, and measured the CAN_H and CAN_L in recessive state of 2.285V so I believe there are no power issues.

Running Rudi's main file, and when I try:

ESPCan configured by this Data:
Node : 0x264
CAN RXD PIN NUM: 4
CAN TXD PIN NUM: 5

the error is attached, and when I switch to:

ESPCan configured by this Data:
Node : 0x264
CAN RXD PIN NUM: 16
CAN TXD PIN NUM: 5

The situation gets worse. Any hits?


Error message:

Code: Select all


Guru Meditation Error of type InstrFetchProhibited occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0xffffffff  PS      : 0x00060430  A0      : 0x800d06f5  A1      : 0x3ffb8880
A2      : 0x00000800  A3      : 0xffffffff  A4      : 0x00060023  A5      : 0x3ffaf79c
A6      : 0x00000000  A7      : 0x00000001  A8      : 0x8010fbbd  A9      : 0x3ffb8830
A10     : 0x4010f9cc  A11     : 0x3f407890  A12     : 0x00000800  A13     : 0x00000000
0x4010f9cc: task_CAN at /Users/Beck/Developer/esp/can_bus_components/main/./main_rubi.c:75

A14     : 0x00000005  A15     : 0x00000000  SAR     : 0x00000004  EXCCAUSE: 0x00000014
EXCVADDR: 0xfffffffc  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff

Backtrace: 0x7fffffff:0x3ffb8880 0x400d06f5:0x3ffb8950
0x400d06f5: main_task at /Users/Beck/Developer/esp/esp-idf/components/esp32/./cpu_start.c:307


Guru Meditation Error of type IllegalInstruction occurred on core  1. Exception was unhandled.
Register dump:
PC      : 0x401109e8  PS      : 0x00060030  A0      : 0x80110755  A1      : 0x3ffc57f0
0x401109e8: gpio_set_direction at /Users/Beck/Developer/esp/esp-idf/components/driver/./gpio.c:250

A2      : 0x00000005  A3      : 0x00000002  A4      : 0x3ffc5a9c  A5      : 0x00000000
A6      : 0x3ffc5a50  A7      : 0x00060b20  A8      : 0x00000021  A9      : 0x3ffc57e0
A10     : 0x00000001  A11     : 0x00000001  A12     : 0x3ffc5a98  A13     : 0x00000000
A14     : 0x00000000  A15     : 0x00060b23  SAR     : 0x00000000  EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000

Backtrace: 0x401109e8:0x3ffc57f0 0x40110755:0x3ffc5820 0x4010f9e4:0x3ffc5840
0x401109e8: gpio_set_direction at /Users/Beck/Developer/esp/esp-idf/components/driver/./gpio.c:250

0x40110755: CAN_init at /Users/Beck/Developer/esp/can_bus_components/components/can/./CAN.c:175

0x4010f9e4: task_CAN at /Users/Beck/Developer/esp/can_bus_components/main/./main_rubi.c:89




User avatar
rudi ;-)
Posts: 1082
Joined: Fri Nov 13, 2015 3:25 pm
Contact:

Re: About the CAN controller.

Postby rudi ;-) » Wed May 24, 2017 8:33 pm

@beck

could you manage and have you find the mistake in the code line 75 in the file "main_rubi.c"

Code: Select all

/Users/Beck/Developer/esp/can_bus_components/main/./main_rubi.c:75


best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

User avatar
rudi ;-)
Posts: 1082
Joined: Fri Nov 13, 2015 3:25 pm
Contact:

Re: About the CAN controller.

Postby rudi ;-) » Wed Jun 14, 2017 10:52 pm

@thomas
revised CAN Demo based on the ESP-IDF Component CAN Driver pack is in the pipe

i must look how a PR is done from a branch... comes to yours ...
in the meantime folks, have a look here too

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

ThomasB
Posts: 30
Joined: Sun Dec 25, 2016 12:11 am

Re: About the CAN controller.

Postby ThomasB » Thu Jun 15, 2017 9:10 pm

cool 8-)

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests