Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Setting USB serial number for nrf52820 & nrf52833

Hi,

Is it possible to set the USB serial number for the nrf52833 and nrf52820 MCU's?

For the nrf52840 I've found this documentation:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fficr.html

But it seems to be nrf52840 exclusive.

Best Regards,
Andreas

Parents
  • Hi,

    You can set the serial number to whatever value you want, e.g see APP_USBD_STRING_ID_SERIAL during initialization:

    #define APP_USBD_CORE_DEVICE_DESCRIPTOR  {                                                               \
       .bLength = sizeof(app_usbd_descriptor_device_t),    /* descriptor size */                             \
       .bDescriptorType = APP_USBD_DESCRIPTOR_DEVICE,      /* descriptor type */                             \
       .bcdUSB = APP_USBD_BCD_VER_MAKE(2,0,0),             /* USB BCD version: 2.0 */                        \
       .bDeviceClass = 0,                                  /* device class: 0 - specified by interface */    \
       .bDeviceSubClass = 0,                               /* device subclass: 0 - specified by interface */ \
       .bDeviceProtocol = 0,                               /* device protocol: 0 - specified by interface */ \
       .bMaxPacketSize0 = NRF_DRV_USBD_EPSIZE,             /* endpoint size: fixed to: NRF_DRV_USBD_EPSIZE*/ \
       .idVendor = APP_USBD_VID,                           /* Vendor ID*/                                    \
       .idProduct = APP_USBD_PID,                          /* Product ID*/                                   \
       .bcdDevice = APP_USBD_BCD_VER_MAKE(                 /* Device version BCD */                          \
           APP_USBD_DEVICE_VER_MAJOR,                                                                        \
           APP_USBD_DEVICE_VER_MINOR,                                                                        \
           APP_USBD_DEVICE_VER_SUB),                                                                         \
       .iManufacturer = APP_USBD_STRING_ID_MANUFACTURER,   /* String ID: manufacturer */                     \
       .iProduct = APP_USBD_STRING_ID_PRODUCT,             /* String ID: product */                          \
       .iSerialNumber = APP_USBD_STRING_ID_SERIAL,         /* String ID: serial */                           \
       .bNumConfigurations = 1                             /* Fixed value: only one configuration supported*/\
    }

    The link you refer to are used during bonding in Bluetooth, it's not related to USB.

    Kenneth

Reply
  • Hi,

    You can set the serial number to whatever value you want, e.g see APP_USBD_STRING_ID_SERIAL during initialization:

    #define APP_USBD_CORE_DEVICE_DESCRIPTOR  {                                                               \
       .bLength = sizeof(app_usbd_descriptor_device_t),    /* descriptor size */                             \
       .bDescriptorType = APP_USBD_DESCRIPTOR_DEVICE,      /* descriptor type */                             \
       .bcdUSB = APP_USBD_BCD_VER_MAKE(2,0,0),             /* USB BCD version: 2.0 */                        \
       .bDeviceClass = 0,                                  /* device class: 0 - specified by interface */    \
       .bDeviceSubClass = 0,                               /* device subclass: 0 - specified by interface */ \
       .bDeviceProtocol = 0,                               /* device protocol: 0 - specified by interface */ \
       .bMaxPacketSize0 = NRF_DRV_USBD_EPSIZE,             /* endpoint size: fixed to: NRF_DRV_USBD_EPSIZE*/ \
       .idVendor = APP_USBD_VID,                           /* Vendor ID*/                                    \
       .idProduct = APP_USBD_PID,                          /* Product ID*/                                   \
       .bcdDevice = APP_USBD_BCD_VER_MAKE(                 /* Device version BCD */                          \
           APP_USBD_DEVICE_VER_MAJOR,                                                                        \
           APP_USBD_DEVICE_VER_MINOR,                                                                        \
           APP_USBD_DEVICE_VER_SUB),                                                                         \
       .iManufacturer = APP_USBD_STRING_ID_MANUFACTURER,   /* String ID: manufacturer */                     \
       .iProduct = APP_USBD_STRING_ID_PRODUCT,             /* String ID: product */                          \
       .iSerialNumber = APP_USBD_STRING_ID_SERIAL,         /* String ID: serial */                           \
       .bNumConfigurations = 1                             /* Fixed value: only one configuration supported*/\
    }

    The link you refer to are used during bonding in Bluetooth, it's not related to USB.

    Kenneth

Children
Related