/** * Identify the core, just to check that we have support for it. * * @return */ static uint32 Mcu_CheckCpu( void ) { uint32 pvr = SCB->CPUID; //uint32 pir; //cpu_info_t *cpuType; core_info_t *coreType; //cpuType = Mcu_IdentifyCpu(pvr); coreType = Mcu_IdentifyCore(pvr); if( (coreType == NULL) ) { // Just hang while(1) ; } return 0; }
static uint32 Mcu_CheckCpu( void ) { uint32 pvr; // uint32 pir; const cpu_info_t *cpuType; const core_info_t *coreType; // We have to registers to read here, PIR and PVR // pir = get_spr(SPR_PIR); pvr = get_spr(SPR_PVR); cpuType = Mcu_IdentifyCpu(pvr); coreType = Mcu_IdentifyCore(pvr); if( (cpuType == NULL) || (coreType == NULL) ) { // Just hang while(1) ; } //DEBUG(DEBUG_HIGH,"/drivers/mcu: Cpu: %s( 0x%08x )\n",cpuType->name,pvr); //DEBUG(DEBUG_HIGH,"/drivers/mcu: Core: %s( 0x%08x )\n",coreType->name,pvr); return 0; }