cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of I2S stops the SPI

Wechmarer
Associate II

We are using STM32MP13 with Linux for the A7 and using HAL (no OS) for the M4 Coprocessor. In Linux we configured in device tree the I2S (codec and sound are also configured in device tree).

 

&i2s1 {
	clocks = <&rcc SPI1>, <&rcc SPI1_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
	clock-names = "pclk", "i2sclk", "x8k", "x11k";
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&i2s1_pins_audio &i2s1_pins_z_audio >;
	pinctrl-1 = <&i2s1_sleep_pins_audio &i2s1_sleep_pins_z_audio >;
	status = "okay";
	dmas = <&dmamux1 38 0x400 0x01>;
	dma-names = "tx";

	i2s1_port: port {
		i2s1_endpoint: endpoint {
			remote-endpoint = <&codec_corscience_endpoint>;
			format = "i2s";
		};
	};
};

 

At M4 this was done using CubeIDE for the SPI3 and SPI4. These ports are working but as soon we play a sound using aplay the SPI3/4 hangs.

2 REPLIES 2
RhSilicon
Lead

I don't know if it can help in your case, but I found these videos about advanced debugging:

[STM32CubeIDE Advanced Debug Features]

[Dual Core Debugging on STM32H7 with STM32CubeIDE]

 

Baremetal is great for those doing the program, but it's much harder to find help. HAL has many forks of code which makes it slower and consumes more FLASH memory, but it is easier for the ST team to advise on flaws and bug workarounds. Would it be possible to deploy the code with HAL for testing and then migrate to Baremetal?

Sorry, I didn't know that Baremetal is as system - I meant bare metal. We just use HAL already.