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.

Linux/C66XCODECS: mmap function to write into DSP IPCGRx registers from linux userspace.

Part Number: C66XCODECS
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Linux

Hi , 

Am trying to trigger an interrupt to DSP from ARM using IPCGRx .  Using the mmap function am trying to modify the ipcgrx interrupt bit from Linux userspace .

The mmap returns the virtual space address successfully and the page size is 4098. When i try to Write into the register am getting the following error.

Unhandled fault: external abort on non-linefetch (ox1818) at 0xb6f7d240

Bus error .

Am trying out something like this - Please look into the following thread- 

When i try to access the Register address am getting the above error.

e2e.ti.com/.../503640

  • Hi,

    One reason for this may be a missing functional clock. Can you verify that the DSP is properly initialized?

    Another more probable reason is that you're trying to access the IPC registers through user space. And they require a privileged mode to access them. In other words you need to do these settings from kernel space.

    Best Regards,
    Yordan
  • Hi Yordan ,

    Thanks for your prompt response.

    One reason for this may be a missing functional clock. Can you verify that the DSP is properly initialized?

    I have enabled my DSP Clock functionality(Default clock option in Configuration in SYSBIOS configuration). Is there any other clock functionality to be used ?

    Another more probable reason is that you're trying to access the IPC registers through user space.

    The main functionality of mmap is to access the device memory via the virtually mapped memory from user space . One more option is ioremap, which is kernel space functionality. Since my objective is to access it from userspace am trying with mmap.

     they require a privileged mode to access them

    Am running my code as root only.

    In other words you need to do these settings from kernel space. 

    What kind of settings ? can you specify it, i was not able to figure any such examples. 

    Is there any example code available for ARM-DSP Interrupt mechanism ?

     

    Thanks & Regards, 

    Vinodh

     

     

  • Any updates ? Am facing this issue only when i try to access the chip registers, but using the same code am able to access other memory regions .
  • I'm looking into this. Sorry for the delay.

    Best Regards,
    Yordan
  • Sure. Thank you very much.

    regards,
    Vinodh
  • Hi,

    Am running my code as root only.


    This is not what I meant. Kernel locks some parts of the device for use of the drivers & you cannot access them from user space.
    You will need to modify the corresponding kernel driver to do the configurations you're trying to do from user space.

    There are no ready to use linux examples. An example code for arm-dsp communication is the IPC.

    Best Regards,
    Yordan