USB - product serial number

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
Arek
Senior User
Posts: 90
Joined: Thu 2016-09-01 10:58

USB - product serial number

Post by Arek » Thu 2019-05-09 12:22

Hi,
in the source usbmsc.c is shown how serial number is defined.
Ok, i can put my own serial number in const __y u_int16 M_serialNumberDescriptorDefault
But... in this way i have to make numerous dlx files for every number.

Or maybe I missed something.

am

Hannu
Senior User
Posts: 58
Joined: Mon 2016-05-30 11:54

Re: USB - product serial number

Post by Hannu » Thu 2019-05-09 15:27

You'll have SPI flash or some other storage medium on your device. During final test, when the storage is programmed write the serial number to a file and then read the number from the file and write it to the descriptor.

fopen(), fread(), fclose() are the functions.

Arek
Senior User
Posts: 90
Joined: Thu 2016-09-01 10:58

Re: USB - product serial number

Post by Arek » Thu 2019-05-09 15:56

Hi Hannu,

many thanks!!!
I'm looking for something to read/write to SPI and... don't see such things.
Again thank you!

User avatar
Panu
VLSI Staff
Posts: 2650
Joined: Tue 2010-06-22 13:43

Re: USB - product serial number

Post by Panu » Fri 2019-05-10 11:13

Hi!

In your final device, your firmware is in the SPI flash, right? Your DLX file is in the SPI flash, the file name is something like S:SYS/YOURAPP.DLX. So additionally also make a file, something like S:SYS/SERIAL.NUM and write your serial number there. Then read your serial number from that file and report it to the USB.
Hannu wrote:fopen(), fread(), fclose() are the functions.
Just like Hannu said.
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Arek
Senior User
Posts: 90
Joined: Thu 2016-09-01 10:58

Re: USB - product serial number

Post by Arek » Fri 2019-05-10 12:06

Thanks,
my serial number generator works well!

Post Reply