TPM7 input capture on iMX8ULP

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

TPM7 input capture on iMX8ULP

787 Views
wendy-liu
Contributor II

Dear all,   

    I want TPM7 channel 2,3,4  to capture other PWM signal.
    I only found input capture demo in SDK_2_16_000_EVK-MIMX8ULP\boards\evkmimx8ulp\driver_examples\tpm.But I can't change DEMO_TPM_BASEADDR(TPM0) to TPM7, cause TPM_INTERRUPT_NUMBER does not support TPM7.
捕获.PNG
    What should I do?Is my solution feasible?
    Looking forward to your reply!
Labels (1)
0 Kudos
Reply
4 Replies

759 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

The TPM7 is designed in A35 domain, so we didn't test it before in M33 at least in the SDK source code.

If you want to assign the TPM7 in M33, you need:

1. add correct XRDC settings to assign Pbridge4->TPM7 from A35 to M33

2. set PCC4->TPM7 clock

3.use correct IRQ number.

To give M33 access to Pbridge4->TPM7 and PCC4.

 

 

struct xrdc_pac_msc_config imx8ulp_pdac[] = {
	{ 0, PAC_SLOT_ALL, {0, 7, 0, 0, 0, 0, 0, 7} }, /* PAC0 */
	{ 0, 44, {0, 7, 7, 0, 0, 0, 0, 7} }, /* PAC0 slot 44 for CGC1 */
	{ 0, 36, {0, 0, 0, 0, 0, 0, 7, 7} }, /* PAC0 slot 36 for CMC1 */
	{ 0, 41, {0, 0, 0, 0, 0, 0, 7, 7} }, /* PAC0 slot 41 for SIM_AD */
	{ 1, PAC_SLOT_ALL, {0, 7, 0, 0, 0, 0, 0, 7} }, /* PAC1 */
	{ 1, 0, {0, 7, 7, 0, 0, 0, 7, 7} }, /* PAC1 slot 0 for PCC4 */
	{ 1, 6, {0, 7, 7, 0, 0, 0, 0, 7} }, /* PAC1 slot 6 for LPUART6 */
	{ 1, 7, {0, 7, 7, 0, 0, 0, 0, 7} }, /* PAC1 slot 7 for LPUART7 */
	{ 1, 9,  {0, 7, 7, 7, 0, 0, 0, 7} }, /* SAI5 for HIFI4 and eDMA2 */
	{ 1, 12, {0, 7, 7, 0, 0, 0, 7, 7} }, /* PAC1 slot 12 for IOMUXC1 */
{ 1, 3, {0, 7, 7, 0, 0, 0, 7, 7} }/* PAC1 slot 3 for TPM7----------------------->M33 */
	{ 2, PAC_SLOT_ALL, {7, 7, 7, 7, 0, 0, 7, 7} }, /* PAC2 */
};

 

 

But for the TPM7 interrupt, this is deigned in GIC(A35 domain),  i need to double check if you can use it in SDK.


Best Regards,
Zhiming

0 Kudos
Reply

755 Views
wendy-liu
Contributor II

Thanks for replying!

I want to confirm that  input capture feature can only be used on the M33 core, right?

0 Kudos
Reply

750 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

If you want to use TPM input capture in Linux, the default driver can't support that. 

But you can modify the drivers/clocksource/timer-imx-tpm.c to support it referring the RM.

As the RM describes how to use input capture mode:

 

Snipaste_2025-03-07_10-11-09.jpg



Best Regards,
Zhiming

0 Kudos
Reply

745 Views
wendy-liu
Contributor II

Hello!

    Thank you very much!! I will read this charter carefully!

0 Kudos
Reply