Author Topic: Upgrade firmware by end-user  (Read 5873 times)

0 Members and 1 Guest are viewing this topic.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16299
  • Country: fr
Re: Upgrade firmware by end-user
« Reply #50 on: June 18, 2023, 08:23:05 pm »
Not completely sure I got this thing about the extra iC required, or maybe my suggestion required some more elaboration.
Your MCU probably has  a spare UART connection available? That's just two GPIOs. I understand that if you're using a small MCU with 100% of GPIOs already used, that may be an issue, and in this case you have to become a bit more creative.

Otherwise, just route spare UART pins to a small connector of your liking (can also just be pads and a pogo pin adapter if PCB area is limited), add some minimal protection (like TVS diodes and/or series resistors) if you really want to be super safe.

And then use any off-the-shelf USB-to-UART adapter, that are available in more shapes, forms and variants than you can think of. Absolutely doesn't need any RS232 level shifting, I would actually not recommend it at all if this is a production interface not for the end-user. Just use TTL levels. To make things even better and more flexible, buy an isolated USB-to-UART adapter, those provide isolaiton from USB (which can be a plus) and usually allow providing the target ref. voltage, so you get level shifting as well (useful if your target level is not typical 3.3V.) This will be part of your production tools.
 
The following users thanked this post: tellurium

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28767
  • Country: nl
    • NCT Developments
Re: Upgrade firmware by end-user
« Reply #51 on: June 19, 2023, 09:56:53 am »
Putting a TVS and some series resistors on those UART pins is a good idea though to prevent damage during production testing & configuration. Getting a USB to UART with some protection on the pins as well is preferable. A lot of the UART-USB converters don't have this. I ended up making my own USB-UART converter to have a more rugged device which I can plug into any system without worrying about ground levels, half mains AC being present and so on. I sold a few of these to a customer who went through generic USB to UART converters like a kids goes through a bag of candy due to lack of protection on the pins.
« Last Edit: June 19, 2023, 10:04:36 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2045
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Upgrade firmware by end-user
« Reply #52 on: June 19, 2023, 06:38:06 pm »
i think we agree on UART method of assigning serial number or anything else.

however, assume i installed the firmware (via usb drag and drop method on pi pico rp2040)... and assigned serial number using uart. then the user will update the firmware using usb drag and drop.. how the serial number still not affected despite entire firmware has changed?

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28767
  • Country: nl
    • NCT Developments
Re: Upgrade firmware by end-user
« Reply #53 on: June 19, 2023, 06:46:02 pm »
You store the serial number in a flash area that isn't updated. This can be internal (in a flash page that isn't erased during update) or external (eeprom / FRAM). Some microcontrollers have internal eeprom (either real or simulated in flash). First step is to check whether dragging & dropping a file over USB always erased the entire flash or that you can reserve a page / sector.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf