Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-05 Thread via GitHub


acassis merged PR #12054:
URL: https://github.com/apache/nuttx/pull/12054


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-05 Thread via GitHub


jlaitine commented on PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#issuecomment-2039426945

   Squashed all the fixes together, re-tested with logic analyzer


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-05 Thread via GitHub


jlaitine commented on PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#issuecomment-2039272429

   I added one patch to this same PR, just found a bug that it was not possible 
to re-start the PWM outputs if it had been stopped.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


pkarashchenko commented on code in PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#discussion_r1552939771


##
arch/arm64/src/imx9/imx9_tpm_pwm.c:
##
@@ -0,0 +1,686 @@
+/
+ * arch/arm64/src/imx9/imx9_tpm_pwm.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "arm64_arch.h"
+#include "imx9_tpm_pwm.h"
+#include "imx9_iomuxc.h"
+#include "imx9_ccm.h"
+
+#include "hardware/imx9_iomuxc.h"
+#include "hardware/imx9_pinmux.h"
+#include "hardware/imx9_ccm.h"
+
+#ifdef CONFIG_IMX9_TPM_PWM
+
+/
+ * Pre-processor Definitions
+ /
+
+#define CHMUX(priv, x) (((priv->chmux) >> (x)) & 0xff)
+
+/* This is a temporary shortcut to configure TPM1 and TPM3
+ * frequencies correctly; they don't have an own root clock
+ *
+ * TODO: Determine the frequencies in a more proper way
+ */
+
+#define AON_CLK_FREQ   1
+#define WAKEUP_CLK_FREQ1
+#define OSC_24_CLK_FREQ2400
+
+/
+ * Private Types
+ /
+
+/* This structure represents the state of one PWM timer */
+
+struct imx9_pwmtimer_s
+{
+  const struct pwm_ops_s *ops; /* PWM operations */
+  const tpm_pwm_id_t id;   /* PWM_TPM1...PWM_TPM6 */
+  const uintptr_t base;/* The base address of the TPM */
+  const int n_channels;/* Number of channels used for TPM block */
+  const uint32_t chmux;/* Additional muxing of TPM outputs */
+  const int clk;   /* Input clock frequency for the TPM */
+  uint32_t period;
+  unsigned frequency;  /* Current frequency setting */
+};
+
+/
+ * Static Function Prototypes
+ /
+
+/* PWM driver methods */
+
+static int pwm_setup(struct pwm_lowerhalf_s *dev);
+static int pwm_shutdown(struct pwm_lowerhalf_s *dev);
+
+static int pwm_start(struct pwm_lowerhalf_s *dev,
+ const struct pwm_info_s *info);
+
+static int pwm_stop(struct pwm_lowerhalf_s *dev);
+static int pwm_ioctl(struct pwm_lowerhalf_s *dev,
+ int cmd, unsigned long arg);
+
+/
+ * Private Data
+ /
+
+/* This is the list of lower half PWM driver methods used by the upper half
+ * driver
+ */
+
+static const struct pwm_ops_s g_pwmops =
+{
+  .setup   = pwm_setup,
+  .shutdown= pwm_shutdown,
+  .start   = pwm_start,
+  .stop= pwm_stop,
+  .ioctl   = pwm_ioctl,
+};
+
+static struct imx9_pwmtimer_s g_pwmdev[] =
+{
+#ifdef CONFIG_IMX9_TPM1_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM1,
+.base= IMX9_TPM1_BASE,
+.n_channels  = CONFIG_IMX9_TPM1_PWM_NCHANNELS,
+.chmux   = CONFIG_IMX9_TPM1_PWM_CHMUX,
+.clk = AON_CLK_FREQ,
+  },
+#endif
+
+#ifdef CONFIG_IMX9_TPM2_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM2,
+.base= IMX9_TPM2_BASE,
+.n_channels  = CONFIG_IMX9_TPM2_PWM_NCHANNELS,
+.chmux   = CONFIG_IMX9_TPM2_PWM_CHMUX,
+.clk = OSC_24_CLK_FREQ,
+  },
+#endif
+
+#ifdef CONFIG_IMX9_TPM3_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM3,
+.base= IMX9_TPM3_BASE,
+.n_channels  = CONFIG_IMX9_TPM3_PWM_NCHANNELS,
+.chmux   = 

Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


jlaitine commented on code in PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#discussion_r1552804761


##
arch/arm64/src/imx9/imx9_tpm_pwm.c:
##
@@ -0,0 +1,686 @@
+/
+ * arch/arm64/src/imx9/imx9_tpm_pwm.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "arm64_arch.h"
+#include "imx9_tpm_pwm.h"
+#include "imx9_iomuxc.h"
+#include "imx9_ccm.h"
+
+#include "hardware/imx9_iomuxc.h"
+#include "hardware/imx9_pinmux.h"
+#include "hardware/imx9_ccm.h"
+
+#ifdef CONFIG_IMX9_TPM_PWM
+
+/
+ * Pre-processor Definitions
+ /
+
+#define CHMUX(priv, x) (((priv->chmux) >> (x)) & 0xff)
+
+/* This is a temporary shortcut to configure TPM1 and TPM3
+ * frequencies correctly; they don't have an own root clock
+ *
+ * TODO: Determine the frequencies in a more proper way
+ */
+
+#define AON_CLK_FREQ   1
+#define WAKEUP_CLK_FREQ1
+#define OSC_24_CLK_FREQ2400
+
+/
+ * Private Types
+ /
+
+/* This structure represents the state of one PWM timer */
+
+struct imx9_pwmtimer_s
+{
+  const struct pwm_ops_s *ops; /* PWM operations */
+  const tpm_pwm_id_t id;   /* PWM_TPM1...PWM_TPM6 */
+  const uintptr_t base;/* The base address of the TPM */
+  const int n_channels;/* Number of channels used for TPM block */
+  const uint32_t chmux;/* Additional muxing of TPM outputs */
+  const int clk;   /* Input clock frequency for the TPM */
+  uint32_t period;
+  unsigned frequency;  /* Current frequency setting */
+};
+
+/
+ * Static Function Prototypes
+ /
+
+/* PWM driver methods */
+
+static int pwm_setup(struct pwm_lowerhalf_s *dev);
+static int pwm_shutdown(struct pwm_lowerhalf_s *dev);
+
+static int pwm_start(struct pwm_lowerhalf_s *dev,
+ const struct pwm_info_s *info);
+
+static int pwm_stop(struct pwm_lowerhalf_s *dev);
+static int pwm_ioctl(struct pwm_lowerhalf_s *dev,
+ int cmd, unsigned long arg);
+
+/
+ * Private Data
+ /
+
+/* This is the list of lower half PWM driver methods used by the upper half
+ * driver
+ */
+
+static const struct pwm_ops_s g_pwmops =
+{
+  .setup   = pwm_setup,
+  .shutdown= pwm_shutdown,
+  .start   = pwm_start,
+  .stop= pwm_stop,
+  .ioctl   = pwm_ioctl,
+};
+
+static struct imx9_pwmtimer_s g_pwmdev[] =
+{
+#ifdef CONFIG_IMX9_TPM1_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM1,
+.base= IMX9_TPM1_BASE,
+.n_channels  = CONFIG_IMX9_TPM1_PWM_NCHANNELS,
+.chmux   = CONFIG_IMX9_TPM1_PWM_CHMUX,
+.clk = AON_CLK_FREQ,
+  },
+#endif
+
+#ifdef CONFIG_IMX9_TPM2_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM2,
+.base= IMX9_TPM2_BASE,
+.n_channels  = CONFIG_IMX9_TPM2_PWM_NCHANNELS,
+.chmux   = CONFIG_IMX9_TPM2_PWM_CHMUX,
+.clk = OSC_24_CLK_FREQ,
+  },
+#endif
+
+#ifdef CONFIG_IMX9_TPM3_PWM
+  {
+.ops = _pwmops,
+.id  = PWM_TPM3,
+.base= IMX9_TPM3_BASE,
+.n_channels  = CONFIG_IMX9_TPM3_PWM_NCHANNELS,
+.chmux   = 

Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


jlaitine commented on code in PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#discussion_r1552801018


##
arch/arm64/src/imx9/imx9_tpm_pwm.c:
##
@@ -0,0 +1,686 @@
+/
+ * arch/arm64/src/imx9/imx9_tpm_pwm.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "arm64_arch.h"
+#include "imx9_tpm_pwm.h"
+#include "imx9_iomuxc.h"
+#include "imx9_ccm.h"
+
+#include "hardware/imx9_iomuxc.h"
+#include "hardware/imx9_pinmux.h"
+#include "hardware/imx9_ccm.h"
+
+#ifdef CONFIG_IMX9_TPM_PWM
+
+/
+ * Pre-processor Definitions
+ /
+
+#define CHMUX(priv, x) (((priv->chmux) >> (x)) & 0xff)

Review Comment:
   fixed, thanks



##
arch/arm64/src/imx9/imx9_tpm_pwm.c:
##
@@ -0,0 +1,686 @@
+/
+ * arch/arm64/src/imx9/imx9_tpm_pwm.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+/
+ * Included Files
+ /
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "arm64_arch.h"
+#include "imx9_tpm_pwm.h"
+#include "imx9_iomuxc.h"
+#include "imx9_ccm.h"
+
+#include "hardware/imx9_iomuxc.h"
+#include "hardware/imx9_pinmux.h"
+#include "hardware/imx9_ccm.h"
+
+#ifdef CONFIG_IMX9_TPM_PWM
+
+/
+ * Pre-processor Definitions
+ /
+
+#define CHMUX(priv, x) (((priv->chmux) >> (x)) & 0xff)
+
+/* This is a temporary shortcut to configure TPM1 and TPM3
+ * frequencies correctly; they don't have an own root clock
+ *
+ * TODO: Determine the frequencies in a more proper way
+ */
+
+#define AON_CLK_FREQ   1
+#define WAKEUP_CLK_FREQ1
+#define OSC_24_CLK_FREQ2400
+
+/
+ * Private Types
+ /
+
+/* This structure represents the state of one PWM timer */
+
+struct imx9_pwmtimer_s
+{
+  const struct pwm_ops_s *ops; /* PWM operations */
+  const tpm_pwm_id_t id;   /* PWM_TPM1...PWM_TPM6 */
+  const uintptr_t base;/* The base address of the TPM */
+  const int n_channels;/* Number of channels used for TPM block */
+  const uint32_t chmux;/* Additional muxing of TPM outputs */
+  const int clk;   /* Input clock frequency for the TPM */
+  uint32_t 

Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


jlaitine commented on code in PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#discussion_r1552800561


##
arch/arm64/src/imx9/hardware/imx9_tpm.h:
##
@@ -0,0 +1,206 @@
+/
+ * arch/arm64/src/imx9/hardware/imx9_tpm.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+#define __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+
+/
+ * Included Files
+ /
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Register Offsets */
+
+#define IMX9_TPM_VERID_OFFSET0x  /* Version ID */
+#define IMX9_TPM_PARAM_OFFSET0x0004  /* Parameter */
+#define IMX9_TPM_GLOBAL_OFFSET   0x0008  /* TPM Global */
+#define IMX9_TPM_SC_OFFSET   0x0010  /* Status and Control */
+#define IMX9_TPM_CNT_OFFSET  0x0014  /* Counter */
+#define IMX9_TPM_MOD_OFFSET  0x0018  /* Modulo */
+#define IMX9_TPM_STATUS_OFFSET   0x001c  /* Capture and Compare 
Status */
+#define IMX9_TPM_CXSC_OFFSET(ch) (0x0020 + (ch * 8)) /* Channel Status and 
Control */

Review Comment:
   fixed, thanks



##
arch/arm64/src/imx9/hardware/imx9_tpm.h:
##
@@ -0,0 +1,206 @@
+/
+ * arch/arm64/src/imx9/hardware/imx9_tpm.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+#define __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+
+/
+ * Included Files
+ /
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Register Offsets */
+
+#define IMX9_TPM_VERID_OFFSET0x  /* Version ID */
+#define IMX9_TPM_PARAM_OFFSET0x0004  /* Parameter */
+#define IMX9_TPM_GLOBAL_OFFSET   0x0008  /* TPM Global */
+#define IMX9_TPM_SC_OFFSET   0x0010  /* Status and Control */
+#define IMX9_TPM_CNT_OFFSET  0x0014  /* Counter */
+#define IMX9_TPM_MOD_OFFSET  0x0018  /* Modulo */
+#define IMX9_TPM_STATUS_OFFSET   0x001c  /* Capture and Compare 
Status */
+#define IMX9_TPM_CXSC_OFFSET(ch) (0x0020 + (ch * 8)) /* Channel Status and 
Control */
+#define IMX9_TPM_CXV_OFFSET(ch)  (0x0024 + (ch * 8)) /* Channel Value */

Review Comment:
   fixed, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 

Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


pkarashchenko commented on code in PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#discussion_r1552555017


##
arch/arm64/src/imx9/hardware/imx9_tpm.h:
##
@@ -0,0 +1,206 @@
+/
+ * arch/arm64/src/imx9/hardware/imx9_tpm.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+#define __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+
+/
+ * Included Files
+ /
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Register Offsets */
+
+#define IMX9_TPM_VERID_OFFSET0x  /* Version ID */
+#define IMX9_TPM_PARAM_OFFSET0x0004  /* Parameter */
+#define IMX9_TPM_GLOBAL_OFFSET   0x0008  /* TPM Global */
+#define IMX9_TPM_SC_OFFSET   0x0010  /* Status and Control */
+#define IMX9_TPM_CNT_OFFSET  0x0014  /* Counter */
+#define IMX9_TPM_MOD_OFFSET  0x0018  /* Modulo */
+#define IMX9_TPM_STATUS_OFFSET   0x001c  /* Capture and Compare 
Status */
+#define IMX9_TPM_CXSC_OFFSET(ch) (0x0020 + (ch * 8)) /* Channel Status and 
Control */
+#define IMX9_TPM_CXV_OFFSET(ch)  (0x0024 + (ch * 8)) /* Channel Value */

Review Comment:
   ```suggestion
   #define IMX9_TPM_CXV_OFFSET(ch)  (0x0024 + (ch) * 8) /* Channel Value */
   ```



##
arch/arm64/src/imx9/hardware/imx9_tpm.h:
##
@@ -0,0 +1,206 @@
+/
+ * arch/arm64/src/imx9/hardware/imx9_tpm.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ /
+
+#ifndef __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+#define __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TPM_H
+
+/
+ * Included Files
+ /
+
+/
+ * Pre-processor Definitions
+ /
+
+/* Register Offsets */
+
+#define IMX9_TPM_VERID_OFFSET0x  /* Version ID */
+#define IMX9_TPM_PARAM_OFFSET0x0004  /* Parameter */
+#define IMX9_TPM_GLOBAL_OFFSET   0x0008  /* TPM Global */
+#define IMX9_TPM_SC_OFFSET   0x0010  /* Status and Control */
+#define IMX9_TPM_CNT_OFFSET  0x0014  /* Counter */
+#define IMX9_TPM_MOD_OFFSET  0x0018  /* Modulo */
+#define IMX9_TPM_STATUS_OFFSET   0x001c  /* Capture and Compare 
Status */
+#define IMX9_TPM_CXSC_OFFSET(ch) (0x0020 + (ch * 8)) /* Channel Status and 
Control */

Review Comment:
   ```suggestion
   #define IMX9_TPM_CXSC_OFFSET(ch) (0x0020 + (ch) * 8) /* Channel Status and 
Control */
   ```



##

Re: [PR] Imx9 lptpm pwm [nuttx]

2024-04-04 Thread via GitHub


jlaitine commented on PR #12054:
URL: https://github.com/apache/nuttx/pull/12054#issuecomment-2038055709

   rebased due to Kconfig & Make.defs conficts


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org