用的是这个函数读取的。得不到正确的芯片ID
void main(void)
{
#if (1 == USE_LF_RX)
UINT8 u8LFCount;
#endif
/* Enable STOP and watchdog */
vfnSetupMCU();
/* Config GPIO */
vfnSetupGPIO();
/* Enabling interrupts will allow the interrupt vectors of pending interrupts
* to be accessed. It is in the interrupt vector that TPMS_INTERRUPT_FLAG is updated.
* Enable the interrupts a few instructions before checking TPMS_INTERRUP_FLAG, to let
* time to the MCU to enter the interrupt vector and update TPMS_INTERRUPT_FLAG. */
EnableInterrupts;
/* The if below is entered when we are here not because of STOP1 exit. We can be here
* after POR, COP reset etc...
* To check for POR specifically, use:
* if ( (((SIMRS == SIMRS_POR_MASK)) || (SIMRS == (SIMRS_POR_MASK | SIMRS_LVR_MASK))) // Only reset source is POR
&& (CLEAR == SPMSC2_PDF) ) // Not wake up from STOP1
*/
if (CLEAR == SPMSC2_PDF)
{
// Clear the interrupts flag
TPMS_INTERRUPT_FLAG = CLEAR;
#if (1 == USE_LF_RX)
// Init current mode: we are in storage waiting an LF frame to enter active mode
current_mode = storage;
#endif
// Init WDIV array that will contain the calibrated WDIV values
vfnInitWDIV();
// Configure periodic wake up
vfnSetPWU();
// Make sure LF block is disabled
TPMS_LF_ENABLE(CLEAR);
// Clear RF frame counter
gu16FrameCnt = CLEAR;
// Store Unique ID in RAM maintained in STOP1
vfnStoreUniqueID();
#if (1 == USE_LF_RX)
vfnClearReceivedBuffer();
vfnDataModeInit();
TPMS_LF_ENABLE(SET); // Note that vnfLFRConfigFactoryRegs() is called in this function
Delay_TPM_ms(3); // Wait 3ms to let time to whole LF block to be turned on
#endif
} // end SPMSC2_PDF is clear
for (;;) {
__RESET_WATCHDOG();
#if (1 == USE_LF_RX)
这个是NTM88_Starter_Project例程main部分,
这个是vfnStoreUniqueID();ID读取