Comparator MIMXRT1020-EVK example pin change

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Comparator MIMXRT1020-EVK example pin change

ソリューションへジャンプ
1,353件の閲覧回数
comp1
Contributor II

Hello,

I ran the comparator example for the MIMXRT1020-EVK from SDK_2_9_1_MIMXRT1021xxxxx/boards/evkmimxrt1020/driver_examples/cmp/polling/cmp_polling.c and it works as expected for the default GPIO_AD_B0_14 pin on the eval board.

I am trying to use pin GPIO_AD_B0_10 instead for my project and I cannot get it to work. The user LED stays off when I connect J19-6 (GPIO_AD_B0_10) to J19-8 (VCC) or J19-7 (GND). 

I changed the following in pin_mux.c:

// From
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_14_GPIO1_IO14,0U);
// To
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10,0U);  

and cmp_polling.c:

// From
#define DEMO_CMP_BASE CMP1
// To
#define DEMO_CMP_BASE CMP3

According the reference manual, GPIO_AD_B0_10 is on cmp 3.
I also tried GPIO_AD_B0_11 with cmp 4 without any luck.

I added some more input parameters in pin_mux.c as well:

gpio_pin_config_t inputGPIO = {
    .direction = kGPIO_DigitalInput,
    .outputLogic = 0U,
    .interruptMode = kGPIO_NoIntmode
};
GPIO_PinInit(GPIO1, 10U, &inputGPIO);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0x01B0A0U); 

This wasn't working on our custom board so that is why I'm trying this on the eval board to make sure it wasn't an issue on our side.
Any help would be appreciated

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
1,294件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi @comp1 ,

I strongly recommend you to change the pin configuration using ConfigTools.

Could you please check that you also changed the user channel to 4 (by default 0)?

I tried it on my side and it worked.

Best regards, Daniel.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,324件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

My name is Daniel and I will help you in this case.

Could you please update to the newest RT1020-EVK SDK?
Best regards, Daniel.

0 件の賞賛
返信
1,310件の閲覧回数
comp1
Contributor II

Hello Daniel,

Upgrading to the newest SDK_2_13_0 has the same issue.

0 件の賞賛
返信
1,295件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi @comp1 ,

I strongly recommend you to change the pin configuration using ConfigTools.

Could you please check that you also changed the user channel to 4 (by default 0)?

I tried it on my side and it worked.

Best regards, Daniel.

0 件の賞賛
返信
1,279件の閲覧回数
comp1
Contributor II

Hey Daniel,

Changing the user channel to 4 worked!

How did you know which user channel to use for that pin? The only correlation I could find with that pin and "4" is the pin muxing table in the reference manual listing port ACMP3_IN4 next to pad GPIO_AD_B0_10. I thought the "_IN4" was the interrupt number, not a user channel (or positive channel?).

Is DAC channel 7 correct? How do I correlate that with the pins I want to use?

Thanks, I want to make sure I understand it all.

0 件の賞賛
返信
1,274件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

I´m glad to hear that!
Please take a look to Figure 60-1. CMP, DAC and ANMUX block diagram and Chapter 10 in RT1020 RM for more information about this.

Best regards, Daniel.

0 件の賞賛
返信