cancel
Showing results for 
Search instead for 
Did you mean: 

the sensory library does not work at all.

Najib Kassab
Associate III

Hello, I'm working on a project involving voice recognition. So, I used the stm32 sensory library to complete this project and the MP23DB02MM digital MEMS PDM microphone. However, I only found one example that used STM32H747I-DISCO, so I ported it to Nulceo-F746ZG and it works fine(meaning that I could receive data and convert them to PCM and pass them to the sensory library). However, the library did not respond in any way. Because I am using an SAI peripheral, I followed the AN5027 documentation step by step.

I'll insert some photos from my code; perhaps you can help me.

the first photo is showing that I want 16K audio frequency and I managed to have it with no error.

0693W00000SuITyQAN.png 

the second one is the SAI settings.

0693W00000SuIToQAN.pngAs I mentioned before, I used this AN5027 documentation, but when it comes to the DMA setting, I put them just as they did but I get hardfault every time. the error was, as I guessed, in DMA_PDATAALIGN_HALFWORD, and DMA_MDATAALIGN_HALFWORD so I changed them to BYTES instead of HALFWORD, I know that it is not correct, but I could receive data with nay hardfault.

0693W00000SuIXCQA3.png

1 REPLY 1

In HalfWord mode the DMA Length / Count is in 16-bit words, not 8-bit bytes

For the Hard Fault the salient code would be that initializing the actual transfer.

For Hard Faults identify what is actually faulting.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..