GPIO noise on power ON

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

GPIO noise on power ON

Jump to solution
1,099 Views
arnogir
Senior Contributor II

Hello,

I'm using a Kinetis K70 with MQX 4.1, KDS 3.2 and a debugger P&E micro Multilink universal.

My software is composed by many task; but only one in "AUTO_START"

The very fist instruction in this task ("Main_Task") is to configure a GPIO as an output with default level 0.

static void Main_task(uint32_t InitialData)
{
  LWGPIO_STRUCT   TestHandle;

  lwgpio_init(&TestHandle, (GPIO_PORT_A | GPIO_PIN26), LWGPIO_DIR_OUTPUT, LWGPIO_VALUE_LOW);
  lwgpio_set_functionality(&TestHandle, LWGPIO_MUX_A26_GPIO);
  lwgpio_toggle_value(&TestHandle);
  lwgpio_toggle_value(&TestHandle);
...‍‍‍‍‍‍‍‍‍

So in debug mode (step by step) this output pin value is always 0, and then toggle to 1 with the last two instruction.

But when the board start in standalone mode (without probe p&E micro Multilink universal), the output pin value goes to a level 1 during 10ms. After that, Is see the pin goes low and then toggle to 1 -> 0 with my init code.

Conclusion: between the CPU start (after power on) and until the first code line executed in the main_task, there passed 10ms with a pin to an unexpected state (high level)

Is somebody has idea where look at to found the problem? My aim is to have an output pin which stay to Low level during the initialisation... THis is the case when I start with probe, but not when start in standalone... ???

Note: A pull-down resistance (4k7) is applied to this pin...

Thank

0 Kudos
Reply
1 Solution
890 Views
arnogir
Senior Contributor II

Ok

In fact I was forget I had another buffer between the µC and the ULN2803..

This is it which set output before µC initialize Pin Out then the input of this buffer!...

:smileysad:

Sorry for the noise!

View solution in original post

0 Kudos
Reply
6 Replies
891 Views
arnogir
Senior Contributor II

Ok

In fact I was forget I had another buffer between the µC and the ULN2803..

This is it which set output before µC initialize Pin Out then the input of this buffer!...

:smileysad:

Sorry for the noise!

0 Kudos
Reply
890 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Arnaud:

I would suggest check whether Port A _26 is initialized somewhere else in your project.

LWGPIO driver, doesn't require MQX IO system, it is just a set of wrapper functions for direct MCU port control access, so it can be used also very early in the startup code. You can put these code even before the MQX task starts.

Regards

Daniel

0 Kudos
Reply
890 Views
arnogir
Senior Contributor II

Is there anything done by the debugger (Universal Multilink FX) which will not toggle this pin but which is done when no debugger from power ON?

0 Kudos
Reply
890 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Arnaud:

PTA_26 is an analog pin, during power on the state of the analog pin depends on your board.

With debug reset, the state depends on the pull-ups and pull-downs of the debug.

I would suggest you add a 10K pull-down resistor

Regards

Daniel

0 Kudos
Reply
890 Views
arnogir
Senior Contributor II

Hi,

I already test this,

Because this output goes to an amplifier type ULN2003A to drive a relay.

The result is the same with the pull down.

0 Kudos
Reply
890 Views
arnogir
Senior Contributor II

With debugger i have check. When enter on the main task, port is not initialized and output not driven to high voltage.

But when UC start without debbuger pin toggle to high during 25us. ...

0 Kudos
Reply