G400 state of IO's during startup

I am working on a custom board based on G400D.

We are in the final stage of design but I forgot to test IO’s state during startup process. All seems good, IO’s are switching on off in my program. I finally put relays connected to the IO’s using a ULN2004 driver and wow, I discover that one pin trigger during startup.

The IO in question is PD0. Can anyone confirm that this io is pulled up and down during startup?

@ leforban - We are looking into the pin to confirm its state.

I notice that PD0 has not the same behavior than PC23 at startup. Please can you confirm?

This is not a good news i thought that all IO where’s pulled up during startup and this seems not to be the case. Please Aron tell me I am wrong ???

Hello Aron

Any news?

Page 60 of Smart | Connected | Secure | Microchip Technology :wall:

@ leforban - We looked into this issue and that pin does get driven high per page 60 and 61 of the Datasheet that you provided. I observed with a scope that it is not a random spike as it was always 372 ms on my scope.

We will include this table in the manual and developer’s guide to prevent any further inconvenience. We apologize for any inconvenience that this may have caused.

Same phenomenon occurs for PB18 and PC19!!! Reset state is not the same one than during start up!!! again tens pcb to throw!!! It starts to be really annoying and it delays a lot the delivery to customer (a month at least) What I miss here?

I agree this is unacceptable and we are as surprised as you are. Would using the G400HDR help in testing the IOs you need? I would happily send you one if you do not have it already.

I am a little bit under pressure with other tasks right now but will do the test on the HDR next week and will let U know.

Now I have enough time to do experiments, I want to solve this problem. I have designed a custom board that is supposed to switch on/off relays.

I use an ULN2004AD (darlington transistor) to drive the relay. One pole of the coil is directly connected to 5V the other one is connected to the collector of the darlington transistor.
The expected behavior is the following:
GPIO = 0V -> Output of darlington transistor is High (5V) the relay is OFF.
GPIO = 3.3V -> Output of darlington transistor is Low (0V) the relay is ON.

This works great for some IO’s but for two of them relays are switching when I power supply the platform until the application instantiate the IO as digital output with a false state. These two problematic IO’s are PB18 and PC19 (no problem for PC23, PC26,PC22, PD5)

SAM9X35 manual says that these IO’s are PIO,I,PU,ST (no schmitt trigger for PD5). I did not notice that before designing and the prototype was just using 2relays (on PC23 and PC26) with the expected behavior whereas according to me it should not be the case (a pullup should reset state should switch on the relay). Testing voltage during startup on a G400HDR shows that these IO’s are pulled UP during boot time till the application force their states.

Now the question is: Why this problem occurs only on these two IO’s? Is there’s a way to solve that?

What happens if you put a pulldown resistor on these lines?

Is it possible that the they are in the input state and float high? The pulldown would cure this.

If they are physically driven high then the pulldown would have no effect but worth testing.

I didn’t succeed to pull it down even with low value resistor (180Ohm). The thing is that I made an error by not considering the PullUp reset state of these IOs (the good reset state for the expected behavior should be PullDown…) but as it was working for the other IO’s I didn’t pay to much attention about this thing…

What are you using to control relays ?

I just use an NPN (MMBT2222A) transistor most of the time with occasional use of a FET if I need more power to drive the relay.