PCB抄板开发源码芯片解密NUC100系列单片机解密
单片机解密单片机源程序如下:
- /* Includes ------------------------------------------------------------------*/
- #include "stm32_eth.h"
- #include "netconf.h"
- #include "main.h"
- #include "helloworld.h"
- #include "httpd.h"
- #include "tftpserver.h"
- #include "KEY.H"
- #include "stdio.h"
- #include "bkp.h"
- #include "LED.H"
- /* Private typedef -----------------------------------------------------------*/
- /* Private define ------------------------------------------------------------*/
- #define SYSTEMTICK_PERIOD_MS 10
- #ifdef __GNUC__
- /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf
- set to 'Yes') calls __io_putchar() */
- #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
- #else
- #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
- #endif /* __GNUC__ */
- /* Private macro -------------------------------------------------------------*/
- /* Private variables ---------------------------------------------------------*/
- __IO uint32_t LocalTime = 0; /* this variable is used to create a time reference incremented by 10ms */
- uint32_t timingdelay;
- typedef void (*pFunction)(void);
- pFunction Jump_To_User_Application;
- uint32_t Jump_User_Address;
- /* Private function prototypes -----------------------------------------------*/
- void System_Periodic_Handle(void);
- void IAP_httpd_init(void);
- void IAP_tftpd_init(void);
- void MY_NVIC_Configuration(void);
- void NVIC_DeInit(void);
- void BKP_Configuration(void);
- void MCU_Reset(void);
- void EARES_SRAM(void);
- void NVIC_Configuration(void);
- /* Private functions ---------------------------------------------------------*/
- /**
- * @brief Main program.
- * @param None
- * @retval None
- */
-
- int main(void)
- {
- unsigned int g_bUpdateFlag = 0;
- NVIC_DeInit();
- RCC_DeInit();
- SystemInit();
- BKP_Configuration();
- NVIC_Configuration();
- SEI(); //开全局中断
- g_bUpdateFlag = BKP_ReadBackupRegister(BKP_DR9); //读取更新标志
- //if(!(KEY1 | KEY2 | KEY3 | KEY4)
- if(g_bUpdateFlag == 0x0) //不需要升级,
- {
- /* Check if valid stack address (RAM address) then jump to user application */
- if (((*(__IO uint32_t*)USER_FLASH_FIRST_PAGE_ADDRESS) & 0x2FFE0000 ) == 0x20000000)
- {
- CLI(); //关闭总中断,必须有、
- NVIC_DeInit();
- RCC_DeInit();
- /* Jump to user application */
- Jump_User_Address = *(__IO uint32_t*) (USER_FLASH_FIRST_PAGE_ADDRESS + 4);
- Jump_To_User_Application = (pFunction) Jump_User_Address;
- /* Initialize user application's Stack Pointer */
- __set_MSP(*(__IO uint32_t*) USER_FLASH_FIRST_PAGE_ADDRESS);
- Jump_To_User_Application();
- while (1);
- }
- else
- {
- //printf("非法SRAM\n");
- }
- }

芯片解密