QR Code generation with lvgl v8.0


I’ve used this library to generate a QR code: https://github.com/lvgl/lv_lib_qrcode in LVGL v8.0 for the project.

Code Segment:

static char data[13];
sprintf(data, “%02X%02X%02X%02X%02X%02X”, bdaddr[0], bdaddr[1], bdaddr[2], bdaddr[3], bdaddr[4], bdaddr[5]);
lv_qrcode_update(qr, data, strlen(data));

Here, whenever I’m taking data value as null it is printing distorted QR Code.
But when I’m assigning a string to a data variable by using sprintf() function, control is going up to [getNumDataCodewords]** function in qrcodegen.c
and the system is restarting.

Please, help me to resolve this issue.