How to take APE (Audio Processing Engine) out of reset on the Jetson TX2

It appears that the APE is being held in reset, or just being un-responsive when I attempt to start the app loaded on the ADSP by default. I believe it is: adsp.elf?

I’ve included some of the kernel logs when I attempt to run

ioctl(fd, MODS_ESC_ADSP_START, args)


[ 1275.114213] nvadsp 2993000.adsp: ADSP is booting on SILICON
[ 1275.119859] nvadsp 2993000.adsp: Setting freqs
[ 1275.124675] nvadsp 2993000.adsp: adsp cpu freq 600000KHz
[ 1275.130015] nvadsp 2993000.adsp: ape freq 0KHz
[ 1275.134463] nvadsp 2993000.adsp: requested adsp cpu freq 600KHz
[ 1275.140386] nvadsp 2993000.adsp: ape.emc freq 0Hz
[ 1275.145094] nvadsp 2993000.adsp: De-asserting adsp
[ 1275.149957] nvadsp 2993000.adsp: Waiting for ADSP OS to boot up...
[ 1280.153407] nvadsp 2993000.adsp: ADSP OS loading timed out
[ 1280.158957] nvadsp 2993000.adsp: Unable to start ADSP OS
[ 1280.164344] nvadsp 2993000.adsp: adsp failed to boot with ret = -62
[ 1280.170694] nvadsp 2993000.adsp: Dumping ADSP logs ........
[ 1280.177978] nvadsp 2993000.adsp: End of ADSP log dump  .....
[ 1280.183717] nvadsp 2993000.adsp: dumping hwmailbox registers ...
[ 1280.189764] nvadsp 2993000.adsp: recv_hwmbox(): 0x0
[ 1280.194683] nvadsp 2993000.adsp: send_hwmbox(): 0x0
[ 1280.199624] nvadsp 2993000.adsp: get_adsp_state: adsp state hwmbox value: 0x0
[ 1280.206816] nvadsp 2993000.adsp: get_adsp_state: Unrecognized ADSP state!!

My goal is to be able to eventually run my own .ELF binary on the A9, so any help on figuring out why the default application isn’t loading would be greatly appreciated.

Could you share your how you reproduce it step by step?

  1. Load the mods.ko kernel module that is found at: /lib/modules/{uname -r}/kernel/drivers/misc/mods/mods.ko using
sudo insmod mods.ko
  1. Appears that NVIDIA has this MODS driver for modifying peripherals on the board, by using the IOCTL syscall. Looking in sources/kernel/kernel-4.4/drivers/misc/mods/mods.h I found some IOCTL definitions that sounded promising:
  1. I wrote a script that lets me call the IOCTL system call using some of these definitions:
#include <stdio.h>                                 
#include <sys/types.h>                             
#include <fcntl.h>                                 
#include <unistd.h>                                
#include <string.h>                                
#include <sys/ioctl.h>                             
#include "mods.h"                                  
int start(int fd)                                  
    unsigned long args = 0;                        
    if (ioctl(fd, MODS_ESC_ADSP_START, args) == -1)
        printf("Something went wrong!\n");         
int main(int argc, char** argv)                    
    char* file_name = "/dev/mods";                 
    int fd = 0;                                    
    fd = open(file_name, O_RDWR);                  
    if (fd == -1)                                  
        printf("Cannot open file_name\n");         
        return -1;                                 
    return 0;                                      
  1. When I run a similar script with the MODS_ESC_ADSP_LOAD number, it says:
[ 1265.314894] nvadsp 2993000.adsp: ADSP OS firmware already loaded

1.On Parker(t186), adsp firmware is adsp-fw.bin which is different than adsp.elf which is used on Erista (T210). On Parker, only OEM signed adsp-fw.bin can be used. Any different firmware must be signed with the same key.
2.Why are you trying to run your own adsp firmware?
3.The start/stop ioctls he has mentioned are for MODS. I am not sure if these are applicable on this device/build. Instead kernel exported symbols nvadsp_os_start() / nvadsp_os_stop() can be used for that. (check this folder for more information …/kernel/kernel-4.4/drivers/platform/tegra/nvadsp)

I am trying to use my own ADSP firmware in order to use the Audio Processor Engine for GPIO. I don’t want to use one of the A57’s or Denver cores. Ideally I’d like to use the Always On Cortex-R5, but it appears that is a black box and not eligible either. My GPIO needs to be real-time and very fast.

Are you saying that I am not able to write my own .ELF applications and run them on the ADSP? If so, are there any peripheral processors available to run a polling GPIO loop on? I do not want to dedicate an entire A57 to just doing GPIO.