imx8mp SAI bit counter not working

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

imx8mp SAI bit counter not working

Jump to solution
217 Views
Brian_B
Contributor I

I am working with the imx8mp processor, receiving serial data over SAI2.  The SAI's VERID register indicates version 3.1 with timestamp registers.  I have the SAI2 receive working and dumping the incoming data into a DMA buffer.  The master clock, bit clock, and frame clock are all generated externally.  I expected to get values in the timestamp counter (RTSR), bit counter (RBCR), and bit timestamp (RBCTR), but they stay at zero even as I am receiving valid data.  I have verified via readback that the receive timestamp control (RTCR) is 0x000003, which should allow the timestamp counter to increment even without the bit counter incrementing.  Is there anything else I need to configure to get the bit counter and timestamp working?

0 Kudos
Reply
1 Solution
198 Views
Brian_B
Contributor I

Never mind - apparently the  regmap_read function I was using was reading back cached values.  I switched to readl and now I am getting valid values.

Thanks anyway!

View solution in original post

0 Kudos
Reply
1 Reply
199 Views
Brian_B
Contributor I

Never mind - apparently the  regmap_read function I was using was reading back cached values.  I switched to readl and now I am getting valid values.

Thanks anyway!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2201219%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx8mp%20SAI%20bit%20counter%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201219%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20working%20with%20the%20imx8mp%20processor%2C%20receiving%20serial%20data%20over%20SAI2.%26nbsp%3B%20The%20SAI's%20VERID%20register%20indicates%20version%203.1%20with%20timestamp%20registers.%26nbsp%3B%20I%20have%20the%20SAI2%20receive%20working%20and%20dumping%20the%20incoming%20data%20into%20a%20DMA%20buffer.%26nbsp%3B%20The%20master%20clock%2C%20bit%20clock%2C%20and%20frame%20clock%20are%20all%20generated%20externally.%26nbsp%3B%20I%20expected%20to%20get%20values%20in%20the%20timestamp%20counter%20(RTSR)%2C%20bit%20counter%20(RBCR)%2C%20and%20bit%20timestamp%20(RBCTR)%2C%20but%20they%20stay%20at%20zero%20even%20as%20I%20am%20receiving%20valid%20data.%26nbsp%3B%20I%20have%20verified%20via%20readback%20that%20the%20receive%20timestamp%20control%20(RTCR)%20is%200x000003%2C%20which%20should%20allow%20the%20timestamp%20counter%20to%20increment%20even%20without%20the%20bit%20counter%20incrementing.%26nbsp%3B%20Is%20there%20anything%20else%20I%20need%20to%20configure%20to%20get%20the%20bit%20counter%20and%20timestamp%20working%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2201222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx8mp%20SAI%20bit%20counter%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2201222%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENever%20mind%20-%20apparently%20the%26nbsp%3B%26nbsp%3B%3CSPAN%3Eregmap_read%20function%20I%20was%20using%20was%20reading%20back%20cached%20values.%26nbsp%3B%20I%20switched%20to%20readl%20and%20now%20I%20am%20getting%20valid%20values.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20anyway!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E