2022-05-23 06:39 AM
Hi,
I'm trying to use a STM32F446 to receive some SPDIF-data. There are no complicated things to be done with the received data, just a few simple calculations. Unfortunately I do not receive anything at the moment.
I have configured the SPDIF-interface within STM32CubeMX: Selected input is IN0, the input does not wait for activity, the manximum number of retries was set to 63, and.the preamble bits are not copied. Everything else was left to default.
Clock configuration was done in a way where the core (SYSCLK) is at 180 Mhz, SPDIFRX also gets 180 MHz. Hope this is correct as I'm somewhat unsure about this part.
Within the generated code I have replaced HAL_SPDIFRX_RxCpltCallback(), it now is an own function in my code.
Nevertheless, when I'm running this stuff, I do not receive anything, none if the different callback functions is called. The pin PB7 receives a valid SPDIF-signal, this was verified with an oscilloscope (however, it runs with a somewhat unusual frequency of 100 kHz).
So what could be missing here? The pin-mapping of PB7? Shouldn't this be done by the CubeMX configuration already?
Any ideas how to track down the problem?
Thanks!
PS: one strange thing I noted: when I set the code-generation option "Set all free pins as analog", the generated HAL-code crashes when configuring GPIO13. When I manually remove all GPIOs starting at 13 or disable this option, initialisation works well. Not sure if this can be related somehow...
2022-06-14 09:58 PM
As already mentioned: the problem is with the RXNE-flag in SR register, it never is reset leading to a timeout.
When I change the logig of this part of the CubeMX code and wait for RXNE to be set, I receive nothing, so this part of the CubeMX code seems to be correct.
2022-06-19 07:57 AM
Sorry to say, but your professional support is really poor. Have a look at NXP or TI, they answer fast and competent - so I will drop this STM-crap and have a look for a suitable CPU from one of these vendors.
Bye and thanks for nothing!
2022-08-08 11:33 PM
So finally I got it working: with an NXP iMX RT1010.
Until the input pin of the MCU my setup is axactly the same, so the reason for the stuff being working/not working is either the MCU itself or the software. Fiddling into NXPs MCUxpresso software took some days but now it is working like a charm. And their support is also very responsive.