我使用最新的sdk 9.01, 在测试PRU的时候,pru不能启动。设备树配置如下:
pru_adc_kztop_pins: pru_adc_kztop_pins { pinctrl-single,pins = < AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_INPUT, MUX_MODE6) /* LCD_DATA0.pr1_pru1_pru_r31_0.mode6.ADC_DRCY */ AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_INPUT, MUX_MODE6) /* LCD_DATA1.pri_pru1_pru_r31_1.mode6.ADC_SCLK */ AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_INPUT, MUX_MODE6) /* LCD_VSYNC.pr1_pru1_pru_r31_8.mode6.ADC_DOUT0 */ AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_INPUT, MUX_MODE6) /* LCD_HSYNC.pr1_pru1_pru_r31_9.mode6.ADC_DOUT1 */ // AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_INPUT, MUX_MODE6) /* LCD_AC_BIAS_EN.pr1_pru1_pru_r31_11.mode6.ADC_nSTART */ >; }; &pruss { pinctrl-names = "default"; pinctrl-0 = <&pru_adc_kztop_pins>; }; &pruss_tm { status = "okay"; };
然后在make menuconfig的里面 │ ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ [*] Support for Remote Processor subsystem │ │
│ │ [*] Remoteproc character device interface │ │
│ │ <M> AMx3xx Wakeup M3 remoteproc support │ │
│ │ <M> Keystone Remoteproc support │ │
│ │ <M> TI PRU remoteproc support
< > RPMSG device interface │ │
│ │ < > RPMSG control interface │ │
│ │ {M} RPMSG name service announcement │ │
│ │ < > Qualcomm RPM Glink driver │ │
│ │ <M> Virtio RPMSG bus driver │ │
│ │ <M> PRU RPMsg Communication driver
--- TI SOC drivers support │ │
│ │ < > Keystone Queue Manager Sub System │ │
│ │ < > TI Keystone Navigator Packet DMA support │ │
│ │ <M> TI PRU-ICSS Subsystem Platform drivers
上面的这些选项打开,编译之后,会在 /sys/class/remoteproc文件下面出现remoteproc0\1\2
然后按照之前的官方的步骤:
echo 'am335x-pru0-fw' > /sys/class/remoteproc/remoteproc1/firmware
echo 'am335x-pru1-fw' > /sys/class/remoteproc/remoteproc2/firmware
echo 'start' > /sys/class/remoteproc/remoteproc1/state
echo 'start' > /sys/class/remoteproc/remoteproc2/state
但是在启动pru核的时候,出现下面的错误:
[ 201.223123] remoteproc remoteproc1: powering up 4a334000.pru
-sh: echo: write error: No such device or address
[ 201.305510] remoteproc remoteproc1: Booting fw image am335x-pru0-fw, size 72904
[ 201.319318] pru-rproc 4a334000.pru: error -ENXIO: IRQ vring not found
[ 201.319360] remoteproc remoteproc1: unable to get vring interrupt, status = -6
[ 201.319438] remoteproc remoteproc1: can't start rproc 4a334000.pru: -6
[ 201.319819] remoteproc remoteproc1: Boot failed: -6
就是pru启动失败,这个是什么原因呢?