K60 PTE25 acts with problems in MQX4.0

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

K60 PTE25 acts with problems in MQX4.0

Jump to solution
902 Views
kkkk
Contributor II

There are two problems with PTE24 and PTE25. I use MK60FN1M0VLQ12 with MQX 4.0. I modify the MQX4.0 hello2 sample code. I set these two pins as GPIO, there is my setting code:


LWGPIO_STRUCT Reset_FPGA,Power_EN;

BOOL status;

status=lwgpio_init(&Reset_FPGA,LWGPIO_PORT_E|LWGPIO_PIN24,LWGPIO_DIR_OUTPUT,LWGPIO_VALUE_LOW);

lwgpio_set_functionality(&Reset_FPGA,LWGPIO_MUX_E24_GPIO);
status=lwgpio_init(&Power_EN,LWGPIO_PORT_E|LWGPIO_PIN25,LWGPIO_DIR_OUTPUT,LWGPIO_VALUE_HIGH);

lwgpio_set_functionality(&Power_EN,LWGPIO_MUX_E25_GPIO);

I check the PTE registers, both registers are 0x000100. When I set PTE24 as high or low, PTE25 will automatically act at the same time . They act together.

I use gpio sample code from KINETIS_120MHZ_SC without MQX4.0 and set these two pins as GPIO:

PORTE_PCR24=(0|PORT_PCR_MUX(1));

PORTE_PCR25=(0|PORT_PCR_MUX(1));

GPIOE_PDDR=GPIO_PDDR_PDD(GPIO_PIN(24) | GPIO_PIN(25));

They can act dependently. How can I fix this problem with MQX4.0?

Another problem is the PTE25's VOL. When I set PTE24's VOH as 3.3V, I try to set PTE25 low and it hold at 2.3V and can't be under 0.5V.

It happens when I use MQX4.0.  Here is my code:

PORTE_PCR24=(0|PORT_PCR_MUX(1));

PORTE_PCR25=(0|PORT_PCR_MUX(1));

GPIOE_PDDR=GPIO_PDDR_PDD(GPIO_PIN(24) | GPIO_PIN(25));

When I use gpio sample code from KINETIS_120MHZ_SC without MQX4.0, PTE25 can be set under 0.5V.

PTE25 registor is 0x00000100 whenever MQX4.0 is used or not. How to fix this problem?

Tags (3)
0 Kudos
Reply
1 Solution
699 Views
georgerouse
Contributor II

You may be interested in section 5.2 of app note 4526 (see below). It appears that if you want to use "normal" PTE24 / PTE25 functionality you have to disable OSC1. We had a similar problem using PTE24 / PTE25 as UART4. The problem was solved by setting register MCG_C10 = 0. We also set OSC1_CR = 0 but that did not appear to be necessary.

5.2 Oscillator (OSC)

A second oscillator has been added (OSC1). The new OSC pin functions are muxed over PTE24 and PTE25, so if the second

OSC is used it will impact hardware if any of the functions on PTE24 and PTE25 were being used.

OSC1 can be used as an input to the MCG, so the addition of the second OSC does affect the MCG module. Refer to the

MCG section for more information.

View solution in original post

2 Replies
700 Views
georgerouse
Contributor II

You may be interested in section 5.2 of app note 4526 (see below). It appears that if you want to use "normal" PTE24 / PTE25 functionality you have to disable OSC1. We had a similar problem using PTE24 / PTE25 as UART4. The problem was solved by setting register MCG_C10 = 0. We also set OSC1_CR = 0 but that did not appear to be necessary.

5.2 Oscillator (OSC)

A second oscillator has been added (OSC1). The new OSC pin functions are muxed over PTE24 and PTE25, so if the second

OSC is used it will impact hardware if any of the functions on PTE24 and PTE25 were being used.

OSC1 can be used as an input to the MCG, so the addition of the second OSC does affect the MCG module. Refer to the

MCG section for more information.

699 Views
georgerouse
Contributor II

The best way to make this fix is to make the changes in bsp_cm.c and rebuilt the BSP.

0 Kudos
Reply