iMX93 read ADC using CM33

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

iMX93 read ADC using CM33

1,557 Views
ptremante
Contributor I

Hi NXP Team,

I'm working with the imx93_evk_11x11 board and have built a custom image with LF 6.6.x kernel and the Scarthgap Yocto release.

My goal is to test adc1 on the CM33 core, so I downloaded the MCUXpresso SDK and built the `sar_adc/polling` example.

The problem occurs when I load the firmware using `remoteproc`:

echo -n adc_polling_cm33.elf > /sys/class/remoteproc/remoteproc0/firmware
echo -n start > /sys/class/remoteproc/remoteproc0/state

At that point, everything freezes, both the A55 and CM33 cores.
On the CM33 debug UART I only see the first message:
`ADC polling example`
…then the system hangs and I have to reboot the board.

I tested the same firmware from U-Boot and it works perfectly, so I suspect a conflict with some kernel configuration.
I also tried disabling the `adc1` node in the device tree, but the issue persists.

Has anyone successfully run the ADC examples on CM33 with this EVK?
Am I missing something that should be disabled on the A55 side?
Any help or suggestions would be greatly appreciated!

Thanks a lot!

Pasquale

 

0 Kudos
Reply
4 Replies

1,529 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This could be caused by a peripheral conflict between Cortex-M and Cortex-A cores since are trying to access at the same peripheral simultaneously.

You can use this post as reference:

Test SAI3 while running M7 firmware with remoteproc

Best regards.

0 Kudos
Reply

1,173 Views
ptremante
Contributor I

Hi,
thanks for the reply, but unfortunately it didn’t help in my case.

I have already disabled everything related to ADC on the Linux side (kernel driver and device tree), but the system still freezes when I start the CM33 firmware via remoteproc.

Is there anything else that needs to be disabled or configured on the A55 side for using ADC from CM33 on i.MX93?
Has anyone successfully used the ADC on CM33 when the firmware is loaded via remoteproc on this EVK?

Thanks!

0 Kudos
Reply

889 Views
nyc
Contributor II
I can reproduce the problem when using NormalConvScanMode, but NormalConvOneShotMode runs okay
0 Kudos
Reply

955 Views
nyc
Contributor II

I have the same problem, any staff can support? Thanks!

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2203584%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EiMX93%20read%20ADC%20using%20CM33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203584%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%20NXP%20Team%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI'm%20working%20with%20the%20i%3CSTRONG%3Emx93_evk_11x11%3C%2FSTRONG%3E%26nbsp%3Bboard%20and%20have%20built%20a%20custom%20image%20with%20%3CSTRONG%3ELF%206.6.x%20kernel%3C%2FSTRONG%3E%20and%20the%20%3CSTRONG%3EScarthgap%20Yocto%20release%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3EMy%20goal%20is%20to%20test%20%3CSTRONG%3Eadc1%3C%2FSTRONG%3E%20on%20the%20%3CSTRONG%3ECM33%3C%2FSTRONG%3E%20core%2C%20so%20I%20downloaded%20the%20MCUXpresso%20SDK%20and%20built%20the%20%60%3CSTRONG%3Esar_adc%2Fpolling%3C%2FSTRONG%3E%60%20example.%3C%2FP%3E%3CP%3EThe%20problem%20occurs%20when%20I%20load%20the%20firmware%20using%20%60remoteproc%60%3A%3C%2FP%3E%3CP%3Eecho%20-n%20adc_polling_cm33.elf%20%26gt%3B%20%2Fsys%2Fclass%2Fremoteproc%2Fremoteproc0%2Ffirmware%3CBR%20%2F%3Eecho%20-n%20start%20%26gt%3B%20%2Fsys%2Fclass%2Fremoteproc%2Fremoteproc0%2Fstate%3C%2FP%3E%3CP%3EAt%20that%20point%2C%20%3CSTRONG%3Eeverything%20freezes%3C%2FSTRONG%3E%2C%20both%20the%20%3CSTRONG%3EA55%3C%2FSTRONG%3E%26nbsp%3Band%20%3CSTRONG%3ECM33%3C%2FSTRONG%3E%26nbsp%3Bcores.%3CBR%20%2F%3EOn%20the%20CM33%20debug%20UART%20I%20only%20see%20the%20first%20message%3A%3CBR%20%2F%3E%60ADC%20polling%20example%60%3CBR%20%2F%3E%E2%80%A6then%20the%20system%20hangs%20and%20I%20have%20to%20reboot%20the%20board.%3C%2FP%3E%3CP%3EI%20tested%20the%20same%20firmware%20from%20U-Boot%20and%20it%20works%20perfectly%2C%20so%20I%20suspect%20a%20conflict%20with%20some%20kernel%20configuration.%3CBR%20%2F%3EI%20also%20tried%20%3CSTRONG%3Edisabling%20the%20%60adc1%60%20node%20in%20the%20device%20tree%3C%2FSTRONG%3E%2C%20but%20the%20issue%20persists.%3C%2FP%3E%3CP%3EHas%20anyone%20successfully%20run%20the%20ADC%20examples%20on%20CM33%20with%20this%20EVK%3F%3CBR%20%2F%3EAm%20I%20missing%20something%20that%20should%20be%20disabled%20on%20the%20A55%20side%3F%3CBR%20%2F%3EAny%20help%20or%20suggestions%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3CP%3EThanks%20a%20lot!%3C%2FP%3E%3CP%3EPasquale%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2203877%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20read%20ADC%20using%20CM33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2203877%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThis%20could%20be%20caused%20by%20a%20peripheral%20conflict%20between%20Cortex-M%20and%20Cortex-A%20cores%20since%20are%20trying%20to%20access%20at%20the%20same%20peripheral%20simultaneously.%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20this%20post%20as%20reference%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FTest-SAI3-while-running-M7-firmware-with-remoteproc%2Fta-p%2F2047745%22%20target%3D%22_blank%22%3ETest%20SAI3%20while%20running%20M7%20firmware%20with%20remoteproc%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315571%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20read%20ADC%20using%20CM33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315571%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3Ethanks%20for%20the%20reply%2C%20but%20unfortunately%20it%20didn%E2%80%99t%20help%20in%20my%20case.%3C%2FP%3E%3CP%3EI%20have%20already%20disabled%20everything%20related%20to%20ADC%20on%20the%20Linux%20side%20(kernel%20driver%20and%20device%20tree)%2C%20but%20the%20system%20still%20freezes%20when%20I%20start%20the%20CM33%20firmware%20via%20remoteproc.%3C%2FP%3E%3CP%3EIs%20there%20anything%20else%20that%20needs%20to%20be%20disabled%20or%20configured%20on%20the%20A55%20side%20for%20using%20ADC%20from%20CM33%20on%20i.MX93%3F%3CBR%20%2F%3EHas%20anyone%20successfully%20used%20the%20ADC%20on%20CM33%20when%20the%20firmware%20is%20loaded%20via%20remoteproc%20on%20this%20EVK%3F%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2350684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20read%20ADC%20using%20CM33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2350684%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20the%20same%20problem%2C%20any%20staff%20can%20support%3F%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2351919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20read%20ADC%20using%20CM33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2351919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI%20can%20reproduce%20the%20problem%20when%20using%20NormalConvScanMode%2C%20but%20NormalConvOneShotMode%20runs%20okay%3C%2FLINGO-BODY%3E