2024-07-22 05:53 PM
I am asking a question of application rather than capabilities of MCU itself.
I hope to build an handheld board that is powered by batteries and using this board update other board's settings, especially date/time configurations.
This requires a parser and i hope i can find some JSON for MCU that will work fine. However, i hope to use this method with pogopins instead of dupont or similar to even more simplify this process.
It is obvious that as addition to TX RX couple, GND pin should must be included for different power sources. I can start communication with a button on handheld board to simplify process. But during pin connection, it is obvious that some noise will be generated that ruins data transfer.
I am not very familiar with UART itself, i just used it on modules. Is there any adequate method for this kind of updating progress? How can i ensure a stable communication randomly just whenever i touch pins? Or what should i use additionally to these RX TX GND pins?
Software is another concern. I hope it can stall for an interrupt remotely, without high clock speed.
I want to use that for home project only and i don't want to use extra RF modules. My primary focus is STM32G0 series, cheap and simple hardware. If a reliable update method exists i can pass to other projects as well.
Just asking your experience and ideas. If there's a cheap addon IC in ST family that can solve updating, i would like to know as well.
Solved! Go to Solution.
2024-07-22 06:53 PM - edited 2024-07-23 07:48 AM
There all kinds of ways to make the system robust against random noise (one or more of the following):
1. You could simply avoid doing hot-plug. Hold the board(s) in off/reset state while making connections. This is simple and effective.
2. Engineer the connector so that grounds are connected before data (typical for hotplug systems). ensure there's a pullup on data lines. There are special connectors that guarantee this, thought for home use this is probably too exotic.
3. Use an extra connector pin as "Board Present" indicator. It should have a pullup/pulldown, and the mating board should put the opposite voltage level on it (through a resistor) when connecting the two boards or, even better, wait until after connecting and just until ready to send. This acts as a CS signal of sorts. Debounce this line sufficiently (in software or via timer capture filter), and wait for it to stabilize before you enable the UART. Additional (i.e on top of whatever's on-chip) ESD protection would be a grown-up thing to add to the board.
4. Establish a handshake protocol over the UART. Make it sufficiently elaborate so as to lower the probability of false-triggering to zero.
2024-07-22 06:35 PM
With Pogo pins, you're going to need some kind of jig to hold the two boards together with enough pressure. If you're holding the two boards by hand, you're asking for un-reliable communication trying to keep the Pogo pins from moving around.
If it's just UART pins and ground, then use simple headers and/or ribbon cable to mate the boards, then use the push button to start data transfer.
2024-07-22 06:35 PM
UART will have no issues passing through typical pogo-pin parts. It's a relatively low speed protocol. Certainly 115200 baud will have no issues. Pogo pins typically have sharp points on the end to break through any thin oxidation that might be on the pads.
Standard 0.1" pitch header pins also work just fine. Certainly will be cheaper. Pogo pins are good for large number of parts where the extra time to design a fixture to hold the board during programming pays off. Standard header pins are good for low quantities.
Jumping to the bootloader and using UART to update the firmware is one way to update the code reliably. Plenty of USB to UART chips and cables out there.
2024-07-22 06:53 PM - edited 2024-07-23 07:48 AM
There all kinds of ways to make the system robust against random noise (one or more of the following):
1. You could simply avoid doing hot-plug. Hold the board(s) in off/reset state while making connections. This is simple and effective.
2. Engineer the connector so that grounds are connected before data (typical for hotplug systems). ensure there's a pullup on data lines. There are special connectors that guarantee this, thought for home use this is probably too exotic.
3. Use an extra connector pin as "Board Present" indicator. It should have a pullup/pulldown, and the mating board should put the opposite voltage level on it (through a resistor) when connecting the two boards or, even better, wait until after connecting and just until ready to send. This acts as a CS signal of sorts. Debounce this line sufficiently (in software or via timer capture filter), and wait for it to stabilize before you enable the UART. Additional (i.e on top of whatever's on-chip) ESD protection would be a grown-up thing to add to the board.
4. Establish a handshake protocol over the UART. Make it sufficiently elaborate so as to lower the probability of false-triggering to zero.