D21 not booting when FTDI connected

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Team,

 

This seems to happen every-so-often to some of my micros even in the same hardware. When my board is completely unpowered and only Uart is connected to PA18/PA21 as seen in the cut down schematic below through an FTDI cable, I then power up my board and my micro doesn't boot. Now my idea is that the low power coming through the ftdi cable that has the capability to operate the micro switches some of the peripherals on, but not all of them. That can be confirmed when I power the board up and the wdt reset kicks in...sometimes. My main question is how could I combat this? The obvious answer is to disconnect the debug cable while I am powering the system, but in terms of practically have other people seen this in the past?

 

I am yet to look at the brown-out detector on the M0+ series, perhaps this is the only way to do it? Else I was thinking of having to try and use an isolated debug cable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A very common problem. I've seen some TI bus level translators used, but the part number escapes me at the moment. Essentially the problem is caused by the substrate diodes on most pins of a cmos device. The txd from the ftdi is injecting power via the substrate diode on the SAM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another thing I found very strange. I wrote a bootloader app and everything had been working very well in terms of a cellular OTA that operated on its own uart. When my uart cable is plugged in from a notebook that on battery power (no mains connection), everything worked fine. When i remove the uart cable i get communication to my server, 2 packets get sent (max) between the server and the cell device. This sits there trying and trying again for 45 mins. I plug in my uart cable, open comms and do nothing else and it successfully downloads the rest of the packets.

 

One thing I think has been concerning me is that I used the 5V variant of an FTDI cable. While I am only using the rx/tx and ground pins, the 5V logic from the cable was the concerning part. I am wondering if the 5V logic of the ftdi cable has actually damaged my uart module within the IC in some way to give the above 2 examples?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

possible.  I use 2.2K series and 33K pullups on my serial lines to protect against cross-wire, etc.

jeff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As Jeff suggests, pullups on floating inputs are a good idea. With your rxd pin floating, the usart is probably receiving a whole heap of garbage - even moving your hand nearby or breathing on it will most likely cause transitions. You could prove this by flashing an led when you get receive data and disconnecting the ftdi. Does the led flash? If it does then you've proven there's junk coming in. As to how your code copes with this only you know.

 

5V ftdi -> 3V3 samd is probably not a good idea. Again, as jeff suggests, some series resistance mitigates this issue. Has it killed your chip? Probably not.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

" Has it killed your chip? Probably not. " - just don't ask the ESD diodes on those pins to take a real hit!

 

Note, pull up RX side of series R to local Vcc.  Otherwise the pullups power your chip.

Note, my series R are very aggressive and will not work with longish cables or very high data rates.   330 Ohm or less is more reasonable.  i put electronics in power plants, so my idea of protection is, well, a bit extreme.

jeff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My other idea was to try and use fets to isolate the signal, but then I would need to double fet it in order not to reverse the logic. But the passive components are probably a much better idea in general! I'll have a go at that one instead champ!