IMX8ULP HiFi4 DSP - Zephyr RTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8ULP HiFi4 DSP - Zephyr RTOS

313 Views
hsmith2440
Contributor I

Hello,

I have been following the Running Zephyr RTOS on Cadence Tensilica HiFi 4 DSP guide (Running Zephyr RTOS on Cadence Tensilica HiFi 4 DSP) in an attempt to demonstrate the functionality of the HiFi4 UART Debug console on the IMX8ulp_evk board. My goal is to get the Debug Console running so that I have a platform for developing my own application firmware in Zephyr, however I have been unable to get the samples running as-is. The Zephyr Hello World example does not print to the console. 

I'm not sure if this is a Zephyr related issue, or if this is an issue with the DSP on the IMX8ULP_evk.

In the Zephyr device tree (zephyr/boards/nxp/imx8ulp_evk/imx8ulp_evk_mimx8ud7_adsp.dts at main · zephyrproject-rtos/zephyr), it appears that the output console for the dsp is LPUART7. However, this is the uart used for the A35 core, which is reserved for the linux application. Is this correct? In the NXP HiFi4 guide mentioned above, the output from the DSP, when run, is on a separate COM port, so this seems like a mistake?

I also tried making modifications to the imx8ulp_evk device tree as outlined in section 4.3.3 of (i.MX DSP User's Guide), which did not work either. Am I missing a step somewhere?

 

If the issue persists, are there any other/better ways for interfacing with the DSP chip? My goal is to offload compute from the A35 core to the DSP chip for more Signal-Processing-intensive computations. Another option I was considering was using the pre-built hifi4_tflm_imx8ulp firmware for the dsp chip - is that a viable option on this board? Thank you. 

Labels (2)
Tags (4)
0 Kudos
Reply
3 Replies

115 Views
dbaluta
NXP Employee
NXP Employee

@hsmith2440  I think you can make Zephyr logging work with the serial console using lpuart7. You will need to disable lpuart7 node on Linux side (but still configure lpuart7 clock, becase so far Zephyr doesn't enable it).

Have a look on how we did it for Sound Open Firmware (which is a Zephyr app) and supported via SOF Linux driver.

See: https://github.com/nxp-imx/linux-imx/commit/bc1de1b61d3a22442e940726c7a6f87f3aa1ba63

We will update the 'Running Zephyr RTOS on Cadence Tensilica HiFi 4 DSP' guide with explicit details for enabling serial console on imx8ulp.

So, you need to update your board dts (e.g imx8ulp-evk.dts) and enable LPUART7 clock from Linux side as above.

Also, please let us know what is the exact version of your imx8ulp board you are using, as for some of the boards you need to shorts some pins to enable lpuart7 (check the schematic).

For example on our side we have:

- J25/J26 1-2 : FT4232 Port D <-> LPUART1 (Default)
- 25/J26 2-3 : FT4232 Port D <-> LPUART7


Please mind that  i.MX DSP User's Guide is describing some samples that are not using Zephyr so they have a different serial console configuration.

0 Kudos
Reply

292 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

The A35 is used by linux in DSP LPUART7. but we have not seen any issue running zephir on MX8ULP, can you send us your code, if you are doing as the https://www.nxp.com/docs/en/application-note/AN13970.pdf everything should works.

 

regards

 

 

0 Kudos
Reply

280 Views
hsmith2440
Contributor I

Are you stating that LPUART7 is accessible by both the Linux console and the HiFi4 DSP at the same time? In the example, the output of the DSP is on a different COM port than the Linux process (see figure 2). For the IMX8mp, the serial port for the DSP is ttyUSB3 - what is it on the IMX8ULP?

Also, do changes need to be made for Enabling DSP debug on i.MX 8ULP as outlined in i.MX DSP User's Guide, or is that for a different console than the Hello World Zephyr example?

 

I am using the Zephyr Hello World sample as included in zephyr/samples/hello_world at v4.0-branch · zephyrproject-rtos/zephyr  on the latest branch. I'm building the binary with West as outlined in the instructions in the NXP HiFi4 DSP Zephyr Guide

 

0 Kudos
Reply