Problems with aquire_locks in SW_FOC_Motor_Control

If you have a simple question and just want an answer.
Kaby
Newbie
Posts: 1
Joined: Fri Mar 14, 2014 8:35 am

Problems with aquire_locks in SW_FOC_Motor_Control

Post by Kaby »

Hi,
I am having problems getting  app_foc_demo which is part of the SW_FOC_Motor_control project on github to run( within xTimecomposer and
 
the Motor control platform). I took out  the everything to do with CAN communication within the project since i didn't need but so far I keep
 
getting some errors.  I tried tracing the issue within the simulator and this is what i realized;
tile[0]@1- -w-A-.----.0001030c (lcd_byte_out + 58) : syncr res[r4(0x10300)] @43295

tile[1]@6- -a-a-a-p-p-p-A-.----......0001047c (run_motor + 0) : entsp 0xdb S[0x1df5c] @43295

tile[1]@0- -A-a-a-a-p-p-p-.----00011566 (foc_adc_7265_triggered+ 1e) : ldw r0(0x1), r0(0x14500)[r11(0x0)] L[0x14500] @43296

tile[0]@1- -w-A-.----.0001030e (lcd_byte_out + 5a) : out res[r2(0x10100)], r0(0x1) @43299

tile[1]@5- -a-a-p-p-p-A-a-.--k-.....00010080 (_TrapHandler + 0) : bu 0x1313 @43301

tile[0]@1-P-w-A-.----.00010310 (lcd_byte_out + 5c) : syncr res[r2(0x10100)] @43303

tile[1]@0- -A-a-a-a-p-p-p-.----00011568 (foc_adc_7265_triggered+ 20) : stw r0(0x1), sp[0x8] S[0x1fd7c] @43303

tile[1]@1- -p-A-a-a-a-p-p-.----.00010480 (run_motor + 4) : stw r4(0x80011302), sp[0xda] S[0x1f81c] @43304

tile[1]@2- -p-p-A-a-a-a-p-.----..00011ae4 (foc_pwm_do_triggered+ c) : stw r6(0x0), sp[0x42] S[0x1ee80] @43305

tile[1]@3- -p-p-p-A-a-a-a-.----...00011ae4 (foc_pwm_do_triggered+ c) : stw r6(0x0), sp[0x42] S[0x1ed08] @43306

tile[1]@4-*-a-p-p-p-A-a-a-.----....00010380 (acquire_lock + 4) : in r0(0x0), res[r0(0x0)] @43307

tile[1]@4 *00010380 : TRAP ET: 4, SPC: 00010380, SSR: 0, ED: 00000000 (ILLEGAL_RESOURCE: Invalid resource id used)

tile[1]@5- -a-a-p-p-p-A-a-.--k-.....000126aa (_DoException + 0) : clre @43308

Unhandled exception: ILLEGAL_RESOURCE, data: 0x00000000

 

Code: Select all

I would be really glad if someone could  maybe explain what exactly is happening and a possible solution to this issue.Thank you in  advance :D
 

 

 



User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

Hi,

Can you assure that init_locks() function from here: https://github.com/xcore/sw_foc_motor_c ... le_foc_uti...

is called before acquire_lock()?

 

Also your instruction trace is only showing one instruction of tile 1 thread 4, the thread causing the exception.

It would be helpful to see more previously executed instructions from that thread before the exception.