cancel
Showing results for 
Search instead for 
Did you mean: 

Ideas on restricting firmware to allow evaluation?

Ricko
Senior II

Hi,
I have made some PCBs with STM32L452 and written firmware for them for a client. They have been running late with a payment but being a new client and also having paid all other invoices on time and being easy to work with, I don't want to make a big deal out of it. But, at the same time, I want to make sure they clear the invoice asap.

 

So would like to send them downloadable code (not the source code) via email so they can check it works exactly as per new agreed specs (just in case that is the reason why they might have delayed the payment) but also so that it works only for a limited time. Then I can send them the fully unlocked code when the invoice is cleared.

 

Any suggestions on the simplest way to do that without wasting much time writing a lot of code? Perhaps there are some freeware libraries I can use?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Karl Yamashita
Lead III

If you have custom bootloader, then you can send them a board with this custom bootloader that counts up/down a certain amount before it blocks the bootloader process. Just save the count in flash in the bootloader section in the last page on each bootloader process.

You could also tag your test FW so when the bootloader sees this tag (like a simple ID at specific address), it'll start the counter. This would keep the customer from boot loading again and resetting the counter. For each new version, you can increment this tag. The bootloader can then reset the count and start counting again. If the FW doesn't have a tag, then the boot loader can ignore the counter. 

 

If it's being boot loaded by the boot pin, then the best approach would be what @Tesla DeLorean mentioned. 

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

View solution in original post

3 REPLIES 3

Does your design have anything that can pull time? Like an RTC, GPS, or via the Internet to ping an SNTP server?

If not perhaps limit the number of resets, you could limit to say 32 restarts by knocking down some words in unused FLASH ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Karl Yamashita
Lead III

If you have custom bootloader, then you can send them a board with this custom bootloader that counts up/down a certain amount before it blocks the bootloader process. Just save the count in flash in the bootloader section in the last page on each bootloader process.

You could also tag your test FW so when the bootloader sees this tag (like a simple ID at specific address), it'll start the counter. This would keep the customer from boot loading again and resetting the counter. For each new version, you can increment this tag. The bootloader can then reset the count and start counting again. If the FW doesn't have a tag, then the boot loader can ignore the counter. 

 

If it's being boot loaded by the boot pin, then the best approach would be what @Tesla DeLorean mentioned. 

 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

Thank you both, all good suggestions!

With the current hardware configuration and quick implementation both, the bootloader counter and also the reset counter work great. :thumbs_up: