1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
31
32
33
34
42
45
46
47
52
62
63
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
92
93
/* ... */
#include "main.h"
/* ... */
/* ... */
Includes
uint8_t aShowDeviceID[30] = {0};
uint8_t aShowRevisionID[30] = {0};
uint8_t aShowCoordinate[40] = {0};
uint8_t aShowWaferNumber[30] = {0};
uint8_t aShowLotNumber[30] = {0};
Private variables
void GetMCUInfo(void);
Private function prototypes
/* ... */
int main(void)
{
GetMCUInfo();
while (1)
{
}while (1) { ... }
}{ ... }
/* ... */
void GetMCUInfo(void)
{
register uint32_t size_string = 0, read_info = 0, read_info2 = 0;
sprintf((char*)aShowDeviceID,"Device ID = 0x%lX", LL_DBGMCU_GetDeviceID());
sprintf((char*)aShowRevisionID,"Revision ID = 0x%lX", LL_DBGMCU_GetRevisionID());
sprintf((char*)aShowCoordinate,"X and Y coordinates = 0x%lX", LL_GetUID_Word0());
read_info = LL_GetUID_Word1();
read_info2 = LL_GetUID_Word2();
sprintf((char*)aShowWaferNumber,"Wafer NB = 0x%X", (uint8_t)read_info);
size_string = sprintf((char*)aShowLotNumber,"Lot NB = 0x%lX", read_info2);
sprintf((char*)aShowLotNumber+size_string,"%lX", (read_info >> 8));
}{ ... }
/* ... */
/* ... */