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.

var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global') confict with semaphore and mailbox

I create a project in CCS3.3 on EVMDM6437. I used VPFE Driver of PSP and DNK, I get a picture and use semaphore to synchronization, everything is OK before I add:

var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global')

in .cfg.

could some one to tell me why.

  • Hello,

    Can you tell me the versions of the software components (like BIOS) you're using? Can you explain the problem in a little more detail? What errors are you seeing?

    Thanks,

    Whitney

  • The BIOS version is 5.31, and my program has two tasks, one is used to get picture from VPFE driver and the second task is used to send message to PC by TCP. I used Semaphore to synchronization. Everything is ok before I add:

    var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global') .

    in .cfg file. Then the program will run away while running in some time. The version of Codec Engine is 1.20.


  • Besides, it always has such trouble that:

    Trouble Halting target Cpu: Error 0x00000020/-1060. Error during: Exception ,  An unknown prevented the emulator from accessing the processor in a timely fashion.

    Then I have to disconnect the emulator. I use EVMDM6437 and DVSDK 1.10. Thank you.

  • Could you share some .c code and your cfg file ?

    I don't understand what you mean when you say "everything is okay" before you add:-

    var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global') .

    Why do you need to add that line of code  if everything is working fine ? 

  • Because I use Codec Engine to encode the picture, I have to use

    var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global') .

    to configure Codec Engine.

    I set a break point in hwi1, and reference to B3 , the address is 0x842c5038, and the dissamble as follow:

    842C5020          __call_stub:

    842C5020 013C54F4            STW.D2T1      A2,*SP--[2]

    842C5024 007C0363            B.S2          B31

    842C5028 8377     ||         STDW.D2T1     A7:A6,*B15--[1]

    842C502A 8077                STDW.D2T1     A1:A0,*B15--[1]

    842C502C 9377                STDW.D2T2     B7:B6,*B15--[1]

    842C502E 9277                STDW.D2T2     B5:B4,*B15--[1]

    842C5030 9077                STDW.D2T2     B1:B0,*B15--[1]

    842C5032 9177                STDW.D2T2     B3:B2,*B15--[1]

    842C5034 01860162 ||         ADDKPC.S2     C$L1 (PC+24 = 0x842c5018),B3,0

    842C5038          _stub_ret:

    842C5038 D177                LDDW.D2T2     *++B15[1],B3:B2

    842C503A D077                LDDW.D2T2     *++B15[1],B1:B0

    842C503C EB800200            .fphead       n, l, W, BU, nobr, nosat, 1011100

    842C5040 023C33E6            LDDW.D2T2     *++SP[1],B5:B4

    842C5044 033C33E6            LDDW.D2T2     *++SP[1],B7:B6

    842C5048 003C33E4            LDDW.D2T1     *++SP[1],A1:A0

    842C504C 000C0363            B.S2          B3

    842C5050 033C33E4 ||         LDDW.D2T1     *++SP[1],A7:A6

    842C5054 013C52E4            LDW.D2T1      *++SP[2],A2

    842C5058 00006000            NOP           4

    842C505C 00000000            NOP 

    Execution Graph Details as follow:

    5411   PRD: end

    5412   SWI: end   PRD_swi (0x84309400) state = done

    5413   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5414   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5415   CLK: current time = 869 (0x00000365)

    5416   PRD: tick count = 869 (0x00000365)

    5417   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5418   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5419   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5420   CLK: current time = 870 (0x00000366)

    5421   PRD: tick count = 870 (0x00000366)

    5422   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5423   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5424   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5425   CLK: current time = 871 (0x00000367)

    5426   PRD: tick count = 871 (0x00000367)

    5427   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5428   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5429   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5430   CLK: current time = 872 (0x00000368)

    5431   PRD: tick count = 872 (0x00000368)

    5432   SWI: post  PRD_swi (0x84309400)

    5433   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5434   SWI: begin PRD_swi (0x84309400)

    5435   PRD: end

    5436   SWI: end   PRD_swi (0x84309400) state = done

    5437   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5438   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5439   CLK: current time = 873 (0x00000369)

    5440   PRD: tick count = 873 (0x00000369)

    5441   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5442   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5443   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5444   CLK: current time = 874 (0x0000036a)

    5445   PRD: tick count = 874 (0x0000036a)

    5446   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5447   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5448   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5449   CLK: current time = 875 (0x0000036b)

    5450   PRD: tick count = 875 (0x0000036b)

    5451   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5452   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5453   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done

    5454   CLK: current time = 876 (0x0000036c)

    5455   PRD: tick count = 876 (0x0000036c)

    5456   SWI: post  PRD_swi (0x84309400)

    5457   SWI: post  KNL_swi (TSK scheduler) (0x843093d4)

    5458   SWI: begin PRD_swi (0x84309400)

    5459   PRD: end

    5460   SWI: end   PRD_swi (0x84309400) state = done

    5461   SWI: begin KNL_swi (TSK scheduler) (0x843093d4)

    5462   SWI: end   KNL_swi (TSK scheduler) (0x843093d4) state = done.

    and the call stack:

    .global HWI_NMI

    .asg _EXC_dispatch, _function

    .asg "Nothing", _monitor

    .asg 00H, _addr

    .asg "signed", _dataType

    .asg "STS_add(*addr)", _operation

    .asg "USER", _client

    .asg 00H, _iUseDispatcher

    .asg 00H, _iArg

    .asg 02H, _IntrMask

    .asg 01H, _iCCBitMask

    .asg 00H, _iLoadTrack

    HWI_Obj 1, HWI_NMI, 1, _function, _monitor, _addr, _dataType, _operation, _client, _iUseDispatcher, _iArg, _IntrMask, _iCCBitMask, _iLoadTrack

    TSR is 0x00008404

    IERR is 0x00000001

    EFR is 0x00000002

    the program happens like this every time. If I continue the program, then program will go to SYS_EXITFXN, UTL_halt. and Execution Graph Details shows:

    5463   EXC_exceptionHandler: EFR=0x2

    5464     NRP=0x0

    5465     mode=supervisor

    5466   Internal exception: IERR=0x1

    5467     Instruction fetch exception

    5468   SYS abort called with message 'Run-time exception detected, aborting ...'

    I used ccs3.3 and dsp/bios 5.31.08, codec engine 1.20.02, Besides, if I open KOV, CCS3.3 will crash.http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/355/3566.video_5F00_codec_5F00_example1.7z

  • Could you attach again as a .zip file ? I was unable to open it. I need more information on what you are running before I can provide advice. I would like to look at your source code and configuration file (please attach again).

    Were you able to build and run any of the codec engine examples on your board and CCS ?