Issues with SAI_TransferReceiveNonBlocking on I.MX8MN M7 core

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

Issues with SAI_TransferReceiveNonBlocking on I.MX8MN M7 core

506 Views
kamnxt
Contributor I

Hi!

I'm trying to get SAI input working on a board with an I.MX8MN SoM. I have an external I2S source, that is generating BCLK, SYNC and DATA (1 bit wide). The I2S coming in looks fine when compared with a logic analyzer to the I2S data I am getting out from the I.MX8MN SAI, which leads me to think that the settings I am using for setting up the SAI peripheral should be fine. Still, what happens is that if there are no signals on the input, I am able to queue up a few transfers just fine (they never finish of course). If there are signals coming in, however, my code seems to hang/crash when calling SAI_TransferReceiveNonBlocking.

I was wondering if there are some tips on what can be causing this? Was thinking this could be something to do with the interrupts but the equivalent code for transmitting seems to work just fine...

To make things even more odd, this works (although not relibaly) with a set of SAI interfaces on a EVK for an SoM from one vendor, but not from another, leading me to believe there is some configuration I am missing. I am loading the compiled bin file through u-boot and booting the M7 core using the `bootaux` command.

I have attached a minimal example of this code.

0 Kudos
Reply
3 Replies

406 Views
kamnxt
Contributor I

The IOMUX code is changed between the boards. What makes me wonder if I am doing something incorrectly is that this doesn't work reliably on a Variscite i.MX8MN EVK. Some of the times it runs fine, other times it randomly doesn't receive data properly and the core seems to hang. I'm wondering if there is a basic mistake I am doing somewhere in the initialization code or the way I am using the SDK?

0 Kudos
Reply

388 Views
jimmychan
NXP TechSupport
NXP TechSupport

It is hard to tell you the suggestion when the issue is randomly happened. Please do more test to narrow down the issue first.

0 Kudos
Reply

426 Views
jimmychan
NXP TechSupport
NXP TechSupport

What is the different between the "working" and "non working" boards? You may check the schematics and change the iomux and the code accordingly.

0 Kudos
Reply