app_can_demo example issues. Program "crashes" on Tile[1

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Active Member
Posts: 59
Joined: Thu May 05, 2011 10:00 pm
Location: Budapest

Re: app_can_demo example issues. Program "crashes" on Tile[1

Postby myndideal » Mon Feb 04, 2019 11:19 pm

I totally agree with emh203, this is an error !
I have XP-SKC-L2 + ISBUS boards. I am using the *unmodified* demo source, on the original target. It is for Slicekit L2, core type XS1-L2A-QF124. Exactly on the right config, right boards, right scenario.

The problem is the same: "Program stopped at 0x10a78. It stopped with signal ET_ILLEGAL_RESOURCE, Resource exception."
Stack on core[0]:
6 mutual_comm_transaction() mutual_thread_comm.xc:40 0x00010a78
5 can_server() can.xc:310 0x0001036c
Stack on core[1]:
5 mutual_comm_complete() mutual_thread_comm.xc:26 0x00010a52
4 can_send_frame() can_client.xc:17 0x0001092a
The root cause is (very probably) : application doesn't checks the servers state with the provided getter api function before call write fn.
Easy to reproduce, when tx cyclic timer reduced to 5ms. And multiple errors injected to the bus, like busoff short circuit, or txnoack or just let the test running for a while...

Another findig in Can.S:424. The BusOff situation may stops the running canRxTxImpl() completely on this in r8,res[r2] line. (There's no any way to get BusOff status by API, of course. :D because of the can server could stops here.)
in r8, res[r2] // @ time + 34 <---- endless ???

Occassionally there's no Tx traffic, only Rx is ongoing while status looks active... (I guess some error handling stuff may stack in a preivous error state. But I am not yet analyzed.)

Who is online

Users browsing this forum: No registered users and 2 guests